/* ==========================================================================
   Ecoasis Onboarding - Design System
   Brand: Ecoasis "positive energies"
   Palette derived from the Ecoasis four-leaf mark.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand */
  --eco-ink:        #241E20;
  --eco-ink-soft:   #3A3134;
  --eco-teal:       #0E7C7B;
  --eco-teal-deep:  #0A5A59;
  --eco-teal-soft:  #D6EAE9;
  --eco-green:      #5CA84C;
  --eco-green-soft: #E2F0DD;
  --eco-orange:     #E8802A;
  --eco-orange-2:   #F0A04B;
  --eco-orange-soft:#FCE9D6;
  --eco-red:        #C0342E;
  --eco-red-soft:   #F8E0DE;

  /* Semantic - light */
  --bg:             #EDEBE6;
  --bg-glow-a:      rgba(232,128,42,.22);
  --bg-glow-b:      rgba(14,124,123,.12);
  --surface:        #FFFFFF;
  --surface-2:      #FAF7F2;
  --surface-sunk:   #F1EEE8;
  --surface-ink:    #1E1A1C;
  --on-surface:     #241E20;
  --on-surface-2:   #6B6165;
  --on-surface-3:   #756B6F;
  --on-ink:         #F6F3EE;
  --border:         #E3DED6;
  --border-strong:  #D2CBC1;
  --primary:        var(--eco-teal);
  --on-primary:     #FFFFFF;
  --accent:         var(--eco-orange);
  --on-accent:      #241E20;
  --danger:         var(--eco-red);
  --success:        var(--eco-green);
  --ring:           rgba(14,124,123,.45);
  --selected:       #0E7C7B;
  --on-selected:    #FFFFFF;
  --selected-hover: #0A5A59;
  --danger-text:    #93231E;
  --warn-text:      #9A4E0C;
  --ok-text:        #2F6B25;

  /* Density 8/10 - dashboard */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px;

  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(36,30,32,.05);
  --shadow-md: 0 4px 16px -6px rgba(36,30,32,.14);
  --shadow-lg: 0 18px 44px -22px rgba(36,30,32,.40);

  --t-fast: 140ms cubic-bezier(.2,.8,.3,1);
  --t-med:  220ms cubic-bezier(.2,.8,.3,1);

  --overlay: rgba(20, 17, 18, .58);
  --toast-bg: #241E20;
  --toast-fg: #F6F3EE;
  --toast-border: transparent;
}

[data-theme="dark"] {
  --bg:             #131215;
  --bg-glow-a:      rgba(232,128,42,.16);
  --bg-glow-b:      rgba(14,124,123,.18);
  --surface:        #212024;
  --surface-2:      #1A191D;
  --surface-sunk:   #17161A;
  --surface-ink:    #0E0D10;
  --on-surface:     #F3F0EB;
  --on-surface-2:   #ADA6A9;
  --on-surface-3:   #8B8488;
  --on-ink:         #F6F3EE;
  --border:         #333137;
  --border-strong:  #45424A;
  --eco-teal-soft:  #12332F;
  --eco-green-soft: #17301A;
  --eco-orange-soft:#3A2513;
  --eco-red-soft:   #3A1A18;
  --shadow-md: 0 4px 16px -6px rgba(0,0,0,.6);
  --shadow-lg: 0 18px 44px -20px rgba(0,0,0,.75);
  --ring:           rgba(240,160,75,.55);
  --primary:        #5ECFCD;
  --selected:       #0E7C7B;
  --on-selected:    #F6F3EE;
  --selected-hover: #13A3A1;
  --danger-text:    #F29C95;
  --warn-text:      #F6B478;
  --ok-text:        #92DA82;
  --overlay: rgba(6, 5, 8, .78);
  --toast-bg: #323038;
  --toast-fg: #F3F0EB;
  --toast-border: #4E4A54;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface);
  background: var(--bg);
  background-image:
    radial-gradient(120% 90% at 88% 4%, var(--bg-glow-a) 0%, transparent 58%),
    radial-gradient(90% 70% at 4% 96%, var(--bg-glow-b) 0%, transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 { font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--on-surface); }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--on-surface-2); }
.muted-2 { color: var(--on-surface-3); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--on-surface-3);
}
.clickable { cursor: pointer; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wrap-any { overflow-wrap: anywhere; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--surface-ink); color: var(--on-ink);
  padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- 3. Shell ---------- */
.app {
  max-width: 1560px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) var(--space-6);
}
@media (max-width: 640px) { .app { padding: var(--space-3) var(--space-3) var(--space-6); } }

.topbar {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) 0 var(--space-5);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 34px; width: auto; display: block; }
.brand-lockup {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px 7px 10px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm); text-decoration: none;
}
.brand-lockup:hover { text-decoration: none; }
.brand-lockup .brand-sub {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-surface-3); line-height: 1;
}
.brand-lockup .brand-name { font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--on-surface); }
.brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }

.nav-pill-wrap {
  display: flex; align-items: center; gap: 6px;
  flex: 1 1 auto; min-width: 0; max-width: 100%;
  justify-content: center;
}
.nav-pill-btn {
  display: none;
  width: 34px; height: 34px; flex: 0 0 34px;
  align-items: center; justify-content: center;
  border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--on-surface);
  box-shadow: var(--shadow-sm); cursor: pointer;
  font-size: 14px; padding: 0;
  transition: background var(--t-fast), color var(--t-fast), opacity var(--t-fast);
}
.nav-pill-wrap.is-overflow .nav-pill-btn { display: inline-flex; }
.nav-pill-btn:hover { background: var(--surface-sunk); }
.nav-pill-btn:disabled {
  opacity: .35; cursor: default; pointer-events: none;
}
.nav-pill {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 5px;
  box-shadow: var(--shadow-sm);
  margin: 0;
  overflow-x: auto; scrollbar-width: none;
  min-width: 0; max-width: 100%; flex: 0 1 auto;
}
.nav-pill-wrap.is-overflow .nav-pill { flex: 1 1 auto; }
.nav-pill::-webkit-scrollbar { display: none; }
.nav-pill a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; color: var(--on-surface-2);
  white-space: nowrap; text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-pill a:hover { background: var(--surface-sunk); color: var(--on-surface); text-decoration: none; }
.nav-pill a[aria-current="page"] { background: var(--selected); color: var(--on-selected); }
.nav-pill a[aria-current="page"] .bi { color: var(--eco-orange-2); }

.topbar-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px; flex: 0 0 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--on-surface);
  font-size: 17px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-sunk); }
