/* Cruxtra HR – Cruxtra brand theme. Follow docs/brand/BRANDING.md.
   Every colour is defined once below as a semantic token. Never write a colour value anywhere else. */
:root {
  /* ============ Cruxtra HR design tokens – docs/DESIGN.md (eureka system, Cruxtra orange accent) ============ */
  --font: "Lato", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ink: #000E28;             /* Dark Blue: text, navigation, footer */

  /* Orange: the one main action per screen, the logo, highlights. Never links or small text. */
  --accent: #F15A29;
  --accent-hover: #D94A1A;
  --accent-soft: #FDECE6;     /* orange tint: AI suggestions and highlights */
  --accent-wash: #FFF7F3;
  --accent-text: #C2410C;     /* only when orange text is unavoidable */
  --on-accent: #000E28;       /* orange buttons carry dark blue labels, not white */

  /* Royal Blue: links, secondary buttons, selected and focus states */
  --link: #0050CB; --link-hover: #003FA3;
  --btn-blue: #0050CB; --btn-blue-hover: #003FA3;
  --selected: #E5EEFF;        /* Light Blue: selected rows, hover and info backgrounds */
  --selected-text: #0050CB;
  --focus: #0050CB;

  --sidebar: #ffffff; --sidebar-border: #e3e8f0; --sidebar-hover: #f3f6fb;
  --sidebar-active: #E5EEFF; --sidebar-active-text: #0050CB;
  --sidebar-text: #000E28; --sidebar-muted: #7a8498;

  --bg: #F6F8FC; --surface: #ffffff; --surface-2: #fafbfd; --surface-3: #eef2f8;
  --border: #e3e8f0; --border-strong: #D5DCE8; --border-field: #bcc5d6;
  --text: #000E28; --text-2: #5B6577; --text-3: #8a93a6;
  --white: #ffffff;

  --green: #0E7A4B; --green-soft: #e2f3ea;
  --amber: #7a5200; --amber-soft: #fff3cc; --warning: #FFC533;
  --red: #B3142B;   --red-soft: #fbe6e9;
  --blue: #0050CB;  --blue-soft: #E5EEFF; --blue-text: #0050CB;
  --neutral-soft: #eef2f8;
  --stage-2: #0050CB; --stage-3: #003FA3; --stage-4: #000E28;
  --av-1: #0050CB; --av-2: #0E7A4B; --av-3: #C2410C; --av-4: #5b3cc4; --av-5: #0e7490; --av-6: #7a5200;
  --toast: #000E28; --toast-error: #8e1f2a;
  --backdrop: rgba(0, 14, 40, .36); --backdrop-light: rgba(0, 14, 40, .14);

  --shadow-sm: 0 1px 2px rgba(0, 14, 40, .05);
  --shadow: 0 1px 2px rgba(0, 14, 40, .04), 0 4px 16px rgba(0, 14, 40, .06);
  --shadow-lg: 0 12px 48px rgba(0, 14, 40, .14), 0 2px 6px rgba(0, 14, 40, .06);
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px; --radius-control: 8px;
  --hero-grad: linear-gradient(120deg, #F6F8FC 0%, #E5EEFF 60%, #FDECE6 100%);
  --auth-grad: radial-gradient(900px 600px at 85% 0%, #FDECE6 0%, #E5EEFF 45%, #C9D9F7 100%);

  /* aliases kept for existing screens (they map onto the tokens above) */
  --font-sans: var(--font); --font-mono: var(--mono);
  --brand-primary: var(--accent); --brand-primary-hover: var(--accent-hover); --brand-primary-text: var(--accent-text); --brand-primary-tint: var(--accent-soft);
  --action-secondary: var(--link); --action-secondary-hover: var(--link-hover);
  --surface-selected: var(--selected); --text-primary: var(--text); --text-secondary: var(--text-2);
  --surface-app: var(--bg); --surface-card: var(--surface); --border-control: var(--border-field);
  --success: var(--green); --error: var(--red); --warning-fill: var(--amber-soft);
  --text-on-dark: var(--white); --focus-on-dark: var(--white);
  --on-dark-muted: var(--text-2); --on-dark-line: var(--border); --on-dark-hover: var(--surface-3);
  --shadow-lift: var(--shadow-lg);
  --sidebar-w: 248px;
  --space: 16px;
  --logo-h: 28px;
  --logo-clear: calc(var(--logo-h) * .54); /* clear space = height of the "C" (54% of the logo height) */

  /* thin line icons with rounded ends, used as masks so they take the token colour of their element */
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --icon-success: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.3l2.8 2.8L16 9.8'/%3E%3C/svg%3E");
  --icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.8 2.8 19.5h18.4z'/%3E%3Cpath d='M12 10v4.2M12 16.9v.1'/%3E%3C/svg%3E");
  --icon-error: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 9l6 6M15 9l-6 6'/%3E%3C/svg%3E");
  --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.9v.1'/%3E%3C/svg%3E");
  --icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
  --icon-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E");
  --icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8.5 11V8a3.5 3.5 0 0 1 7 0v3'/%3E%3C/svg%3E");
  --icon-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;
}
/* dark theme: chosen in the top bar (stored per browser), or following the system setting */
:root[data-theme="dark"] {
  --sidebar: #0d1525; --sidebar-border: #1e2a40; --sidebar-hover: #16213a; --sidebar-active: #13254a; --sidebar-active-text: #a6c2ff;
  --sidebar-text: #c9d2e3; --sidebar-muted: #74809a;
  --bg: #0a1120; --surface: #111a2b; --surface-2: #152036; --surface-3: #1c2840;
  --border: #24314a; --border-strong: #33425f; --border-field: #46577a;
  --text: #e8edf7; --text-2: #a7b2c6; --text-3: #74809a;
  --link: #8fb3ff; --link-hover: #b5ccff; --selected: #13254a; --selected-text: #a6c2ff; --focus: #8fb3ff;
  --btn-blue: #1f63e0; --btn-blue-hover: #3a78ea;
  --accent-text: #ff9466; --accent-soft: #3a2016; --accent-wash: #1f1610;
  --green: #4cc98a; --green-soft: #12301f; --amber: #f0b93f; --amber-soft: #33290f;
  --red: #f0696d; --red-soft: #3a1b22; --blue: #8fb3ff; --blue-soft: #13254a; --blue-text: #a6c2ff;
  --stage-2: #1f63e0; --stage-3: #1a4aa8; --stage-4: #33425f;
  --neutral-soft: #1c2840; --toast: #1c2840;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  --hero-grad: linear-gradient(120deg, #111a2b 0%, #13254a 60%, #2a1a16 100%);
  --auth-grad: radial-gradient(900px 600px at 85% 0%, #2a1a16 0%, #13254a 45%, #0a1120 100%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --sidebar: #0d1525; --sidebar-border: #1e2a40; --sidebar-hover: #16213a; --sidebar-active: #13254a; --sidebar-active-text: #a6c2ff;
  --sidebar-text: #c9d2e3; --sidebar-muted: #74809a;
  --bg: #0a1120; --surface: #111a2b; --surface-2: #152036; --surface-3: #1c2840;
  --border: #24314a; --border-strong: #33425f; --border-field: #46577a;
  --text: #e8edf7; --text-2: #a7b2c6; --text-3: #74809a;
  --link: #8fb3ff; --link-hover: #b5ccff; --selected: #13254a; --selected-text: #a6c2ff; --focus: #8fb3ff;
  --btn-blue: #1f63e0; --btn-blue-hover: #3a78ea;
  --accent-text: #ff9466; --accent-soft: #3a2016; --accent-wash: #1f1610;
  --green: #4cc98a; --green-soft: #12301f; --amber: #f0b93f; --amber-soft: #33290f;
  --red: #f0696d; --red-soft: #3a1b22; --blue: #8fb3ff; --blue-soft: #13254a; --blue-text: #a6c2ff;
  --stage-2: #1f63e0; --stage-3: #1a4aa8; --stage-4: #33425f;
  --neutral-soft: #1c2840; --toast: #1c2840;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  --hero-grad: linear-gradient(120deg, #111a2b 0%, #13254a 60%, #2a1a16 100%);
  --auth-grad: radial-gradient(900px 600px at 85% 0%, #2a1a16 0%, #13254a 45%, #0a1120 100%);
  color-scheme: dark;
  }
}


/* icon helper (CSS masks): status icons drawn in currentColor */
.alert::before, .badge.ok::before, .badge.warn::before, .badge.danger::before, .error-text::before, .sample-banner::before, .sim-banner::before, .checklist .icon::before {
  content: ""; display: inline-block; flex: none; width: 1.1em; height: 1.1em; background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
/* inline SVG line icons (src/ui/kit.ts) */
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; font: 16px/1.55 var(--font-sans); background: var(--surface-app); color: var(--text-primary); -webkit-font-smoothing: antialiased; }
a { color: var(--action-secondary); text-underline-offset: 2px; }
a:hover { color: var(--action-secondary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 27.5px; margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 .75rem; font-weight: 650; }
h3 { font-size: 16px; margin: 0 0 .5rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
code, pre, .mono { font-family: var(--font-mono); font-size: .875em; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-app); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius-control); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-card); color: var(--action-secondary); padding: 8px 12px; z-index: 50; border-radius: var(--radius-control); }
.skip:focus { left: 8px; }
table, .kpi-value, .count, .badge, dl.kv dd, .progress-label, .timeline .when, .mono, .legend-n, .meter-n, .stage-n, .stat .n, .donut-value, .ring-value { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-secondary); }
.small { font-size: 14.5px; }
.spacer { flex: 1; }
.mt { margin-top: 24px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.nowrap { flex-wrap: nowrap; gap: 8px; }
.stack > * + * { margin-top: 12px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin: 0 0 4px; }

/* ===================================================================== staff workspace shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface-card); color: var(--text-primary); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 4px 14px 16px; }
.topbar :focus-visible, .auth-brand :focus-visible, .portal-foot :focus-visible { outline-color: var(--focus-on-dark); }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: var(--logo-clear) 8px; text-decoration: none; color: var(--text-primary); }
.sb-brand img { height: var(--logo-h); width: auto; display: block; }
.sb-product { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--brand-primary-tint); color: var(--brand-primary-text); }
.sb-nav { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 0 0 4px; padding: 0 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-control); color: var(--on-dark-muted); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: var(--on-dark-hover); color: var(--text-on-dark); }
.nav-item[aria-current="page"] { background: var(--action-secondary); color: var(--text-on-dark); font-weight: 650; }
.sidebar .nav-item { color: var(--text-secondary); font-weight: 600; border-left: 3px solid transparent; padding: 8px 12px; }
.sidebar .nav-item:hover { background: var(--surface-app); color: var(--text-primary); }
.sidebar .nav-item[aria-current="page"] { background: var(--surface-selected); color: var(--action-secondary); border-left-color: var(--brand-primary); font-weight: 700; }
.nav-locked { cursor: not-allowed; }
.nav-locked .nav-lock { width: 1em; height: 1em; margin-left: auto; }
.sb-user { margin-top: auto; padding: 14px 6px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.sb-user-text { display: flex; flex-direction: column; min-width: 0; }
.sb-user-name { color: var(--text-primary); text-decoration: none; font-weight: 650; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-role { font-size: 13.5px; color: var(--text-secondary); }
.sb-user form { grid-column: 1 / -1; }
.sb-user .btn { width: 100%; justify-content: flex-start; margin-top: 8px; }
.ws-main { display: flex; flex-direction: column; min-width: 0; }
.ws-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px 32px; background: var(--surface-card); border-bottom: 1px solid var(--border); }
.ws-search { position: relative; flex: 1; max-width: 560px; }
.ws-search > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.ws-search input[type=search] { padding-left: 40px; background: var(--surface-app); border-radius: 999px; }
.ws-org { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-secondary); padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-card); white-space: nowrap; }
.ws main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 32px 48px; flex: 1; }
.ws main.narrow { max-width: 860px; }

/* ===================================================================== portal / public top header */
.topbar { background: var(--text-primary); color: var(--text-on-dark); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--space); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--logo-clear); padding: var(--logo-clear) var(--logo-clear) var(--logo-clear) 0; color: var(--text-on-dark); text-decoration: none; }
.brand img { display: block; height: var(--logo-h); width: auto; }
.brand small { font-size: 14.5px; font-weight: 600; color: var(--text-on-dark); white-space: nowrap; padding-left: var(--logo-clear); border-left: 1px solid var(--on-dark-line); }
.topbar a.brand:hover { color: var(--text-on-dark); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav .nav-item { padding: 8px 12px; }
.who { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 8px 0; }
.who-name { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; }
.who-org { font-size: 13.5px; font-weight: 400; color: var(--on-dark-muted); }
.site main { max-width: 1240px; margin: 0 auto; padding: 28px var(--space) 56px; }
.site main.narrow { max-width: 800px; }
.sample-banner { background: var(--warning-fill); color: var(--text-primary); text-align: center; font-size: 14px; font-weight: 500; padding: 5px var(--space); display: flex; gap: 6px; justify-content: center; align-items: center; --icon: var(--icon-warning); }
.foot { background: var(--text-primary); color: var(--on-dark-muted); font-size: 13.5px; padding: 14px 32px; display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; }
.ws .foot { background: var(--surface-card); color: var(--text-secondary); border-top: 1px solid var(--border); }

/* ===================================================================== sign-in split screen */
.auth { display: grid; grid-template-columns: minmax(380px, 5fr) 7fr; min-height: 100vh; }
.auth-brand { background: var(--text-primary); color: var(--text-on-dark); padding: 40px 48px; display: flex; flex-direction: column; gap: 40px; }
.auth-logo { height: 36px; width: auto; align-self: flex-start; margin: 14px 0; }
.auth-pitch { margin: auto 0; max-width: 460px; }
.eyebrow.on-dark { color: var(--on-dark-muted); }
.auth-headline { font-size: 33px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 28px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; color: var(--on-dark-muted); }
.auth-points strong { color: var(--text-on-dark); display: block; }
.auth-points .i { width: 40px; height: 40px; padding: 9px; border-radius: var(--radius); background: var(--on-dark-hover); color: var(--text-on-dark); }
.auth-foot { font-size: 14px; color: var(--on-dark-muted); margin: 0; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(460px, 100%); }
.auth-card > .card { padding: 32px; box-shadow: var(--shadow-lift); }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand img { display: none; margin: 0 auto 8px; width: 180px; max-width: 100%; height: auto; }
.tagline { color: var(--text-primary); font-size: 16px; margin: 0; font-weight: 500; }
.auth-card h1 { font-size: 25px; margin-bottom: 6px; }
.auth-card .card .actions .btn.primary { flex: 1; }

/* ===================================================================== page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { min-width: 0; }
.page-title h1 + .muted { margin: 6px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; font-weight: 500; text-decoration: none; margin-bottom: 8px; }
.crumb .i { width: 1.05em; height: 1.05em; }

/* ===================================================================== cards, panels, grids */
.card, .panel { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card { padding: 20px; }
.card + .card, .panel + .panel { margin-top: 16px; }
.card h2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel { display: flex; flex-direction: column; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.panel-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; }
.panel-head > a { font-size: 14.5px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.panel-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-selected); color: var(--action-secondary); }
.panel-icon .i { width: 18px; height: 18px; }
.panel-body { padding: 16px 20px 20px; flex: 1; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.dash { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dash > * + * { margin-top: 0; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.hero { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.hero h1 { font-size: 28px; margin-bottom: 6px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
dl.kv { display: grid; grid-template-columns: fit-content(220px) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
dl.kv dt { color: var(--text-secondary); font-size: 15px; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }

/* KPI tiles */
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 20px; }
.kpi { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); color: var(--text-primary); text-decoration: none; }
a.kpi:hover { color: var(--text-primary); border-color: var(--action-secondary); box-shadow: var(--shadow-lift); }
.kpi-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; }
.kpi-icon .i { width: 22px; height: 22px; }
.kpi-text { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: 14.5px; color: var(--text-secondary); font-weight: 500; }
.kpi-value { font-size: 30.5px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.kpi-sub { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.kpi-go { position: absolute; right: 14px; top: 16px; color: var(--text-secondary); width: 18px; height: 18px; }
/* tones (fills only from tokens) */
.kpi-icon.tone-blue { background: var(--surface-selected); color: var(--action-secondary); }
.kpi-icon.tone-navy { background: var(--text-primary); color: var(--text-on-dark); }
.kpi-icon.tone-orange { background: var(--brand-primary); color: var(--text-primary); }
.kpi-icon.tone-green { background: var(--surface-card); color: var(--success); border: 1.5px solid var(--success); }
.kpi-icon.tone-amber { background: var(--warning-fill); color: var(--text-primary); }
.kpi-icon.tone-red { background: var(--surface-card); color: var(--error); border: 1.5px solid var(--error); }
.kpi-icon.tone-grey { background: var(--surface-app); color: var(--text-secondary); border: 1px solid var(--border); }

/* stat (legacy) */
.stat { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.stat .n { font-size: 26.5px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--text-secondary); font-size: 14.5px; }
a.stat { text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: var(--action-secondary); }

/* pipeline (candidate funnel) */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.stage { display: flex; flex-direction: column; gap: 0; padding: 7px 16px 7px 22px; text-decoration: none; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); min-height: 54px; justify-content: center; }
.stage:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 10px 0 0 10px; padding-left: 16px; }
.stage-l { font-size: 13.5px; font-weight: 600; }
.stage-n { font-size: 22px; font-weight: 700; line-height: 1.15; }
.stage.s1 { background: var(--surface-selected); color: var(--text-primary); }
.stage.s2 { background: var(--action-secondary); color: var(--text-on-dark); }
.stage.s3 { background: var(--action-secondary-hover); color: var(--text-on-dark); }
.stage.s4 { background: var(--text-primary); color: var(--text-on-dark); }
.stage.s5 { background: var(--brand-primary); color: var(--text-primary); }
.stage:hover { filter: brightness(1.06); }
.stage:focus-visible { outline-offset: -4px; }
.pipeline-note { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 16px; font-size: 14.5px; color: var(--text-secondary); }
.pipeline-note strong { color: var(--text-primary); }

/* charts */
.donut { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.donut-figure { position: relative; width: 156px; height: 156px; flex: none; }
.donut-figure svg, .ring svg { width: 100%; height: 100%; transform: none; }
.track { fill: none; stroke: var(--surface-app); stroke-width: 5.2; }
.arc { fill: none; stroke-width: 5.2; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-value { font-size: 28px; font-weight: 700; line-height: 1; }
.donut-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 180px; display: grid; gap: 10px; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend-n { margin-left: auto; font-weight: 650; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.arc.tone-blue { stroke: var(--action-secondary); } .swatch.tone-blue { background: var(--action-secondary); }
.arc.tone-navy { stroke: var(--text-primary); } .swatch.tone-navy { background: var(--text-primary); }
.arc.tone-orange { stroke: var(--brand-primary); } .swatch.tone-orange { background: var(--brand-primary); }
.arc.tone-green { stroke: var(--success); } .swatch.tone-green { background: var(--success); }
.arc.tone-amber { stroke: var(--warning-fill); } .swatch.tone-amber { background: var(--warning-fill); }
.arc.tone-red { stroke: var(--error); } .swatch.tone-red { background: var(--error); }
.arc.tone-grey { stroke: var(--border); } .swatch.tone-grey { background: var(--border); }
.arc.tone-light { stroke: var(--surface-selected); } .swatch.tone-light { background: var(--surface-selected); border: 1px solid var(--action-secondary); }
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring .track, .ring .arc { stroke-width: 4.2; }
.ring .arc { stroke-linecap: round; }
.ring-value { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26.5px; font-weight: 700; }
.columns { width: 100%; height: auto; display: block; }
.columns .axis { stroke: var(--border); stroke-width: 1; }
.columns .col.tone-blue { fill: var(--action-secondary); }
.columns .col.tone-orange { fill: var(--brand-primary); }
.columns .col.empty { fill: var(--border); }
.columns .col-n { font-size: 15px; font-weight: 650; fill: var(--text-primary); }
.columns .col-l { font-size: 13.5px; fill: var(--text-secondary); }
.meter + .meter { margin-top: 16px; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 6px; }
.meter-n { color: var(--text-secondary); font-weight: 600; }
.meter progress.bar { max-width: none; height: 8px; }

/* people and lists */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 700; letter-spacing: .02em; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.md { width: 38px; height: 38px; font-size: 14px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.av-1 { background: var(--surface-selected); color: var(--action-secondary); }
.av-2 { background: var(--brand-primary-tint); color: var(--text-primary); }
.av-3 { background: var(--text-primary); color: var(--text-on-dark); }
.av-4 { background: var(--surface-app); color: var(--text-primary); border: 1px solid var(--border-control); }
.sidebar .av-3, .topbar .av-3 { background: var(--action-secondary); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-text { min-width: 0; }
.person-name { font-weight: 650; color: var(--text-primary); text-decoration: none; }
a.person-name { color: var(--action-secondary); }
a.person-name:hover { text-decoration: underline; }
.person-sub { font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.list-end { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 14.5px; }
.list .grow { flex: 1; min-width: 0; }
.attn-list > li { padding: 2px 0; }
.attn-list a { flex: 1; display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin: 0 -12px; border-radius: var(--radius-control); text-decoration: none; color: var(--text-primary); }
.attn-list a:hover { background: var(--surface-selected); color: var(--text-primary); }
.attn-list .attn-n { margin-left: auto; font-weight: 700; font-size: 18px; }
.attn-list .i.chev { width: 16px; height: 16px; color: var(--text-secondary); }
.attn-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.attn-dot.tone-amber { background: var(--warning-fill); color: var(--text-primary); }
.attn-dot.tone-red { background: var(--surface-card); color: var(--error); border: 1.5px solid var(--error); }
.attn-dot.tone-blue { background: var(--surface-selected); color: var(--action-secondary); }
.attn-dot.tone-grey { background: var(--surface-app); color: var(--text-secondary); border: 1px solid var(--border); }
.attn-dot .i { width: 18px; height: 18px; }
.date-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--surface-selected); color: var(--text-primary); flex: none; line-height: 1.05; }
.date-chip b { font-size: 18px; }
.date-chip span { font-size: 12px; font-weight: 600; color: var(--action-secondary); }

/* profile header (candidate / employee record) */
.profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 20px; }
.profile-main { flex: 1; min-width: 240px; }
.profile-main h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 26px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--text-secondary); }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta .i { width: 16px; height: 16px; }
.profile .row { margin-top: 10px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.progress-block { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.progress-block progress.bar { max-width: none; flex: 1; height: 10px; }
.progress-block strong { font-size: 18.5px; }

/* toolbar, tabs, filters */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.toolbar form[role="search"] { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; text-decoration: none; color: var(--text-secondary); border-bottom: 2.5px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--text-primary); }
.tabs a[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--action-secondary); font-weight: 650; }
.tabs a[aria-current="page"] .count { background: var(--surface-selected); color: var(--action-secondary); border-color: var(--surface-selected); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.chips-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-right: 4px; }
.chip { font-size: 14px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text-primary); background: var(--surface-card); }
.chip:hover { background: var(--surface-selected); border-color: var(--action-secondary); color: var(--text-primary); }
.chip[aria-current="page"] { background: var(--surface-selected); color: var(--text-primary); border-color: var(--action-secondary); font-weight: 650; }
.count { display: inline-block; min-width: 1.7em; padding: 0 7px; border-radius: 999px; background: var(--surface-app); border: 1px solid var(--border); font-size: 13px; text-align: center; color: var(--text-primary); font-weight: 600; }
details.filters { margin: 0 0 14px; }
details.filters > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--action-secondary); }
details.filters[open] > summary { margin-bottom: 10px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-app); color: var(--text-secondary); border: 1px solid var(--border); vertical-align: middle; line-height: 1.5; }
.badge.ok { background: var(--surface-card); color: var(--success); border-color: var(--success); --icon: var(--icon-check); }
.badge.warn { background: var(--warning-fill); color: var(--text-primary); border-color: var(--warning-fill); --icon: var(--icon-warning); }
.badge.danger { background: var(--surface-card); color: var(--error); border-color: var(--error); --icon: var(--icon-error); }
.badge.info { background: var(--surface-selected); color: var(--text-primary); border-color: var(--surface-selected); }
.badge::before { width: 1em; height: 1em; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel .table-wrap, .card .table-wrap { border: 0; box-shadow: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; background: var(--surface-card); }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 13.5px; color: var(--text-secondary); font-weight: 600; background: var(--surface-app); }
/* let table cells wrap so tables fit their box instead of scrolling sideways */
td .badge { white-space: normal; }
td .person-sub, td .muted { overflow-wrap: anywhere; }
td input[type=date] { min-width: 0; width: 100%; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover, tbody tr:has(input[type=checkbox]:checked) { background: var(--surface-selected); }
td .person + .badge { margin-top: 4px; }
.cell-progress { min-width: 110px; }
@media (max-width: 720px) {
  table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  table.stack-sm td { border: 0; padding: 4px 16px; }
  table.stack-sm td[data-label]::before { content: attr(data-label) ": "; color: var(--text-secondary); font-size: 14px; }
  table.stack-sm td[data-label="Candidate"]::before, table.stack-sm td[data-label="Employee"]::before { content: none; }
}
/* wide app tables (not letters) also stack on tablets and small laptops (below 1200px), so nothing scrolls sideways */
@media (max-width: 1200px) {
  :not(.doc) > .table-wrap > table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  :not(.doc) > .table-wrap > table.stack-sm, :not(.doc) > .table-wrap > table.stack-sm > tbody, :not(.doc) > .table-wrap > table.stack-sm > tbody > tr, :not(.doc) > .table-wrap > table.stack-sm > tbody > tr > td { display: block; width: 100%; }
  :not(.doc) > .table-wrap > table.stack-sm > tbody > tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  :not(.doc) > .table-wrap > table.stack-sm > tbody > tr > td { border: 0; padding: 4px 16px; }
  :not(.doc) > .table-wrap > table.stack-sm > tbody > tr > td[data-label]::before { content: attr(data-label) ": "; color: var(--text-secondary); font-size: 14px; }
  :not(.doc) > .table-wrap > table.stack-sm > tbody > tr > td[data-label="Candidate"]::before, :not(.doc) > .table-wrap > table.stack-sm > tbody > tr > td[data-label="Employee"]::before { content: none; }
}

/* progress */
progress.bar { appearance: none; -webkit-appearance: none; width: 100%; min-width: 80px; max-width: 200px; height: 8px; border: 0; border-radius: 999px; background: var(--surface-selected); overflow: hidden; vertical-align: middle; }
progress.bar::-webkit-progress-bar { background: var(--surface-selected); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--action-secondary); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--action-secondary); border-radius: 999px; }
progress.bar.tone-green::-webkit-progress-value { background: var(--success); } progress.bar.tone-green::-moz-progress-bar { background: var(--success); }
progress.bar.tone-navy::-webkit-progress-value { background: var(--text-primary); } progress.bar.tone-navy::-moz-progress-bar { background: var(--text-primary); }
progress.bar.tone-red::-webkit-progress-value { background: var(--error); } progress.bar.tone-red::-moz-progress-bar { background: var(--error); }
.progress-label { font-size: 14px; color: var(--text-secondary); font-weight: 600; min-width: 3ch; }

