/* ============================================================
   XcodeFix HRMS — Option 2 "Graphite"
   Enterprise data-first · dark navy sidebar + light content
   ============================================================ */

:root {
  --teal: #0D9488;
  --teal-hover: #0F766E;
  --teal-text: #0F766E;        /* AA text-on-light */
  --teal-soft: #F0FDFA;
  --teal-active: #14B8A6;      /* sidebar active */

  --sidebar-bg: #0B1220;
  --sidebar-text: #CBD5E1;
  --sidebar-muted: #64748B;

  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --text: #111827;
  --text-2: #4B5563;
  --muted: #9CA3AF;

  --border-table: #D1D5DB;
  --border-card: #E5E7EB;

  --success: #15803D;  --success-soft: #F0FDF4;  --success-border: #BBF7D0;
  --warning: #B45309;  --warning-soft: #FFFBEB;  --warning-border: #FDE68A;
  --danger:  #B91C1C;  --danger-soft:  #FEF2F2;  --danger-border:  #FECACA;
  --info:    #1D4ED8;  --info-soft:    #EFF6FF;  --info-border:    #BFDBFE;

  --radius-card: 10px;
  --radius-btn: 8px;
  --shadow-card: 0 1px 2px rgb(0 0 0 / .05);
  --shadow-pop: 0 10px 30px rgb(11 18 32 / .18);

  --sidebar-w: 248px;
  --topbar-h: 56px;

  --font: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
strong { font-weight: 600; }
small { font-size: 12px; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--surface); color: var(--teal-text);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.num, td.num, .metric-val { font-variant-numeric: tabular-nums; }

/* Utilities */
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- App layout ---------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  z-index: 60;
  overflow-y: auto;
  scrollbar-width: thin;
  transition: transform .25s ease;
}

