/* Night Shift — Muir PowerSync theme (Nov 2026).
   Loaded last (after css/*.css and styles-polish.css). Tokens live in
   css/00_tokens_base.css :root; this file only builds components from them. Kept
   deliberately free of blur/backdrop-filter: older field phones pay for
   every blurred layer on scroll, and the glass look here comes from
   translucent fills over one fixed background gradient. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@media screen {
  /* On the root, not body: body is a 600px column on wide screens. */
  html {
    min-height: 100%;
    background:
      radial-gradient(900px 520px at 85% -8%, rgba(56, 189, 248, 0.16), transparent 62%),
      radial-gradient(700px 480px at -12% 108%, rgba(129, 140, 248, 0.12), transparent 60%),
      var(--bg-dark);
    background-attachment: fixed;
  }
  body {
    background: transparent;
    font-size: var(--fs-md);
  }
}

/* ---------- Accessibility floor ---------- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.choice-row input[type='radio'],
input[type='checkbox'] {
  width: 24px;
  height: 24px;
  accent-color: var(--primary);
}
/* Text on any brand or status fill is dark. Every accent in the app is
   light (cyan, green, coral...), so white text on them measured 2.1-3.0:1;
   --on-accent is 6.4-9.8:1 on all of them. Rules that put a button on a
   card background (styles-polish.css, ID-scoped) still win and keep
   light text. Primary buttons have their own token for the same job
   (7.2): --on-primary is the ONLY colour a primary button's text may
   take, here and in css/02 - no inline colour overrides. */
.btn[style*='color:#fff'],
.btn[style*='color: #fff'],
.btn[style*='color:#ffffff'],
.btn[style*='color: #ffffff'],
.btn[style*='color:white'],
.btn[style*='color: white'] {
  color: var(--on-accent) !important;
}
.btn-primary {
  color: var(--on-primary) !important;
}
.btn-primary {
  background: var(--primary-gradient);
  border: none;
}
.btn {
  border-radius: var(--radius-btn);
  font-weight: 750;
  letter-spacing: 0.01em;
}
.btn-secondary {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
  border-radius: var(--radius-btn);
  min-height: var(--tap);
  font-size: var(--fs-md);
  font-weight: 700;
}
/* Secondary actions share the surface-glass pattern (7.6) - stated here
   too so the theme layer, which wins, carries the rule explicitly. */
.btn-action {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
}
.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--input-border);
  min-height: 56px;
  font-size: var(--fs-md);
  font-weight: 750;
}
/* Batch C (visual sweep finding 3): a form's footer pair - the primary
   .btn and the .btn-secondary Cancel - computed uneven (Save 48px vs
   Cancel 54px: .btn's padding is trimmed to 14px by a later layer while
   .btn-secondary keeps 16px, and both sit on the 48px tap floor). One
   shared 56px floor - the design standards' primary height - inside
   form panels, sheets and the End of Day / PPE overlays levels every
   pair. The small pills opt out as they always have: inline width:auto
   (STAMP, OPEN, DISCARD DRAFT) or the .co-refresh class. */
.form-panel .btn:not([style*='width:auto']):not(.co-refresh),
.form-panel .btn-secondary:not([style*='width:auto']):not(.co-refresh),
.sheet .btn:not([style*='width:auto']):not(.co-refresh),
.sheet .btn-secondary:not([style*='width:auto']):not(.co-refresh),
#endOfDayOverlay > div > .btn,
#endOfDayOverlay > div > .btn-secondary,
#ppeOverlay > div > .btn,
#ppeOverlay > div > .btn-secondary {
  min-height: 56px;
}
.btn-danger-outline {
  color: var(--danger) !important;
  border-color: var(--danger) !important;
}
/* Back: one per screen, at the top, IN FLOW — not sticky. A sticky
   pill rides over whatever scrolls beneath it: on the report screens
   it covered the History insights panel, a fault view's "needs
   further investigation" answer and the fault form's "+ Add part"
   button (owner review, 2026-11-18) — content left readable-looking
   but untappable under the pill. In flow the control can never sit
   on top of anything, at any scroll position; the DAR form's back
   control and the at-screen bars already worked this way.
   .btn-back-fixed is the same pill for the rare screen whose back
   label is settled wording the leaf-return helper must not rewrite
   (Admin Projects' "← Back to Admin"). */