/* forms */
form.inline { display: inline; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15.5px; }
.hint { font-weight: 400; color: var(--text-secondary); font-size: 14px; display: block; margin: -2px 0 6px; }
.field { margin-bottom: 16px; }
input:not([type]), input[type=text], input[type=url], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; max-width: 100%; padding: 7px 12px; font: inherit; color: var(--text-primary); background: var(--surface-card); border: 1px solid var(--border-control); border-radius: var(--radius-control); min-height: 38px;
}
input::placeholder, textarea::placeholder { color: var(--text-secondary); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--action-secondary); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { accent-color: var(--action-secondary); }
textarea { min-height: 100px; }
textarea.code { font-family: var(--font-mono); font-size: 14.5px; min-height: 420px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--error); }
/* Cruxtra dropdown (static/app.js): always opens below the box */
.dd { position: relative; width: 100%; }
.row > .dd, form.row .dd { width: auto; min-width: 170px; }
td .dd { width: 100%; min-width: 110px; }
.dd-native { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dd-btn { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 7px 14px; font: inherit; text-align: left; color: var(--text-primary); background: var(--surface-card); border: 1px solid var(--border-control); border-radius: var(--radius-control); cursor: pointer; }
.dd-btn:hover { border-color: var(--text-primary); }
.dd-btn:focus { outline: none; }
.dd-btn:focus-visible { outline: none; border-color: var(--text-primary); box-shadow: 0 0 0 3px var(--surface-selected); }
.dd.open .dd-btn { border-color: var(--text-primary); }
.dd-btn[disabled] { background: var(--surface-app); color: var(--text-secondary); cursor: not-allowed; }
.dd-btn[aria-invalid="true"] { border: 2px solid var(--error); }
.dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-text.dd-empty { color: var(--text-secondary); }
.dd-chev { flex: none; width: 16px; height: 16px; margin-right: 2px; background-color: var(--text-secondary); -webkit-mask: var(--icon-chevron-down) center / contain no-repeat; mask: var(--icon-chevron-down) center / contain no-repeat; transition: transform .15s ease; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-list { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; min-width: 100%; max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: var(--shadow-lift); }
.dd-list:focus { outline: none; }
.dd-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.dd-list li.dd-placeholder { color: var(--text-secondary); }
.dd-list li.active { background: var(--surface-app); }
.dd-list li[aria-selected="true"] { background: var(--surface-selected); color: var(--action-secondary); font-weight: 600; }
.dd-list li[aria-disabled="true"] { color: var(--text-secondary); cursor: not-allowed; }
td .dd-list { min-width: 220px; }
.error-text { color: var(--error); font-size: 14.5px; margin-top: 6px; display: flex; gap: 6px; align-items: center; --icon: var(--icon-error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; width: 18px; height: 18px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 4px; }
details > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
details > summary:hover { color: var(--action-secondary); }
details[open] > summary { margin-bottom: 8px; }

/* buttons: one orange primary per screen (dark label); every other action is royal blue */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 14px; font: inherit; font-size: 15.5px; font-weight: 600; border-radius: var(--radius-control); border: 1px solid var(--action-secondary); background: var(--surface-card); color: var(--action-secondary); cursor: pointer; text-decoration: none; min-height: 36px; white-space: nowrap; line-height: 1.2; }
.btn .i { width: 1.15em; height: 1.15em; }
.btn:hover { background: var(--surface-selected); color: var(--action-secondary-hover); border-color: var(--action-secondary-hover); }
.btn.primary { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--text-primary); }
.btn.primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); color: var(--text-primary); }
.btn.secondary { background: var(--action-secondary); border-color: var(--action-secondary); color: var(--text-on-dark); }
.btn.secondary:hover { background: var(--action-secondary-hover); border-color: var(--action-secondary-hover); color: var(--text-on-dark); }
.btn.danger { color: var(--error); border-color: var(--error); background: var(--surface-card); }
.btn.danger:hover { background: var(--surface-app); color: var(--error); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-selected); }
.btn.on-dark { color: var(--text-on-dark); border-color: var(--on-dark-line); background: transparent; }
.btn.on-dark:hover { background: var(--on-dark-hover); color: var(--text-on-dark); border-color: var(--on-dark-muted); }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: 14.5px; }
.btn[disabled], .btn[disabled]:hover { background: var(--surface-app); border-color: var(--border-control); color: var(--text-secondary); cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* alerts: icon + text, never colour alone */
.alert { position: relative; padding: 13px 16px 13px 46px; border-radius: var(--radius); border: 1px solid var(--border); border-left-width: 4px; margin-bottom: 16px; background: var(--surface-card); color: var(--text-primary); --icon: var(--icon-info); }
.alert::before { position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; }
.alert.ok { border-left-color: var(--success); --icon: var(--icon-success); }
.alert.ok::before { background-color: var(--success); }
.alert.danger { border-left-color: var(--error); --icon: var(--icon-error); }
.alert.danger::before { background-color: var(--error); }
.alert.warn { background: var(--warning-fill); border-color: var(--warning-fill); border-left-color: var(--text-primary); --icon: var(--icon-warning); }
.alert.info { background: var(--surface-selected); border-color: var(--surface-selected); border-left-color: var(--action-secondary); }
.alert.info::before { background-color: var(--action-secondary); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert.danger a { color: var(--error); }
.empty { text-align: center; padding: 40px 16px; color: var(--text-secondary); border: 1px dashed var(--border-control); border-radius: var(--radius-lg); background: var(--surface-card); }
.empty p { margin-bottom: 12px; }

/* checklist (candidate / employee portals) */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); box-shadow: var(--shadow); }
.checklist li:hover { border-color: var(--action-secondary); }
.checklist .icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--surface-app); --icon: var(--icon-circle); }
.checklist .icon::before { width: 22px; height: 22px; }
.checklist .icon.done { color: var(--success); background: var(--surface-card); --icon: var(--icon-success); }
.checklist .icon.attn { color: var(--text-primary); background: var(--warning-fill); --icon: var(--icon-warning); }
.checklist .icon.wait { color: var(--action-secondary); background: var(--surface-selected); --icon: var(--icon-clock); }
.checklist .grow { flex: 1; min-width: 0; }
.checklist a.title { font-weight: 650; text-decoration: none; }
.checklist a.title:hover { text-decoration: underline; }