.main {
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ---------- Brand ---------- */
.brand {
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgb(255 255 255 / .07);
}
.brand-link {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
}
.brand-link:hover { text-decoration: none; }
.brand-logo {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  border-radius: 8px; color: #fff;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.brand-name span { color: var(--teal-active); }
.tenant {
  display: block; margin-top: 2px;
  font-size: 11px; color: var(--sidebar-muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}

/* ---------- Sidebar nav ---------- */
.nav { flex: 1; padding: 10px 0 16px; }
.nav-section-label {
  padding: 14px 16px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sidebar-muted);
}
.nav-link, .nav-toggle {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 16px;
  border-left: 3px solid transparent;
  color: var(--sidebar-text);
  font-size: 14px; font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover, .nav-toggle:hover {
  background: rgb(255 255 255 / .05); color: #fff; text-decoration: none;
}
.nav-link:focus-visible, .nav-toggle:focus-visible { outline-offset: -2px; border-radius: 0; }
.nav-link.is-active {
  border-left-color: var(--teal-active);
  color: var(--teal-active);
  background: rgba(20, 184, 166, .1);
}
.nav-link .nav-icon, .nav-toggle .nav-icon { flex: none; opacity: .9; }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--teal); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-toggle .chev { margin-left: auto; transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-toggle.is-child-active { color: var(--teal-active); }

.submenu { overflow: hidden; }
.submenu[hidden] { display: none; }
.submenu a {
  display: flex; align-items: center;
  min-height: 40px;
  padding: 8px 16px 8px 51px;
  border-left: 3px solid transparent;
  color: var(--sidebar-muted);
  font-size: 13.5px; font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.submenu a:hover { color: #fff; background: rgb(255 255 255 / .05); text-decoration: none; }
.submenu a:focus-visible { outline-offset: -2px; border-radius: 0; }
.submenu a.is-active {
  border-left-color: var(--teal-active);
  color: var(--teal-active);
  background: rgba(20, 184, 166, .1);
}

.sidebar-foot {
  padding: 14px 16px;
  border-top: 1px solid rgb(255 255 255 / .07);
  font-size: 12px; color: var(--sidebar-muted);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-foot .avatar { width: 32px; height: 32px; font-size: 12px; flex: none; }
.sidebar-foot b { display: block; color: var(--sidebar-text); font-weight: 600; font-size: 12.5px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-card);
}
.hamburger { display: none; }
.topbar-title { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.crumbs {
  font-size: 11px; color: var(--muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal-text); }
.crumbs .sep { margin: 0 5px; color: var(--border-table); }
.page-title { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.global-search {
  position: relative; display: flex; align-items: center;
  width: 300px;
}
.global-search svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.global-search input {
  width: 100%; height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-btn);
  background: var(--bg);
  font-size: 13.5px;
}
.global-search input::placeholder { color: var(--muted); }
.global-search input:focus { outline: 2px solid var(--teal); outline-offset: -1px; background: var(--surface); }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-btn);
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.bordered { border-color: var(--border-card); background: var(--surface); }
.icon-btn.bordered:hover { background: var(--bg); }
.bell-dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface);
}

.quicklinks {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border-radius: var(--radius-btn);
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background .15s ease, color .15s ease;
  cursor: pointer;
}
.quicklinks:hover { background: var(--bg); color: var(--text); }

.avatar {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: #134E4A; color: #99F6E4;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.a2 { background: #1E3A8A; color: #BFDBFE; }
.avatar.a3 { background: #7C2D12; color: #FED7AA; }
.avatar.a4 { background: #4C1D95; color: #DDD6FE; }
.avatar.a5 { background: #831843; color: #FBCFE8; }

.avatar-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 4px 8px 4px 4px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background .15s ease;
}
.avatar-btn:hover { background: var(--bg); }
.avatar-meta { text-align: left; line-height: 1.2; }
.avatar-meta b { display: block; font-size: 13px; font-weight: 600; }
.avatar-meta small { color: var(--muted); font-size: 11.5px; }

/* ---------- Content / footer ---------- */
.content {
  flex: 1;
  width: 100%; max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 32px;
}
.footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-card);
  font-size: 12px; color: var(--muted);
  text-align: center;
}
.footer a { color: var(--text-2); }

/* ---------- Page header row ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.page-head .sub { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.overline {
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2);
}
.card-link { font-size: 13px; font-weight: 500; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-btn);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-table); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #166534; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger-outline:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-danger-subtle { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.btn-danger-subtle:hover { background: #FEE2E2; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--teal-text); font-weight: 600; font-size: 13.5px;
  cursor: pointer; min-height: 44px;
}
.btn-link:hover { text-decoration: underline; }

/* ---------- Chips / status ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.chip-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.chip-danger  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger-border); }
.chip-info    { background: var(--info-soft);    color: var(--info);    border-color: var(--info-border); }
.chip-teal    { background: var(--teal-soft);    color: var(--teal-text); border-color: #99F6E4; }
.chip-neutral { background: var(--bg); color: var(--text-2); border-color: var(--border-card); }

.delta {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.delta svg { flex: none; }
.delta-up   { background: var(--success-soft); color: var(--success); }
.delta-down { background: var(--danger-soft);  color: var(--danger); }
.delta-flat { background: var(--bg); color: var(--text-2); }

/* Person chip (form "applying to") */
.person-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 3px 12px 3px 4px;
  background: var(--teal-soft); border: 1px solid #99F6E4;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--teal-text);
}
.person-chip .avatar { width: 24px; height: 24px; font-size: 10px; }
.add-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px dashed var(--border-table); border-radius: 999px;
  color: var(--text-2); font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.add-chip:hover { border-color: var(--teal); color: var(--teal-text); }

/* ---------- KPI stat cards ---------- */
.kpi { gap: 8px; }
.kpi .kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .kpi-value {
  font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi .kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kpi .spark { color: var(--teal); opacity: .85; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border-card); border-radius: var(--radius-card); background: var(--surface); }
.card .table-scroll { border: 1px solid var(--border-card); border-radius: 8px; box-shadow: none; }
.data-table { width: 100%; min-width: 560px; font-size: 13.5px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #F9FAFB;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2);
  text-align: left;
  padding: 0 14px;
  height: 40px;
  border-bottom: 1px solid var(--border-table);
  white-space: nowrap;
}
.data-table tbody td {
  height: 44px; padding: 6px 14px;
  border-bottom: 1px solid var(--border-card);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #F9FAFB; }
.data-table .t-right { text-align: right; }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-person b { font-weight: 600; }
.cell-person small { display: block; color: var(--muted); font-size: 11.5px; }

/* Metric table (day detail) */
.metric-table { width: 100%; font-size: 13.5px; }
.metric-table th {
  text-align: left; font-weight: 500; color: var(--text-2);
  padding: 8px 0; border-bottom: 1px solid var(--border-card); white-space: nowrap;
}
.metric-table td {
  text-align: right; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 8px 0; border-bottom: 1px solid var(--border-card);
}
.metric-table tr:last-child th, .metric-table tr:last-child td { border-bottom: 0; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border-card);
  overflow-x: auto;
}
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-2); font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--teal-text); border-bottom-color: var(--teal); }
.tab .count {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--bg); border: 1px solid var(--border-card);
  border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums;
}
.tab[aria-selected="true"] .count { background: var(--teal-soft); border-color: #99F6E4; color: var(--teal-text); }
.tab-panel[hidden] { display: none; }

/* Segmented control */
.segmented {
  display: inline-flex; padding: 3px;
  background: var(--bg); border: 1px solid var(--border-card);
  border-radius: var(--radius-btn);
}
.segmented button {
  min-height: 32px; padding: 0 14px;
  border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] {
  background: var(--surface); color: var(--teal-text);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.req { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-table);
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.input::placeholder { color: var(--muted); }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 34px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.file-drop {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1px dashed var(--border-table);
  border-radius: var(--radius-btn);
  color: var(--text-2); font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-drop:hover { border-color: var(--teal); background: var(--teal-soft); }
.file-drop svg { color: var(--muted); flex: none; }

/* ---------- Notes / alerts ---------- */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--info-border);
  background: var(--info-soft);
  color: #1E3A8A; font-size: 13px;
}
.note svg { flex: none; margin-top: 1px; color: var(--info); }
.note .note-close { margin-left: auto; color: var(--info); cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; flex: none; }
.note .note-close:hover { background: rgb(29 78 216 / .1); }
.note-warning { border-color: var(--warning-border); background: var(--warning-soft); color: #78350F; }
.note-warning svg { color: var(--warning); }

/* ---------- Progress ---------- */
.progress {
  height: 6px; border-radius: 999px;
  background: #E5E7EB; overflow: hidden;
}
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.progress.warn > span { background: var(--warning); }

.ring { position: relative; width: 88px; height: 88px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------- Dashboard specifics ---------- */
.greeting { margin-bottom: 18px; }
.greeting h2 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.greeting .quote { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.greeting .quote i { color: var(--muted); font-style: normal; }
.greeting .date-chip { font-size: 12px; color: var(--muted); font-weight: 500; }

.clock {
  font-size: 34px; font-weight: 600; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.clock small { font-size: 14px; font-weight: 500; color: var(--muted); }

.shift-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.shift-line .sep-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-table); }

.list-rows { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-card);
  min-height: 44px;
}
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row b { font-weight: 600; font-size: 13.5px; display: block; }
.list-row small { color: var(--muted); font-size: 12px; }

.stat-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-tile {
  padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border-card);
  border-radius: 8px;
}
.stat-tile .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-tile .l { font-size: 11.5px; color: var(--text-2); font-weight: 500; }

.holiday-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-card); min-height: 44px; }
.holiday-row:last-child { border-bottom: 0; }
.date-badge {
  width: 42px; flex: none; text-align: center;
  border: 1px solid var(--border-card); border-radius: 8px;
  overflow: hidden; background: var(--surface);
}
.date-badge b { display: block; font-size: 15px; font-weight: 600; padding: 3px 0 4px; font-variant-numeric: tabular-nums; }
.date-badge span {
  display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: var(--teal-soft); color: var(--teal-text); padding: 2px 0;
}
.holiday-row .grow b { display: block; font-size: 13.5px; font-weight: 600; }
.holiday-row .grow small { color: var(--muted); font-size: 12px; }

