/* =================================================================
   TEEP WORK — Design System v3
   First-principles rebuild. Modern, clean, professional.

   PRINCIPLES
   1. White-first: pages breathe on a bright canvas. Deep green is
      reserved for text, primary actions, and the hero/footer surfaces.
   2. No gradients anywhere — only solid colour + 1px borders + soft
      layered shadow. The pattern is in the geometry, not the colour.
   3. One green family: deep #0B3D26 for ink, #15803D for primary,
      #A3E635 for lemon leaf accent, #DCFCE7 / #F0FDF4 for tints.
   4. Strict 4-pt spacing grid; type scale 12 / 13 / 14 / 16 / 20 / 28 / 40.
   5. Components earn their borders — dividers, not boxes around everything.
   ================================================================= */

/* ---------- Design Tokens ---------- */
:root{
  /* Brand greens (the only colour family besides neutrals) */
  --brand-950:#052E16;
  --brand-900:#0B3D26;
  --brand-800:#14532D;
  --brand-700:#15803D;
  --brand-600:#16A34A;
  --brand-500:#A3E635;
  --brand-400:#BEF264;
  --brand-300:#A3E635;
  --brand-200:#BBF7D0;
  --brand-100:#DCFCE7;
  --brand-50: #F0FDF4;

  /* Neutrals */
  --ink:#0B1F14;          /* primary text on light */
  --text:#1A2E22;         /* secondary text on light */
  --muted:#5C6F63;        /* meta text */
  --faint:#8AA095;        /* ultra-quiet text */

  /* Surfaces */
  --bg:#FFFFFF;
  --bg-soft:#F7FAF8;      /* off-white with a kiss of green */
  --bg-elevated:#FAFCFB;
  --card:#FFFFFF;

  /* Lines */
  --line:#E1EAE4;
  --line-soft:#EFF2EE;
  --line-strong:#C9D8CE;

  /* Status */
  --danger:#DC2626;
  --danger-bg:#FEF2F2;
  --danger-border:#FECACA;
  --warn:#B45309;
  --warn-bg:#FFFBEB;
  --warn-border:#FDE68A;
  --info:#1D4ED8;
  --info-bg:#EFF6FF;
  --info-border:#BFDBFE;

  /* Geometry */
  --r-sm:8px;
  --r:12px;
  --r-md:14px;
  --r-lg:18px;
  --r-xl:24px;
  --r-pill:999px;

  /* Shadow — layered, low-spread, low-opacity, green-tinted */
  --shadow-xs:0 1px 2px rgba(11,61,38,.06);
  --shadow-sm:0 1px 2px rgba(11,61,38,.05),0 2px 6px rgba(11,61,38,.04);
  --shadow:   0 1px 2px rgba(11,61,38,.05),0 8px 24px rgba(11,61,38,.07);
  --shadow-lg:0 1px 2px rgba(11,61,38,.04),0 18px 48px rgba(11,61,38,.10);

  /* Layout */
  --content-w:1200px;
  --shell-w:1320px;
  --header-h:68px;

  /* Back-compat aliases (legacy inline styles degrade gracefully) */
  --accent:var(--brand-700);
  --bg-panel:var(--card);
  --text-strong:var(--ink);
  --text-muted:var(--muted);
  --border:var(--line);
  --border-soft:var(--line-soft);
}

/* ---------- Reset ---------- */
*,*::before,*::after{box-sizing:border-box}
*{margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-feature-settings:"cv11","ss01","ss03";
  min-height:100vh;
  display:flex;flex-direction:column;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font:inherit;cursor:pointer;background:none;border:0;color:inherit}
input,textarea,select{font:inherit;color:inherit}
::selection{background:var(--brand-200);color:var(--brand-950)}
:focus-visible{outline:2px solid var(--brand-500);outline-offset:2px;border-radius:4px}

/* ---------- Layout helpers ---------- */
.wrap{max-width:var(--content-w);margin:0 auto;padding:0 24px}
.shell{max-width:var(--shell-w);margin:0 auto;padding:0 24px}
main{flex:1}
.mt{margin-top:16px}.mt-sm{margin-top:8px}.mt-lg{margin-top:28px}.mt-xl{margin-top:40px}
.mb{margin-bottom:16px}.mb-sm{margin-bottom:8px}.mb-lg{margin-bottom:28px}
.text-muted{color:var(--muted)}
.text-faint{color:var(--faint)}
.text-brand{color:var(--brand-700)}
.text-danger{color:var(--danger)}
.text-warn{color:var(--warn)}
.text-sm{font-size:.8125rem}
.text-xs{font-size:.75rem}
.text-lg{font-size:1.0625rem}
.fw-bold{font-weight:700}.fw-semi{font-weight:600}
.divider{border:0;border-top:1px solid var(--line);margin:24px 0}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.row-tight{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.spacer{flex:1}

/* ---------- Eyebrow / tag ---------- */
.eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.72rem;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;
  color:var(--brand-700);background:var(--brand-50);
  border:1px solid var(--brand-100);
  padding:6px 12px;border-radius:var(--r-pill);
}
.eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--brand-500);box-shadow:0 0 0 3px var(--brand-100)}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 20px;border-radius:var(--r-pill);
  font-weight:600;font-size:.9rem;line-height:1;
  border:1px solid transparent;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .05s ease;
  white-space:nowrap;user-select:none;
}
.btn:active{transform:translateY(1px)}
.btn:disabled,.btn[disabled]{opacity:.55;cursor:not-allowed;transform:none}

.btn-primary{background:var(--brand-900);color:#fff;border-color:var(--brand-900)}
.btn-primary:hover{background:var(--brand-800);border-color:var(--brand-800)}

.btn-leaf{background:var(--brand-500);color:var(--brand-950);border-color:var(--brand-500)}
.btn-leaf:hover{background:var(--brand-400);border-color:var(--brand-400)}

.btn-outline{background:#fff;color:var(--brand-900);border-color:var(--line-strong)}
.btn-outline:hover{border-color:var(--brand-700);color:var(--brand-700)}

.btn-ghost{background:transparent;color:var(--text);border-color:transparent}
.btn-ghost:hover{background:var(--bg-soft);color:var(--brand-900)}

.btn-ghost-light{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.28)}
.btn-ghost-light:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.45)}