/* HR step cards */
details.card.step { padding: 0; }
details.card.step > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; list-style: none; }
details.card.step > summary::-webkit-details-marker { display: none; }
details.card.step > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: rotate(45deg); transition: transform .15s; }
details.card.step[open] > summary::after { transform: rotate(-135deg); }
details.card.step[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 0; }
details.card.step > :not(summary) { margin-left: 18px; margin-right: 18px; }
details.card.step > :not(summary):first-of-type { margin-top: 14px; }
details.card.step > :last-child { margin-bottom: 16px; }
details.card.step .icon { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--surface-app); --icon: var(--icon-circle); flex: none; }
details.card.step .icon::before { content: ""; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
details.card.step .icon.done { color: var(--success); background: var(--surface-card); --icon: var(--icon-success); }
details.card.step .icon.attn { color: var(--text-primary); background: var(--warning-fill); --icon: var(--icon-warning); }
details.card.step .icon.wait { color: var(--action-secondary); background: var(--surface-selected); --icon: var(--icon-clock); }
.step-title { font-weight: 650; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-card); border: 2px solid var(--action-secondary); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 1.5px; background: var(--border); }
.timeline li:last-child::after { content: none; }
.timeline li .when { font-size: 13.5px; color: var(--text-secondary); }
.doc { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; line-height: 1.65; max-height: 560px; overflow: auto; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 22px; }
.doc .doc-title { font-size: 1.3rem; margin: 0 0 16px; letter-spacing: -.01em; }
.doc .doc-h { font-size: 1.02rem; margin: 22px 0 8px; }
.doc .table-wrap { margin: 4px 0 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.doc table th, .doc table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc table th { background: var(--surface-app); font-weight: 600; }
.doc table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-inline { padding: 0; border: 0; max-height: none; overflow: visible; }
.doc-page { padding: 40px 48px; max-height: none; box-shadow: var(--shadow); }
.issue-grid { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 20px; align-items: start; }
.issue-side > .card { margin-bottom: 16px; }
.issue-preview { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--radius); }
.terms h3 { font-size: 17px; margin: 18px 0 8px; }
.print-body { background: var(--surface-app); }
.print-bar { max-width: 210mm; margin: 16px auto; padding: 0 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.print-bar .alert { flex: 1; margin: 0; }
.sheet { background: var(--surface-card); max-width: 210mm; margin: 0 auto 40px; padding: 18mm 18mm 14mm; box-shadow: var(--shadow); border-radius: var(--radius); }
.letterhead { border-bottom: 2px solid var(--text-primary); padding-bottom: 10px; margin-bottom: 24px; }
.letterhead-name { font-size: 1.2rem; font-weight: 700; margin: 0; }
.letterhead-addr { color: var(--text-secondary); font-size: .85rem; margin: 4px 0 0; white-space: pre-line; }
.sheet .doc { border: 0; padding: 0; max-height: none; overflow: visible; box-shadow: none; }
.sheet-foot { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 8px; font-size: 13.5px; color: var(--text-secondary); }
.sheet-foot p { margin: 0 0 4px; overflow-wrap: anywhere; }
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  .print-bar { display: none; }
  .print-body { background: var(--surface-card); }
  .sheet { box-shadow: none; padding: 0; margin: 0; max-width: none; border-radius: 0; }
  .doc table tr, .doc p { break-inside: avoid; }
  .doc .doc-h, .doc .doc-title { break-after: avoid; }
}
@media (max-width: 640px) { .sheet { padding: 20px 16px; } }
@media (max-width: 720px) {
  .doc table.stack-sm td { border: 0; padding: 3px 12px; }
  .doc table.stack-sm tr { border: 1px solid var(--border); border-radius: var(--radius-control); padding: 6px 0; margin-bottom: 8px; }
}
@media (max-width: 1100px) {
  .issue-grid { grid-template-columns: 1fr; }
  .issue-preview { position: static; max-height: none; }
  .doc-page { padding: 24px; }
}
.ai-suggestion { background: var(--brand-primary-tint); border: 1px solid var(--brand-primary); border-radius: var(--radius-lg); padding: 12px 14px; color: var(--text-primary); }
.sim-banner { background: var(--warning-fill); border: 2px dashed var(--text-primary); color: var(--text-primary); padding: 10px; border-radius: var(--radius); font-weight: 700; margin-bottom: 16px; display: flex; gap: 8px; justify-content: center; align-items: center; --icon: var(--icon-warning); }
form[role="search"] input[type=search], form.row input[type=search] { flex: 1 1 220px; width: auto; min-width: 0; }