.quick-list a {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 9px 10px; margin: 0 -10px;
  border-radius: 8px; color: var(--text);
  font-size: 13.5px; font-weight: 500;
  transition: background .15s ease;
}
.quick-list a:hover { background: var(--bg); text-decoration: none; }
.quick-list a svg { color: var(--teal-text); flex: none; }
.quick-list a .go { margin-left: auto; color: var(--muted); }

.balance-inline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.balance-inline .b {
  text-align: center; padding: 10px 6px;
  border: 1px solid var(--border-card); border-radius: 8px; background: var(--bg);
}
.balance-inline .b .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.balance-inline .b .l { font-size: 11px; color: var(--text-2); font-weight: 500; }

/* ---------- Calendars ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cal-month { font-size: 15px; font-weight: 600; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav .icon-btn { width: 32px; height: 32px; border: 1px solid var(--border-card); border-radius: 7px; }

.cal-scroll { overflow-x: auto; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr));
  border: 1px solid var(--border-table);
  border-radius: 8px; overflow: hidden;
  min-width: 640px;
  background: var(--border-card);
  gap: 1px;
}
.cal-dow {
  background: #F9FAFB;
  padding: 8px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2); text-align: right;
}
.cal-cell {
  background: var(--surface);
  min-height: 76px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 5px;
  font-variant-numeric: tabular-nums;
  transition: background .15s ease;
}
.cal-cell:hover { background: #F9FAFB; }
.cal-cell .d { font-size: 13px; font-weight: 600; text-align: right; }
.cal-cell.is-out { background: #FAFAFB; }
.cal-cell.is-out .d { color: var(--muted); font-weight: 400; }
.cal-cell .shift { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--teal); background: var(--teal-soft); }
.cal-cell.is-today .d { color: var(--teal-text); }

.code {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 5px;
  font-size: 11px; font-weight: 700;
  align-self: flex-start;
}
.code-p { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-border); }
.code-o { background: var(--bg); color: var(--text-2); border: 1px solid var(--border-card); }
.code-h { background: var(--warning-soft); color: var(--warning); border: 1px solid var(--warning-border); }
.code-t { background: var(--teal); color: #fff; border: 1px solid var(--teal); }

.cal-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cal-dot.holiday { background: var(--warning); }
.cal-dot.rh { background: var(--info); }
.cal-badge-n {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--info-soft); color: var(--info); border: 1px solid var(--info-border);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  align-self: flex-start;
}

.legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend .li { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }

/* Mini month cards (holiday calendar) */
.months-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.month-card h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.month-card h3 .cnt { font-size: 11.5px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.month-empty { color: var(--muted); font-size: 13px; padding: 10px 0 4px; display: flex; align-items: center; gap: 8px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border-card); border-radius: 2px;
}
.timeline-item { position: relative; padding: 2px 0 16px; }
.timeline-item:last-child { padding-bottom: 2px; }
.timeline-item::before {
  content: ""; position: absolute; left: -22px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--teal);
}