.btn-danger{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn-danger:hover{background:#B91C1C;border-color:#B91C1C}

.btn-warn{background:var(--warn);color:#fff;border-color:var(--warn)}
.btn-warn:hover{background:#92400E;border-color:#92400E}

.btn-sm{padding:7px 14px;font-size:.8125rem}
.btn-lg{padding:14px 26px;font-size:1rem}
.btn-block{width:100%}
.btn-icon{padding:0;width:38px;height:38px;border-radius:10px}
.btn-link{background:none;border:0;color:var(--brand-700);padding:0;font-weight:600;text-decoration:none}
.btn-link:hover{text-decoration:underline}

/* ---------- Public site header ---------- */
.site-header{
  position:sticky;top:0;z-index:60;
  background:rgba(255,255,255,.96);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
  transition:box-shadow .2s ease,border-color .2s ease;
}
.site-header::before{
  content:"";display:block;height:3px;background:var(--brand-500);
}
.site-header.is-scrolled{box-shadow:0 8px 28px rgba(11,61,38,.08);border-color:var(--line)}
.site-header .shell-inner{height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px}

/* Top utility strip — slim, solid deep green, no gradient */
.top-strip{
  background:var(--brand-950);color:#C4D8CB;
  font-size:.76rem;letter-spacing:.01em;
}
.top-strip .wrap{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding-top:7px;padding-bottom:7px;
}
.top-strip .ts-left{display:inline-flex;align-items:center;gap:8px;min-width:0}
.top-strip .ts-dot{width:6px;height:6px;border-radius:50%;background:var(--brand-500);flex:none}
.top-strip .ts-left strong{color:#fff;font-weight:600}
.top-strip .ts-right{display:inline-flex;align-items:center;gap:16px}
.top-strip .ts-right a{display:inline-flex;align-items:center;gap:6px;color:#C4D8CB;font-weight:500}
.top-strip .ts-right a:hover{color:#fff}
.top-strip .ts-right svg{width:13px;height:13px}
@media (max-width:960px){.top-strip{display:none}}

/* Brand — logo mark + modern wordmark (TEEP dark / WORK green, lime dot) */
.brand{
  display:inline-flex;align-items:center;gap:13px;color:var(--brand-900);font-weight:700;
  text-decoration:none;min-width:0;
}
.brand-mark{
  width:46px;height:46px;border-radius:14px;background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  display:inline-flex;align-items:center;justify-content:center;
  flex:none;position:relative;overflow:hidden;
}
.brand-mark::after{
  content:"";position:absolute;left:8px;right:8px;bottom:5px;height:3px;
  border-radius:99px;background:var(--brand-500);
}
.brand-mark img{
  width:32px;height:32px;object-fit:contain;display:block;
}
.brand .name{display:flex;flex-direction:column;line-height:1.1;min-width:0;justify-content:center}
.brand .name .wordmark,
.brand .name b{
  display:inline-flex;align-items:center;gap:7px;
  font-family:"Sora","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:1.34rem;font-weight:800;letter-spacing:-.03em;line-height:1;
  color:var(--brand-900);margin:0;
}
.brand .name .wordmark .w-teep,.brand .name b .brand-teep{color:var(--brand-900);}
.brand .name .wordmark .w-work,.brand .name b .brand-work{
  color:var(--brand-700);background:none;padding:0;border-radius:0;letter-spacing:-.03em;
}
.brand .name .wordmark .w-sep{
  width:6px;height:6px;border-radius:50%;background:var(--brand-500);flex:none;
}
.brand .name .tagline{
  display:block;margin:5px 0 0;padding:0;border:0;
  font-size:.6rem;font-weight:700;letter-spacing:2px;
  color:var(--muted);text-transform:uppercase;white-space:nowrap;line-height:1;
}
.brand .name .tagline span{
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:.6rem;font-weight:700;letter-spacing:2px;
  color:var(--muted);text-transform:uppercase;white-space:nowrap;
}

.nav-links{display:flex;align-items:center;gap:2px}
.nav-links a{
  position:relative;
  padding:9px 14px;border-radius:10px;
  font-size:.875rem;font-weight:500;color:var(--text);
  transition:background .15s ease,color .15s ease;
}
.nav-links a:hover{background:var(--bg-soft);color:var(--brand-900)}
.nav-links a.active{background:transparent;color:var(--brand-900);font-weight:700}
.nav-links a.active::after{
  content:"";position:absolute;left:14px;right:14px;bottom:4px;height:3px;
  border-radius:99px;background:var(--brand-500);
}

.nav-cta{display:flex;align-items:center;gap:10px}
.nav-cta .btn{box-shadow:var(--shadow-xs)}
.nav-cta .btn-outline{border-color:var(--line-strong);font-weight:600}
.nav-cta .btn-outline:hover{border-color:var(--brand-900);color:var(--brand-900);background:#fff;box-shadow:var(--shadow-sm)}

/* Hamburger — animates into an X when the drawer is open */
.hamburger{
  display:none;width:42px;height:42px;border-radius:11px;
  border:1px solid var(--line);background:#fff;color:var(--ink);
  align-items:center;justify-content:center;position:relative;
  transition:border-color .15s ease,background .15s ease,color .15s ease;
}
.hamburger:hover{border-color:var(--brand-300);background:var(--brand-50);color:var(--brand-700)}
.hamburger svg{width:20px;height:20px;display:block}
.hamburger .bar{
  transition:transform .25s cubic-bezier(.2,.7,.2,1),opacity .18s ease;
  transform-origin:12px 12px;
}
.hamburger[aria-expanded="true"]{background:var(--brand-900);color:#fff;border-color:var(--brand-900)}
.hamburger[aria-expanded="true"] .bar.top{transform:translateY(5px) rotate(45deg)}
.hamburger[aria-expanded="true"] .bar.mid{opacity:0}
.hamburger[aria-expanded="true"] .bar.bot{transform:translateY(-5px) rotate(-45deg)}

/* Backdrop behind the side drawer */
.menu-backdrop{
  position:fixed;inset:0;z-index:89;
  background:rgba(11,31,20,.45);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  opacity:0;visibility:hidden;
  transition:opacity .3s ease,visibility .3s ease;
}
.menu-backdrop.is-open{opacity:1;visibility:visible}

/* Side drawer (replaces the old top-down mobile menu) */
.mobile-menu{
  position:fixed;top:0;right:0;height:100dvh;height:100vh;
  width:340px;max-width:88vw;z-index:90;
  background:#fff;
  border-left:1px solid var(--line);
  box-shadow:-20px 0 60px rgba(5,46,22,.18);
  transform:translateX(100%);
  transition:transform .36s cubic-bezier(.22,.61,.36,1), visibility 0s .36s;
  display:flex;flex-direction:column;
  visibility:hidden;
  pointer-events:none;
}
.mobile-menu.is-open{
  transform:translateX(0);
  visibility:visible;
  pointer-events:auto;
  transition:transform .36s cubic-bezier(.22,.61,.36,1), visibility 0s 0s;
}

.mobile-menu-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;
  border-bottom:1px solid var(--line-soft);
  background:var(--brand-50);
}
.mobile-menu-head .mini-brand{
  display:inline-flex;align-items:center;gap:10px;color:var(--brand-900);font-weight:700;
}
.mobile-menu-head .mini-brand img{
  width:34px;height:34px;object-fit:contain;border-radius:9px;
  background:#fff;border:1px solid var(--line-soft);
}
.mobile-menu-head .mini-brand b{font-size:.95rem;letter-spacing:-.01em;color:var(--ink)}
.mobile-menu-close{
  width:36px;height:36px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);background:#fff;color:var(--ink);
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.mobile-menu-close:hover{background:var(--brand-50);border-color:var(--brand-300);color:var(--brand-700)}
.mobile-menu-close svg{width:16px;height:16px}

.mobile-menu-nav{
  flex:1;overflow-y:auto;padding:14px 14px 8px;
  display:flex;flex-direction:column;gap:2px;
}
.mobile-menu-nav .nav-label{
  font-size:.66rem;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;
  color:var(--faint);padding:14px 12px 6px;
}
.mobile-menu-nav a{
  display:flex;align-items:center;gap:12px;
  padding:13px 14px;border-radius:11px;
  font-size:.95rem;font-weight:500;color:var(--ink);
  transition:background .14s ease,color .14s ease,transform .14s ease;
  border:1px solid transparent;
}
.mobile-menu-nav a:hover{
  background:var(--brand-50);color:var(--brand-900);border-color:var(--brand-100);
}
.mobile-menu-nav a:active{transform:scale(.985)}
.mobile-menu-nav a .chev{
  margin-left:auto;color:var(--faint);
  transition:transform .15s ease,color .15s ease;
}
.mobile-menu-nav a:hover .chev{transform:translateX(2px);color:var(--brand-700)}
.mobile-menu-nav a .chev svg{width:14px;height:14px}

.mobile-menu-foot{
  padding:16px 18px 22px;border-top:1px solid var(--line-soft);
  background:var(--bg-soft);
  display:flex;flex-direction:column;gap:10px;
}
.mobile-menu-foot .mobile-cta{display:flex;gap:10px}
.mobile-menu-foot .mobile-cta .btn{flex:1}
.mobile-menu-foot .foot-note{
  font-size:.72rem;color:var(--faint);text-align:center;margin-top:6px;
  letter-spacing:.02em;
}

/* Lock body scroll while drawer is open (iOS-friendly) */
body.menu-open{overflow:hidden;touch-action:none;overscroll-behavior:contain}

@media (max-width:960px){
  .nav-links,.nav-cta.desktop{display:none}
  .hamburger{display:inline-flex}
}
/* Tighter brand on very narrow screens so the tagline stays legible */
@media (max-width:380px){
  .brand .name .wordmark,.brand .name b{font-size:1.12rem}
  .brand .name .tagline{font-size:.52rem;letter-spacing:1.3px}
  .brand .name .tagline span{font-size:.52rem;letter-spacing:1.3px}
  .brand-mark{width:40px;height:40px;border-radius:12px}
  .brand-mark img{width:28px;height:28px}
}
/* Mini brand in drawers / sidebar keeps the same modern wordmark */
.mini-brand b,.footer-brand .logo{
  font-family:"Sora","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-weight:800;letter-spacing:-.03em;
}
.mini-brand b .brand-teep{color:var(--brand-900);}
.mini-brand b .brand-work{
  color:var(--brand-700);background:none;padding:0;border-radius:0;
}

/* ---------- Hero (index only) ----------
   No gradient. Solid deep green with a refined layered pattern
   (subtle dot grid + corner ring accents) — geometry, not colour. */
.hero{
  position:relative;overflow:hidden;
  background:var(--brand-950);
  color:#fff;
  isolation:isolate;
}
.hero::before{
  /* Subtle dot grid — geometric pattern, no colour blending.
     Uses an inline SVG data-URI for the dotted texture. */
  content:"";position:absolute;inset:0;z-index:0;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><circle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.10)'/></svg>");
  background-size:28px 28px;
  background-position:0 0;
}
.hero::after{
  /* Subtle decorative solid discs in corners. No colour blending. */
  content:"";position:absolute;inset:0;z-index:0;
  pointer-events:none;
}
.hero .hero-inner{
  position:relative;z-index:1;
  display:grid;grid-template-columns:1.1fr .9fr;gap:56px;align-items:center;
  padding:88px 24px 96px;
}
@media (max-width:980px){
  .hero .hero-inner{grid-template-columns:1fr;gap:48px;padding:64px 24px 72px}
}
.hero .hero-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.72rem;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;
  color:#D9F99D;background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.16);
  padding:6px 12px;border-radius:var(--r-pill);
  margin-bottom:22px;
}
.hero h1{
  font-size:clamp(2.2rem,4.5vw,3.4rem);line-height:1.05;
  letter-spacing:-.025em;font-weight:700;color:#fff;
  margin-bottom:18px;
}
.hero h1 .accent{color:var(--brand-300)}
.hero p.lead{
  font-size:1.0625rem;line-height:1.6;color:#C4D8CB;
  max-width:540px;margin-bottom:30px;
}
.hero-cta{display:flex;gap:12px;flex-wrap:wrap}
.hero-proof{
  display:grid;grid-template-columns:repeat(3,1fr);gap:18px;
  margin-top:42px;padding-top:28px;
  border-top:1px solid rgba(255,255,255,.12);
  max-width:520px;
}
.hero-proof > div strong{
  display:block;font-size:1.05rem;font-weight:700;letter-spacing:-.01em;color:#fff;line-height:1.25;
}
.hero-proof > div span{
  display:block;margin-top:3px;font-size:.8rem;color:#9DBFAE;
  line-height:1.5;overflow-wrap:anywhere;
}
.hero-proof .pdot{display:none}
.hero-proof .ptext{display:block;min-width:0}
/* Mobile: stack the proof points as clean cards so long lines like
   "Practice → Capability → Evidence → Opportunity" never distort. */
@media (max-width:640px){
  .hero .hero-inner{padding:52px 20px 60px;gap:40px}
  .hero-cta{gap:10px}
  .hero-cta .btn{flex:1 1 100%;padding:15px 20px}
  .hero-proof{grid-template-columns:1fr;gap:10px;margin-top:30px;padding-top:22px;max-width:none}
  .hero-proof > div{
    display:flex;gap:12px;align-items:flex-start;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    padding:13px 14px;
  }
  .hero-proof .pdot{
    display:block;flex:none;width:9px;height:9px;border-radius:50%;
    background:var(--brand-500);margin-top:5px;
  }
  .hero-proof > div strong{font-size:.98rem}
  .hero-proof > div span{font-size:.82rem;margin-top:2px}
}

.hero-card{
  position:relative;z-index:1;
  background:#fff;color:var(--ink);
  border-radius:var(--r-xl);
  padding:30px;
  box-shadow:0 24px 60px rgba(0,0,0,.35),0 2px 6px rgba(0,0,0,.2);
  border:1px solid rgba(255,255,255,.6);
}
.hero-card .card-title{
  font-size:.72rem;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;
  color:var(--brand-700);margin-bottom:14px;
}
.flow-step{
  display:flex;gap:14px;align-items:flex-start;
  padding:14px 0;border-top:1px solid var(--line-soft);
}
.flow-step:first-of-type{border-top:0;padding-top:4px}
.flow-step .num{
  flex:none;width:28px;height:28px;border-radius:50%;
  background:var(--brand-900);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:.78rem;font-weight:700;
}
.flow-step .body strong{display:block;font-size:.9rem;color:var(--ink);font-weight:600;margin-bottom:2px}
.flow-step .body span{display:block;font-size:.8rem;color:var(--muted);line-height:1.5}
.hero-card .btn{margin-top:18px}

/* Floating decorative ring (purely visual, geometric, no gradient). */
.hero-deco{
  position:absolute;z-index:0;pointer-events:none;
  border:1px solid rgba(255,255,255,.08);border-radius:50%;
}
.hero-deco.d1{width:520px;height:520px;left:-180px;top:-180px}
.hero-deco.d2{width:320px;height:320px;left:42%;bottom:-160px}
.hero-deco.d3{width:200px;height:200px;right:-70px;top:60px}
.hero-deco.dot{width:14px;height:14px;background:var(--brand-400);border:0;border-radius:50%;left:48%;top:90px}
.hero-deco.dot2{width:10px;height:10px;background:var(--brand-300);border:0;border-radius:50%;right:14%;bottom:120px}

/* ---------- Section / page sections ---------- */
.section{padding:84px 0}
.section.tight{padding:56px 0}
.section.soft{background:var(--bg-soft);border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}
.section-head{margin-bottom:36px;max-width:680px}
.section-head h2{font-size:clamp(1.6rem,3vw,2.1rem);letter-spacing:-.02em;color:var(--ink);font-weight:700;line-height:1.15}
.section-head .lead{color:var(--muted);font-size:1rem;margin-top:12px;max-width:620px;line-height:1.6}

/* ---------- Cards ---------- */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:24px;
  box-shadow:var(--shadow-xs);
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.card.tint{background:var(--bg-soft)}
.card.flat{box-shadow:none}
.card.hover:hover{border-color:var(--line-strong);box-shadow:var(--shadow-sm)}

.step-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:28px 26px;box-shadow:var(--shadow-xs);
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
  position:relative;overflow:hidden;
}
.step-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:4px;
  background:var(--brand-700);
  opacity:0;transition:opacity .2s ease, background .2s ease;
}
.step-card:hover{border-color:var(--brand-200);box-shadow:var(--shadow-sm);transform:translateY(-3px)}
.step-card:hover::before{opacity:1;background:var(--brand-500)}
.step-card .num{
  width:38px;height:38px;border-radius:11px;
  background:var(--brand-900);color:#fff;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;font-size:.95rem;
  box-shadow:0 6px 16px rgba(11,61,38,.25);
}
.step-card h3{font-size:1.05rem;color:var(--ink);font-weight:600;margin-bottom:6px;letter-spacing:-.01em}
.step-card p{font-size:.875rem;color:var(--muted);line-height:1.6}

.split-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:34px;box-shadow:var(--shadow-sm);
  transition:transform .2s ease,box-shadow .2s ease;
}
.split-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.split-card.dark{background:var(--brand-900);border-color:var(--brand-900);color:#fff}
.split-card.dark h3{color:#fff}
.split-card.dark p,.split-card.dark li{color:#C4D8CB}
.split-card h3{font-size:1.3rem;color:var(--ink);font-weight:700;margin-bottom:8px;letter-spacing:-.01em}
.split-card p{color:var(--muted);line-height:1.6}
.split-card ul{margin:18px 0 24px;display:grid;gap:10px;list-style:none}
.split-card li{font-size:.9rem;color:var(--text);display:flex;gap:10px;align-items:flex-start}
.split-card li .tick{
  flex:none;width:20px;height:20px;border-radius:50%;
  background:var(--brand-100);color:var(--brand-700);
  display:inline-flex;align-items:center;justify-content:center;
  font-size:.7rem;font-weight:700;margin-top:1px;
}
.split-card.dark li .tick{background:rgba(255,255,255,.12);color:#fff}

.principle{
  background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:22px;font-size:.875rem;color:var(--muted);line-height:1.6;
  transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.principle:hover{border-color:var(--brand-200);transform:translateY(-2px);box-shadow:var(--shadow-sm)}
.principle strong{color:var(--ink);display:flex;align-items:center;gap:10px;font-size:.95rem;font-weight:600;margin-bottom:8px}
.principle .ico{
  flex:none;width:34px;height:34px;border-radius:10px;
  background:var(--brand-50);color:var(--brand-700);
  display:inline-flex;align-items:center;justify-content:center;
  font-size:1rem;font-weight:700;
  transition:background .15s ease,color .15s ease;
}
.principle:hover .ico{background:var(--brand-900);color:#fff}

/* CTA band */
.cta-band{
  background:var(--brand-900);color:#fff;
  border-radius:var(--r-xl);padding:52px 40px;text-align:center;
  position:relative;overflow:hidden;
}
.cta-band::before{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:var(--brand-500);
}
.cta-band::after{
  content:"";position:absolute;right:-80px;bottom:-80px;
  width:280px;height:280px;border-radius:50%;
  background:var(--brand-700);opacity:.30;pointer-events:none;
}
.cta-band > *{position:relative;z-index:1}
.cta-band h2{color:#fff;font-size:1.7rem;letter-spacing:-.01em;margin-bottom:10px}
.cta-band p{color:#C4D8CB;margin:0 auto 24px;max-width:520px}

/* ---------- Grid utilities ---------- */
.grid{display:grid;gap:20px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.grid-6{grid-template-columns:repeat(6,minmax(0,1fr))}
@media (max-width:1100px){.grid-5,.grid-6{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:880px){.grid-4,.grid-5,.grid-6{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.grid-2,.grid-3,.grid-4,.grid-5,.grid-6{grid-template-columns:1fr}}

/* ---------- Stat blocks ---------- */
.stat{
  background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:20px;box-shadow:var(--shadow-xs);
  transition:border-color .15s ease,box-shadow .15s ease;
}
.stat:hover{border-color:var(--line-strong);box-shadow:var(--shadow-sm)}
.stat .v{font-size:1.75rem;font-weight:700;letter-spacing:-.02em;color:var(--brand-900);line-height:1}
.stat .l{font-size:.78rem;color:var(--muted);margin-top:8px;font-weight:500;letter-spacing:.01em}
.stat.accent{background:var(--brand-900);border-color:var(--brand-900)}
.stat.accent .v{color:#fff}
.stat.accent .l{color:#9DBFAE}
.stat.accent.brand{background:var(--brand-50);border-color:var(--brand-100)}
.stat.accent.brand .v{color:var(--brand-700)}
.stat.accent.brand .l{color:var(--brand-800)}

/* ---------- Forms ---------- */
.field{margin-bottom:16px}
.field > label,.field > .label{
  display:block;font-size:.85rem;font-weight:600;color:var(--ink);margin-bottom:6px;
}
.field .hint{font-size:.75rem;color:var(--muted);margin-top:5px;line-height:1.5}

.input,.textarea{
  width:100%;padding:11px 14px;
  border:1px solid var(--line);border-radius:var(--r-sm);
  background:#fff;color:var(--ink);
  font-size:.9rem;line-height:1.4;
  outline:none;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.input:hover,.textarea:hover{border-color:var(--line-strong)}
.input:focus,.textarea:focus{
  border-color:var(--brand-500);
  box-shadow:0 0 0 4px rgba(163,230,53,.28);
}
/* ---------- Beautiful native dropdown (every <select class="select">) ----------
   One global upgrade so create-user, filters, job forms, time-logs, worker
   pool, businesses, documents etc. all share the same polished control.
   Native <select> is kept (keyboard, screen-reader, mobile pickers) — only
   the paint changes: custom chevron, semibold value, soft shadow. */
.select{
  width:100%;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  padding:11px 38px 11px 14px;
  border:1px solid var(--line);border-radius:var(--r-sm);
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px;
  color:var(--ink);
  font-size:.9rem;font-weight:600;line-height:1.4;
  outline:none;cursor:pointer;
  box-shadow:var(--shadow-xs);
  transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;
  text-overflow:ellipsis;white-space:nowrap;overflow:hidden;
}
.select::-ms-expand{display:none}
.select:hover{border-color:var(--line-strong);background-color:var(--bg-elevated)}
.select:focus{
  border-color:var(--brand-600);
  box-shadow:0 0 0 4px rgba(163,230,53,.28);
  background-color:#fff;
}
.select:disabled{opacity:.55;cursor:not-allowed;background-color:var(--bg-soft)}
.select option{font-weight:500;color:var(--ink);background:#fff;padding:8px}
.select option:checked{font-weight:700}
/* Compact selects inside table cells / filter bars stay tidy */
.table .select{padding:8px 32px 8px 12px;font-size:.83rem;border-radius:10px}
.filters .select{width:auto;flex:1 1 160px}
.textarea{resize:vertical;min-height:96px}
.input.is-invalid,.select.is-invalid,.textarea.is-invalid{border-color:var(--danger);box-shadow:0 0 0 4px rgba(220,38,38,.10)}
.field-error{font-size:.78rem;color:var(--danger);margin-top:5px}

/* ---------- Password visibility toggle ----------
   .pw-wrap positions an eye button INSIDE the field (right edge).
   One shared component — every password input on login, apply,
   reset, change and settings uses this, toggled globally by app.js.
   Solid colours only, no gradient. */
.pw-wrap{position:relative}
.pw-wrap .input{padding-right:44px}
.pw-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:8px;
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--faint);background:transparent;border:0;cursor:pointer;flex:none;
  transition:background .12s ease,color .12s ease;
}
.pw-toggle:hover{background:var(--bg-soft);color:var(--brand-700)}
.pw-toggle:focus-visible{outline:2px solid var(--brand-500);outline-offset:1px}
.pw-toggle svg{width:18px;height:18px;display:block}
.pw-toggle[aria-pressed="true"]{color:var(--brand-700)}

.form-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:32px;box-shadow:var(--shadow-sm);
}
.form-card.compact{padding:24px}

/* Auth screens */
.auth-wrap{max-width:460px;margin:48px auto;padding:0 20px}
.auth-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-xl);
  padding:40px 36px;box-shadow:var(--shadow);
}
.auth-logo{display:flex;justify-content:center;margin-bottom:18px}
.auth-logo img{width:56px;height:56px;object-fit:contain}
.auth-card h1{font-size:1.5rem;text-align:center;color:var(--ink);letter-spacing:-.02em;font-weight:700}
.auth-card .sub{text-align:center;color:var(--muted);font-size:.9rem;margin:6px 0 24px}
.auth-alt{text-align:center;margin-top:18px;font-size:.85rem;color:var(--muted)}
.auth-alt a{color:var(--brand-700);font-weight:600}
.auth-alt a:hover{text-decoration:underline}

.auth-shell{
  min-height:calc(100vh - var(--header-h));
  display:flex;align-items:center;justify-content:center;
  padding:48px 20px;
  background-color:var(--bg);
  position:relative;
  overflow:hidden;
}
/* Solid decorative shape behind the auth card. */
.auth-shell::before{
  content:"";position:absolute;
  top:-80px;left:-80px;width:280px;height:280px;border-radius:50%;
  background:var(--brand-50);
  pointer-events:none;
}
.auth-shell::after{
  content:"";position:absolute;
  bottom:-80px;right:-80px;width:240px;height:240px;border-radius:50%;
  background:var(--brand-50);
  pointer-events:none;
}
.auth-shell > *{position:relative;z-index:1}

/* ---------- Tables ---------- */
.table-wrap{
  background:#fff;border:1px solid var(--line);border-radius:var(--r);
  overflow-x:auto;
}
table.table{width:100%;border-collapse:separate;border-spacing:0;font-size:.875rem;min-width:560px}
.table thead th{
  text-align:left;font-size:.7rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;
  color:var(--muted);background:var(--bg-soft);
  padding:12px 16px;border-bottom:1px solid var(--line);
  white-space:nowrap;position:sticky;top:0;
}
.table tbody td{padding:14px 16px;border-bottom:1px solid var(--line-soft);vertical-align:middle;color:var(--text)}
.table tbody tr:last-child td{border-bottom:0}
.table tbody tr{transition:background .12s ease}
.table tbody tr:hover{background:#FAFCFB}
.table tbody tr.is-fading{opacity:.35;pointer-events:none;transition:opacity .3s ease}
.table .cell-num{font-variant-numeric:tabular-nums;text-align:right}

/* Inline compact list rows (used in worker pool, etc.) */
.list-rows{display:flex;flex-direction:column;gap:10px}
.list-row{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:16px 18px;box-shadow:var(--shadow-xs);
  transition:border-color .15s ease,box-shadow .15s ease;
}
.list-row:hover{border-color:var(--line-strong);box-shadow:var(--shadow-sm)}
.list-row.is-fading{opacity:.35;pointer-events:none;transition:opacity .3s ease}
.list-row .body strong{display:block;font-size:.95rem;color:var(--ink);font-weight:600}
.list-row .body .meta{font-size:.8rem;color:var(--muted);margin-top:2px}
.list-row .actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* ---------- Badges / pills ---------- */
.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:3px 10px;border-radius:var(--r-pill);
  font-size:.7rem;font-weight:700;letter-spacing:.02em;
  border:1px solid transparent;white-space:nowrap;
}
.badge .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.b-green{background:var(--brand-50);color:var(--brand-700);border-color:var(--brand-100)}
.b-dark{background:var(--brand-900);color:#fff}
.b-red{background:var(--danger-bg);color:var(--danger);border-color:var(--danger-border)}
.b-amber{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-border)}
.b-grey{background:var(--bg-soft);color:var(--muted);border-color:var(--line)}
.b-info{background:var(--info-bg);color:var(--info);border-color:var(--info-border)}
.b-solid{background:var(--brand-700);color:#fff}

/* ---------- Notice / flash ---------- */
.notice{
  border:1px solid var(--line);border-radius:var(--r);
  padding:14px 16px;font-size:.875rem;background:var(--bg-soft);color:var(--muted);
  display:flex;gap:12px;align-items:flex-start;
}
.notice .ico{flex:none;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:.78rem;color:#fff;background:var(--muted)}
.notice.green{background:var(--brand-50);border-color:var(--brand-100);color:var(--brand-900)}
.notice.green .ico{background:var(--brand-700)}
.notice.red{background:var(--danger-bg);border-color:var(--danger-border);color:#7F1D1D}
.notice.red .ico{background:var(--danger)}
.notice.warn{background:var(--warn-bg);border-color:var(--warn-border);color:#78350F}
.notice.warn .ico{background:var(--warn)}

.flash{
  background:var(--brand-50);border:1px solid var(--brand-100);color:var(--brand-900);
  padding:12px 16px;border-radius:var(--r);margin-bottom:18px;font-size:.875rem;font-weight:500;
  display:flex;gap:10px;align-items:center;
}
.flash .ico{flex:none;width:22px;height:22px;border-radius:50%;background:var(--brand-700);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}

/* ---------- Empty state ---------- */
.empty{
  padding:40px 24px;text-align:center;color:var(--muted);
  border:1px dashed var(--line);border-radius:var(--r);
  background:var(--bg-soft);font-size:.9rem;
}
.empty strong{display:block;color:var(--ink);font-weight:600;margin-bottom:4px}
.empty .ico{
  width:42px;height:42px;border-radius:50%;
  background:#fff;border:1px solid var(--line);
  color:var(--faint);
  display:inline-flex;align-items:center;justify-content:center;
  margin:0 auto 12px;font-size:1.1rem;
}

/* ---------- Toaster ----------
   Floating notifications, top-right, stacked. Each toast is a white
   card with a coloured left rail, icon, title, message, and close.
   Slides in from the right, fades out. */
#toastBox{
  position:fixed;top:84px;right:20px;z-index:200;
  display:flex;flex-direction:column;gap:10px;
  width:min(380px,calc(100vw - 40px));
  pointer-events:none;
}
.toast{
  pointer-events:auto;
  display:flex;gap:12px;align-items:flex-start;
  background:#fff;
  border:1px solid var(--line);
  border-left:4px solid var(--brand-700);
  border-radius:var(--r);
  padding:14px 14px 14px 16px;
  box-shadow:var(--shadow-lg);
  font-size:.875rem;line-height:1.5;
  animation:toast-in .25s cubic-bezier(.2,.7,.2,1);
  position:relative;
}
.toast .t-ico{
  flex:none;width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--brand-700);color:#fff;font-weight:700;font-size:.85rem;
}
.toast .t-body{flex:1;min-width:0;padding-top:2px}
.toast .t-body b{
  display:block;font-size:.875rem;color:var(--ink);font-weight:600;letter-spacing:-.01em;
  margin-bottom:2px;
}
.toast .t-body span{color:var(--muted);font-size:.8125rem;line-height:1.5}
.toast .t-close{
  flex:none;width:24px;height:24px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;
  color:var(--faint);background:transparent;border:0;
  cursor:pointer;transition:background .12s ease,color .12s ease;
}
.toast .t-close:hover{background:var(--bg-soft);color:var(--ink)}
.toast .t-close svg{width:14px;height:14px}

.toast.success{border-left-color:var(--brand-500)}
.toast.success .t-ico{background:var(--brand-500);color:var(--brand-950)}
.toast.success .t-body b{color:var(--brand-900)}

.toast.error{border-left-color:var(--danger)}
.toast.error .t-ico{background:var(--danger);color:#fff}
.toast.error .t-body b{color:var(--danger)}

.toast.warn{border-left-color:var(--warn)}
.toast.warn .t-ico{background:var(--warn);color:#fff}
.toast.warn .t-body b{color:var(--warn)}

.toast.info{border-left-color:var(--info)}
.toast.info .t-ico{background:var(--info);color:#fff}
.toast.info .t-body b{color:var(--info)}

.toast .t-progress{
  position:absolute;left:0;right:0;bottom:0;height:3px;
  background:currentColor;opacity:.25;border-bottom-left-radius:var(--r);border-bottom-right-radius:var(--r);
  transform-origin:left center;animation:toast-progress 4.2s linear forwards;
}
.toast.success .t-progress{color:var(--brand-500)}
.toast.error .t-progress{color:var(--danger)}
.toast.warn .t-progress{color:var(--warn)}
.toast.info .t-progress{color:var(--info)}

.toast.is-leaving{animation:toast-out .25s ease forwards}
@keyframes toast-in{
  from{opacity:0;transform:translateX(20px)}
  to{opacity:1;transform:none}
}
@keyframes toast-out{
  to{opacity:0;transform:translateX(20px)}
}
@keyframes toast-progress{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* ---------- App shell (logged-in) ---------- */
.app-topbar{
  position:sticky;top:0;z-index:60;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.app-topbar .top-inner{
  height:var(--header-h);
  display:flex;align-items:center;justify-content:space-between;gap:14px;
}
.app-brand{display:flex;align-items:center;gap:11px;color:var(--brand-900);font-weight:700;text-decoration:none}
.app-brand .brand-mark{width:42px;height:42px;border-radius:13px}
.app-brand .brand-mark img{width:29px;height:29px}
.app-brand .name{display:flex;flex-direction:column;line-height:1.1;justify-content:center}
.app-brand .name b{
  display:inline-flex;align-items:center;gap:6px;
  font-family:"Sora","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:1.18rem;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--brand-900);
}
.app-brand .name b .brand-teep{color:var(--brand-900);}
.app-brand .name b .brand-work{
  color:var(--brand-700);background:none;
  padding:0;border-radius:0;
}
.app-brand .name .tagline{display:block;margin-top:4px;padding:0;line-height:1;border:0;font-size:.56rem;font-weight:700;letter-spacing:1.8px;color:var(--muted);text-transform:uppercase;white-space:nowrap}
.app-brand .name .tagline span{font-family:"Inter",sans-serif;font-size:.56rem;font-weight:700;letter-spacing:1.8px;color:var(--muted);text-transform:uppercase;white-space:nowrap}
.role-pill{
  font-size:.66rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;
  background:var(--brand-50);color:var(--brand-700);
  border:1px solid var(--brand-100);
  padding:4px 10px;border-radius:var(--r-pill);
}
.top-right{display:flex;align-items:center;gap:12px;min-width:0}
/* ---------- Identity chip (logged-in topbar) ---------- */
.user-chip-wrap{position:relative;flex:none}
.user-chip{
  display:flex;align-items:center;justify-content:center;
  padding:4px;border-radius:50%;
  border:1px solid var(--line);background:#fff;color:var(--ink);
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.user-chip:hover{border-color:var(--brand-300);background:var(--brand-50);box-shadow:var(--shadow-sm)}
.user-chip .avatar{
  width:32px;height:32px;border-radius:50%;flex:none;overflow:hidden;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brand-900);
  color:#fff;font-size:.78rem;font-weight:700;letter-spacing:.02em;
}
.user-chip .avatar img{width:100%;height:100%;object-fit:cover;display:block}
.user-menu{
  position:absolute;top:calc(100% + 10px);right:0;width:264px;max-width:calc(100vw - 32px);
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow-lg);display:none;overflow:hidden;z-index:70;
  transform-origin:top right;
}
.user-menu.open{display:block;animation:slideDown .18s ease}
.um-head{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;background:var(--brand-50);border-bottom:1px solid var(--line-soft);
}
.um-head .avatar{
  width:42px;height:42px;border-radius:50%;flex:none;overflow:hidden;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brand-900);
  color:#fff;font-size:1rem;font-weight:700;
}
.um-head .avatar img{width:100%;height:100%;object-fit:cover;display:block}
.um-id{display:flex;flex-direction:column;min-width:0}
.um-name{font-size:.92rem;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.um-email{font-size:.75rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.um-links{padding:8px;display:flex;flex-direction:column;gap:2px}
.um-links a{
  display:flex;align-items:center;gap:11px;
  padding:10px 12px;border-radius:9px;
  font-size:.87rem;font-weight:500;color:var(--text);
  transition:background .12s ease,color .12s ease;
}
.um-links a:hover{background:var(--bg-soft);color:var(--brand-900)}
.um-links a .ico{flex:none;width:20px;text-align:center;color:var(--muted);font-weight:600}
.um-links a:hover .ico{color:var(--brand-700)}
.um-links a.danger{color:var(--danger)}
.um-links a.danger .ico{color:var(--danger)}
.um-links a.danger:hover{background:var(--danger-bg)}
.um-links .badge{margin-left:2px}
@media (max-width:640px){
  .top-right{gap:6px}
}
@media (max-width:640px){
  .app-brand .name .tagline{display:none}
  .role-pill{font-size:.6rem;padding:3px 8px;letter-spacing:.8px}
  .top-right{gap:6px}
}
@media (max-width:380px){
  .role-pill{display:none}
}
.top-actions{display:flex;align-items:center;gap:8px}
.icon-btn{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:10px;
  border:1px solid var(--line);background:#fff;color:var(--ink);
  transition:border-color .15s ease,background .15s ease;
}
.icon-btn:hover{border-color:var(--brand-300);background:var(--brand-50);color:var(--brand-700)}
.icon-btn svg{width:18px;height:18px}
.count-badge{
  position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;
  border-radius:var(--r-pill);background:var(--brand-700);color:#fff;
  font-size:.66rem;font-weight:700;display:flex;align-items:center;justify-content:center;
  border:2px solid #fff;
}

.app-layout{
  display:grid;grid-template-columns:260px minmax(0,1fr);
  gap:24px;align-items:start;
  padding:28px 24px 56px;max-width:var(--shell-w);margin:0 auto;
  flex:1;width:100%;
}
/* Sidebar toggle only on mobile — desktop always shows the sidebar. */
#sideToggle{display:none}
@media (max-width:980px){#sideToggle{display:inline-flex}}
.sidebar{
  position:sticky;top:calc(var(--header-h) + 24px);
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:14px 12px;box-shadow:var(--shadow-xs);
}
.sidebar .sidebar-head{display:none}
.sidebar .side-label{
  font-size:.66rem;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;
  color:var(--faint);padding:14px 12px 8px;
}
.sidebar nav a{
  display:flex;align-items:center;gap:11px;
  padding:10px 12px;border-radius:9px;
  font-size:.875rem;font-weight:500;color:var(--text);
  transition:background .12s ease,color .12s ease;
  margin-bottom:2px;
}
.sidebar nav a:hover{background:var(--bg-soft);color:var(--brand-900)}
.sidebar nav a.active{background:var(--brand-900);color:#fff;font-weight:600}
.sidebar nav a.active .ico{color:#fff}
.sidebar nav a .ico{flex:none;width:20px;text-align:center;color:var(--muted);font-weight:600}
.sidebar nav a:hover .ico{color:var(--brand-700)}
.sidebar .logout-link{color:var(--danger)!important}
.sidebar .logout-link:hover{background:var(--danger-bg)!important;color:var(--danger)!important}
.sidebar .logout-link:hover .ico{color:var(--danger)!important}

.page{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:32px;box-shadow:var(--shadow-xs);min-width:0;
}

/* Mobile drawer — slides in from the left, mirrors the public menu. */
.sidebar-backdrop{
  display:none;
}
@media (max-width:980px){
  .app-layout{grid-template-columns:1fr;padding:20px 16px 40px;position:relative}
  .page{padding:22px}

  .sidebar{
    position:fixed;
    top:0;left:0;bottom:0;
    width:300px;max-width:86vw;
    height:100dvh;
    z-index:90;
    border-radius:0;
    border-right:1px solid var(--line);
    border-top:0;border-bottom:0;border-left:0;
    box-shadow:20px 0 60px rgba(5,46,22,.18);
    padding:0;
    transform:translateX(-100%);
    transition:transform .36s cubic-bezier(.22,.61,.36,1),visibility 0s .36s;
    visibility:hidden;pointer-events:none;
    display:flex;flex-direction:column;
    overflow:hidden;
  }
  .sidebar.is-open{
    transform:translateX(0);
    visibility:visible;pointer-events:auto;
    transition:transform .36s cubic-bezier(.22,.61,.36,1),visibility 0s 0s;
  }
  .sidebar .sidebar-head{
    display:flex;align-items:center;justify-content:space-between;
    padding:14px 16px;
    border-bottom:1px solid var(--line-soft);
    background:#fff;
    flex:none;
  }
  .sidebar .sidebar-head .mini-brand{
    display:inline-flex;align-items:center;gap:10px;
    color:var(--brand-900);font-weight:700;
  }
  .sidebar .sidebar-head .mini-brand img{
    width:32px;height:32px;object-fit:contain;border-radius:9px;
    background:#fff;border:1px solid var(--line-soft);
  }
  .sidebar .sidebar-head .mini-brand b{
    font-size:.92rem;letter-spacing:-.01em;color:var(--ink);
  }
  .sidebar-close{
    width:36px;height:36px;border-radius:10px;
    display:inline-flex;align-items:center;justify-content:center;
    border:1px solid var(--line);background:#fff;color:var(--ink);
    transition:background .15s ease,border-color .15s ease,color .15s ease;
  }
  .sidebar-close:hover{background:var(--brand-50);border-color:var(--brand-300);color:var(--brand-700)}
  .sidebar-close svg{width:16px;height:16px}
  .sidebar .sidebar-body{
    display:block;
    flex:1;overflow-y:auto;
    padding:8px 12px 20px;
  }
  .sidebar .sidebar-body .side-label:first-child{padding-top:14px}

  .sidebar-backdrop{
    display:block;
    position:fixed;inset:0;
    background:rgba(5,46,22,.42);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
    z-index:85;
    opacity:0;visibility:hidden;
    transition:opacity .28s ease,visibility 0s .28s;
  }
  .sidebar-backdrop.is-open{
    opacity:1;visibility:visible;
    transition:opacity .28s ease,visibility 0s 0s;
  }
  body.menu-open{overflow:hidden}
}

/* ---------- Page head ---------- */
.page-head{margin-bottom:24px}
.page-head h1{font-size:1.65rem;letter-spacing:-.02em;color:var(--ink);font-weight:700;line-height:1.15}
.page-head p{color:var(--muted);font-size:.95rem;margin-top:8px;max-width:680px;line-height:1.6}

/* ---------- Footer ---------- */
.site-footer{
  background:var(--brand-950);color:#C4D8CB;
  position:relative;overflow:hidden;
  border-top:3px solid var(--brand-500);
}
.site-footer::before{
  content:"";position:absolute;inset:0;opacity:.5;pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><circle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.05)'/></svg>");
  background-size:24px 24px;
}
.site-footer > *{position:relative;z-index:1}
.footer-grid{
  display:grid;grid-template-columns:1.5fr 1fr 1fr 1.1fr;gap:48px;
  padding:64px 24px 44px;
}
@media (max-width:880px){.footer-grid{grid-template-columns:1fr 1fr;gap:32px}}
@media (max-width:540px){
  .footer-grid{grid-template-columns:1fr 1fr;gap:24px 20px;padding:48px 20px 32px}
  .footer-brand{grid-column:1/-1;max-width:none}
  .footer-col:last-child{grid-column:1/-1}
  .footer-col a{font-size:.82rem;padding:5px 0}
  .footer-col h4{margin-bottom:10px}
}
.footer-brand{display:flex;flex-direction:column;gap:16px;max-width:320px}
.footer-brand .logo{display:inline-flex;align-items:center;gap:12px;color:#fff;font-weight:800;font-size:1.28rem;letter-spacing:-.03em}
.footer-brand .logo .brand-mark{width:46px;height:46px;border-radius:14px;border-color:rgba(255,255,255,.16);box-shadow:none}
.footer-brand .logo .f-teep{color:#fff}
.footer-brand .logo .f-work{color:var(--brand-500)}
.footer-brand .logo .f-sep{width:6px;height:6px;border-radius:50%;background:var(--brand-500);flex:none}
.footer-brand p{font-size:.875rem;color:#9DBFAE;line-height:1.65}
.footer-brand .f-tag{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.68rem;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;
  color:var(--brand-500);
}
.footer-brand .f-tag::before{content:"";width:22px;height:2px;border-radius:99px;background:var(--brand-500)}
.footer-col h4{
  font-size:.7rem;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;
  color:#fff;margin-bottom:6px;
}
.footer-col h4::after{
  content:"";display:block;width:26px;height:3px;border-radius:99px;
  background:var(--brand-500);margin-top:10px;margin-bottom:10px;
}
.footer-col a{
  display:flex;align-items:center;gap:8px;
  font-size:.875rem;color:#C4D8CB;
  padding:7px 0;transition:color .12s ease,transform .12s ease;
}
.footer-col a:hover{color:#fff;transform:translateX(3px)}
.footer-col a:hover .ico{color:var(--brand-500)}
.footer-col .ico{flex:none;width:18px;height:18px;color:#7FA892}
.footer-contact-card{
  display:flex;flex-direction:column;gap:10px;margin-top:4px;
}
.footer-contact-card a{
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;padding:10px 12px;transform:none;
}
.footer-contact-card a:hover{background:rgba(255,255,255,.09);transform:none}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.10);
  padding:20px 24px;font-size:.8rem;color:#9DBFAE;
}
.footer-bottom .row{max-width:var(--content-w);margin:0 auto;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:0;align-items:center}
.footer-bottom a{color:#C4D8CB;font-weight:600}
.footer-bottom a:hover{color:var(--brand-500)}
.footer-legal{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}
.footer-legal i{width:3px;height:3px;border-radius:50%;background:#5C7A68;font-style:normal}

/* Compact footer (app shell) */
.app-footer{
  border-top:1px solid var(--line);background:#fff;
  padding:16px 24px;font-size:.8rem;color:var(--muted);
  border-bottom:3px solid var(--brand-500);
}
.app-footer .row{max-width:var(--shell-w);margin:0 auto;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center;padding:0}
.app-footer a{color:var(--brand-700);font-weight:600}
.app-footer a:hover{text-decoration:underline}

/* ---------- Filters bar ---------- */
.filters{
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;
  background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:12px;margin-bottom:18px;box-shadow:var(--shadow-xs);
}
.filters .select,.filters .input{min-width:160px}

/* ---------- Tabs ---------- */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:18px}
.tabs a{
  padding:10px 14px;font-size:.875rem;font-weight:600;color:var(--muted);
  border-bottom:2px solid transparent;margin-bottom:-1px;
  transition:color .12s ease,border-color .12s ease;
}
.tabs a:hover{color:var(--ink)}
.tabs a.active{color:var(--brand-700);border-color:var(--brand-700)}

/* ---------- Inline form layout ---------- */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid .span-2{grid-column:1/-1}
@media (max-width:640px){.form-grid{grid-template-columns:1fr}}

/* ---------- Progress bar ---------- */
.progress{
  background:var(--bg-soft);border-radius:99px;height:8px;overflow:hidden;
  border:1px solid var(--line-soft);
}
.progress > span{
  display:block;height:100%;
  background:var(--brand-500);
  border-radius:99px;
  transition:width .4s ease;
}

/* ---------- Misc ---------- */
.kv{font-size:.875rem;color:var(--muted);margin-top:8px;display:grid;gap:6px}
.kv > div{display:flex;justify-content:space-between;gap:12px}
.kv strong{color:var(--ink);font-weight:600}

.embed-video{
  position:relative;padding-bottom:56.25%;height:0;overflow:hidden;
  border-radius:var(--r);margin:14px 0;border:1px solid var(--line);background:#000;
}
.embed-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.embed-video img.placeholder{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

canvas{max-width:100%}

.spinner{
  width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;
  border-radius:50%;display:inline-block;animation:spin .7s linear infinite;vertical-align:-2px;
}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes slideDown{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* Inline messages next to a button */
.inline-msg{font-size:.8125rem;font-weight:500}
.inline-msg.ok{color:var(--brand-700)}
.inline-msg.err{color:var(--danger)}
.inline-msg.warn{color:var(--warn)}

/* ---------- Notification dropdown (top-bar bell) ---------- */
.notif-wrapper{position:relative}
.notif-dropdown{
  position:absolute;top:calc(100% + 10px);right:0;
  width:400px;max-width:calc(100vw - 32px);
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow-lg);
  display:none;flex-direction:column;
  max-height:520px;overflow:hidden;
  transform-origin:top right;
  z-index:70;                  /* above the sticky topbar (z:60) */
}
.notif-dropdown.open{display:flex;animation:slideDown .18s ease}
.notif-dropdown::before{
  content:"";position:absolute;top:-7px;right:14px;width:14px;height:14px;
  background:#fff;border-top:1px solid var(--line);border-left:1px solid var(--line);
  transform:rotate(45deg);
}
.notif-dropdown-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:14px 16px;border-bottom:1px solid var(--line-soft);
  background:#fff;position:sticky;top:0;z-index:1;
}
.notif-dropdown-header strong{
  font-size:.95rem;color:var(--ink);font-weight:600;letter-spacing:-.01em;
}
.notif-dropdown-list{flex:1;overflow-y:auto;max-height:380px}
.notif-dropdown-item{
  display:flex;flex-direction:column;gap:4px;
  padding:13px 16px;border-bottom:1px solid var(--line-soft);
  color:var(--ink);transition:background .12s ease;
}
.notif-dropdown-item:last-child{border-bottom:0}
.notif-dropdown-item:hover{background:var(--bg-soft)}
.notif-dropdown-item.unread{background:var(--brand-50)}
.notif-dropdown-item.unread::before{
  content:"";display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--brand-500);margin-right:8px;flex:none;
}
.notif-dropdown-item .msg{
  font-size:.875rem;line-height:1.5;color:var(--ink);
  display:flex;align-items:flex-start;gap:0;
}
.notif-dropdown-item.unread .msg{font-weight:600}
.notif-dropdown-item .when{font-size:.72rem;color:var(--muted);letter-spacing:.01em;padding-left:14px}
.notif-empty{padding:36px 20px;text-align:center;color:var(--muted);font-size:.875rem}
.notif-empty .ico{
  width:40px;height:40px;border-radius:50%;
  background:var(--bg-soft);border:1px solid var(--line);
  display:inline-flex;align-items:center;justify-content:center;
  margin:0 auto 10px;color:var(--faint);
}
.notif-dropdown-footer{padding:10px 12px;border-top:1px solid var(--line-soft);background:#fff}
/* First-principles mobile fix:
   The bell is NOT at the right edge of the viewport on phones — the
   hamburger + logout buttons sit to its right, so `right:0` of the
   wrapper pushes the dropdown's left side off-screen when its width
   exceeds the distance from the bell to the viewport edge.
   Switch to viewport-fixed anchoring on mobile so the popover respects
   the screen edges regardless of where the bell lives in the topbar.
   Drop the arrow on mobile: the dropdown is now near-full-width, so an
   arrow pointing at the bell looks misplaced and just adds noise. */
@media (max-width:640px){
  .notif-dropdown{
    position:fixed;
    top:calc(var(--header-h) + 6px);
    right:8px;
    left:auto;
    width:calc(100vw - 16px);
    max-width:400px;
    max-height:min(70vh,520px);
    border-radius:var(--r-md);
    /* Slide-down animation should originate from the bell, not the
       fixed top-right corner — pull the origin over so the animation
       feels like it pops out of the button. */
    transform-origin:top right;
  }
  .notif-dropdown::before{display:none}
  .notif-dropdown-header{padding:12px 14px;flex-wrap:wrap;gap:8px}
  .notif-dropdown-header strong{font-size:.9rem}
  .notif-dropdown-header .btn{padding:6px 10px;font-size:.72rem}
  .notif-dropdown-list{max-height:none}
  .notif-dropdown-item{padding:11px 14px;gap:3px}
  .notif-dropdown-item .msg{font-size:.84rem;line-height:1.45}
  .notif-dropdown-item .when{font-size:.68rem;padding-left:0}
  .notif-empty{padding:28px 16px;font-size:.82rem}
  .notif-empty .ico{width:36px;height:36px}
  .notif-dropdown-footer{padding:9px 10px}
  .notif-dropdown-footer .btn{padding:8px 12px;font-size:.78rem}
}
/* Very narrow phones: tighten the gutter so the dropdown has a touch
   more breathing room next to the screen edge. */
@media (max-width:380px){
  .notif-dropdown{
    right:6px;
    width:calc(100vw - 12px);
  }
}

/* ---------- Notification list ---------- */
.notif-list{display:flex;flex-direction:column;gap:8px;max-width:680px}
.notif-item{
  display:flex;flex-direction:column;gap:4px;
  padding:14px 16px;border:1px solid var(--line);border-radius:var(--r);
  background:#fff;box-shadow:var(--shadow-xs);
  transition:border-color .15s ease,box-shadow .15s ease;
}
.notif-item:hover{border-color:var(--line-strong);box-shadow:var(--shadow-sm)}
.notif-item.unread{background:var(--brand-50);border-color:var(--brand-100)}
.notif-item .msg{font-size:.9rem;color:var(--ink);line-height:1.5}
.notif-item .when{font-size:.72rem;color:var(--muted);letter-spacing:.02em}

/* ---------- Wallet ---------- */
.wallet-card{
  background:var(--brand-900);color:#fff;
  border-radius:var(--r-lg);
  padding:24px;box-shadow:var(--shadow);
  position:relative;overflow:hidden;
}
.wallet-card::before{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:var(--brand-500);
}
.wallet-card::after{
  content:"";position:absolute;right:-60px;bottom:-60px;
  width:200px;height:200px;border-radius:50%;
  background:var(--brand-700);opacity:.30;pointer-events:none;
}
.wallet-card > *{position:relative;z-index:1}
.wallet-card .label{font-size:.78rem;color:#9DBFAE;letter-spacing:.02em;margin-bottom:8px}
.wallet-card .amount{font-size:2.4rem;font-weight:700;letter-spacing:-.02em;color:#fff}
.wallet-card .sub{font-size:.8rem;color:#9DBFAE;margin-top:6px}

/* ---------- Time clock ----------
   Modern two-column layout: the big live ring + timer on the left, the
   assignment picker / active-session details / history strip on the right.
   No dropdown — assignments are shown as tappable cards so workers can see
   estimate, deadline and how much they've already logged at a glance. */
.clock-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:28px;box-shadow:var(--shadow-sm);max-width:440px;
}
.clock-card .timer{
  font-size:2.5rem;font-weight:700;letter-spacing:-.02em;color:var(--ink);
  font-variant-numeric:tabular-nums;line-height:1;margin:8px 0 16px;
}
.clock-card .label{font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600}
.clock-card .clocked-since{font-size:1rem;color:var(--brand-700);font-weight:600;margin-bottom:6px}

.tc-grid{
  display:grid;grid-template-columns:minmax(0,380px) minmax(0,1fr);
  gap:24px;align-items:flex-start;
}
@media (max-width:880px){ .tc-grid{grid-template-columns:1fr} }

/* Stage = the big live display when a session is active. */
.tc-stage{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-xl);
  padding:28px 24px 24px;box-shadow:var(--shadow-sm);
  position:relative;overflow:hidden;
}
.tc-stage-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-bottom:18px;
}
.tc-stage-head .tc-status{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;
  color:var(--brand-700);
}
.tc-pulse{
  width:10px;height:10px;border-radius:50%;background:var(--brand-500);
  box-shadow:0 0 0 0 rgba(163,230,53,.6);
  animation:tc-pulse 1.6s cubic-bezier(.4,0,.2,1) infinite;
  display:inline-block;flex:none;
}
@keyframes tc-pulse{
  0%  { box-shadow:0 0 0 0 rgba(163,230,53,.55)}
  70% { box-shadow:0 0 0 12px rgba(163,230,53,0)}
  100%{ box-shadow:0 0 0 0 rgba(163,230,53,0)}
}
.tc-stage[data-state="warn"] .tc-status{color:var(--warn)}
.tc-stage[data-state="warn"] .tc-pulse{background:var(--warn);
  animation:tc-pulse-warn 1.6s cubic-bezier(.4,0,.2,1) infinite;}
@keyframes tc-pulse-warn{
  0%  { box-shadow:0 0 0 0 rgba(180,83,9,.55)}
  70% { box-shadow:0 0 0 12px rgba(180,83,9,0)}
  100%{ box-shadow:0 0 0 0 rgba(180,83,9,0)}
}
.tc-stage[data-state="over"] .tc-status{color:var(--danger)}
.tc-stage[data-state="over"] .tc-pulse{background:var(--danger);
  animation:tc-pulse-over 1s cubic-bezier(.4,0,.2,1) infinite;}
@keyframes tc-pulse-over{
  0%  { box-shadow:0 0 0 0 rgba(220,38,38,.6)}
  70% { box-shadow:0 0 0 14px rgba(220,38,38,0)}
  100%{ box-shadow:0 0 0 0 rgba(220,38,38,0)}
}

/* The big circular progress ring. SVG is sized via viewBox so it
   scales fluidly; stroke-dasharray is driven by the JS clock. */
.tc-ring-wrap{
  display:flex;justify-content:center;align-items:center;
  margin:6px 0 14px;
}
.tc-ring{position:relative;width:240px;height:240px}
.tc-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.tc-ring .tc-ring-track{fill:none;stroke:var(--bg-soft);stroke-width:14}
.tc-ring .tc-ring-fill{
  fill:none;stroke:var(--brand-500);stroke-width:14;stroke-linecap:round;
  transition:stroke-dashoffset .35s ease, stroke .25s ease;
}
.tc-stage[data-state="warn"] .tc-ring-fill{stroke:var(--warn)}
.tc-stage[data-state="over"] .tc-ring-fill{stroke:var(--danger)}
.tc-ring-center{
  position:absolute;inset:0;display:flex;flex-direction:column;
  justify-content:center;align-items:center;gap:4px;text-align:center;
}
.tc-ring-center .tc-timer{
  font-size:2.4rem;font-weight:700;letter-spacing:-.03em;color:var(--ink);
  font-variant-numeric:tabular-nums;line-height:1;
}
.tc-ring-center .tc-elapsed-label{
  font-size:.7rem;color:var(--muted);text-transform:uppercase;
  letter-spacing:.08em;font-weight:600;
}
.tc-ring-center .tc-elapsed-pct{
  font-size:.78rem;color:var(--brand-700);font-weight:600;
}
.tc-stage[data-state="warn"] .tc-ring-center .tc-elapsed-pct{color:var(--warn)}
.tc-stage[data-state="over"] .tc-ring-center .tc-elapsed-pct{color:var(--danger)}

.tc-meta{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
  margin-top:14px;
}
.tc-meta .tc-meta-cell{
  background:var(--bg-soft);border:1px solid var(--line-soft);
  border-radius:var(--r);padding:10px 12px;
}
.tc-meta .tc-meta-cell .k{
  font-size:.68rem;color:var(--muted);text-transform:uppercase;
  letter-spacing:.06em;font-weight:600;margin-bottom:4px;
}
.tc-meta .tc-meta-cell .v{
  font-size:.92rem;color:var(--ink);font-weight:600;
  font-variant-numeric:tabular-nums;line-height:1.25;
}

.tc-session-title{
  margin:0 0 4px;font-size:1.05rem;font-weight:600;color:var(--ink);letter-spacing:-.01em;
}
.tc-session-sub{
  font-size:.85rem;color:var(--muted);line-height:1.5;margin-bottom:14px;
}

.tc-actions{
  display:flex;flex-direction:column;gap:10px;margin-top:18px;
}
.tc-actions .row{display:flex;gap:10px}
.tc-actions .row > *{flex:1}
.tc-actions .btn-lg{
  padding:14px 18px;font-size:1rem;font-weight:600;border-radius:var(--r);
}
.tc-idle-banner{
  display:none;align-items:center;gap:10px;
  background:var(--warn-bg);border:1px solid var(--warn-border);
  color:var(--warn);padding:10px 12px;border-radius:var(--r);
  font-size:.82rem;font-weight:500;margin-top:12px;
}
.tc-idle-banner.show{display:flex}
.tc-idle-banner .ico{
  width:22px;height:22px;border-radius:50%;background:var(--warn);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:.78rem;
  flex:none;
}

/* Clocked-in note textarea (collapsible, optional) */
.tc-note-row{margin-top:14px}
.tc-note-row .tc-note-toggle{
  background:none;border:0;padding:0;color:var(--brand-700);
  font-size:.82rem;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
}
.tc-note-row .tc-note-toggle:hover{color:var(--brand-800)}
.tc-note-row .tc-note-box{display:none;margin-top:8px}
.tc-note-row .tc-note-box.show{display:block}
.tc-note-row textarea{min-height:70px;resize:vertical}

/* Right column container for the clocked-OUT picker / "all done" state */
.tc-panel{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:22px;box-shadow:var(--shadow-sm);
}
.tc-panel h2{
  font-size:1.05rem;font-weight:600;color:var(--ink);letter-spacing:-.01em;
  margin:0 0 4px;
}
.tc-panel .tc-panel-sub{
  font-size:.85rem;color:var(--muted);line-height:1.5;margin-bottom:14px;
}

/* Assignment tiles (replacing the dropdown). Each tile is a full row
   that highlights on hover and has a clear primary action. */
.tc-tiles{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.tc-tile{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 16px;border:1px solid var(--line);border-radius:var(--r);
  background:#fff;cursor:pointer;text-align:left;width:100%;
  transition:border-color .15s ease,box-shadow .15s ease,transform .12s ease,background .15s ease;
  font:inherit;color:inherit;
}
.tc-tile:hover{border-color:var(--brand-300);box-shadow:var(--shadow-sm);transform:translateY(-1px)}
.tc-tile.is-selected{
  border-color:var(--brand-700);background:var(--brand-50);
  box-shadow:0 0 0 3px rgba(21,128,61,.12);
}
.tc-tile .tc-tile-body{flex:1;min-width:0}
.tc-tile .tc-tile-title{
  font-size:.95rem;font-weight:600;color:var(--ink);letter-spacing:-.01em;
  display:block;margin-bottom:4px;
}
.tc-tile .tc-tile-meta{
  font-size:.78rem;color:var(--muted);
  display:flex;flex-wrap:wrap;gap:8px 14px;
}
.tc-tile .tc-tile-meta span{display:inline-flex;align-items:center;gap:4px}
.tc-tile .tc-tile-meta b{color:var(--text);font-weight:600}
.tc-tile .tc-tile-radio{
  width:22px;height:22px;border-radius:50%;
  border:1.5px solid var(--line-strong);flex:none;
  display:flex;align-items:center;justify-content:center;
  background:#fff;transition:border-color .15s ease,background .15s ease;
}
.tc-tile.is-selected .tc-tile-radio{border-color:var(--brand-700);background:var(--brand-700)}
.tc-tile.is-selected .tc-tile-radio::after{
  content:"";display:block;width:8px;height:8px;border-radius:50%;background:#fff;
}
.tc-tile[disabled]{cursor:not-allowed;opacity:.5}
.tc-tile[disabled]:hover{transform:none;box-shadow:none;border-color:var(--line)}

.tc-tile-progress{
  margin-top:8px;height:6px;border-radius:99px;background:var(--bg-soft);
  overflow:hidden;border:1px solid var(--line-soft);
}
.tc-tile-progress > i{
  display:block;height:100%;background:var(--brand-500);
  transition:width .25s ease;
}
.tc-tile-progress.warn > i{background:var(--warn)}
.tc-tile-progress.over > i{background:var(--danger)}
.tc-tile-progress .lbl{
  display:block;font-size:.7rem;color:var(--muted);margin-top:6px;
  font-variant-numeric:tabular-nums;
}

/* History strip — last N sessions of this worker */
.tc-history{margin-top:22px}
.tc-history h3{
  font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);font-weight:600;margin:0 0 10px;
}
.tc-history-list{display:flex;flex-direction:column;gap:8px}
.tc-history-item{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);
  background:#fff;
}
.tc-history-item .body{flex:1;min-width:0}
.tc-history-item .body strong{
  display:block;font-size:.88rem;color:var(--ink);font-weight:600;
  margin-bottom:2px;
}
.tc-history-item .body .meta{
  font-size:.74rem;color:var(--muted);font-variant-numeric:tabular-nums;
}
.tc-history-item .dur{
  font-size:.9rem;font-weight:600;color:var(--text);
  font-variant-numeric:tabular-nums;flex:none;
}
.tc-history-item .badge{font-size:.7rem;padding:4px 8px}
.tc-history-empty{
  padding:18px 14px;border:1px dashed var(--line);border-radius:var(--r);
  color:var(--muted);font-size:.85rem;text-align:center;
}

/* Quick session summary shown briefly after clock-out (toast-like card) */
.tc-summary{
  margin-top:14px;padding:12px 14px;border-radius:var(--r);
  background:var(--brand-50);border:1px solid var(--brand-100);
  font-size:.85rem;color:var(--brand-900);
}
.tc-summary b{font-variant-numeric:tabular-nums}

/* Pills for time consumed on the active session, mirrors the wallet pattern */
.tc-stat-row{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
  margin-top:14px;
}
.tc-stat{
  background:var(--bg-soft);border:1px solid var(--line-soft);
  border-radius:var(--r);padding:10px 12px;text-align:center;
}
.tc-stat .k{
  font-size:.66rem;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);font-weight:600;margin-bottom:4px;
}
.tc-stat .v{
  font-size:.95rem;color:var(--ink);font-weight:700;
  font-variant-numeric:tabular-nums;
}

/* Small flag chip beside the timer when estimate is breached */
.tc-flag-chip{
  display:none;align-items:center;gap:6px;
  padding:4px 10px;border-radius:var(--r-pill);
  font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger-border);
}
.tc-flag-chip.show{display:inline-flex}

/* Compact mobile refinements */
@media (max-width:560px){
  .tc-ring{width:200px;height:200px}
  .tc-ring-center .tc-timer{font-size:2rem}
  .tc-meta{grid-template-columns:1fr 1fr}
}

/* ---------- Admin time-logs (live monitor + flagged review) ---------- */
.tlm-tabs{
  display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px;
}
.tlm-tab{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 14px;border-radius:var(--r-pill);
  border:1px solid var(--line);background:#fff;color:var(--muted);
  font-size:.82rem;font-weight:600;cursor:pointer;transition:all .12s ease;
  text-decoration:none;
}
.tlm-tab:hover{border-color:var(--brand-300);color:var(--brand-700)}
.tlm-tab.active{background:var(--brand-900);color:#fff;border-color:var(--brand-900)}
.tlm-tab .count{
  display:inline-flex;min-width:20px;height:20px;padding:0 6px;
  align-items:center;justify-content:center;border-radius:99px;
  background:var(--bg-soft);color:var(--muted);font-size:.7rem;font-weight:700;
}
.tlm-tab.active .count{background:rgba(255,255,255,.18);color:#fff}

.tlm-live-row{
  display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;
  padding:14px 16px;border:1px solid var(--line);border-radius:var(--r);
  background:#fff;box-shadow:var(--shadow-xs);
}
.tlm-live-row[data-state="warn"]{border-color:var(--warn-border);background:var(--warn-bg)}
.tlm-live-row[data-state="over"]{border-color:var(--danger-border);background:var(--danger-bg)}
.tlm-live-avatar{
  width:40px;height:40px;border-radius:50%;background:var(--brand-100);
  color:var(--brand-900);display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.95rem;letter-spacing:-.01em;flex:none;
}
.tlm-live-body strong{
  display:block;font-size:.92rem;color:var(--ink);font-weight:600;margin-bottom:2px;
}
.tlm-live-body .meta{
  font-size:.78rem;color:var(--muted);font-variant-numeric:tabular-nums;
}
.tlm-live-body .meta b{color:var(--text);font-weight:600}
.tlm-live-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.tlm-live-actions .btn{padding:7px 12px;font-size:.78rem}

.tlm-flagged-card{
  border:1px solid var(--line);border-radius:var(--r-lg);
  background:#fff;padding:16px 18px;box-shadow:var(--shadow-xs);
  display:flex;flex-direction:column;gap:12px;
}
.tlm-flagged-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;
}
.tlm-flagged-head .who{
  font-size:.95rem;font-weight:600;color:var(--ink);
}
.tlm-flagged-head .meta{
  font-size:.78rem;color:var(--muted);margin-top:2px;
  font-variant-numeric:tabular-nums;
}
.tlm-flagged-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;
}
.tlm-flagged-grid .cell{
  background:var(--bg-soft);border:1px solid var(--line-soft);
  border-radius:var(--r);padding:8px 10px;
}
.tlm-flagged-grid .cell .k{
  font-size:.66rem;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);font-weight:600;margin-bottom:3px;
}
.tlm-flagged-grid .cell .v{
  font-size:.9rem;color:var(--ink);font-weight:600;
  font-variant-numeric:tabular-nums;
}
.tlm-flagged-reason{
  background:var(--warn-bg);border:1px solid var(--warn-border);
  color:var(--warn);padding:8px 10px;border-radius:var(--r);
  font-size:.82rem;line-height:1.45;
}
.tlm-flagged-actions{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;
  border-top:1px solid var(--line-soft);padding-top:12px;
}
.tlm-flagged-actions input.input{
  flex:1;min-width:200px;padding:8px 10px;font-size:.82rem;
}
.tlm-flagged-actions .btn{padding:8px 12px;font-size:.78rem}

@media (max-width:760px){
  .tlm-live-row{grid-template-columns:1fr;gap:10px}
  .tlm-live-actions{justify-content:flex-start}
  .tlm-flagged-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- Built-in messaging (messages.php) ----------
   v3 visual system: tighter, more aligned layout. Bubbles size
   to their content (no scattered stretching), avatars snap to
   the sender's meta row, the sidebar sticks cleanly, time pills
   carry semantic color + a tiny icon, and the layout collapses
   gracefully across four breakpoints (wide, desktop, tablet,
   mobile). */
.msg-layout{
  display:grid;
  grid-template-columns:minmax(320px,360px) minmax(0,1fr);
  gap:20px;
  align-items:start;
  /* Subtract header (~68px) + page-head + footer breathing room so
     the sidebar fits exactly between header and viewport bottom. */
  min-height:calc(100vh - var(--header-h) - 200px);
}

/* ---------- Sidebar (thread list) ---------- */
.msg-side{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  position:sticky;
  top:calc(var(--header-h) + 24px);
  max-height:calc(100vh - var(--header-h) - 48px);
  min-height:560px;
}
.msg-side-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px 12px;
  border-bottom:1px solid var(--line-soft);
  background:#fff;
  flex:none;
}
.msg-side-head-titles{display:flex;flex-direction:column;gap:2px;min-width:0;}
.msg-side-head h2{
  font-size:1rem;font-weight:700;color:var(--ink);
  margin:0;letter-spacing:-.01em;
}
.msg-side-head-sub{
  display:inline-flex;align-items:center;gap:6px;
  font-size:.72rem;color:var(--muted);font-weight:500;
}
.msg-side-head-dot{
  width:7px;height:7px;border-radius:50%;background:var(--brand-500);
  box-shadow:0 0 0 3px rgba(163,230,53,.25);
  flex:none;
  animation:msg-pulse 1.8s ease-in-out infinite;
}
@keyframes msg-pulse{
  0%,100%{box-shadow:0 0 0 3px rgba(163,230,53,.20)}
  50%   {box-shadow:0 0 0 6px rgba(163,230,53,.05)}
}
.msg-compose-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;border-radius:var(--r-pill);
  background:var(--brand-900);color:#fff;
  font-weight:600;font-size:.78rem;text-decoration:none;flex:none;
  transition:background .12s ease, transform .12s ease, box-shadow .12s ease;
  box-shadow:0 1px 2px rgba(11,61,38,.12);
}
.msg-compose-btn:hover{
  background:var(--brand-800);color:#fff;
  transform:translateY(-1px);
  box-shadow:0 2px 6px rgba(11,61,38,.18);
}
.msg-compose-btn:active{transform:none}
.msg-compose-btn svg{flex:none}

.msg-list{
  overflow-y:auto;
  flex:1;
  padding:6px 0 10px;
  /* Hide scrollbar on Firefox + IE; keep styled on WebKit below. */
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
.msg-list::-webkit-scrollbar{width:8px;}
.msg-list::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:99px;}
.msg-list::-webkit-scrollbar-track{background:transparent;}

.msg-list-empty{
  padding:48px 18px 32px;
  text-align:center;color:var(--muted);
  display:flex;flex-direction:column;align-items:center;gap:8px;
  font-size:.85rem;
}
.msg-list-empty-ico{
  width:56px;height:56px;border-radius:50%;
  background:var(--brand-100);
  border:1px solid var(--brand-200);
  display:flex;align-items:center;justify-content:center;
  font-size:1.4rem;color:var(--brand-700);margin-bottom:4px;
}
.msg-list-empty strong{color:var(--ink);font-weight:600;font-size:.92rem;}
.msg-list-empty span{font-size:.78rem;line-height:1.5;max-width:240px;}

/* Thread row — inbox item */
.msg-thread-row{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 16px;
  text-decoration:none;color:inherit;
  border-bottom:1px solid var(--line-soft);
  transition:background .12s ease;
}
.msg-thread-row::before{
  content:"";
  position:absolute;left:0;top:8px;bottom:8px;width:3px;
  background:transparent;border-radius:0 3px 3px 0;
  transition:background .15s ease;
}
.msg-thread-row:hover{background:var(--bg-soft);}
.msg-thread-row.is-active{background:var(--brand-50);}
.msg-thread-row.is-active::before{background:var(--brand-700);}
.msg-thread-row .av{
  width:42px;height:42px;border-radius:50%;
  background:var(--brand-100);color:var(--brand-900);
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.82rem;flex:none;letter-spacing:-.01em;
  border:2px solid #fff;
  box-shadow:0 0 0 1px var(--line);
}
.msg-thread-row.is-active .av{
  background:var(--brand-700);color:#fff;
  box-shadow:0 0 0 1px var(--brand-700);
}
.msg-thread-row .body{
  flex:1;min-width:0;
  /* Reserve room on the right so the badge never overlaps the preview. */
  padding-right:28px;
}
.msg-row-top{
  display:flex;justify-content:space-between;align-items:center;
  gap:8px;min-width:0;
}
.msg-row-subject{
  font-size:.92rem;color:var(--ink);font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  min-width:0;flex:1;letter-spacing:-.005em;
}
.msg-row-names{
  font-size:.74rem;color:var(--muted);font-weight:500;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  margin-top:3px;
}
.msg-thread-row.has-unread .msg-row-subject{color:var(--brand-900);}
.msg-thread-row.has-unread .msg-row-names{color:var(--text);font-weight:600;}
.msg-row-preview{
  font-size:.78rem;color:var(--muted);
  margin-top:5px;line-height:1.45;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
.msg-row-preview .me{color:var(--brand-700);font-weight:600;margin-right:2px;}
.msg-row-badge{
  position:absolute;
  top:14px;right:14px;
  display:inline-flex;min-width:20px;height:20px;padding:0 6px;
  align-items:center;justify-content:center;border-radius:99px;
  background:var(--brand-900);color:#fff;font-size:.7rem;font-weight:700;
  box-shadow:0 0 0 2px #fff;
  font-variant-numeric:tabular-nums;
}

/* ---------- Main pane ---------- */
.msg-main{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);
  display:flex;flex-direction:column;
  overflow:hidden;
  min-height:560px;
  max-height:calc(100vh - var(--header-h) - 48px);
}
.msg-back-btn{
  display:none;align-items:center;gap:6px;
  padding:6px 10px;border-radius:var(--r-pill);
  background:var(--bg-soft);color:var(--text);
  font-size:.78rem;font-weight:600;text-decoration:none;flex:none;
  border:1px solid var(--line);
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}
.msg-back-btn:hover{background:var(--line-soft);color:var(--ink);border-color:var(--line-strong);}
.msg-back-btn svg{flex:none;}

/* Thread header */
.msg-thread-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:14px 22px;
  border-bottom:1px solid var(--line-soft);
  background:#fff;
  flex:none;
}
.msg-thread-head-body{min-width:0;flex:1;}
.msg-thread-subject{
  font-size:1.08rem;font-weight:600;color:var(--ink);
  letter-spacing:-.01em;margin:0 0 5px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.msg-thread-meta{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  font-size:.78rem;color:var(--muted);
}
.msg-avatar-stack{display:inline-flex;margin-right:4px;flex:none;}
.msg-avatar-stack .av{
  width:24px;height:24px;border-radius:50%;
  background:var(--brand-100);color:var(--brand-900);
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.66rem;
  border:2px solid #fff;
  margin-left:-6px;
  box-shadow:0 0 0 1px var(--line-soft);
}
.msg-avatar-stack .av:first-child{margin-left:0;}
.msg-thread-with{color:var(--text);font-weight:500;}
.msg-thread-dot{color:var(--line-strong);}
.msg-thread-count{color:var(--muted);font-variant-numeric:tabular-nums;}
.msg-thread-actions{display:flex;gap:8px;flex-wrap:wrap;flex:none;}

/* Thread body — grouped bubbles */
.msg-thread-body{
  flex:1 1 auto;
  min-height:0;            /* allow it to shrink when the reply box
                              grows with attachments — otherwise the
                              Send button gets clipped by .msg-main's
                              overflow:hidden */
  overflow-y:auto;
  overflow-x:hidden;
  padding:16px 20px 16px 28px;
  background-color:#ECE5DD;
  display:flex;flex-direction:column;
  gap:10px;
  scroll-behavior:smooth;
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
.msg-thread-body::-webkit-scrollbar{width:10px;}
.msg-thread-body::-webkit-scrollbar-thumb{
  background:var(--line-strong);
  border-radius:99px;
  border:2px solid #ECE5DD;
}
.msg-thread-body::-webkit-scrollbar-thumb:hover{background:var(--muted);}
.msg-thread-body::-webkit-scrollbar-track{background:transparent;}

/* Sticky day-separator inside the scrolling chat area. */
.msg-day-sep{
  display:flex;align-items:center;justify-content:center;
  margin:6px 0 4px;
  position:sticky;
  top:0;
  z-index:2;
  /* Transparent background so the chip "floats" over messages. */
  background:transparent;
  pointer-events:none;
}
.msg-day-sep::before,
.msg-day-sep::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--line-soft);
  max-width:80px;
  opacity:.7;
}
.msg-day-sep::before{margin-right:10px}
.msg-day-sep::after {margin-left:10px}
.msg-day-chip{
  font-size:.7rem;font-weight:600;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;
  background:#fff;
  border:1px solid var(--line);
  padding:4px 12px;border-radius:99px;
  box-shadow:var(--shadow-xs);
  pointer-events:auto;
}

/* ============================================================
   Chat bubbles — WhatsApp-style.
   - Compact box: padding 6px 7px 8px 9px, 7.5px radius, single
     0 1px 1px shadow, NO border, NO min-width, NO extra rows.
   - Time sits INLINE at the end of the last text line
     (float:right) so a short "ok" stays one line and a long
     paragraph wraps around the time — zero wasted height.
   - Tail triangle only on the first bubble of a speaker turn.
   ============================================================ */
.msg-thread-body{
  align-items:stretch;
  gap:10px;
  background-color:#ECE5DD;
}
.msg-group{
  display:flex;
  align-items:flex-end;
  gap:6px;
  width:fit-content;
  max-width:min(590px, 65%);
  min-width:0;
  animation:msg-in .18s ease-out;
}
.msg-group:not(.is-mine){
  align-self:flex-start;
  margin-right:auto;
}
.msg-group.is-mine{
  align-self:flex-end;
  margin-left:auto;
  flex-direction:row-reverse;
}
@keyframes msg-in{
  from{opacity:0;transform:translateY(4px);}
  to  {opacity:1;transform:none;}
}

.msg-avatar{
  width:28px;height:28px;border-radius:50%;
  background:var(--brand-100);color:var(--brand-900);
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.68rem;flex:none;
  border:0;
  box-shadow:0 1px 1px rgba(11,31,20,.18);
  align-self:flex-end;
  margin-bottom:2px;
}
.msg-group.is-mine .msg-avatar{display:none;}

.msg-stack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:2px;
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
}
.msg-meta-head{
  display:flex;align-items:center;gap:6px;
  padding:0 2px 0;
  margin-bottom:1px;
  min-width:0;
  line-height:1.2;
}
.msg-group:not(.is-mine) .msg-meta-head{justify-content:flex-start;}
.msg-group.is-mine .msg-meta-head{justify-content:flex-end;text-align:right;}
.msg-meta-head .msg-sender{
  color:var(--brand-800);font-weight:600;font-size:.78rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:100%;
}
.msg-group.is-mine .msg-meta-head .msg-sender{display:none;}
.msg-first-chip{
  display:inline-flex;align-items:center;
  font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  color:var(--brand-700);
  background:var(--brand-50);border:1px solid var(--brand-100);
  padding:1px 7px;border-radius:99px;
  white-space:nowrap;flex:none;
  line-height:1.5;
}

/* The bubble box — tight, no wasted height. */
.msg-bubble{
  position:relative;
  display:inline-block;
  width:fit-content;
  max-width:100%;
  min-width:0;
  padding:6px 7px 8px 9px;
  border-radius:7.5px;
  border:0;
  font-size:.8875rem;
  line-height:1.35;
  color:#111B21;
  box-shadow:0 1px 1px rgba(11,31,20,.15);
  overflow-wrap:break-word;
  word-wrap:break-word;
  word-break:break-word;
}
.msg-group:not(.is-mine) .msg-bubble{
  align-self:flex-start;
  background:#FFFFFF;
}
.msg-group.is-mine .msg-bubble{
  align-self:flex-end;
  background:#D9FDD3;
}
/* Tails — first bubble of a turn only. */
.msg-group:not(.is-mine) .msg-bubble:first-of-type::before{
  content:"";
  position:absolute;
  top:0;left:-8px;
  width:8px;height:13px;
  background:#FFFFFF;
  clip-path:polygon(0 0, 100% 0, 100% 100%);
}
.msg-group.is-mine .msg-bubble:first-of-type::before{
  content:"";
  position:absolute;
  top:0;right:-8px;
  width:8px;height:13px;
  background:#D9FDD3;
  clip-path:polygon(0 0, 100% 0, 0 100%);
}
.msg-group .msg-bubble.is-continued::before{display:none;}

/* Text is inline so the floated time shares its last line. */
.msg-bubble .msg-text{
  display:inline;
  margin:0;
  padding:0;
  white-space:pre-wrap;
  overflow-wrap:break-word;
  word-wrap:break-word;
  word-break:break-word;
}
/* Legacy block body (if any cached markup) behaves inline too. */
.msg-bubble .msg-body-text{
  display:inline;
  margin:0;padding:0;
  white-space:pre-wrap;
  overflow-wrap:break-word;
  word-break:break-word;
}

/* Inline time — floated right, sits on the last text line.
   margin-top pushes it to the text baseline; NO extra row. */
.msg-bubble-foot{
  display:inline;
  float:right;
  margin:8px 0 0 8px;
  padding:0;
  line-height:1;
  position:relative;
  top:1px;
}
.msg-bubble-foot .msg-time{
  font-size:.6875rem;
  font-weight:400;
  letter-spacing:0;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  cursor:help;
  color:#667781;
  line-height:1;
}
.msg-bubble-foot .msg-time::before{display:none;}

/* Legacy hover-time — never render. */
.msg-bubble-hover-time{display:none !important;}

/* First message marker: no ring (breaks WhatsApp flatness). */
.msg-group.is-first .msg-bubble:first-of-type{box-shadow:0 1px 1px rgba(11,31,20,.15);}

/* ============================================================
   Attachments — WhatsApp-style.
   Images sit flush at the top of the bubble (tiny radius of
   their own); doc cards are soft inset rows. The floated time
   tucks under them on the last line — no extra row height.
   ============================================================ */
.msg-attach-block{display:block;margin:2px 0;min-width:min(180px,100%);}
.msg-attach-img{
  display:block;margin:3px 0 5px;border-radius:6px;overflow:hidden;
  max-width:min(300px,100%);
  background:rgba(0,0,0,.06);
}
.msg-attach-img img{
  display:block;width:100%;height:auto;
  max-height:260px;object-fit:cover;
}
.msg-attach-img + .msg-attach-img{margin-top:5px;}
.msg-attach-doc{
  display:flex;align-items:center;gap:10px;
  margin:4px 0;padding:8px 10px;border-radius:8px;
  background:rgba(0,0,0,.055);color:#111B21;text-decoration:none;
  max-width:min(300px,100%);
  transition:background .12s ease;
}
.msg-attach-doc:hover{background:rgba(0,0,0,.09);}
.msg-group.is-mine .msg-attach-doc{background:rgba(11,61,38,.09);}
.msg-group.is-mine .msg-attach-doc:hover{background:rgba(11,61,38,.14);}
.msg-attach-doc-ico{
  position:relative;flex:none;
  width:40px;height:40px;border-radius:10px;
  background:#fff;color:var(--danger);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 1px 2px rgba(11,31,20,.15);
}
.msg-attach-doc-ico b{
  position:absolute;bottom:-7px;left:50%;transform:translateX(-50%);
  font-size:.55rem;font-weight:800;letter-spacing:.04em;
  background:var(--danger);color:#fff;
  padding:1px 5px;border-radius:99px;line-height:1.4;
  max-width:44px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.msg-attach-doc-meta{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.3;}
.msg-attach-doc-meta b{
  font-size:.82rem;font-weight:600;color:inherit;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.msg-attach-doc-meta span{font-size:.7rem;color:#667781;}
/* Missing-file tile — same footprint as a doc card but polished:
   solid brand tint + landscape icon + filename. Replaces the browser's
   ugly broken-image icon with something on-brand. The diagonal
   stripe in the corner hints that the file is gone without being
   noisy. */
.msg-attach-missing{
  position:relative;overflow:hidden;
  display:flex;align-items:center;gap:10px;
  margin:4px 0;padding:10px 12px;border-radius:10px;
  background:var(--brand-50);
  color:#4A5A52;
  border:1px solid var(--brand-200);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
  max-width:min(300px,100%);
}
.msg-attach-missing::after{
  /* Decorative corner ribbon so the tile reads as "placeholder",
     not "broken". Small enough to stay out of the text area. */
  content:'';position:absolute;top:0;right:0;
  width:46px;height:46px;
  background:var(--brand-100);
  pointer-events:none;
}
.msg-attach-missing .msg-attach-doc-ico{
  background:#fff;
  color:var(--brand-700);
  box-shadow:0 1px 2px rgba(11,31,20,.08), inset 0 0 0 1px rgba(21,128,61,.12);
}
.msg-attach-missing .msg-attach-doc-ico b{
  background:var(--brand-700);
  letter-spacing:.06em;
}
.msg-attach-missing .msg-attach-doc-meta b{color:#2F3F36;font-weight:600;}
.msg-attach-missing .msg-attach-doc-meta span{color:#7A8A82;}
/* "left" tag in the add-people list. */
.msg-was-left{
  font-style:normal;font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  color:var(--warn);background:var(--warn-bg);border:1px solid var(--warn-border);
  padding:1px 6px;border-radius:99px;margin-left:4px;vertical-align:1px;
}
/* Rejoin panel actions. */
.msg-left-actions{display:inline-flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:14px;}

/* ---------- Picker: paperclip button + preview chips ---------- */
.msg-reply-actions{display:inline-flex;align-items:center;gap:8px;flex:none;}
.msg-attach-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:50%;
  background:var(--bg-soft);color:var(--text);
  border:1px solid var(--line);
  transition:background .12s ease,color .12s ease,border-color .12s ease,transform .12s ease;
  flex:none;
}
.msg-attach-btn:hover{background:var(--brand-50);color:var(--brand-900);border-color:var(--brand-300);transform:translateY(-1px);}
.msg-attach-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.msg-attach-note{font-size:.72rem;color:var(--muted);}
.msg-attach-previews{
  display:flex;flex-wrap:wrap;gap:8px;
  padding:10px;border-radius:12px;
  background:var(--bg-soft);border:1px dashed var(--line-strong);
  /* Internal scroll cap: the preview strip must never push the
     textarea + buttons out of view. */
  max-height:150px;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
.msg-attach-previews[hidden]{display:none;}
/* Reply box is short — single-row strip so chips never wrap onto a
   second line and squeeze the textarea / send button below the fold.
   Extra chips scroll horizontally instead of stacking. Tighter cap
   (≈ one chip tall + padding) keeps the controls always visible. */
.msg-reply-wrap .msg-attach-previews{
  max-height:78px;
  padding:6px 8px;
  flex:0 0 auto;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x proximity;
}
.msg-reply-wrap .msg-attach-previews .msg-file-chip{flex:0 0 auto;scroll-snap-align:start;}
.msg-file-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:5px 5px 5px 6px;border-radius:12px;
  background:#fff;border:1px solid var(--line);
  box-shadow:var(--shadow-xs);
  font-size:.78rem;max-width:100%;
  animation:chip-in .18s cubic-bezier(.2,.7,.2,1);
}
.msg-file-thumb{
  width:40px;height:40px;border-radius:8px;overflow:hidden;flex:none;
  background:var(--bg-soft);display:flex;align-items:center;justify-content:center;
  position:relative;
}
.msg-file-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.msg-file-thumb.is-doc{background:var(--danger-bg);color:var(--danger);}
.msg-file-thumb.is-doc b{
  position:absolute;bottom:1px;left:50%;transform:translateX(-50%);
  font-size:.5rem;font-weight:800;background:var(--danger);color:#fff;
  padding:0 4px;border-radius:99px;line-height:1.5;
}
.msg-file-meta{display:flex;flex-direction:column;min-width:0;line-height:1.3;}
.msg-file-meta b{
  font-weight:600;color:var(--ink);font-size:.78rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px;
}
.msg-file-meta span{font-size:.68rem;color:var(--muted);font-variant-numeric:tabular-nums;}

/* ============================================================
   Leave-thread modal — centred Yes / No dialog.
   ============================================================ */
.msg-leave-dialog{
  width:min(400px,100%);
  text-align:center;
  align-items:center;
  padding:28px 24px 22px;
}
.msg-leave-icon{
  width:60px;height:60px;border-radius:50%;
  background:var(--danger-bg);color:var(--danger);
  border:1px solid var(--danger-border);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:14px;
}
.msg-leave-dialog h3{
  font-size:1.08rem;font-weight:700;color:var(--ink);
  margin:0 0 8px;letter-spacing:-.01em;
}
.msg-leave-dialog p{
  font-size:.87rem;color:var(--muted);line-height:1.55;
  margin:0 0 20px;max-width:32ch;
}
.msg-leave-actions{justify-content:center;width:100%;}
.msg-leave-actions .btn{flex:1 1 0;justify-content:center;padding:10px 14px;}
.msg-leave-yes{background:var(--danger);color:#fff;border:1px solid var(--danger);}
.msg-leave-yes:hover{background:#B91C1C;border-color:#B91C1C;color:#fff;}
.msg-leave-yes:disabled{opacity:.7;cursor:wait;}
.msg-leave-x{position:absolute;top:12px;right:12px;}
@media (max-width:560px){
  .msg-attach-img{max-width:100%;}
  .msg-attach-img img{max-height:200px;}
  .msg-attach-doc{max-width:100%;}
  .msg-leave-actions{flex-direction:column-reverse;}
  .msg-leave-actions .btn{width:100%;}
}

/* Reply box — sticky to the bottom of the chat panel. */
.msg-reply-box{
  padding:14px 18px;
  border-top:1px solid var(--line-soft);
  background:#fff;
  flex:0 0 auto;            /* don't shrink OR grow — keep it natural
                              sized so the body absorbs any overflow */
}
.msg-reply-wrap{
  display:flex;flex-direction:column;gap:10px;
  min-height:0;            /* let inner flex children shrink when
                              the box would otherwise overflow */
}
.msg-reply-textarea{
  min-height:54px;
  max-height:200px;         /* tighter cap so even with a tall preview
                              strip the Send button stays in view */
  resize:none;                /* JS will auto-grow it */
  border-radius:14px;
  padding:11px 14px;
  font-size:.92rem;line-height:1.5;
  border:1px solid var(--line);
  background:var(--bg-soft);
  transition:border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.msg-reply-textarea:focus{
  border-color:var(--brand-300);
  background:#fff;
  box-shadow:0 0 0 4px rgba(21,128,61,.10);
  outline:none;
}
.msg-reply-foot{
  display:flex;justify-content:space-between;align-items:center;
  gap:12px;flex-wrap:wrap;
}
.msg-reply-hint{
  display:inline-flex;align-items:center;gap:6px;
  font-size:.72rem;color:var(--muted);
}
.msg-reply-hint svg{flex:none;opacity:.7}
.msg-reply-hint kbd{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;padding:0 4px;
  font:600 .68rem/1 var(--font-sans, system-ui);
  color:var(--ink);background:var(--bg-soft);
  border:1px solid var(--line);border-radius:4px;
  box-shadow:0 1px 0 var(--line);
}

/* Empty main state */
.msg-empty-main{
  flex:1;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:60px 20px;color:var(--muted);
  background:var(--bg);
  gap:6px;
}
.msg-empty-ico{
  width:72px;height:72px;border-radius:50%;
  background:var(--brand-100);
  border:1px solid var(--brand-200);
  display:flex;align-items:center;justify-content:center;
  font-size:1.8rem;
  margin-bottom:14px;
  color:var(--brand-700);
  box-shadow:0 4px 14px rgba(21,128,61,.10);
}
.msg-empty-main h3{
  font-size:1.05rem;color:var(--ink);font-weight:600;
  margin:0 0 6px;letter-spacing:-.01em;
}
.msg-empty-main p{
  font-size:.88rem;max-width:380px;line-height:1.55;
  margin:0 0 18px;color:var(--muted);
}
.msg-empty-main .btn{margin-top:4px}

/* ---------- Compose form ---------- */
.msg-compose-form{
  display:flex;flex-direction:column;
  height:100%;min-height:0;
  overflow:hidden;
  background:#fff;
}
.msg-compose-head{
  padding:20px 26px 18px;
  border-bottom:1px solid var(--line-soft);
  flex:none;
  background:#fff;
}
.msg-compose-head h2{
  font-size:1.15rem;font-weight:700;color:var(--ink);
  margin:0 0 6px;letter-spacing:-.01em;
  display:flex;align-items:center;gap:10px;
}
.msg-compose-head h2::before{
  content:"";
  width:8px;height:8px;border-radius:50%;
  background:var(--brand-500);
  box-shadow:0 0 0 4px rgba(163,230,53,.25);
}
.msg-compose-head p{
  font-size:.86rem;color:var(--muted);
  margin:0;line-height:1.55;max-width:560px;
}

/* Single-column flow: each .msg-compose-section card stacks
   vertically inside a padded column. Recipients on top, then
   Subject, then Message, then the action row pinned to the
   bottom via margin-top:auto. */
.msg-compose-body{
  display:flex;
  flex-direction:column;
  gap:14px;
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:22px 26px 24px;
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
.msg-compose-body::-webkit-scrollbar{width:10px;}
.msg-compose-body::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:99px;}
.msg-compose-body::-webkit-scrollbar-track{background:transparent;}

/* Each "card" section: rounded panel with its own border + subtle
   shadow. Reads as a distinct step in the compose flow. */
.msg-compose-section{
  display:flex;flex-direction:column;gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px 16px 14px;
  box-shadow:var(--shadow-xs);
  flex:none;
}
/* Recipients card grows to fill leftover height so the picker
   feels anchored to the bottom of the visible area. */
.msg-compose-section-recipients{
  flex:0 0 auto;
}
.msg-compose-section-subject,
.msg-compose-section-body{
  flex:0 0 auto;
}
.msg-compose-section-head{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
}
.msg-label{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.72rem;font-weight:700;color:var(--text);
  letter-spacing:.06em;text-transform:uppercase;
}
.msg-label::before{
  content:"";
  width:4px;height:14px;border-radius:2px;
  background:var(--brand-500);
}
.msg-recipients-count{
  font-size:.72rem;color:var(--muted);font-weight:500;
  padding:3px 10px;border-radius:99px;
  background:var(--bg-soft);border:1px solid var(--line-soft);
  transition:all .15s ease;
  font-variant-numeric:tabular-nums;
}
.msg-recipients-count.has-selection{
  color:#fff;background:var(--brand-700);border-color:var(--brand-700);font-weight:600;
}

/* Selected-recipient summary: empty-state hint, then a chip list,
   then a "Pick recipients" trigger that opens the modal. */
.msg-recipients-summary{
  display:flex;flex-direction:column;gap:10px;
}
.msg-recipients-empty{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;border-radius:10px;
  background:var(--bg-soft);
  border:1px dashed var(--line-strong);
  color:var(--muted);font-size:.85rem;
}
.msg-recipients-empty svg{color:var(--brand-700);flex:none}
.msg-recipient-chips{
  display:flex;flex-wrap:wrap;gap:8px;
  padding:12px;border-radius:12px;
  background:var(--bg-soft);border:1px solid var(--line);
  min-height:54px;
}
.recipient-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:5px 5px 5px 6px;border-radius:99px;
  background:#fff;border:1px solid var(--line);
  box-shadow:var(--shadow-xs);
  font-size:.82rem;color:var(--ink);font-weight:500;
  animation:chip-in .18s cubic-bezier(.2,.7,.2,1);
  max-width:100%;
}
@keyframes chip-in{
  from{opacity:0;transform:translateY(2px) scale(.96);}
  to  {opacity:1;transform:none;}
}
.recipient-chip .av{
  width:22px;height:22px;border-radius:50%;
  background:var(--brand-100);color:var(--brand-900);
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.62rem;flex:none;
}
.recipient-chip b{
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:200px;
}
.recipient-chip-remove{
  display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;border-radius:50%;
  background:var(--line-soft);color:var(--muted);
  border:0;cursor:pointer;flex:none;
  transition:background .12s ease, color .12s ease;
}
.recipient-chip-remove:hover{
  background:var(--brand-50);color:var(--brand-900);
}
.recipient-chip-remove svg{width:10px;height:10px}

.msg-recipients-pick-btn{
  display:inline-flex;align-items:center;gap:8px;
  align-self:flex-start;
  padding:8px 14px;border-radius:10px;
  background:#fff;color:var(--brand-900);
  border:1px solid var(--line-strong);
  font-weight:600;font-size:.85rem;
  cursor:pointer;
  transition:border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.msg-recipients-pick-btn:hover{
  border-color:var(--brand-700);
  background:var(--brand-50);
  transform:translateY(-1px);
  box-shadow:0 2px 6px rgba(11,61,38,.10);
}
.msg-recipients-pick-btn svg{flex:none;color:var(--brand-700);}

.msg-input{
  height:44px;font-size:.95rem;border-radius:10px;padding:0 14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  transition:border-color .12s ease, box-shadow .12s ease;
}
.msg-input::placeholder{color:var(--muted);}
.msg-input:focus{
  border-color:var(--brand-300);
  box-shadow:0 0 0 4px rgba(21,128,61,.10);
  outline:none;
}
.msg-char-count{
  font-size:.72rem;color:var(--muted);font-variant-numeric:tabular-nums;
}
.msg-textarea{
  min-height:180px;
  font-size:.95rem;line-height:1.6;
  padding:14px;border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  resize:vertical;
  transition:border-color .12s ease, box-shadow .12s ease;
}
.msg-textarea::placeholder{color:var(--muted);}
.msg-textarea:focus{
  border-color:var(--brand-300);
  box-shadow:0 0 0 4px rgba(21,128,61,.10);
  outline:none;
}
.msg-compose-actions{
  display:flex;justify-content:flex-end;gap:10px;align-items:center;
  padding-top:14px;
  border-top:1px solid var(--line-soft);
  margin-top:auto;
  flex:none;
}
.msg-compose-actions .btn svg{flex:none;}

/* ---------- Recipient picker modal ----------
   Fixed overlay with a centred dialog. The list inside scrolls
   independently so the page itself never grows. */
.msg-modal{
  position:fixed;inset:0;
  z-index:80;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  animation:msg-modal-in .18s ease-out;
}
.msg-modal[hidden]{display:none;}
@keyframes msg-modal-in{
  from{opacity:0}
  to  {opacity:1}
}
.msg-modal-backdrop{
  position:absolute;inset:0;
  background:rgba(11,31,20,.45);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.msg-modal-dialog{
  position:relative;
  width:min(560px,100%);
  max-height:calc(100vh - 40px);
  background:#fff;
  border-radius:18px;
  box-shadow:var(--shadow-lg),0 0 0 1px rgba(11,31,20,.04);
  display:flex;flex-direction:column;
  overflow:hidden;
  animation:msg-modal-pop .22s cubic-bezier(.2,.7,.2,1);
}
@keyframes msg-modal-pop{
  from{opacity:0;transform:translateY(8px) scale(.98);}
  to  {opacity:1;transform:none;}
}
.msg-modal-head{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:14px;
  padding:18px 20px 14px;
  border-bottom:1px solid var(--line-soft);
  flex:none;
}
.msg-modal-head h3{
  font-size:1.05rem;font-weight:700;color:var(--ink);
  margin:0 0 4px;letter-spacing:-.01em;
}
.msg-modal-head p{
  font-size:.85rem;color:var(--muted);margin:0;line-height:1.5;
}
.msg-modal-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:10px;
  background:var(--bg-soft);color:var(--text);
  border:1px solid var(--line);
  cursor:pointer;flex:none;
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}
.msg-modal-close:hover{
  background:var(--brand-50);color:var(--brand-900);border-color:var(--brand-300);
}
.msg-modal-search{
  position:relative;flex:none;
  padding:12px 20px 10px;
  border-bottom:1px solid var(--line-soft);
  background:#fff;
}
.msg-modal-search svg{
  position:absolute;left:32px;top:50%;transform:translateY(-50%);
  color:var(--muted);pointer-events:none;
}
.msg-modal-search input{
  width:100%;
  padding:0 14px 0 36px;
  height:40px;font-size:.88rem;border-radius:10px;
  border:1px solid var(--line);background:var(--bg-soft);
  color:var(--ink);
  transition:border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.msg-modal-search input::placeholder{color:var(--muted);}
.msg-modal-search input:focus{
  border-color:var(--brand-300);background:#fff;
  box-shadow:0 0 0 4px rgba(21,128,61,.10);outline:none;
}

/* The recipient list inside the modal. Uses page-like scrolling
   rather than being capped by the parent — this keeps the modal
   responsive at any viewport size. */
.msg-modal-list{
  flex:1 1 auto;
  overflow-y:auto;
  padding:10px 14px 14px;
  display:flex;flex-direction:column;gap:4px;
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
.msg-modal-list::-webkit-scrollbar{width:8px;}
.msg-modal-list::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:99px;}
.msg-modal-list::-webkit-scrollbar-track{background:transparent;}

/* Recipient row inside the modal: rich enough that you can identify
   someone at a glance (avatar + name + email + role). */
.recipient-pick{
  position:relative;
  display:flex;align-items:center;gap:12px;
  padding:10px 12px;border-radius:10px;
  background:#fff;border:1px solid var(--line);
  cursor:pointer;
  transition:border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease;
  outline:none;
}
.recipient-pick:hover{
  border-color:var(--brand-300);
  background:var(--brand-50);
}
.recipient-pick:focus-visible{
  border-color:var(--brand-700);
  box-shadow:0 0 0 3px rgba(21,128,61,.18);
}
.recipient-pick.is-checked{
  border-color:var(--brand-700);
  background:var(--brand-50);
  box-shadow:0 0 0 1px var(--brand-700) inset;
}
.recipient-pick input[type=checkbox]{
  position:absolute;opacity:0;pointer-events:none;
  width:0;height:0;
}
.recipient-pick .av{
  width:36px;height:36px;border-radius:50%;
  background:var(--brand-100);color:var(--brand-900);
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.78rem;flex:none;
  border:2px solid #fff;
  box-shadow:0 0 0 1px var(--line);
  transition:background .12s ease, color .12s ease;
}
.recipient-pick.is-checked .av{
  background:var(--brand-700);color:#fff;
  box-shadow:0 0 0 1px var(--brand-700);
}
.recipient-pick .who{
  display:flex;flex-direction:column;min-width:0;flex:1;
}
.recipient-pick .who b{
  color:var(--ink);font-weight:600;font-size:.92rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.recipient-pick .who span{
  color:var(--muted);font-size:.74rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* Right-side checkmark badge that fades in when selected. */
.recipient-tick{
  display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;border-radius:50%;
  background:#fff;border:1px solid var(--line);
  color:transparent;flex:none;
  transition:background .12s ease, color .12s ease, border-color .12s ease, transform .15s ease;
}
.recipient-pick.is-checked .recipient-tick{
  background:var(--brand-700);
  border-color:var(--brand-700);
  color:#fff;
  transform:scale(1);
}
.recipients-empty{
  text-align:center;padding:32px 16px;color:var(--muted);font-size:.88rem;
  display:flex;flex-direction:column;align-items:center;gap:8px;
}
.msg-modal-foot{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  padding:14px 20px;
  border-top:1px solid var(--line-soft);
  background:var(--bg-soft);
  flex:none;
}
.msg-modal-count{
  font-size:.85rem;color:var(--text);font-weight:500;
}
.msg-modal-count.has-selection{
  color:var(--brand-900);font-weight:600;
}
.msg-modal-actions{display:flex;gap:10px}
.msg-modal-actions .btn svg{flex:none}

/* When the modal is open, lock the page scroll. */
body.msg-modal-open{overflow:hidden;}

/* ---------- Time pills (shared) ----------
   Semantic color tiers so the eye can tell "now" from "weeks ago"
   at a glance, plus a tiny icon for the closest buckets. */
.msg-time{
  display:inline-flex;align-items:center;gap:4px;
  font-size:.72rem;font-weight:500;
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  cursor:help;
  white-space:nowrap;
  line-height:1;
}
.msg-time::before{
  content:"";
  width:5px;height:5px;border-radius:50%;
  background:currentColor;
  opacity:.55;
  flex:none;
}
.msg-time-now{
  color:var(--brand-700);
  font-weight:600;
}
.msg-time-now::before{
  background:var(--brand-500);
  opacity:1;
  box-shadow:0 0 0 3px rgba(163,230,53,.25);
  animation:msg-live 1.4s ease-in-out infinite;
}
@keyframes msg-live{
  0%,100%{opacity:1;box-shadow:0 0 0 3px rgba(163,230,53,.25)}
  50%   {opacity:.5;box-shadow:0 0 0 6px rgba(163,230,53,.05)}
}
.msg-time-seconds,
.msg-time-minutes{color:var(--text);font-weight:600;}
.msg-time-hours,
.msg-time-days{color:var(--text);}
.msg-time-weeks,
.msg-time-months,
.msg-time-years{color:var(--muted);}
/* Inbox rows keep the dot; inside bubbles the foot hides it (see above). */
.msg-row-top .msg-time,
.msg-meta-head .msg-time{flex:none;}
/* Long relative strings ("3 months ago") must never push layout. */
.msg-row-top .msg-time{
  max-width:140px;overflow:hidden;text-overflow:ellipsis;
  justify-content:flex-end;
}
@media (max-width:560px){
  .msg-row-top .msg-time{max-width:110px;}
}

/* ---------- Tablet: tighten main grid ---------- */
@media (max-width:1040px){
  .msg-layout{grid-template-columns:minmax(280px,320px) minmax(0,1fr);gap:16px;}
  .msg-thread-body{padding:16px 18px;}
  .msg-group{max-width:min(560px, 75%);}
  .msg-compose-head{padding:18px 22px 14px;}
  .msg-compose-body{padding:18px 22px 20px;gap:12px;}
}

/* ---------- Mobile: single-pane slide between inbox <-> thread ---------- */
@media (max-width:880px){
  .msg-layout{
    grid-template-columns:1fr;
    gap:0;
    min-height:calc(100vh - var(--header-h) - 160px);
  }
  .msg-side{
    position:static;max-height:none;
    min-height:auto;border-radius:var(--r-lg);
  }
  .msg-main{
    display:none;
    max-height:none;
    min-height:calc(100vh - var(--header-h) - 160px);
  }
  .msg-layout.show-thread .msg-side{display:none;}
  .msg-layout.show-thread .msg-main{display:flex;}
  .msg-back-btn{display:inline-flex;}
  .msg-thread-head{padding:12px 16px;}
  .msg-thread-body{padding:14px 16px 14px 24px;gap:8px;}
  .msg-group{max-width:78%;}
  .msg-reply-box{padding:12px 14px;}

  .msg-compose-body{padding:16px 18px 18px;gap:12px;}
  .msg-compose-head{padding:16px 18px 14px;}

  .msg-row-preview{-webkit-line-clamp:1;}
  .msg-thread-subject{font-size:1rem;}
}

/* ---------- Small phones: tighten paddings + bubble width ---------- */
@media (max-width:560px){
  .msg-thread-head{flex-wrap:wrap;gap:10px;}
  .msg-thread-head-body{order:2;flex:1 1 100%;}
  .msg-thread-actions{order:1;width:100%;justify-content:flex-end;}
  .msg-thread-actions .btn{flex:1 1 auto;justify-content:center;}
  .msg-day-chip{font-size:.66rem;padding:3px 10px;}
  .msg-thread-body{padding:10px 10px 10px 18px;gap:8px;}
  .msg-group{max-width:88%;gap:5px;}
  .msg-stack{gap:2px;}
  .msg-thread-meta{font-size:.72rem;}
  .msg-row-names{margin-top:2px;}
  .msg-bubble{font-size:.875rem;}
  .msg-avatar{width:26px;height:26px;font-size:.64rem;}
  .msg-reply-foot{gap:8px;}
  .msg-reply-hint{font-size:.68rem;width:100%;}

  /* Compose cards breathe a bit less on phones. */
  .msg-compose-body{padding:14px;gap:10px;}
  .msg-compose-head{padding:14px 14px 12px;}
  .msg-compose-head h2{font-size:1.05rem;}
  .msg-compose-section{padding:12px;border-radius:12px;}
  .msg-input{height:42px;font-size:.92rem;}
  .msg-textarea{min-height:140px;font-size:.92rem;padding:12px;}

  /* Modal goes full-width on phones for better tap targets. */
  .msg-modal{padding:0;}
  .msg-modal-dialog{
    width:100%;
    max-height:100vh;
    height:100vh;
    border-radius:0;
  }
}
@media (max-width:380px){
  .msg-side-head{padding:12px 12px 10px;}
  .msg-thread-row{padding:10px 12px;gap:10px;}
  .msg-thread-row .av{width:36px;height:36px;font-size:.74rem;}
  .msg-row-body{padding-right:24px;}
  .msg-compose-body{padding:12px;}
  .msg-compose-section{padding:10px;}
}

/* ---------- Test questions ---------- */
.question-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:18px 20px;margin-bottom:14px;box-shadow:var(--shadow-xs);
}
.question-card .prompt{font-size:.95rem;font-weight:600;color:var(--ink);margin-bottom:10px;line-height:1.45}
.question-card label{display:flex;gap:10px;padding:6px 0;font-size:.875rem;color:var(--text);cursor:pointer}
.question-card label:hover{color:var(--brand-700)}
.question-card input[type=radio]{margin-top:3px;accent-color:var(--brand-700)}

/* ---------- Skill profile bars ---------- */
.skill-row{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:16px;box-shadow:var(--shadow-xs)}
.skill-row .head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;gap:10px;flex-wrap:wrap}
.skill-row .head strong{color:var(--ink);font-weight:600}
.skill-row .head .lvl{font-size:.78rem;color:var(--muted)}
.skill-row .meta{font-size:.75rem;color:var(--muted);margin-top:8px}

/* ---------- Status filter chips ---------- */
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.chip{
  display:inline-flex;align-items:center;
  padding:6px 12px;border-radius:var(--r-pill);
  font-size:.78rem;font-weight:500;
  border:1px solid var(--line);background:#fff;color:var(--muted);
  transition:all .12s ease;
}
.chip:hover{border-color:var(--brand-300);color:var(--brand-700)}
.chip.active{background:var(--brand-900);color:#fff;border-color:var(--brand-900)}

/* ---------- Simple "hover lift" utility ---------- */
.lift{transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.lift:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:var(--line-strong)}

/* ---------- Visually hidden (a11y) ---------- */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* ---------- Breadcrumb (public pages only) ----------
   Modern floating card. Elevated white pill-trail with crisp
   SVG chevron separators, soft layered shadow, lemon-leaf accent
   on the active page. No gradients — geometry + tokens only. */
.crumb-bar{
  padding:14px 0 6px;
  background:transparent;
}
.crumbs{
  display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;
  padding:6px 8px;
  background:#fff;
  border:1px solid var(--line-soft);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);
  font-size:.85rem;line-height:1.3;
  max-width:100%;
}
.crumbs .crumb{
  display:inline-flex;align-items:center;gap:8px;
  padding:7px 12px;border-radius:var(--r-pill);
  color:var(--muted);font-weight:500;letter-spacing:.01em;
  transition:background .15s ease,color .15s ease,box-shadow .15s ease,transform .12s ease;
  white-space:nowrap;min-width:0;
}
.crumbs .crumb .lbl{
  overflow:hidden;text-overflow:ellipsis;max-width:32ch;
}
.crumbs .crumb:hover{background:var(--bg-soft);color:var(--brand-900)}
.crumbs .crumb-home{
  padding-left:8px;color:var(--brand-800);font-weight:600;
  background:var(--brand-50);
  border:1px solid var(--brand-100);
}
.crumbs .crumb-home:hover{
  background:var(--brand-100);color:var(--brand-900);
  box-shadow:0 0 0 3px rgba(163,230,53,.12);
}
.crumbs .crumb-home .home-ico{
  flex:none;width:22px;height:22px;border-radius:50%;
  background:var(--brand-900);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  transition:transform .18s ease;
}
.crumbs .crumb-home:hover .home-ico{transform:scale(1.06)}
.crumbs .crumb-home .home-ico svg{width:13px;height:13px}
.crumbs .crumb-sep{
  display:inline-flex;align-items:center;justify-content:center;
  width:14px;height:14px;color:var(--faint);flex:none;
  user-select:none;
}
.crumbs .crumb-sep svg{width:11px;height:11px;opacity:.85}
.crumbs .crumb-current{
  color:var(--brand-900);font-weight:600;
  background:#fff;border:1px solid var(--line);
  padding-right:14px;
}
.crumbs .crumb-current .leaf-dot{
  flex:none;width:8px;height:8px;border-radius:50%;
  background:var(--brand-500);
  box-shadow:0 0 0 3px rgba(163,230,53,.22);
  animation:crumbPulse 2.4s ease-in-out infinite;
}
@keyframes crumbPulse{
  0%,100%{box-shadow:0 0 0 3px rgba(163,230,53,.22)}
  50%   {box-shadow:0 0 0 5px rgba(163,230,53,.10)}
}
.crumbs .crumb-current .lbl{
  overflow:hidden;text-overflow:ellipsis;max-width:38ch;
}

/* ---------- AJAX pager (shared pagination) ----------
   Modern job-board style:
   Result count + "Page X of Y" badge + numbered buttons with
   first / prev / next / last chevrons. Solid colour only — no
   gradients. */

.pager{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  flex-wrap:wrap;
  margin:22px 0 8px;
  padding:12px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  box-shadow:var(--shadow-xs);
}
.pager.is-single{
  justify-content:center;
  text-align:center;
}
.pager-meta{
  font-size:.85rem;color:var(--muted);
  display:inline-flex;align-items:center;gap:4px;
  flex:none;
}
.pager-meta b,.pager-of b{
  color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums;
}
.pager-of{
  font-size:.78rem;color:var(--muted);
  padding:5px 11px;
  background:var(--bg-soft);
  border:1px solid var(--line-soft);
  border-radius:99px;
  white-space:nowrap;
  flex:none;
}
.pager-btns{
  display:flex;align-items:center;gap:4px;
  flex-wrap:wrap;
}
.pager-btn{
  position:relative;
  display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:38px;padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;color:var(--text);
  font-size:.88rem;font-weight:600;
  text-decoration:none;
  letter-spacing:-.01em;
  transition:
    color .12s ease,
    border-color .12s ease,
    background .12s ease,
    transform .08s ease,
    box-shadow .12s ease;
}
.pager-btn:hover{
  border-color:var(--brand-700);color:var(--brand-700);
  background:var(--brand-50);
}
.pager-btn:active{transform:translateY(1px);}
.pager-btn.is-active{
  background:var(--brand-900);border-color:var(--brand-900);color:#fff;
  box-shadow:0 0 0 3px var(--brand-100);
}
.pager-btn.is-active:hover{background:var(--brand-800);border-color:var(--brand-800);color:#fff;}
.pager-btn.is-disabled{
  opacity:.4;cursor:default;
  background:var(--bg-soft);color:var(--muted);
  border-color:var(--line-soft);
}
.pager-btn.is-disabled:hover{background:var(--bg-soft);color:var(--muted);border-color:var(--line-soft);}

/* First/Prev/Next/Last chevron buttons — slimmer padding so 5 icons
   plus a handful of numbers fit on one row at 1180px. */
.pager-nav{padding:0 10px;min-width:38px;}
.pager-nav.pager-nav-first::before{content:"\00AB";font-weight:700;line-height:1;}
.pager-nav.pager-nav-prev::before {content:"\2039";font-weight:700;line-height:1;}
.pager-nav.pager-nav-next::before {content:"\203A";font-weight:700;line-height:1;}
.pager-nav.pager-nav-last::before {content:"\00BB";font-weight:700;line-height:1;}
/* Hide the unicode label that came from the server when icons render. */
.pager-nav{font-size:0;color:var(--text);}
.pager-nav::before{font-size:1rem;color:inherit;}
.pager-nav.is-disabled::before{color:var(--muted);}

.pager-ellipsis{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:28px;height:38px;
  color:var(--faint);
  font-weight:600;
  user-select:none;
}
.pager.is-loading,.is-loading{opacity:.55;pointer-events:none}

.loadmore-wrap{display:flex;flex-direction:column;align-items:center;gap:8px;margin:16px 0 4px}
.loadmore-count{font-size:.8rem;color:var(--muted)}

/* Pager responsive: stack on phones, hide the verbose meta, keep
   result count on top with buttons below. */
@media (max-width:720px){
  .pager{padding:10px 12px;gap:10px;justify-content:center;}
  .pager-meta{font-size:.78rem;}
  .pager-of{display:none;}
  .pager-btns{justify-content:center;}
  .pager-btn{min-width:34px;height:34px;padding:0 10px;font-size:.82rem;border-radius:8px;}
  /* Keep the chevron nav buttons icon-only on mobile too — the
     desktop rule's `font-size:0` would otherwise be overridden by the
     generic .pager-btn rule above (same specificity, later source). */
  .pager-nav{font-size:0;padding:0 8px;min-width:34px;}
  .pager-nav::before{font-size:.95rem;}
  .pager-ellipsis{min-width:24px;height:34px;}
}

/* Mobile — keep it usable without overflowing the wrap container. */
@media (max-width:640px){
  .crumb-bar{padding:10px 0 4px}
  .crumbs{font-size:.8rem;padding:5px 6px;gap:2px}
  .crumbs .crumb{padding:6px 9px}
  .crumbs .crumb-home{padding-left:6px}
  .crumbs .crumb-home .home-ico{width:20px;height:20px}
  .crumbs .crumb-current{padding-right:10px}
  .crumbs .crumb .lbl{max-width:20ch}
  .crumbs .crumb-current .lbl{max-width:22ch}
  .crumbs .crumb-sep{width:10px}
}

/* =================================================================
   TEEP WORK — Jobs marketplace (jobs.php + family)
   Modern job-board layout built strictly from v3 tokens:
     - no gradients (per design system rule)
     - solid colours only, layered shadows, 1px borders
     - 4-pt spacing, type scale follows v3
     - mobile-responsive across phone / tablet / desktop
   ================================================================= */

/* ---------- Page hero ---------- */
.jobs-hero{
  padding:48px 0 24px;
}
.jobs-hero-inner{
  max-width:1180px;
  margin:0 auto;
  padding:0 24px;
}
/* Deep-green marketplace hero card — solid colours only:
   deep #052E16 surface, subtle dot pattern, lemon top stripe,
   geometric ring decor. No gradients. */
.jobs-hero-card{
  position:relative;overflow:hidden;isolation:isolate;
  background:var(--brand-950);
  border-radius:var(--r-xl);
  padding:44px 40px 36px;
  box-shadow:0 1px 2px rgba(11,61,38,.20),0 30px 60px rgba(11,61,38,.28);
}
.jobs-hero-card::before{
  content:"";position:absolute;inset:0;z-index:0;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><circle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.10)'/></svg>");
  background-size:28px 28px;
}
.jobs-hero-card::after{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:var(--brand-500);z-index:1;
}
.jobs-hero-card > *{position:relative;z-index:1;}
.jobs-hero-ring{
  position:absolute;z-index:0;pointer-events:none;
  border:1px solid rgba(255,255,255,.09);border-radius:50%;
}
.jobs-hero-ring.r1{width:340px;height:340px;right:-120px;top:-120px;}
.jobs-hero-ring.r2{width:210px;height:210px;right:120px;bottom:-140px;}
.jobs-hero-dot{
  position:absolute;z-index:0;width:12px;height:12px;border-radius:50%;
  background:var(--brand-500);left:44%;bottom:26px;pointer-events:none;
}
.eyebrow-dark{
  color:#D9F99D;background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.18);
}
.eyebrow-dark .dot{background:var(--brand-500);box-shadow:0 0 0 3px rgba(163,230,53,.22);}
.jobs-hero-card h1{
  font-size:clamp(1.9rem,3.8vw,2.7rem);
  letter-spacing:-.025em;
  line-height:1.08;
  margin-top:16px;
  color:#fff;
  font-weight:800;
  max-width:18ch;
  font-family:"Sora","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
.jobs-hero-card .lead{
  font-size:clamp(.95rem,1.4vw,1.05rem);
  color:#C4D8CB;
  margin-top:12px;
  max-width:62ch;
  line-height:1.6;
}
/* Guest/worker note — solid translucent panel on deep green. */
.jobs-guest-note{
  display:flex;gap:12px;align-items:flex-start;
  margin-top:22px;padding:14px 16px;
  max-width:760px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.16);
  border-radius:var(--r);
  color:#E7F2EB;font-size:.88rem;line-height:1.55;
}
.jobs-guest-note .ico{
  flex:none;width:26px;height:26px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brand-500);color:var(--brand-950);
  font-weight:800;font-size:.8rem;
}
.jobs-guest-note a{color:var(--brand-400);font-weight:700;white-space:nowrap;}
.jobs-guest-note a:hover{color:#fff;}

/* Stat chips — solid white pills on the deep surface so they pop. */
.jobs-stats{
  display:flex;flex-wrap:wrap;gap:10px;
  margin-top:24px;
}
.jobs-stat{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:99px;
  font-size:.82rem;color:var(--muted);
  box-shadow:var(--shadow-xs);
}
.jobs-stat b{
  color:var(--brand-900);font-weight:700;font-variant-numeric:tabular-nums;
}
.jobs-stat .dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--brand-500);flex:none;
  box-shadow:0 0 0 3px var(--brand-100);
}

.jobs-stat.is-new{background:var(--brand-500);border-color:var(--brand-500);color:var(--brand-950);}
.jobs-stat.is-new b{color:var(--brand-950);}
.jobs-stat.is-new .dot{background:var(--brand-950);box-shadow:0 0 0 3px rgba(5,46,22,.18);}

/* ---------- Interior page hero (deep green, no gradients) ----------
   Shared showpiece for how-it-works, about, our-model, participants,
   contact, faq. Solid deep #052E16 + dot pattern + lemon top stripe.
   Copy stays white/sage; primary action is always lemon. */
.page-hero-wrap{max-width:1100px;margin:0 auto;padding:32px 24px 8px;}
.page-hero{
  position:relative;overflow:hidden;isolation:isolate;
  background:var(--brand-950);
  border-radius:var(--r-xl);
  padding:44px 40px;
  box-shadow:0 1px 2px rgba(11,61,38,.20),0 30px 60px rgba(11,61,38,.28);
}
.page-hero::before{
  content:"";position:absolute;inset:0;z-index:0;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><circle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.10)'/></svg>");
  background-size:28px 28px;
}
.page-hero::after{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:var(--brand-500);z-index:1;
}
.page-hero > *{position:relative;z-index:1;}
.page-hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:44px;align-items:center;}
.page-hero h1{
  font-size:clamp(1.9rem,3.5vw,2.6rem);letter-spacing:-.02em;line-height:1.12;
  margin-top:14px;color:#fff;font-weight:800;
  font-family:"Sora","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
.page-hero .lead{color:#C4D8CB;margin-top:14px;line-height:1.65;font-size:1rem;}
.page-hero .tagline{color:#fff;margin-top:14px;font-size:1.2rem;font-weight:700;letter-spacing:-.01em;line-height:1.4;}
.page-hero .sub{color:#9DBFAE;margin-top:12px;line-height:1.65;font-size:.95rem;}
.page-hero .row{margin-top:22px;}
.page-hero-visual{position:relative;max-width:380px;margin-left:auto;width:100%;}
.page-hero-visual img{
  display:block;width:100%;height:auto;object-fit:cover;aspect-ratio:4/3;
  border-radius:16px;border:1px solid rgba(255,255,255,.25);
  box-shadow:0 18px 44px rgba(0,0,0,.35);
}
@media (max-width:880px){
  .page-hero-grid{grid-template-columns:1fr;gap:28px;}
  .page-hero{padding:34px 24px;}
  .page-hero-visual{margin-left:0;max-width:440px;}
}
@media (max-width:520px){
  .page-hero-wrap{padding:20px 16px 4px;}
  .page-hero{padding:28px 20px;border-radius:20px;}
  .page-hero .tagline{font-size:1.05rem;}
}

/* ---------- Filter bar ----------
   Two-row feel: a search input with a submit button on top, then
   chips below for skill / type / sort. On desktop both stay on one
   strip; on phones they stack. */
.jobs-filter{
  display:flex;flex-direction:column;gap:14px;
  margin-top:30px;
  padding:18px 18px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);
}
.jobs-filter-row{
  display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;
}
.jobs-filter-row .field{
  margin:0;display:flex;flex-direction:column;gap:6px;
}
.jobs-filter-row .field label{
  font-size:.74rem;font-weight:600;
  color:var(--muted);
  letter-spacing:.02em;text-transform:uppercase;
}
.jobs-filter-row .field .input,
.jobs-filter-row .field .select{
  height:46px;
  border:1px solid var(--line);border-radius:12px;
  background:var(--bg-soft);color:var(--ink);
  font-size:.9rem;
  transition:border-color .12s ease,box-shadow .12s ease,background .12s ease;
}
.jobs-filter-row .field .input{padding:0 14px;}
.jobs-filter-row .field .select{padding:0 38px 0 14px;}
.jobs-filter-row .field .input:focus,
.jobs-filter-row .field .select:focus{
  outline:none;border-color:var(--brand-700);
  background:#fff;
  box-shadow:0 0 0 3px var(--brand-100);
}
.jobs-filter-search{
  flex:1 1 260px;min-width:200px;
}
.jobs-filter-search .search-wrap{
  position:relative;display:flex;align-items:center;
}
.jobs-filter-search .search-wrap svg{
  position:absolute;left:14px;color:var(--muted);pointer-events:none;
  width:17px;height:17px;flex:none;
}
.jobs-filter-search .input{
  width:100%;
}
/* Higher specificity than the generic row rule above, so the icon
   gutter survives the cascade — text never runs under the magnifier. */
.jobs-filter-row .field.jobs-filter-search .input{
  padding-left:42px;
}
.jobs-filter-row .field.jobs-filter-skill .select{
  padding-right:38px;
}
.jobs-filter-actions{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.jobs-filter-actions .btn{height:46px;padding:0 22px;border-radius:12px;}

/* Type pills — second-row chip-style toggle for "All / Fixed / Hourly".
   Uses native radios under the hood so the form still submits a
   machine-readable ?type= value. */
.jobs-type-pills{
  display:flex;flex-wrap:wrap;gap:8px;align-items:center;
}
.jobs-type-pills .lbl{
  font-size:.74rem;font-weight:600;color:var(--muted);
  text-transform:uppercase;letter-spacing:.02em;
  margin-right:4px;
}
.type-pill{
  position:relative;
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 14px;
  border:1px solid var(--line);
  background:#fff;color:var(--text);
  border-radius:99px;
  font-size:.82rem;font-weight:600;cursor:pointer;
  transition:border-color .12s ease,color .12s ease,background .12s ease;
}
.type-pill:hover{border-color:var(--brand-300);color:var(--brand-900);}
.type-pill input{position:absolute;opacity:0;pointer-events:none;}
.type-pill.is-active{
  background:var(--brand-900);border-color:var(--brand-900);color:#fff;
}
.type-pill.is-active:hover{background:var(--brand-800);border-color:var(--brand-800);color:#fff;}

/* ---------- Results toolbar ---------- */
.jobs-results-bar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;
  margin:28px 0 16px;
}
.jobs-results-count{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.88rem;color:var(--muted);
}
.jobs-results-count b{color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums;}
.jobs-results-count .pulse{
  width:7px;height:7px;border-radius:50%;
  background:var(--brand-500);
  box-shadow:0 0 0 3px var(--brand-100);
}
.jobs-results-sort{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.85rem;color:var(--muted);
}
.jobs-results-sort .select{
  height:36px;padding:0 32px 0 12px;
  border:1px solid var(--line);border-radius:10px;
  background:#fff;color:var(--ink);font-size:.85rem;font-weight:600;
  transition:border-color .12s ease,box-shadow .12s ease;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C6F63' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat;background-position:right 12px center;
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
}
.jobs-results-sort .select:focus{
  outline:none;border-color:var(--brand-700);
  box-shadow:0 0 0 3px var(--brand-100);
}

/* ---------- Job card grid ---------- */
.jobs-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));
  gap:18px;
  margin:8px 0 24px;
}

.job-card{
  position:relative;
  display:flex;flex-direction:column;gap:12px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-xs);
  padding:20px;
  text-decoration:none;color:inherit;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}
.job-card:hover{
  border-color:var(--line-strong);
  box-shadow:var(--shadow);
  transform:translateY(-2px);
}
.job-card-top{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-size:.74rem;color:var(--muted);
}
.job-card-skill{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;
  background:var(--brand-50);
  border:1px solid var(--brand-100);
  border-radius:99px;
  color:var(--brand-900);
  font-weight:600;
  font-size:.74rem;
}
.job-card-skill .dot{
  width:5px;height:5px;border-radius:50%;background:var(--brand-500);
}
.job-card-type{
  font-size:.72rem;color:var(--faint);font-weight:600;
  text-transform:uppercase;letter-spacing:.06em;
}
.job-card h3{
  font-size:1.08rem;line-height:1.32;
  margin:0;
  letter-spacing:-.01em;
}
.job-card h3 a{
  color:var(--ink);text-decoration:none;
  transition:color .12s ease;
}
.job-card h3 a:hover{color:var(--brand-700);}
.job-card-desc{
  margin:0;
  font-size:.86rem;
  color:var(--muted);
  line-height:1.55;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.job-card-pay{
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  padding:12px 14px;
  background:var(--bg-soft);
  border:1px solid var(--line-soft);
  border-radius:12px;
}
.job-card-pay .amount{
  font-size:1.18rem;font-weight:700;
  color:var(--brand-900);
  letter-spacing:-.01em;
  font-variant-numeric:tabular-nums;
}
.job-card-pay .ngn{
  font-size:.76rem;color:var(--muted);font-weight:500;
}
.job-card-pay .badge{
  margin-left:auto;
  font-size:.7rem;font-weight:600;
  padding:3px 8px;border-radius:99px;
  background:var(--brand-100);color:var(--brand-900);
}
.job-card-meta{
  display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;
  font-size:.76rem;color:var(--muted);
}
.job-card-meta .m{
  display:inline-flex;align-items:center;gap:5px;
}
.job-card-meta .m svg{flex:none;opacity:.85;}
.job-card-meta .sep{color:var(--faint);}

.job-card-foot{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-top:4px;padding-top:12px;
  border-top:1px dashed var(--line);
}
.job-card-foot .biz{
  font-size:.78rem;color:var(--text);font-weight:500;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:55%;
}
.job-card-foot .biz .tick{
  color:var(--brand-700);font-weight:700;margin-right:4px;
}
.job-card-foot .actions{
  display:inline-flex;align-items:center;gap:6px;flex:none;
}
.job-card-foot .info-btn{
  width:34px;height:34px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--bg-soft);
  color:var(--brand-700);
  font-size:.95rem;
  cursor:pointer;
  transition:border-color .12s ease,background .12s ease,color .12s ease,transform .08s ease;
}
.job-card-foot .info-btn:hover{
  background:var(--brand-50);border-color:var(--brand-300);
  transform:scale(1.05);
}
.job-card-foot .info-btn:focus-visible{
  outline:none;box-shadow:0 0 0 3px var(--brand-100);
}
.job-card-foot .btn-view{
  height:34px;padding:0 14px;border-radius:10px;
  font-size:.82rem;font-weight:700;
  display:inline-flex;align-items:center;gap:6px;
}

/* On-card hover cue: tiny "details" arrow grows. */
.job-card-foot .btn-view svg{transition:transform .15s ease;}
.job-card:hover .job-card-foot .btn-view svg{transform:translateX(3px);}

/* ---------- Empty state ---------- */
.jobs-empty{
  display:flex;flex-direction:column;align-items:center;
  gap:8px;text-align:center;
  padding:48px 24px;
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow-xs);
}
.jobs-empty .ico{
  width:52px;height:52px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brand-50);color:var(--brand-900);
  font-size:1.2rem;font-weight:700;
  border:1px solid var(--brand-100);
  margin-bottom:6px;
}
.jobs-empty strong{font-size:1rem;color:var(--ink);}
.jobs-empty p{margin:0;font-size:.88rem;color:var(--muted);max-width:46ch;}

/* ---------- Responsive: phones ----------
   First row: search runs full-width on its own line so the icon,
   text, and native clear-button never collide. Second line: skill
   select + Filter button share one row (select flexes, button keeps
   a fixed 44px+ touch target). Cards switch meta separators to
   wrapped chips and stack the footer cleanly. */
@media (max-width:720px){
  .jobs-hero{padding:24px 0 16px;}
  .jobs-hero-inner{padding:0 16px;}
  .jobs-hero-card{padding:32px 22px 26px;border-radius:20px;}
  .jobs-hero-ring.r1{width:220px;height:220px;right:-90px;top:-90px;}
  .jobs-hero-ring.r2{display:none;}
  .jobs-hero-dot{left:auto;right:26px;bottom:18px;}
  .jobs-guest-note{font-size:.83rem;padding:12px 13px;}
  .jobs-hero-inner{padding:0 20px;}
  .jobs-grid{grid-template-columns:1fr;gap:14px;}
  .job-card{padding:18px 16px;gap:11px;}
  .job-card h3{font-size:1.02rem;}
  .job-card-pay{padding:11px 12px;align-items:center;}
  .job-card-pay .amount{font-size:1.1rem;}
  .jobs-filter{padding:14px;gap:12px;border-radius:16px;}
  .jobs-filter-row{gap:10px;}
  .jobs-filter-search{flex:1 1 100%;min-width:0;}
  .jobs-filter-row .field.jobs-filter-skill{flex:1 1 0;min-width:0;}
  .jobs-filter-row .field .input,
  .jobs-filter-row .field .select{height:46px;font-size:.92rem;}
  .jobs-filter-actions{flex:none;margin-left:auto;}
  .jobs-filter-actions .btn{flex:none;justify-content:center;height:46px;white-space:nowrap;}
  .jobs-results-bar{flex-direction:column;align-items:stretch;gap:10px;}
  .jobs-results-sort{justify-content:space-between;width:100%;gap:10px;}
  .jobs-results-sort > span{flex:none;}
  .jobs-results-sort .select{flex:1;min-width:0;}
}
@media (max-width:480px){
  .jobs-stats{gap:8px;}
  .jobs-stat{padding:7px 11px;font-size:.78rem;}
  .jobs-stat .dot{box-shadow:0 0 0 2px var(--brand-100);}
  .type-pill{padding:8px 13px;font-size:.78rem;}
  /* Meta becomes chips — separators hidden so wrapped rows stay tidy. */
  .job-card-meta{gap:8px;}
  .job-card-meta .sep{display:none;}
  .job-card-meta .m{
    background:var(--bg-soft);border:1px solid var(--line-soft);
    border-radius:99px;padding:5px 10px;font-size:.74rem;
  }
  .job-card-foot{flex-direction:column;align-items:stretch;gap:10px;}
  .job-card-foot .biz{
    max-width:100%;text-align:left;
    display:flex;align-items:center;min-width:0;
  }
  .job-card-foot .actions{display:flex;gap:8px;}
  .job-card-foot .info-btn{flex:none;width:46px;height:46px;border-radius:12px;}
  .job-card-foot .btn-view{flex:1;height:46px;justify-content:center;border-radius:12px;}
  .pay-modal-foot .actions{justify-content:stretch;}
  .pay-modal-foot .actions .btn{flex:1;justify-content:center;}
}

/* ---------- Pay-breakdown modal (jobs.php) ----------
   Beautifully centred dialog. The trigger is the "ⓘ How is this pay
   worked out?" icon on each job card. First principles: a quick
   glance should answer "what will I actually be paid?" without
   leaving the listing, so the modal is dense, labelled, and uses
   the same v3 tokens as everything else (no gradients). */
.pay-modal{
  position:fixed;inset:0;
  z-index:90;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  animation:pay-modal-in .18s ease-out;
}
.pay-modal[hidden]{display:none;}
@keyframes pay-modal-in{
  from{opacity:0}
  to  {opacity:1}
}
.pay-modal-backdrop{
  position:absolute;inset:0;
  background:rgba(11,31,20,.45);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  cursor:pointer;
}
.pay-modal-dialog{
  position:relative;
  width:min(520px,100%);
  max-height:calc(100vh - 40px);
  background:#fff;
  border-radius:18px;
  box-shadow:var(--shadow-lg),0 0 0 1px rgba(11,31,20,.04);
  display:flex;flex-direction:column;
  overflow:hidden;
  animation:pay-modal-pop .22s cubic-bezier(.2,.7,.2,1);
}
@keyframes pay-modal-pop{
  from{opacity:0;transform:translateY(8px) scale(.98);}
  to  {opacity:1;transform:none;}
}
.pay-modal-head{
  display:flex;align-items:flex-start;gap:14px;
  padding:20px 22px 14px;
  border-bottom:1px solid var(--line-soft);
}
.pay-modal-head .head-ico{
  width:42px;height:42px;border-radius:12px;flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brand-50);
  border:1px solid var(--brand-100);
  color:var(--brand-900);font-size:1.05rem;
}
.pay-modal-head .head-text{flex:1;min-width:0;}
.pay-modal-head h3{
  margin:0 0 4px;
  font-size:1.08rem;letter-spacing:-.01em;color:var(--ink);font-weight:700;
  line-height:1.3;
}
.pay-modal-head p{
  margin:0;
  font-size:.85rem;color:var(--muted);line-height:1.5;
}
.pay-modal-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:10px;flex:none;
  background:var(--bg-soft);color:var(--text);
  border:1px solid var(--line);
  cursor:pointer;
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}
.pay-modal-close:hover{
  background:var(--brand-50);color:var(--brand-900);border-color:var(--brand-300);
}
.pay-modal-close:focus-visible{outline:none;box-shadow:0 0 0 3px var(--brand-100);}
.pay-modal-close svg{width:14px;height:14px;}

.pay-modal-body{
  padding:18px 22px 6px;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
.pay-modal-body::-webkit-scrollbar{width:8px;}
.pay-modal-body::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:99px;}
.pay-modal-body::-webkit-scrollbar-track{background:transparent;}

/* Hero stat inside the modal: the amount + rate the worker will see. */
.pay-hero{
  display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;
  padding:14px 16px;
  background:var(--bg-soft);
  border:1px solid var(--line-soft);
  border-radius:14px;
  margin-bottom:16px;
}
.pay-hero .amount{
  font-size:1.55rem;line-height:1.1;font-weight:700;
  color:var(--brand-900);
  letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.pay-hero .suffix{
  font-size:.85rem;color:var(--muted);font-weight:500;
}
.pay-hero .ngn{
  margin-left:auto;font-size:.8rem;color:var(--muted);font-weight:500;
}

/* Breakdown list — clean rows with strong key-value typography. */
.pay-breakdown-list{
  list-style:none;margin:0;padding:0;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}
.pay-breakdown-list li{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding:12px 14px;
  border-top:1px solid var(--line-soft);
  font-size:.88rem;
}
.pay-breakdown-list li:first-child{border-top:0;}
.pay-breakdown-list li .k{
  color:var(--text);font-weight:500;line-height:1.4;flex:1;min-width:0;
}
.pay-breakdown-list li .v{
  color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums;
  text-align:right;white-space:nowrap;
  /* Allow the value to be on its own line on phones (where space is tight). */
}
.pay-breakdown-list li .v em{
  font-style:normal;color:var(--brand-700);font-weight:700;
}
.pay-breakdown-list li.has-sub{
  flex-direction:column;align-items:flex-start;gap:4px;
}
.pay-breakdown-list li.has-sub .v{align-self:flex-end;}
.pay-breakdown-list li .sub{
  font-size:.78rem;color:var(--muted);font-weight:500;
}
/* Per-worker "your pay for X" line: green-tinted to anchor the reader. */
.pay-breakdown-list li.is-highlight{
  background:var(--brand-50);
}
.pay-breakdown-list li.is-highlight .k{color:var(--brand-900);font-weight:600;}
/* Cost-side ("business pays"): deliberately muted so it never reads as the worker's pay. */
.pay-breakdown-list li.is-muted .k{color:var(--muted);}
.pay-breakdown-list li.is-muted .v{color:var(--muted);font-weight:600;}
/* Sub-explanation underneath a row's key — lighter, helps the user
   understand which side (worker / business) the number belongs to. */
.pay-breakdown-list li .row-hint{
  display:block;
  margin-top:3px;
  font-size:.74rem;color:var(--faint);font-weight:400;
  line-height:1.4;
}

.pay-modal-note{
  margin-top:14px;
  display:flex;gap:10px;align-items:flex-start;
  padding:11px 13px;
  background:#FFFBEB;
  border:1px solid #FDE68A;
  border-radius:12px;
  color:#92400E;
  font-size:.78rem;line-height:1.5;
}
.pay-modal-note svg{flex:none;margin-top:1px;}

.pay-modal-foot{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:14px 22px 16px;
  border-top:1px solid var(--line-soft);
  background:var(--bg-soft);
}
.pay-modal-foot .meta{font-size:.78rem;color:var(--muted);}
.pay-modal-foot .actions{display:flex;gap:8px;}

/* Mobile tweaks for the modal: full-bleed on small phones. */
@media (max-width:520px){
  .pay-modal{padding:0;align-items:flex-end;}
  .pay-modal-dialog{
    width:100%;max-height:92vh;
    border-radius:18px 18px 0 0;
    animation:pay-modal-pop .24s cubic-bezier(.2,.7,.2,1);
  }
  .pay-hero{padding:12px 14px;}
  .pay-hero .amount{font-size:1.35rem;}
  .pay-modal-head{padding:18px 18px 12px;}
  .pay-modal-body{padding:14px 18px 4px;}
  .pay-modal-foot{padding:12px 18px 16px;flex-direction:column;align-items:stretch;}
  .pay-modal-foot .actions{justify-content:flex-end;}
}
body.pay-modal-open{overflow:hidden;}

/* =================================================================
   TEEP WORK — Design System v4 — Visual Refresh (no gradients)
   - 3D perspective utilities (depth, parallax, float, tilt)
   - Strategic image showcases (web1/web2/web3 image frames)
   - Richer empty / placeholder states with brand depth
   - Layered page backdrops so white boxes always pop
   - Pure CSS — no JS required, no HTML structure changes
   - Strict no-gradient rule: only solid colours, geometric dot
     patterns, and layered shadows. Colour blending is banned.
   ================================================================= */

/* ---------- Page canvas: subtle warm-green wash ----------
   Plain solid colour so any white card on the page always reads as
   raised. We deliberately avoid colour-gradient backgrounds; the
   "wash" comes from a tiny shift of the solid fill towards green. */
body{
  background-color:#F4F8F4;
}

/* App-shell page surface — slightly different solid tone so the
   .page container visibly lifts off the body canvas. Plain fill. */
.app-layout .page{
  background:#FFFFFF;
}

/* ---------- 3D stage ----------
   Establish a perspective so descendants using transform: rotateX/Y
   actually recede into depth instead of skewing flat. */
.stage-3d{perspective:1400px;perspective-origin:50% 30%}
.stage-3d-tall{perspective:1800px;perspective-origin:50% 20%}
.tilt-wrap{transform-style:preserve-3d}

/* ---------- Hero 3D layering ----------
   The hero stacks floating planes for depth via solid-coloured
   decorative shapes (no colour blends). Three geometric plates
   behind the hero card create a real sense of dimension. */
.hero-3d-stage{
  position:relative;z-index:1;
  transform-style:preserve-3d;
  perspective:1600px;
  isolation:isolate;
}
.hero-3d-stage::before,
.hero-3d-stage::after{
  content:"";position:absolute;border-radius:var(--r-xl);
  pointer-events:none;
}
/* Large lemon-leaf backplate */
.hero-3d-stage::before{
  inset:-60px -40px -60px -40px;
  background:var(--brand-500);
  opacity:.18;
  transform:translateZ(-80px) scale(1.04);
}
/* Smaller deep-green mid plate (offset, like a stack of cards) */
.hero-3d-stage::after{
  inset:-20px 40px -20px 60px;
  background:var(--brand-700);
  opacity:.22;
  transform:translateZ(-40px) scale(.98) rotate(-1.5deg);
}

/* The hero card (white TEEP WORK journey card) lifts slightly and shows
   a real shadow depth stack. */
.hero-card{
  transform:translateZ(40px) rotateX(2deg) rotateY(-2deg);
  transform-style:preserve-3d;
  box-shadow:
    0 1px 1px rgba(0,0,0,.10),
    0 8px 20px rgba(0,0,0,.18),
    0 30px 70px rgba(0,0,0,.30);
  transition:transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.hero-card:hover{
  transform:translateZ(60px) rotateX(1deg) rotateY(-1deg);
  box-shadow:
    0 1px 1px rgba(0,0,0,.10),
    0 10px 24px rgba(0,0,0,.20),
    0 40px 90px rgba(0,0,0,.35);
}

/* The image slot inside the hero card. Plain border + shadow. */
.hero-image-frame{
  position:relative;
  margin:14px -8px 4px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--bg-soft);
  aspect-ratio:16/9;
  transform:translateZ(20px);
  box-shadow:0 14px 30px rgba(0,0,0,.18);
}
.hero-image-frame img{
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .8s cubic-bezier(.2,.7,.2,1);
}
.hero-image-frame:hover img{transform:scale(1.04)}
/* Subtle dark scrim to anchor the image — SOLID colour. */
.hero-image-frame::after{
  content:"";position:absolute;inset:0;
  background:rgba(5,46,22,.18);
  pointer-events:none;
  opacity:0;
  transition:opacity .3s ease;
}
.hero-image-frame:hover::after{opacity:.6}

/* Floating number chips inside hero card step list, with parallax. */
.hero-card .flow-step .num{
  box-shadow:
    0 1px 2px rgba(11,61,38,.25),
    0 8px 18px rgba(11,61,38,.28);
  transform:translateZ(14px);
}

/* ---------- Decorative 3D shapes (CSS only) ----------
   Geometric shapes used inside hero / sections for a real "depth"
   feel without external assets. All plain solid colour — no blends. */
.shape{
  position:absolute;border-radius:50%;
  pointer-events:none;
  will-change:transform;
}
.shape-ring{
  border:1px solid rgba(255,255,255,.18);
  animation:shape-spin 30s linear infinite;
}
.shape-ring.r2{animation-direction:reverse;animation-duration:48s}
.shape-disc{
  background:var(--brand-500);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 18px 40px rgba(0,0,0,.35);
  animation:shape-float 7s ease-in-out infinite;
}
.shape-disc.d-green{
  background:var(--brand-700);
}
.shape-disc.d-leaf{
  background:var(--brand-400);
}
.shape-pill{
  border-radius:99px;
  background:var(--brand-500);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 14px 30px rgba(0,0,0,.30);
  animation:shape-float 9s ease-in-out infinite;
}
.shape-pill.dark{background:var(--brand-900)}
@keyframes shape-spin{
  from{transform:rotateZ(0deg)}
  to{transform:rotateZ(360deg)}
}
@keyframes shape-float{
  0%,100%{transform:translateY(0) translateZ(0)}
  50%   {transform:translateY(-14px) translateZ(20px)}
}

/* ---------- Floating image showcase ----------
   Strategic placement of web1/web2/web3. Each .visual-frame carries
   a layered floating effect — outer solid colour halo, mid shadow
   plane, foreground image — so the photo feels like a real 3D object.
   No colour gradients used anywhere. */
.visual{
  position:relative;
  display:block;
  border-radius:var(--r-xl);
  transform-style:preserve-3d;
  transform:perspective(1400px) rotateX(2deg) rotateY(-3deg);
  transition:transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.visual:hover{
  transform:perspective(1400px) rotateX(0deg) rotateY(0deg) translateY(-4px);
}
/* Outer solid-colour halo — a leaf-toned ring stacked behind the image. */
.visual::before{
  content:"";position:absolute;inset:-14px;border-radius:inherit;
  background:var(--brand-500);
  opacity:.55;z-index:-1;
  transition:opacity .35s ease, transform .35s ease;
}
/* Drop shadow plane (solid coloured offset rectangle for the cast). */
.visual::after{
  content:"";position:absolute;left:6%;right:-6%;bottom:-14px;height:18px;
  background:var(--brand-950);
  opacity:.20;border-radius:99px;
  filter:blur(2px);z-index:-1;pointer-events:none;
}
.visual:hover::before{opacity:.85;transform:translateY(-2px)}
.visual img{
  display:block;width:100%;height:auto;border-radius:inherit;
  box-shadow:
    0 1px 2px rgba(11,31,20,.12),
    0 12px 28px rgba(11,31,20,.18),
    0 32px 70px rgba(11,31,20,.22);
  border:1px solid rgba(255,255,255,.6);
  background:#fff;
}

/* Landscape frames (web2/web3) keep a 16:9 aspect by default. */
.visual.landscape{aspect-ratio:16/9;overflow:hidden}
.visual.landscape img{width:100%;height:100%;object-fit:cover}

/* Square frames (web1) use a 1:1 aspect. */
.visual.square{aspect-ratio:1/1;overflow:hidden}
.visual.square img{width:100%;height:100%;object-fit:cover}

/* Floating accent chip on top-right of a visual — solid brand colour. */
.visual-chip{
  position:absolute;top:14px;right:14px;
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:99px;
  background:var(--brand-900);
  color:#fff;font-size:.72rem;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;
  box-shadow:0 6px 16px rgba(0,0,0,.20);
  transform:translateZ(40px);
}
.visual-chip.leaf{background:var(--brand-500);color:var(--brand-950)}
.visual-chip.dark{background:var(--brand-950);color:#fff}

/* ---------- Visual grid (paired screenshots) ---------- */
.visual-grid{
  display:grid;gap:24px;align-items:center;
}
.visual-grid .copy{display:grid;gap:12px;align-content:center}

/* ---------- 3D stat / metric card ----------
   Replaces the flat .stat card with one that lifts and tilts on hover,
   shows a solid brand stripe on the bottom, and reads as a real
   physical card. No colour blends. */
.stat-3d{
  position:relative;display:block;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:22px 22px 24px;
  box-shadow:var(--shadow-xs);
  transform-style:preserve-3d;
  transform:perspective(1200px) translateZ(0) rotateX(0);
  transition:transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .2s ease;
  overflow:hidden;
}
.stat-3d::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:4px;
  background:var(--brand-700);
  transform:scaleX(.4);transform-origin:left center;
  transition:transform .35s ease, background .25s ease;
}
.stat-3d:hover{
  transform:perspective(1200px) translateZ(8px) rotateX(2deg) rotateY(-3deg) translateY(-3px);
  box-shadow:var(--shadow);
  border-color:var(--brand-200);
}
.stat-3d:hover::after{transform:scaleX(1);background:var(--brand-500)}
.stat-3d .v{
  font-size:1.85rem;font-weight:700;letter-spacing:-.02em;
  color:var(--brand-900);line-height:1;
}
.stat-3d .l{
  font-size:.78rem;color:var(--muted);
  margin-top:10px;font-weight:500;letter-spacing:.01em;
}
.stat-3d.dark{background:var(--brand-900);border-color:var(--brand-900);color:#fff}
.stat-3d.dark::after{background:var(--brand-500)}
.stat-3d.dark .v{color:#fff}
.stat-3d.dark .l{color:#9DBFAE}
.stat-3d.tint{background:var(--brand-50);border-color:var(--brand-100)}
.stat-3d.tint .v{color:var(--brand-700)}
.stat-3d.tint .l{color:var(--brand-800)}

/* ---------- Empty / placeholder (v4 — rich & colourful) ----------
   The "no data" box must NOT read as a flat white card. We use a
   solid brand-50 tint, a solid top stripe, decorative solid shapes
   and clear visual difference from the surrounding .page surface. */
.empty{
  padding:48px 28px;
  text-align:center;color:var(--text);
  border-radius:var(--r-lg);
  background:var(--brand-50);
  border:1px solid var(--brand-100);
  box-shadow:var(--shadow-xs);
  font-size:.92rem;line-height:1.6;
  position:relative;overflow:hidden;
}
.empty::before{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:var(--brand-700);
}
/* Solid corner disc for visual interest (not a gradient). */
.empty::after{
  content:"";position:absolute;right:-50px;bottom:-50px;
  width:200px;height:200px;border-radius:50%;
  background:var(--brand-100);
  pointer-events:none;
  opacity:.6;
}
.empty > *{position:relative;z-index:1}
.empty strong{
  display:block;color:var(--brand-900);font-weight:700;
  font-size:1.05rem;margin-bottom:6px;letter-spacing:-.01em;
}
.empty .ico{
  width:54px;height:54px;border-radius:50%;
  background:var(--brand-700);
  color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  margin:0 auto 14px;font-size:1.35rem;font-weight:700;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.25),
    0 12px 24px rgba(21,128,61,.30);
}
.empty .empty-cta{margin-top:14px}
.empty .empty-cta .btn{box-shadow:0 6px 14px rgba(21,128,61,.20)}

/* Slightly stronger empty variant (e.g. permanent states). */
.empty.empty-strong{
  background:var(--brand-100);
  border-color:var(--brand-200);
}
.empty.empty-strong::after{background:var(--brand-200);opacity:.7}

/* ---------- 3D step / principle cards ----------
   Lift cards out of the page so the grid feels like a real product
   surface instead of a flat list of rectangles. */
.step-card,
.principle,
.split-card,
.card,
.notif-item,
.list-row,
.tc-tile{
  transform-style:preserve-3d;
  transform:perspective(1200px) translateZ(0);
  transition:
    transform .35s cubic-bezier(.2,.7,.2,1),
    box-shadow .25s ease,
    border-color .2s ease;
}
.step-card:hover,
.principle:hover,
.card.hover:hover,
.notif-item:hover,
.list-row:hover{
  transform:perspective(1200px) translateZ(10px) translateY(-4px);
  box-shadow:var(--shadow);
  border-color:var(--brand-200);
}

/* Tilt on hover for the larger split-cards / hero cards. */
.split-card:hover{
  transform:perspective(1400px) translateZ(6px) translateY(-3px);
}
.tc-tile:hover{
  transform:perspective(1200px) translateZ(6px) translateY(-2px);
}

/* Subtle depth on the page-head eyebrow chip. */
.eyebrow{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}

/* ---------- Showcase section (image-led) ---------- */
.showcase{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:56px;align-items:center;
  padding:64px 0;
}
.showcase.reverse{grid-template-columns:.95fr 1.05fr}
.showcase .copy h2{font-size:clamp(1.6rem,2.8vw,2.05rem);letter-spacing:-.02em;color:var(--ink);font-weight:700;line-height:1.15}
.showcase .copy p{color:var(--muted);margin-top:14px;line-height:1.65;font-size:1rem}
.showcase .copy ul{list-style:none;display:grid;gap:10px;margin-top:18px}
.showcase .copy ul li{display:flex;gap:10px;align-items:flex-start;font-size:.92rem;color:var(--text)}
.showcase .copy ul li .tick{flex:none;width:22px;height:22px;border-radius:50%;background:var(--brand-100);color:var(--brand-700);display:inline-flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700}
.showcase .visual-wrap{position:relative}
/* Decorative solid-colour plates stacked behind the visual. */
.showcase .visual-wrap::before{
  content:"";position:absolute;
  top:-30px;left:-30px;width:180px;height:180px;border-radius:24px;
  background:var(--brand-500);
  opacity:.18;
  z-index:-1;
}
.showcase .visual-wrap::after{
  content:"";position:absolute;
  bottom:-30px;right:-30px;width:160px;height:160px;border-radius:50%;
  background:var(--brand-700);
  opacity:.14;
  z-index:-1;
}
@media (max-width:980px){
  .showcase,.showcase.reverse{grid-template-columns:1fr;gap:36px;padding:48px 0}
  .showcase.reverse .visual-wrap{order:-1}
  .showcase .visual-wrap::before,
  .showcase .visual-wrap::after{display:none}
}

/* ---------- Decorative background pattern (subtle) ----------
   Adds geometric depth via a dotted grid (solid-coloured dots —
   NOT a colour gradient). Uses an inline SVG data-URI for the
   pattern so the canvas remains purely solid-coloured elements. */
.pattern-dots{
  position:relative;
  background-color:transparent;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><circle cx='2' cy='2' r='1' fill='%23BBF7D0'/></svg>");
  background-size:24px 24px;
  background-position:0 0;
}
.pattern-grid{
  position:relative;
  background-color:transparent;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M0 0H32M0 0V32' stroke='%23DCFCE7' stroke-width='1'/></svg>");
  background-size:32px 32px;
  background-position:0 0;
}

/* ---------- Pill / feature row used on marketing pages ---------- */
.feat-row{
  display:grid;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;margin-top:24px;
}
.feat-pill{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;border-radius:14px;
  background:#fff;border:1px solid var(--line);
  box-shadow:var(--shadow-xs);
  font-size:.88rem;color:var(--text);font-weight:500;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feat-pill:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);border-color:var(--brand-200)}
.feat-pill .ico{
  flex:none;width:32px;height:32px;border-radius:9px;
  background:var(--brand-50);color:var(--brand-700);
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.95rem;
}

/* ---------- Animated background on hero (extra depth) ----------
   Three soft, slow-moving solid-coloured discs behind the hero copy
   for a 3D-feel. No colour blends — each disc is a single solid
   colour with low opacity, blurred to soften edges. */
.hero-bg-orbs{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.hero-orb{
  position:absolute;border-radius:50%;
  filter:blur(60px);opacity:.40;
  animation:orb-float 18s ease-in-out infinite;
}
.hero-orb.o1{width:380px;height:380px;background:var(--brand-500);left:-80px;top:-80px}
.hero-orb.o2{width:440px;height:440px;background:var(--brand-700);right:-120px;bottom:-120px;animation-delay:-6s;animation-duration:22s}
.hero-orb.o3{width:260px;height:260px;background:var(--brand-300);left:55%;top:30%;animation-delay:-10s;animation-duration:26s}
@keyframes orb-float{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%   {transform:translate3d(30px,-30px,0) scale(1.06)}
}
@media (prefers-reduced-motion:reduce){
  .hero-orb,.shape-disc,.shape-pill{animation:none}
}

/* ---------- Marketing CTA card (richer) ---------- */
.cta-card-3d{
  position:relative;
  background:var(--brand-950);
  color:#fff;
  border-radius:var(--r-xl);
  padding:48px 40px;
  text-align:center;
  overflow:hidden;
  box-shadow:
    0 1px 2px rgba(11,61,38,.20),
    0 30px 60px rgba(11,61,38,.30);
  transform:perspective(1400px) translateZ(0);
  transition:transform .4s ease, box-shadow .35s ease;
}
.cta-card-3d:hover{
  transform:perspective(1400px) translateZ(10px) translateY(-3px);
  box-shadow:
    0 1px 2px rgba(11,61,38,.20),
    0 40px 80px rgba(11,61,38,.40);
}
/* Solid leaf accent stripe at top. */
.cta-card-3d::before{
  content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:var(--brand-500);
}
/* Solid decorative disc in corner. */
.cta-card-3d::after{
  content:"";position:absolute;left:-100px;top:-100px;width:300px;height:300px;
  background:var(--brand-700);
  opacity:.20;
  border-radius:50%;pointer-events:none;
}
.cta-card-3d > *{position:relative;z-index:1}
.cta-card-3d h2{color:#fff;font-size:1.85rem;letter-spacing:-.01em;margin-bottom:10px;line-height:1.2}
.cta-card-3d p{color:#C4D8CB;margin:0 auto 24px;max-width:540px;font-size:1rem}

/* ---------- Glass surface (3D-ish translucent panel) ---------- */
.glass{
  background:rgba(255,255,255,.7);
  backdrop-filter:saturate(180%) blur(16px);
  -webkit-backdrop-filter:saturate(180%) blur(16px);
  border:1px solid rgba(255,255,255,.7);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);
}

/* ---------- Animated underline link ---------- */
.link-fancy{
  position:relative;color:var(--brand-700);font-weight:600;
  display:inline-flex;align-items:center;gap:6px;
}
.link-fancy::after{
  content:"";position:absolute;left:0;right:0;bottom:-3px;height:2px;
  background:var(--brand-700);
  transform:scaleX(0);transform-origin:left center;
  transition:transform .25s ease;border-radius:2px;
}
.link-fancy:hover::after{transform:scaleX(1);background:var(--brand-500)}

/* ---------- Mobile refinements for v4 ---------- */
@media (max-width:640px){
  .stat-3d .v{font-size:1.6rem}
  .empty{padding:36px 20px}
  .cta-card-3d{padding:36px 22px}
  .cta-card-3d h2{font-size:1.5rem}
  .visual::before{inset:-6px}
}

/* ---------- Homepage carousels (global-standard, no gradients) ----------
   Sideways scroll-snap rails with solid-colour arrows + dots.
   Cards use only solid deep green / lemon / white + 1px borders. */
.teep-carousel{position:relative;margin-top:8px}
.teep-rail-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.teep-rail-nav{display:flex;gap:8px;flex:none}
.teep-arrow{
  width:42px;height:42px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  background:#fff;border:1px solid var(--line-strong);color:var(--brand-900);
  transition:background .15s ease,color .15s ease,border-color .15s ease,transform .1s ease;
  box-shadow:var(--shadow-xs);
}
.teep-arrow:hover{background:var(--brand-900);border-color:var(--brand-900);color:#fff}
.teep-arrow:active{transform:scale(.94)}
.teep-arrow:disabled{opacity:.35;cursor:default;background:#fff;color:var(--muted);border-color:var(--line)}
.teep-arrow svg{width:18px;height:18px}
.teep-track{
  display:flex;gap:16px;
  overflow-x:auto;overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  padding:6px 4px 18px;
  margin:0 -4px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.teep-track::-webkit-scrollbar{display:none}
.teep-slide{
  flex:0 0 min(320px,84vw);
  scroll-snap-align:start;
  scroll-snap-stop:always;
}
.teep-slide.step-card,.teep-slide.principle{height:100%}
.teep-dots{display:flex;gap:8px;justify-content:center;margin-top:4px}
.teep-dot{
  width:8px;height:8px;border-radius:99px;background:var(--line-strong);
  transition:width .2s ease,background .2s ease;
}
.teep-dot.is-on{width:26px;background:var(--brand-500)}
.teep-progress{height:4px;border-radius:99px;background:var(--line-soft);margin-top:14px;overflow:hidden}
.teep-progress > i{display:block;height:100%;width:20%;background:var(--brand-500);border-radius:99px;transition:width .25s ease}
/* Trust ticker under hero — solid deep strip, auto-scrolling text */
.trust-strip{background:var(--brand-900);border-top:3px solid var(--brand-500);overflow:hidden}
.trust-strip-inner{
  display:flex;gap:0;width:max-content;
  animation:trust-scroll 28s linear infinite;
}
.trust-strip:hover .trust-strip-inner{animation-play-state:paused}
.trust-item{
  display:inline-flex;align-items:center;gap:10px;
  color:#fff;font-size:.82rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  padding:13px 28px;white-space:nowrap;
}
.trust-item .tdot{width:8px;height:8px;border-radius:50%;background:var(--brand-500);flex:none}
@keyframes trust-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){
  .trust-strip-inner{animation:none;flex-wrap:wrap;width:auto}
}
/* Slim why-cards row */
.why-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
@media (max-width:880px){.why-grid{grid-template-columns:1fr}}
.why-card{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:28px 26px;box-shadow:var(--shadow-xs);
  border-top:4px solid var(--brand-500);
}
.why-card.deep{border-top-color:var(--brand-900)}
.why-card h3{font-size:1.05rem;font-weight:700;color:var(--brand-900);letter-spacing:-.01em;margin:14px 0 8px}
.why-card p{font-size:.9rem;color:var(--muted);line-height:1.65}
.why-ico{
  width:44px;height:44px;border-radius:13px;
  background:var(--brand-900);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:700;
}
.why-ico.leaf{background:var(--brand-500);color:var(--brand-950)}
/* Scroll reveal — subtle lift, no colour tricks */
.reveal{opacity:0;transform:translateY(22px);transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.2,1)}
.reveal.is-in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}

/* ---------- Coordinator banner (worker pages) ----------
   First principles: a banner is 3 zones (avatar / identity / actions).
   Desktop: one row. Narrow: stack vertically, actions become full-width.
   No single-row flex that squeezes text, no unstyled .av, solid colours only. */
.coord-card{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;
  background:#fff;border:1px solid var(--line);border-left:4px solid var(--brand-600);
  border-radius:var(--r-lg);padding:16px 18px;margin-bottom:22px;box-shadow:var(--shadow-xs);
}
.coord-card .cc-avatar{
  width:48px;height:48px;border-radius:50%;flex:none;
  background:var(--brand-900);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:.95rem;font-weight:700;letter-spacing:.02em;
  overflow:hidden;
}
.coord-card .cc-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.coord-card .cc-body{min-width:0}
.coord-card .cc-name{display:block;font-size:.98rem;font-weight:700;color:var(--ink);line-height:1.35;overflow-wrap:anywhere}
.coord-card .cc-sub{display:block;font-size:.82rem;color:var(--muted);line-height:1.5;margin-top:2px;overflow-wrap:anywhere}
.coord-card .cc-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
@media (max-width:640px){
  .coord-card{grid-template-columns:auto minmax(0,1fr);gap:12px;padding:14px 15px}
  .coord-card .cc-avatar{width:44px;height:44px;font-size:.88rem}
  .coord-card .cc-actions{grid-column:1/-1;justify-content:stretch}
  .coord-card .cc-actions .btn{flex:1 1 auto;justify-content:center;white-space:nowrap}
}

/* ---------- Worker task cards (my-tasks) ----------
   Head wraps instead of squeezing; meta rows stack on phones. */
.task-card{min-width:0;overflow-wrap:anywhere}
.task-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.task-head .task-main{flex:1 1 auto;min-width:0}
.task-head .badge{flex:none;margin-top:2px}
.task-title{font-size:1.05rem;color:var(--ink);line-height:1.4;overflow-wrap:anywhere}
@media (max-width:640px){
  .task-head{flex-direction:column}
  .task-head .badge{align-self:flex-start;margin-top:0}
}
.rate-grid{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.rate-grid .field{margin-bottom:0}
.rate-grid .rate-stars{flex:0 1 140px;min-width:120px}
.rate-grid .rate-comment{flex:1 1 220px;min-width:0}
.rate-grid .rate-send{flex:none}
@media (max-width:560px){
  .rate-grid{flex-direction:column;align-items:stretch}
  .rate-grid .rate-stars,.rate-grid .rate-comment,.rate-grid .rate-send{flex:1 1 auto;min-width:0}
  .rate-grid .rate-send .btn{width:100%}
  .empty-cta{display:flex;flex-direction:column;gap:10px}
  .empty-cta .btn{width:100%}
  .submitForm .row .btn{flex:1 1 auto}
}
/* Bank summary row (wallet) — same principle: never squeeze one row on phones */
.bank-card{
  display:flex;align-items:center;gap:12px;
  border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:16px;
  background:var(--bg-soft);min-width:0;
}
.bank-card .bank-ico{
  flex:none;width:40px;height:40px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:var(--brand-50);color:var(--brand-700);font-size:1.2rem;
}
.bank-card .bank-body{flex:1;min-width:0}
.bank-card .bank-name{font-size:.92rem;display:block;overflow-wrap:anywhere;line-height:1.4}
.bank-card .bank-badges{margin-top:6px;display:flex;gap:6px;flex-wrap:wrap}
@media (max-width:480px){
  .bank-card{align-items:flex-start}
}

/* ---------- Google Sign-In (login.php / apply.php / google-complete.php) ---------- */
.g-wrap{margin-top:16px}
.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 16px;border:1px solid var(--line,#e2e8f0);border-radius:12px;background:#fff;color:var(--ink,#0f172a);font-weight:600;font-size:.95rem;text-decoration:none;transition:border-color .15s,box-shadow .15s}
.btn-google:hover{border-color:#cbd5e1;box-shadow:0 1px 6px rgba(15,23,42,.08)}
.g-ico{flex:none}
.g-fineprint{margin:8px 2px 0;font-size:.78rem;color:var(--muted);line-height:1.5}
.g-divider{display:flex;align-items:center;gap:12px;margin:16px 0 0;color:var(--muted);font-size:.8rem}
.g-divider::before,.g-divider::after{content:"";flex:1;height:1px;background:var(--line,#e2e8f0)}
.g-account{display:flex;align-items:center;gap:12px;padding:10px 14px;margin-bottom:16px;border:1px solid var(--line,#e2e8f0);border-radius:12px;background:var(--bg-soft,#f8fafc)}
.g-account .body{flex:1;min-width:0;display:flex;flex-direction:column}
.g-account .body strong{font-size:.92rem;color:var(--ink)}
.g-account .body span{font-size:.8rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.g-account .ok{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--brand-500);color:#fff;font-size:.8rem;font-weight:700;flex:none}