.btn.btn-back,
.btn.btn-back-fixed {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  min-height: var(--tap);
  padding: 0 18px;
  margin-bottom: var(--space-4) !important;
  background: rgba(10, 17, 32, 0.92) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--surface-glass-border) !important;
  font-size: var(--fs-md);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* ---------- Cards and panels ---------- */
.form-panel,
.gatekeeper-card,
.app-modal-box,
.log-item,
.folder-content {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
}
.form-panel,
.gatekeeper-card,
.app-modal-box {
  border-radius: var(--radius-card);
}
.app-modal-box,
.gatekeeper-card {
  background: #0f1829;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.app-modal-message {
  font-size: var(--fs-md);
}
.section-title {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
#appVersionStamp,
.gatekeeper-version {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none !important;
  letter-spacing: 0.02em !important;
}

/* ---------- Dashboard ---------- */
.dash-header {
  border-bottom: none;
  margin-bottom: var(--space-3);
  padding-bottom: 0;
  align-items: center;
}
.dash-header-left {
  min-width: 0;
  display: grid;
  gap: 0;
}
.dash-header .dash-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 0;
}
.dash-header .header-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  margin-right: 0;
}
.dash-project {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-main);
  font: inherit;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  max-width: 100%;
}
.dash-project #activeProjectBanner {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
  font-size: inherit;
  margin: 0;
}
.dash-project #activeProjectBanner:empty::before {
  content: 'Choose project';
}
.dash-chev {
  color: var(--text-muted);
  font-size: var(--fs-md);
}
.dash-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-glass-strong);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
  font: inherit;
  font-weight: 800;
  font-size: var(--fs-md);
  cursor: pointer;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  min-height: 56px;
  margin-bottom: var(--space-4);
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
}
.status-line #syncStatus {
  line-height: 1.3;
  background: none;
  border: none;
  padding: 0;
  min-height: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
}
.status-line #syncStatus::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-line #syncStatus.charging {
  color: var(--warning);
}
.status-line #syncStatus.offline {
  color: var(--text-muted);
}
.status-line #syncStatus .battery-container {
  display: none;
}
.status-text {
  display: grid;
  gap: 0;
  min-width: 0;
  margin-right: auto;
}
.status-counts {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.status-sync {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-glass-strong);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#dashboardView > .btn.dash-hero,
#dashboardView > .btn.dash-eod {
  background: var(--primary-gradient) !important;
  color: var(--on-accent) !important;
  border: none;
  min-height: 92px;
  border-radius: var(--radius-card);
  box-shadow: 0 10px 34px rgba(56, 189, 248, 0.28);
  font-size: var(--fs-lg);
  font-weight: 800;
  margin-bottom: var(--space-4);
}
#dashboardView > .btn.dash-hero .btn-label-group,
#dashboardView > .btn.dash-eod .btn-label-group {
  align-items: center;
  text-align: center;
}
#dashboardView > .btn.dash-hero .btn-sub {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  opacity: 0.85;
  color: var(--on-accent);
}
.dash-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.dash-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  min-height: 112px;
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dash-tile-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  color: #7dd3fc;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.22));
}
.dash-tile-name {
  font-size: var(--fs-lg);
  font-weight: 800;
  margin-top: var(--space-3);
}
.dash-tile-sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}
.dash-tile-arrow {
  display: none;
}
.dash-tiles-odd > #jobsFolderBtn {
  grid-column: 1 / -1;
  min-height: 0;
}
.dash-tiles-odd > #jobsFolderBtn .dash-tile-ico {
  display: none;
}
.dash-tile.folder-open,
.dash-row.folder-open,
#equipmentFolderBtn.folder-open {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
/* The home rows' resting border in this sheet is !important (the
   glass rule below), so their open border needs the same weight. */
#dashRows > .btn.folder-open,
.section-rows > .btn.folder-open {
  border-color: var(--primary) !important;
}
/* Folders opened from a tile, and the lists inside them, read as rows of
   one card rather than a stack of loud coloured buttons. */