/* ---------- Definition grid (my-info) ---------- */
.def-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px; }
.def-grid .def dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.def-grid .def dd { font-size: 14px; font-weight: 500; }

.subnav { display: flex; gap: 2px; border-bottom: 1px solid var(--border-card); margin-bottom: 16px; overflow-x: auto; }

.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head .who h2 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.profile-head .who .meta { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.profile-head .who .meta .sep-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--border-table); margin: 2px 7px; vertical-align: middle; }
.profile-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.jump { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.jump a { font-weight: 600; }

/* ---------- Helpdesk / tickets ---------- */
.ticket {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.ticket + .ticket { border-top: 1px solid var(--border-card); }
.ticket .tid { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticket .tmain { flex: 1; min-width: 220px; }
.ticket .tmain b { display: block; font-size: 14px; font-weight: 600; }
.ticket .tmain small { color: var(--muted); font-size: 12px; }
.ticket .tmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card.flush { padding: 0; }
.card.flush .card-head { padding: 16px 16px 0; }

/* ---------- Engage feed ---------- */
.engage-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.rail-group { border-bottom: 1px solid var(--border-card); padding: 6px 0; }
.rail-group:last-child { border-bottom: 0; }
.rail-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 40px; font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.rail-toggle .chev { transition: transform .2s ease; color: var(--muted); }
.rail-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.rail-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 36px; padding: 6px 8px; margin: 0 -8px;
  border-radius: 7px; color: var(--text-2); font-size: 13px; font-weight: 500;
}
.rail-list a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.rail-list a.is-on { background: var(--teal-soft); color: var(--teal-text); font-weight: 600; }
.rail-list .cnt { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.post .post-head { display: flex; align-items: center; gap: 12px; }
.post .post-head .grow b { font-size: 13.5px; font-weight: 600; display: block; }
.post .post-head .grow small { color: var(--muted); font-size: 12px; }
.post .post-body { font-size: 14px; color: var(--text); }
.post .post-actions { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border-card); padding-top: 10px; }
.post-action {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 36px; padding: 0 12px;
  border-radius: 7px;
  color: var(--text-2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.post-action:hover { background: var(--bg); color: var(--teal-text); }
.post-action .cnt { font-variant-numeric: tabular-nums; }

.birthday-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 18px;
  background: linear-gradient(120deg, var(--teal-soft), #EFF6FF);
  border: 1px solid #99F6E4; border-radius: 8px;
}
.birthday-hero b { font-size: 15px; }

.kudos-hero {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  background: var(--warning-soft);
  border: 1px solid var(--warning-border); border-radius: 8px;
}
.kudos-hero svg { color: var(--warning); flex: none; }

.link-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 6px 14px;
  background: var(--bg); border: 1px solid var(--border-card); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--teal-text);
}
.link-chip:hover { border-color: var(--teal); text-decoration: none; background: var(--teal-soft); }

/* ---------- To-do secondary nav ---------- */
.todo-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 16px; align-items: start; }
.side-group-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  padding: 12px 8px 4px;
}
.side-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 38px; padding: 7px 10px;
  border-radius: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 500;
}
.side-list a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.side-list a.is-on { background: var(--teal-soft); color: var(--teal-text); font-weight: 600; }
.side-list .cnt {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--bg); border: 1px solid var(--border-card);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.side-list a.is-on .cnt { background: var(--surface); border-color: #99F6E4; }

.review-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px; flex-wrap: wrap; }
.review-item + .review-item { border-top: 1px solid var(--border-card); }
.review-item .grow { flex: 1; min-width: 240px; }
.review-item .grow b { font-size: 14px; font-weight: 600; }
.review-item .grow .meta { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.review-item .grow small { color: var(--muted); font-size: 12px; }
.review-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Empty state ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 20px; text-align: center;
}
.empty-state svg { color: var(--border-table); }
.empty-state b { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty-state p { font-size: 13px; color: var(--muted); max-width: 320px; }

/* ---------- Documents ---------- */
.doc-hero {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(110deg, #0B1220 0%, #10243E 60%, #134E4A 100%);
  color: #E2E8F0;
  border-radius: var(--radius-card);
  padding: 26px 28px;
  border: 1px solid #0B1220;
}
.doc-hero h2 { font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -.015em; }
.doc-hero p { margin-top: 6px; font-size: 13.5px; color: #B6C2D4; max-width: 520px; }
.doc-hero .art { margin-left: auto; flex: none; }

.doc-card { gap: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.doc-card:hover { border-color: var(--teal); box-shadow: 0 2px 8px rgb(13 148 136 / .1); }
.doc-ico {
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal-text);
}
.doc-card .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-card .v small { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.section-label { margin: 24px 0 12px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.section-label:first-child { margin-top: 0; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgb(11 18 32 / .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  transform: translateY(8px) scale(.98);
  transition: transform .2s ease;
  display: flex; flex-direction: column;
}
.modal-overlay.is-open .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-card);
}
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-card);
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
}

.prio-opt { display: inline-flex; align-items: center; gap: 8px; }
.prio-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.prio-high { background: #DC2626; }
.prio-med { background: #D97706; }
.prio-low { background: #16A34A; }

/* ---------- Scrim (mobile drawer) ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgb(11 18 32 / .5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .col-3 { grid-column: span 6; }
  .col-4 { grid-column: span 6; }
  .col-5 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 12; }
  .global-search { width: 220px; }
  .def-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.drawer-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .main { margin-left: 0; }
  .hamburger { display: inline-grid; }
  .avatar-meta { display: none; }
  .quicklinks span { display: none; }
  .quicklinks { width: 40px; padding: 0; justify-content: center; }
  .engage-layout, .todo-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .global-search { display: none; }
  .col-3, .col-4, .col-5, .col-6 { grid-column: span 12; }
  .form-row { grid-template-columns: 1fr; }
  .def-grid { grid-template-columns: 1fr; }
  .stat-duo { grid-template-columns: 1fr 1fr; }
  .crumbs { display: none; }
  .doc-hero .art { display: none; }
  .profile-head .actions { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
  .balance-inline { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .btn { padding: 0 13px; }
  .review-actions { width: 100%; }
}

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

/* ---------- Print-ish niceties ---------- */
::selection { background: #99F6E4; color: #0B1220; }
