/* ============================================================================
   ComplyGrid — "modern classic" theme layer
   Loaded after app.css. Same class names, a different temperament: a serif
   display face over a plain grotesk, ink and paper instead of teal and glow,
   hairlines instead of shadows, square corners, no gradients. The public site
   stays dark (midnight ink, ivory type, one brass accent); the workspace is
   paper with a charcoal rail.
   ========================================================================== */

:root {
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Inter", "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* the palette */
  --midnight: #14130f;      /* public site ground */
  --midnight-2: #1d1b17;    /* raised surfaces on the site */
  --navy: #2f3f9e;          /* the royal indigo the firm uses: rail, primary buttons */
  --navy-2: #27358a;
  --navy-3: #4557c0;
  --ivory: #ffffff;
  --paper: #f3f5fa;         /* workspace ground: cool light grey */
  --card: #ffffff;
  --line: #e4e8f2;
  --line-strong: #c9d0e3;
  --text: #1f2433;
  --text-2: #4b5368;
  --text-3: #6f788f;
  --green: #2f3f9e;         /* accent = the same indigo (links, focus, active marks) */
  --green-2: #4557c0;
  --green-soft: #eef2fb;    /* the light tint behind inputs and info notes */
  --brass: #2f3f9e;
  --brass-2: #6b7ad6;
  --brass-soft: #eef2fb;
  --link: #2f3f9e;
  --leaf: #22a447;          /* the leaf in the firm's logo: success, the nudge, the meter */
  --leaf-soft: #e6f6ea;
  --teal: #1b8fae;          /* the wave in the logo: the 'new' tag, highlights */
  /* the chart palette (donut, map markers, heat cells, legends) */
  --c-ok: #2e9e6a; --c-warn: #e0a21e; --c-bad: #d9534f; --c-info: #4f5fd6;
  --c-mute: #c3c9d8; --c-brand: #2f3f9e; --c-violet: #7c6bd6; --c-pink: #d66ba0;

  /* redirect the old brand tokens so nothing teal survives */
  --brand-600: #27358a;
  --brand-500: #2f3f9e;
  --brand-400: #4557c0;
  --brand-300: #8d9ae0;
  --brand-100: #eef2fb;
  --accent-600: #27358a;
  --accent-500: #2f3f9e;
  --accent-400: #6b7ad6;
  --accent-100: #eef2fb;

  --ok-600: #178a3c;  --ok-500: #22a447;  --ok-100: #e6f6ea;
  --warn-600: #9a5b0b; --warn-500: #d97706; --warn-100: #fdf1dc;
  --bad-600: #b42318;  --bad-500: #d92d20; --bad-100: #fde8e6;
  --info-600: #27358a; --info-500: #2f3f9e; --info-100: #eef2fb;

  --slate-600: #4b5368;
  --slate-500: #6f788f;
  --slate-400: #9aa3b8;
  --slate-300: #c9d0e3;
  --slate-200: #e4e8f2;
  --slate-100: #eef1f7;
  --slate-50:  #f7f8fc;

  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(31, 36, 51, .05);
  --shadow: 0 2px 6px rgba(31, 36, 51, .06), 0 1px 2px rgba(31, 36, 51, .04);
  --shadow-lg: 0 24px 60px rgba(31, 36, 51, .22);
}

body { font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "tnum"; }
h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 500; letter-spacing: 0; line-height: 1.15; }
.work h1, .work h2, .work h3, .work h4, .work h5, .work .kpi-value, .work .side-logo, .work .empty h4, .work .nudge-body b, .work .heat-cell b,
.ess h1, .ess h2, .ess h3, .tools h1, .tools h2, .tools h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -.01em; }
b, strong { font-weight: 600; }
code, pre, .mono { font-family: var(--mono); }

/* ==========================================================================
   PUBLIC SITE - the firm's look: white ground, royal indigo, sans type, rounded cards.
   The same temperament as the sign-in page and the workspace, so the whole product reads as one.
   ========================================================================== */
/* the public site is always light: a visitor's workspace dark-mode preference must not reach the marketing pages */
.site {
  --paper: #f3f5fa; --card: #ffffff; --line: #e4e8f2; --line-strong: #c9d0e3;
  --text: #1f2433; --text-2: #4b5368; --text-3: #6f788f;
  --navy: #2f3f9e; --navy-2: #27358a; --navy-3: #4557c0;
  --green: #2f3f9e; --green-2: #4557c0; --green-soft: #eef2fb; --brass: #2f3f9e; --brass-2: #6b7ad6; --brass-soft: #eef2fb;
  --link: #2f3f9e; --leaf: #22a447; --leaf-soft: #e6f6ea; --teal: #1b8fae;
  --slate-600: #4b5368; --slate-500: #6f788f; --slate-400: #9aa3b8; --slate-300: #c9d0e3; --slate-200: #e4e8f2; --slate-100: #eef1f7; --slate-50: #f7f8fc;
  --ok-600: #178a3c; --ok-500: #22a447; --ok-100: #e6f6ea; --warn-600: #9a5b0b; --warn-500: #d97706; --warn-100: #fdf1dc;
  --bad-600: #b42318; --bad-500: #d92d20; --bad-100: #fde8e6; --info-600: #27358a; --info-500: #2f3f9e; --info-100: #eef2fb;
  --brand-600: #27358a; --brand-500: #2f3f9e; --brand-400: #4557c0; --brand-300: #8d9ae0; --brand-100: #eef2fb;
  --accent-600: #27358a; --accent-500: #2f3f9e; --accent-400: #6b7ad6; --accent-100: #eef2fb;
  --c-ok: #2e9e6a; --c-warn: #e0a21e; --c-bad: #d9534f; --c-info: #4f5fd6; --c-mute: #c3c9d8; --c-brand: #2f3f9e; --c-violet: #7c6bd6; --c-pink: #d66ba0;
  --shadow-sm: 0 1px 2px rgba(31, 36, 51, .05); --shadow: 0 2px 6px rgba(31, 36, 51, .06), 0 1px 2px rgba(31, 36, 51, .04); --shadow-lg: 0 24px 60px rgba(31, 36, 51, .22);
  background: #fff; color: var(--text-2);
}
.site::before { display: none; }
.site h1, .site h2, .site h3, .site h4 { color: var(--text); font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; }

.nav { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { height: 66px; }
.logo { font-family: var(--sans); font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--navy); }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--navy); color: #fff; font-family: var(--sans); font-weight: 800; font-size: 13px; box-shadow: none; }
.nav-links a, .nav-drop > button { color: var(--text-2); font-weight: 500; border-radius: 8px; font-size: 14px; }
.nav-links a:hover, .nav-drop > button:hover { color: var(--navy); background: var(--green-soft); }
.nav-drop-menu { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; }
.nav-drop-menu a { border-radius: 9px; }
.nav-drop-menu a:hover { background: var(--slate-50); }
.nav-drop-menu strong { color: var(--text); font-weight: 600; }
.nav-drop-menu span { color: var(--text-3); }