#dashboardView .folder-content {
  border-radius: var(--radius-card);
  margin-bottom: var(--space-4);
}
#reportsFolderContent > .btn,
#jobsFolderContent > .btn,
#teamFolderContent > .btn,
#dashRows > .btn,
.section-rows > .btn {
  justify-content: flex-start;
  text-align: left;
  min-height: 56px !important;
  font-size: var(--fs-md);
  background: var(--surface-glass) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--surface-glass-border) !important;
}
#reportsFolderContent > .btn[data-onclick='openFaultReportForm()'] {
  color: var(--danger) !important;
}
#jobsFolderContent > .btn .btn-sub,
#teamFolderContent > .btn .btn-sub,
#dashRows > .btn .btn-sub,
.section-rows > .btn .btn-sub {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}
#jobsFolderContent > .btn .btn-label-group,
#teamFolderContent > .btn .btn-label-group,
#dashRows > .btn .btn-label-group,
.section-rows > .btn .btn-label-group {
  align-items: flex-start;
  text-align: left;
}
#jobsFolderContent > .btn > span[id$='Arrow'],
#jobsFolderContent > .btn > .more-chev,
#teamFolderContent > .btn > span[id$='Arrow'],
#teamFolderContent > .btn > .more-chev,
#dashRows > .btn > span[id$='Arrow'],
#dashRows > .btn > .more-chev,
.section-rows > .btn > .more-chev {
  margin-left: auto;
}
/* The home rows share one height (104px, css/07) - the folder
   floor above would let a long subtitle grow one row taller than its
   siblings. */
#dashRows > .btn {
  min-height: 104px !important;
}
/* The section rows share this height (owner ruling 2026-11-09: the
   section pages use the home rows' exact arrangement). The anchor
   outranks the glass group's 56px floor, whose folder-content ID
   selectors also match rows inside those containers. */
#appInterface .section-rows > .btn {
  min-height: 104px !important;
}
#dashboardView .dash-section-title {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text-main);
  text-transform: none;
  letter-spacing: 0;
  border-bottom: none;
  margin-top: var(--space-2);
}
@media (min-width: 560px) {
  .dash-tiles {
    grid-template-columns: repeat(4, 1fr);
  }
  .dash-tiles-odd > #jobsFolderBtn {
    grid-column: auto;
    min-height: 112px;
  }
  .dash-tiles-odd > #jobsFolderBtn .dash-tile-ico {
    display: grid;
  }
}

/* ---------- Account sheet ---------- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: rgba(2, 6, 16, 0.7);
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.sheet {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  overflow-y: auto;
  background: #0f1829;
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-4) calc(var(--space-4) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
.sheet .btn {
  margin-bottom: 0;
  width: 100%;
}
.sheet-eyebrow,
.sheet-section {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin: 0;
}
.sheet-section {
  margin-top: var(--space-2);
}
.sheet-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  margin: -6px 0 var(--space-2);
  color: var(--text-main);
}
.sheet-note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  /* A note explains the control ABOVE it (7.4): it sits a fixed,
     positive 2px under that control and the sheet's full gap stays
     below it, so it can never read as belonging to (or sitting on)
     the wrong control. The spacing is positive on purpose - the old
     negative margin that cancelled the sheet's flex gap could pull
     a note over its control whenever the layout around it changed;
     control+note pairs are grouped with .sheet-group instead. */
  margin: 2px 0 0;
}
/* Groups a control with the note that explains it, so the pair moves
   through the sheet's flex layout as one item (7.4). */
.sheet-group {
  display: flex;
  flex-direction: column;
}
@media (min-width: 700px) {
  .sheet-overlay {
    align-items: center;
  }
}

