:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  /* --brand is for solid fills (buttons, badges) that carry white text.
     --brand-text is the same blue as text/icons on pale tints. They're identical
     in light; in dark they diverge, because a fill blue is too dark to read as text. */
  --brand-text: #2563eb;
  --tint-blue: #dbeafe;
  --tint-green: #dcfce7;
  --tint-red: #fee2e2;
  --appbar: #232a3d;
  --sidebar: #ffffff;
  --sidebar-active: #eff4ff;
  --sidebar-border: #e5e7eb;
  --sidebar-text: #475569;
  --sidebar-muted: #94a3b8;
  --sidebar-accent: #2563eb;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --hover: #f1f5f9;
  color-scheme: light;
}
/* Dark theme — toggled via the button in the top bar (sets data-theme on <html>). */
:root[data-theme="dark"] {
  /* Neutral slate, biased a touch cool toward the accent rather than navy —
     the old palette was blue enough to read as a colour, not a ground. */
  --brand-text: #7fb2ff;
  --tint-blue: rgba(59,130,246,.18);
  --tint-green: rgba(22,163,74,.18);
  --tint-red: rgba(220,38,38,.18);
  --appbar: #0f141b;
  --sidebar: #131820;
  /* A wash, not a slab: the old #1b2740 was a bright block against the sidebar. */
  --sidebar-active: rgba(59,130,246,.14);
  --sidebar-border: #242c38;
  --sidebar-text: #a8b3c2;
  --sidebar-muted: #6b7686;
  --bg: #0f1319;
  --card: #161b23;
  --text: #e6eaf1;
  --muted: #8d98a8;
  --border: #262d38;
  --hover: #1b212b;
  color-scheme: dark;
}
/* Dark: hover states that were hardcoded to near-white and lit up on dark. */
:root[data-theme="dark"] tr:hover td { background: var(--hover); }
:root[data-theme="dark"] .dtask:hover { background: var(--hover); }
:root[data-theme="dark"] .onb-cell.link:hover { background: var(--sidebar-active); }
:root[data-theme="dark"] .cal-arrow:hover { background: var(--hover); }
:root[data-theme="dark"] .cal-cell:not(.empty):hover { background: var(--sidebar-active); }
:root[data-theme="dark"] .cal-cell.holiday:not(.empty):hover { background: #3a2a12; border-color: #b45309; }
:root[data-theme="dark"] .rp-day:not(.empty):hover { background: var(--sidebar-active); }
/* --sidebar-active is a translucent wash in dark; as an outline it's invisible. */
:root[data-theme="dark"] .fileui:focus-visible { outline-color: var(--brand); }
/* The greeting tile's gradient is sized for a white page; dim it for a dark one. */
:root[data-theme="dark"] .bt-greet { background: linear-gradient(120deg, #15203a, #1d4487); }
/* Selected tab: a rail carries the selection, so the wash can stay quiet. */
:root[data-theme="dark"] .nav li.active { position: relative; }
:root[data-theme="dark"] .nav li.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand-text);
}

/* Dark: inset panels that were near-white (#fbfcfe / #f8fafc / #eef2f7) and so
   punched a lit hole in every dark modal — the history timeline worst of all. */
:root[data-theme="dark"] .review-box,
:root[data-theme="dark"] .inline-form,
:root[data-theme="dark"] .exp-pay-note,
:root[data-theme="dark"] .onb-bar { background: var(--hover); }
/* Dark: status chips. Pale fills carry dark text, so both halves have to move. */
:root[data-theme="dark"] .badge.gray { background: #2b333f; color: #b7c1ce; }
:root[data-theme="dark"] .badge.amber { background: rgba(217,119,6,.22); color: #fbbf24; }
:root[data-theme="dark"] .badge.purple { background: rgba(124,58,237,.24); color: #c4b5fd; }
:root[data-theme="dark"] .tag-internal { background: rgba(217,119,6,.22); }
:root[data-theme="dark"] .onb-reject { background: rgba(220,38,38,.15); border-color: #7f1d1d; color: #fca5a5; }
:root[data-theme="dark"] .signd-help { background: rgba(59,130,246,.12); border-color: #1e3a5f; }
:root[data-theme="dark"] .plan-item.unseen { background: rgba(22,163,74,.10); }
:root[data-theme="dark"] .plan-item.unseen.sentback { background: rgba(220,38,38,.10); }
:root[data-theme="dark"] .rp-day.in-range { background: var(--sidebar-active); }

/* Dark: logged attendance days. The light theme fills them solid mint (#a7f3cf),
   which on a dark grid reads as a wall of bright blocks rather than a marked day —
   and its dark-green day number and hours go unreadable. A translucent wash with a
   green edge marks the day just as clearly without lighting up the page. */
:root[data-theme="dark"] .cal-cell.logged { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.38); }
:root[data-theme="dark"] .cal-cell.logged .cal-day { color: #6ee7b7; }
:root[data-theme="dark"] .cal-hours { color: #34d399; }
/* Faded-out future days go too dim once the fill is a wash rather than a solid. */
:root[data-theme="dark"] .cal-cell.future { opacity: .72; }
:root[data-theme="dark"] .cal-holiday { color: #fdba74; }

/* Dark overrides for the few light tinted surfaces that don't read on dark. */
:root[data-theme="dark"] .panel.alert-panel { background: #2a1517; border-color: #7f1d1d; }
:root[data-theme="dark"] .inline-form.warn { background: #291d10; border-color: #7c4a12; }
:root[data-theme="dark"] .cal-cell.holiday { background: #291d10; border-color: #7c4a12; }
:root[data-theme="dark"] .hol-note { background: #291d10; border-color: #7c4a12; color: #fcd9a8; }
:root[data-theme="dark"] .hrnote.internal { background: #29240f; border-color: #6b5a12; }
:root[data-theme="dark"] .login-card .hint { background: #121a28; }
:root[data-theme="dark"] .sign-doc { color: #cbd5e1; }
:root[data-theme="dark"] .dd-search input { background: var(--bg); }
/* Dark: text that was hardcoded dark and would vanish on dark surfaces. */
:root[data-theme="dark"] .ann-body { color: #cbd5e1; }
:root[data-theme="dark"] .sign-read.doc { color: #cbd5e1; }
:root[data-theme="dark"] .cal-cell.logged .cal-day { color: #6ee7b7; }
:root[data-theme="dark"] .cal-hours { color: #34d399; }
:root[data-theme="dark"] .pdf-field, :root[data-theme="dark"] .pdf-area { color: #dbe4f0; }
/* Chat bubbles from other people keep a light tint, so force dark text on them. */
:root[data-theme="dark"] .chat-msg:not(.me) .chat-bubble { color: #1f2937; }

/* Clean icon buttons in the top bar (refresh, theme toggle) */
.topbar-icon {
  width: 36px; height: 36px; border-radius: 9px; border: none; background: transparent;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background .12s, color .12s;
}
.topbar-icon:hover { background: var(--hover); color: var(--text); }
.topbar-icon svg { width: 18px; height: 18px; }
#theme-toggle .sun { display: none; }
:root[data-theme="dark"] #theme-toggle .moon { display: none; }
:root[data-theme="dark"] #theme-toggle .sun { display: block; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--brand-text); }
.hidden { display: none !important; }

/* ---------- Login ---------- */
/* ---------- Sign in: the organisation's portal, not a floating box ----------
   Two panels — MSSWR's side, and the form. The green is the brand's own
   (#238174, taken from the heading style in their Word templates). */
#login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--card);
}
.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 54px 52px;
  color: #e9f5f1;
  background:
    radial-gradient(115% 85% at 12% -5%, #2fa189 0%, rgba(47,161,137,0) 55%),
    linear-gradient(158deg, #1c6d60 0%, #124a43 55%, #0a2b27 100%);
}
/* A quiet dot field, fading out — texture without decoration for its own sake. */
.login-brand::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(150deg, #000 0%, transparent 72%);
  mask-image: linear-gradient(150deg, #000 0%, transparent 72%);
  pointer-events: none;
}
.login-brand > * { position: relative; }
.login-brand-top { display: flex; align-items: center; gap: 14px; }
.login-brand-logo {
  width: 52px; height: 52px; object-fit: contain; flex: 0 0 auto;
  background: #fff; border-radius: 50%; padding: 4px;
}
.login-brand-org { font-size: 17px; font-weight: 700; letter-spacing: .2px; line-height: 1.2; }
.login-brand-region { font-size: 13px; color: #a9d5c9; letter-spacing: .3px; }
.login-brand-mid h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
.login-brand-mid p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #b9ded3; max-width: 42ch; }
.login-brand-mid blockquote {
  margin: 26px 0 0; padding-left: 14px; border-left: 2px solid rgba(255,255,255,.28);
  font-size: 13.5px; font-style: italic; color: #cfe8e0;
}
.login-brand-foot { font-size: 11.5px; color: #8fc3b6; letter-spacing: .2px; }
/* Funder logos tucked into the bottom-right of the white sign-in panel. On the
   white ground (light mode) they need no backing; in dark mode the panel is dark,
   so the dark artwork gets a light chip to stay legible. */
.login-funders {
  position: absolute; right: 28px; bottom: 22px;
  display: inline-flex; align-items: center; gap: 34px;
}
/* IRCC packs two languages of small type, so it needs more height than OCASI
   to stay legible; sized by height, width follows each logo's aspect ratio. */
.login-funders .funder-ircc { height: 34px; }
.login-funders .funder-ocasi { height: 28px; }
:root[data-theme="dark"] .login-funders {
  background: #fff; border-radius: 10px; padding: 10px 16px; gap: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
:root[data-theme="dark"] .login-funders .funder-ircc { height: 30px; }
:root[data-theme="dark"] .login-funders .funder-ocasi { height: 26px; }

/* ---------- Funder strip: persistent app footer ---------- */
.funder-strip {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; padding: 12px 30px;
  background: #fff; border-top: 1px solid var(--border);
}
.funder-chip { display: inline-flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.funder-strip .funder-ircc { height: 38px; }
.funder-strip .funder-ocasi { height: 32px; }
.funder-strip img { max-width: 100%; }
/* Dark mode: the strip blends into the app; only the logos sit on a light chip,
   since both marks are dark artwork and would otherwise be unreadable. */
:root[data-theme="dark"] .funder-strip { background: var(--bg); border-top-color: var(--border); }
:root[data-theme="dark"] .funder-chip {
  background: #eef1f5; border-radius: 10px; padding: 8px 18px; gap: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
:root[data-theme="dark"] .funder-strip .funder-ircc { height: 30px; }
:root[data-theme="dark"] .funder-strip .funder-ocasi { height: 26px; }
@media (max-width: 560px) {
  .funder-strip { gap: 26px; padding: 10px 16px; }
  .funder-strip .funder-ircc { height: 30px; }
  .funder-strip .funder-ocasi { height: 26px; }
  .login-funders { gap: 28px; padding: 10px 16px; }
}

/* Column, not row: the form and the alpha account list stack. */
.login-panel {
  position: relative; /* anchor for the bottom-right funder credit */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 40px 24px;
}
.login-card { background: var(--card); width: 340px; }
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 13px; }
.login-help { margin: 18px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Alpha test accounts (remove before real data) ---------- */
.login-demo {
  width: 340px; flex: 0 0 auto;
  border: 1px dashed var(--border); border-radius: 10px;
  background: var(--card); padding: 12px;
}
.login-demo-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--muted); margin-bottom: 8px;
}
.login-demo-tag {
  flex: 0 0 auto; text-transform: uppercase; letter-spacing: .6px;
  font-size: 9.5px; font-weight: 700; color: #fff; background: #238174;
  border-radius: 4px; padding: 2px 6px;
}
.login-demo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.login-demo-list button {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 6px; padding: 6px 8px;
  font: inherit; color: var(--text);
}
.login-demo-list button:hover { background: rgba(35,129,116,.09); }
.login-demo-list button:focus-visible { outline: 2px solid #238174; outline-offset: 1px; }
.lda-email { display: block; font-size: 12.5px; font-weight: 600; }
.lda-role { display: block; font-size: 11px; color: var(--muted); }

/* Narrow screens: the brand becomes a header strip above the form. */
@media (max-width: 860px) {
  /* auto/1fr, or the grid stretches the brand strip to half the screen */
  #login-view { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 28px 24px; gap: 18px; }
  .login-brand-mid h2 { font-size: 22px; }
  .login-brand-mid blockquote, .login-brand-foot { display: none; }
  .login-panel { padding: 32px 24px 40px; }
  /* On a narrow screen the panel scrolls, so pin-to-corner would overlap the form;
     let the credit flow in below the sign-in stack, centered. */
  .login-funders { position: static; align-self: center; margin-top: 8px; }
}
.login-card .hint {
  margin-top: 16px; font-size: 12px; color: var(--muted);
  background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; padding: 10px;
}

/* ---------- Layout: navy top bar + light sidebar ---------- */
#app-view { display: flex; flex-direction: column; height: 100vh; }

.appbar {
  height: 56px; flex-shrink: 0; background: var(--appbar); color: #e5e7eb;
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 18px;
}
.appbar .brand { display: flex; align-items: center; gap: 11px; }
.appbar .brand-logo { height: 40px; width: 40px; object-fit: contain; display: block; }
.appbar .brand-txt b { color: #fff; font-size: 16px; display: block; line-height: 1.15; }
.appbar .brand-txt span { color: #94a3b8; font-size: 11px; }
.appbar-spacer { flex: 1; }
.appbar .profile { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.appbar .profile:hover { background: rgba(255,255,255,.08); }
.appbar .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.appbar .who-txt .name { color: #fff; font-weight: 600; font-size: 13px; }
.appbar .who-txt .role { color: #94a3b8; font-size: 11px; text-transform: capitalize; }
.appbar-signout { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 8px; border-radius: 8px; display: flex; }
.appbar-signout:hover { background: rgba(255,255,255,.08); color: #fff; }
.appbar-signout svg { width: 20px; height: 20px; }

.app-body { flex: 1; display: flex; min-height: 0; height: 100vh; }
/* ---------- App-wide slim scrollbars ----------
   Replaces the chunky OS default (arrow buttons, grey trough) everywhere —
   tables, modals, panels. Component rules below can still override. */
html { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::-webkit-scrollbar-corner { background: transparent; }

.sidebar {
  width: 240px; flex-shrink: 0; background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border); padding: 12px 12px 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 13px; margin-bottom: 4px; border-bottom: 1px solid var(--sidebar-border); }
.sidebar .brand-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.sidebar .brand-txt b { font-size: 15px; color: var(--text); display: block; line-height: 1.15; letter-spacing: -.01em; }
.sidebar .brand-txt span { font-size: 10.5px; color: var(--muted); }
.nav { list-style: none; margin: 0; padding: 0 4px 0 0; flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; }
/* Slim scrollbar — the OS default (with arrow buttons) looks dated in the rail.
   Stays faint until the sidebar is hovered so the nav reads as one clean column. */
.nav { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .18s; }
.sidebar:hover .nav { scrollbar-color: var(--border) transparent; }
.nav::-webkit-scrollbar { width: 7px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 20px; transition: background .18s; }
.sidebar:hover .nav::-webkit-scrollbar-thumb { background: var(--border); }
.nav::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.nav li {
  padding: 10px 12px; cursor: pointer; font-size: 14px; color: var(--sidebar-text);
  display: flex; align-items: center; gap: 12px; border-radius: 8px;
}
.nav li .ico { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; opacity: .7; }
.nav li .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav li:hover { background: var(--hover); color: var(--text); }
.nav li.active { background: var(--sidebar-active); color: var(--brand-text); font-weight: 600; }
.nav li.active .ico { opacity: 1; color: var(--brand-text); }
.nav li .badge-count {
  background: var(--brand); color: #fff; border-radius: 10px;
  padding: 1px 8px; font-size: 11px; font-weight: 700;
}
/* Collapsible group headers (dropdown sections) */
.nav-group {
  list-style: none; display: flex; align-items: center; gap: 8px; margin-top: 6px;
  padding: 10px 12px; cursor: pointer; border-radius: 8px;
  color: var(--text); font-size: 13px; font-weight: 600;
}
.nav-group:hover { background: var(--hover); }
.nav-group .lbl { flex: 1; }
.nav-group .chev { display: flex; color: var(--sidebar-muted); transition: transform .15s ease; }
.nav-group .chev svg { width: 16px; height: 16px; }
.nav-group:not(.open) .chev { transform: rotate(-90deg); }
.nav li.sub { padding-left: 22px; font-size: 13.5px; }

/* Signed-in user + sign out, pinned to the bottom-left of the sidebar */
.sidebar .who { flex-shrink: 0; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
.sidebar .profile { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.sidebar .profile:hover { background: var(--hover); }
.sidebar .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar .who .name { color: var(--text); font-weight: 600; font-size: 13.5px; }
.sidebar .who .role { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.sidebar .signout {
  display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 4px;
  background: none; border: none; color: var(--muted); padding: 9px 8px;
  border-radius: 8px; font-size: 14px; text-align: left; cursor: pointer;
}
.sidebar .signout:hover { background: var(--hover); color: var(--text); }
.sidebar .signout svg { width: 19px; height: 19px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 58px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.topbar h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.topbar .spacer { flex: 1; }
.content { flex: 1; overflow-y: auto; padding: 26px; }

/* ---------- Cards / grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
}
.stat .n { font-size: 30px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat.alert .n { color: var(--amber); }

.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 22px;
}
.panel.alert-panel { border-color: #fca5a5; background: #fff8f8; box-shadow: 0 0 0 3px rgba(220,38,38,.06); }
.panel h3 { margin: 0 0 14px; font-size: 15px; }
.panel .desc { color: var(--muted); font-size: 13px; margin: -8px 0 16px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--card); font-size: 13px;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand-text); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
tr:hover td { background: #f8fafc; }
td.actions { white-space: nowrap; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.meta { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge.gray { background: #e2e8f0; color: #475569; }
.badge.blue { background: var(--tint-blue); color: #1d4ed8; }
.badge.green { background: var(--tint-green); color: #15803d; }
.badge.amber { background: #fef3c7; color: #b45309; }
.badge.red { background: var(--tint-red); color: #b91c1c; }
.badge.purple { background: #ede9fe; color: #6d28d9; }
.prio-high, .prio-urgent { color: var(--red); font-weight: 600; }

/* Grants — collapsible outcome groups (Accepted / Pending / Declined) */
.grant-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.grant-group + .grant-group { margin-top: 10px; }
.grant-group > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; background: var(--hover); }
.grant-group > summary::-webkit-details-marker { display: none; }
.grant-group > summary::before { content: '▸'; color: var(--muted); font-size: 15px; }
.grant-group[open] > summary::before { content: '▾'; }
.grant-group[open] > summary { border-bottom: 1px solid var(--border); }
.grant-group .grant-group-title { font-size: 15px; }
.grant-group > div { padding: 4px 12px 12px; }
.grant-group table { margin-top: 8px; }

/* Grant budget — code column + balance banner */
.grant-code, .grant-budget .grant-code { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; color: var(--muted); white-space: nowrap; }
.grant-budget tfoot th { border-top: 2px solid var(--border); font-size: 15px; }
.gb-balance { margin-top: 14px; padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; background: var(--hover); color: var(--muted); }
.gb-balance.ok { background: var(--tint-green); color: #15803d; }
.gb-balance.warn { background: #fef3c7; color: #b45309; }
:root[data-theme="dark"] .gb-balance.ok { color: #4ade80; }
:root[data-theme="dark"] .gb-balance.warn { background: rgba(217,119,6,.22); color: #fbbf24; }

/* Void cheque / DD slip upload block (My Profile + Onboarding) */
.vc-block { border: 1px solid var(--border); border-radius: 8px; padding: 12px 13px; background: var(--hover); margin-top: 10px; }
.vc-label { margin-bottom: 7px; }
.vc-current { font-size: 13px; margin-bottom: 9px; }
.vc-current a { font-weight: 500; }
.vc-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vc-upload input[type=file] { max-width: 100%; }
.onb-vc { margin-top: 2px; }
.onb-vc .vc-block { max-width: 520px; }
.pdf-vc { margin: 2px 0; }
.pdf-vc input[type=file] { margin-top: 5px; max-width: 100%; }
.pay-fieldcol { display: flex; flex-direction: column; gap: 6px; }
.pay-daysinput { width: 92px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card, var(--hover)); color: inherit; font: inherit; }
.req { color: var(--red); font-weight: 700; }

/* ---------------- My Profile ---------------- */
.pf-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.pf-left { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 14px; }
.pf-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .pf-grid { grid-template-columns: 1fr; } .pf-left { position: static; } }

.pf-id { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-align: center; padding-bottom: 20px; }
.pf-banner { height: 76px; background: linear-gradient(135deg, var(--brand) 0%, #8aa9ff 100%); }
.pf-avatar { width: 76px; height: 76px; border-radius: 50%; margin: -38px auto 11px; border: 4px solid var(--card);
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 700; }
.pf-name { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.pf-role { font-size: 13.5px; color: var(--brand-text); font-weight: 600; margin-top: 2px; }
.pf-dept { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pf-email { font-size: 12.5px; color: var(--muted); margin-top: 9px; }

.pf-bal-hero { background: linear-gradient(135deg, var(--brand) 0%, #6f8dff 100%); color: #fff;
  border-radius: 14px; padding: 22px 18px; text-align: center; }
.pf-bal-hero .n { font-size: 42px; font-weight: 750; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pf-bal-hero .l { font-size: 13px; margin-top: 7px; opacity: .92; }
.pf-bal-hero .l span { opacity: .75; }
.pf-bal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-bal-mini { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 13px 10px; text-align: center; }
.pf-bal-mini b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-bal-mini span { font-size: 11.5px; color: var(--muted); }
.pf-tight { padding: 16px 18px; }
.pf-tight h3 { margin-bottom: 10px; }

.pf-cardhead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pf-cardhead h3 { margin: 0; }
.pf-edit { margin-left: auto; }
.pf-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 28px; }
@media (max-width: 640px) { .pf-kv { grid-template-columns: 1fr; } }
.pf-kv > div { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 10px; align-items: start; }
.pf-kv .k { color: var(--muted); font-size: 13px; }
.pf-kv .v { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* Single-month always-visible calendar (sick-day date) */
.rangepick.single-cal { max-width: 360px; padding: 16px 18px; }

/* Split-shift time blocks (multiple work blocks per day) */
.time-blocks .time-row + .time-row { margin-top: 8px; }
.time-row .tb-rm { align-self: flex-end; margin-bottom: 3px; flex: 0 0 auto; }

/* Grant funds strip (Received / Spent / Remaining) + categorized file sets */
.grant-funds { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.grant-funds > div { flex: 1 1 120px; background: var(--hover); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.gf-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.gf-val { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gf-rem { color: #15803d; }
.gf-neg { color: #b91c1c; }
.gb-over { color: #b91c1c; font-weight: 600; }
.grant-fileset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.grant-fileset-h { font-weight: 600; font-size: 14px; }
:root[data-theme="dark"] .gf-rem { color: #4ade80; }
:root[data-theme="dark"] .gf-neg, :root[data-theme="dark"] .gb-over { color: #f87171; }
.prio-medium { color: var(--amber); }
.prio-low { color: var(--muted); }

/* Dashboard "My tasks" list — a clean, scannable list of clickable rows. */
.dtasks { display: flex; flex-direction: column; margin-top: 6px; }
.dtask {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 12px 8px; background: none; border: none; border-top: 1px solid var(--border);
  text-align: left; font: inherit; color: var(--text); cursor: pointer;
  border-radius: 8px; transition: background .12s ease;
}
.dtask:first-child { border-top: none; }
.dtask:hover { background: #f8fafc; }
.dtask-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dtask-main { flex: 1 1 auto; min-width: 0; }
.dtask-title { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtask-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.dtask-sub code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.dtask-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.dtask-chev { color: #cbd5e1; font-size: 20px; line-height: 1; }

/* Inline reason form (e.g. sending a task back for revision). */
.inline-form { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.inline-form.warn { border-color: #fed7aa; background: #fff7ed; }
.inline-form h4 { margin: 0 0 8px; font-size: 14px; }
.inline-form.warn h4 { color: #c2410c; }
.inline-form textarea { min-height: 74px; }
.inline-form .inline-actions { margin-top: 10px; display: flex; gap: 8px; }

/* Conversation locked notice (completed tasks). */
.chat-locked {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--hover); border: 1px solid var(--border); color: var(--muted);
  font-size: 13px; text-align: center;
}

/* Task review history — submit ⇄ send-back timeline under the description. */
.review-box { margin: 12px 0 4px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.review-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px; }
/* Itemized reimbursement lines on the timesheet detail. */
.reimb-group { margin-top: 8px; }
.reimb-head { font-size: 13.5px; margin-bottom: 2px; }
.reimb-item { font-size: 12.5px; color: var(--muted); padding: 2px 0 2px 14px; font-variant-numeric: tabular-nums; }
.reimb-item b { color: var(--text); font-weight: 600; }
.review-tl { list-style: none; margin: 0; padding: 0; }
.review-tl .rt { position: relative; padding: 2px 0 12px 18px; border-left: 2px solid var(--border); }
.review-tl .rt:last-child { padding-bottom: 2px; border-left-color: transparent; }
.review-tl .rt::before { content: ''; position: absolute; left: -6px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 2px var(--card); }
.review-tl .rt.handoff::before { background: #0891b2; }
.review-tl .rt.submit::before { background: #16a34a; }
.review-tl .rt.sentback::before { background: #ea580c; }
.review-tl .rt.reopened::before { background: #7c3aed; }
.review-tl .rt.rejected::before { background: #dc2626; }
.review-tl .rt.resubmit::before { background: #2563eb; }
.review-tl .rt.done::before { background: #2563eb; }
.review-tl .rt-label { font-weight: 600; font-size: 13px; }
.review-tl .rt.submit .rt-label { color: #15803d; }
.review-tl .rt.sentback .rt-label { color: #c2410c; }
.review-tl .rt.reopened .rt-label { color: #6d28d9; }
.review-tl .rt.rejected .rt-label { color: #b91c1c; }
.review-tl .rt.resubmit .rt-label { color: #1d4ed8; }
.review-tl .rt.done .rt-label { color: #1d4ed8; }
.review-tl .rt-meta { color: var(--muted); font-size: 12px; }
.review-tl .rt-note { font-size: 13px; margin-top: 2px; color: var(--text); }

/* Clean confirmation dialog (replaces native confirm()). */
.confirm-backdrop { z-index: 200; align-items: center; }
.confirm-modal { width: 384px; max-width: calc(100% - 32px); }
.confirm-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.confirm-msg { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; white-space: pre-line; }

/* Styled file input — "Select a file… [Browse]" replaces the native control. */
.fileui { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; cursor: pointer; background: var(--card); max-width: 100%; }
.fileui:hover { border-color: var(--brand-text); }
.fileui:focus-visible { outline: 2px solid var(--sidebar-active); outline-offset: 1px; }
.fileui-name { flex: 1 1 auto; min-width: 0; padding: 9px 12px; color: var(--muted); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fileui-name.has { color: var(--text); font-weight: 500; }
.fileui-btn { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--sidebar-active);
  color: var(--brand-text); font-size: 13px; font-weight: 600; border-left: 1px solid var(--border); white-space: nowrap; flex: 0 0 auto; }
.fileui-ico svg { display: block; }

/* Expense form — sectioned layout, $ money inputs, payment-method cards. */
.exp-form-panel { max-width: 880px; }
label .opt { font-weight: 400; color: var(--sidebar-muted); text-transform: none; font-size: 11px; }
.form-section + .form-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-section > h4 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.input-money { position: relative; }
.input-money > span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.input-money > input { padding-left: 22px; }
.pay-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-card { position: relative; display: block; margin: 0; padding: 13px 14px 13px 40px; border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer; font-weight: 400; text-transform: none; letter-spacing: 0;
  transition: border-color .12s ease, background .12s ease; }
.pay-card input { position: absolute; left: 14px; top: 15px; width: auto; margin: 0; }
.pay-card:hover { border-color: #c7d2fe; }
.pay-card.sel { border-color: var(--brand-text); background: var(--sidebar-active); }
.pay-card-title { font-weight: 600; font-size: 14px; color: var(--text); }
.pay-card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.exp-pay-note { font-size: 13px; color: var(--muted); background: #f8fafc; border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 13px; margin-top: 2px; }
@media (max-width: 560px) { .pay-cards { grid-template-columns: 1fr; } }

/* Unread task-message chip — "N new". */
.msg-chip {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  color: var(--brand-text); background: var(--tint-blue); padding: 1px 8px; border-radius: 20px;
  vertical-align: middle; white-space: nowrap;
}
/* Freshly decided request the requester hasn't opened yet: faint row tint + bar.
   Green for approved, red for rejected — both clear once they open it. */
tr.row-unseen > td { background: rgba(22, 163, 74, .08); }
tr.row-unseen > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.row-unseen.rej > td { background: rgba(220, 38, 38, .08); }
tr.row-unseen.rej > td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.row-unseen.upd > td { background: rgba(37, 99, 235, .07); }
tr.row-unseen.upd > td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.approved-dot {
  display: inline-block; font-size: 10px; font-weight: 700; color: var(--green);
  background: var(--tint-green); padding: 1px 8px; border-radius: 20px; vertical-align: middle; white-space: nowrap;
}
.approved-dot.rej { color: var(--red); background: var(--tint-red); }
.approved-dot.upd { color: var(--brand-text); background: var(--tint-blue); }

/* Dashboard to-do list — clickable action items across every module. */
.todo-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.todo-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px;
  cursor: pointer; font-size: 14px; color: var(--text); font-family: inherit;
  transition: border-color .15s, background .15s;
}
.todo-item:hover { border-color: var(--brand-text); background: var(--sidebar-active); }
.todo-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.todo-dot.amber { background: var(--amber); }
.todo-dot.red { background: var(--red); }
.todo-dot.blue { background: var(--brand); }
.todo-dot.green { background: var(--green); }
.todo-dot.gray { background: #94a3b8; }
.todo-text { flex: 1; font-weight: 500; }
.todo-chev { color: var(--muted); font-size: 18px; line-height: 1; flex: 0 0 auto; }

/* Dashboard bento grid */
.bento { display: grid; grid-template-columns: 1fr 1fr 320px; gap: 14px; align-items: stretch; margin-bottom: 16px; }
.btile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.05); min-width: 0; }
.btile h4 { margin: 0 0 8px; font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.bt-greet { grid-column: span 2; background: linear-gradient(120deg, #1e3a8a, var(--brand)); color: #fff; border: none; display: flex; flex-direction: column; justify-content: center; }
.bt-greet-h { font-size: 21px; font-weight: 750; letter-spacing: -.01em; }
.bt-greet-s { opacity: .92; margin-top: 5px; font-size: 13.5px; }
.bt-greet-d { opacity: .72; margin-top: 9px; font-size: 12px; }
.bt-todo { grid-column: span 2; grid-row: span 2; }
.bt-cal { grid-row: span 2; }

/* ============ Dashboard: slim header, stat strip, uniform card grid ============ */
.dash-hero { position: relative; background: linear-gradient(120deg, #1e3a8a, var(--brand)); color: #fff;
  border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; }
:root[data-theme="dark"] .dash-hero { background: linear-gradient(120deg, #15203a, #1d4487); }
.dash-hero-h { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.dash-hero-s { opacity: .92; margin-top: 5px; font-size: 13.5px; }
.dash-hero-d { opacity: .72; margin-top: 9px; font-size: 12px; }

.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .dash-grid { grid-template-columns: 1fr; } }
.dcard { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; min-width: 0; }
.dcard-h { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.dcard-h h3 { margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.dcount { background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.dlink { margin-left: auto; background: none; border: 0; color: var(--brand-text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dempty { color: var(--muted); font-size: 13px; text-align: center; padding: 26px 8px; }
.dstack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* the one row shape used by every card */
.drows { display: flex; flex-direction: column; }
.drow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font: inherit;
  background: none; border: 0; border-top: 1px solid var(--border); padding: 11px 2px; color: var(--text); }
.drows .drow:first-child, .dcard > .drow { border-top: 0; }
.drow:hover { background: var(--hover); }
.drow.static { cursor: default; }
.drow.static:hover { background: none; }
.drow-ic { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  background: var(--tint-blue); color: var(--brand-text); }
.drow-ic svg { width: 16px; height: 16px; }
.drow-ic.ok { background: var(--tint-green); color: #15803d; }
.drow-ic.warn { background: #fef3c7; color: #b45309; }
.drow-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drow-t b { font-size: 13.5px; font-weight: 620; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow-t span { font-size: 11.8px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow-v { flex: 0 0 auto; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* small gradient stat cards */
.dmini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dmini { border-radius: 14px; padding: 18px 14px; color: #fff; text-align: center; }
.dmini b { display: block; font-size: 30px; font-weight: 750; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.dmini span { font-size: 11.5px; opacity: .92; display: block; margin-top: 6px; }
.grad-a { background: linear-gradient(140deg, #7c5cff, #a78bfa); }
.grad-b { background: linear-gradient(140deg, #2b4fc7, #5f8bf5); }
.dperiod { margin-bottom: 4px; }
.dp-big { font-size: 27px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dp-big span { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.dp-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* notes card: search + "+" like the reference */
.nt-top { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
.nt-srch { color: var(--muted); display: flex; flex: 0 0 auto; }
.nt-top input { flex: 1; min-width: 0; border: 0; background: none; padding: 2px 0; font-size: 13.5px; color: var(--text); }
.nt-top input:focus { outline: none; }
.nt-plus { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: var(--card);
  color: var(--brand-text); font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit; }
.nt-plus:hover { background: var(--tint-blue); border-color: var(--brand); }
.nt-addrow { display: flex; gap: 6px; margin-bottom: 10px; }
.nt-addrow input { flex: 1; min-width: 0; }

/* --- "Needs your action": icon · what it is · how many --- */
.dcard-action { background: linear-gradient(150deg, #2b4fc7, var(--brand) 55%, #5f8bf5); color: #fff; border: none; }
.dcard-action .dcard-h h3 { color: #fff; }
.ai-tot { background: rgba(255,255,255,.22); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; }
.ai-list { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; max-height: 320px; overflow-y: auto; overflow-x: hidden; padding-right: 5px; }
/* Slim translucent scrollbar — the OS default reads as dated inside the card. */
.ai-list { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.34) transparent; }
.ai-list::-webkit-scrollbar { width: 7px; }
.ai-list::-webkit-scrollbar-track { background: transparent; }
.ai-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.30); border-radius: 20px; }
.ai-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.52); }
.ai-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font: inherit;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.15); border-radius: 11px; padding: 9px 12px; color: #fff;
  transition: background .13s; }
.ai-row:hover { background: rgba(255,255,255,.22); }
.ai-ic { width: 31px; height: 31px; border-radius: 9px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.17); }
.ai-ic svg { width: 16px; height: 16px; }
.ai-ic.red { background: rgba(255,140,140,.30); }
.ai-ic.green { background: rgba(134,239,172,.28); }
.ai-l { flex: 1; font-size: 13.5px; font-weight: 550; line-height: 1.35; }
.ai-n { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.ai-go { font-size: 17px; opacity: .6; }
.ai-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 34px 0; text-align: center; }
.ai-empty .ck { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.ai-empty b { font-size: 15px; }
.ai-empty span { font-size: 12.5px; opacity: .85; }

/* --- Notes tile --- */
.nt-list { display: flex; flex-direction: column; max-height: 292px; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.nt-list { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.nt-list::-webkit-scrollbar { width: 7px; }
.nt-list::-webkit-scrollbar-track { background: transparent; }
.nt-list::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 20px; opacity: .6; }
.nt-list::-webkit-scrollbar-thumb:hover { background: var(--text); }
.nt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-radius: 9px; }
.nt + .nt { margin-top: 2px; }
.nt:hover { background: var(--hover); }
.nt-main { flex: 1; min-width: 0; }
.nt-text { font-size: 13.2px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.nt-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.nt-acts { display: flex; gap: 1px; flex: 0 0 auto; opacity: .32; transition: opacity .12s; }
.nt:hover .nt-acts, .nt:focus-within .nt-acts { opacity: 1; }
.nt-ic { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 7px; display: flex; }
.nt-ic:hover { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.1); }
.nt-ic.del:hover { color: var(--red); }
.nt.editing { background: var(--hover); }
.nt-edit { display: flex; gap: 6px; width: 100%; align-items: center; }
.nt-edit input { flex: 1; min-width: 0; }
.nt-none { padding: 26px 8px; }

/* --- Date dropdown on the greeting tile --- */
.bt-greet { position: relative; }
.gd-btn { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); color: #fff; border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; }
.gd-btn:hover { background: rgba(255,255,255,.26); }
.gd-btn .ic-inline { color: #fff; }
.gd-pop { position: absolute; top: 58px; right: 16px; z-index: 40; width: 268px; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: 0 14px 38px rgba(15,23,42,.2); }
.gd-pop-h { font-size: 13px; font-weight: 650; margin-bottom: 8px; }
@media (max-width: 560px) { .gd-btn { position: static; margin-bottom: 10px; } .gd-pop { right: auto; left: 16px; top: 64px; } }
.bt-msg { grid-column: span 2; }
.bt-ring { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; }
.bt-balances { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.bal-rings { display: flex; align-items: flex-start; justify-content: space-around; gap: 12px; }
.bal-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; text-align: center; }
.bal-lieu { font-size: 12px; color: var(--muted); text-align: center; border-top: 1px solid var(--border); padding-top: 11px; }
.bal-lieu b { color: var(--text); font-weight: 750; font-size: 14px; }
.ring { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ring-in { width: 68px; height: 68px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-in b { font-size: 23px; font-weight: 750; line-height: 1; }
.ring-in span { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.bt-ring-l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cal-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; max-width: 268px; margin: 8px 0 0; }
.cal-mini span { font-size: 14px; font-weight: 500; text-align: center; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: 8px; color: var(--text); }
.cal-mini span.hd { aspect-ratio: auto; min-height: 15px; font-size: 11px; font-weight: 700; }
.cal-mini span.hd { color: var(--faint, #94a3b8); font-weight: 700; font-size: 9px; }
.cal-mini span.on { background: var(--brand); color: #fff; font-weight: 700; }
.cal-mini span.dot-day { position: relative; font-weight: 600; }
.cal-mini span.dot-day::after { content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.bt-cal-note { margin-top: 10px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cal-key { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: 0 0 auto; }
.bt-quick-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 8px; }
.bt-quick-row:first-of-type { margin-top: 0; }
.bt-quick-row b { font-size: 15px; font-weight: 750; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bt-greet, .bt-todo, .bt-msg { grid-column: auto; }
  .bt-todo, .bt-cal { grid-row: auto; }
}

/* Task conversation — messaging-style chat bubbles. */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px 2px; }
.chat-msg { display: flex; flex-direction: column; max-width: 76%; align-self: flex-start; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-head { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 3px; }
.chat-msg.me .chat-head { flex-direction: row-reverse; }
.chat-name { font-size: 12px; font-weight: 700; }
.chat-msg.me .chat-name { color: var(--brand-text); }
.chat-time { color: var(--muted); font-size: 11px; }
.chat-bubble {
  padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4;
  background: var(--hover); color: var(--text); border-bottom-left-radius: 4px;
  white-space: pre-wrap; word-break: break-word;
}
.chat-msg.me .chat-bubble { background: var(--brand); color: #fff; border-radius: 14px; border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; }

/* ---------- Forms / buttons ---------- */
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--card); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

/* Custom dropdowns — native <select> is enhanced into this menu (see enhanceSelect). */
.dd { position: relative; display: block; width: 100%; }
.dd > select { display: none; }
.dd-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 500; font-family: inherit; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.dd-btn:hover { border-color: var(--brand-text); }
.dd.open .dd-btn { border-color: var(--brand-text); box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.dd-btn .val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .chev { color: var(--muted); transition: transform .18s; display: flex; flex: 0 0 auto; }
.dd.open .dd-btn .chev { transform: rotate(180deg); }
.dd-menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: 0 12px 32px rgba(15,23,42,.16); padding: 6px; max-height: 264px; overflow: auto;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.dd-menu.up { top: auto; bottom: calc(100% + 6px); transform: translateY(6px) scale(.98); }
.dd.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-opt {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 7px;
  cursor: pointer; font-size: 14px; color: var(--text); line-height: 1.25;
}
.dd-opt:hover { background: var(--hover); }
.dd-opt .tick { margin-left: auto; color: var(--brand-text); opacity: 0; display: flex; flex: 0 0 auto; }
.dd-opt[aria-selected="true"] { background: var(--sidebar-active); color: var(--brand-text); font-weight: 600; }
.dd-opt[aria-selected="true"] .tick { opacity: 1; }
.dd-search { padding: 2px 2px 8px; position: sticky; top: -6px; background: var(--card); }
.dd-search input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); font-size: 13.5px; font-family: inherit;
}
.dd-search input:focus { outline: none; border-color: var(--brand-text); }
textarea { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }
.btn {
  background: var(--brand); color: #fff; border: none; padding: 9px 16px;
  border-radius: 8px; font-size: 14px; font-weight: 500;
}
.btn:hover { background: var(--brand-dark); }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--hover); }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.amber { background: var(--amber); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn + .btn { margin-left: 6px; }
.ic-inline { vertical-align: -2px; margin-right: 4px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: 14px; width: 640px; max-width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.modal header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal header h3 { margin: 0; font-size: 16px; }
.modal header .close { margin-left: auto; background: none; border: none; font-size: 22px; color: var(--muted); }
.modal .body { padding: 20px 22px; }
.modal footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--border); position: relative; }
.timeline li:before {
  content: ''; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brand);
}
.timeline .act { font-weight: 600; text-transform: capitalize; }
.timeline .meta { color: var(--muted); font-size: 12px; }
.timeline .note { margin-top: 2px; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }

/* Roles & permissions editor */
.role-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.role-card > b { font-size: 14px; }
.role-sub { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--panel-2, var(--hover)); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }
.perms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 18px; margin: 12px 0 14px; }
.perm { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.perm input { width: auto; margin: 2px 0 0; flex: 0 0 auto; }
.perm-txt { display: flex; flex-direction: column; }
.perm-label { color: var(--text); font-size: 13.5px; }
.perm-desc { color: var(--muted); font-size: 12px; margin-top: 1px; display: none; }
#roles-editor.show-desc .perm-desc { display: block; }

/* HR Requests */
.hrq-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .12s; }
.chip:hover { border-color: var(--brand-text); color: var(--brand-text); }
.chip.active { background: var(--brand); border-color: var(--brand-text); color: #fff; }
.chip-n { display: inline-block; min-width: 18px; text-align: center; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: 11px; }
.chip.active .chip-n { background: rgba(255,255,255,.28); }
.prio-tag { font-size: 11px; font-weight: 700; color: var(--amber); border: 1px solid var(--amber); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.hrthread { display: flex; flex-direction: column; gap: 10px; }
.hrnote { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.hrnote.internal { background: #fffbeb; border-color: #fde68a; }
.hrnote-h { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.hrnote-t { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.hrnote-b { font-size: 13.5px; white-space: pre-wrap; line-height: 1.5; }
.tag-internal { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--amber); background: #fef3c7; border-radius: 4px; padding: 1px 6px; }

/* Announcements */
.ann-search { display: flex; align-items: center; gap: 10px; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; }
.ann-search-ico { color: var(--muted); }
/* Search glyph: a box the icon fills, so it can't be stretched by line-height. */
.srch-ico { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--muted); }
.ic-glyph { flex: 0 0 auto; }
.ann-search input { border: none; outline: none; width: 100%; font-size: 14px; background: transparent; padding: 0; }
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann-card { background: var(--card, #fff); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 10px; padding: 14px 18px; }
.ann-card.red { border-left-color: var(--red); }
.ann-card.green { border-left-color: var(--green); }
.ann-card.blue { border-left-color: var(--brand-text); }
.ann-card.amber { border-left-color: var(--amber); }
.ann-card.gray { border-left-color: #94a3b8; }
/* Flex row, not inline text: an inline SVG rides the baseline and shifts the
   label. The icon inherits the kicker's per-category colour via currentColor. */
.ann-kicker { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 5px; color: #94a3b8; }
.ann-card.red .ann-kicker { color: var(--red); }
.ann-card.green .ann-kicker { color: var(--green); }
.ann-card.blue .ann-kicker { color: var(--brand-text); }
.ann-card.amber .ann-kicker { color: var(--amber); }
.ann-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ann-body { font-size: 13.5px; color: #334155; line-height: 1.55; white-space: pre-wrap; }
.ann-foot { display: flex; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ann-actions { margin-left: auto; display: flex; gap: 6px; }
.ann-list.compact .ann-card { padding: 11px 15px; }
.ann-list.compact .ann-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Onboarding */
.onb-bar { height: 10px; background: #eef2f7; border-radius: 999px; margin-top: 10px; overflow: hidden; }
.onb-bar-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.onb-list { display: flex; flex-direction: column; gap: 12px; }
.onb-card { background: var(--card, #fff); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.onb-head { display: flex; align-items: flex-start; gap: 12px; }
.onb-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.onb-desc { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.onb-tags { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.onb-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.onb-upload { display: flex; align-items: center; gap: 8px; }
.onb-upload input[type=file] { font-size: 12px; max-width: 230px; }
.onb-reject { margin-top: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.onb-matrix th, .onb-matrix td { text-align: center; }
.onb-matrix .onb-emp, .onb-matrix th:first-child { text-align: left; white-space: nowrap; }
.onb-th { font-size: 11px; font-weight: 600; max-width: 90px; white-space: normal; line-height: 1.2; vertical-align: bottom; }
.onb-cell { font-weight: 800; font-size: 15px; }
.onb-cell.ok { color: var(--green); }
.onb-cell.wait { color: var(--amber); }
.onb-cell.bad { color: var(--red); }
.onb-cell.none { color: #cbd5e1; }
.onb-cell.link { cursor: pointer; }
.onb-hrtag { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--brand-text); background: var(--tint-blue); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
/* Returned-timesheet editor: unlogged days read as muted so the logged ones and
   the "+ Add this day" action stand out. */
.amber-txt { color: var(--amber); }
.ts-missing td { background: rgba(217, 119, 6, .06); }
.onb-cell.link:hover { background: #f0f9ff; }
.onb-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.onb-actions .onb-upload { display: inline-flex; align-items: center; gap: 6px; }
.onb-actions .onb-upload input[type=file] { font-size: 12px; max-width: 190px; }

/* In-app signing modal */
.modal.modal-wide { max-width: 900px; width: 94vw; }
.sign-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.sign-left, .sign-right { min-width: 0; } /* let columns shrink below content width */
@media (max-width: 720px) { .sign-wrap { grid-template-columns: 1fr; } }
.sign-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin: 0 0 6px; }
.sign-left .sign-lbl { margin-top: 2px; }
.sign-read { width: 100%; height: 460px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); box-sizing: border-box; }
iframe.sign-read { display: block; }
.sign-read.doc { overflow: auto; padding: 16px 18px; font-size: 13px; line-height: 1.55; color: #1f2937; }
.sign-read.doc p { margin: 0 0 8px; }
.sign-read.doc img { max-width: 100%; height: auto; }
.sign-read.doc table { font-size: 12px; max-width: 100%; border-collapse: collapse; table-layout: fixed; }
.sign-read.doc td, .sign-read.doc th { word-break: break-word; }
.sign-read.doc * { max-width: 100%; }
.sign-read.none { display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--muted); font-size: 13px; }
.sign-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.sign-f label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.sign-f input, .sign-f textarea, .sign-f select { width: 100%; }
.sign-pad { width: 100%; height: 120px; border: 1px dashed #94a3b8; border-radius: 8px; background: #fbfdff; touch-action: none; cursor: crosshair; }
.sign-pad-row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.sign-certify { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text); font-weight: 400; }
.sign-certify input { width: auto; margin-top: 2px; flex: 0 0 auto; }

/* Type-on-document signer */
.signd-help { font-size: 12.5px; color: var(--muted); background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.signd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 760px) { .signd-wrap { grid-template-columns: 1fr; } }
.sign-doc { min-width: 0; height: 480px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card); padding: 22px 26px; font-size: 13px; line-height: 1.7; color: #1f2937; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.sign-doc * { max-width: 100%; }
.sign-doc img { max-width: 100%; height: auto; }
.sign-doc table { max-width: 100%; border-collapse: collapse; table-layout: fixed; }
.sign-doc td, .sign-doc th { word-break: break-word; }
/* fill-in blanks */
.sign-doc input.fillin { display: inline-block; min-width: 130px; width: auto; border: none; border-bottom: 1.5px solid var(--brand); background: #eff6ff; padding: 1px 6px; margin: 0 2px; font-size: 13px; color: #111; border-radius: 3px 3px 0 0; }
.sign-doc input.fillin:focus { outline: none; background: var(--tint-blue); }
.fillin-flat { display: inline-block; min-width: 130px; border-bottom: 1.5px solid #111827; padding: 0 6px; margin: 0 2px; }
.sig-cursive { font-family: 'Segoe Script', 'Bradley Hand', 'Brush Script MT', cursive; font-size: 20px; color: #111827; border-bottom-color: transparent !important; background: transparent !important; }
.sig-preview { min-height: 40px; font-family: 'Segoe Script', 'Bradley Hand', 'Brush Script MT', cursive; font-size: 24px; color: #111827; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; margin-top: 6px; background: #fbfdff; }
.signd-side { min-width: 0; }

/* Real-PDF signer */
.pdf-pages { max-height: 62vh; overflow: auto; background: #eef2f7; border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pdf-page { position: relative; background: var(--card); box-shadow: 0 1px 5px rgba(0,0,0,.18); }
.pdf-page canvas { display: block; }
.pdf-field { position: absolute; border: none; border-bottom: 1.5px solid var(--brand); background: rgba(191,219,254,.55); font-size: 11px; line-height: 1.1; padding: 0 3px; margin: 0; color: #0b1020; box-sizing: border-box; border-radius: 2px 2px 0 0; }
.pdf-field::placeholder { color: #64748b; font-size: 9px; opacity: .8; }
.pdf-field:focus { outline: none; background: var(--tint-blue); box-shadow: 0 0 0 2px var(--brand); }
.pdf-sig-box { position: absolute; border: 1.5px dashed var(--brand); background: rgba(191,219,254,.28); border-radius: 3px; display: flex; align-items: center; overflow: hidden; cursor: pointer; transition: box-shadow .1s, background .1s; }
.pdf-sig-box:hover { background: rgba(191,219,254,.5); }
.pdf-sig-box.active { border-color: #f59e0b; border-style: solid; background: rgba(251,191,36,.16); box-shadow: 0 0 0 2px rgba(245,158,11,.45); }
.pdf-sig-box.signed { border-style: solid; border-color: var(--green); background: transparent; }
.pdf-sig-box .sig-ph { font-size: 9px; color: #2563eb; padding-left: 5px; font-weight: 600; white-space: nowrap; }
.pdf-sig-box .sig-ph .ic-inline { width: 10px; height: 10px; vertical-align: -1px; margin-right: 2px; }
.pdf-sig-box.active .sig-ph { color: #b45309; }
.pdf-sig-box img { height: 100%; width: auto; display: none; }
.pdf-sigtarget { color: #b45309; font-weight: 700; }
.pdf-check { position: absolute; margin: 0; cursor: pointer; accent-color: var(--brand-text); z-index: 2; }
.pdf-area { position: absolute; border: 1px solid transparent; background: transparent; font-size: 11px; line-height: 1.45; padding: 6px 9px; resize: none; box-sizing: border-box; color: #0b1020; }
.pdf-area:not(:disabled) { border-color: var(--brand-text); background: rgba(191,219,254,.35); }
.pdf-area:disabled { cursor: not-allowed; }
.pdf-area:focus { outline: none; background: var(--tint-blue); box-shadow: 0 0 0 2px var(--brand); }
.pdf-signbar { display: flex; align-items: flex-start; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.pdf-sigcol { display: flex; flex-direction: column; gap: 6px; }
.pdf-sigpad { width: 380px; max-width: 100%; height: 96px; border: 1.5px dashed #94a3b8; border-radius: 8px; background: #fbfdff; touch-action: none; cursor: crosshair; }
.pdf-sigrow { display: flex; gap: 8px; align-items: center; }
.pdf-sigrow input { max-width: 260px; }
.pdf-signbar .sign-certify { flex: 1; min-width: 230px; align-self: center; }

/* Attendance calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.cal-arrow { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--card); border-radius: 9px; font-size: 18px; line-height: 1; color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }
.cal-arrow:hover { background: #f0fdfa; border-color: var(--brand-text); color: var(--brand-text); }
.cal-title { margin: 0; font-size: 17px; min-width: 148px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { margin-bottom: 8px; }
.cal-dowcell { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.cal-cell { aspect-ratio: 1.6 / 1; min-height: 72px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; cursor: pointer; position: relative; background: var(--card); transition: .12s; }
.cal-cell.empty { border: none; background: transparent; cursor: default; }
.cal-cell:not(.empty):hover { border-color: var(--brand-text); background: #f0fdfa; }
.cal-day { font-size: 15px; color: var(--text); }
.cal-cell.today { border-color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-cell.today .cal-day { color: var(--brand-text); font-weight: 700; }
.cal-cell.logged { background: #a7f3cf; border-color: #34d399; }
.cal-cell.logged .cal-day { color: #065f46; font-weight: 600; }
.cal-hours { position: absolute; bottom: 8px; right: 10px; font-size: 14px; font-weight: 700; color: #047857; }
.cal-cell.future { opacity: .55; }
.cal-cell.holiday { background: #fff7ed; border-color: #fdba74; }
.cal-cell.holiday:not(.empty):hover { background: #ffedd5; border-color: #fb923c; }
.cal-holiday { display: block; font-size: 10px; font-weight: 700; color: #c2410c; line-height: 1.15; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hol-note { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }

/* Team calendar: same cell size as the personal calendar, holding chips */
.cal-cell.team { padding: 6px 8px; overflow: hidden; }
.cal-cell.team .cal-day { font-size: 13px; }
.cal-cell.team.today { box-shadow: inset 0 0 0 1px var(--brand); }
.emp-chip { display: block; font-size: 10.5px; line-height: 1.35; color: #fff; padding: 1px 6px; border-radius: 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.emp-chip.absence { background: var(--card); border: 1px dashed currentColor; padding: 0 5px; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

/* Staff Directory */
.dir-search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; margin-bottom: 20px; }
.dir-search span { color: var(--muted); font-size: 15px; }
.dir-search input { border: none; padding: 10px 0; font-size: 14px; background: transparent; }
.dir-search input:focus { outline: none; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.dir-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px 18px; text-align: center; cursor: pointer; transition: .14s; }
.dir-card:hover { border-color: var(--brand-text); box-shadow: 0 6px 18px rgba(15, 23, 42, .07); transform: translateY(-2px); }
.dir-avatar { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .5px; display: flex; align-items: center; justify-content: center; }
.dir-name { font-weight: 700; font-size: 15px; color: var(--text); }
.dir-title { color: var(--muted); font-size: 13px; margin-top: 3px; }
.dir-dept { color: var(--brand-text); font-size: 12.5px; font-weight: 600; margin-top: 5px; }
.dir-email { color: var(--muted); font-size: 12.5px; margin-top: 8px; word-break: break-all; }

/* Leave-type selector chips */
.type-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.type-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
  border: 1px solid var(--border); border-radius: 22px; background: var(--card);
  font-size: 13.5px; cursor: pointer; color: var(--text); transition: .12s;
}
.type-chip:hover { border-color: var(--brand-text); }
.type-chip.active { background: var(--sidebar-active); border-color: var(--brand-text); color: var(--brand-text); font-weight: 600; }

/* Inline two-month range calendar */
.rangepick { border: 1px solid var(--border); border-radius: 12px; padding: 18px 24px; margin: 4px 0 0; background: var(--card); max-width: 740px; }
.rp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rp-titles { flex: 1; display: flex; }
.rp-titles span { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.rp-months { display: flex; gap: 28px; }
.rp-month { flex: 1; }
.rp-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
.rp-dow span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.rp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.rp-day { height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 13.5px; cursor: pointer; color: var(--text); border-radius: 8px; }
.rp-day.empty { cursor: default; }
.rp-day:not(.empty):hover { background: #eff4ff; }
.rp-day.today { font-weight: 700; color: var(--brand-text); }
.rp-day.in-range { background: #eff4ff; border-radius: 0; }
.rp-day.start, .rp-day.end { background: var(--brand); color: #fff; font-weight: 600; }
.rp-day.start { border-radius: 8px 0 0 8px; }
.rp-day.end { border-radius: 0 8px 8px 0; }
.rp-day.single { border-radius: 8px !important; }
/* Add-a-day inline calendar (returned-timesheet fix flow). */
.ad-cal { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.ad-cal .rp-day { height: 34px; }
.rp-day.disabled { color: var(--muted); opacity: .38; cursor: default; }
.rp-day.disabled:hover { background: none; }
.rp-day.picked { background: var(--brand); color: #fff; font-weight: 700; border-radius: 8px; }
.rp-day.has-log { position: relative; }
.rp-day.has-log::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.rp-day.picked.has-log::after { background: #fff; }
.cal-arrow[disabled] { opacity: .35; cursor: default; }
.ad-cal-foot { display: flex; align-items: center; gap: 5px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.ad-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); display: inline-block; }

/* ---------- Pay schedule panel ---------- */
.pay-sched .pay-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pay-sched .pay-head h3 { margin: 0; }
.pay-cadence { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--brand-text); background: var(--tint-blue); padding: 4px 12px; border-radius: 20px; white-space: nowrap; }
.pay-lead { font-size: 14.5px; line-height: 1.55; color: var(--text); margin: 0 0 20px; max-width: 62ch; }
.pay-lead b { font-weight: 700; }

.pay-set { border-top: 1px solid var(--border); padding-top: 18px; }
.pay-lbl { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.pay-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-field { position: relative; }
.pay-datebtn { display: inline-flex; align-items: center; gap: 10px; min-width: 236px; padding: 11px 14px; border: 1px solid var(--border); background: var(--card); border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; transition: border-color .12s, box-shadow .12s; }
.pay-datebtn:hover { border-color: var(--brand-text); }
.pay-datebtn.open { border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint-blue); }
.pay-datebtn .ic-inline { color: var(--brand-text); flex: 0 0 auto; }
.pay-datebtn > span:first-of-type { flex: 1; }
.pay-datebtn .ph { color: var(--muted); font-weight: 500; }
.pay-caret { color: var(--muted); font-size: 11px; }
.pay-cal { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 300px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: 0 14px 38px rgba(15, 23, 42, .16); }
.pay-cal .rp-day { height: 34px; }
:root[data-theme="dark"] .pay-cal { box-shadow: 0 14px 38px rgba(0, 0, 0, .5); }

.pay-periods { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 34px; margin-top: 22px; }
.pay-now { display: flex; flex-direction: column; gap: 4px; min-width: 220px; background: var(--tint-blue); border: 1px solid var(--border); border-radius: 12px; padding: 13px 17px; }
.pay-now-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text); }
.pay-now-range { font-size: 16.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pay-up { min-width: 200px; padding-top: 2px; }
.pay-up-tag { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.pay-up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-up-list li { position: relative; padding-left: 17px; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.pay-up-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-text); opacity: .5; }
/* Time selection: the two dropdowns + a live hours readout. */
.time-row { align-items: flex-end; }
.time-hours { margin: 8px 0 2px; font-size: 13px; color: var(--muted); }
.time-hours .th-ok { color: var(--text); font-weight: 700; }
.time-hours .th-ok b { color: var(--text); font-size: 15px; }
.time-hours .th-calc { color: var(--muted); font-weight: 400; }
.time-hours .th-bad { color: var(--red); }
/* Per-day lunch question on the attendance form. */
.lunch-q { display: flex; align-items: center; gap: 9px; margin: 14px 0 0; font-size: 14px; color: var(--text); cursor: pointer; }
.lunch-min { margin-top: 10px; }
.lunch-min label { display: block; }
.lunch-min input[type="number"] { max-width: 130px; }
.lunch-min[hidden] { display: none; }
:root[data-theme="dark"] .rp-day.picked { color: #fff; }
.rp-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text); }

#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; transform: translateY(10px);
  transition: .25s; font-size: 13px; max-width: 340px;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.err { background: #b91c1c; }

/* ---------------------------------------------------------------------------
   My Planner — a checklist of work you set for yourself. Tick an item and it
   goes to the Director to sign off.
   ------------------------------------------------------------------------ */
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-item {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px;
  background: var(--card); transition: border-color .15s, background .15s;
}
.plan-item:hover { border-color: #cbd5e1; }
:root[data-theme="dark"] .plan-item:hover { border-color: #3a4657; }
/* A decision from the Director: green when signed off, red when sent back. */
.plan-item.unseen { border-left: 3px solid var(--green); background: #f6fef9; }
.plan-item.unseen.sentback { border-left-color: var(--red); background: #fff7f7; }
:root[data-theme="dark"] .plan-item.unseen { background: #12241a; }
:root[data-theme="dark"] .plan-item.unseen.sentback { background: #241416; }
.plan-item.done { opacity: .62; }
.plan-item.done .plan-title { text-decoration: line-through; text-decoration-color: var(--muted); }

/* The tick box — the main gesture of the planner. */
.plan-tick { background: none; border: none; padding: 0; margin-top: 1px; cursor: pointer; flex-shrink: 0; }
.plan-tick[disabled] { cursor: default; }
.plan-box {
  display: block; width: 19px; height: 19px; border-radius: 6px;
  border: 2px solid #cbd5e1; transition: background .15s, border-color .15s;
}
.plan-tick:hover .plan-box { border-color: var(--green); background: var(--tint-green); }
:root[data-theme="dark"] .plan-box { border-color: #48566a; }
:root[data-theme="dark"] .plan-tick:hover .plan-box { background: #14532d; }
/* Filled states: ticked (optimistic), waiting on the Director, signed off. */
.plan-tick.ticked .plan-box,
.plan-item.done .plan-box { background: var(--green); border-color: var(--green); }
.plan-item.waiting .plan-box { background: var(--amber); border-color: var(--amber); }
.plan-tick.ticked .plan-box::after,
.plan-item.done .plan-box::after, .plan-item.waiting .plan-box::after {
  content: ''; display: block; width: 4px; height: 8px; margin: 2px auto 0;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.plan-main { flex: 1; min-width: 0; }
.plan-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.plan-desc { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.plan-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.plan-ref { font-family: ui-monospace, monospace; font-size: 10.5px; opacity: .7; }
.plan-wait { color: var(--amber); font-weight: 600; }
.plan-prio { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
/* Due-date chip: urgency reads from colour before you read the words. */
.plan-due { font-weight: 600; }
.plan-due.over { color: var(--red); }
.plan-due.soon { color: var(--amber); }
.plan-due.none { opacity: .6; font-weight: 400; }
.plan-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
@media (max-width: 640px) {
  .plan-item { flex-wrap: wrap; }
  .plan-actions { width: 100%; justify-content: flex-end; }
}

/* ---------------------------------------------------------------------------
   Offboarding — departing-staff cases + their checklist. Reuses the planner's
   .plan-item / .plan-tick checklist styles.
   ------------------------------------------------------------------------ */
.off-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.off-card {
  display: flex; align-items: center; gap: 18px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 11px; padding: 13px 16px; background: var(--card);
  transition: border-color .15s, transform .06s;
}
.off-card:hover { border-color: var(--sidebar-accent); }
.off-card:active { transform: translateY(1px); }
.off-who { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; }
.off-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--sidebar-accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.off-avatar.big { width: 48px; height: 48px; font-size: 19px; }
.off-name { font-weight: 600; font-size: 14px; }
.off-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.off-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Progress bar — how far through the 24 points this departure is. */
.off-prog { flex: 0 1 190px; min-width: 120px; }
.off-total { max-width: 380px; }
.off-bar { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.off-bar > span {
  display: block; height: 100%; border-radius: 99px; background: var(--amber);
  transition: width .25s ease;
}
.off-bar > span.full { background: var(--green); }
.off-prog-txt { font-size: 11px; color: var(--muted); margin-top: 5px; }

.off-sec h3 { font-size: 14px; }
.off-item .off-label { font-size: 13.5px; line-height: 1.45; }
.off-item.done .off-label { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
@media (max-width: 720px) {
  .off-card { flex-wrap: wrap; gap: 10px; }
  .off-prog { flex-basis: 100%; }
}

/* Offboarding sign-off — HR certifies the checklist and the system files a PDF. */
.off-signbox { background: var(--hover); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin-bottom: 14px; }
.off-signhead { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
/* The declaration being signed — set apart so it reads as a legal statement. */
.sign-statement {
  font-size: 12.5px; line-height: 1.65; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--sidebar-accent);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 12px;
}
.sign-statement b { font-weight: 700; }
/* Typed signature: a signing line, not just another text box. */
.off-signfield {
  font-family: "Segoe Script", "Bradley Hand", cursive; font-size: 19px; padding: 8px 10px;
}
.off-sig { font-family: "Segoe Script", "Bradley Hand", cursive; font-size: 16px; }
.off-signed-note {
  margin-top: 14px; font-size: 12.5px; color: var(--muted);
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 9px 12px;
}
.off-signed-note a { color: var(--green); font-weight: 600; }
:root[data-theme="dark"] .off-signed-note { background: #12241a; border-color: #14532d; }

/* The hidden attribute must win over any author display rule (e.g. .plan-meta
   is display:flex, which would otherwise keep [hidden] rows visible). */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------------------
   Contracts — issuing an employment contract from a Word template. The cyan
   highlights in the template are the fill-ins; everything else is locked.
   ------------------------------------------------------------------------ */
.con-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.con-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: var(--card);
}
.con-card:hover { border-color: var(--sidebar-accent); }
.con-name { font-weight: 700; font-size: 14px; }
.con-desc { color: var(--muted); font-size: 12.5px; margin-top: 5px; line-height: 1.5; }
.con-card-a { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* The rendered contract. Roomier than the onboarding pane — these run long. */
.con-doc { height: 560px; }
/* A cyan fill-in that's already been signed shows its value inline. */
.cfield-done { background: #eff6ff; border-bottom: 1.5px solid var(--brand); padding: 0 4px; }
/* Whole-paragraph highlights (the "Schedule A" headings) aren't fill-ins — keep
   them marked so they still read as needing attention. */
.cmark { background: #cffafe; padding: 0 3px; }
:root[data-theme="dark"] .cmark { background: #164e63; }

/* Jump-list of the fill-ins, so none get missed in a long document. */
.con-fieldlist { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.con-fchip {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 20px; cursor: pointer;
  border: 1px solid #7dd3fc; background: #ecfeff; color: #0e7490; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.con-fchip:hover { background: #cffafe; }
.con-fchip.filled { border-color: var(--green); background: var(--tint-green); color: #166534; }
.con-fchip.filled::before { content: '✓ '; }
:root[data-theme="dark"] .con-fchip { background: #0b3b45; border-color: #155e75; color: #67e8f9; }
:root[data-theme="dark"] .con-fchip.filled { background: #14532d; border-color: #166534; color: #86efac; }
/* Cyan-tinted fill-ins so they stand out from the locked wording. */
.sign-doc input.cfin { border-bottom-color: #06b6d4; background: #ecfeff; }
.sign-doc input.cfin:focus { background: #cffafe; }

/* Inline click-to-sign boxes on a contract's signature lines. Same idea as the
   PDF signer's boxes, but these sit inline in flowing text rather than absolutely
   positioned over a canvas. */
.con-sigbox {
  display: inline-block; vertical-align: middle; min-width: 168px; height: 34px;
  border: 1.5px dashed var(--brand); border-bottom-width: 1.5px; background: rgba(191,219,254,.28);
  border-radius: 3px; margin: 0 3px; cursor: pointer; overflow: hidden; white-space: nowrap;
  transition: background .1s, box-shadow .1s;
}
.con-sigbox:hover { background: rgba(191,219,254,.55); }
.con-sigbox.active { border-color: #f59e0b; border-style: solid; background: rgba(251,191,36,.16); box-shadow: 0 0 0 2px rgba(245,158,11,.45); }
.con-sigbox.signed { border-style: solid; border-color: var(--green); background: transparent; }
.con-sigbox .sig-ph { font-size: 9.5px; color: #2563eb; padding: 0 6px; font-weight: 600; line-height: 32px; white-space: nowrap; }
.con-sigbox .sig-ph .ic-inline { width: 10px; height: 10px; vertical-align: -1px; margin-right: 2px; }
.con-sigbox.active .sig-ph { color: #b45309; }
.con-sigbox img { height: 100%; width: auto; display: none; }
/* Print mode for the snapshot: the sign boxes become plain signature lines, so
   an unsigned one doesn't bake "click to sign" into the filed contract. */
.sign-doc.snapshot .con-sigbox {
  border: none; border-bottom: 1.5px solid #111827; background: transparent;
  box-shadow: none; border-radius: 0; height: 30px;
}
.sign-doc.snapshot .con-sigbox .sig-ph { display: none !important; }

/* Schedule A — a page in the contract for the role's duties, typed per contract.
   The FT and PT templates leave this section empty; the Counsellor one already
   lists its duties and keeps them. */
.csched { margin: 6px 0 10px; }
.sign-doc textarea.csched-in {
  display: block; width: 100%; min-height: 300px; resize: vertical; overflow: hidden;
  border: 1.5px dashed #06b6d4; border-radius: 6px; background: #f7feff;
  padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.7; color: #111;
}
.sign-doc textarea.csched-in:focus { outline: none; background: #ecfeff; }
/* Print form: no box, just the typed duties on the page. */
.csched-flat { white-space: pre-wrap; min-height: 300px; font-size: 13px; line-height: 1.7; padding: 2px 0; }
.sign-doc.snapshot .csched-in, .sign-doc.snapshot .csched-flat { border: none; background: transparent; }
/* The cyan marker on a "Schedule A" heading is an editing cue for whoever's
   filling the contract in — it must not print into the signed copy, or the
   record looks like an unfinished draft. */
.sign-doc.snapshot .cmark { background: transparent; }
/* Checkboxes on a form PDF, drawn at their mapped positions. */
.pdf-check { position: absolute; margin: 0; cursor: pointer; accent-color: var(--brand-text); }
.pdf-check:disabled { cursor: default; }
/* The instruction a form gives for a blank ("describe risk needing mitigation…"),
   shown in the box until it's typed over. */
.pdf-field::placeholder { color: #64748b; font-style: italic; opacity: .75; }
/* A box positioned on a form is sized to the space it fills on the page — the
   global `textarea { min-height: 70px }` would otherwise stretch every one of
   them to the same height and cover the label underneath. */
.pdf-area { min-height: 0; }
/* The sign-in button belongs to the brand panel beside it, so it takes MSSWR's
   green rather than the app's blue accent. */
.login-card .btn {
  background: #238174;
  box-shadow: 0 1px 2px rgba(16,74,67,.25);
}
.login-card .btn:hover { background: #1c6d60; }
.login-card input:focus { border-color: #238174; box-shadow: 0 0 0 3px rgba(35,129,116,.16); }
.login-help a, .login-card a { color: #238174; }