/* ===================================================================== onboarding v2 */
/* form sections and autosave */
.form-section { font-size: 17px; margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--border); }
form > .form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }
.autosave-note { background: var(--surface-selected); border-radius: var(--radius-control); padding: 8px 12px; }
.autosave-status { font-weight: 600; color: var(--text-primary); }

/* vertical progress timeline */
.vtimeline { list-style: none; margin: 0 0 20px; padding: 0; position: relative; }
.vt-item { position: relative; display: flex; gap: 14px; padding: 0 0 18px 0; }
.vt-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: -2px; width: 2px; background: var(--border); }
.vt-item:last-child::before { display: none; }
.vt-item.vt-done::before { background: var(--success); }
.vt-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-control); background: var(--surface-card); display: grid; place-items: center; position: relative; z-index: 1; }
.vt-dot::before { content: ""; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.vt-todo .vt-dot { color: var(--text-secondary); --icon: none; }
.vt-todo .vt-dot::before, .vt-current .vt-dot::before { display: none; }
.vt-current .vt-dot { border-color: var(--brand-primary); box-shadow: 0 0 0 4px var(--brand-primary-tint); }
.vt-current .vt-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-primary); }
.vt-done .vt-dot { border-color: var(--success); background: var(--success); color: var(--text-on-dark); --icon: var(--icon-check); }
.vt-wait .vt-dot { border-color: var(--action-secondary); background: var(--surface-selected); color: var(--action-secondary); --icon: var(--icon-clock); }
.vt-attn .vt-dot { border-color: var(--text-primary); background: var(--warning-fill); color: var(--text-primary); --icon: var(--icon-warning); }
.vt-locked .vt-dot { border-color: var(--border); background: var(--surface-app); color: var(--text-secondary); --icon: var(--icon-lock); }
.vt-body { min-width: 0; padding-top: 3px; }
.vt-title { font-weight: 650; }
.vt-title a { text-decoration: none; }
.vt-title a:hover { text-decoration: underline; }
.vt-locked .vt-title, .vt-locked .vt-meta { color: var(--text-secondary); }
.vt-meta { color: var(--text-secondary); }
.vt-owner { font-weight: 600; color: var(--text-primary); }
.vt-overdue { color: var(--error); font-weight: 600; }
.vt-now .vt-title { color: var(--text-primary); }
.vt-details > summary { cursor: pointer; font-weight: 600; margin: 8px 0 12px; }