/* ---------- Sign in ---------- */
#gatekeeperOverlay {
  background:
    radial-gradient(800px 500px at 80% -10%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(600px 420px at -10% 110%, rgba(129, 140, 248, 0.14), transparent 60%),
    var(--bg-dark);
  overflow-y: auto;
}
.gatekeeper-card {
  padding: var(--space-6) var(--space-5) var(--space-5);
  text-align: left;
}
.gatekeeper-card .gatekeeper-logo {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto var(--space-3);
}
.gatekeeper-title {
  text-align: center;
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}
.gatekeeper-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 4px 0 var(--space-5);
}
.gatekeeper-sub .app-brand-name {
  color: inherit;
  font-size: inherit;
}
.gatekeeper-field label {
  display: block;
  text-align: left;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-main);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.gatekeeper-card .gatekeeper-input {
  margin-top: 0;
  text-align: left;
  letter-spacing: 0;
  min-height: 56px;
  font-size: var(--fs-lg);
  border-radius: var(--radius-btn);
}
#gatekeeperTechName {
  text-transform: uppercase;
}
#gatekeeperTechName::placeholder {
  text-transform: none;
}
.gatekeeper-hint {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
#gatekeeperCompanyCode {
  text-transform: uppercase;
}
#gatekeeperCompanyCode::placeholder {
  text-transform: none;
}
.gatekeeper-company-saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 48px;
  margin: 0 0 var(--space-4);
  padding: 4px 4px 4px var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: rgba(56, 189, 248, 0.06);
  color: var(--text-muted);
  font-size: var(--fs-md);
}
.gatekeeper-company-saved strong {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.gatekeeper-company-change {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-3);
  background: none;
  border: none;
  border-radius: var(--radius-btn);
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
#gatekeeperError {
  color: var(--danger);
  font-size: var(--fs-sm);
  margin: 0 0 var(--space-3);
}
#gatekeeperSubmitBtn {
  width: 100%;
  min-height: 56px;
  margin: var(--space-2) 0 0;
  font-size: var(--fs-lg);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}
.gatekeeper-help {
  text-align: center;
  color: var(--text-muted);
  margin: var(--space-4) 0 0;
}
.gatekeeper-progress {
  text-align: center;
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin: 0 0 var(--space-3);
}
.gatekeeper-forgot-link {
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  min-height: 44px;
}
#forgotCodePanel {
  margin-top: var(--space-3);
  text-align: left;
}
.gatekeeper-version {
  width: 100%;
  margin-top: var(--space-2);
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.gatekeeper-links,
.landing-footer {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin: 0;
  font-size: var(--fs-sm);
}
.gatekeeper-links a,
.landing-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--text-muted);
  text-decoration: underline;
}

/* ---------- Landing ---------- */
.landing-overlay {
  justify-content: flex-start;
  align-items: stretch;
  padding: var(--safe-top) 0 var(--safe-bottom);
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(56, 189, 248, 0.2), transparent 60%),
    radial-gradient(800px 520px at -10% 100%, rgba(129, 140, 248, 0.14), transparent 60%),
    var(--bg-dark);
}
.landing-overlay .landing-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px var(--space-5);
  text-align: left;
  animation: none;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.landing-overlay .landing-logo {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 9px;
}
.landing-overlay .landing-title {
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: 0;
}
.landing-nav-signin {
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-btn);
  background: transparent;
  border: 1px solid var(--input-border);
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.landing-hero {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-5) 0 var(--space-6);
}
.landing-hero-copy {
  display: grid;
  gap: 18px;
  align-content: center;
}
.landing-eyebrow {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.landing-headline {
  margin: 0;
  font-size: var(--fs-2xl);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-wrap: balance;
}
.landing-headline span {
  background: linear-gradient(90deg, #38bdf8, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-overlay .landing-lede {
  margin: 0;
  max-width: 34em;
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--text-muted);
}
.landing-ctas {
  display: grid;
  gap: 12px;
}
.landing-overlay .landing-ctas .btn {
  width: 100%;
  min-height: 56px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: var(--fs-lg);
}
.landing-demo {
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.32);
}
.landing-proof {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.landing-shot {
  justify-self: center;
  width: min(270px, 78vw);
  padding: 10px;
  border-radius: 36px;
  background: #000;
  border: 1px solid var(--surface-glass-border);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.08);
}
.landing-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 27px;
}
.landing-section {
  padding: var(--space-5) 0;
}
.landing-section-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  color: var(--text-main);
}
.landing-overlay .landing-features {
  display: grid;
  gap: 14px;
  margin: 0;
}
.landing-overlay .landing-feature {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.landing-feature-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #7dd3fc;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.22));
}
.landing-overlay .landing-feature-label {
  margin: 12px 0 4px;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text-main);
  text-transform: none;
  letter-spacing: 0;
}
.landing-overlay .landing-feature p {
  color: var(--text-muted);
  font-size: var(--fs-md);
}
.landing-overlay .landing-footer {
  padding: var(--space-4) 0 var(--space-2);
  flex-wrap: wrap;
  gap: 0 var(--space-2);
}
/* Plans (2.3.77): prices match pricing.html. */
.landing-overlay .landing-feature p.landing-plan-price {
  margin: 4px 0 8px;
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}
.landing-overlay .landing-feature .landing-plan-price span {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-muted);
}
.landing-plans-note {
  margin: var(--space-4) 0;
  color: var(--text-muted);
  font-size: var(--fs-md);
}
/* Inside the Google Play app nothing may point to paying outside Play
   (see workspace-pwa.js), so prices and the pricing link are hidden. */