.icon-btn.is-active { background: var(--selected); color: var(--on-selected); border-color: transparent; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--eco-red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px;
  border: 2px solid var(--surface);
}
.nav-toggle { display: none; }
@media (max-width: 1240px) {
  .nav-pill-wrap { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Mobile nav sheet */
.nav-sheet {
  position: fixed; inset: 0; z-index: 160;
  display: none; padding: var(--space-4);
  background: rgba(20,17,18,.55); backdrop-filter: blur(6px);
  overflow-y: auto;
}
.nav-sheet.open { display: block; }
.nav-sheet-inner {
  background: var(--surface); border-radius: var(--r-xl);
  padding: var(--space-4); max-width: 460px; margin: 0 auto;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.nav-sheet-inner a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: var(--r-md);
  color: var(--on-surface); font-weight: 600; text-decoration: none;
  min-height: 48px;
}
.nav-sheet-inner a:hover { background: var(--surface-sunk); text-decoration: none; }
.nav-sheet-inner a[aria-current="page"] { background: var(--selected); color: var(--on-selected); }

/* ---------- 4. Page head ---------- */
.page-head { display: flex; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.page-title { font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
.page-sub { color: var(--on-surface-2); font-size: 14.5px; margin-top: 4px; max-width: 62ch; }

/* ---------- 5. Cards ---------- */
.card-eco {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.card-eco.tight { padding: var(--space-4); }
.card-eco.sunk { background: var(--surface-2); }
.card-ink {
  background: var(--surface);
  color: var(--on-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.card-ink h2, .card-ink h3, .card-ink h4 { color: var(--on-surface); }
.card-ink .muted { color: var(--on-surface-2); }
.card-ink .track { background: var(--surface-sunk); border-color: var(--border); }
.ink-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  color: var(--on-surface);
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
}
.ink-row-meta { display: block; font-size: 12px; color: var(--on-surface-2); }
[data-theme="dark"] .card-ink {
  background: var(--surface-ink);
  color: var(--on-ink);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .card-ink h2,
[data-theme="dark"] .card-ink h3,
[data-theme="dark"] .card-ink h4 { color: var(--on-ink); }
[data-theme="dark"] .card-ink .muted { color: #ABA3A6; }
[data-theme="dark"] .card-ink .track { background: #353033; border-color: #454043; }
[data-theme="dark"] .ink-row {
  background: var(--surface-sunk);
  border-color: var(--border-strong);
  color: var(--on-surface);
}
[data-theme="dark"] .ink-row-meta { color: #A69EA1; }
.card-warm {
  background: linear-gradient(150deg, var(--eco-orange-soft), var(--surface) 72%);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: var(--space-5); box-shadow: var(--shadow-md);
}
.kit-sizes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.kit-size-card {
  background: var(--surface);
  border-radius: 40px;
  padding: 28px 12px 24px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(36, 30, 32, .07);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 118px;
}
.kit-size-card .bi {
  font-size: 26px;
  line-height: 1;
  color: var(--on-surface);
  margin-bottom: 8px;
}
.kit-size-val {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--on-surface);
}
.kit-size-lab {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface-2);
  line-height: 1.25;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.card-head h2, .card-head h3 { font-size: 18px; }

.grid { display: grid; gap: var(--space-4); }

/* ---------- 6. Buttons ---------- */
.btn-eco {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
  min-height: 44px;
}
.btn-eco:hover { text-decoration: none; }
.btn-eco:active:not(:disabled) { transform: scale(.975); }
.btn-eco:disabled, .btn-eco[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-eco.is-busy:disabled { opacity: .85; }
.btn-spinner {
  width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: eco-spin .7s linear infinite;
}

.btn-primary-eco { background: var(--selected); color: var(--on-selected); }
.btn-primary-eco:hover:not(:disabled) { background: var(--selected-hover); color: var(--on-selected); }
.btn-accent-eco { background: var(--eco-orange); color: #2B1B0A; }
.btn-accent-eco:hover:not(:disabled) { background: var(--eco-orange-2); color: #2B1B0A; }
.btn-teal-eco { background: var(--eco-teal); color: #fff; }
.btn-teal-eco:hover:not(:disabled) { background: var(--eco-teal-deep); color: #fff; }
.btn-ghost-eco { background: var(--surface); border-color: var(--border-strong); color: var(--on-surface); }
.btn-ghost-eco:hover:not(:disabled) { background: var(--surface-sunk); color: var(--on-surface); }
.btn-danger-eco { background: var(--eco-red-soft); color: #93231E; border-color: transparent; }
[data-theme="dark"] .btn-danger-eco { color: #F09891; }
.btn-sm-eco { padding: 7px 14px; font-size: 12.5px; min-height: 36px; }

/* ---------- 7. Badges / status ---------- */
.badge-eco {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 9px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-eco .bi { font-size: 12px; }
.badge-when { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.badge-neutral { background: var(--surface-sunk); color: var(--on-surface-2); border-color: var(--border); }
.badge-teal    { background: var(--eco-teal-soft);   color: var(--eco-teal-deep); }
.badge-green   { background: var(--eco-green-soft);  color: #2F6B25; }
.badge-orange  { background: var(--eco-orange-soft); color: #9A4E0C; }
.badge-red     { background: var(--eco-red-soft);    color: #93231E; }
.badge-ink     { background: var(--selected);     color: var(--on-selected); }
[data-theme="dark"] .badge-teal   { color: #74D6D4; }
[data-theme="dark"] .badge-green  { color: #92DA82; }
[data-theme="dark"] .badge-orange { color: #F6B478; }
[data-theme="dark"] .badge-red    { color: #F29C95; }

/* ---------- 8. Progress ---------- */
.track {
  height: 8px; border-radius: var(--r-pill);
  background: var(--surface-sunk); overflow: hidden;
  border: 1px solid var(--border);
}
.track .fill {
  height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--eco-teal), var(--eco-green));
  transition: width var(--t-med);
}
.track.accent .fill { background: linear-gradient(90deg, var(--eco-orange), var(--eco-orange-2)); }
.track.danger .fill { background: linear-gradient(90deg, var(--eco-red), var(--eco-orange)); }

.ring-stat { position: relative; width: 136px; height: 136px; flex: 0 0 136px; }
.ring-stat svg { transform: rotate(-90deg); width: 100%; height: 100%; display: block; }
.ring-stat .ring-bg { stroke: var(--surface-sunk); }
.ring-stat .ring-fg { stroke-linecap: round; transition: stroke-dashoffset 600ms cubic-bezier(.2,.8,.3,1); }
.ring-stat .ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-stat .ring-label b { font-size: 28px; letter-spacing: -.045em; display: block; line-height: 1.1; }

/* ---------- 9. Stat tiles ---------- */
.stat-row { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat-ico {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; line-height: 1;
  background: var(--surface-sunk); color: var(--on-surface-2);
}
.stat-ico .bi {
  display: block; line-height: 1; width: 1em; height: 1em;
  vertical-align: 0;
}
.stat b { font-size: 34px; font-weight: 700; letter-spacing: -.045em; line-height: 1; display: block; }
.stat span { font-size: 12px; color: var(--on-surface-2); font-weight: 600; }

.kpi { display: flex; flex-direction: column; gap: 5px; }
.kpi-val {
  font-size: 30px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1;
  color: var(--on-surface);
}
.kpi .kpi-lab { font-size: 12.5px; color: var(--on-surface-2); font-weight: 600; }
.tone-danger { color: var(--danger-text) !important; }
.tone-warn { color: var(--warn-text) !important; }
.tone-ok { color: var(--ok-text) !important; }
.is-struck { text-decoration: line-through; opacity: .55; }

/* ---------- 10. Avatars ---------- */
.avatar {
  border-radius: var(--r-pill); flex-shrink: 0;
  display: grid; place-content: center;
  font-weight: 700; color: #fff; letter-spacing: -.02em;
  background: linear-gradient(140deg, var(--eco-teal), var(--eco-green));
  border: 2px solid var(--surface);
  overflow: hidden; text-transform: uppercase;
}
.avatar.a-0 { background: linear-gradient(140deg,#0E7C7B,#5CA84C); }
.avatar.a-1 { background: linear-gradient(140deg,#E8802A,#C0342E); }
.avatar.a-2 { background: linear-gradient(140deg,#5CA84C,#0E7C7B); }
.avatar.a-3 { background: linear-gradient(140deg,#C0342E,#E8802A); }
.avatar.a-4 { background: linear-gradient(140deg,#0A5A59,#0E7C7B); }
.avatar-xs { width: 26px; height: 26px; font-size: 10px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 46px; height: 46px; font-size: 15px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-xl { width: 108px; height: 108px; font-size: 36px; border-width: 3px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar + .avatar { margin-left: -9px; }

/* ---------- 11. Lists / rows ---------- */
.row-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 11px var(--space-3);
  border-radius: var(--r-md);
  transition: background var(--t-fast);
  color: var(--on-surface);
}
.list-split .row-item + .row-item { border-top: 1px solid var(--border); }
a.row-item:hover, .row-item.clickable:hover { background: var(--surface-sunk); text-decoration: none; }
.row-item .row-title { font-weight: 700; font-size: 14px; color: var(--on-surface); }
.row-item .row-meta { font-size: 12.5px; color: var(--on-surface-2); }

/* ---------- 12. Tables ---------- */
.form-link-out {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.4;
}
table.eco { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 820px; }
table.eco thead th {
  text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--on-surface-3);
  padding: 10px var(--space-3); border-bottom: 1px solid var(--border);
  white-space: nowrap; background: transparent;
}
table.eco thead th button {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
table.eco thead th button:hover { color: var(--on-surface); }
table.eco tbody td {
  padding: 12px var(--space-3); border-bottom: 1px solid var(--border);
  font-size: 14px; vertical-align: middle;
}
table.eco tbody tr { transition: background var(--t-fast); }
table.eco tbody tr:hover { background: var(--surface-sunk); }
table.eco tbody tr:last-child td { border-bottom: 0; }

/* ---------- 13. Stage rail (6-stage workflow) ---------- */
.stage-rail { display: flex; align-items: stretch; gap: 5px; }
.stage-node {
  flex: 1 1 0; min-width: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-sunk);
  padding: 7px 8px; text-align: left;
  cursor: pointer; position: relative;
  color: var(--on-surface-2);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.stage-node:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stage-node .sn-n { font-size: 10px; font-weight: 800; letter-spacing: .06em; opacity: .8; display: block; }
.stage-node .sn-i { font-size: 14px; display: block; margin-top: 1px; }
.stage-node[data-state="complete"]  { background: var(--eco-green-soft);  border-color: transparent; color: #2F6B25; }
.stage-node[data-state="sent"]      { background: var(--eco-teal-soft);   border-color: transparent; color: var(--eco-teal-deep); }
.stage-node[data-state="due"]       { background: var(--eco-orange-soft); border-color: transparent; color: #9A4E0C; }
.stage-node[data-state="overdue"]   { background: var(--eco-red-soft);    border-color: transparent; color: #93231E; }
.stage-node[data-state="awaiting"]  { background: var(--surface); border-style: dashed; color: var(--on-surface-2); }
.stage-node[data-state="pending"]   { background: var(--surface-sunk); color: var(--on-surface-3); }
.stage-node[data-state="na"]        { opacity: .45; cursor: default; background: repeating-linear-gradient(135deg, var(--surface-sunk) 0 6px, transparent 6px 12px); }
.stage-node[data-state="na"]:hover  { transform: none; box-shadow: none; }
.stage-node.ink-row {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
  background: var(--surface-sunk);
  color: var(--on-surface);
}
[data-theme="dark"] .stage-node.ink-row {
  background: var(--surface-sunk);
  color: var(--on-surface);
}
[data-theme="dark"] .stage-node[data-state="complete"] { color: #92DA82; }
[data-theme="dark"] .stage-node[data-state="sent"]     { color: #74D6D4; }
[data-theme="dark"] .stage-node[data-state="due"]      { color: #F6B478; }
[data-theme="dark"] .stage-node[data-state="overdue"]  { color: #F29C95; }

.stage-rail-sm .stage-node { padding: 5px 5px; }
.stage-rail-sm .stage-node .sn-i { font-size: 12px; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--on-surface-2); font-weight: 600; }
.legend i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; flex-shrink: 0; }

/* ---------- 14. Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border); border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 var(--space-4) 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong);
}
.tl-item.is-done::before { background: var(--eco-green); border-color: var(--eco-green); }
.tl-item.is-now::before  { background: var(--eco-orange); border-color: var(--eco-orange); box-shadow: 0 0 0 4px var(--eco-orange-soft); }

/* ---------- 15. Schedule ---------- */
.sched-grid { display: grid; grid-template-columns: 66px 1fr; }
.sched-hour { font-size: 11.5px; color: var(--on-surface-3); font-weight: 600; padding: 10px 10px 0 0; text-align: right; }
.sched-slot { border-top: 1px dashed var(--border); min-height: 48px; padding: 6px 0; }
.sched-ev {
  border-radius: var(--r-sm); padding: 8px 11px; font-size: 12.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sched-ev b { font-size: 13px; display: block; }
.sched-ev.ev-ink { background: var(--selected); color: var(--on-selected); }
.sched-ev.ev-accent { background: var(--eco-orange); color: #2B1B0A; }
.sched-ev.ev-plain { background: var(--surface); border: 1px solid var(--border); }

/* ---------- 16. Forms ---------- */
.field { display: block; margin-bottom: var(--space-4); }
.field > label, .field-label {
  display: block; font-size: 13px; font-weight: 700;
  margin-bottom: 6px; color: var(--on-surface);
}
.req { color: #93231E; }
.field .req { color: #93231E; }
[data-theme="dark"] .req,
[data-theme="dark"] .field .req { color: #F29C95; }
.field .hint { font-size: 12.5px; color: var(--on-surface-2); margin-top: 5px; }
.field .err { font-size: 12.5px; color: #93231E; font-weight: 700; margin-top: 5px; display: none; }
.field.has-error .err { display: block; }
.field.has-error .input-eco { border-color: var(--eco-red); }
[data-theme="dark"] .field .err { color: #F29C95; }

.input-eco {
  width: 100%; min-height: 46px;
  padding: 11px 14px; font-size: 15px; font-family: inherit;
  color: var(--on-surface); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input-eco:hover { border-color: var(--on-surface-3); }
.input-eco:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
textarea.input-eco { min-height: 120px; resize: vertical; line-height: 1.6; }
select.input-eco { cursor: pointer; }

.search-eco { position: relative; flex: 1 1 240px; min-width: 0; }
.search-eco .bi { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--on-surface-3); font-size: 15px; pointer-events: none; }
.search-eco input { padding-left: 42px; border-radius: var(--r-pill); }

.seg {
  display: inline-flex; gap: 3px; padding: 4px;
  background: var(--surface-sunk); border: 1px solid var(--border);
  border-radius: var(--r-pill); flex-wrap: wrap;
}
.seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; color: var(--on-surface-2);
  min-height: 38px; transition: background var(--t-fast), color var(--t-fast);
}
.seg button:hover { color: var(--on-surface); }
.seg button[aria-pressed="true"] { background: var(--selected); color: var(--on-selected); }

/* Choice chips (sizes) */
.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.choice span {
  display: grid; place-content: center;
  min-width: 62px; min-height: 54px; padding: 8px 14px;
  border-radius: var(--r-md); border: 2px solid var(--border-strong);
  background: var(--surface); font-weight: 700; font-size: 15px;
  transition: all var(--t-fast); text-align: center; line-height: 1.2;
  color: var(--on-surface);
}
.choice input:hover + span { border-color: var(--on-surface-3); }
.choice input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }
.choice input:checked + span {
  border-color: var(--eco-teal); background: var(--eco-teal-soft); color: var(--eco-teal-deep);
}
.kit-block .err {
  font-size: 12.5px; color: #93231E; font-weight: 700; margin-top: 6px; display: none;
}
.kit-block.has-error .err { display: block; }
.kit-block.has-error .choice span { border-color: var(--eco-red); }
[data-theme="dark"] .kit-block .err { color: #F29C95; }
[data-theme="dark"] .choice input:checked + span { color: #74D6D4; }

.check-eco { display: flex; gap: 11px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); cursor: pointer; transition: background var(--t-fast); }
.check-eco:hover { background: var(--surface-sunk); }
.check-eco input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--eco-teal); cursor: pointer; }
.check-eco .ce-t { display: block; font-weight: 600; font-size: 14px; }
.check-eco .ce-d { display: block; font-size: 12.5px; color: var(--on-surface-2); margin-top: 3px; }

.mail-to-list { display: flex; flex-direction: column; gap: 8px; }
.mail-to-pick { margin: 0; }
.mail-to-pick.is-off { opacity: .55; cursor: not-allowed; }
.mail-to-pick.is-off:hover { background: var(--surface-sunk); }
.mail-to-pick-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mail-to-pick-label { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.mail-to-pick-addr { font-size: 13px; }

/* ---------- 17. Modal / drawer ---------- */
body.is-overlay-open { overflow: hidden; }

.eco-overlay {
  position: fixed; inset: 0; z-index: 140;
  display: none;
  align-items: center;
  justify-content: center;
  padding:
    max(var(--space-4), env(safe-area-inset-top))
    max(var(--space-4), env(safe-area-inset-right))
    max(var(--space-4), env(safe-area-inset-bottom))
    max(var(--space-4), env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: ecoFade var(--t-med);
}
.eco-overlay.open { display: flex; }
.eco-modal {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: min(92dvh, 920px);
  margin: auto;
  padding: 0;
  background: var(--surface);
  color: var(--on-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: ecoPop var(--t-med);
}
.eco-modal.wide { width: min(940px, 100%); }
.eco-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex: 0 0 auto;
  margin: 0;
  padding: var(--space-4) var(--space-5) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.eco-modal-title {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.eco-modal-sub { margin-top: 4px; overflow-wrap: anywhere; }
.eco-modal-head .icon-btn,
.eco-drawer-head .icon-btn {
  box-shadow: none;
  background: transparent;
  flex-shrink: 0;
}
.eco-modal-head .icon-btn:hover,
.eco-drawer-head .icon-btn:hover { background: var(--surface-sunk); }
.eco-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-5) var(--space-5);
  -webkit-overflow-scrolling: touch;
}
.eco-modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex: 0 0 auto;
  padding: var(--space-3) var(--space-5);
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.eco-modal-foot .btn-eco { flex: 0 1 auto; }
.eco-modal .card-eco { box-shadow: none; }
.eco-modal .seg { width: auto; max-width: 100%; }
.sd-alert { font-weight: 700; }
.sd-alert.is-due { color: #9A4E0C; }
.sd-alert.is-overdue { color: #93231E; }
[data-theme="dark"] .sd-alert.is-due { color: #F6B478; }
[data-theme="dark"] .sd-alert.is-overdue { color: #F29C95; }

.eco-drawer-scrim {
  position: fixed; inset: 0; z-index: 149;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-med), visibility var(--t-med);
}
.eco-drawer-scrim.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.eco-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--surface);
  color: var(--on-surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 0;
  overflow: hidden;
  transform: translateX(102%);
  transition: transform var(--t-med), visibility var(--t-med);
  visibility: hidden;
}
.eco-drawer.open { transform: translateX(0); visibility: visible; }
.eco-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex: 0 0 auto;
  padding: max(var(--space-5), env(safe-area-inset-top)) var(--space-5) var(--space-4);
  padding-right: max(var(--space-5), env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.eco-drawer-title { font-size: 20px; line-height: 1.25; }
.eco-drawer-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-3);
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
.eco-drawer-list .empty { padding: var(--space-6) var(--space-3); }
.eco-drawer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.notif-toolbar-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.notif-tool {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent;
  color: var(--on-surface-2);
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 8px; border-radius: var(--r-sm);
  cursor: pointer; min-height: 36px;
}
.notif-tool:hover:not(:disabled) { background: var(--surface-sunk); color: var(--on-surface); }
.notif-tool.is-danger:hover:not(:disabled) { color: #93231E; background: var(--eco-red-soft); }
.notif-tool:disabled { opacity: .4; cursor: default; }
[data-theme="dark"] .notif-tool.is-danger:hover:not(:disabled) { color: #F29C95; }

@keyframes ecoFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ecoPop {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- 18. Toasts ---------- */
.toast-zone {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  left: auto;
  bottom: auto;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  pointer-events: none;
}
.toast-eco {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--toast-bg); color: var(--toast-fg);
  border: 1px solid var(--toast-border);
  padding: 13px 17px; border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600;
  pointer-events: auto;
  animation: toastIn 220ms cubic-bezier(.2,.8,.3,1);
}
.toast-eco .bi { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.toast-eco span { overflow-wrap: anywhere; min-width: 0; }
.toast-eco.ok .bi   { color: #85DB75; }
.toast-eco.warn .bi { color: var(--eco-orange-2); }
.toast-eco.err .bi  { color: #F29C95; }
.toast-eco.info .bi { color: #74D6D4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .toast-zone {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(440px, calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }
}

/* ---------- 19. Email preview ---------- */
.mail-frame { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.mail-head { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); background: var(--surface); }
.mail-body { padding: var(--space-5); background: #fff; color: #241E20; }
.mail-body .mail-brandbar { border-bottom: 3px solid #E8802A; padding-bottom: 14px; margin-bottom: 20px; }
.mail-body .mail-brandbar img { height: 30px; }
.mail-body h1 { font-size: 22px; margin-bottom: 10px; color: #241E20; }
.mail-body h2 { font-size: 17px; margin: 18px 0 8px; color: #241E20; }
.mail-body p { margin-bottom: 13px; font-size: 14.5px; line-height: 1.65; color: #3A3134; }
.mail-body ul { margin: 0 0 13px; padding-left: 20px; color: #3A3134; font-size: 14.5px; }
.mail-body li { margin-bottom: 6px; }
.mail-cta {
  display: inline-block; background: #0E7C7B; color: #fff !important;
  padding: 12px 22px; border-radius: 999px; font-weight: 700;
  text-decoration: none; font-size: 14px; margin: 6px 8px 6px 0;
}
.mail-cta.alt { background: #E8802A; color: #2B1B0A !important; }
.mail-cta.wa  { background: #1EA95A; color: #fff !important; }
.mail-foot { font-size: 12px; color: #7A7276; border-top: 1px solid #E3DED6; padding-top: 14px; margin-top: 20px; }

.token-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: var(--eco-teal-soft); color: var(--eco-teal-deep);
  border: 0; border-radius: var(--r-md); padding: 7px 12px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); min-height: 44px;
}
.token-chip:hover { background: #C3E0DF; }
.token-chip:focus-visible { outline: 2px solid var(--eco-teal); outline-offset: 2px; }
.token-chip-lab {
  font-family: inherit; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-2); line-height: 1.2;
}
.token-chip code {
  background: transparent; padding: 0; color: inherit;
  font-size: 12.5px; font-weight: 700;
}
.token-bar { display: flex; flex-wrap: wrap; gap: 8px; }
[data-theme="dark"] .token-chip { color: #74D6D4; }
[data-theme="dark"] .token-chip:hover { background: #1A4642; }
[data-theme="dark"] .token-chip-lab { color: var(--on-surface-2); }

/* ---------- 20. Employee-facing form pages ---------- */
.pub-wrap { max-width: 660px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); }
.pub-head { text-align: center; margin-bottom: var(--space-5); }
.pub-head img { height: 48px; margin-bottom: var(--space-4); }
.pub-head h1 {
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0;
}
.pub-step { display: flex; justify-content: center; gap: 6px; margin-bottom: var(--space-3); }
.pub-step i {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong);
}
.pub-step i.on { background: var(--eco-teal); }
.pub-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--space-5); box-shadow: var(--shadow-lg); }
.pub-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--eco-teal-soft); border-radius: var(--r-md);
  padding: 13px 15px; font-size: 13.5px; color: var(--eco-teal-deep); font-weight: 600;
}
[data-theme="dark"] .pub-note { color: #74D6D4; }

/* ---------- 21. Empty / misc ---------- */
.empty { text-align: center; padding: var(--space-6) var(--space-4); color: var(--on-surface-2); }
.empty .bi { font-size: 34px; color: var(--on-surface-3); display: block; margin-bottom: 10px; }
.empty h3 { font-size: 16px; margin-bottom: 5px; }

/* ---------- 22. Charts ---------- */
.chart-box { position: relative; width: 100%; }
.chart-box canvas { display: block; max-width: 100%; }

/* ---------- 23. Notifications panel ---------- */
.notif-item {
  display: flex; align-items: stretch; gap: 0;
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--on-surface);
  overflow: hidden;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.notif-item + .notif-item { margin-top: 8px; }
.notif-item.is-unread {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--eco-teal);
  border-color: var(--border-strong);
}
.notif-item.is-read { background: var(--surface-2); }
.notif-item:hover { border-color: var(--border-strong); background: var(--surface-sunk); }
.notif-main {
  display: flex; gap: 12px; align-items: flex-start;
  flex: 1 1 auto; min-width: 0;
  padding: 12px 8px 12px 13px;
  border: 0; background: transparent;
  color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.notif-main:focus-visible { outline: 2px solid var(--eco-teal); outline-offset: -2px; }
.notif-item.is-read .notif-title { font-weight: 600; color: var(--on-surface-2); }
.notif-item.is-read .notif-ico { opacity: .72; }
.notif-title { display: block; font-weight: 700; font-size: 13.5px; color: var(--on-surface); line-height: 1.35; }
.notif-body { display: block; font-size: 12.5px; color: var(--on-surface-2); margin-top: 3px; overflow-wrap: anywhere; }
.notif-time { display: block; font-size: 11.5px; color: var(--on-surface-3); margin-top: 5px; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--eco-teal); flex-shrink: 0; margin-top: 6px;
}
.notif-actions {
  display: flex; flex-direction: column; justify-content: center;
  gap: 2px; padding: 8px 8px 8px 0; flex-shrink: 0;
}
.notif-act {
  width: 36px; height: 36px;
  display: grid; place-content: center;
  border: 0; background: transparent;
  color: var(--on-surface-3); border-radius: var(--r-sm);
  cursor: pointer; font-size: 15px;
}
.notif-act:hover { background: var(--surface); color: var(--on-surface); }
.notif-act.is-danger:hover { background: var(--eco-red-soft); color: #93231E; }
.notif-act:focus-visible { outline: 2px solid var(--eco-teal); outline-offset: 0; }
.notif-ico {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: grid; place-content: center; flex-shrink: 0; font-size: 15px;
}
.notif-ico.red    { background: var(--eco-red-soft);    color: #93231E; }
.notif-ico.orange { background: var(--eco-orange-soft); color: #9A4E0C; }
.notif-ico.teal   { background: var(--eco-teal-soft);   color: var(--eco-teal-deep); }
.notif-ico.green  { background: var(--eco-green-soft);  color: #2F6B25; }
[data-theme="dark"] .notif-ico.red    { color: #F29C95; }
[data-theme="dark"] .notif-ico.orange { color: #F6B478; }
[data-theme="dark"] .notif-ico.teal   { color: #74D6D4; }
[data-theme="dark"] .notif-ico.green  { color: #92DA82; }
[data-theme="dark"] .notif-item.is-unread { background: var(--surface-2); }
[data-theme="dark"] .notif-item.is-read { background: var(--surface); }
[data-theme="dark"] .notif-act.is-danger:hover { color: #F29C95; }

/* ---------- 24. Utilities ---------- */
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.vcenter { display: flex; align-items: center; gap: var(--space-2); }
.vstart  { display: flex; align-items: flex-start; gap: var(--space-2); }
.wrapf { flex-wrap: wrap; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); } .gap-5 { gap: var(--space-5); }
.grow { flex: 1 1 auto; min-width: 0; }
.divider { height: 1px; background: var(--border); border: 0; margin: var(--space-4) 0; }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }

/* ---------- 25. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- 26. Authentication pages ---------- */
.auth-page {
  min-height: 100dvh;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-5);
}
@media (max-width: 640px) { .auth-page { padding: var(--space-3); } }

.auth-card {
  flex: 1 1 auto;
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-form-side {
  display: flex; flex-direction: column;
  padding: clamp(20px, 3.5vw, 52px);
  background:
    radial-gradient(120% 90% at 100% 100%, var(--eco-orange-soft) 0%, transparent 58%),
    linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 70%);
}
.auth-topline { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.auth-topline.no-brand { justify-content: flex-end; }
.brand-lockup.only-compact { display: none; }
@media (max-width: 1024px) {
  .auth-topline.no-brand { justify-content: space-between; }
  .brand-lockup.only-compact { display: flex; }
}
.auth-body { margin: auto; width: 100%; max-width: 430px; padding: var(--space-5) 0; }
.auth-title { font-size: clamp(25px, 3.2vw, 34px); letter-spacing: -.035em; text-align: center; text-wrap: balance; }
.auth-sub { text-align: center; color: var(--on-surface-2); font-size: 14.5px; margin-top: 8px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; font-size: 13px; }
.auth-note {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--surface-sunk); border: 1px dashed var(--border-strong);
  border-radius: var(--r-md); padding: 11px 13px;
  font-size: 12.5px; color: var(--on-surface-2);
}

/* Password field with a show/hide control */
.pw-wrap { position: relative; }
.pw-wrap .input-eco { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  border-radius: var(--r-pill); color: var(--on-surface-2); font-size: 16px;
  display: grid; place-content: center;
}
.pw-toggle:hover { background: var(--surface-sunk); color: var(--on-surface); }

.pw-meter { display: flex; gap: 5px; margin-top: 8px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-sunk); border: 1px solid var(--border); }
.pw-meter i.on-1 { background: var(--eco-red); border-color: transparent; }
.pw-meter i.on-2 { background: var(--eco-orange); border-color: transparent; }
.pw-meter i.on-3 { background: var(--eco-green); border-color: transparent; }

/* ---------- Right-hand visual panel ---------- */
.auth-visual {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #0A5A59 0%, #241E20 52%, #3A2513 100%);
  display: flex; flex-direction: column;
  padding: clamp(24px, 3vw, 44px);
  color: #F6F3EE;
}
.auth-visual::before, .auth-visual::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.auth-visual::before { width: 460px; height: 460px; top: -160px; right: -140px; background: radial-gradient(circle, rgba(232,128,42,.55), transparent 68%); }
.auth-visual::after  { width: 420px; height: 420px; bottom: -170px; left: -130px; background: radial-gradient(circle, rgba(92,168,76,.42), transparent 68%); }

.av-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--space-5); height: 100%; }
.av-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: var(--space-5); }
.av-brand { display: inline-flex; align-items: center; gap: 10px; }
.av-brand img { height: 30px; width: auto; }
.av-brand b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; display: block; line-height: 1.15; }
.av-brand > span > span { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(246,243,238,.62); }
.av-title { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.035em; color: #fff; text-wrap: balance; }
.av-sub { font-size: 14px; color: rgba(246,243,238,.74); max-width: 40ch; }

.av-features { display: flex; flex-direction: column; gap: 15px; }
.av-feat-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: rgba(246,243,238,.6); }
.av-feature { display: flex; gap: 13px; align-items: flex-start; }
.av-feature .ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 10px;
  display: grid; place-content: center; font-size: 14px;
  background: rgba(255,255,255,.13); color: var(--eco-orange-2);
}
.av-feature p { font-size: 14px; line-height: 1.5; color: rgba(246,243,238,.86); padding-top: 3px; }

@media (max-width: 1024px) { .auth-card { grid-template-columns: 1fr; } .auth-visual { display: none; } }

.auth-page.is-solo { justify-content: center; }
.auth-card.is-solo { grid-template-columns: 1fr; max-width: 560px; flex: 0 1 auto; }

/* ---------- Product footer ---------- */
.eco-footer {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); flex-wrap: wrap;
  font-size: 12px; color: var(--on-surface-2);
  padding: var(--space-2) var(--space-1);
}
.eco-footer .ef-powered { display: inline-flex; align-items: center; gap: 9px; }
.eco-footer .ef-powered img { height: 20px; width: auto; vertical-align: middle; }
.app > .eco-footer { margin-top: var(--space-5); border-top: 1px solid var(--border); padding-top: var(--space-4); max-width: none; }

/* ---------- 27. Page loader ---------- */
.eco-loader {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(120% 90% at 88% 4%, var(--bg-glow-a) 0%, transparent 58%),
    radial-gradient(90% 70% at 4% 96%, var(--bg-glow-b) 0%, transparent 60%);
  transition: opacity 260ms ease, visibility 260ms ease;
}
.eco-loader.is-done { opacity: 0; visibility: hidden; }
.eco-loader-in { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.eco-loader-in img { height: 42px; width: auto; }
.eco-loader-bar {
  display: block; width: 190px; height: 4px; border-radius: 2px;
  background: var(--surface-sunk); overflow: hidden;
}
.eco-loader-bar i {
  display: block; width: 40%; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--eco-teal), var(--eco-green), var(--eco-orange));
  animation: ecoLoad 1.1s cubic-bezier(.55,.1,.35,.9) infinite;
}
@keyframes ecoLoad {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}
@media (prefers-reduced-motion: reduce) {
  .eco-loader-bar i { animation: none; width: 100%; }
}

.eco-busy {
  position: fixed; inset: 0; z-index: 360;
  display: none; place-content: center;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.eco-busy.is-on { display: grid; }
.eco-busy-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  min-width: 220px; padding: 28px 32px;
  background: var(--surface); color: var(--on-surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.eco-busy-label {
  margin: 0; font-size: 14px; font-weight: 700; color: var(--on-surface-2);
}
body.is-busy { cursor: progress; }
body.is-busy .eco-busy { cursor: wait; }

/* Brand wordmark used in the topbar / auth lockups */
.brand-lockup img { height: 26px; width: auto; vertical-align: middle; }

/* ---------- 28. Doughnut with a total in the middle ---------- */
.donut-wrap { position: relative; }
.donut-center {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
  pointer-events: none;
}
.donut-center b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.045em; line-height: 1.05; }
.donut-center span { display: block; font-size: 11.5px; font-weight: 600; color: var(--on-surface-2); }

.legend-flat { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.legend-flat .legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--on-surface-2);
}
.legend-flat .legend-item i {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block;
}

/* ---------- 29. Schedule card: bounded height, working overflow ---------- */
.sched-scroll { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; }
.sched-more {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; min-height: 32px; margin-top: 2px;
  padding: 5px 10px; border-radius: 10px;
  border: 1px dashed var(--border-strong); background: transparent;
  font-size: 12px; font-weight: 700; color: var(--on-surface-2);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.sched-more:hover { background: var(--surface-sunk); color: var(--on-surface); }

/* ---------- 30. Document upload rows ---------- */
.upload-row {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding: 11px 13px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface);
}
.upload-row.has-error { border-color: var(--eco-red); }
.upload-row .upload-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: var(--r-sm);
  display: grid; place-content: center; font-size: 15px;
  background: var(--eco-teal-soft); color: var(--eco-teal-deep);
}
[data-theme="dark"] .upload-row .upload-ico { color: #74D6D4; }
.upload-row .upload-label { display: block; font-size: 14px; font-weight: 600; margin: 0; cursor: pointer; }
.upload-row .upload-file { display: block; font-size: 12.5px; color: var(--on-surface-2); overflow-wrap: anywhere; }
.upload-row .err { display: none; font-size: 12.5px; color: #93231E; font-weight: 700; margin-top: 4px; }
.upload-row.has-error .err { display: block; }
.mail-attach-pick { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.upload-row .upload-actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-shrink: 0;
}
.upload-file-list { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upload-row:has(.upload-file-list) { align-items: flex-start; }
.upload-file-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.upload-file-item .upload-file { flex: 1 1 140px; }
.mail-attach .upload-row { align-items: center; }

/* Document list on the hire profile */
.doc-list { display: flex; flex-direction: column; }
.doc-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.doc-row + .doc-row { border-top: 1px solid var(--border); }
.doc-row-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.doc-row-title {
  flex: 1 1 auto; min-width: 0;
  font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--on-surface);
}
.doc-row-head .badge-eco { flex: 0 0 auto; }
.doc-row .doc-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: var(--r-sm);
  display: grid; place-content: center; font-size: 15px;
  background: var(--surface-sunk); color: var(--on-surface-2);
}
.doc-row.is-in .doc-ico { background: var(--eco-green-soft); color: #2F6B25; }
[data-theme="dark"] .doc-row.is-in .doc-ico { color: #92DA82; }
.doc-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.doc-file {
  margin-left: 44px;
  padding: 10px 12px;
  background: var(--surface-sunk);
  border-radius: var(--r-sm);
  min-width: 0;
}
.doc-file + .doc-file { margin-top: 6px; }
.doc-file-name {
  margin: 0;
  font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--on-surface);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-file-meta, .doc-file-empty {
  margin: 3px 0 0;
  font-size: 12px; color: var(--on-surface-2);
}
.doc-file-empty { margin-left: 44px; }
.doc-file .doc-opens { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 10px; }
.doc-file .doc-opens .icon-btn { text-decoration: none; }

/* Document viewer - the file is read inside the modal, not in a new tab */
.doc-view {
  background: var(--surface-sunk); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: auto; padding: var(--space-3);
  display: grid; place-items: center; min-height: 320px; max-height: 62vh;
}
.doc-view img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.doc-view.is-frame { padding: 0; max-height: none; overflow: hidden; }
.doc-view iframe { display: block; width: 100%; height: min(58vh, 560px); border: 0; border-radius: var(--r-md); background: #fff; }
.pub-wrap:has(.doc-reader),
.pub-wrap:has(.pol-pack) {
  max-width: min(1120px, calc(100vw - 24px));
  padding-top: var(--space-4);
}
.pub-wrap:has(.pol-pack) { padding-top: 12px; }
.pub-wrap:has(.doc-reader) .page-title,
.pub-wrap:has(.pol-pack) .page-title { font-size: clamp(22px, 3.4vw, 30px); }
.pub-wrap:has(.doc-reader) .page-sub,
.pub-wrap:has(.pol-pack) .page-sub { margin-bottom: 10px; }
.doc-reader { padding: 16px 16px 14px; }
.doc-reader .doc-view.is-frame { background: #323639; }
.doc-reader .doc-view iframe {
  height: clamp(280px, calc(100dvh - 270px), 980px);
  background: #323639;
}
.doc-pack { display: grid; gap: 14px; }
.doc-pack-lab {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #323639;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.doc-pack-lab a { color: #cde8ff; font-weight: 600; }
.doc-pack.is-steps { gap: 0; }
.doc-pack.is-steps .doc-view { display: none; }
.doc-pack.is-steps .doc-view.is-on { display: block; }
.doc-pack .doc-view iframe { height: clamp(280px, calc(100dvh - 270px), 820px); }
.pol-progress {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eco-teal);
}
.pol-step { display: none; }
.pol-step.is-on { display: block; }
.pol-embed {
  margin: 8px 0 12px;
  background: #323639;
  border-radius: var(--r-md);
  overflow: hidden;
}
.pol-embed iframe {
  display: block;
  width: 100%;
  height: max(560px, calc(100dvh - 200px));
  border: 0;
  background: #323639;
}
.cta-docs {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cta-file-lab { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--on-surface-3); }
.doc-ack {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.doc-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; margin: 0; }
.doc-timer.is-wait { color: var(--eco-orange); }
.doc-timer.is-ok { color: var(--eco-green); }
.cta-lead { max-width: 40rem; color: var(--on-surface-2); font-size: 14px; margin: 0 0 14px; line-height: 1.45; }
.cta-list { display: grid; gap: 10px; }
.cta-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}
.cta-row[data-mode="pdf"] { border-color: color-mix(in srgb, var(--eco-orange) 28%, var(--border)); }
.cta-row[data-mode="link"] { border-color: color-mix(in srgb, var(--eco-teal) 28%, var(--border)); }
.cta-row[data-kind="form"] .cta-switch { display: none; }
.cta-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.cta-who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 200px; }
.cta-id {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 10px;
  background: var(--eco-teal-soft);
  color: var(--eco-teal-deep);
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px; letter-spacing: -.02em;
}
[data-theme="dark"] .cta-id { color: #8fe0de; }
.cta-copy { min-width: 0; }
.cta-kicker {
  margin: 0 0 1px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--on-surface-3);
}
.cta-copy h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.cta-now { margin: 2px 0 0; font-size: 12.5px; color: var(--on-surface-2); line-height: 1.35; }
.cta-now.is-warn { color: var(--warn-text); }
.cta-row[data-mode="form"] .cta-now-pdf,
.cta-row[data-mode="pdf"] .cta-now-form { display: none; }
.cta-link { display: grid; gap: 8px; margin-top: 12px; }
.cta-link-row { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: flex-end; }
.cta-link-row .field { flex: 1 1 240px; margin: 0; }
.cta-link-row [data-cta-open] { margin-bottom: 2px; }
.cta-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  gap: 2px;
  flex: 0 0 auto;
  margin-left: auto;
}
.cta-switch label { margin: 0; cursor: pointer; }
.cta-switch input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.cta-switch span {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 700; color: var(--on-surface-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.cta-switch input:checked + span {
  background: var(--eco-teal);
  color: #fff;
}
.cta-switch input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 1px; }
.cta-pdf {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 10px;
}
.cta-row[data-mode="pdf"] .cta-pdf { display: grid; }
.cta-file {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--surface-sunk);
  border-radius: var(--r-sm);
}
.cta-file-ico {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 8px;
  background: var(--eco-orange-soft);
  color: #9A4E0C;
  display: grid; place-items: center;
  font-size: 16px;
}
[data-theme="dark"] .cta-file-ico { color: #F0A04B; }
.cta-file-meta { min-width: 0; flex: 1 1 140px; }
.cta-file-name { font-weight: 700; font-size: 13px; word-break: break-word; }
.cta-file-empty { font-size: 12.5px; color: var(--warn-text); }
.cta-file-empty.is-ok { color: var(--on-surface-3); }
.cta-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.cta-file-btn { position: relative; margin: 0; }
.cta-timer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 0 2px;
}
.cta-timer label { margin: 0; font-size: 13px; font-weight: 700; }
.cta-timer .input-eco { width: 72px; padding-top: 6px; padding-bottom: 6px; }
.cta-timer-unit { font-size: 13px; font-weight: 700; color: var(--on-surface-2); }
.cta-timer-hint { font-size: 12.5px; color: var(--on-surface-3); }
.cta-remove { margin: 0; padding-left: 4px; }
.cta-save { display: flex; justify-content: flex-end; margin-top: 14px; }
.doc-view-empty {
  background: var(--surface-sunk); border: 1px dashed var(--border);
  border-radius: var(--r-md); padding: var(--space-6) var(--space-4);
  text-align: center; color: var(--on-surface-2);
}
.doc-view-empty .bi { font-size: 28px; }
.doc-view-empty .spinner {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--eco-teal);
  animation: eco-spin .7s linear infinite;
}
.spin { display: inline-block; animation: eco-spin .8s linear infinite; }
@keyframes eco-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .doc-view-empty .spinner, .spin, .btn-spinner { animation: none; }
}

/* ---------- 31. Pagination ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pager-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-2);
}
.pager-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pager-pages a,
.pager-pages button,
.pager-nav {
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--on-surface-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.pager-nav { min-width: auto; }
.pager-pages a:hover,
.pager-pages button:hover:not(:disabled),
.pager-nav:hover { background: var(--surface-sunk); color: var(--on-surface); text-decoration: none; }
.pager-pages a.is-on,
.pager-pages a[aria-current="page"],
.pager-pages button[aria-current="true"] {
  background: var(--selected);
  color: var(--on-selected);
  border-color: transparent;
}
.pager-pages button:disabled,
.pager-nav.is-off { opacity: .4; cursor: not-allowed; pointer-events: none; }
.pager-pages .gap { border: 0; background: none; cursor: default; min-width: 20px; color: var(--on-surface-3); }

/* ---------- 32. Checklist manager rows ---------- */
.tpl-row {
  display: grid; gap: var(--space-2);
  grid-template-columns: 150px 130px minmax(0,1fr) minmax(0,1fr) 110px 120px 44px;
  align-items: center;
  padding: 10px; border-radius: var(--r-md);
}
.tpl-row + .tpl-row { border-top: 1px solid var(--border); }
.tpl-row:hover { background: var(--surface-sunk); }
.tpl-row .input-eco { min-height: 38px; padding: 6px 10px; font-size: 13px; }
.tpl-head {
  display: grid; gap: var(--space-2);
  grid-template-columns: 150px 130px minmax(0,1fr) minmax(0,1fr) 110px 120px 44px;
  padding: 0 10px 8px;
}
.tpl-head span {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--on-surface-3);
}
@media (max-width: 640px) {
  .page-head { padding-inline: 0; }
}

.row-item.is-on {
  background: var(--selected) !important;
  color: var(--on-selected) !important;
  border-color: transparent !important;
}
.row-item.is-on .row-title,
.row-item.is-on .row-meta { color: inherit !important; }
.row-item.is-on .stat-ico {
  background: rgba(255,255,255,.16);
  color: var(--on-selected);
}

/* ---------- 33. Theme + responsive polish ---------- */
.input-eco::placeholder { color: var(--on-surface-3); opacity: 1; }
.input-eco option { background: var(--surface); color: var(--on-surface); }

[data-theme="dark"] body {
  background-color: var(--bg);
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: var(--surface);
  color: var(--on-surface);
  border-color: var(--border-strong);
}
[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--on-surface);
  color: var(--on-surface);
}
[data-theme="dark"] .modal-content {
  background: var(--surface);
  color: var(--on-surface);
}
[data-theme="dark"] .stage-node[data-state="complete"] { color: #92DA82; }
[data-theme="dark"] .badge-green { color: #92DA82; }
[data-theme="dark"] .badge-teal { color: #74D6D4; }

.card-head { flex-wrap: wrap; }
.between { flex-wrap: wrap; }
.stage-rail {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.stage-node { min-width: 44px; }

.filter-bar,
.card-head.flex-wrap > .vcenter {
  width: 100%;
}
.search-eco { min-width: min(100%, 220px); }

.app {
  padding-left: max(var(--space-5), env(safe-area-inset-left));
  padding-right: max(var(--space-5), env(safe-area-inset-right));
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
}

@media (max-width: 1240px) {
  .topbar { gap: var(--space-3); }
}

@media (max-width: 1024px) {
  body { background-attachment: scroll; }
  .page-title { font-size: clamp(26px, 5vw, 38px); }
  .chart-box { min-height: 220px; }
}

@media (max-width: 768px) {
  .app {
    padding-left: max(var(--space-3), env(safe-area-inset-left));
    padding-right: max(var(--space-3), env(safe-area-inset-right));
  }
  .topbar {
    padding-bottom: var(--space-4);
    gap: var(--space-2);
  }
  .brand-lockup { padding: 6px 12px 6px 8px; }
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }
  .page-head .btn-eco,
  .page-head .vcenter { width: 100%; }
  .page-head .vcenter .btn-eco { flex: 1 1 auto; }
  .stat b { font-size: 26px; }
  .kpi .kpi-val, .kpi-val { font-size: 24px; }
  .card-eco, .card-ink, .card-warm { padding: var(--space-4); border-radius: var(--r-lg); }
  .seg {
    width: 100%;
    justify-content: flex-start;
  }
  .seg button { flex: 1 1 auto; text-align: center; }
  .stat-row { gap: var(--space-3); }
  .ring-stat { width: 112px; height: 112px; flex-basis: 112px; }
  .ring-stat .ring-label b { font-size: 22px; }
  .avatar-xl { width: 80px; height: 80px; font-size: 26px; }
  .eco-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .eco-modal,
  .eco-modal.wide {
    width: 100%;
    max-width: none;
    max-height: min(94dvh, 100%);
    margin: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .eco-modal-head { padding: 10px var(--space-4) var(--space-3); }
  .eco-modal-body { padding: var(--space-4); }
  .eco-modal-foot {
    padding: var(--space-3) var(--space-4);
    padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  }
  .eco-modal-foot .btn-eco,
  .eco-modal-foot a.btn-eco {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
  .eco-drawer {
    width: min(100%, 100vw);
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .eco-modal .seg { width: auto; }
  .eco-modal::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 99px;
    background: var(--border-strong);
    flex: 0 0 auto;
  }
  .doc-view { min-height: 200px; max-height: 48vh; }
  .doc-view iframe { height: 42vh; }
  .doc-reader .doc-view { max-height: none; }
  .doc-reader .doc-view iframe { height: clamp(240px, calc(100dvh - 230px), 860px); }
  .pol-embed iframe { height: max(420px, calc(100dvh - 180px)); }
}

@media (max-width: 640px) {
  .eco-modal-foot .btn-eco,
  .eco-modal-foot a.btn-eco { flex-basis: 100%; }
  .tpl-head { display: none; }
  .tpl-row {
    grid-template-columns: 1fr 1fr;
    padding: 12px 0;
  }
  .tpl-row > :nth-child(3),
  .tpl-row > :nth-child(4) { grid-column: 1 / -1; }
  table.eco { min-width: 640px; }
  .icon-btn { width: 40px; height: 40px; flex-basis: 40px; }
  .nav-pill a { padding: 8px 12px; }
}

.settings-tabs, .seg.wrapf { flex-wrap: wrap; }
.card-eco.d-block:hover { transform: translateY(-2px); text-decoration: none; }

/* ---------- 34. Workflow matrix ---------- */
.wf-search { max-width: 320px; }
button.stage-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
button.stage-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
}
button.stage-card:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}
.stage-card-title {
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--on-surface);
}
.stage-card .badge-eco { white-space: nowrap; }

.wf-table-wrap {
  overflow: auto;
  max-height: min(72vh, 760px);
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
table.eco.wf-matrix {
  min-width: 1040px;
  margin: 0;
}
table.eco.wf-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}
table.eco.wf-matrix th.wf-hire,
table.eco.wf-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 220px;
  max-width: 280px;
  background: var(--surface);
  box-shadow: 8px 0 14px -12px rgba(36, 30, 32, .28);
}
table.eco.wf-matrix thead th.wf-hire { z-index: 3; }
table.eco.wf-matrix tbody tr:hover td:first-child { background: var(--surface-sunk); }
[data-theme="dark"] table.eco.wf-matrix th.wf-hire,
[data-theme="dark"] table.eco.wf-matrix td:first-child {
  box-shadow: 8px 0 14px -12px rgba(0, 0, 0, .65);
}

.wf-e { text-align: center; }
.wf-e-name {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--on-surface-3);
  max-width: 72px;
  margin: 2px auto 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf-cell { text-align: center; padding-left: 4px; padding-right: 4px; }
.wf-progress { min-width: 130px; }
.wf-start { font-weight: 600; }
.wf-hire-name {
  font-weight: 700;
  color: var(--on-surface);
}
.wf-hire-name:hover { color: var(--primary); }
.minw0 { min-width: 0; }

.stage-node.wf-dot {
  flex: none;
  width: 42px;
  height: 40px;
  min-width: 42px;
  display: inline-grid;
  place-content: center;
  padding: 0;
  margin: 0 auto;
}
.stage-node.wf-dot:hover { transform: translateY(-1px); }
.stage-node.wf-dot .sn-n { display: none; }

.wf-table-foot { align-items: center; }
.wf-perpage {
  width: auto;
  min-width: 4.25rem;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  font-weight: 700;
}
#wfPager .pager { margin: 0; gap: 10px; }
table.eco.wf-matrix thead th[aria-sort] button { color: var(--on-surface); }

#wfLegend .legend { padding: 4px 2px 0; gap: 10px 16px; }

@media (max-width: 768px) {
  .wf-search { max-width: none; width: 100%; flex: 1 1 100%; }
  .wf-table-wrap { max-height: min(64vh, 560px); }
  table.eco.wf-matrix th.wf-hire,
  table.eco.wf-matrix td:first-child {
    min-width: 168px;
    max-width: 200px;
  }
}

@media (max-width: 640px) {
  table.eco.wf-matrix { min-width: 980px; }
  .wf-stage-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 6px;
  }
  .wf-stage-cards > [class*="col-"] {
    flex: 0 0 220px;
    max-width: 220px;
    width: 220px;
  }
  .wf-open .btn-eco { padding-inline: 10px; }
}

/* ---------- 35. App pages: theme, density, breakpoints ---------- */
.flash-eco {
  border: 1px solid transparent;
  font-weight: 700;
}
.flash-eco p { font-weight: 700; overflow-wrap: anywhere; white-space: pre-line; }
.flash-ok { background: var(--eco-green-soft); color: var(--ok-text); }
.flash-warn { background: var(--eco-orange-soft); color: var(--warn-text); }
.flash-err { background: var(--eco-red-soft); color: var(--danger-text); }

.table-wrap {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  max-width: 100%;
}
table.eco td { overflow-wrap: anywhere; }
table.eco .person-cell,
table.eco .person-cell * { overflow-wrap: break-word; }
.td-strong { font-weight: 700; color: var(--on-surface); }

.filter-form .input-eco { flex: 1 1 160px; max-width: 240px; width: auto; }
.filter-form .search-eco { flex: 1 1 220px; max-width: 340px; }
.filter-form .btn-eco { flex: 0 0 auto; }

.report-tile {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.report-tile:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.report-tile h2 { font-size: 18px; }

.chart-box.is-md { height: 220px; }
.chart-box.is-lg { height: 260px; }
.chart-box.is-xl { height: 280px; }

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 var(--space-5);
  padding: 4px;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: 22px;
}
.settings-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface-2);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.settings-nav a:hover { color: var(--on-surface); text-decoration: none; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.settings-nav a.is-on { background: var(--selected); color: var(--on-selected); }
.settings-nav a.is-on:hover { background: var(--selected-hover); color: var(--on-selected); }
.settings-nav a:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; }

.settings-panel { padding: 22px 24px 20px; }
.settings-panel .panel-lead {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--on-surface-2);
  line-height: 1.45;
}
.settings-block {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.settings-block:first-of-type { border-top: 0; padding-top: 12px; }
.settings-block h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
}
.settings-grid .span-2 { grid-column: 1 / -1; }
.settings-grid .field { margin-bottom: 14px; }
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.check-card {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface-sunk);
  border-radius: var(--r-md);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.check-eco.check-card:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}
.check-eco.check-card:has(input:checked) {
  border-color: color-mix(in srgb, var(--eco-teal) 42%, var(--border));
  background: color-mix(in srgb, var(--eco-teal) 9%, var(--surface-sunk));
}
.check-eco.check-card:has(input:focus-visible) {
  outline: 3px solid var(--ring);
  outline-offset: 1px;
}
.panel-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.color-pick {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-pick-swatch {
  -webkit-appearance: none;
  appearance: none;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.color-pick-swatch:hover { border-color: var(--on-surface-3); }
.color-pick-swatch:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.color-pick-swatch::-webkit-color-swatch-wrapper { padding: 3px; }
.color-pick-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 9px;
}
.color-pick-swatch::-moz-color-swatch {
  border: 0;
  border-radius: 9px;
}
.color-pick-hex {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.logo-pick {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.logo-pick-preview,
.logo-pick-empty {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-sunk);
  object-fit: contain;
  padding: 8px;
}
.logo-pick-empty {
  display: grid;
  place-items: center;
  color: var(--on-surface-3);
  font-size: 22px;
}
.logo-pick .field { margin: 0; flex: 1 1 200px; }

.dept-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.dept-row, .dept-add {
  display: flex; align-items: center; gap: 8px;
}
.dept-row .input-eco, .dept-add .input-eco { flex: 1 1 auto; min-width: 0; }
.dept-row .btn-eco, .dept-add .btn-eco { flex: 0 0 auto; }
.form-card { max-width: 560px; }
.field-narrow { max-width: 280px; }

.hire-hero {
  background: linear-gradient(155deg, var(--eco-teal-soft), var(--surface) 62%);
}
.hire-name { font-size: clamp(22px, 3vw, 26px); letter-spacing: -.035em; margin-top: 14px; }
.info-row {
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.info-row-val { font-weight: 700; max-width: 60%; }
.hire-link { font-weight: 800; font-size: 16px; color: var(--on-surface); letter-spacing: -.02em; }
.hire-link:hover { color: var(--primary); text-decoration: none; }
.cell-rail { min-width: 210px; }
.cell-progress { min-width: 120px; }
.mx-cell { text-align: center; }
.mx-node { display: inline-flex; min-height: 34px; padding: 4px 10px; border: 1px solid var(--border); }

.tpl-mono { font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: 13.5px; line-height: 1.55; }
.tpl-details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--on-surface); }
.tpl-details summary:hover { color: var(--primary); }
.tpl-cats {
  display: flex; flex-wrap: wrap; gap: 3px;
  padding: 4px; margin-bottom: var(--space-5);
  background: var(--surface-sunk); border: 1px solid var(--border);
  border-radius: var(--r-pill); width: fit-content; max-width: 100%;
}
.tpl-cats a,
.seg a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; color: var(--on-surface-2);
  text-decoration: none; min-height: 38px;
}
.tpl-cats a:hover,
.seg a:hover { color: var(--on-surface); text-decoration: none; }
.tpl-cats a.is-on,
.seg a.is-on { background: var(--selected); color: var(--on-selected); }
.tpl-list .row-item,
.tpl-tab {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
}
.tpl-list .row-item:hover { background: var(--surface-sunk); text-decoration: none; }
.tpl-list .row-item.is-on .stat-ico { background: rgba(255,255,255,.16); color: var(--on-selected); }
.tpl-list-card { position: sticky; top: 12px; }
.tpl-preview-card { position: sticky; top: 12px; }
.tpl-preview-host {
  max-height: min(62vh, 640px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
}
.tpl-meta-title { font-size: 19px; line-height: 1.3; }
.tpl-lang-note { font-weight: 700; color: var(--primary); }
.mail-subject { font-weight: 700; font-size: 14px; color: var(--on-surface); }
#tplBody, #sysBody { min-height: 280px; }
.tox-tinymce {
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  overflow: hidden;
}
.tox .tox-toolbar, .tox .tox-toolbar__overflow, .tox .tox-toolbar__primary {
  background: var(--surface-sunk) !important;
}
@media (max-width: 1199px) {
  .tpl-preview-card { position: static; }
}
@media (max-width: 991px) {
  .tpl-list-card { position: static; }
  .tpl-cats { width: 100%; }
  .tpl-cats a { flex: 1 1 auto; }
}
[data-theme="dark"] .tpl-list .row-item:not(.is-on) { background: var(--surface); }
[data-theme="dark"] .mail-head { background: var(--surface); }
.pub-topbar { justify-content: space-between; margin-bottom: var(--space-5); }
.pub-topbar img { height: 28px; width: auto; }

.empty-ico {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: grid; place-content: center; border-radius: var(--r-md);
  background: var(--eco-orange-soft); color: var(--warn-text); font-size: 28px;
}
.empty-ico.is-ok { background: var(--eco-green-soft); color: var(--ok-text); }
.auth-title-sm { font-size: 26px; }

code {
  background: var(--surface-sunk);
  color: var(--eco-teal-deep);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .92em;
}
[data-theme="dark"] code { color: #74D6D4; }

input.input-eco[type="file"] {
  padding: 8px 10px 8px 8px;
  cursor: pointer;
  background: var(--surface-sunk);
  font-size: 13.5px;
}
input.input-eco[type="file"]::file-selector-button,
input.input-eco[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--selected);
  color: var(--on-selected);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
input.input-eco[type="color"] { min-height: 46px; padding: 6px; }

.users-actions { justify-content: flex-end; }
.users-actions .btn-eco { white-space: nowrap; }

.nowrap { white-space: nowrap; }
.is-muted-row td { color: var(--on-surface-2); }
.empty.tight { padding: 28px 12px; }
.col-actions { text-align: right; width: 1%; }
.mono-cell {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 12.5px;
  letter-spacing: .01em;
}
.log-msg { max-width: 28rem; }
table.eco.compact { min-width: 760px; }
table.eco.compact tbody td { padding: 10px 12px; }
th.col-actions, td.col-actions {
  width: 184px;
  min-width: 184px;
  white-space: nowrap;
}

button.icon-btn {
  font: inherit;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}
.icon-btn-sm { width: 36px; height: 36px; flex: 0 0 36px; font-size: 15px; box-shadow: none; }
.icon-btn.is-danger { color: #93231E; }
.icon-btn.is-danger:hover { background: var(--eco-red-soft); border-color: transparent; color: #93231E; }
[data-theme="dark"] .icon-btn.is-danger { color: #F09891; }
[data-theme="dark"] .icon-btn.is-danger:hover { color: #F09891; }

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
}
.row-actions form { margin: 0; }

.person-cell { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.person-cell .who { min-width: 0; }
.who-name { display: block; font-weight: 700; color: var(--on-surface); }
.who-name .badge-eco { margin-left: 6px; vertical-align: middle; font-size: 10px; padding: 2px 8px; }
.who-mail { display: block; font-size: 12.5px; color: var(--on-surface-2); word-break: break-word; }

.invite-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  align-content: flex-start;
  gap: 10px;
  padding: 16px 18px;
}
.filter-bar .filter-date.grow { flex: 2 1 260px; max-width: none; min-width: 220px; }
.filter-bar .search-eco {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
}
.filter-bar .btn-eco { flex: 0 0 auto; }
.filter-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  flex: 1 1 140px;
  max-width: 220px;
}
.filter-date span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-surface-3);
}
.filter-date .input-eco { min-width: 0; max-width: none; width: 100%; }
.filter-date .filter-per { max-width: none; }
.filter-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  padding-bottom: 0;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 24px;
}
.profile-hero-name { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
.profile-hero-meta { margin: 0; color: var(--on-surface-2); }
.profile-hero-login { text-align: right; margin: 0 0 0 auto; line-height: 1.4; }
.profile-hero-login strong { color: var(--on-surface); font-weight: 700; }
.qr-frame {
  display: inline-grid;
  place-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.backup-codes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.backup-codes code { font-size: 13px; }

.data-panel .settings-block:first-of-type { padding-top: 4px; }

[data-theme="dark"] .text-muted { color: var(--on-surface-2) !important; }
[data-theme="dark"] .card-warm {
  background: linear-gradient(150deg, var(--eco-orange-soft), var(--surface) 78%);
}
[data-theme="dark"] .kit-size-card {
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}
[data-theme="dark"] .hire-hero {
  background: linear-gradient(155deg, var(--eco-teal-soft), var(--surface) 70%);
}
[data-theme="dark"] .btn-ghost-eco { background: var(--surface); }

.queue-copy { flex: 1; min-width: 0; }
.queue-title { display: block; font-weight: 700; font-size: 13.5px; color: var(--on-surface); }
.sched-today { color: var(--eco-orange); font-weight: 800; }

@media (max-width: 768px) {
  .filter-form .input-eco,
  .filter-form .search-eco,
  .filter-form .btn-eco,
  .filter-bar .search-eco,
  .filter-bar > .input-eco,
  .filter-bar .btn-eco,
  .filter-date,
  .filter-date .input-eco {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
  .profile-hero-login { text-align: left; margin: 0; width: 100%; }
  .invite-row { flex-wrap: wrap; }
  .search-eco { max-width: none !important; width: 100%; flex: 1 1 100%; }
  .page-head .seg { width: 100%; }
  .chart-box.is-md, .chart-box.is-lg, .chart-box.is-xl { height: 220px; }
  .info-row { flex-direction: column; gap: 4px; }
  .info-row-val { max-width: 100%; text-align: left !important; }
  .users-actions { justify-content: flex-start; }
  .form-card { max-width: none; }
  .field-narrow { max-width: none; }
  .eco-footer { justify-content: center; text-align: center; }
}

@media (max-width: 720px) {
  .settings-grid,
  .toggle-grid { grid-template-columns: 1fr; }
  .settings-panel { padding: 18px 16px 16px; }
}
@media (max-width: 640px) {
  .settings-nav { width: 100%; }
  .settings-nav a { flex: 1 1 calc(50% - 4px); }
  table.eco.compact { min-width: 560px; }
}