/* letters: accept / decline / ask for a change */
.decide { margin-top: 20px; }
.decide-opt { margin: 0 0 10px; }
.decide-opt > summary { list-style: none; display: inline-flex; cursor: pointer; }
.decide-opt > summary::-webkit-details-marker { display: none; }
.decide-opt[open] > summary { margin-bottom: 12px; }
.accept-form { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface-app); }
.accept-steps { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 18px; }
.accept-steps > li { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.camera video, .camera img { display: block; width: 100%; max-width: 360px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--text-primary); margin-bottom: 10px; }
.camera img { background: var(--surface-app); }
.sigpad-wrap { border: 2px dashed var(--border-control); border-radius: var(--radius); background: var(--surface-card); margin-bottom: 8px; }
.sigpad { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.linklike { color: var(--action-secondary); text-decoration: underline; cursor: pointer; font-weight: 400; }
.doc-letter { max-height: 70vh; }
.doc-sig { max-height: 64px; max-width: 220px; display: block; }
.doc-sig-wrap { margin: 4px 0 0; }
.page-break { border-top: 1px dashed var(--border); margin: 24px 0; }
.decisions { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.decisions > li { border: 1px solid var(--border); border-radius: var(--radius-control); padding: 10px 12px; }
.evidence { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 8px; }
.ev-photo { width: 120px; height: 160px; object-fit: cover; border-radius: var(--radius-control); border: 1px solid var(--border); }
.ev-sig { height: 60px; max-width: 220px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-control); }

/* printed letters: logo, signature and footer band */
.letterhead.has-logo { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-direction: row-reverse; }
.letterhead-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.sheet .doc .doc-title { text-align: center; }
.acceptance-block { border: 1px solid var(--border); border-radius: var(--radius-control); padding: 8px 10px; margin-bottom: 8px; }
.acceptance-sig { max-height: 56px; max-width: 220px; display: block; margin: 4px 0; }
.sheet-band { margin-top: 18px; text-align: center; }
.sheet-band img { max-width: 100%; max-height: 90px; object-fit: contain; }
.sheet-band p { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }

/* policies */
.policy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.policy-list > li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); }
.policy-list > li.is-done { background: var(--surface-app); }
.pl-icon { flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--border-control); }
.pl-icon.done { border-color: var(--success); background: var(--success); }
.pl-title { font-weight: 650; }
.ok-text { color: var(--success); font-weight: 600; }
.doc-policy { max-height: none; }
ul.plain { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }

a.sb-user-name:hover { color: var(--text-primary); text-decoration: underline; }

/* lawyer review */
.legal-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-app); }
.legal-form .check { margin: 0; }
.legal-ok { color: var(--success); font-weight: 600; margin: 0 0 12px; }
.legal-pending { color: var(--text-secondary); }

/* HR inbox */
.inbox tr.unread td { font-weight: 650; }
.inbox tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--brand-primary); }

/* admin */
.link-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ent-letterhead { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.ent-letterhead legend { font-weight: 650; padding: 0 6px; }
.admin-logo { max-height: 56px; max-width: 200px; display: block; margin: 6px 0; }
.admin-footer { max-height: 60px; max-width: 100%; display: block; margin: 6px 0; }
.admin-sig { max-height: 44px; max-width: 160px; display: block; margin: 4px 0; }
.label { display: block; font-weight: 600; margin-bottom: 4px; }

/* employee home */
.home-hero .home-id { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.home-photo { display: grid; justify-items: center; gap: 6px; }
.home-photo img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface-card); box-shadow: var(--shadow-lift); }
.photo-change form { display: grid; gap: 6px; margin-top: 6px; max-width: 260px; }
.pre-line { white-space: pre-line; }
.profile-group summary.btn { list-style: none; }
.profile-group summary::-webkit-details-marker { display: none; }
.row.spread { justify-content: space-between; }