.in-play-app .web-only {
  display: none !important;
}
@media (min-width: 900px) {
  .landing-hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 56px 0 64px;
  }
  .landing-headline {
    font-size: 3.5rem;
  }
  .landing-ctas {
    grid-template-columns: auto auto;
    justify-content: start;
  }
  /* The hero carries three CTAs (trial, demo, sign in). Three across
     would overflow the hero copy column, so the primary trial button
     spans the row and demo / sign in sit side by side underneath.
     Below 900px .landing-ctas stays a single column, so all three
     stack full-width on a phone. Inside the Play app the trial
     button is .web-only and hidden, leaving the original two. */
  .landing-hero-ctas > :first-child {
    grid-column: 1 / -1;
  }
  .landing-overlay .landing-ctas .btn {
    width: auto;
    padding: 0 28px;
  }
  .landing-shot {
    width: 290px;
  }
  .landing-overlay .landing-features {
    grid-template-columns: repeat(3, 1fr);
  }
  /* Four launch plans read better as two rows than as three-plus-one. */
  .landing-overlay .landing-plans .landing-features {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Tap-target floor for small icon buttons ---------- */
.part-remove,
.ir-point-row .part-remove,
.lt-step-head .part-remove {
  min-width: 44px;
  min-height: 44px;
  font-size: var(--fs-md);
}

/* ---------- Safe areas (2.3.64: header under the iOS clock) ---------- */
/* A status-bar scrim: with black-translucent the page scrolls underneath
   the clock and battery, so whatever scrolls up there is covered rather
   than overlapping them. Below the re-auth banner (9000) and every overlay. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  background: var(--bg-dark);
  z-index: 8990;
  pointer-events: none;
}
/* Overlays that fill the screen keep their content off the notch, the
   Dynamic Island, the landscape cut-outs and the home indicator. */
.app-modal-overlay,
#gatekeeperOverlay,
.sheet-overlay {
  padding-top: calc(16px + var(--safe-top));
  padding-right: calc(16px + var(--safe-right));
  padding-bottom: calc(16px + var(--safe-bottom));
  padding-left: calc(16px + var(--safe-left));
}
.app-modal-overlay .app-modal-box {
  max-height: calc(100vh - 32px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  overflow-y: auto;
}
/* The project switcher: the whole "Sunrise ▾" row is one big target. */
.dash-header-left {
  flex: 1 1 auto;
}
.dash-project {
  width: 100%;
  min-height: 48px;
  padding: 4px 0;
  border-radius: 10px;
  touch-action: manipulation;
}
.dash-project:active {
  background: var(--surface-glass);
}
.dash-avatar {
  touch-action: manipulation;
}
@media print {
  body::before {
    display: none;
  }
}

/* ---------- Company free trials (Nov 2026) ---------- */
/* Dashboard banner: "Trial ends in X days" for a trial company's admins,
   "trial ended / paused" for everyone once it's view-only. */
.plan-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.1);
  color: var(--text-main);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.plan-banner-icon {
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.plan-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.plan-banner-text strong {
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--primary);
}
.plan-banner a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.plan-banner-soon {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.1);
}
.plan-banner-soon strong {
  color: var(--warning);
}
.plan-banner-ended {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.1);
}
.plan-banner-ended strong {
  color: var(--danger);
}
.plan-banner-wait {
  margin-top: 4px;
  color: var(--text-muted);
}
/* View-only company: the main "start a report" call to action reads as
   unavailable (tapping it still opens history; saving explains why not). */
body.ws-read-only .dash-hero {
  opacity: 0.6;
}

/* Owner company switch (2.3.103): which company you're in, and the way back.
   Phone-first. The bar sits above every screen, including the home header. */