.btn { border-radius: 10px; font-weight: 600; letter-spacing: 0; }
.btn-primary { background: linear-gradient(90deg, #2a3890, #3b4cb8); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(47, 63, 158, .22); }
.btn-primary:hover { background: linear-gradient(90deg, #27358a, #3446ad); filter: none; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--navy); background: #fff; }
.btn-ghost:hover { background: var(--green-soft); border-color: var(--navy-3); }

.eyebrow { color: var(--navy); background: none; border: 0; padding: 0; border-radius: 0; font-family: var(--sans); font-weight: 600; letter-spacing: .14em; font-size: 11.5px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }
.dot { display: none; }

.hero { padding: 92px 0 64px; background: radial-gradient(900px 480px at 12% -10%, #e4e9fb 0%, rgba(228, 233, 251, 0) 62%), radial-gradient(700px 420px at 96% -4%, #e6f6ea 0%, rgba(230, 246, 234, 0) 58%); }
.hero h1 { font-family: var(--sans); font-weight: 700; font-size: clamp(36px, 5.2vw, 62px); letter-spacing: -.03em; line-height: 1.05; max-width: 16ch; color: var(--text); }
.hero h1 em { font-style: normal; background: none; color: var(--navy); -webkit-text-fill-color: currentColor; }
.hero-lede { color: var(--text-2); font-size: 17.5px; font-weight: 400; max-width: 58ch; }

.stat-strip { background: var(--line); border: 1px solid var(--line); border-radius: 16px; margin-top: 56px; box-shadow: var(--shadow); }
.stat-strip > div { background: #fff; }
.stat-strip b { font-family: var(--sans); font-weight: 700; font-size: 30px; letter-spacing: -.02em; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-strip span { color: var(--text-3); }

.sec-head h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(27px, 3.3vw, 38px); letter-spacing: -.025em; }
.sec-head p { color: var(--text-2); }
.sec-alt { background: var(--paper); border-block: 1px solid var(--line); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.card:hover { border-color: var(--navy-3); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(31, 36, 51, .12); }
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 17.5px; letter-spacing: -.015em; }
.card p { color: var(--text-2); }
.card-tag { color: var(--navy); background: var(--green-soft); border: 1px solid #cfd7f3; border-radius: 6px; letter-spacing: .09em; }
.card-num { color: var(--navy); }
.ticks li { color: var(--text-2); }
.ticks li::before { border-color: var(--leaf); }
.crosses li::before { color: var(--bad-500); }

.cmp th { color: var(--text-3); }
.cmp th, .cmp td { border-bottom-color: var(--line); }
.cmp td:first-child { color: var(--text); font-weight: 600; }
.cmp td:nth-child(2) { color: var(--text-3); }
.cmp td:last-child { color: var(--text); }
.cmp tbody tr:hover { background: var(--slate-50); }
.cmp .col-us { background: var(--green-soft); }

.rail-step { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.rail-step::after { background: linear-gradient(180deg, var(--navy), rgba(47, 63, 158, 0)); width: 3px; }
.rail-step h4 { font-family: var(--sans); font-weight: 600; font-size: 16px; color: var(--text); }
.rail-step p { color: var(--text-2); }
.chip { border-radius: 999px; color: var(--text-2); background: var(--slate-50); border-color: var(--line); }

.tab { border-radius: 999px; background: #fff; border-color: var(--line-strong); color: var(--text-2); font-weight: 600; }
.tab:hover { color: var(--navy); border-color: var(--navy-3); }
.tab.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.faq details { border-radius: 12px; background: #fff; border-color: var(--line); }
.faq summary { color: var(--text); font-family: var(--sans); font-weight: 600; font-size: 15.5px; }
.faq summary::after { color: var(--navy); }
.faq details > div { color: var(--text-2); }

.cta-band { background: linear-gradient(135deg, #34449f 0%, #2a3890 55%, #1f2a73 100%); border: 0; border-radius: 22px; padding: 56px; color: #dfe4fb; box-shadow: 0 24px 60px rgba(31, 42, 115, .28); }
.cta-band h2 { color: #fff; font-family: var(--sans); font-weight: 700; font-size: clamp(26px, 3.2vw, 36px); }
.cta-band p { color: #dfe4fb; }
.cta-band .btn-primary { background: #fff; color: var(--navy); box-shadow: none; }
.cta-band .btn-primary:hover { background: #eef2fb; }
.cta-band .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.cta-band .eyebrow { color: #c9d0f2; }
.cta-band .eyebrow::before { background: #c9d0f2; }

.foot { background: var(--paper); border-top: 1px solid var(--line); }
.foot h5 { color: var(--navy); letter-spacing: .12em; font-weight: 700; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--navy); }
.foot-bottom { border-top-color: var(--line); color: var(--text-3); }

.site label { color: var(--text-2); font-weight: 600; }
.site input, .site select, .site textarea { border-radius: 10px; background: #eef2fb; border-color: #dbe1f1; color: var(--text); }
.site input:focus, .site select:focus, .site textarea:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(47, 63, 158, .16); }
.site option { background: #fff; color: var(--text); }
.site input::placeholder, .site textarea::placeholder { color: var(--text-3); }
.site input[type="checkbox"], .site input[type="radio"] { accent-color: var(--navy); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.code { background: #151a2e; border-color: #262c4a; border-radius: 12px; color: #d9def5; }
.code .k { color: #9aa8ff; } .code .s { color: #f3c46d; } .code .n { color: #f49ac1; }
.meth { border-radius: 6px; }
.meth-get { background: var(--green-soft); color: var(--navy); border-color: #cfd7f3; }
.meth-post { background: var(--ok-100); color: var(--ok-600); border-color: #bfe3c9; }
.site .flash { background: #fff; border-color: var(--line); border-radius: 10px; color: var(--text); }
.site .flash-success { background: var(--ok-100); border-color: #bfe3c9; color: var(--ok-600); }
.site .flash-error { background: var(--bad-100); border-color: #f5b5ae; color: var(--bad-600); }
.site .flash-warning { background: var(--warn-100); border-color: #f1d9a6; color: var(--warn-600); }
.site .note { background: var(--slate-50); color: var(--text-2); border-left: 3px solid var(--navy-3); border-radius: 10px; }
.site .note-warn { background: var(--warn-100); border-color: var(--warn-500); color: var(--warn-600); }
.site .note-info { background: var(--green-soft); border-color: var(--navy); color: #2a3366; }
.site .badge { border-radius: 999px; }

/* ==========================================================================
   WORKSPACE
   ========================================================================== */
.work { background: var(--paper); color: var(--text); }

.side { background: linear-gradient(170deg, #34449f 0%, #2a3890 45%, #1f2a73 100%); color: #d6dbf3; width: 252px; flex-basis: 252px; }
.side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); }
.side-logo {
  background: #30409c; border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--sans); font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: #fff;
  padding: 18px 20px;
}
.side .logo-mark { background: #fff; color: #2f3f9e; border-radius: 9px; font-weight: 800; }
.side-org { border-bottom: 1px solid rgba(255, 255, 255, .12); color: #b9c2ec; }
.side-org b { color: #fff; font-weight: 600; }
.side-sec { color: #aeb8ea; letter-spacing: .16em; font-weight: 700; font-size: 10px; padding-top: 22px; }
.side a.nav-item { color: #e2e6f8; padding: 8px 14px; margin: 1px 10px; font-size: 13.4px; border-left: 0; border-radius: 10px; }
.side a.nav-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.side a.nav-item.on { background: #fff; color: #2f3f9e; font-weight: 600; box-shadow: 0 4px 14px rgba(15, 22, 70, .25); }
.side a.nav-item.on .nav-count { background: #eef2fb; color: #2f3f9e; }
.nav-ico { display: none; }
.nav-count { background: rgba(255, 255, 255, .16); border-radius: 999px; font-weight: 600; }
.nav-count.hot { background: #ff6b5e; color: #fff; }
.nav-count.newtag { background: var(--teal); color: #fff; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; }
.badge.b-new { background: var(--teal); color: #fff; }

/* the bar wraps instead of cutting the title: the title keeps its line, the buttons flow underneath when the row is full */
.topbar { background: #fff; border-bottom: 1px solid var(--line); height: auto; min-height: 64px; padding: 10px 26px; flex-wrap: wrap; row-gap: 8px; box-shadow: 0 1px 0 rgba(31, 36, 51, .03); }
.topbar > div:first-child { min-width: 0; flex: 1 1 280px; }
.topbar h1 { font-family: var(--sans); font-weight: 700; font-size: 21px; color: var(--navy); letter-spacing: -.015em; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.topbar .sub { color: var(--text-3); white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }
.topbar .wbtn-sm { padding: 6px 12px; font-size: 12.8px; }
.avatar { border-radius: 999px; background: linear-gradient(135deg, #4557c0, #2a3890); color: #fff; font-family: var(--sans); font-weight: 700; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d6dbf3; }
.user-menu-panel { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow-lg); background: var(--card); }
.user-menu-panel a { border-radius: 8px; color: var(--text-2); }
.user-menu-panel a:hover { background: var(--slate-50); }
.user-menu-head { border-bottom-color: var(--line); }
.user-menu-head b { color: var(--text); font-weight: 500; }

.wcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.wcard-head { border-bottom: 1px solid var(--line); padding: 14px 20px; }
.wcard-head h3 { font-family: var(--sans); font-weight: 700; font-size: 16px; color: var(--navy); }
.wcard-head .hint { color: var(--text-3); }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi::after { height: 4px; background: linear-gradient(90deg, #4557c0, #2a3890); }
.kpi.ok::after { background: var(--ok-500); }
.kpi.warn::after { background: var(--warn-500); }
.kpi.bad::after { background: var(--bad-500); }
.kpi-label { color: var(--text-3); letter-spacing: .12em; font-weight: 500; font-size: 10.6px; }
.kpi-value { font-family: var(--sans); font-weight: 700; font-size: 30px; letter-spacing: -.02em; color: var(--navy); font-variant-numeric: tabular-nums; }
/* a KPI that opens the list behind it */
a.kpi { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.kpi:hover { border-color: var(--navy-3); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
a.kpi .kpi-note { position: relative; padding-right: 18px; }
a.kpi .kpi-note::after { content: "→"; position: absolute; right: 0; bottom: 0; color: var(--navy); font-weight: 700; opacity: .55; }
a.kpi:hover .kpi-note::after { opacity: 1; }
.kpi-value small { font-family: var(--sans); font-weight: 500; }
.kpi-note { color: var(--text-3); }

table.data { font-size: 13.2px; }
table.data th {
  background: var(--slate-50); color: var(--text-2); letter-spacing: .08em; font-weight: 600; font-size: 10.6px;
  border-bottom: 1px solid var(--line);
}
table.data td { border-bottom: 1px solid var(--slate-100); }
table.data tbody tr:hover { background: var(--slate-50); }
table.data a { color: var(--link); font-weight: 500; }
/* a button is a button, even when it sits in a table cell: never the link colour on its own fill */
table.data a.wbtn, .work a.wbtn, .ess a.wbtn, .tools a.wbtn { color: var(--text); text-decoration: none; }
table.data a.wbtn-primary, .work a.wbtn-primary, .wbtn-primary, table.data a.wbtn-ok, .wbtn-ok { color: #fff !important; }
table.data a.wbtn-bad, .wbtn-bad { color: var(--bad-600); }
.wbtn-ok { background: var(--leaf); border-color: var(--leaf); }
.wbtn-ok:hover { background: #178a3c; border-color: #178a3c; }
.num { font-family: var(--mono); font-size: 12.4px; }

.badge { border-radius: 999px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 10.2px; padding: 2px 8px; }
.b-ok { background: var(--ok-100); color: var(--ok-600); border-color: #c6e3cf; }
.b-warn { background: var(--warn-100); color: var(--warn-600); border-color: #ecd9ad; }
.b-bad { background: var(--bad-100); color: var(--bad-600); border-color: #efc4c0; }
.b-info { background: var(--info-100); color: var(--info-600); border-color: #c9d6ee; }
.b-mute { background: var(--slate-100); color: var(--text-2); border-color: var(--line); }
.b-brand { background: var(--green-soft); color: var(--green); border-color: #cfdfd5; }

.meter { border-radius: 999px; background: var(--slate-100); height: 6px; }
.meter > i { border-radius: 999px; background: var(--navy); }
.meter.ok > i { background: var(--ok-500); }
.meter.warn > i { background: var(--warn-500); }
.meter.bad > i { background: var(--bad-500); }

.work input, .work select, .work textarea {
  border-radius: 10px; border: 1px solid #dbe1f1; background: #eef2fb; color: var(--text);
}
.work input:focus, .work select:focus, .work textarea:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(47, 63, 158, .16); }
.work label { color: var(--text-2); font-weight: 500; }

.wbtn { border-radius: var(--radius-sm); font-weight: 500; border-color: var(--line-strong); color: var(--text); background: #fff; letter-spacing: 0; box-shadow: var(--shadow-sm); }
.wbtn:hover { border-color: var(--navy-3); background: var(--slate-50); }
.wbtn-primary { background: linear-gradient(90deg, #2a3890, #3b4cb8); border-color: #2a3890; color: #fff; box-shadow: 0 4px 12px rgba(47, 63, 158, .25); }
.wbtn-primary:hover { background: linear-gradient(90deg, #27358a, #3446ad); border-color: #27358a; }
.wbtn-ok { background: var(--ok-600); border-color: var(--ok-600); }
.wbtn-bad { border-color: #d9a9a6; color: var(--bad-600); }
.wbtn-bad:hover { background: var(--bad-100); }

.filters { background: var(--slate-50); border-bottom: 1px solid var(--line); }
.filters label { color: var(--text-3); letter-spacing: .1em; }

.flash { border-radius: var(--radius-sm); }
.flash-success { background: var(--ok-100); border-color: #c8dcc4; color: #244f2d; }
.flash-error { background: var(--bad-100); border-color: #e4c3c0; color: #6e2222; }
.flash-warning { background: var(--warn-100); border-color: #e5d3a8; color: #66410c; }

.note { border-radius: 10px; background: var(--slate-50); color: var(--text-2); border-left-width: 3px; border-left-color: var(--navy-3); }
.note-warn { background: var(--warn-100); border-color: var(--warn-500); color: #5c3c0a; }
.note-info { background: #eef2fb; border-color: var(--navy); color: #2a3366; }
.note-bad { background: var(--bad-100); border-color: var(--bad-500); color: #6e2222; }
.verify { border-radius: 999px; background: var(--warn-100); border-color: #ecd9ad; color: var(--warn-600); font-weight: 500; }
.kv dt { color: var(--text-3); font-weight: 500; }
.kv dd { color: var(--text); }
.empty h4 { font-family: var(--serif); font-size: 18px; color: var(--text); }
.muted { color: var(--text-3); }

.timeline li { border-left-color: var(--line); }
.timeline li::before { border-color: var(--navy); background: var(--card); border-radius: 999px; }
.heat-cell { border-radius: 6px; }
.heat-cell b { font-family: var(--serif); font-weight: 500; }
.bars i { background: var(--navy); border-radius: 3px 3px 0 0; }
.cal-d { border-radius: 8px; background: var(--card); border-color: var(--line); }
.cal-d.pad { background: var(--slate-50); }
.cal-d.today { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.cal-item { border-radius: 6px; }

.nudge { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--leaf); border-radius: 14px; box-shadow: var(--shadow); }
.nudge-step { background: linear-gradient(135deg, #2bb455, #178a3c); color: #fff; border-radius: 10px; font-weight: 700; font-family: var(--sans); font-size: 13px; }
.nudge-body b { font-family: var(--serif); font-weight: 500; font-size: 15px; }
:root[data-theme="dark"] .nudge { background: var(--card); border-color: var(--line); border-left-color: var(--brass-2); }
:root[data-theme="dark"] .nudge-step { background: var(--brass-soft); color: var(--brass-2); }
.notif-row { border-radius: 8px; }

/* ---- Resources: the highlighted tab in both rails */
.side .nav-item.nav-hot { margin: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff !important; font-weight: 600; }
.side .nav-item.nav-hot .nav-ico { color: #fff; }
.side .nav-item.nav-hot .nav-count { background: var(--teal); color: #fff; }
.side .nav-item.nav-hot:hover, .side .nav-item.nav-hot.on { background: #fff; color: #2f3f9e !important; }

/* ---- Resources shelf */
.res-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .res-layout { grid-template-columns: 1fr; } }
.rnav { padding: 6px 6px 10px; position: sticky; top: 14px; }
.rnav a { display: flex; gap: 9px; align-items: center; padding: 7px 10px; font-size: 13.5px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; }
.rnav a .nav-ico { width: 16px; text-align: center; color: var(--text-3); }
.rnav a:hover { background: var(--paper); }
.rnav a.on { background: var(--green-soft); border-left-color: var(--green); font-weight: 600; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.res-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); }
.res-card:hover { border-color: var(--green); }
.res-ico { font-size: 18px; width: 26px; text-align: center; color: var(--green); font-family: "Newsreader", Georgia, serif; }
:root[data-theme="dark"] .rnav a.on { background: rgba(169,135,59,.18); }

.cmenu summary::-webkit-details-marker { display: none; }
.cmenu-panel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 230px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; text-align: left; }
.cmenu-panel a { display: block; padding: 6px 9px; font-size: 13px; color: var(--text); text-decoration: none; }
.cmenu-panel a:hover { background: var(--slate-50); }
:root[data-theme="dark"] .cmenu-panel { background: var(--card); border-color: var(--line); }

.practice-bar { background: var(--paper); color: var(--text); border-bottom: 1px solid var(--line); gap: 12px; }
.practice-bar .pill { background: var(--navy); color: var(--ivory); }
.practice-bar a { color: var(--link); text-decoration: none; font-weight: 500; }
.practice-bar a:hover { text-decoration: underline; }
.practice-bar select { background: #fff; border: 1px solid var(--line-strong); color: var(--text); border-radius: 2px; }
:root[data-theme="dark"] .practice-bar { background: var(--card); color: var(--text); border-color: var(--line); }
:root[data-theme="dark"] .practice-bar .pill { background: var(--ivory); color: var(--navy); }
:root[data-theme="dark"] .practice-bar select { background: var(--paper); border-color: var(--line-strong); color: var(--text); }

.demo-bar { background: var(--navy); color: var(--ivory); border-bottom: 1px solid var(--brass); }
.demo-bar a { color: var(--brass-2); }
.demo-bar .pill { background: var(--brass); color: var(--midnight); border-radius: 0; font-weight: 600; }

dialog { border-radius: 4px !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(20, 19, 15, .55); }

.theme-toggle { border-radius: 2px; border-color: var(--line-strong); }

.legend .sw { border-radius: 0; }
.donut-centre { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
.map-outline { fill: var(--slate-100); stroke: var(--line-strong); }

/* ---- auth pages (dark left panel, paper form) */
.auth-aside { border-right: 1px solid rgba(243, 238, 226, .12); }

/* ==========================================================================
   EMPLOYEE PORTAL - a personal, phone-first home: one hero, one "today", the month at a
   glance, and everything else a tap away. Scoped under .ess.
   ========================================================================== */
.ess { background: var(--paper); padding-bottom: 96px; font-family: var(--sans); }
.ess h1, .ess h2, .ess h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; }
.ess .spacer { flex: 1; }
.ess-hero { background: radial-gradient(900px 320px at 90% -40%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(135deg, #3a4ab0 0%, #2d3b9e 55%, #212b7a 100%);
  color: #fff; padding: 14px 18px 74px; border-bottom: 0; border-radius: 0 0 30px 30px; box-shadow: 0 18px 40px rgba(31, 42, 115, .25); position: relative; }
.ess-hero-in { max-width: 820px; margin: 0 auto; }
.ess-hero-row { display: flex; align-items: center; gap: 10px; max-width: none; margin: 0 0 18px; }
.ess-brand { width: 30px; height: 30px; border-radius: 8px; background: #fff; padding: 3px; box-sizing: border-box; }
.ess-hero-brand { font-weight: 700; font-size: 15px; line-height: 1.1; letter-spacing: -.01em; }
.ess-hero-brand small { display: block; font-weight: 500; font-size: 11px; color: rgba(255, 255, 255, .7); margin-top: 2px; }
.ess-iconbtn { width: 36px; height: 36px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; text-decoration: none; font-size: 15px; cursor: pointer; font-family: var(--sans); padding: 0; }
.ess-iconbtn:hover { background: rgba(255, 255, 255, .24); }
.ess-iconbtn.theme-toggle::after { content: none; }
.ess-who { display: flex; align-items: center; gap: 14px; }
.ess-avatar { width: 58px; height: 58px; border-radius: 999px; background: #fff; color: #2f3f9e; border: 0; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 800; font-size: 23px; letter-spacing: -.02em; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); flex: none; }
.ess-who-text { min-width: 0; }
.ess-greet { display: block; font-size: 13px; color: rgba(255, 255, 255, .78); font-weight: 500; margin-bottom: 1px; }
.ess-hero b { font-family: var(--sans); font-weight: 800; font-size: 24px; letter-spacing: -.025em; display: block; line-height: 1.15; }
.ess-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ess-chips span { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); color: #fff; }
.ess-hero .sub { color: rgba(255, 255, 255, .78); }
.ess-hero .wbtn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .24); color: #fff; border-radius: 999px; }
.ess-wrap { max-width: 820px; margin: -56px auto 0; padding: 0 14px; position: relative; }

/* the "today" card sits on the hero */
.ess-today { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 16px; box-shadow: 0 18px 44px rgba(31, 36, 51, .14); margin-bottom: 14px; }
.ess-today-top { display: flex; align-items: flex-start; gap: 14px; }
.ess-today-top > div:first-child { flex: 1; min-width: 0; }
.ess-k { font-size: 10.8px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.ess-today-status { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--text); margin-top: 4px; line-height: 1.1; }
.ess-today-status.ok { color: #178a3c; }
.ess-today-status.warn { color: var(--warn-600); }
.ess-today-sub { font-size: 12.6px; color: var(--text-2); margin-top: 5px; }
.ess-punch { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 74px; height: 74px; border-radius: 22px; flex: none;
  background: linear-gradient(135deg, #3b4cb8, #2a3890); color: #fff; text-decoration: none; font-weight: 700; font-size: 12px; box-shadow: 0 10px 24px rgba(47, 63, 158, .35); }
.ess-punch:hover { transform: translateY(-1px); }
.ess-inout { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ess-inout > div:not(.ess-inout-line) { display: flex; flex-direction: column; gap: 2px; }
.ess-inout b { font-family: var(--mono); font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.ess-inout-line { flex: 1; height: 2px; background: var(--line); border-radius: 2px; position: relative; }
.ess-inout-line i { position: absolute; left: 0; top: 0; bottom: 0; width: 60%; background: linear-gradient(90deg, #22a447, #2f3f9e); border-radius: 2px; }
.ess-flag { margin-top: 12px; background: var(--warn-100); color: var(--warn-600); border-radius: 10px; padding: 8px 12px; font-size: 12.4px; }

/* cards */
.ess-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.ess-card-head { padding: 16px 18px 0; display: flex; align-items: center; gap: 9px; }
.ess-card-head h3 { font-size: 15.5px; margin: 0; color: var(--text); }
.ess-card-head .hint { font-size: 11.6px; color: var(--text-3); }
.ess-card-body { padding: 14px 18px 16px; }
.ess-more { font-size: 12.4px; font-weight: 600; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ess-more:hover { text-decoration: underline; }
.ess-foot { margin: 0; padding: 0 18px 14px; font-size: 12px; color: var(--text-3); }

/* the month at a glance */
.ess-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ess-cal-h { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-3); letter-spacing: .06em; padding-bottom: 2px; }
.ess-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--slate-50); border: 1px solid transparent; }
.ess-day.future { color: var(--slate-400); background: transparent; border-color: var(--line); }
.ess-day.p { background: #e6f6ea; color: #178a3c; }
.ess-day.hd { background: #fdf1dc; color: #9a5b0b; }
.ess-day.a { background: #fde8e6; color: #b42318; }
.ess-day.l { background: #efe9fb; color: #6a4fc4; }
.ess-day.wo { background: var(--slate-100); color: var(--text-3); }
.ess-day.hol { background: #e3f3f8; color: #1b8fae; }
.ess-day.mp { background: #fff; color: #9a5b0b; border-color: #f1d9a6; border-style: dashed; }
.ess-day.today { box-shadow: 0 0 0 2px var(--navy); }
.ess-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 10.8px; color: var(--text-3); }
.ess-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.ess-legend i.p { background: #22a447; } .ess-legend i.hd { background: #d97706; } .ess-legend i.a { background: #d92d20; } .ess-legend i.l { background: #6a4fc4; }
.ess-legend i.wo { background: #c9d0e3; } .ess-legend i.hol { background: #1b8fae; } .ess-legend i.mp { background: #fff; border: 1px dashed #d97706; }

/* numbers */
.ess-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); margin-top: 4px; }
.ess-stat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 0; border-radius: 0; box-shadow: none; text-align: left; }
.ess-stat .v { font-family: var(--sans); font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1.1; }
.ess-stat .v small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.ess-stat .k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-top: 3px; }
.ess-stat.bad .v { color: var(--bad-600); } .ess-stat.warn .v { color: var(--warn-600); }
.ess-ico { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; font-style: normal; }
.ess-ico.t-indigo { background: #eef2fb; color: #2f3f9e; } .ess-ico.t-leaf { background: #e6f6ea; color: #178a3c; } .ess-ico.t-teal { background: #e3f3f8; color: #1b8fae; }
.ess-ico.t-amber { background: #fdf1dc; color: #b45309; } .ess-ico.t-violet { background: #efe9fb; color: #6a4fc4; } .ess-ico.t-rose { background: #fde8e6; color: #b42318; }

/* quick actions */
.ess-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px 12px 16px; }
.ess-quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 16px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 12px; text-align: center; position: relative; transition: background .12s; }
.ess-quick a:hover { background: var(--slate-50); }
.ess-quick a .ess-ico { width: 46px; height: 46px; border-radius: 15px; }
.ess-quick .tag { position: absolute; top: 8px; right: calc(50% - 30px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad-500); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* lists, pay, leave, holidays */
.ess-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ess-two .ess-card { margin-bottom: 14px; }
.ess-row { display: flex; gap: 12px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.ess-card-head + .ess-row, .ess-card-head + .ess-bal + .ess-row { border-top: 0; margin-top: 6px; }
.ess-row:hover { background: var(--slate-50); }
.ess-row .t { font-weight: 600; font-size: 13.4px; color: var(--text); } .ess-row .s { font-size: 11.8px; color: var(--text-3); margin-top: 2px; }
.ess-bal { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 4px; }
.ess-bal div { background: var(--slate-50); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 70px; }
.ess-bal b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; }
.ess-bal span { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.ess-pay { display: block; margin: 12px 18px 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: #fff; position: relative;
  background: linear-gradient(135deg, #34449f, #1f2a73); box-shadow: 0 12px 28px rgba(31, 42, 115, .25); }
.ess-pay .ess-k { color: rgba(255, 255, 255, .72); }
.ess-pay-net { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.ess-pay-sub { font-size: 12px; color: rgba(255, 255, 255, .78); margin-top: 2px; }
.ess-pay-open { position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 5px 10px; display: inline-flex; align-items: center; gap: 4px; }
.ess-date { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--green-soft); color: var(--navy); padding: 5px 0; }
.ess-date b { display: block; font-size: 18px; font-weight: 800; line-height: 1; }
.ess-date span { font-size: 10px; letter-spacing: .08em; font-weight: 700; }
.ess-empty { padding: 22px 18px 24px; text-align: center; color: var(--text-3); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ess-empty .big { display: none; }
.ess-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 16px; color: var(--text-3); box-shadow: var(--shadow); margin-bottom: 14px; }
.ess-search input { flex: 1; border: 0; background: transparent; padding: 8px 4px; font-size: 14px; color: var(--text); width: auto; }
.ess-search input:focus { outline: 0; box-shadow: none; }
.ess-search .wbtn { border-radius: 999px; }
.ess .flash { border-radius: 14px; }
.ess .wcard { border-radius: 18px; }

/* the floating bottom bar */
.ess-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 24px)); z-index: 40;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 40px rgba(31, 36, 51, .18); display: flex; padding: 6px; }
.ess-nav a { flex: 1; text-align: center; padding: 7px 2px 6px; font-size: 10.5px; font-weight: 600; color: var(--text-3); text-decoration: none; border-radius: 16px; position: relative; }
.ess-nav a i { display: grid; place-items: center; height: 24px; margin: 0 auto 2px; font-style: normal; }
.ess-nav a.on { color: var(--navy); background: var(--green-soft); }
.ess-nav a.on::before { content: none; }
.ess-nav a.punch { color: #fff; background: linear-gradient(135deg, #3b4cb8, #2a3890); margin: -14px 4px 0; padding-top: 10px; border-radius: 18px; box-shadow: 0 8px 20px rgba(47, 63, 158, .35); }
.ess-nav a.punch.on { color: #fff; }
@media (max-width: 720px) {
  .ess-two { grid-template-columns: 1fr; }
  .ess-stats { grid-template-columns: repeat(2, 1fr); }
  .ess-quick { grid-template-columns: repeat(4, 1fr); }
  .ess-hero { padding: 12px 16px 70px; border-radius: 0 0 26px 26px; }
  .ess-hero b { font-size: 22px; }
  .ess-pay-open { position: static; margin-top: 10px; }
}
@media (max-width: 400px) { .ess-quick { grid-template-columns: repeat(3, 1fr); } .ess-inout b { font-size: 17px; } }

/* dark */
:root[data-theme="dark"] .ess { background: var(--paper); }
:root[data-theme="dark"] .ess-hero { background: radial-gradient(900px 320px at 90% -40%, rgba(139, 155, 255, .18), transparent 60%), linear-gradient(135deg, #1b1f3a 0%, #15172a 60%, #0f1118 100%); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .ess-avatar { background: #6b7bf7; color: #fff; }
:root[data-theme="dark"] .ess-today, :root[data-theme="dark"] .ess-card, :root[data-theme="dark"] .ess-stat, :root[data-theme="dark"] .ess-search { background: var(--card); border-color: var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .ess-stats { background: var(--line); }
:root[data-theme="dark"] .ess-today-status.ok { color: #5fd3a6; }
:root[data-theme="dark"] .ess-punch, :root[data-theme="dark"] .ess-nav a.punch { background: linear-gradient(135deg, #5a6af0, #7b8aff); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
:root[data-theme="dark"] .ess-inout-line i { background: linear-gradient(90deg, #4fd1a1, #8b9bff); }
:root[data-theme="dark"] .ess-day { background: #1b1e24; color: var(--text-2); }
:root[data-theme="dark"] .ess-day.future { background: transparent; border-color: var(--line); color: #565d6c; }
:root[data-theme="dark"] .ess-day.p { background: #10231c; color: #5fd3a6; } :root[data-theme="dark"] .ess-day.hd { background: #272013; color: #f0c36b; }
:root[data-theme="dark"] .ess-day.a { background: #2c1718; color: #f49890; } :root[data-theme="dark"] .ess-day.l { background: #1f1b33; color: #b39dff; }
:root[data-theme="dark"] .ess-day.wo { background: #15171b; color: #767d8c; } :root[data-theme="dark"] .ess-day.hol { background: #10262d; color: #5cc8e8; }
:root[data-theme="dark"] .ess-day.mp { background: transparent; border-color: #4a3d1a; color: #f0c36b; }
:root[data-theme="dark"] .ess-day.today { box-shadow: 0 0 0 2px #8b9bff; }
:root[data-theme="dark"] .ess-ico.t-indigo { background: #1a1d2e; color: #9aa8ff; } :root[data-theme="dark"] .ess-ico.t-leaf { background: #10231c; color: #5fd3a6; }
:root[data-theme="dark"] .ess-ico.t-teal { background: #10262d; color: #5cc8e8; } :root[data-theme="dark"] .ess-ico.t-amber { background: #272013; color: #f0c36b; }
:root[data-theme="dark"] .ess-ico.t-violet { background: #1f1b33; color: #b39dff; } :root[data-theme="dark"] .ess-ico.t-rose { background: #2c1718; color: #f49890; }
:root[data-theme="dark"] .ess-quick a { color: var(--text); } :root[data-theme="dark"] .ess-quick a:hover, :root[data-theme="dark"] .ess-row:hover { background: #181a1f; }
:root[data-theme="dark"] .ess-bal div { background: #1b1e24; border-color: var(--line); } :root[data-theme="dark"] .ess-bal b, :root[data-theme="dark"] .ess-more { color: #9aa8ff; }
:root[data-theme="dark"] .ess-pay { background: linear-gradient(135deg, #2a2f5e, #1a1d2e); }
:root[data-theme="dark"] .ess-date { background: #1a1d2e; color: #c9d0ff; }
:root[data-theme="dark"] .ess-nav { background: rgba(21, 23, 27, .92); border-color: var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .ess-nav a.on { background: #1a1d2e; color: #c9d0ff; }
:root[data-theme="dark"] .ess-flag { background: #272013; color: #f0c36b; }
:root[data-theme="dark"] .ess-search input { color: var(--text); }

/* ==========================================================================
   FREE TOOLS
   ========================================================================== */
.tools { background: var(--paper); }
.tools-top { background: var(--midnight); backdrop-filter: none; border-bottom: 1px solid rgba(243, 238, 226, .12); }
.t-hero .eyebrow { color: var(--brass); background: none; border: 0; padding: 0; border-radius: 0; }
.t-hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; }
.t-hero h1 em { font-style: italic; color: var(--brass); background: none; -webkit-text-fill-color: currentColor; }
.tool-card { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: none; }
.tool-card::before { display: none; }
.tool-card:hover { transform: none; border-color: var(--navy); box-shadow: none; }
.tool-card h3 { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.tool-ico { border-radius: 2px; }
.bignum { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
.t-cat h2 { font-family: var(--serif); font-weight: 500; }

/* ==========================================================================
   DARK WORKSPACE — the same temperament on ink
   ========================================================================== */
/* ---- dark mode: neutral graphite surfaces (the way the big tech dashboards do it), one periwinkle
   accent used sparingly, muted signal tints, a chart palette tuned for a dark ground. No brand green. */
:root[data-theme="dark"] {
  --paper: #0b0c0f;
  --card: #15171b;
  --line: #23262d;
  --line-strong: #30343d;
  --text: #eceef2;
  --text-2: #aab0bd;
  --text-3: #767d8c;
  --navy: #6b7bf7; --navy-2: #5a6af0; --navy-3: #8b9bff;
  --green: #8b9bff; --green-2: #a9b4ff; --green-soft: #1a1d2e;
  --brass: #8b9bff; --brass-2: #a9b4ff; --brass-soft: #1a1d2e;
  --link: #9aa8ff;
  --slate-600: #aab0bd; --slate-500: #767d8c; --slate-400: #565d6c;
  --slate-300: #30343d; --slate-200: #23262d; --slate-100: #1b1e24; --slate-50: #181a1f;
  --ok-100: #10231c; --warn-100: #272013; --bad-100: #2c1718; --info-100: #1a1d2e;
  --ok-600: #5fd3a6; --warn-600: #f0c36b; --bad-600: #f49890; --info-600: #9aa8ff;
  --ok-500: #4fd1a1; --warn-500: #f3c46d; --bad-500: #f28b82; --info-500: #8b9bff;
  --brand-100: #1a1d2e; --brand-300: #5a6af0; --brand-400: #8b9bff; --brand-500: #6b7bf7; --brand-600: #9aa8ff;
  --accent-100: #1a1d2e; --accent-400: #8b9bff; --accent-500: #6b7bf7; --accent-600: #5a6af0;
  --leaf: #4fd1a1; --leaf-soft: #10231c; --teal: #5cc8e8;
  --c-ok: #4fd1a1; --c-warn: #f3c46d; --c-bad: #f28b82; --c-info: #8b9bff;
  --c-mute: #3a3f4b; --c-brand: #8b9bff; --c-violet: #b39dff; --c-pink: #f49ac1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 48px rgba(0, 0, 0, .55);
}
:root[data-theme="dark"] .work, :root[data-theme="dark"] .ess, :root[data-theme="dark"] .tools { background: var(--paper); color: var(--text); }
/* the rail: near-black, hairline edge, the active item lit by the accent */
:root[data-theme="dark"] .side { background: #0d0e12; border-right: 1px solid #1d2027; }
:root[data-theme="dark"] .side-logo { background: #0d0e12; color: #fff; }
:root[data-theme="dark"] .side .logo-mark { background: #fff; }
:root[data-theme="dark"] .side-org { color: #767d8c; }
:root[data-theme="dark"] .side-sec { color: #767d8c; opacity: 1; }
:root[data-theme="dark"] .side a.nav-item { color: #aab0bd; }
:root[data-theme="dark"] .side a.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
:root[data-theme="dark"] .side a.nav-item.on { background: rgba(139, 155, 255, .12); color: #e3e7ff; box-shadow: inset 3px 0 0 #8b9bff; }
:root[data-theme="dark"] .side a.nav-item.on .nav-count { background: rgba(139, 155, 255, .22); color: #e3e7ff; }
:root[data-theme="dark"] .nav-count.newtag { background: #5cc8e8; color: #0b0c0f; }
:root[data-theme="dark"] .side .nav-item.nav-hot { background: rgba(139, 155, 255, .1); color: #c9d0ff !important; box-shadow: inset 3px 0 0 #8b9bff; }
:root[data-theme="dark"] .side .nav-item.nav-hot:hover, :root[data-theme="dark"] .side .nav-item.nav-hot.on { background: rgba(139, 155, 255, .2); color: #fff !important; }
:root[data-theme="dark"] .side .nav-item.nav-hot .nav-count { background: #5cc8e8; color: #0b0c0f; }
/* the bars across the top */
:root[data-theme="dark"] .topbar { background: rgba(11, 12, 15, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: #1d2027; box-shadow: none; }
:root[data-theme="dark"] .topbar h1 { color: var(--text); }
:root[data-theme="dark"] .demo-bar { background: #111317; color: #aab0bd; border-bottom: 1px solid #23262d; }
:root[data-theme="dark"] .demo-bar a { color: #9aa8ff; }
:root[data-theme="dark"] .demo-bar .pill { background: #6b7bf7; color: #fff; border-radius: 999px; }
:root[data-theme="dark"] .practice-bar { background: #111317; color: var(--text); border-color: #23262d; }
:root[data-theme="dark"] .practice-bar .pill { background: #6b7bf7; color: #fff; }
:root[data-theme="dark"] .practice-bar select { background: #0b0c0f; border-color: var(--line-strong); color: var(--text); }
/* type and surfaces */
:root[data-theme="dark"] .topbar h1, :root[data-theme="dark"] .wcard-head h3, :root[data-theme="dark"] .kpi-value, :root[data-theme="dark"] .empty h4,
:root[data-theme="dark"] .kv dd, :root[data-theme="dark"] .work h1, :root[data-theme="dark"] .work h2, :root[data-theme="dark"] .work h3, :root[data-theme="dark"] .work h4 { color: var(--text); }
:root[data-theme="dark"] .wcard, :root[data-theme="dark"] .cal-d, :root[data-theme="dark"] .user-menu-panel, :root[data-theme="dark"] dialog,
:root[data-theme="dark"] .res-card, :root[data-theme="dark"] .cmenu-panel, :root[data-theme="dark"] .brief { background: var(--card); border-color: var(--line); color: var(--text); }
:root[data-theme="dark"] .wcard-head, :root[data-theme="dark"] .filters { background: transparent; border-color: var(--line); }
:root[data-theme="dark"] table.data th { background: #121418; border-bottom-color: var(--line-strong); color: var(--text-2); }
:root[data-theme="dark"] table.data td { border-color: #1e2127; }
:root[data-theme="dark"] table.data tbody tr:hover { background: #181a1f; }
:root[data-theme="dark"] table.data a { color: var(--link); }
:root[data-theme="dark"] table.data a.wbtn, :root[data-theme="dark"] .work a.wbtn { color: var(--text); }
:root[data-theme="dark"] .wbtn { background: #1b1e24; color: var(--text); border-color: #30343d; box-shadow: none; }
:root[data-theme="dark"] .wbtn:hover { background: #22262e; border-color: #8b9bff; }
:root[data-theme="dark"] .wbtn-primary, :root[data-theme="dark"] table.data a.wbtn-primary { background: linear-gradient(90deg, #5a6af0, #7b8aff); border-color: #5a6af0; color: #fff !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
:root[data-theme="dark"] .wbtn-primary:hover { background: linear-gradient(90deg, #4f5fe6, #6b7bf7); border-color: #4f5fe6; }
:root[data-theme="dark"] .wbtn-ok { background: #2fb886; border-color: #2fb886; color: #fff !important; }
:root[data-theme="dark"] .wbtn-bad { background: transparent; border-color: #6a3a3d; color: var(--bad-600); }
:root[data-theme="dark"] .work input, :root[data-theme="dark"] .work select, :root[data-theme="dark"] .work textarea { background: #121418; border-color: #30343d; color: var(--text); }
:root[data-theme="dark"] .work input:focus, :root[data-theme="dark"] .work select:focus, :root[data-theme="dark"] .work textarea:focus { background: #15171b; border-color: #8b9bff; box-shadow: 0 0 0 3px rgba(139, 155, 255, .22); }
:root[data-theme="dark"] .work label, :root[data-theme="dark"] .kpi-label, :root[data-theme="dark"] .filters label { color: var(--text-2); }
:root[data-theme="dark"] .muted, :root[data-theme="dark"] .kpi-note, :root[data-theme="dark"] .hint, :root[data-theme="dark"] .tiny.muted, :root[data-theme="dark"] .topbar .sub { color: var(--text-3); }
:root[data-theme="dark"] .note { background: #181a1f; color: var(--text-2); border-left-color: #8b9bff; }
:root[data-theme="dark"] .note-info { background: #1a1d2e; color: #c9d0ff; border-left-color: #8b9bff; }
:root[data-theme="dark"] .note-warn { background: var(--warn-100); color: #ead9a6; border-left-color: var(--warn-600); }
:root[data-theme="dark"] .note-bad { background: var(--bad-100); color: #f0b4ae; border-left-color: var(--bad-600); }
:root[data-theme="dark"] .b-ok { background: var(--ok-100); color: var(--ok-600); border-color: #1f4a3a; }
:root[data-theme="dark"] .b-warn { background: var(--warn-100); color: var(--warn-600); border-color: #4a3d1a; }
:root[data-theme="dark"] .b-bad { background: var(--bad-100); color: var(--bad-600); border-color: #553034; }
:root[data-theme="dark"] .b-info, :root[data-theme="dark"] .b-brand { background: #1a1d2e; color: #9aa8ff; border-color: #2a2f52; }
:root[data-theme="dark"] .b-mute { background: #1b1e24; color: var(--text-2); border-color: #30343d; }
:root[data-theme="dark"] .badge.b-new { background: #5cc8e8; color: #0b0c0f; }
:root[data-theme="dark"] .flash-success { background: var(--ok-100); border-color: #1f4a3a; color: #bfe8d6; }
:root[data-theme="dark"] .flash-error { background: var(--bad-100); border-color: #553034; color: #f0b4ae; }
:root[data-theme="dark"] .flash-warning { background: var(--warn-100); border-color: #4a3d1a; color: #ead9a6; }
/* the headline tiles: a soft lift, a hairline of accent, white numerals */
:root[data-theme="dark"] .kpi { background: linear-gradient(180deg, #191b21 0%, #141619 100%); border-color: #262932; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .kpi::after { height: 2px; background: linear-gradient(90deg, #8b9bff, rgba(139, 155, 255, .12)); }
:root[data-theme="dark"] .kpi.ok::after { background: linear-gradient(90deg, #4fd1a1, rgba(79, 209, 161, .12)); }
:root[data-theme="dark"] .kpi.warn::after { background: linear-gradient(90deg, #f3c46d, rgba(243, 196, 109, .12)); }
:root[data-theme="dark"] .kpi.bad::after { background: linear-gradient(90deg, #f28b82, rgba(242, 139, 130, .12)); }
:root[data-theme="dark"] .kpi-value { color: #fff; }
:root[data-theme="dark"] .kpi-value small { color: var(--text-3); }
:root[data-theme="dark"] a.kpi:hover { border-color: #8b9bff; box-shadow: 0 0 0 1px rgba(139, 155, 255, .35), 0 12px 30px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] a.kpi .kpi-note::after { color: #8b9bff; }
:root[data-theme="dark"] .avatar { background: linear-gradient(135deg, #7b8aff, #5a6af0); color: #fff; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px #30343d; }
:root[data-theme="dark"] .meter { background: #1b1e24; }
:root[data-theme="dark"] .meter > i { background: #8b9bff; }
:root[data-theme="dark"] .meter.ok > i { background: var(--ok-500); }
:root[data-theme="dark"] .meter.warn > i { background: var(--warn-500); }
:root[data-theme="dark"] .meter.bad > i { background: var(--bad-500); }
:root[data-theme="dark"] .bars i { background: #8b9bff; }
:root[data-theme="dark"] .cal-d.today { border-color: #8b9bff; box-shadow: inset 0 0 0 1px #8b9bff; }
:root[data-theme="dark"] .rnav a.on { background: #1a1d2e; border-left-color: #8b9bff; }
:root[data-theme="dark"] .legend li { border-bottom-color: #1e2127; }
:root[data-theme="dark"] .legend .lp { color: var(--text-3); }
:root[data-theme="dark"] .donut-centre { fill: #fff; }
:root[data-theme="dark"] .nudge { background: var(--card); border-color: var(--line); border-left-color: #8b9bff; }
:root[data-theme="dark"] .nudge-step { background: #1a1d2e; color: #c9d0ff; }
:root[data-theme="dark"] .work .lmap { border-color: var(--line); background: #121418; }
:root[data-theme="dark"] .map-legend { background: rgba(21, 23, 27, .94); color: var(--text-2); }
:root[data-theme="dark"] .chip-tool { background: #1b1e24; border-color: #30343d; color: var(--text-2); }
:root[data-theme="dark"] .user-menu-panel a:hover, :root[data-theme="dark"] .cmenu-panel a:hover { background: #181a1f; }
:root[data-theme="dark"] .theme-toggle, :root[data-theme="dark"] .theme-row button { background: #1b1e24; color: var(--text-2); border-color: #30343d; }
:root[data-theme="dark"] .theme-row button.on { background: #6b7bf7; border-color: #6b7bf7; color: #fff; }
:root[data-theme="dark"] .work .tab { background: #1b1e24; border-color: #30343d; color: var(--text-2); }
:root[data-theme="dark"] .work .tab:hover { background: #22262e; color: var(--text); }
:root[data-theme="dark"] .work .tab.on { background: #6b7bf7; border-color: #6b7bf7; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
/* the briefing and the hero in the dark */
:root[data-theme="dark"] .brief-chip, :root[data-theme="dark"] .brief-toggle, :root[data-theme="dark"] .brief-links a { background: #1b1e24; border-color: #30343d; color: var(--text-2); }
:root[data-theme="dark"] a.brief-chip:hover, :root[data-theme="dark"] .brief-toggle:hover, :root[data-theme="dark"] .brief-links a:hover { border-color: #8b9bff; color: #e3e7ff; background: #1a1d2e; }
:root[data-theme="dark"] .brief-chip b { color: #fff; }
:root[data-theme="dark"] .chip-law { background: #272013; border-color: #4a3d1a; color: #f0c36b; }
:root[data-theme="dark"] .chip-law b { color: #f0c36b; }
:root[data-theme="dark"] .chip-scope { background: #1a1d2e; border-color: #2a2f52; color: #c9d0ff; }
:root[data-theme="dark"] .chip-setup i { background: conic-gradient(#4fd1a1 var(--p, 0%), #30343d 0); }
:root[data-theme="dark"] .brief-ico { background: #1a1d2e; color: #c9d0ff; }
:root[data-theme="dark"] .brief-setup .brief-ico { background: #10231c; color: #5fd3a6; }
:root[data-theme="dark"] .brief-new .brief-ico { background: #10262d; color: #5cc8e8; }
:root[data-theme="dark"] .brief-law .brief-ico { background: #272013; color: #f0c36b; }
:root[data-theme="dark"] .brief-body, :root[data-theme="dark"] .brief-item, :root[data-theme="dark"] .hero-split .wcard-foot { border-color: var(--line); }
/* ---- Sign-in, in the firm's layout: indigo panel left, white form right, one rounded card on a light ground */
.auth-wrap { background: #e9edf7; padding: 36px 20px; align-items: stretch; min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  max-width: 1180px; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(31, 36, 51, .18); }
.auth-shell { background: #e9edf7; min-height: 100vh; padding: 40px 20px; box-sizing: border-box; }
.auth-aside { background: linear-gradient(165deg, #3a4ab0 0%, #2d3b9e 50%, #212b7a 100%); color: #fff; border-right: 0; padding: 60px 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-aside .logo { color: #fff; font-family: var(--sans); font-weight: 700; font-size: 26px; }
.auth-aside .logo-mark { background: #fff; color: #2f3f9e; border-radius: 10px; }
.auth-aside h2 { font-family: var(--sans); font-weight: 600; font-size: 20px; line-height: 1.5; color: #fff; letter-spacing: 0; margin: 0 0 26px; }
.auth-aside p { color: #dfe4fb !important; }
.auth-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-feats li { display: flex; align-items: center; gap: 16px; font-size: 16.5px; color: #fff; }
.auth-feats li i { width: 46px; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, .16); display: inline-grid; place-items: center; font-style: normal; font-size: 18px; flex: none; }
.auth-aside hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .35); margin: 34px 0 20px; }
.auth-aside .fine { color: #c9d0f2; font-size: 13.5px; text-align: center; }
.auth-main { background: #fff; color: var(--text); padding: 56px 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-main h1 { font-family: var(--sans); font-weight: 700; font-size: 30px; color: #2f3f9e; text-align: center; letter-spacing: -.01em; margin: 0 0 6px; }
.auth-main .sub { text-align: center; color: var(--text-3); font-size: 15px; margin: 0 0 30px; }
.auth-main label { color: var(--text-2); font-weight: 600; font-size: 14px; }
.auth-main .field { margin-bottom: 18px; }
.auth-main .with-ico { position: relative; }
.auth-main .with-ico span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #4b5368; font-size: 15px; }
.auth-main input[type=email], .auth-main input[type=password], .auth-main input[type=text] { width: 100%; padding: 14px 14px 14px 44px; border-radius: 10px; border: 1px solid #dbe1f1; background: #eef2fb; color: var(--text); font-size: 15px; }
.auth-main input:focus { outline: 0; border-color: #2f3f9e; background: #fff; box-shadow: 0 0 0 3px rgba(47, 63, 158, .16); }
.auth-main .row-between { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: 14px; }
.auth-main .check { color: var(--text-2); }
.auth-main .forgot { color: #2f3f9e; font-weight: 600; text-decoration: none; }
.auth-main .btn-primary { width: 100%; padding: 15px; border-radius: 10px; font-size: 16.5px; font-weight: 700; color: #fff; border: 0;
  background: linear-gradient(90deg, #2a3890, #3b4cb8); box-shadow: 0 8px 20px rgba(47, 63, 158, .28); }
.auth-main .btn-primary:hover { background: linear-gradient(90deg, #27358a, #3446ad); }
.auth-notice { margin-top: 26px; background: #f3f5fa; border-left: 4px solid #2f3f9e; border-radius: 6px; padding: 14px 16px; font-size: 14px; color: var(--text-2); }
.auth-notice b { color: var(--text); }
.auth-help { margin-top: 26px; text-align: center; color: var(--text-3); font-size: 14px; }
.auth-help a { color: #2f3f9e; font-weight: 600; }
.auth-main .panel { background: #f3f5fa; border: 1px solid var(--line); border-radius: 12px; color: var(--text-2); }
.auth-main .panel strong { color: var(--text) !important; }
.auth-main .panel p { color: var(--text-3) !important; }
.auth-main .btn-ghost { border: 1px solid #c9d0e3; color: #2f3f9e; background: #fff; border-radius: 10px; }
@media (max-width: 940px) { .auth-wrap { grid-template-columns: 1fr; } .auth-aside { display: none; } .auth-main { padding: 36px 24px; } }

/* ---- the firm's mark */
.logo-img { width: 30px; height: 30px; object-fit: contain; display: inline-block; vertical-align: middle; margin-right: 8px; border-radius: 0; background: transparent; }
.side-logo .logo-img { width: 34px; height: 34px; background: #fff; border-radius: 9px; padding: 3px; box-sizing: border-box; }
.auth-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.auth-logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; box-sizing: border-box; }
.auth-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.auth-brand-text b { font-size: 30px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.auth-brand-text small { font-size: 14.5px; font-weight: 500; color: #dfe4fb; margin-top: 4px; }

/* ---- the appearance switch: a labelled pill in the bar, and Light / Dark / System in the user menu */
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; width: auto !important; min-width: 0; padding: 0 12px; margin: 0; flex: none; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text-2); font: 600 12.5px/1 var(--sans); cursor: pointer; white-space: nowrap; overflow: visible; }
.theme-toggle::after { content: attr(data-label); }
.theme-toggle:hover { background: var(--slate-50); border-color: var(--navy-3); color: var(--navy); }
.theme-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.theme-row span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-right: auto; font-weight: 600; }
.theme-row button { border: 1px solid var(--line-strong); background: #fff; color: var(--text-2); border-radius: 999px; padding: 4px 10px; font: 600 12px var(--sans); cursor: pointer; }
.theme-row button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .theme-toggle, :root[data-theme="dark"] .theme-row button { background: var(--slate-50); color: var(--text-2); border-color: var(--line-strong); }
:root[data-theme="dark"] .theme-row button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---- tabs inside the workspace (the profile's sections): readable at rest, white when on */
.work .tabs { gap: 6px; margin-bottom: 18px; }
.work .tab { background: var(--slate-100); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13.4px; padding: 8px 15px; border-radius: 999px; }
.work .tab:hover { background: #fff; border-color: var(--navy-3); color: var(--navy); }
.work .tab.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(47, 63, 158, .22); }
:root[data-theme="dark"] .work .tab { background: var(--slate-50); border-color: var(--line-strong); color: var(--text-2); }
:root[data-theme="dark"] .work .tab:hover { background: var(--slate-100); color: var(--text); }
:root[data-theme="dark"] .work .tab.on { background: var(--navy); color: #fff; }

/* ---- dark mode: the completeness tiles stay quiet, the sign-in card stays white */
:root[data-theme="dark"] .fixcheck.is-ok { background: #10231c; border-color: #1f4a3a; }
:root[data-theme="dark"] .fixcheck.is-ok:hover { border-color: #4fd1a1; }
:root[data-theme="dark"] .fixcheck.is-bad { background: #2c1718; border-color: #553034; }
:root[data-theme="dark"] .fixcheck.is-ok .fixcheck-act { color: #5fd3a6; }
:root[data-theme="dark"] .fixcheck-body b { color: var(--text); }
:root[data-theme="dark"] .auth-shell { background: #0b0c0f; }
:root[data-theme="dark"] .auth-main { background: #fff; color: #1f2433; }
:root[data-theme="dark"] .auth-main label, :root[data-theme="dark"] .auth-main .check { color: #4b5368; }
:root[data-theme="dark"] .auth-main input[type=email], :root[data-theme="dark"] .auth-main input[type=password] { background: #eef2fb; color: #1f2433; border-color: #dbe1f1; }
:root[data-theme="dark"] .auth-notice { background: #f3f5fa; color: #4b5368; }
:root[data-theme="dark"] .auth-notice b { color: #1f2433; }
:root[data-theme="dark"] .auth-help, :root[data-theme="dark"] .auth-main .sub { color: #6f788f; }
:root[data-theme="dark"] .auth-main .panel { background: #f3f5fa; border-color: #e4e8f2; }

/* ---- the dashboard briefing: one slim bar, a body that folds away and is remembered */
.brief { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.brief-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.brief-scope { display: flex; align-items: center; gap: 10px; margin: 0; flex-wrap: nowrap; }
.brief-scope label { font-size: 10.6px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 0; }
.brief-scope select { height: 34px; width: auto; min-width: 250px; max-width: 100%; flex: 0 1 auto; border-radius: 9px; padding: 0 32px 0 12px; font-weight: 600; font-size: 13.4px; margin: 0; }
.brief-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.brief-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font: 600 12.2px/1 var(--sans); color: var(--text-2); background: var(--slate-50); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
a.brief-chip:hover { border-color: var(--navy-3); color: var(--navy); }
.brief-chip b { font-weight: 800; color: var(--text); }
.chip-new b { color: var(--teal); }
.chip-law { background: var(--warn-100); border-color: #f1d9a6; color: var(--warn-600); }
.chip-law b { color: var(--warn-600); }
.chip-scope { background: var(--green-soft); border-color: #cfd7f3; color: var(--navy); }
.chip-setup i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; background: conic-gradient(var(--leaf) var(--p, 0%), var(--slate-200) 0); }
.brief-toggle { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--text-2); font: 600 12.2px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.brief-toggle::before { content: "▾"; margin-right: 6px; font-size: 11px; display: inline-block; transition: transform .15s; }
.brief-hidden .brief-toggle::before { transform: rotate(-90deg); }
.brief-toggle:hover { border-color: var(--navy-3); color: var(--navy); }
.brief-body { border-top: 1px solid var(--line); }
.brief-hidden .brief-body { display: none; }
.brief-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.brief-item:first-child { border-top: 0; }
.brief-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font: 700 14px/1 var(--sans); background: var(--green-soft); color: var(--navy); }
.brief-ico small { font-size: 10px; font-weight: 600; opacity: .7; }
.brief-setup .brief-ico { background: var(--leaf-soft); color: #178a3c; }
.brief-new .brief-ico { background: #e3f3f8; color: var(--teal); font-size: 16px; }
.brief-law .brief-ico { background: var(--warn-100); color: var(--warn-600); font-size: 17px; }
.brief-text { flex: 1 1 360px; min-width: 0; }
.brief-text > b { font-size: 14px; color: var(--text); display: block; margin-bottom: 3px; letter-spacing: -.01em; }
.brief-text p { margin: 0; font-size: 12.6px; color: var(--text-2); line-height: 1.55; }
.brief-meta { display: block; margin-top: 4px; font-size: 11.6px; color: var(--text-3); }
.brief-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.brief-links a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--slate-50); border: 1px solid var(--line); color: var(--text-2); font-size: 12.2px; font-weight: 500; text-decoration: none; }
.brief-links a:hover { border-color: var(--navy-3); color: var(--navy); background: var(--green-soft); }
.brief-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; font-size: 12.8px; color: var(--text-2); }
.brief-list .badge { margin-right: 4px; }
.brief-side { flex: 0 0 130px; padding-top: 4px; }
.brief-side .meter { margin-bottom: 4px; }
.brief-actions { display: flex; gap: 8px; align-items: center; flex: none; padding-top: 4px; }
@media (max-width: 760px) { .brief-side { display: none; } .brief-scope select { min-width: 0; width: 100%; } }

/* ---- the first screen: the split on the left, the seven headline tiles on the right */
.hero-grid { display: grid; grid-template-columns: minmax(440px, 1.1fr) 2fr; gap: 16px; align-items: stretch; margin-bottom: 18px; }
.hero-grid .kpis { margin-bottom: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.hero-grid .kpis > :nth-child(7) { grid-column: span 3; }
.hero-split { display: flex; flex-direction: column; margin-bottom: 0; }
.hero-split .wcard-foot b { color: var(--text-2); font-weight: 600; }
.hero-split .hero-donut { flex: 1; display: flex; align-items: center; padding: 22px 24px; }
.hero-split .chart-wrap { width: 100%; gap: 22px; flex-wrap: nowrap; }
.hero-split svg.donut { width: 210px; height: 210px; }
.hero-split .legend { min-width: 0; }
.hero-split .wcard-foot { padding: 10px 20px 14px; border-top: 1px solid var(--line); }
@media (max-width: 1280px) { .hero-grid .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-grid .kpis > :nth-child(7) { grid-column: span 2; } }
@media (max-width: 1080px) { .hero-grid { grid-template-columns: 1fr; } .hero-grid .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); grid-auto-rows: auto; } .hero-grid .kpis > :nth-child(7) { grid-column: auto; } .hero-split .chart-wrap { flex-wrap: wrap; } }

/* ---- round 50q: the sidebar as collapsible groups with a search box ---- */
.side-search { padding: 12px 12px 2px; }
.side-search input { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; border-radius: 9px; padding: 7px 10px 7px 30px; font-size: 13px; outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c9d1f5' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>"); background-repeat: no-repeat; background-position: 10px 50%; }
.side-search input::placeholder { color: #b9c2ec; }
.side-search input:focus { background-color: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); }
.side-grp { margin-top: 4px; }
.side .side-sec, .side-grp .side-sec { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; border: 0; cursor: pointer; text-align: left; padding: 12px 14px 6px; margin: 0; color: #aeb8ea; letter-spacing: .14em; font-weight: 700; font-size: 10.5px; text-transform: uppercase; font-family: inherit; }
.side .side-sec:hover, .side-grp.open .side-sec { color: #fff; }
.side .side-sec .caret { display: inline-block; width: 10px; font-size: 10px; transition: transform .15s ease; }
.side-grp.open .side-sec .caret { transform: rotate(90deg); }
.side .side-sec .side-n { margin-left: auto; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 1px 7px; font-size: 9.5px; letter-spacing: 0; font-weight: 600; }
.side-grp.open .side-sec .side-n { background: rgba(255, 255, 255, .22); }
.side-items { display: none; padding-bottom: 4px; }
.side-grp.open .side-items { display: block; }
.side.searching .side-grp:not(.hit) { display: none; }
.side.searching .side-grp.hit .side-items { display: block; }
.side.searching .nav-item.miss { display: none; }
.side.searching .side-grp .side-sec .caret { visibility: hidden; }
:root[data-theme="dark"] .side-search input { background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .side .side-sec { color: #767d8c; }
:root[data-theme="dark"] .side-grp.open .side-sec, :root[data-theme="dark"] .side .side-sec:hover { color: #e6e8ef; }

/* ---- round 50r: the employee portal home, rebuilt ---- */
.ess-hero { padding-bottom: 86px; }
.ess-avatar { box-shadow: 0 0 0 4px rgba(255, 255, 255, .22), 0 10px 26px rgba(0, 0, 0, .22); }
.ess-iconbtn.ess-ws { width: auto; padding: 0 12px 0 10px; gap: 6px; display: inline-flex; font-size: 12px; font-weight: 700; }
.ess-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.ess-hero-stats a { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 9px; border-radius: 14px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; text-decoration: none; min-width: 0; backdrop-filter: blur(6px); }
.ess-hero-stats a:hover { background: rgba(255, 255, 255, .2); }
.ess-hero-stats .v { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ess-hero-stats .v small { font-size: 10.5px; font-weight: 600; color: rgba(255, 255, 255, .72); }
.ess-hero-stats .k { font-size: 9.8px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .72); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .ess-hero-stats { grid-template-columns: repeat(2, 1fr); } }
.ess-wrap { margin-top: -62px; }
.ess-punch.live { animation: ess-pulse 2.2s ease-in-out infinite; }
@keyframes ess-pulse { 0%, 100% { box-shadow: 0 10px 24px rgba(47, 63, 158, .35); } 50% { box-shadow: 0 10px 24px rgba(47, 63, 158, .35), 0 0 0 10px rgba(47, 63, 158, .12); } }
.ess-todo { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; margin-bottom: 4px; }
.ess-todo::-webkit-scrollbar { display: none; }
.ess-todo a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 12.4px; font-weight: 600; box-shadow: var(--shadow); }
.ess-todo a .ess-ico { width: 26px; height: 26px; border-radius: 9px; }
.ess-todo a:hover { border-color: var(--line-strong); }
.ess-quick { grid-template-columns: repeat(4, 1fr); }
.ess-quick a .ess-ico { width: 50px; height: 50px; border-radius: 16px; }
.ess-pay-trend { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin: 12px 18px 4px; }
.ess-pay-trend a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; text-decoration: none; color: var(--text-3); font-size: 10px; font-weight: 600; gap: 4px; }
.ess-pay-trend i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #4a5bc7, #2f3f9e); opacity: .85; }
.ess-pay-trend a:last-child i { opacity: 1; }
.ess-pay-trend a:hover i { opacity: 1; }
.ess-bal-ring { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; padding: 12px 18px 6px; }
.ess-bal-ring div { text-align: center; padding: 10px 6px 8px; border-radius: 14px; background: var(--slate-50); border: 1px solid var(--line); }
.ess-bal-ring b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1; }
.ess-bal-ring span { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.ess-desk .ess-tile { min-height: 96px; padding: 12px 13px; }
.ess-desk .ess-tile .ds { font-size: 11.6px; }
.ess-sec-title { margin: 18px 4px 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
@media (min-width: 900px) {
  .ess-wrap { max-width: 1060px; }
  .ess-hero-in { max-width: 1060px; }
  .ess-grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; align-items: start; }
  .ess-grid2 > .ess-card, .ess-grid2 > div > .ess-card { margin-bottom: 14px; }
  .ess-quick { grid-template-columns: repeat(8, 1fr); }
  .ess-desk { grid-template-columns: repeat(4, 1fr); }
  .ess-today { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .ess-today .ess-inout { margin-top: 0; padding-top: 0; border-top: 0; border-left: 1px solid var(--line); padding-left: 24px; align-self: center; }
  .ess-today .ess-flag { grid-column: 1 / -1; }
}
:root[data-theme="dark"] .ess-hero-stats a { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .ess-todo a { background: var(--card); }