/* first sign-in welcome */
body.has-overlay { overflow: hidden; }
.welcome-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--text-primary) 55%, transparent); }
.welcome-card { position: relative; z-index: 2; max-width: 440px; background: var(--surface-card); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; box-shadow: var(--shadow-lift); }
.welcome-card h2 { font-size: 25px; margin-bottom: 10px; }
.welcome-emblem { color: var(--brand-primary); margin: 0 0 6px; }
.welcome-emblem .i { width: 44px; height: 44px; }
.confetti { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

@media print {
  .page-break { border: 0; margin: 0; break-after: page; }
  .sheet-band { break-inside: avoid; }
}

/* ===================================================================== Cruxtra Admin (multi-tenant system) */
/* Lato (SIL Open Font Licence 1.1, licence embedded in the font files) – served from this app, no third-party font service */
@font-face { font-family: "Lato"; src: url("/static/fonts/lato-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Lato"; src: url("/static/fonts/lato-italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: "Lato"; src: url("/static/fonts/lato-bold.ttf") format("truetype"); font-weight: 600 700; font-style: normal; font-display: block; }
@font-face { font-family: "Lato"; src: url("/static/fonts/lato-black.ttf") format("truetype"); font-weight: 800 900; font-style: normal; font-display: block; }
body.adm { font-family: "Lato", var(--font-sans); background: var(--surface-app); color: var(--text-primary); }
body.adm h1, body.adm h2, body.adm h3, body.adm .btn, body.adm .badge { font-family: "Lato", var(--font-sans); }
body.adm h1 { font-weight: 800; letter-spacing: 0; }
body.adm h2, body.adm h3 { font-weight: 700; }
.adm-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.adm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 6px 14px 16px; background: var(--surface-card); border-right: 1px solid var(--border); }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: var(--logo-clear) 8px; text-decoration: none; }
.adm-brand img { height: var(--logo-h); width: auto; display: block; }
.adm-tag { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--brand-primary-tint); color: var(--brand-primary-text); margin: 0; }
.adm-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.adm-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-control); color: var(--text-secondary); text-decoration: none; font-weight: 600; border-left: 3px solid transparent; }
.adm-item:hover { background: var(--surface-app); color: var(--text-primary); }
.adm-item[aria-current="page"] { background: var(--surface-selected); color: var(--action-secondary); border-left-color: var(--brand-primary); }
.adm-user { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.adm-user-text { display: flex; flex-direction: column; min-width: 0; }
.adm-user-text a { font-weight: 700; color: var(--text-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-text a:hover { text-decoration: underline; }
.adm-user-text span { font-size: 13.5px; color: var(--text-secondary); }
.adm-user form { grid-column: 1 / -1; }
.adm-user .btn { width: 100%; justify-content: flex-start; }
.adm-main { display: flex; flex-direction: column; min-width: 0; }
.adm-main main { width: 100%; max-width: 1360px; margin: 0 auto; padding: 28px 32px 48px; flex: 1; }
.adm-main main.narrow { max-width: 860px; }
.adm-env { background: var(--brand-primary-tint); color: var(--text-primary); text-align: center; font-size: 14px; font-weight: 600; padding: 6px; border-bottom: 1px solid var(--border); }
.adm-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 32px; font-size: 14px; color: var(--text-secondary); border-top: 1px solid var(--border); background: var(--surface-card); }
.adm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-head p { margin: 6px 0 0; }
.adm-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 20px; align-items: start; }
.adm-search { margin-bottom: 16px; }
.adm-search input[type=search] { flex: 1 1 240px; width: auto; }
.adm-search select { width: auto; }
.adm .card { margin-bottom: 20px; }
.adm .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.adm .tabs a { padding: 10px 14px; text-decoration: none; color: var(--text-secondary); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.adm .tabs a[aria-current="page"] { color: var(--action-secondary); border-bottom-color: var(--brand-primary); }
.health { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.health li { padding: 8px 12px; border-radius: var(--radius-control); border: 1px solid var(--border); }
.health li.good strong { color: var(--success); }
.health li.bad { border-color: var(--error); }
.health li.bad strong { color: var(--error); }
.act { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.act li { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.history li { border-left: 3px solid var(--border); padding-left: 12px; }
.releases { list-style: none; padding: 0; margin: 0; }
.rel-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.rel-head h2 { margin: 0; }
.btn.wide { width: 100%; justify-content: center; }
.adm-auth { min-height: 100vh; }
.adm-auth-main { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px 16px; }
.adm-auth-card { width: min(440px, 100%); background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 26px; box-shadow: var(--shadow-lift); }
.adm-auth-brand { display: grid; justify-items: center; gap: 6px; margin-bottom: 16px; }
.adm-auth-brand img { height: 96px; width: auto; }
.adm-auth-card h1 { font-size: 22.5px; margin-bottom: 14px; }

/* two-step sign-in */
.mfa-steps { padding-left: 20px; display: grid; gap: 12px; margin: 0 0 16px; }
.mfa-qr { margin: 10px 0; }
.qr { width: 200px; height: 200px; display: block; border: 1px solid var(--border); border-radius: var(--radius-control); }
.qr-light { fill: var(--surface-card); }
.qr-dark { fill: var(--text-primary); }
.mfa-key { font-size: 18px; letter-spacing: .06em; background: var(--surface-app); padding: 8px 10px; border-radius: var(--radius-control); overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; list-style: none; padding: 12px 16px; margin: 0 0 14px; background: var(--surface-app); border-radius: var(--radius-control); font-size: 17px; }
.alert.maint { margin-bottom: 12px; }

@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 16px 8px; }
  .adm-nav { flex-direction: row; flex-wrap: wrap; margin: 0; padding: 0 0 4px; }
  .adm-item { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: var(--radius-control) var(--radius-control) 0 0; }
  .adm-item[aria-current="page"] { border-bottom-color: var(--brand-primary); }
  .adm-user { display: none; }
  .adm-main main { padding: 20px 16px 40px; }
  .adm-foot { padding: 12px 16px; }
}
@media (max-width: 720px) {
  .recovery-codes { grid-template-columns: 1fr; }
}

/* ===================================================================== responsive */
@media (max-width: 720px) {
  .btn { min-height: 40px; }
  .btn.small { min-height: 34px; }
  input:not([type]), input[type=text], input[type=url], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=search], select, .dd-btn { min-height: 42px; }
}
/* no sideways scrolling: long words and values wrap; wide content stays inside its box */
html, body { max-width: 100%; overflow-x: clip; }
main, .card, .panel, .doc, dd { overflow-wrap: anywhere; }
img, svg, video, canvas { max-width: 100%; }
@media (max-width: 1200px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
}
@media (max-width: 1100px) and (min-width: 721px) {
  .dash > .span-4.pair, .dash > .span-6.pair { grid-column: span 6; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 0 16px 10px; gap: 6px; }
  .sb-brand { padding: 14px 0 8px; }
  .sb-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0 0 4px; }
  .sb-group { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .sidebar .nav-item { border-left: 0; padding: 7px 10px; }
  .sb-title { display: none; }
  .nav-item { white-space: nowrap; padding: 8px 12px; }
  .sb-user { position: absolute; top: 10px; right: 16px; border: 0; padding: 0; display: flex; gap: 8px; }
  .sb-user .avatar, .sb-user-text { display: none; }
  .sb-user .btn { width: auto; margin: 0; }
  .sidebar { position: relative; }
  .ws-top { position: static; padding: 10px 16px; }
  .ws-org { display: none; }
  .ws-search { max-width: none; }
  .ws main { padding: 20px 16px 40px; }
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .login-brand img { display: block; }
  .login-brand .tagline { display: none; } /* the stacked logo carries the tagline */
  .auth-main { align-items: start; padding: 28px 16px; }
  .auth-card > .card { padding: 22px; }
}
@media (max-width: 1200px) and (min-width: 641px) {
  .stage { padding: 6px 12px 6px 20px; } .stage:first-child { padding-left: 14px; } .stage-l { font-size: 13px; } .stage-n { font-size: 20px; }
}
@media (max-width: 640px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage, .stage:first-child { clip-path: none; border-radius: var(--radius); padding: 8px 12px; min-height: 0; }
  .hero-grid { gap: 12px; align-items: start; }
  .hero { padding: 18px; }
  .topbar .nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .who { margin-left: auto; }
  .who .avatar { display: none; }
  .who .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .who .btn { padding: 6px 10px; }
  .brand { gap: 10px; } .brand small { padding-left: 10px; }
  .hero .ring { width: 76px; height: 76px; } .hero .ring-value { font-size: 18px; }
  h1 { font-size: 23.5px; }
  .kpi-value { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { flex-direction: column; gap: 10px; padding: 14px; }
  .kpi-icon { width: 38px; height: 38px; border-radius: 11px; }
  .profile { padding: 18px; }
  .avatar.lg { width: 56px; height: 56px; font-size: 19.5px; }
  .who-name { display: none; }
  .topbar-inner { padding-top: 4px; padding-bottom: 8px; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; } dl.kv dd { margin-bottom: 8px; }
  .foot { padding: 14px 16px; }
}
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 18px 0 0; }
.mini-stats > div { background: var(--surface-app); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.mini-stats dt { font-size: 13.5px; color: var(--text-secondary); font-weight: 500; }
.mini-stats dd { margin: 2px 0 0; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
td[data-label="Joining"], td[data-label="Due"] { white-space: nowrap; }
td[data-label="Candidate"], td[data-label="Employee"] { min-width: 230px; }
.person-sub { overflow-wrap: normal; word-break: normal; }
.alert ul { columns: 2 260px; column-gap: 32px; }
.ws-top .ws-search input[type=search] { width: 100%; }

/* =====================================================================================================
   DESIGN SYSTEM (docs/DESIGN.md) – eureka components with the Cruxtra accent.
   This block comes last on purpose: it sets the look of every screen; earlier rules supply structure.
   ===================================================================================================== */
body { font-family: var(--font); font-size: 15px; line-height: 1.45; letter-spacing: .005em; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
h1, h2, h3, h4 { letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: 29px; line-height: 1.15; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 16px; }
.card h2, .panel-head h2, section > h2 { font-size: 17px; }
a { color: var(--link); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--focus) 30%, transparent); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hint { font-size: 13px; color: var(--text-3); }

/* ---------- buttons: 34px, radius 8, one primary per screen ---------- */
.btn { height: 34px; min-height: 0; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; gap: 6px; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.secondary { background: var(--btn-blue); border-color: var(--btn-blue); color: var(--white); }
.btn.secondary:hover { background: var(--btn-blue-hover); border-color: var(--btn-blue-hover); color: var(--white); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn.dark:hover { background: color-mix(in srgb, var(--ink) 85%, var(--white)); border-color: var(--ink); color: var(--white); }
:root[data-theme="dark"] .btn.dark { background: var(--text); border-color: var(--text); color: var(--ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--red); background: var(--surface); border-color: var(--border); }
.btn.danger:hover { background: var(--red-soft); color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: var(--white); }
.btn.success { background: var(--green); border-color: var(--green); color: var(--white); }
.btn.small, .btn.sm { height: 28px; min-height: 0; padding: 0 10px; font-size: 13.5px; border-radius: 7px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 13px; border-radius: 6px; }
.btn.icon { width: 34px; padding: 0; } .btn.icon.sm { width: 28px; } .btn.icon.xs { width: 24px; }
.btn[disabled], .btn[disabled]:hover { opacity: .5; background: var(--surface); color: var(--text-2); border-color: var(--border); cursor: not-allowed; }
.btn .i { width: 16px; height: 16px; }

/* ---------- fields: 36px, radius 8; focus = accent border + 3px ring ---------- */
input:not([type]), input[type=text], input[type=url], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=search], input[type=file], select, textarea {
  min-height: 36px; padding: 0 11px; border: 1px solid var(--border-field); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; transition: border-color .12s, box-shadow .12s;
}
input[type=file] { padding: 6px 11px; }
textarea { padding: 9px 11px; min-height: 90px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.field { margin-bottom: 14px; }
.field > label, .field > .label, label.label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.grid { gap: 14px; }
.check { font-size: 15px; }
.check input, input[type=checkbox] { accent-color: var(--accent); }
.dd-btn { min-height: 36px; padding: 0 11px; border-color: var(--border-field); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; }
.dd-btn:hover { border-color: var(--border-strong); }
.dd.open .dd-btn, .dd-btn:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.dd-list { border-radius: 12px; padding: 6px; box-shadow: var(--shadow-lg); border-color: var(--border); }
.dd-list li { padding: 7px 10px; border-radius: 7px; font-size: 14px; }
.dd-list li.active { background: var(--surface-3); }
.dd-list li[aria-selected="true"] { background: var(--selected); color: var(--selected-text); font-weight: 700; }

/* ---------- segmented control ---------- */
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.seg a[aria-current="page"], .seg .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- chips (the app's badges) ---------- */
.badge, .chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; border: 0; font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); vertical-align: middle; }
.badge.ok, .chip.green { background: var(--green-soft); color: var(--green); border: 0; }
.badge.warn, .chip.amber { background: var(--amber-soft); color: var(--amber); border: 0; }
.badge.danger, .chip.red { background: var(--red-soft); color: var(--red); border: 0; }
.badge.info, .chip.blue { background: var(--blue-soft); color: var(--blue-text); border: 0; }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.chip.outline { background: transparent; border: 1px solid var(--border); }
.badge::before { width: 12px; height: 12px; }
td .badge { white-space: nowrap; height: auto; min-height: 22px; padding: 3px 8px; line-height: 1.25; }

/* ---------- cards, panels, stats ---------- */
.card, .panel, .kpi, .hero, .table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card { padding: 20px; }
a.card:hover, a.kpi:hover, .card.clickable:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.panel-head { padding: 16px 20px 0; }
.panel-icon { background: var(--selected); color: var(--selected-text); border-radius: 8px; width: 28px; height: 28px; }
.kpi { padding: 14px 16px; gap: 12px; align-items: center; }
.kpi-icon { width: 36px; height: 36px; border-radius: 10px; }
.kpi-icon .i { width: 18px; height: 18px; }
.kpi-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi-value { font-size: 25px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--text-3); }
.kpi-icon.tone-blue { background: var(--blue-soft); color: var(--blue-text); }
.kpi-icon.tone-navy { background: var(--neutral-soft); color: var(--text); }
.kpi-icon.tone-orange { background: var(--accent-soft); color: var(--accent-text); }
.kpi-icon.tone-green { background: var(--green-soft); color: var(--green); border: 0; }
.kpi-icon.tone-amber { background: var(--amber-soft); color: var(--amber); }
.kpi-icon.tone-red { background: var(--red-soft); color: var(--red); border: 0; }
.kpi-icon.tone-grey { background: var(--surface-3); color: var(--text-2); border: 0; }
.kpis { gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 20px; }
.stat-card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stat-card .v { font-size: 25px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-card .k { font-size: 13px; color: var(--text-2); }
.hero { background: var(--hero-grad); border-color: var(--border); border-radius: 20px; }
.empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.empty .empty-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); color: var(--text-2); margin-bottom: 12px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

/* ---------- tables: 13px, rows divided, header on surface-2 ---------- */
.table-wrap { overflow: hidden; }
table { background: transparent; font-size: 14px; }
th, td { padding: 12px 18px; border-bottom: 1px solid var(--border); }
th { font-size: 12.5px; font-weight: 600; color: var(--text-3); background: var(--surface-2); }
tbody tr:hover, tbody tr:has(input[type=checkbox]:checked) { background: var(--surface-2); }
tr.row-link { cursor: pointer; }
td.row-actions { width: 44px; text-align: right; padding-right: 10px; }

/* ---------- tabs: active tab bold with a 3px accent underline ---------- */
.tabs { gap: 2px; border-bottom: 1px solid var(--border); }
.tabs a, .tabs button { padding: 12px 14px 11px; font-size: 14.5px; font-weight: 500; color: var(--text-2); border: 0; border-bottom: 3px solid transparent; background: none; margin-bottom: -1px; cursor: pointer; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a[aria-current="page"], .tabs a[aria-selected="true"], .tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--link); font-weight: 700; }
.tabs.sticky { position: sticky; top: 0; z-index: 5; background: var(--surface); }

/* ---------- alerts keep their icons; quieter colours ---------- */
.alert { border-radius: var(--radius); border-left-width: 3px; background: var(--surface); }
.alert.info { background: var(--blue-soft); border-color: var(--blue-soft); border-left-color: var(--blue); }
.alert.ok { background: var(--green-soft); border-color: var(--green-soft); border-left-color: var(--green); }
.alert.warn { background: var(--amber-soft); border-color: var(--amber-soft); border-left-color: var(--amber); }
.alert.danger { background: var(--red-soft); border-color: var(--red-soft); border-left-color: var(--red); }

/* ---------- avatars: initials on the person's colour ---------- */
.avatar { color: var(--white); font-weight: 600; letter-spacing: 0; border: 0; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.md { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 72px; height: 72px; font-size: 25px; }
.avatar.xl { width: 46px; height: 46px; font-size: 17px; }
.av-1 { background: var(--av-1); color: var(--white); } .av-2 { background: var(--av-2); color: var(--white); } .av-3 { background: var(--av-3); color: var(--white); }
.av-4 { background: var(--av-4); color: var(--white); border: 0; } .av-5 { background: var(--av-5); color: var(--white); } .av-6 { background: var(--av-6); color: var(--white); }
.sidebar .av-3, .topbar .av-3 { background: var(--av-3); }
.avatar-stack { display: flex; } .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); margin-left: -6px; } .avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- switch: 36×21, green when on ---------- */
input[type=checkbox].switch { appearance: none; -webkit-appearance: none; width: 36px; height: 21px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
input[type=checkbox].switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform .15s; }
input[type=checkbox].switch:checked { background: var(--green); }
input[type=checkbox].switch:checked::after { transform: translateX(15px); }

/* ---------- app shell: 248px sidebar, 56px top bar ---------- */
.shell { grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); border-right: 1px solid var(--sidebar-border); padding: 0; gap: 0; }
.sb-head { padding: 18px 18px 12px; }
.sb-brand { padding: 0; gap: 8px; }
.sb-brand img { height: 30px; width: auto; }
.sb-product { background: var(--accent-soft); color: var(--accent-text); border: 0; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.sb-ws { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The customer's name sits under "cruxtra HR", right-aligned to its end. */
.sidebar .sb-head { width: fit-content; max-width: 100%; }
.sidebar .sb-ws { text-align: right; }
.sb-nav { gap: 0; margin: 0; padding: 4px 10px 12px; flex: 1; overflow-y: auto; }
.sb-group { gap: 1px; }
.sb-title { margin: 18px 10px 6px; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--sidebar-muted); }
.sidebar .nav-item { gap: 10px; padding: 7px 10px; border-radius: 8px; border: 0; font-size: 14.5px; font-weight: 400; color: var(--sidebar-text); }
.sidebar .nav-item .i { width: 17px; height: 17px; opacity: .9; }
.sidebar .nav-item:hover { background: var(--sidebar-hover); color: var(--text); }
.sidebar .nav-item[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-active-text); font-weight: 700; border: 0; }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--on-accent); padding: 1px 7px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.nav-children { margin: 2px 0 6px 18px; padding-left: 8px; border-left: 1.5px solid var(--sidebar-border); display: flex; flex-direction: column; gap: 1px; }
.nav-children .nav-item { font-size: 14px; padding-top: 6px; padding-bottom: 6px; }
.sb-foot { padding: 10px; border-top: 1px solid var(--sidebar-border); display: flex; flex-direction: column; gap: 2px; }
.me { position: relative; }
.me > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; color: var(--text); margin: 0; }
.me > summary::-webkit-details-marker { display: none; }
.me > summary:hover { background: var(--sidebar-hover); color: var(--text); }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { font-size: 12.5px; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .popover { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; }

.ws-main { min-width: 0; }
.ws-top { height: 56px; min-height: 56px; padding: 0 24px; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); min-width: 0; flex: 1; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .sep { color: var(--text-3); }
.crumbs b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ws-search { flex: 0 1 260px; }
.ws-search input[type=search] { height: 34px; min-height: 34px; padding-left: 34px; border-radius: 8px; background: var(--surface-2); border-color: var(--border); }
.ws-search > .i { left: 10px; width: 16px; height: 16px; color: var(--text-3); }
.notif { position: relative; }
.notif .dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: inline; }
.ws main { max-width: 1360px; padding: 28px 32px 120px; }
.ws main.narrow { max-width: 920px; }
.page-head { margin-bottom: 22px; align-items: flex-end; }
.page-head h1 { font-size: 29px; }
.page-head .muted { margin-top: 6px; }
.ws .foot { background: transparent; border-top: 1px solid var(--border); color: var(--text-3); }
.sample-banner { background: var(--amber-soft); color: var(--text); font-size: 13px; }