.owner-company-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--primary);
  position: sticky;
  top: calc(8px + var(--safe-top));
  z-index: 30;
}
.owner-company-bar[hidden] {
  display: none !important;
}
.owner-company-bar-text {
  margin: 0;
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-muted);
}
.owner-company-bar-text strong {
  color: var(--text-main);
  font-weight: 800;
}
.owner-company-back {
  flex: 0 0 auto;
  width: auto;
  min-height: 44px;
  margin-left: auto;
  padding: 10px 14px;
}
#choosePinPanel[hidden],
#gatekeeperSignIn[hidden] {
  display: none !important;
}
#choosePinPanel .gatekeeper-hint {
  margin: 0 0 16px;
}
#choosePinError {
  color: var(--danger);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin: 0 0 12px;
}
#choosePinBackBtn {
  margin-top: 8px;
}
.co-switch {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
}
.co-here {
  margin: 10px 0 0;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--primary);
}

/* Owner screen: Companies & trials */
.co-section {
  margin: 0 0 22px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  min-width: 0;
}
.co-h {
  margin: 0 0 4px;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text-main);
}
.co-lede,
.co-hint,
.co-note,
.co-empty,
.co-card-sub,
.co-card-note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.co-lede {
  margin: 0 0 14px;
}
.co-hint {
  margin: 6px 0 0;
}
.co-optional {
  font-weight: 500;
  color: var(--text-muted);
}
#trialCode {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
/* Start-a-trial "Make it theirs" section */
.co-custom {
  margin: 0 0 14px;
  padding: 12px 14px 4px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--surface-glass-border);
  min-width: 0;
}
.co-custom-title {
  margin: 0 0 10px;
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--text-main);
}
.co-field-label {
  display: block;
  margin: 0 0 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-main);
}
.co-kit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 12px;
}
.co-kit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}
.co-kit-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.co-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: var(--danger);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.co-warn {
  margin: 0 0 12px;
  color: var(--warning);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.co-done-title {
  margin: 0 0 12px;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--success);
}
.co-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}
.co-facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
}
.co-facts dt {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.co-facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}
.co-code {
  font-size: var(--fs-lg);
  letter-spacing: 0.1em;
  color: var(--primary);
}
.co-note {
  margin: 0 0 14px;
}
.co-done .btn,
.co-done .co-link {
  margin-bottom: 10px;
}
.co-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.co-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.co-refresh {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  min-height: 40px;
  font-size: var(--fs-sm);
}
.co-card {
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: var(--card-dark);
  border: 1px solid var(--border);
  min-width: 0;
}
.co-card-locked {
  border-color: rgba(248, 113, 113, 0.45);
}
.co-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.co-card-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-weight: 800;
  font-size: var(--fs-md);
  overflow-wrap: anywhere;
}
.co-card-code {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.co-card-sub {
  margin: 6px 0 0;
}
.co-card-note {
  margin: 4px 0 0;
  font-size: 0.8rem;
  opacity: 0.85;
}
.co-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}
.co-badge-trial {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
}
.co-badge-ended {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}
.co-badge-paused {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}
.co-badge-paid {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}
.co-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.co-act {
  width: auto;
  flex: 1 1 auto;
  margin: 0;
  padding: 10px 12px;
  min-height: 44px;
  font-size: var(--fs-sm);
}

/* ---------- Fault alerts bell and sheet (2.3.91) ---------- */
.dash-bell {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin-right: 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
  cursor: pointer;
  touch-action: manipulation;
}
.dash-bell[hidden] {
  display: none;
}
.dash-bell.has-unread {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
}
.dash-bell-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f87171;
  color: #1a0505;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-dark);
}
.dash-bell-count[hidden] {
  display: none;
}
.alerts-sheet {
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  /* The head (title, actions, close) never scrolls away: the sheet
     itself does not scroll, the .alerts-scroll area inside it does. */
  overflow: hidden;
}
.alerts-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.alerts-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alerts-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.alerts-head-actions {
  display: flex;
  gap: 8px;
}
.alerts-head-actions .alerts-markall {
  flex: 1 1 0;
}
.alerts-close {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  background: none;
  border: 1px solid var(--surface-glass-border);
  color: var(--text-main);
  border-radius: 999px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.alerts-markall {
  background: none;
  border: 1px solid var(--surface-glass-border);
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 48px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.alerts-markall[hidden] {
  display: none;
}
.alerts-list {
  display: grid;
  /* minmax(0, 1fr), not an auto track: an auto column is sized by the
     widest card's min-content, and a card's header row (project · New
     pill · timestamp, none of it wrappable) then sets a floor wider
     than the sheet on narrow phones - the cards ran off the right
     edge and the sheet scrolled sideways, taking taps with it. */
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.alerts-empty {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--surface-glass-border);
  border-radius: var(--radius-xs);
  text-align: center;
}
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  text-align: left;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
}
.alert-item.unread {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.4);
}
/* Not a notification: a live information card in the sheet (the
   paperwork exceptions). It must not borrow the tappable alert card's
   solid chrome - a dashed, flat card reads as a notice, not a button,
   so nobody taps it expecting it to open something. */
.alert-item.alert-static {
  background: transparent;
  border-style: dashed;
  cursor: default;
}
/* Unread must read without colour (7.3): on top of the tint and dot,
   unread items carry a visible New label and a bold summary, so glare
   or colour-blindness can't hide that they are unread. */
.alert-unread-tag {
  flex-shrink: 0;
  align-self: center;
  margin-left: 8px;
  margin-right: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--danger);
  color: var(--on-accent);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.05em;
}
.alert-item.unread .alert-summary {
  font-weight: 700;
}
.alert-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}
.alert-item.unread .alert-dot {
  background: #f87171;
}
.alert-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.alert-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.alert-project {
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}
.alert-time,
.alert-tech {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.alert-asset {
  font-size: var(--fs-sm);
  font-weight: 700;
}
.alert-summary {
  font-size: var(--fs-sm);
  color: var(--text-main);
  opacity: 0.9;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.alert-item:not(.unread) .alert-project,
.alert-item:not(.unread) .alert-asset {
  font-weight: 600;
}
.alerts-push {
  display: grid;
  gap: 8px;
}
.alerts-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.alerts-toggle:disabled {
  opacity: 0.6;
  cursor: default;
}
.alerts-toggle-text {
  display: grid;
  gap: 2px;
}
.alerts-toggle-label {
  font-weight: 800;
}
.alerts-toggle-sub {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.alerts-switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: background 0.15s;
}
.alerts-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 0.15s;
}
.alerts-toggle.on .alerts-switch {
  background: var(--primary);
}
.alerts-toggle.on .alerts-switch::after {
  transform: translateX(20px);
}
.alerts-hint {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
  line-height: 1.4;
}
.alerts-mute-h {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
}
.alerts-mute {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
}
.sheet [hidden] {
  display: none !important;
}

/* System alerts (2.3.93, admins): server warnings and company notices. */
.alert-item.alert-system .alert-asset {
  font-weight: 600;
}
.alert-item.alert-info .alert-dot {
  opacity: 0.55;
}
.alert-item.alert-partreq.alert-urgent .alert-asset {
  color: var(--danger);
  font-weight: 800;
}
.alert-item.alert-partreq.alert-urgent.unread {
  border-color: rgba(248, 113, 113, 0.55);
}

/* ---------- Certificates (2.3.96, app/32_certificates.js) ---------- */
.cert-dash-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: var(--radius-pill);
  background: #b91c1c;
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: 800;
  vertical-align: middle;
}
.cert-dash-badge[hidden] {
  display: none;
}
.cert-intro,
.cert-hint,
.cert-summary {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0 0 var(--space-3);
}
.cert-summary {
  font-weight: 700;
  color: var(--text-main);
}
.cert-offline {
  margin: 0 0 var(--space-3);
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.cert-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
}
.cert-tabs[hidden] {
  display: none;
}
.cert-tab,
.cert-filter {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 800;
  cursor: pointer;
}
.cert-tab.active {
  background: var(--cert-accent);
  color: #000;
}
.cert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.cert-filter {
  padding: 0 14px;
  border: 1px solid var(--surface-glass-border);
  background: var(--surface-glass);
}
.cert-filter.active {
  border-color: var(--cert-accent);
  color: var(--cert-accent);
  background: rgba(251, 191, 36, 0.1);
}
.cert-actions {
  display: grid;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.cert-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cert-actions-row .btn-action,
.cert-card-actions .btn-action {
  margin: 0;
}
.cert-add-btn {
  background: var(--cert-accent);
  color: #000;
  margin-bottom: 0;
}
.cert-list {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-3);
}
.cert-card {
  padding: 12px 14px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-xs);
}
.cert-card.cert-expiring {
  border-left-color: var(--warning);
}
.cert-card.cert-expired {
  border-left-color: var(--danger);
  background: rgba(248, 113, 113, 0.06);
}
.cert-card.cert-noexpiry,
.cert-card.cert-person,
.cert-card.cert-plain {
  border-left-color: var(--surface-glass-border);
}
.cert-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cert-name {
  font-weight: 800;
  color: var(--text-main);
  min-width: 0;
  overflow-wrap: anywhere;
}
.cert-file {
  font-weight: 700;
}
.cert-count {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.cert-meta {
  display: block;
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.cert-chip {
  flex-shrink: 0;
}
.cert-card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.cert-plain .cert-card-actions {
  grid-template-columns: 1fr;
}
.cert-card-actions .btn-action {
  /* Glove-size (7.1): the app's own 48px tap standard. The buttons used
     to be 40px with the smallest text, and a mis-tap lands near Delete. */
  min-height: var(--tap);
  padding: 6px 4px;
  font-size: var(--fs-sm);
}
.cert-danger {
  color: var(--danger);
  border-color: var(--danger);
}
.cert-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  border: 1px dashed var(--surface-glass-border);
  border-radius: var(--radius-xs);
}
.cert-team-certs {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cert-team-certs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--surface-glass-border);
}
.cert-team-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  min-width: 0;
}
.cert-sheet {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.cert-sheet .form-group {
  margin-bottom: 0;
}
.cert-optional {
  color: var(--text-muted);
  text-transform: none;
  font-weight: 400;
}
.cert-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-main);
}
.cert-check input {
  width: 22px;
  height: 22px;
}
.cert-file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-glass);
  border: 1px dashed var(--cert-accent);
  color: var(--cert-accent);
  cursor: pointer;
  margin-bottom: 6px;
}
.cert-file-btn input[hidden] {
  display: none;
}
.cert-pick {
  display: grid;
  gap: 6px;
}
.cert-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-xs);
  background: var(--surface-glass);
}
.cert-pick-row input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.cert-pick-name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.alert-item.alert-cert .alert-asset {
  color: var(--cert-accent);
}