/* entity header: one person or one department */
.entity-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 4px; }
.entity-head h1, .entity-head h2 { font-size: 25px; margin: 0; }
.entity-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--text-2); font-size: 14px; }

/* toolbar above lists */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; flex: 0 1 280px; }
.search-box .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search-box input[type=search] { padding-left: 32px; }

/* ---------- popover and menu (built on <details>) ---------- */
.popover { z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 180px; animation: pop .16s ease; }
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; } .menu > summary::-webkit-details-marker { display: none; }
.menu > .popover { position: absolute; right: 0; top: calc(100% + 4px); }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; font-size: 14px; color: var(--text); text-decoration: none; font-weight: 400; }
.menu-item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.menu-item .i { width: 16px; height: 16px; color: var(--text-2); }
.menu-item.danger { color: var(--red); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-label { font-size: 12px; color: var(--text-3); padding: 6px 10px 4px; font-weight: 600; }
.popover form { margin: 0; }

/* ---------- modal and drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: var(--backdrop); display: grid; place-items: center; padding: 24px; animation: fade .12s ease; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 48px); overflow: auto; animation: pop .16s ease; }
.modal.wide { width: min(760px, 100%); }
.modal-head { padding: 20px 22px 8px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h2 { font-size: 19px; margin: 0; }
.modal-body { padding: 8px 22px 18px; color: var(--text-2); }
.modal-foot { padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.drawer-wrap { position: fixed; inset: 0; z-index: 85; display: flex; justify-content: flex-end; background: var(--backdrop-light); animation: fade .12s ease; }
.drawer { width: min(620px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .18s ease; }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.drawer-head .grow { min-width: 0; }
.drawer-body { flex: 1; overflow: auto; padding: 0 0 40px; }
.drawer-body .tabs { padding: 0 20px; margin: 0; }
.drawer-body .tab-panel { padding: 20px 22px; }
.drawer-body .tab-panel[hidden] { display: none; }
body.no-scroll { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

/* skeleton loading */
.skeleton { display: grid; gap: 12px; padding: 20px 22px; }
.skeleton span { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton span:nth-child(3n) { width: 60%; } .skeleton span:nth-child(3n+1) { width: 85%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- toasts: dark pill, bottom centre ---------- */
.toast-wrap { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--toast); color: var(--white); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .16s ease; pointer-events: auto; }
.toast.error { background: var(--toast-error); }
.toast.leaving { opacity: 0; transition: opacity .3s; }

/* sign-in: brand panel on the accent gradient */
.auth-brand { background: var(--auth-grad); color: var(--text); }
.auth-brand .eyebrow.on-dark, .auth-points li, .auth-foot { color: var(--text-2); }
.auth-points strong { color: var(--text); }
.auth-points .i { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--link); }
.auth-headline { font-size: 45px; line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.auth-main { background: var(--surface); }
.auth-card { max-width: 380px; }

/* candidate and employee portals: light top bar */
.topbar { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
.brand, .brand small, .topbar a.brand:hover { color: var(--text); }
.brand small { border-left-color: var(--border); }
.topbar .nav-item { color: var(--text-2); font-size: 14.5px; }
.topbar .nav-item:hover { background: var(--surface-3); color: var(--text); }
.topbar .nav-item[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-active-text); font-weight: 700; }
.who-org { color: var(--text-3); }
.topbar :focus-visible { outline-color: var(--focus); }
.foot { background: var(--surface); color: var(--text-3); border-top: 1px solid var(--border); }
.vt-current .vt-dot { border-color: var(--accent); }

/* pipeline chevrons in the new palette */
.stage.s1 { background: var(--selected); color: var(--text); }
.stage.s2 { background: var(--stage-2); color: var(--white); }
.stage.s3 { background: var(--stage-3); color: var(--white); }
.stage.s4 { background: var(--stage-4); color: var(--white); }
.stage.s5 { background: var(--accent); color: var(--on-accent); }

/* ---------- responsive: below 900px the sidebar becomes a menu button ---------- */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 70; inset: 0 auto 0 0; width: 280px; height: 100vh; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: var(--backdrop-light); z-index: 65; }
  .menu-btn { display: inline-flex; }
  .ws-top { padding: 0 12px; }
  .ws-search { display: none; }
  .ws main { padding: 20px 16px 100px; }
  .sb-nav { flex-direction: column; flex-wrap: nowrap; }
  .sb-group { flex-direction: column; }
  .sb-title { display: block; }
  .sb-foot { display: flex; }
  .drawer { width: 100%; }
}
@media (max-width: 720px) {
  h1, .page-head h1 { font-size: 25px; }
  .btn { height: 38px; } .btn.small, .btn.sm { height: 32px; }
  input:not([type]), input[type=text], input[type=url], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=search], select, .dd-btn { min-height: 40px; }
  .auth-headline { font-size: 33px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: inline; }
}
/* people */
.people td[data-label="Name"] { min-width: 220px; }
a.person-name, .person-name { font-weight: 600; color: var(--text); text-decoration: none; }
.person-name:hover { color: var(--link); text-decoration: underline; }
.person-sub { font-size: 13px; color: var(--text-3); }
a.card-link { color: var(--text); text-decoration: none; }
a.card-link:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.entity-photo { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none; }
.entity-head .avatar.xl { border-radius: 13px; }
.tab-h { font-size: 13px; font-weight: 600; color: var(--text-3); margin: 18px 0 8px; }
.tab-panel > .tab-h:first-child { margin-top: 0; }
.doc-list, .feed { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.doc-list li:last-child, .feed li:last-child { border-bottom: 0; }
.doc-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.doc-ico .i { width: 16px; height: 16px; }
.feed li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.row.between { justify-content: space-between; }
.mt-s { margin-top: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.person-page .drawer-body { padding-bottom: 20px; }
.seg a .faint { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.seg { flex-wrap: wrap; max-width: 100%; }
.seg a, .seg button { white-space: nowrap; }
table.stack-sm td.mono::before, table.stack-sm td.num::before { font-family: var(--font); }
@media (max-width: 720px) {
  .toolbar .search-box { flex: 1 1 100%; }
  .toolbar .seg { width: 100%; }
}
.kpi:has(.kpi-go) .kpi-text { padding-right: 18px; }
.doc { font-size: 14px; }
/* Approvals: a wide Person column, "What" on two lines (type, then title), Received on one line */
@media (min-width: 1201px) {
  .inbox table th.col-person, .inbox table td.col-person { width: 24%; min-width: 200px; }
  .inbox table th.col-when, .inbox table td.col-when { white-space: nowrap; width: 1%; }
  .inbox table th:last-child, .inbox table td:last-child { white-space: nowrap; width: 1%; }
}
.inbox table .col-what .what-title { margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Cruxtra Central logo (the wordmark already says "Central", so no tag beside it) */
.adm-brand img.central-logo { height: 48px; width: auto; max-width: 100%; }
.adm-auth-brand img.central-logo { height: 77px; width: auto; max-width: 100%; }
/* show / hide password */
.pw-wrap { position: relative; }
.pw-wrap > input { width: 100%; padding-right: 44px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--surface-3); }
.pw-toggle .i { width: 18px; height: 18px; }
.foot-meta { font-variant-numeric: tabular-nums; }
/* Get Cruxtra HR ready (setup guide) */
.guide { margin-bottom: 20px; border-color: var(--border-strong); }
.guide-head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.guide-head h2 { margin: 0 0 4px; }
.guide-progress { display: grid; gap: 6px; min-width: 180px; font-size: 13px; color: var(--text-2); }
.guide-progress strong { color: var(--text); }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius); }
.guide-steps li.is-next { background: var(--selected); }
.guide-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border-strong); font-size: 13px; font-weight: 700; color: var(--text-2); }
.guide-num .i { width: 16px; height: 16px; }
.guide-steps li.is-done .guide-num { background: var(--green-soft); border-color: var(--green-soft); color: var(--green); }
.guide-steps li.is-next .guide-num { background: var(--btn-blue); border-color: var(--btn-blue); color: var(--white); }
.guide-steps li.is-done .guide-title { color: var(--text-2); }
.guide-title { font-weight: 700; }
.guide-detail { font-weight: 400; font-size: 13px; color: var(--text-2); margin-left: 6px; }
.guide-wait { margin-top: 4px; color: var(--amber); display: flex; gap: 6px; align-items: center; }
.guide-wait .i { width: 14px; height: 14px; }
.guide-act { text-align: right; max-width: 220px; }
.guide-foot { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 720px) {
  .guide-steps li { grid-template-columns: 30px minmax(0, 1fr); }
  .guide-act { grid-column: 2; text-align: left; max-width: none; }
}
/* product tour */
.tour-shade { position: fixed; inset: 0; z-index: 120; background: transparent; }
.tour-shade.dim { background: var(--backdrop); }
.tour-ring { position: fixed; z-index: 121; border-radius: var(--radius); box-shadow: 0 0 0 3px var(--focus), 0 0 0 9999px var(--backdrop); pointer-events: none; transition: all .18s ease; }
.tour-pop { position: fixed; z-index: 122; width: min(340px, calc(100vw - 24px)); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px 18px 14px; }
.tour-pop.centered { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); }
.tour-count { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--link); }
.tour-title { margin: 0 0 6px; font-size: 18px; }
.tour-text { margin: 0 0 14px; color: var(--text-2); line-height: 1.5; }
.tour-actions { display: flex; gap: 8px; align-items: center; }
.tour-spacer { flex: 1; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }
/* workflow step order (drag and drop) */
.publish-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; margin: 0 0 14px; border-radius: var(--radius); background: var(--selected); }
.sort-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.sort-item { display: grid; grid-template-columns: 22px 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sort-item.dragging { opacity: .5; border-style: dashed; }
.sort-handle { color: var(--text-3); cursor: grab; display: grid; place-items: center; }
.sort-item:active .sort-handle { cursor: grabbing; }
.sort-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--text-2); }
.sort-text { display: grid; gap: 2px; min-width: 0; }
.sort-move { display: flex; gap: 2px; }
/* Form fields: label, then the box, then the hint – so boxes in the same row line up whether or not a field has a hint */
.field { display: flex; flex-direction: column; }
.field > .hint { order: 2; margin: 5px 0 0; }
.field > .error-text { order: 3; }
.company-name { width: 100%; }
.company-name input { flex: 1; min-width: 240px; }
/* Boxes inside tables fill their cell, so rows of boxes line up with the boxes beside them */
td > input:not([type=checkbox]):not([type=radio]), td > select, td > textarea, td > .dd, td > .affix { width: 100%; }
/* Units inside a box: ₹ before an amount, % after a percentage */
.affix { position: relative; display: block; }
.affix > input { width: 100%; }
.affix-pre, .affix-suf { position: absolute; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: 14px; pointer-events: none; }
.affix-pre { left: 12px; }
.affix-suf { right: 12px; }
.affix.has-pre > input { padding-left: 28px; }
.affix.has-suf > input { padding-right: 92px; }
input[data-money] { font-variant-numeric: tabular-nums; }
.try-row { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.try-row .field { flex: 1 1 260px; max-width: 360px; margin-bottom: 0; }
.try-out { margin-top: 16px; }
.amounts { margin: 16px 0; }
.amounts td.num { font-variant-numeric: tabular-nums; color: var(--text-2); }
.amounts tr.is-changed td:first-child { font-weight: 700; }
.amounts tr.total td { border-top: 2px solid var(--border-strong); }
.try-out { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Labour Codes panel in the pay structure try-out */
.lc { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.lc h3 { margin-top: 0; }
.lc-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.lc-list li { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 4px 16px; padding-left: 26px; position: relative; }
.lc-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; background-color: var(--green); -webkit-mask: var(--icon-success) center / contain no-repeat; mask: var(--icon-success) center / contain no-repeat; }
.lc-list li.is-warn::before { background-color: var(--amber); -webkit-mask-image: var(--icon-warning); mask-image: var(--icon-warning); }
.lc-list li span { color: var(--text-2); }
@media (max-width: 720px) { .lc-list li { grid-template-columns: 1fr; } }
.try-grid { margin-bottom: 4px; }
/* two-way toggle (radio buttons styled as a segmented control) */
.toggle-seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 10px; border-radius: 9px; background: var(--surface-3); }
.toggle-seg label { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 7px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.toggle-seg label.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.toggle-seg input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
fieldset.rules { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
fieldset.rules[disabled] input, fieldset.rules[disabled] select, fieldset.rules[disabled] .dd-btn { background: var(--surface-3); color: var(--text-2); cursor: default; }
/* pay structure: controls row with the Show breakup button lined up with the boxes */
.split-controls { align-items: start; }
.field-action > .label { display: block; margin-bottom: 5px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-lg .i { width: 18px; height: 18px; }
/* Review & Edit: the breakup as an editable table */
.edit-breakup td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.edit-breakup tr.strong td { font-weight: 700; }
.edit-breakup td > .affix { min-width: 130px; }
.edit-breakup select { min-width: 140px; }
/* the toggle hugs its buttons; descriptions keep the same height in both modes so nothing shifts */
.toggle-seg { display: flex; width: fit-content; align-items: center; box-sizing: border-box; height: 38px; position: relative; }
.toggle-seg label { position: relative; margin: 0; }
.split-desc { min-height: 3em; }
/* reports: section heading with an icon */
.report-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.report-head h2 { margin: 0; }
.report-head p { margin: 2px 0 0; }
.report-head .panel-icon { flex: none; }
/* Review & Edit: amounts right-aligned in boxes the same width as "Worked out as"; tidy columns */
.edit-breakup { table-layout: fixed; width: 100%; }
.edit-breakup th:nth-child(1) { width: 34%; }
.edit-breakup th:nth-child(2), .edit-breakup th:nth-child(3) { width: 19%; }
.edit-breakup th:nth-child(4) { width: 16%; }
.edit-breakup th:nth-child(5) { width: 12%; }
.edit-breakup th:nth-child(3), .edit-breakup th:nth-child(4), .edit-breakup th:nth-child(5) { text-align: right; }
.edit-breakup td > .affix { min-width: 0; width: 100%; }
.edit-breakup td > .affix > input, .edit-breakup td.num, .edit-breakup td[data-label="Monthly (₹)"] { text-align: right; }
.edit-breakup select { min-width: 0; width: 100%; }
@media (max-width: 1200px) { .edit-breakup { table-layout: auto; } .edit-breakup th { width: auto !important; } }

/* Workflow change requests (Cruxtra HR workflow page and Cruxtra Central) */
.request-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.request-list > li { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.request-list > li > .row { gap: 8px; align-items: center; }
.request-list p { margin: 6px 0 4px; }
.decline-reason { margin: 6px 0; padding: 8px 10px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.decline-reason p { margin: 2px 0 0; }
.split-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.split-top .toggle-seg { margin-bottom: 0; }

/* "Get Cruxtra HR ready" flow: progress through the 8 steps on each step's page */
.guide-bar { margin-bottom: 16px; padding: 14px 18px; border-color: var(--border-strong); }
.guide-bar-head { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: flex-end; }
.guide-bar-title { font-weight: 700; font-size: 16px; }
.guide-track { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.guide-track li > * { display: block; height: 8px; border-radius: 4px; background: var(--surface-3); }
.guide-track li.is-done > * { background: var(--green); }
.guide-track li.is-current > * { background: var(--btn-blue); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--btn-blue); }
.guide-track li a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.guide-bar-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.guide-bar-foot .btn .i { width: 16px; height: 16px; }
/* "Show breakup" sits beside the CTC, City and PF boxes: same height as them */
.field-action .btn-lg { height: 36px; }

/* ---------------------------------------------------------------- comment threads (change requests) */
.thread { --thread-line: var(--border-strong); --thread-bg: var(--surface); }
.thread-root { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; }
.thread-root > .avatar { grid-column: 1; grid-row: 1; }
.thread-root > .thread-main { grid-column: 2; grid-row: 1; }
.thread-rail { grid-column: 1; grid-row: 1 / 3; justify-self: center; width: 2px; margin-top: 42px; background: var(--thread-line); }
.thread-replies { grid-column: 2; grid-row: 2; list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.thread-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; }
.thread-item::before { content: ""; position: absolute; left: -31px; top: -2px; width: 27px; height: 16px; border-left: 2px solid var(--thread-line); border-bottom: 2px solid var(--thread-line); border-bottom-left-radius: 12px; }
.thread-item:last-child::after { content: ""; position: absolute; left: -33px; top: 16px; bottom: 0; width: 6px; background: var(--thread-bg); }
.thread-main { min-width: 0; }
.thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 28px; font-size: 14px; color: var(--text-secondary); }
.thread-meta strong { color: var(--text-primary); }
.thread-when { white-space: nowrap; }
.thread-root > .thread-main > .thread-meta { min-height: 36px; }
.thread-text { margin: 2px 0 0; color: var(--text-primary); overflow-wrap: anywhere; }
.thread-item.is-internal .thread-main { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 4px 10px 8px; }
.request-list .thread { margin-top: 10px; }
.request-list .thread-text { margin: 2px 0 0; }
.request-list .decline-reason { margin-top: 4px; }
.cr-reply { margin-top: 10px; }
.cr-reply > summary { cursor: pointer; display: inline-flex; color: var(--action-secondary); font-weight: 600; font-size: 14px; }
.cr-reply[open] > summary { margin-bottom: 8px; }
.cr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cr-side .card { position: sticky; top: 16px; }
.cr-reply-form .field > label { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.cr-note { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 1100px) { .cr-layout { grid-template-columns: minmax(0, 1fr); } .cr-side .card { position: static; } }