/* Dashboard tiles (2.3.95): what a tap scrolls to stops just below the
   safe area (notch / status bar) with a little room, never under it. */
#dashTiles,
.dash-tile {
  scroll-margin-top: calc(var(--safe-top, 0px) + 12px);
}
/* Section-page expanders (Batch A, Nov 2026): a tap that opens a
   panel in place scrolls the panel to the top of the screen. The
   margin clears the sticky Back pill - it sticks 8px below the safe
   area and is a --tap (48px) tall, so 76px leaves the panel's top
   edge a clear 20px under the pill. The manuals sub-section buttons
   scroll the same way (their panel opens directly under the button). */
.section-page .folder-content,
.section-page .manuals-section-btn {
  scroll-margin-top: calc(var(--safe-top, 0px) + 76px);
}
/* Closing a tile hides its section; Chrome's scroll anchoring then jumped
   the page back to the very top before the grid could be brought into
   view. The home screen keeps its own scroll position instead. */
#dashboardView {
  overflow-anchor: none;
}
/* More list section labels (2.3.95): small, quiet headings between the
   Daily work, Look-ups and Admin groups. */
#jobsFolderContent > .more-section {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: var(--space-2) 4px 6px;
}
#jobsFolderContent > .more-section:first-child {
  margin-top: 0;
}
/* Dashboard header (2.3.95): the project title never runs under the bell
   or account buttons. The buttons keep their size; the title takes what is
   left, wraps to two lines and then ends with an ellipsis, and long names
   are set a little smaller. The switch chevron always stays visible. */
.dash-header {
  display: flex;
  align-items: center;
}
.dash-header-left {
  flex: 1 1 0;
  min-width: 0;
}
.dash-header > .dash-bell,
.dash-header > .dash-avatar {
  flex: 0 0 auto;
}
.dash-project {
  min-width: 0;
  max-width: 100%;
}
.dash-project #activeProjectBanner {
  flex: 0 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.dash-project #activeProjectBanner.dash-project-long {
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
}
.dash-project .dash-chev {
  flex: 0 0 auto;
}
