
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #182033;
  --ink-soft: #596276;
  --muted: #8b94a6;
  --border: #e5e9f0;
  --border-strong: #d6dce6;
  --cyan: #218fd0;
  --cyan-dark: #176f9f;
  --cyan-soft: #eaf5fb;
  --purple: #a62b78;
  --purple-dark: #792057;
  --purple-soft: #f9edf5;
  --green: #087a55;
  --green-soft: #e9f7f1;
  --amber: #e86f00;
  --amber-soft: #fff1e2;
  --navy: #173581;
  --shadow-sm: 0 1px 2px rgba(28, 38, 61, 0.04), 0 5px 14px rgba(28, 38, 61, 0.04);
  --shadow-popover: 0 18px 55px rgba(31, 41, 66, 0.18);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.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;
}

.portal-root { min-height: 100vh; }

.portal-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: 260px;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: width 180ms ease, transform 220ms ease;
}

.brand-row {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 21px 14px;
  border-bottom: 1px solid #eef1f5;
}

.brand-link { display: flex; align-items: center; min-width: 0; gap: 13px; }
.brand-logo { width: 54px; height: 54px; object-fit: contain; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 14px; color: var(--navy); letter-spacing: 0.01em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }

.portal-nav { flex: 1; overflow-y: auto; padding: 20px 14px; }
.nav-section + .nav-section { margin-top: 26px; }
.nav-section > p { margin: 0 12px 9px; color: #99a2b2; font-size: 10px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }

.nav-item {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  margin: 3px 0;
  padding: 0 12px;
  border-radius: 10px;
  color: #5c6578;
  font-size: 13px;
  font-weight: 620;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-item:hover { background: #f6f8fb; color: var(--navy); }
.nav-item.is-active { background: var(--purple-soft); color: var(--purple-dark); }
.nav-item.is-active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: var(--purple); }
.nav-item em { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 999px; background: #eef1f6; color: #6f7889; font-size: 10px; font-style: normal; text-align: center; }
.nav-item.is-active em { background: #e6d5f5; color: var(--purple-dark); }

.sidebar-footer { padding: 10px 14px 16px; border-top: 1px solid #eef1f5; }
.security-note { display: flex; gap: 10px; margin: 9px 5px 12px; padding: 12px; border-radius: 11px; background: #f3f8f8; color: #39716d; }
.security-note svg { flex: 0 0 auto; margin-top: 1px; }
.security-note span { display: flex; min-width: 0; flex-direction: column; }
.security-note strong { font-size: 11px; }
.security-note small { margin-top: 3px; color: #72908e; font-size: 9px; white-space: nowrap; }
.compact-toggle { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.compact-toggle:hover { background: var(--surface-soft); color: var(--ink-soft); }

.portal-workspace { min-width: 0; margin-left: 260px; transition: margin-left 180ms ease; }
.portal-topbar { position: sticky; top: 0; z-index: 30; display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.96); backdrop-filter: blur(12px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 12px; }

.icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.mobile-menu, .mobile-close { display: none; }

.search-box { display: flex; width: min(430px, 35vw); height: 42px; align-items: center; gap: 10px; padding: 0 11px 0 13px; border: 1px solid var(--border); border-radius: 11px; background: #f8fafc; color: #8d96a8; }
.search-box:focus-within { border-color: #b79bd2; background: var(--surface); box-shadow: 0 0 0 3px rgba(124,47,192,0.08); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #9da5b4; }
.search-box kbd { padding: 3px 6px; border: 1px solid var(--border); border-bottom-color: #ced4df; border-radius: 5px; background: var(--surface); color: #8e96a5; font-size: 9px; box-shadow: 0 1px 0 #d8dde6; }

.popover-wrap, .create-wrap { position: relative; }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: var(--purple); }

.profile-chip { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 3px; }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--navy); color: white; font-size: 11px; font-weight: 750; letter-spacing: 0.03em; }
.profile-copy { display: flex; max-width: 165px; min-width: 0; flex-direction: column; line-height: 1.2; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { color: #30384a; font-size: 11px; }
.profile-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-chip > svg { color: var(--muted); }

.topbar-popover, .create-menu { position: absolute; z-index: 60; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-popover); animation: pop-in 150ms ease-out; }
.topbar-popover { top: 49px; right: 0; width: min(380px, calc(100vw - 28px)); }
.popover-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 12px; border-bottom: 1px solid #edf0f4; }
.popover-heading > div { display: flex; flex-direction: column; }
.popover-heading strong { font-size: 13px; }
.popover-heading span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.popover-heading button { border: 0; background: transparent; color: var(--purple); font-size: 10px; font-weight: 700; cursor: pointer; }
.notification-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #f0f2f5; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: #fafbfc; }
.notification-mark { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; }
.notification-item span:last-child { display: flex; min-width: 0; flex-direction: column; }
.notification-item strong { color: #343c4e; font-size: 11px; line-height: 1.4; }
.notification-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }

@keyframes pop-in { from { opacity: 0; transform: translateY(-5px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.portal-content { width: min(1500px, 100%); margin: 0 auto; padding: 34px 34px 24px; }
.welcome-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--purple); font-size: 10px; font-weight: 760; letter-spacing: 0.09em; text-transform: uppercase; }
.welcome-row h1 { margin: 0; color: #1d2537; font-size: clamp(25px, 2.5vw, 34px); font-weight: 680; letter-spacing: -0.035em; line-height: 1.1; }
.welcome-row > div > p:last-child { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; }

.primary-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--purple); border-radius: 10px; background: var(--purple); color: white; font-size: 11px; font-weight: 720; cursor: pointer; box-shadow: 0 6px 16px rgba(124,47,192,0.18); }
.primary-button:hover { border-color: var(--purple-dark); background: var(--purple-dark); }
.create-menu { top: 49px; right: 0; width: 300px; padding: 7px; }
.create-menu a { display: flex; align-items: center; gap: 12px; padding: 11px; border-radius: 10px; }
.create-menu a:hover { background: var(--surface-soft); }
.create-menu a > svg { color: var(--purple); }
.create-menu span { display: flex; min-width: 0; flex-direction: column; }
.create-menu strong { font-size: 11px; }
.create-menu small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 27px; }
.metric-card { display: flex; min-width: 0; align-items: flex-start; gap: 13px; padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.metric-copy { min-width: 0; }
.metric-copy > span { display: block; color: var(--ink-soft); font-size: 10px; font-weight: 620; }
.metric-copy > strong { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; color: #20283a; font-size: 24px; letter-spacing: -0.035em; line-height: 1; }
.metric-copy > strong small { color: var(--ink-soft); font-size: 10px; font-weight: 650; letter-spacing: 0; }
.metric-copy p { margin: 7px 0 0; color: var(--muted); font-size: 9px; }

.tone-purple { background: var(--purple-soft); color: var(--purple-dark); }
.tone-cyan { background: var(--cyan-soft); color: var(--cyan-dark); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-slate { background: #edf1f6; color: #556176; }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.notification-mark.tone-purple { background: var(--purple); }
.notification-mark.tone-cyan { background: var(--cyan); }
.notification-mark.tone-green { background: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr); gap: 16px; }
.dashboard-grid-top { margin-top: 16px; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 19px 14px; border-bottom: 1px solid #eef1f5; }
.panel-heading h2, .requests-heading h2 { margin: 0; color: #272f42; font-size: 13px; font-weight: 720; letter-spacing: -0.012em; }
.panel-heading p, .requests-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.panel-heading > a { display: inline-flex; align-items: center; gap: 5px; color: var(--purple); font-size: 9px; font-weight: 720; }

.approval-list { padding: 3px 0; }
.approval-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 69px; padding: 11px 18px; border-bottom: 1px solid #f0f2f5; }
.approval-item:last-child { border-bottom: 0; }
.approval-item:hover { background: #fbfbfd; }
.request-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #f1edf6; color: var(--purple); }
.approval-main, .approval-side { display: flex; min-width: 0; flex-direction: column; }
.approval-main strong { overflow: hidden; color: #30384a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.approval-main small, .approval-side small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.approval-side { align-items: flex-end; }
.soft-tag { padding: 4px 7px; border-radius: 6px; background: #f2f4f8; color: #657086; font-size: 8px; font-weight: 700; }
.approval-item > svg { color: #adb4c0; }
.dashboard-empty { display: flex; min-height: 170px; align-items: center; justify-content: center; gap: 11px; color: var(--green); }
.dashboard-empty > div { display: flex; flex-direction: column; }
.dashboard-empty strong { color: #465064; font-size: 10px; }
.dashboard-empty small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.quick-panel { display: flex; flex-direction: column; }
.quick-action-list { flex: 1; padding: 6px 12px; }
.quick-action { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 6px; border-bottom: 1px solid #f0f2f5; }
.quick-action:last-child { border-bottom: 0; }
.quick-action:hover strong { color: var(--purple); }
.quick-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; }
.quick-action > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.quick-action strong { color: #333b4d; font-size: 10px; }
.quick-action small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.quick-action > svg { color: #aab2c0; }
.all-services-link { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; border-top: 1px solid #eef1f5; color: var(--purple); font-size: 9px; font-weight: 720; }

.requests-panel { margin-top: 16px; overflow: hidden; }
.requests-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 19px; border-bottom: 1px solid #eef1f5; }
.requests-tools { display: flex; align-items: center; gap: 8px; }
.filter-tabs { display: flex; align-items: center; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: #f6f8fa; }
.filter-tabs button { min-height: 27px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #7b8495; font-size: 8px; font-weight: 680; cursor: pointer; }
.filter-tabs button.is-active { background: white; color: var(--purple); box-shadow: 0 1px 5px rgba(35,45,67,0.09); }
.secondary-button, .text-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; font-size: 9px; font-weight: 690; }
.secondary-button { padding: 0 10px; border: 1px solid var(--border); background: white; color: var(--ink-soft); cursor: pointer; }
.text-button { padding: 0 4px; color: var(--purple); }

.requests-table-wrap { overflow-x: auto; }
.requests-table { width: 100%; min-width: 850px; border-collapse: collapse; text-align: left; }
.requests-table th { padding: 10px 15px; border-bottom: 1px solid #eef1f5; background: #fafbfc; color: #8f97a7; font-size: 8px; font-weight: 720; letter-spacing: 0.04em; text-transform: uppercase; }
.requests-table td { height: 62px; padding: 10px 15px; border-bottom: 1px solid #f0f2f5; color: #5f687a; font-size: 9px; }
.requests-table tr:last-child td { border-bottom: 0; }
.requests-table tbody tr:hover { background: #fbfcfd; }
.requests-table td:first-child { width: 33%; }
.requests-table td:first-child a { display: flex; min-width: 0; flex-direction: column; }
.requests-table td:first-child strong { overflow: hidden; color: #30384a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.requests-table td:first-child small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.amount-cell { color: #31394b !important; font-weight: 680; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 720; white-space: nowrap; }
.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-warning { background: var(--amber-soft); color: var(--amber); }
.status-info { background: var(--cyan-soft); color: var(--cyan-dark); }
.status-success { background: var(--green-soft); color: var(--green); }
.status-purple { background: var(--purple-soft); color: var(--purple-dark); }
.table-menu { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #9ba3b1; cursor: pointer; }
.table-menu:hover { background: #eef1f5; color: #596276; }
.table-empty { padding: 24px; color: var(--muted); font-size: 9px; text-align: center; }

.portal-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 3px 0; color: #929aaa; font-size: 8px; }
.portal-footer span { display: inline-flex; align-items: center; gap: 6px; }

.sidebar-compact .portal-sidebar { width: 84px; }
.sidebar-compact .portal-workspace { margin-left: 84px; }
.sidebar-compact .brand-row { padding-inline: 13px; }
.sidebar-compact .brand-logo { width: 58px; height: 47px; object-fit: cover; object-position: left; }
.sidebar-compact .brand-copy, .sidebar-compact .nav-section > p, .sidebar-compact .nav-item span, .sidebar-compact .nav-item em, .sidebar-compact .security-note span, .sidebar-compact .compact-toggle span { display: none; }
.sidebar-compact .nav-item { justify-content: center; padding-inline: 0; }
.sidebar-compact .security-note { justify-content: center; padding: 11px 0; }
.sidebar-compact .compact-toggle { justify-content: center; padding-inline: 0; }

.sidebar-backdrop { display: none; }

@media (max-width: 1100px) {
  .profile-copy { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .portal-sidebar { transform: translateX(-102%); box-shadow: 20px 0 60px rgba(25,34,55,0.18); }
  .portal-sidebar.is-open { transform: translateX(0); }
  .portal-workspace, .sidebar-compact .portal-workspace { margin-left: 0; }
  .sidebar-compact .portal-sidebar { width: 260px; }
  .sidebar-compact .brand-copy, .sidebar-compact .nav-item span, .sidebar-compact .nav-item em, .sidebar-compact .security-note span { display: flex; }
  .sidebar-compact .nav-section > p { display: block; }
  .sidebar-compact .nav-item { justify-content: flex-start; padding-inline: 12px; }
  .sidebar-compact .brand-logo { width: 94px; height: 54px; object-fit: contain; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; display: block; border: 0; background: rgba(20,28,45,0.4); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  .sidebar-backdrop.is-visible { opacity: 1; pointer-events: auto; }
  .mobile-menu, .mobile-close { display: grid; }
  .compact-toggle { display: none; }
  .portal-topbar { height: 66px; padding: 0 18px; }
  .search-box { width: min(390px, 48vw); }
  .portal-content { padding: 27px 20px 22px; }
  .profile-chip > svg { display: none; }
  .requests-heading { align-items: flex-start; flex-direction: column; }
  .requests-tools { width: 100%; flex-wrap: wrap; }
  .text-button { margin-left: auto; }
}

@media (max-width: 570px) {
  .portal-topbar { padding-inline: 14px; }
  .search-box { width: 42px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .search-box input, .search-box kbd { display: none; }
  .profile-chip { padding-left: 0; }
  .avatar { width: 36px; height: 36px; }
  .welcome-row { align-items: stretch; flex-direction: column; }
  .welcome-row h1 { font-size: 26px; }
  .create-wrap, .primary-button { width: 100%; }
  .create-menu { left: 0; right: auto; width: 100%; }
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-card { padding: 15px; }
  .approval-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .approval-side { display: none; }
  .requests-tools .secondary-button { display: none; }
  .portal-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Shared inner pages */
.subpage-content { padding-top: 30px; }
.subpage-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.subpage-heading h1 { margin: 0; color: #1d2537; font-size: clamp(25px, 2.4vw, 34px); font-weight: 680; letter-spacing: -0.035em; line-height: 1.1; }
.subpage-heading > div:first-child > p:last-child { max-width: 720px; margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.subpage-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.subpage-actions .secondary-button { min-height: 40px; padding-inline: 13px; }

/* Forms and workflows */
.workflow-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); align-items: start; gap: 18px; }
.workflow-steps { position: sticky; top: 94px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workflow-steps > button { position: relative; display: flex; width: 100%; align-items: center; gap: 11px; padding: 13px 15px; border: 0; border-bottom: 1px solid #eff2f5; background: transparent; text-align: left; cursor: default; }
.workflow-steps > button.is-complete { cursor: pointer; }
.workflow-steps > button.is-active { background: var(--purple-soft); }
.workflow-steps > button.is-active::before { content: ""; position: absolute; inset: 9px auto 9px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--purple); }
.workflow-steps > button > span { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #f1f3f7; color: #768094; }
.workflow-steps > button.is-active > span { background: white; color: var(--purple); box-shadow: 0 2px 7px rgba(61,39,81,0.08); }
.workflow-steps > button.is-complete > span { background: var(--green-soft); color: var(--green); }
.workflow-steps > button > div { display: flex; min-width: 0; flex-direction: column; }
.workflow-steps strong { color: #394154; font-size: 10px; }
.workflow-steps small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.workflow-security { display: flex; gap: 9px; margin: 13px; padding: 12px; border-radius: 10px; background: #f2f7f7; color: #36706c; }
.workflow-security > svg { flex: 0 0 auto; margin-top: 2px; }
.workflow-security p { display: flex; margin: 0; flex-direction: column; }
.workflow-security strong { font-size: 9px; }
.workflow-security span { margin-top: 4px; color: #71908d; font-size: 8px; line-height: 1.45; }

.workflow-card { overflow: hidden; min-width: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workflow-card-heading { display: flex; min-height: 100px; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid #edf0f4; background: #fbfcfd; }
.workflow-card-heading h2 { margin: 0; color: #283043; font-size: 17px; letter-spacing: -0.025em; }
.workflow-card-heading > div:first-child > span { display: block; max-width: 650px; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.total-chip { min-width: 155px; padding: 11px 13px; border: 1px solid #e4d7ef; border-radius: 11px; background: var(--purple-soft); text-align: right; }
.total-chip small { display: block; color: #84659e; font-size: 8px; }
.total-chip strong { display: block; margin-top: 4px; color: var(--purple-dark); font-size: 13px; }

.form-error { margin: 16px 22px 0; padding: 11px 13px; border: 1px solid #f2c9bc; border-radius: 9px; background: #fff3ef; color: #a23c26; font-size: 9px; line-height: 1.45; }
.page-error { margin: 0 0 16px; }
.form-section { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.compact-grid { gap: 13px; }
.form-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.form-field.field-wide { grid-column: 1 / -1; }
.form-field > span { color: #525c70; font-size: 9px; font-weight: 710; }
.form-field > span i { margin-left: 3px; color: var(--purple); font-style: normal; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; outline: 0; background: white; color: #2f3749; font-size: 10px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.form-field textarea { min-height: 88px; padding-block: 11px; resize: vertical; line-height: 1.55; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #b691d5; box-shadow: 0 0 0 3px rgba(124,47,192,0.08); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #acb3bf; }
.input-with-icon, .textarea-with-icon { position: relative; }
.input-with-icon > svg, .textarea-with-icon > svg { position: absolute; z-index: 1; top: 12px; left: 12px; color: #929bab; }
.input-with-icon input { padding-left: 38px; }
.textarea-with-icon textarea { padding-left: 39px; }

.line-items { display: flex; flex-direction: column; gap: 13px; }
.line-item-card, .budget-item { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fcfdfe; }
.line-item-number, .budget-item-title { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 0 13px; border-bottom: 1px solid #edf0f4; background: #f7f9fb; }
.line-item-number > span, .budget-item-title > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: var(--purple-soft); color: var(--purple); font-size: 8px; font-weight: 780; }
.line-item-number strong, .budget-item-title strong { color: #4c5568; font-size: 9px; }
.line-item-number button { display: grid; width: 28px; height: 28px; margin-left: auto; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #a0a8b6; cursor: pointer; }
.line-item-number button:hover { background: #fff0ec; color: #b24c35; }
.line-item-card .form-grid, .budget-item .form-grid { padding: 15px; }
.item-total { display: flex; align-items: flex-end; justify-content: center; flex-direction: column; padding: 8px 11px; border: 1px solid #e2e7ed; border-radius: 9px; background: white; }
.item-total span { color: var(--muted); font-size: 8px; }
.item-total strong { margin-top: 4px; color: #343c4e; font-size: 11px; }
.add-row-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; margin-top: 13px; padding: 0 11px; border: 1px dashed #b8a1cc; border-radius: 9px; background: #fbf8fd; color: var(--purple); font-size: 9px; font-weight: 720; cursor: pointer; }
.add-row-button:hover { border-style: solid; background: var(--purple-soft); }

.budget-intro { display: flex; gap: 12px; margin-bottom: 15px; padding: 13px; border-radius: 11px; background: #f2f7f7; color: #3a706d; }
.budget-intro > div { min-width: 0; }
.budget-intro strong { font-size: 10px; }
.budget-intro p { margin: 4px 0 0; color: #73908e; font-size: 8px; line-height: 1.5; }
.budget-item + .budget-item { margin-top: 12px; }
.budget-item-title > div { display: flex; min-width: 0; flex-direction: column; }
.budget-item-title small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.review-block { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; }
.review-block h3 { margin: 0; padding: 11px 13px; border-bottom: 1px solid #edf0f4; background: #f8fafb; color: #465064; font-size: 10px; }
.review-block > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 13px; border-bottom: 1px solid #f0f2f5; }
.review-block > div:last-child { border-bottom: 0; }
.review-block span { color: var(--muted); font-size: 8px; }
.review-block strong { max-width: 65%; overflow: hidden; color: #3b4456; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.review-items { margin-top: 15px; border: 1px solid var(--border); border-radius: 11px; }
.review-items h3 { margin: 0; padding: 11px 13px; border-bottom: 1px solid #edf0f4; color: #465064; font-size: 10px; }
.review-items > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 13px; border-bottom: 1px solid #eff2f5; }
.review-items > div:last-child { border-bottom: 0; }
.review-items > div > span { display: flex; min-width: 0; flex-direction: column; }
.review-items strong { color: #394255; font-size: 9px; }
.review-items small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.review-items b { color: #3f485b; font-size: 9px; white-space: nowrap; }

.file-drop { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 15px; padding: 15px; border: 1px dashed #b9c1ce; border-radius: 11px; background: #fafbfc; color: #6a7487; cursor: pointer; }
.file-drop:hover { border-color: #a67dc7; background: #fcf9fd; color: var(--purple); }
.file-drop > span { display: flex; flex-direction: column; }
.file-drop strong { color: #465064; font-size: 9px; }
.file-drop small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.selected-files { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.selected-files > span { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; color: #4c5669; font-size: 8px; }
.selected-files small { color: var(--muted); }
.submission-note { display: flex; gap: 10px; margin-top: 15px; padding: 12px 13px; border: 1px solid #dce9e6; border-radius: 10px; background: #f4f9f7; color: #3c7065; }
.submission-note svg { flex: 0 0 auto; }
.submission-note p { margin: 0; font-size: 8px; line-height: 1.55; }

.workflow-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px; border-top: 1px solid #edf0f4; background: #fbfcfd; }
.workflow-footer.align-end { justify-content: flex-end; }
.workflow-footer .secondary-button { min-height: 40px; padding-inline: 13px; }
.workflow-footer button:disabled { opacity: 0.5; cursor: not-allowed; }
.back-button { background: white; }
.spin { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.request-success { display: flex; min-height: 460px; align-items: center; justify-content: center; padding: 55px 25px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-align: center; flex-direction: column; box-shadow: var(--shadow-sm); }
.success-icon { display: grid; width: 58px; height: 58px; margin-bottom: 18px; place-items: center; border-radius: 18px; background: var(--green-soft); color: var(--green); }
.request-success h2 { margin: 0; color: #273043; font-size: 22px; letter-spacing: -0.03em; }
.request-success > p:not(.eyebrow) { max-width: 560px; margin: 10px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.request-success > p strong { color: var(--purple); }
.success-actions { display: flex; align-items: center; gap: 9px; margin-top: 23px; }
.success-actions .secondary-button { min-height: 42px; padding-inline: 14px; }

/* Leave and logistics */
.service-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 18px; }
.leave-days-card { display: flex; min-width: 125px; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid #d8eee8; border-radius: 11px; background: var(--green-soft); color: var(--green); }
.leave-days-card span { display: flex; flex-direction: column; }
.leave-days-card small { font-size: 8px; }
.leave-days-card strong { margin-top: 2px; font-size: 17px; }
.section-divider { border-top: 1px solid #edf0f4; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-title-row h3 { margin: 0; color: #374054; font-size: 12px; }
.section-title-row p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.section-title-row .add-row-button { margin-top: 0; }
.coverage-list { display: flex; flex-direction: column; gap: 9px; }
.coverage-row { display: grid; grid-template-columns: 27px minmax(0, 1.5fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: #fcfdfe; }
.coverage-row > span { display: grid; width: 27px; height: 36px; place-items: center; border-radius: 8px; background: var(--purple-soft); color: var(--purple); font-size: 8px; font-weight: 750; }
.coverage-row label { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.coverage-row small { color: #687286; font-size: 8px; font-weight: 680; }
.coverage-row input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; outline: 0; font-size: 9px; }
.coverage-row input:focus { border-color: #b691d5; box-shadow: 0 0 0 3px rgba(124,47,192,0.08); }
.coverage-row > button { display: grid; width: 34px; height: 36px; place-items: center; border: 0; border-radius: 8px; background: #fff4f1; color: #aa543f; cursor: pointer; }

.balance-card, .trip-summary-card { position: sticky; top: 94px; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.balance-card h2, .trip-summary-card h2 { margin: 0; color: #30384b; font-size: 15px; letter-spacing: -0.02em; }
.balance-ring { display: grid; width: 150px; height: 150px; margin: 22px auto; place-items: center; border: 14px solid #e4f5ef; border-top-color: var(--green); border-right-color: var(--green); border-radius: 50%; transform: rotate(-35deg); }
.balance-ring > span { display: flex; align-items: center; justify-content: center; flex-direction: column; transform: rotate(35deg); }
.balance-ring strong { color: #243044; font-size: 30px; letter-spacing: -0.05em; }
.balance-ring small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.balance-stats { border-top: 1px solid #edf0f4; }
.balance-stats > div { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eff2f5; }
.balance-stats span { color: var(--muted); font-size: 8px; }
.balance-stats strong { color: #3d4659; font-size: 9px; }
.balance-note { margin: 14px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.large-form-icon, .summary-illustration { display: grid; width: 49px; height: 49px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--cyan-soft); color: var(--cyan-dark); }
.trip-summary-card .summary-illustration { margin-bottom: 17px; }
.trip-summary-card > div { padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.trip-summary-card > div > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.trip-summary-card > div strong { display: block; margin-top: 6px; color: #3b4457; font-size: 10px; }
.trip-summary-card > p:last-child { margin: 15px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }

/* Data lists */
.data-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.data-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid #edf0f4; }
.inline-search { display: flex; width: min(420px, 55vw); height: 38px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; color: #98a0af; }
.inline-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 9px; }
.request-page-tabs { margin-left: auto; }
.request-card-list { display: flex; flex-direction: column; }
.request-card-row { display: grid; grid-template-columns: auto minmax(0, 1.7fr) minmax(120px, 0.65fr) minmax(145px, 0.7fr) auto; align-items: center; gap: 14px; min-height: 76px; padding: 13px 17px; border-bottom: 1px solid #eff2f5; }
.request-card-row:last-child { border-bottom: 0; }
.request-card-row:hover { background: #fbfcfd; }
.request-type-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.type-purchase { background: var(--purple-soft); color: var(--purple); }
.type-leave { background: var(--cyan-soft); color: var(--cyan-dark); }
.type-logistics { background: var(--green-soft); color: var(--green); }
.request-card-main { min-width: 0; }
.request-card-main > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.request-card-main strong { overflow: hidden; color: #323a4d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.reference-text { padding: 4px 7px; border-radius: 6px; background: #f1f3f6; color: #737d8e; font-size: 7px; font-weight: 680; }
.request-card-main p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.request-card-value, .request-card-status { display: flex; min-width: 0; flex-direction: column; }
.request-card-value small, .request-card-status small { color: var(--muted); font-size: 8px; }
.request-card-value strong { margin-top: 5px; color: #3e475a; font-size: 10px; }
.request-card-status { align-items: flex-start; gap: 5px; }
.request-card-status small { text-transform: capitalize; }
.row-arrow { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: #9ba3b1; }
.row-arrow:hover { background: var(--purple-soft); color: var(--purple); }
.loading-state { display: flex; min-height: 320px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--border); border-radius: 15px; background: white; color: var(--muted); font-size: 10px; }
.empty-state { display: flex; min-height: 340px; align-items: center; justify-content: center; padding: 35px; text-align: center; flex-direction: column; }
.empty-state > span { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; background: var(--purple-soft); color: var(--purple); }
.empty-state h2 { margin: 15px 0 0; color: #343d50; font-size: 15px; }
.empty-state p { margin: 7px 0 18px; color: var(--muted); font-size: 9px; }

/* Approvals */
.approval-summary { display: grid; grid-template-columns: 180px 180px minmax(0, 1fr); gap: 13px; margin-bottom: 15px; }
.approval-summary > div { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.approval-summary p { display: flex; margin: 0; flex-direction: column; }
.approval-summary p strong { color: #30394c; font-size: 18px; }
.approval-summary p small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.approval-summary .approval-integrity { justify-content: flex-end; background: #f3f8f8; color: #3e716d; }
.approval-integrity p strong { color: #3e716d; font-size: 10px; }
.approval-queue-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px; }
.approval-queue-list > article { display: flex; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdfe; flex-direction: column; }
.approval-queue-top { display: flex; align-items: center; gap: 6px; }
.approval-queue-top > small { margin-left: auto; color: var(--muted); font-size: 7px; }
.type-pill, .urgent-pill { padding: 4px 7px; border-radius: 999px; font-size: 7px; font-weight: 720; text-transform: capitalize; }
.type-pill.type-purchase { background: var(--purple-soft); color: var(--purple); }
.type-pill.type-leave { background: var(--cyan-soft); color: var(--cyan-dark); }
.type-pill.type-logistics { background: var(--green-soft); color: var(--green); }
.urgent-pill { background: var(--amber-soft); color: var(--amber); }
.approval-queue-list h2 { margin: 14px 0 0; color: #333c4f; font-size: 12px; line-height: 1.4; }
.approval-queue-list > article > p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.approval-queue-list dl { display: flex; margin: 15px 0; padding: 12px 0; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; flex-direction: column; gap: 8px; }
.approval-queue-list dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.approval-queue-list dt { color: var(--muted); font-size: 8px; }
.approval-queue-list dd { margin: 0; overflow: hidden; color: #475064; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.approval-queue-list .primary-button { width: 100%; margin-top: auto; box-shadow: none; }
.decision-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; overflow-y: auto; padding: 25px; place-items: center; background: rgba(21,28,44,0.52); backdrop-filter: blur(3px); }
.decision-modal { width: min(540px, 100%); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: white; box-shadow: 0 25px 80px rgba(19,26,43,0.28); animation: pop-in 160ms ease-out; }
.decision-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid #edf0f4; background: #fbfcfd; }
.decision-heading h2 { margin: 0; color: #2d3649; font-size: 16px; }
.decision-heading > button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; background: #f1f3f6; color: #747e90; cursor: pointer; }
.decision-request { display: flex; padding: 16px 20px 0; flex-direction: column; }
.decision-request strong { color: #353e51; font-size: 11px; }
.decision-request span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.decision-modal > .form-field { padding: 16px 20px; }
.decision-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #edf0f4; background: #fbfcfd; }
.decision-actions button { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border-radius: 9px; font-size: 9px; font-weight: 710; cursor: pointer; }
.reject-button { border: 1px solid #efc9c0; background: #fff5f2; color: #ab472f; }
.return-button { border: 1px solid #eadbbf; background: #fff9ed; color: #9a640d; }
.approve-button { border: 1px solid var(--green); background: var(--green); color: white; }

/* Request details */
.request-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; align-items: start; gap: 17px; }
.request-detail-main, .request-detail-side { display: flex; min-width: 0; flex-direction: column; gap: 15px; }
.detail-overview-card, .detail-section-card, .detail-side-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.detail-overview-heading { display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #edf0f4; }
.detail-overview-heading > div { display: flex; min-width: 0; flex-direction: column; }
.detail-overview-heading p { margin: 0; color: var(--muted); font-size: 8px; }
.detail-overview-heading h2 { margin: 4px 0 0; color: #343d50; font-size: 13px; text-transform: capitalize; }
.detail-overview-heading .status-badge { margin-left: auto; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 16px 18px; gap: 16px; }
.detail-facts > div { display: flex; min-width: 0; flex-direction: column; }
.detail-facts dt { color: var(--muted); font-size: 8px; }
.detail-facts dd { margin: 5px 0 0; overflow: hidden; color: #424b5e; font-size: 9px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.detail-note { margin: 0 18px 17px; padding: 12px; border-radius: 9px; background: #f7f9fb; }
.detail-note strong { color: #515b6e; font-size: 8px; }
.detail-note p { margin: 5px 0 0; color: #697286; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }
.detail-section-title { display: flex; align-items: center; gap: 10px; padding: 15px 17px; border-bottom: 1px solid #edf0f4; color: var(--purple); }
.detail-section-title > div { display: flex; min-width: 0; flex-direction: column; }
.detail-section-title h2 { margin: 0; color: #394255; font-size: 11px; }
.detail-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.detail-items-table { overflow-x: auto; min-width: 0; }
.detail-item-header, .detail-item-row { display: grid; grid-template-columns: minmax(250px, 1fr) 65px 105px 105px; min-width: 600px; gap: 10px; padding: 10px 17px; }
.detail-item-header { border-bottom: 1px solid #edf0f4; background: #fafbfc; color: #929aaa; font-size: 7px; font-weight: 720; text-transform: uppercase; }
.detail-item-row { align-items: center; border-bottom: 1px solid #eff2f5; color: #535d70; font-size: 8px; }
.detail-item-row:last-child { border-bottom: 0; }
.detail-item-row > span:first-child { display: flex; min-width: 0; flex-direction: column; }
.detail-item-row strong { color: #394255; font-size: 9px; }
.detail-item-row small { margin-top: 3px; color: var(--muted); }
.detail-item-row em { margin-top: 4px; color: #837092; font-size: 7px; font-style: normal; }
.audit-list { padding: 6px 17px 12px; }
.audit-list > div { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eff2f5; }
.audit-list > div:last-child { border-bottom: 0; }
.audit-list > div > span { color: var(--purple); }
.audit-list p { display: flex; margin: 0; flex-direction: column; }
.audit-list strong { color: #465064; font-size: 8px; text-transform: capitalize; }
.audit-list small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.approval-timeline { margin: 0; padding: 14px 16px 17px; list-style: none; }
.approval-timeline li { position: relative; display: flex; gap: 11px; min-height: 58px; }
.approval-timeline li:not(:last-child)::after { content: ""; position: absolute; top: 26px; bottom: 0; left: 12px; width: 1px; background: #dfe4eb; }
.approval-timeline li > span { position: relative; z-index: 1; display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid #dce1e9; border-radius: 50%; background: white; color: #8a94a4; font-size: 8px; font-weight: 720; }
.approval-timeline li.approved > span { border-color: var(--green); background: var(--green); color: white; }
.approval-timeline li.pending > span { border-color: var(--purple); background: var(--purple-soft); color: var(--purple); }
.approval-timeline li > div { display: flex; padding-top: 2px; flex-direction: column; }
.approval-timeline strong { color: #40495c; font-size: 9px; }
.approval-timeline small { margin-top: 3px; color: var(--muted); font-size: 7px; text-transform: capitalize; }
.approval-timeline p { margin: 5px 0 0; color: #697286; font-size: 7px; line-height: 1.4; }
.attachment-list { padding: 7px 12px 12px; }
.attachment-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 5px; border-bottom: 1px solid #eff2f5; }
.attachment-list a:last-child { border-bottom: 0; }
.attachment-list a > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: #f1edf6; color: var(--purple); }
.attachment-list a > div { display: flex; min-width: 0; flex-direction: column; }
.attachment-list strong { overflow: hidden; color: #465064; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-list small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.attachment-list a > svg { color: #9ca4b2; }
.detail-empty-copy { margin: 0; padding: 20px 17px; color: var(--muted); font-size: 8px; }

/* Service overview */
.service-highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.service-highlight-grid article { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.service-highlight-grid article > span { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.service-highlight-grid article > div { display: flex; min-width: 0; flex-direction: column; }
.service-highlight-grid small { color: var(--muted); font-size: 8px; }
.service-highlight-grid strong { margin-top: 4px; color: #323b4e; font-size: 18px; letter-spacing: -0.03em; }
.service-highlight-grid p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.service-overview-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 15px; margin-top: 15px; }
.service-start-card, .workflow-overview-card { padding: 21px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.service-start-card h2, .workflow-overview-card h2 { margin: 0; color: #333c4f; font-size: 16px; letter-spacing: -0.025em; }
.service-start-card > p:not(.eyebrow) { margin: 10px 0 19px; color: var(--ink-soft); font-size: 9px; line-height: 1.65; }
.service-start-card .large-form-icon { margin-bottom: 18px; }
.workflow-overview-card ol { margin: 17px 0 0; padding: 0; list-style: none; }
.workflow-overview-card li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; min-height: 51px; }
.workflow-overview-card li:not(:last-child)::after { content: ""; position: absolute; top: 27px; bottom: 0; left: 12px; width: 1px; background: #dfe4eb; }
.workflow-overview-card li > span { z-index: 1; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 8px; font-weight: 720; }
.workflow-overview-card li > div { display: flex; padding-top: 2px; flex-direction: column; }
.workflow-overview-card strong { color: #424b5e; font-size: 9px; }
.workflow-overview-card small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.workflow-overview-card li > svg { margin-top: 4px; color: var(--green); }

/* People */
.people-summary { display: grid; grid-template-columns: 180px 180px minmax(0, 1fr); gap: 13px; margin-bottom: 15px; }
.people-summary article { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.people-summary article > div { display: flex; flex-direction: column; }
.people-summary small { color: var(--muted); font-size: 8px; }
.people-summary strong { margin-top: 3px; color: #333c4e; font-size: 17px; }
.people-summary .people-security { justify-content: flex-end; background: #f3f8f8; color: #3f726e; }
.people-security strong { color: #3f726e; font-size: 9px; }
.people-table-wrap { overflow-x: auto; }
.people-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.people-table th { padding: 10px 15px; border-bottom: 1px solid #edf0f4; background: #fafbfc; color: var(--muted); font-size: 7px; text-align: left; text-transform: uppercase; }
.people-table td { height: 63px; padding: 10px 15px; border-bottom: 1px solid #eff2f5; color: #596377; font-size: 8px; }
.people-table tr:last-child td { border-bottom: 0; }
.people-table td:first-child { display: flex; align-items: center; gap: 10px; }
.people-table td > div { display: flex; min-width: 0; flex-direction: column; }
.people-table td strong { color: #414a5d; font-size: 9px; }
.people-table td small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.mini-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--purple-soft); color: var(--purple); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.people-table select { min-height: 33px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: white; color: #596377; font-size: 8px; text-transform: capitalize; }
.access-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 0; border-radius: 999px; background: #f1f3f6; color: #7e8797; font-size: 7px; font-weight: 700; cursor: pointer; }
.access-toggle i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.access-toggle.is-active { background: var(--green-soft); color: var(--green); }
.employee-modal { width: min(620px, 100%); }
.employee-modal > .form-grid { padding: 18px 20px; }

/* Reports and settings */
.report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.report-metrics article { display: flex; gap: 11px; padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.report-metrics p { display: flex; min-width: 0; margin: 0; flex-direction: column; }
.report-metrics small { color: var(--muted); font-size: 8px; }
.report-metrics strong { margin-top: 4px; overflow: hidden; color: #333c4f; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.report-metrics em { margin-top: 5px; color: var(--muted); font-size: 7px; font-style: normal; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 15px; margin-top: 15px; }
.report-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.horizontal-bars { display: flex; padding: 18px; flex-direction: column; gap: 16px; }
.horizontal-bars > div { display: grid; grid-template-columns: auto 85px minmax(0, 1fr) 25px; align-items: center; gap: 10px; }
.horizontal-bars > div > strong { color: #4b5568; font-size: 8px; }
.horizontal-bars > div > div { overflow: hidden; height: 7px; border-radius: 999px; background: #eef1f5; }
.horizontal-bars > div > div > i { display: block; height: 100%; border-radius: 999px; background: var(--purple); }
.horizontal-bars > div:nth-child(2) > div > i { background: var(--cyan); }
.horizontal-bars > div:nth-child(3) > div > i { background: var(--green); }
.horizontal-bars b { color: #3f485b; font-size: 9px; text-align: right; }
.health-list { padding: 8px 17px 14px; }
.health-list > div { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #eff2f5; }
.health-list > div:last-child { border-bottom: 0; }
.health-list span { color: var(--muted); font-size: 8px; }
.health-list strong { color: #3c4558; font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px; }
.settings-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.settings-card-title { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid #edf0f4; }
.settings-card-title h2 { margin: 0; color: #394255; font-size: 11px; }
.settings-card-title p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.settings-list { margin: 0; padding: 7px 18px 14px; }
.settings-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #eff2f5; }
.settings-list > div:last-child { border-bottom: 0; }
.settings-list dt { color: var(--muted); font-size: 8px; }
.settings-list dd { margin: 0; max-width: 65%; overflow: hidden; color: #424b5e; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.role-chip { padding: 5px 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-size: 7px; }
.security-settings { padding: 7px 18px 12px; }
.security-settings > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eff2f5; color: var(--purple); }
.security-settings > div > p { display: flex; margin: 0; flex-direction: column; }
.security-settings strong { color: #424b5e; font-size: 8px; }
.security-settings small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.4; }
.signout-button { display: flex; min-height: 43px; align-items: center; justify-content: center; gap: 7px; border-top: 1px solid #edf0f4; background: #fbfcfd; color: #9b4c39; font-size: 9px; font-weight: 700; }
.services-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.services-directory > a { display: flex; min-height: 190px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); flex-direction: column; transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease; }
.services-directory > a:hover { transform: translateY(-2px); border-color: #cab6dc; box-shadow: 0 12px 30px rgba(31,41,66,0.09); }
.services-directory h2 { margin: 16px 0 0; color: #343d50; font-size: 13px; }
.services-directory p { margin: 7px 0 15px; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.services-directory strong { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; color: var(--purple); font-size: 9px; }
.personnel-security { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr); gap: 15px; margin-bottom: 15px; }
.personnel-security > div, .personnel-security > aside { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.personnel-security > div h2 { margin: 17px 0 0; color: #343d50; font-size: 15px; }
.personnel-security > div p { max-width: 650px; margin: 8px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.6; }
.personnel-security > aside { display: flex; align-items: center; gap: 12px; background: #f3f8f8; color: #3d706c; }
.personnel-security > aside p { display: flex; margin: 0; flex-direction: column; }
.personnel-security > aside strong { font-size: 9px; }
.personnel-security > aside small { margin-top: 5px; color: #71908d; font-size: 8px; line-height: 1.5; }
.personnel-documents .empty-state { min-height: 260px; }

@media (max-width: 1050px) {
  .workflow-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .service-form-layout, .request-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .balance-card, .trip-summary-card, .request-detail-side { position: static; }
  .balance-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
  .balance-card > .eyebrow, .balance-card > h2, .balance-note { grid-column: 1; }
  .balance-ring { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
  .balance-stats { grid-column: 3; grid-row: 1 / span 4; }
  .approval-queue-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .subpage-heading { align-items: flex-start; flex-direction: column; }
  .subpage-actions { width: 100%; }
  .subpage-actions > * { flex: 1; }
  .workflow-layout { grid-template-columns: minmax(0, 1fr); }
  .workflow-steps { position: static; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workflow-steps > button { min-width: 0; padding: 10px; border-right: 1px solid #eff2f5; border-bottom: 0; flex-direction: column; text-align: center; }
  .workflow-steps > button.is-active::before { inset: auto 10px 0; width: auto; height: 3px; }
  .workflow-steps > button > div { align-items: center; }
  .workflow-security { display: none; }
  .approval-summary, .people-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-summary > div:last-child, .people-summary article:last-child { grid-column: 1 / -1; justify-content: flex-start; }
  .service-overview-grid, .report-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .services-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personnel-security { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .form-grid, .review-grid { grid-template-columns: minmax(0, 1fr); }
  .form-field.field-wide { grid-column: auto; }
  .workflow-card-heading { align-items: flex-start; flex-direction: column; }
  .total-chip { width: 100%; text-align: left; }
  .coverage-row { grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; }
  .coverage-row label { grid-column: 2; }
  .coverage-row > button { grid-column: 3; grid-row: 1 / span 2; }
  .balance-card { display: block; }
  .balance-ring { margin: 20px auto; }
  .workflow-footer { align-items: stretch; flex-direction: column-reverse; }
  .workflow-footer .primary-button, .workflow-footer .secondary-button { width: 100%; }
  .request-card-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .request-card-value, .request-card-status { grid-column: 2; }
  .request-card-status { align-items: flex-start; }
  .row-arrow { grid-column: 3; grid-row: 1 / span 3; }
  .request-card-main > div { align-items: flex-start; flex-direction: column; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .inline-search { width: 100%; }
  .request-page-tabs { width: 100%; margin-left: 0; overflow-x: auto; }
  .request-page-tabs button { flex: 1; }
  .approval-queue-list { grid-template-columns: minmax(0, 1fr); }
  .approval-summary, .people-summary, .service-highlight-grid, .report-metrics { grid-template-columns: minmax(0, 1fr); }
  .approval-summary > div:last-child, .people-summary article:last-child { grid-column: auto; }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .services-directory { grid-template-columns: minmax(0, 1fr); }
  .success-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .success-actions > * { width: 100%; }
  .decision-actions { align-items: stretch; flex-wrap: wrap; }
  .decision-actions button { flex: 1; }
}

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: #f4f6f9; color: var(--ink); }
.auth-card { width: min(100%, 480px); overflow: hidden; border: 1px solid #dde3ea; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(28, 40, 66, 0.13); }
.auth-card-wide { width: min(100%, 760px); }
.auth-brand { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 26px; border-bottom: 1px solid #edf0f4; }
.auth-brand img { width: 130px; height: auto; object-fit: contain; }
.auth-brand span { color: #7a8497; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.auth-heading { display: flex; align-items: flex-start; gap: 14px; padding: 27px 28px 10px; }
.auth-heading > span { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 43px; border-radius: 12px; background: #f1eaf7; color: var(--purple); }
.auth-heading h1 { margin: 3px 0 0; color: #30394c; font-size: clamp(23px, 4vw, 31px); line-height: 1.15; }
.auth-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.auth-form { display: grid; gap: 17px; padding: 18px 28px 28px; }
.auth-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-form label { display: grid; gap: 7px; color: #4a5365; font-size: 11px; font-weight: 750; }
.auth-form label > small { color: #7f8999; font-size: 9px; font-weight: 500; line-height: 1.45; }
.auth-wide { grid-column: 1 / -1; }
.auth-input { min-height: 47px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid #dce2e9; border-radius: 10px; background: #fbfcfd; color: #8c96a7; transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease; }
.auth-input:focus-within { border-color: #8c5bb7; background: #fff; box-shadow: 0 0 0 3px rgba(125, 43, 187, .09); }
.auth-input input, .auth-input select { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #343d50; font: inherit; font-size: 12px; }
.auth-input button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: #778295; }
.auth-submit { min-height: 49px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; background: var(--purple); color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.auth-submit:hover:not(:disabled) { background: #6823a0; }
.auth-submit:disabled { cursor: wait; opacity: .7; }
.auth-card > footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 14px 20px; border-top: 1px solid #edf0f4; background: #fafbfc; color: #7f8999; font-size: 9px; text-align: center; }
.invitation-result { padding: 24px; text-align: center; }
.invitation-result > span { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto; border-radius: 15px; background: #edf8f4; color: #2d806a; }
.invitation-result h3 { margin: 14px 0 0; color: #343d50; font-size: 14px; }
.invitation-result p { margin: 7px auto 15px; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.invitation-result > div { display: flex; gap: 8px; padding: 8px; border: 1px solid #dfe5eb; border-radius: 10px; background: #f8fafb; }
.invitation-result input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #596477; font-size: 9px; }
.invitation-result button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 0; border-radius: 8px; background: #e8ddf1; color: var(--purple); font-size: 9px; font-weight: 800; }
.invitation-result small { display: block; margin-top: 10px; color: #8c95a5; font-size: 8px; }
.employee-access-actions { display: flex; align-items: flex-start; gap: 5px; flex-direction: column; }
.invite-reissue { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--purple); font-size: 7px; font-weight: 800; }
.signature-settings-card { grid-column: 1 / -1; }
.signature-manager { display: grid; gap: 14px; padding: 18px; }
.signature-loading, .signature-empty { display: flex; min-height: 96px; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 10px; }
.signature-empty { justify-content: flex-start; padding: 15px; border: 1px dashed #d8dfe7; border-radius: 8px; background: #fbfcfd; color: #7a8494; }
.signature-empty > div { display: grid; gap: 4px; }
.signature-empty strong { color: #424b5e; font-size: 10px; }
.signature-empty small { font-size: 8px; line-height: 1.45; }
.signature-preview { display: flex; min-height: 116px; align-items: center; gap: 18px; padding: 15px; border: 1px solid #dfe5eb; border-radius: 8px; background: #fff; }
.signature-preview img { width: min(260px, 44%); height: 82px; object-fit: contain; object-position: left center; }
.signature-preview > div { display: grid; gap: 6px; }
.signature-preview strong { display: flex; align-items: center; gap: 6px; color: #28735f; font-size: 10px; }
.signature-preview small, .signature-help { color: var(--muted); font-size: 8px; line-height: 1.5; }
.signature-actions { display: flex; align-items: center; gap: 10px; }
.signature-upload { position: relative; overflow: hidden; cursor: pointer; }
.signature-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.danger-text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #a44939; font-size: 9px; font-weight: 750; cursor: pointer; }
.signature-help { margin: -3px 0 0; }
.detail-facts-compact { padding-top: 8px; }
.coverage-summary { padding: 0 18px 17px; }
.coverage-summary h3 { margin: 0 0 9px; color: #414a5d; font-size: 10px; }
.coverage-summary > div { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-top: 1px solid #edf1f4; }
.coverage-summary > div > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 8px; font-weight: 800; }
.coverage-summary p { display: grid; gap: 3px; margin: 0; }
.coverage-summary strong { color: #414a5d; font-size: 9px; }
.coverage-summary small { color: var(--muted); font-size: 8px; }
.signed-indicator { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; color: #2d806a; font-size: 7px; font-style: normal; font-weight: 750; }

.print-request-page { width: min(100%, 960px); min-height: 100vh; margin: 0 auto; padding: 38px 42px; background: #fff; color: #273247; font-family: Arial, Helvetica, sans-serif; }
.print-controls { position: sticky; z-index: 2; top: 12px; display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 22px; }
.print-controls button { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid #d9e0e8; border-radius: 7px; background: #fff; color: #4a5568; font-size: 12px; font-weight: 750; cursor: pointer; box-shadow: 0 4px 15px rgba(31, 42, 61, .08); }
.print-controls .print-primary { border-color: #7d2bbb; background: #7d2bbb; color: #fff; }
.print-request-header { display: grid; grid-template-columns: 95px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding-bottom: 21px; border-bottom: 3px solid #7d2bbb; }
.print-request-header > img { width: 88px; height: 88px; object-fit: contain; }
.print-request-header p { margin: 0 0 5px; color: #7d2bbb; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.print-request-header h1 { margin: 0; color: #263148; font-size: 23px; line-height: 1.2; }
.print-request-header > div > span { display: block; margin-top: 7px; color: #697588; font-size: 12px; }
.print-request-header aside { display: grid; justify-items: end; gap: 4px; text-align: right; }
.print-request-header aside small { color: #7b8696; font-size: 9px; text-transform: uppercase; }
.print-request-header aside strong { color: #28735f; font-size: 13px; text-transform: capitalize; }
.print-request-header aside span { color: #8a94a3; font-size: 9px; }
.print-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 20px 0; overflow: hidden; border: 1px solid #dfe5eb; border-radius: 7px; background: #dfe5eb; }
.print-facts > div { display: grid; gap: 4px; padding: 12px; background: #f8fafc; }
.print-facts small, .print-data-grid small { color: #7c8797; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.print-facts strong, .print-data-grid strong { color: #344055; font-size: 10px; text-transform: capitalize; }
.print-facts span { color: #778294; font-size: 8px; overflow-wrap: anywhere; }
.print-section { margin-top: 18px; break-inside: avoid; }
.print-section > h2 { margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1px solid #cfd7e1; color: #324057; font-size: 13px; }
.print-long-copy { margin: 0; color: #4c586c; font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.print-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.print-data-grid > div { display: grid; gap: 4px; }
.print-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.print-table th { padding: 8px; border: 1px solid #dce2e9; background: #f1f4f7; color: #536075; text-align: left; }
.print-table td { padding: 8px; border: 1px solid #dce2e9; color: #465267; vertical-align: top; }
.print-table td small { display: block; margin-top: 3px; color: #7d8796; font-size: 8px; line-height: 1.4; }
.print-table tfoot td { background: #f7f9fb; font-weight: 800; }
.print-approvals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.print-approvals article { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; min-height: 145px; padding: 12px; border: 1px solid #dce2e9; border-radius: 7px; break-inside: avoid; }
.print-approvals article > div:first-child { display: flex; gap: 8px; }
.print-approvals article > div:first-child > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 50%; background: #eee6f4; color: #7d2bbb; font-size: 9px; font-weight: 800; }
.print-approvals article p { margin: 0; }
.print-approvals article p strong, .print-approvals article p small { display: block; }
.print-approvals article p strong { font-size: 9px; }
.print-approvals article p small { margin-top: 3px; color: #758092; font-size: 8px; }
.print-approval-actor { text-align: right; overflow-wrap: anywhere; font-size: 8px; }
.print-approval-pending { color: #8993a2; font-size: 8px; text-align: right; }
.print-approvals article > img, .print-signature-line { width: 100%; height: 53px; object-fit: contain; object-position: left center; align-self: end; }
.print-signature-line { display: flex; align-items: flex-end; border-bottom: 1px solid #aeb8c5; color: #7c8796; font-size: 7px; }
.print-approval-comment { align-self: end; padding: 7px; border-radius: 5px; background: #f5f7f9; color: #697487; font-size: 8px; line-height: 1.4; }
.print-file-list { margin: 0; padding: 0; list-style: none; }
.print-file-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e5e9ee; color: #4c586a; font-size: 9px; }
.print-file-list span, .print-muted { color: #818b9a; font-size: 8px; }
.print-request-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 10px; border-top: 1px solid #cfd7e1; color: #828c9b; font-size: 8px; }

.time-clock-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); gap: 18px; }
.time-clock-layout > .panel { padding: 20px; }
.time-clock-card { display: grid; align-content: start; gap: 18px; }
.time-clock-heading { display: flex; align-items: center; gap: 13px; }
.time-clock-heading > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--purple-soft); color: var(--purple); }
.time-clock-heading h2, .time-clock-heading p, .time-clock-heading small { margin: 0; }
.time-clock-heading small { color: var(--muted); }
.device-loading { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.device-register { display: grid; justify-items: center; gap: 10px; padding: 24px; border: 1px dashed #cdd6e1; border-radius: 13px; background: #fafbfc; text-align: center; }
.device-register h3, .device-register p { margin: 0; }
.device-register p { max-width: 480px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.device-register input { width: min(100%, 390px); }
.punch-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.punch-summary > span { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; }
.punch-summary small { color: var(--muted); font-size: 10px; }
.punch-summary strong { color: var(--ink); font-size: 17px; }
.punch-button { width: 100%; min-height: 88px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 0; border-radius: 14px; color: #fff; cursor: pointer; box-shadow: 0 10px 24px rgba(34, 72, 123, .16); }
.punch-button.punch-in { background: linear-gradient(135deg, #278268, #35a17f); }
.punch-button.punch-out { background: linear-gradient(135deg, #a3495e, #c65b6e); }
.punch-button span { display: grid; gap: 3px; text-align: left; }
.punch-button strong { font-size: 17px; }
.punch-button small { opacity: .86; font-size: 10px; }
.punch-history { display: grid; gap: 8px; }
.punch-history h3 { margin: 0 0 3px; font-size: 13px; }
.punch-history > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 11px; }
.punch-history time { color: var(--muted); }
.punch-dot { width: 8px; height: 8px; border-radius: 50%; background: #8692a4; }
.punch-dot.punch-in { background: #2d9172; }
.punch-dot.punch-out { background: #b64f64; }
.trusted-device-card { align-self: start; }
.trusted-device-list { display: grid; margin-top: 14px; }
.trusted-device-list article { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 34px; align-items: center; gap: 9px; padding: 12px 0; border-top: 1px solid var(--border); }
.trusted-device-list article > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #f1f4f8; color: #59667a; }
.trusted-device-list article > div { display: grid; gap: 3px; min-width: 0; }
.trusted-device-list strong { font-size: 11px; }
.trusted-device-list small { color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.trusted-device-list em { padding: 4px 7px; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 750; }
.trusted-device-list em.active { background: #e4f5ee; color: #27755f; }
.trusted-device-list em.revoked { background: #f2f3f5; color: #788393; }
.trusted-device-list button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #fff0f0; color: #a44949; cursor: pointer; }
.device-security-note { margin-top: 16px; }
.team-punch-card { grid-column: 1 / -1; }

@media (max-width: 780px) {
  .time-clock-layout { grid-template-columns: 1fr; }
  .time-clock-layout > .panel { padding: 15px; }
  .punch-button { min-height: 78px; }
  .team-punch-card { grid-column: auto; overflow: hidden; }
}

.onedrive-settings-card { min-height: 280px; }
.integration-success, .onedrive-connection > div, .onedrive-request-actions > p, .onedrive-connect, .onedrive-connection { display: flex; align-items: center; gap: 10px; }
.integration-success, .success-copy { color: #087f5b; }
.onedrive-connect, .onedrive-connection { align-items: flex-start; flex-direction: column; padding: 18px; border: 1px solid #dbe5f0; border-radius: 16px; background: #f8fbff; }
.onedrive-connect p, .onedrive-connection p { margin: 0; color: #5d6b7f; line-height: 1.55; }
.onedrive-connection > div { width: 100%; }
.onedrive-connection > div span { display: grid; flex: 1; }
.onedrive-connection > div small { color: #758398; }
.onedrive-connection > div em { padding: 4px 9px; border-radius: 999px; background: #dff7eb; color: #087f5b; font-size: 12px; font-style: normal; font-weight: 700; }
.onedrive-request-actions { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e7edf5; }
.onedrive-request-actions > p { margin: 0; font-weight: 700; }
.onedrive-request-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.onedrive-request-actions button, .onedrive-request-actions > a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 11px; border: 1px solid #d4deeb; border-radius: 10px; background: #fff; color: #24324a; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.onedrive-browser { width: min(680px, calc(100vw - 28px)); }
.onedrive-browser-path { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e5ebf3; }
.onedrive-browser-path button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #304967; font: inherit; cursor: pointer; }
.onedrive-file-list { display: grid; gap: 7px; max-height: min(52vh, 470px); padding: 12px 0; overflow: auto; }
.onedrive-file-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: 1px solid #e2e9f2; border-radius: 11px; background: #fff; color: #26364e; text-align: left; cursor: pointer; }
.onedrive-file-row:hover, .onedrive-file-row.is-selected { border-color: #6799cd; background: #f2f8ff; }
.onedrive-file-row span { display: grid; min-width: 0; }
.onedrive-file-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onedrive-file-row small { color: #7b8798; }

@media (max-width: 640px) {
  .onedrive-browser { width: calc(100vw - 18px); max-height: 92vh; }
  .onedrive-request-actions > div, .onedrive-request-actions button { width: 100%; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .print-request-page { width: auto; min-height: auto; padding: 0; }
  .print-controls { display: none !important; }
  .print-request-header { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .print-request-header > img { width: 65px; height: 65px; }
  .print-section, .print-approvals article, .print-table tr { break-inside: avoid; }
}

@media (max-width: 620px) {
  .auth-brand { align-items: flex-start; padding: 18px 20px; flex-direction: column; }
  .auth-heading { padding: 23px 20px 8px; }
  .auth-form, .auth-form-grid { grid-template-columns: minmax(0, 1fr); padding: 16px 20px 23px; }
  .auth-wide { grid-column: auto; }
}
/* V9 workbook interfaces */
.source-form-reference{margin:0 0 18px;padding:13px 15px;background:#f6f8fb;border:1px solid #dce3ec;border-radius:12px}.source-form-reference summary{cursor:pointer;font-weight:800;color:#174d95}.source-form-reference>div{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.source-form-reference figure{position:relative;margin:0;overflow:hidden;border-radius:10px;background:#fff;border:1px solid #dce3ec}.source-form-reference img{display:block;width:100%;height:180px;object-fit:cover}.source-form-reference figcaption{position:absolute;left:8px;bottom:8px;padding:5px 8px;border-radius:7px;background:#082d68;color:#fff;font-size:11px;font-weight:800}.source-form-reference p{margin:9px 0 0;color:#657180;font-size:12px}
.register-workbook,.tec-workspace{display:grid;gap:16px}.register-toolbar{display:flex;align-items:center;gap:10px;padding:12px;background:#fff;border:1px solid #e0e6ee;border-radius:14px}.register-search{display:flex;align-items:center;gap:8px;min-width:220px;flex:1;padding:9px 11px;background:#f5f7fa;border-radius:9px}.register-search input{width:100%;border:0;background:transparent;outline:0}.register-filters,.view-switch{display:flex;gap:7px}.register-filters select,.view-switch button{border:1px solid #d9e0e9;background:#fff;border-radius:9px;padding:9px 11px}.view-switch button{display:flex;align-items:center;gap:6px}.view-switch .is-active{background:#123f83;color:#fff;border-color:#123f83}.register-table-wrap{overflow:auto;background:#fff;border:1px solid #dbe2eb;border-radius:14px}.register-table{width:100%;min-width:1180px;border-collapse:separate;border-spacing:0;font-size:13px}.register-table th{position:sticky;top:0;padding:12px;text-align:left;background:#082d68;color:#fff;border-right:1px solid #284b80;white-space:nowrap}.register-table td{padding:12px;border-right:1px solid #e2e7ee;border-bottom:1px solid #e2e7ee;white-space:nowrap}.register-table tbody tr:nth-child(even){background:#f8fafc}.register-table a{font-weight:700;color:#1250a2}.register-table button{border:0;background:transparent;color:#1250a2;padding:0}.document-pill{display:inline-flex;padding:4px 8px;border-radius:99px;font-weight:800;font-size:11px;background:#dceaff;color:#124785}.document-pill.spr{background:#dcf4e8;color:#08794c}.status-cell{display:inline-flex;padding:5px 8px;border-radius:7px;background:#fff3cf}.register-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.register-cards article{padding:18px;background:#fff;border:1px solid #dfe5ed;border-radius:14px}.register-cards article>div{display:flex;justify-content:space-between}.register-cards dl{display:grid;grid-template-columns:1fr 1fr;gap:10px}.register-cards dt{font-size:11px;color:#6b7481}.register-cards dd{margin:2px 0;font-weight:700}.register-help{margin:0;color:#687384;font-size:12px}

.tec-period-tabs{display:flex;align-items:center;gap:8px}.tec-period-tabs button{border:1px solid #d8e0e9;background:#fff;border-radius:9px;padding:9px 14px}.tec-period-tabs .is-active{background:#123f83;border-color:#123f83;color:#fff}.tec-period-tabs span{margin-left:auto;color:#6d7786;font-size:12px}.tec-day-strip{display:flex;align-items:stretch;gap:10px;padding:12px;background:#fff;border:1px solid #dfe5ed;border-radius:14px;overflow:auto}.tec-day-strip>div{display:flex;align-items:center;gap:9px;min-width:180px}.tec-day-strip>div span{display:grid}.tec-day-strip small{color:#6b7481}.tec-day-strip button{display:grid;gap:2px;min-width:180px;padding:10px 12px;text-align:left;border:1px solid #dce3ed;border-radius:10px;background:#f8fafc}.tec-day-strip button b{color:#174d95}.tec-day-strip button em{font-style:normal;font-size:11px;color:#9b6400}.tec-schedule-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:14px;align-items:start}.schedule-tray{display:grid;gap:9px;padding:15px;background:#fff;border:1px solid #dfe5ed;border-radius:14px}.schedule-tray h2,.schedule-tray p{margin:0}.schedule-tray p{font-size:12px;color:#687384}.schedule-tray>button:not(.secondary-button){display:grid;gap:3px;padding:11px;text-align:left;background:#fff;border:1px solid #dce3eb;border-radius:10px;cursor:grab}.schedule-tray>button.coo{background:#e9f3ff;border-color:#8bb7ed}.schedule-tray>button.is-selected{outline:3px solid #f0af30}.schedule-tray>button span{font-size:10px;font-weight:800;color:#1954a0}.schedule-tray>button small{color:#6b7481}.schedule-sheet{overflow:auto;border:1px solid #dce3eb;border-radius:14px;background:#fff}.schedule-row{display:grid;grid-template-columns:80px repeat(5,minmax(145px,1fr));min-width:860px}.schedule-row>*{min-height:72px;padding:10px;border:0;border-right:1px solid #dce3eb;border-bottom:1px solid #dce3eb;background:#fff;text-align:left}.schedule-head>*{min-height:auto;background:#082d68;color:#fff;font-weight:800}.schedule-row>b{color:#617083}.schedule-row button{display:grid;gap:4px}.schedule-row button.class{border-left:4px solid #3f7cc5}.schedule-row button.coo{background:#e9f3ff;border-left:4px solid #1954a0}.schedule-row button.empty{color:#9aa3ae}.schedule-row button.can-place{background:#fff8df;box-shadow:inset 0 0 0 2px #edb02f}.coo-check-panel{display:grid;gap:13px;padding:18px;background:#eaf4ff;border:1px solid #9dc3ed;border-radius:14px}.coo-check-heading{display:flex;align-items:start;justify-content:space-between}.coo-check-heading p,.coo-check-heading h2{margin:0}.coo-check-heading span{padding:7px 10px;border-radius:99px;font-size:12px;font-weight:800}.coo-check-heading .waiting{background:#fff2cc;color:#815700}.coo-check-heading .complete{background:#d9f5e7;color:#087447}.coo-ticks{display:grid;grid-template-columns:1fr 1fr;gap:10px}.coo-ticks button{display:flex;align-items:center;gap:10px;padding:14px;background:#fff;border:1px solid #b9c9db;border-radius:12px}.coo-ticks button span{display:grid;place-items:center;width:28px;height:28px;border:2px solid #8c9aad;border-radius:7px}.coo-ticks button.is-checked{border-color:#0b8a58;background:#f2fff9}.coo-ticks button.is-checked span{border-color:#0b8a58;background:#0b8a58;color:#fff}.coo-check-panel label{display:grid;gap:6px;font-weight:700}.coo-check-panel textarea{min-height:78px;padding:10px;border:1px solid #b9c9db;border-radius:9px}.coo-actions{display:flex;justify-content:flex-end;gap:9px}.coo-check-panel>p{margin:0;color:#657180;font-size:12px}.tec-class-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tec-class-grid a{display:grid;gap:20px;padding:22px;background:#fff;border:1px solid #dfe5ed;border-radius:14px;color:inherit}.tec-class-grid a span{color:#1954a0;font-size:13px}

@media (max-width:900px){.register-toolbar{align-items:stretch;flex-wrap:wrap}.register-search{flex-basis:100%}.register-filters{flex:1}.register-filters select{min-width:0;flex:1}.tec-schedule-layout{grid-template-columns:1fr}.schedule-tray{grid-template-columns:1fr 1fr}.schedule-tray h2,.schedule-tray p{grid-column:1/-1}.schedule-tray .secondary-button{justify-content:center}.coo-ticks{grid-template-columns:1fr}.tec-class-grid{grid-template-columns:1fr 1fr}}
@media (max-width:600px){.register-filters{display:none}.register-cards{grid-template-columns:1fr}.register-table-wrap{display:none}.register-workbook:has(.view-switch button:first-child.is-active) .register-table-wrap{display:block}.register-workbook:has(.view-switch button:first-child.is-active) .register-help::after{content:" Use Cards for the best phone experience."}.tec-period-tabs{overflow:auto}.tec-period-tabs span{display:none}.tec-day-strip{scroll-snap-type:x mandatory}.tec-day-strip button{scroll-snap-align:start}.schedule-tray{grid-template-columns:1fr 1fr}.schedule-row{grid-template-columns:66px repeat(5,minmax(132px,1fr));min-width:726px}.coo-check-heading{display:grid;gap:8px}.coo-actions{display:grid}.tec-class-grid{grid-template-columns:1fr}}
@media print{.portal-sidebar,.portal-topbar,.subpage-heading,.register-toolbar,.portal-footer{display:none!important}.portal-workspace,.portal-content{margin:0!important;padding:0!important}.register-table-wrap{overflow:visible;border:0}.register-table{min-width:0;font-size:9px}.register-table th,.register-table td{padding:5px}.register-cards{display:none}}

/* Gate 7.4: direct TEC tools are rendered by React on every portal page. */
.tec-direct-panel{margin-top:16px;padding:18px}.tec-direct-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.tec-direct-heading h2,.tec-direct-heading p{margin:0}.tec-direct-heading h2{color:#272f42;font-size:14px}.tec-direct-heading p:last-child{margin-top:5px;color:var(--muted);font-size:9px}.tec-direct-heading>svg{color:var(--purple)}.tec-direct-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:14px}.tec-direct-grid>a{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:10px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:10px;background:#fff;color:#30384a}.tec-direct-grid>a:hover{border-color:#c9b5dd;background:#fcf9fd}.tec-direct-grid>a>span{grid-row:1/3;display:grid;width:36px;height:36px;place-items:center;border-radius:9px;background:var(--purple-soft);color:var(--purple)}.tec-direct-grid strong{font-size:10px}.tec-direct-grid small{margin-top:3px;color:var(--muted);font-size:8px;line-height:1.35}
@media(max-width:1200px){.tec-direct-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.tec-direct-grid{grid-template-columns:1fr}}

/* Gate 7.16: TEC-only inclusive school-period leave selector. */
.period-selector-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px;align-items:center}.period-selector-row strong{text-align:center;color:var(--muted)}.form-field>small{display:block;margin-top:7px;color:var(--muted);font-size:12px}

/* Gate 8 single-shell additions */
.profile-button{border:0;background:transparent;cursor:pointer;text-align:left}.appearance-trigger{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 12px;border:1px solid var(--line,#dce3ec);border-radius:10px;background:var(--surface,#fff);color:var(--navy,#0b2d61);font-weight:750;cursor:pointer}.topbar-popover{position:absolute;right:0;top:calc(100% + 10px);z-index:1000;min-width:240px;padding:8px;border:1px solid var(--line,#dce3ec);border-radius:12px;background:var(--surface,#fff);box-shadow:0 18px 45px rgba(15,35,70,.18)}.popover-wrap{position:relative}.topbar-popover a,.topbar-popover form button{display:flex;width:100%;min-height:42px;align-items:center;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--ink,#26324a);font:inherit;font-weight:700;text-decoration:none;cursor:pointer}.topbar-popover a:hover,.topbar-popover form button:hover{background:#f3f6fb}.popover-heading{padding:8px 12px;color:var(--navy,#0b2d61)}.appearance-modal-backdrop{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:18px;background:rgba(15,29,52,.52)}.appearance-modal{width:min(520px,100%);max-height:min(720px,92vh);overflow:auto;padding:22px;border-radius:18px;background:var(--surface,#fff);box-shadow:0 25px 70px rgba(0,0,0,.28)}.appearance-modal>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.appearance-modal h2{margin:0;color:var(--navy,#0b2d61)}.appearance-options{display:grid;gap:14px;margin-top:18px}.appearance-options>button,.appearance-options label{display:flex;align-items:center;gap:10px;min-height:48px;padding:12px;border:1px solid var(--line,#dce3ec);border-radius:12px;background:transparent;color:inherit;font:inherit}.appearance-options label{display:grid}.appearance-options input,.appearance-options select{width:100%}html[data-theme="dark"]{color-scheme:dark;--bg:#101827;--surface:#172235;--ink:#edf3ff;--muted:#a9b6ca;--line:#31405a;--navy:#b9d2ff}html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}html[data-theme="dark"] .portal-sidebar,html[data-theme="dark"] .portal-topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .appearance-modal{background:var(--surface);border-color:var(--line)}html[data-width="wide"] .portal-content{max-width:none}html[data-width="compact"] .portal-content{max-width:1100px;margin-inline:auto}
@media(max-width:720px){.appearance-trigger span,.profile-copy{display:none}.topbar-actions{gap:6px}.appearance-trigger{width:40px;padding:0;justify-content:center}.portal-topbar{padding-inline:10px}.search-box{display:none}.profile-chip{padding:3px}.topbar-popover{position:fixed;right:10px;top:68px;max-width:calc(100vw - 20px)}}

/* Gate 8.1 shared shell primitives used by React, Express and TEC. */
.portal-icon{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.portal-shell-button{border:0;background:transparent}
.portal-topbar .profile-button,.portal-topbar .appearance-trigger,.portal-topbar .notification-button{position:relative;z-index:1}
.portal-notification-list{max-height:360px;overflow:auto}
.portal-notification-empty{padding:22px 18px;color:var(--muted);font-size:11px;text-align:center}
.portal-notification-footer{display:flex;gap:8px;padding:10px;border-top:1px solid var(--border)}
.portal-notification-footer a{display:inline-flex;flex:1;min-height:36px;align-items:center;justify-content:center;border-radius:9px;background:var(--surface-soft);color:var(--navy);font-size:10px;font-weight:700}
.portal-notification-footer a:hover{background:var(--purple-soft);color:var(--purple-dark)}
.portal-notification-item{display:flex;gap:11px;padding:13px 16px;border-bottom:1px solid #eef1f5}
.portal-notification-item:hover{background:var(--surface-soft)}
.portal-notification-item .notification-mark{margin-top:4px}
.portal-notification-item>span:last-child{display:flex;min-width:0;flex-direction:column}
.portal-notification-item strong{overflow:hidden;color:#343c4e;font-size:11px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
.portal-notification-item small{margin-top:4px;color:var(--muted);font-size:9px}
.portal-account-menu a,.portal-account-menu form button{display:flex;width:100%;min-height:46px;align-items:center;gap:10px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:var(--ink);font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.portal-account-menu a:hover,.portal-account-menu form button:hover{background:var(--surface-soft)}
.portal-account-menu form{margin:0}
.portal-account-menu .portal-icon{color:var(--purple)}
.portal-shell-hidden{display:none!important}

/* Shared rich appearance dialog. */
.appearance-modal{width:min(720px,100%);max-height:min(86vh,780px);overflow:auto;padding:0;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 30px 90px rgba(20,28,45,.28)}
.appearance-modal>header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.96);backdrop-filter:blur(12px)}
.appearance-modal h2{margin:0;color:#263147;font-size:20px}
.appearance-modal .appearance-copy{margin:5px 0 0;color:var(--muted);font-size:10px}
.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:20px 22px}
.appearance-card{display:grid;gap:10px;padding:15px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft)}
.appearance-card.wide{grid-column:1/-1}
.appearance-card>span{color:#394255;font-size:11px;font-weight:760}
.appearance-card small{color:var(--muted);font-size:9px;line-height:1.45}
.appearance-card input[type=range]{width:100%}
.appearance-card input[type=color]{width:100%;height:44px;padding:4px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.appearance-card select{width:100%;min-height:42px;padding:0 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink)}
.appearance-segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.appearance-segmented button{min-height:40px;border:1px solid var(--border);border-radius:9px;background:var(--surface);font-size:10px;font-weight:700;cursor:pointer}
.appearance-segmented button.is-active{border-color:var(--purple);background:var(--purple-soft);color:var(--purple-dark)}
.appearance-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px 20px;border-top:1px solid var(--border)}
.appearance-actions button{min-height:40px;padding:0 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);font-size:10px;font-weight:720;cursor:pointer}
.appearance-actions .primary{border-color:var(--purple);background:var(--purple);color:#fff}

/* Appearance variables shared by all renderers. */
html{--portal-font-scale:1;--portal-density:1;--portal-content-max:1500px;--portal-accent:#a62b78;--portal-accent-dark:#792057;--portal-accent-soft:#f9edf5;--portal-sidebar-accent:#173581;font-size:calc(16px * var(--portal-font-scale))}
html body{font-family:var(--portal-font-family,Inter),ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html .portal-content{width:min(var(--portal-content-max),100%)}
html .nav-item.is-active{background:var(--portal-accent-soft);color:var(--portal-accent-dark)}
html .nav-item.is-active::before{background:var(--portal-accent)}
html .eyebrow,html .panel-heading>a,html .detail-section-title{color:var(--portal-accent)}
html .primary-button{border-color:var(--portal-accent);background:var(--portal-accent)}
html .avatar{background:var(--portal-sidebar-accent)}
html[data-density=compact] .portal-content{padding-top:24px}
html[data-density=compact] .panel,html[data-density=compact] .data-panel,html[data-density=compact] .metric-card{border-radius:11px}
html[data-theme=dark]{--bg:#101724;--surface:#172133;--surface-soft:#1d293d;--ink:#edf3ff;--ink-soft:#c2cce0;--muted:#98a7be;--border:#2d3c55;--border-strong:#3d4d68;--navy:#bdd0ff;color-scheme:dark}
html[data-theme=dark] .portal-topbar,html[data-theme=dark] .appearance-modal>header{background:rgba(23,33,51,.96)}
html[data-theme=dark] .profile-copy strong,html[data-theme=dark] .portal-notification-item strong,html[data-theme=dark] .appearance-modal h2,html[data-theme=dark] .appearance-card>span{color:var(--ink)}

/* Server-rendered pages use the same heading and component language as React pages. */
.legacy-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}
.legacy-page-heading h1{margin:0;color:#1d2537;font-size:clamp(25px,2.5vw,34px);font-weight:680;letter-spacing:-.035em;line-height:1.1}
.legacy-page-heading p:not(.eyebrow){margin:9px 0 0;color:var(--ink-soft);font-size:12px}
.legacy-page-actions{display:flex;flex-wrap:wrap;gap:8px}
.legacy-page-content{min-width:0}
.legacy-page-content .panel,.legacy-page-content .card,.legacy-page-content .auth-card,.legacy-page-content .stat,.legacy-page-content .feature-card,.legacy-page-content .class-card{border:1px solid var(--border)!important;border-radius:14px!important;background:var(--surface)!important;box-shadow:var(--shadow-sm)!important;color:var(--ink)!important}
.legacy-page-content .panel,.legacy-page-content .card,.legacy-page-content .auth-card{padding:18px!important}
.legacy-page-content h1,.legacy-page-content h2,.legacy-page-content h3{color:#313b4e}
.legacy-page-content .muted,.legacy-page-content small{color:var(--muted)}
.legacy-page-content input,.legacy-page-content select,.legacy-page-content textarea{min-height:42px;border:1px solid var(--border-strong)!important;border-radius:10px!important;background:var(--surface)!important;color:var(--ink)!important;font:inherit}
.legacy-page-content button,.legacy-page-content .button,.legacy-page-content .button-link{border-radius:10px!important;font-family:inherit}
.legacy-page-content .button.primary,.legacy-page-content button.primary,.legacy-page-content .primary-link{border-color:var(--portal-accent)!important;background:var(--portal-accent)!important;color:#fff!important}
.legacy-page-content .table-wrap,.legacy-page-content .register-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:13px;background:var(--surface)}
.legacy-page-content table{width:100%;border-collapse:collapse;background:var(--surface)}
.legacy-page-content th{background:#f8fafc!important;color:#737d8f!important;font-size:10px!important;font-weight:760!important;letter-spacing:.06em;text-transform:uppercase}
.legacy-page-content td{color:#4a5468}
.legacy-page-content th,.legacy-page-content td{padding:11px 12px!important;border-bottom:1px solid #edf0f4!important}
.legacy-page-content .notice,.legacy-page-content .flash.success{border:1px solid #b9e4d4;background:var(--green-soft);color:var(--green)}
.legacy-page-content .warning,.legacy-page-content .warning-box{border:1px solid #f0d7a7;background:#fff8e9;color:#8a5a08}

/* TEC page shell normalization. The TEC feature CSS remains, but not its old frame. */
.education-content{min-width:0}
.education-content>.gate73-page-tabs{position:sticky;top:72px;z-index:20;display:flex;gap:6px;overflow:auto;margin:-34px -34px 24px;padding:10px 34px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.96);backdrop-filter:blur(10px)}
.education-content>.gate73-page-tabs a{display:inline-flex;min-height:36px;align-items:center;padding:0 11px;border-radius:9px;color:var(--muted);font-size:10px;font-weight:720;white-space:nowrap}
.education-content>.gate73-page-tabs a:hover,.education-content>.gate73-page-tabs a.active{background:var(--purple-soft);color:var(--purple-dark);text-decoration:none}
.education-content .topbar,.education-content .sidebar,.education-content .app-shell{all:unset}
.education-content .main{all:unset;display:block}
.education-content .card,.education-content .stat,.education-content .feature-card,.education-content .class-card{border:1px solid var(--border)!important;border-radius:14px!important;background:var(--surface)!important;box-shadow:var(--shadow-sm)!important;color:var(--ink)!important}
.education-content .card{padding:18px!important}
.education-content .feature-card:hover{border-color:#cdb4df!important;transform:translateY(-1px)}
.education-content .stats-grid{gap:14px}
.education-content .stat strong{color:#293348;font-size:28px}
.education-content input,.education-content select,.education-content textarea{border:1px solid var(--border-strong)!important;border-radius:10px!important;background:var(--surface)!important;color:var(--ink)!important}
.education-content button,.education-content .button-link{border-radius:10px!important;font-family:inherit}
.education-content button.primary,.education-content .primary-link{background:var(--portal-accent)!important;color:#fff!important}

@media(max-width:900px){
 .appearance-grid{grid-template-columns:1fr}.appearance-card.wide{grid-column:auto}
 .legacy-page-heading{flex-direction:column}.legacy-page-actions{width:100%}.legacy-page-actions>*{flex:1 1 140px}
 .education-content>.gate73-page-tabs{top:64px;margin:-18px -12px 18px;padding:8px 12px}
}

/* Gate 8.1 final canonical component aliases. These deliberately sit last. */
:root{--line:var(--border);--red:#a23b2a}
.portal-icon{flex:0 0 auto}
.button,.button-link,.primary-link{
  display:inline-flex;min-height:40px;align-items:center;justify-content:center;gap:7px;
  padding:0 13px;border:1px solid var(--border);border-radius:10px;background:var(--surface);
  color:var(--ink-soft);font-size:10px;font-weight:720;text-decoration:none;cursor:pointer;
}
.button:hover,.button-link:hover{border-color:#cfd6e1;background:var(--surface-soft);color:var(--ink)}
.button.primary,button.primary,.primary-link{
  border-color:var(--portal-accent)!important;background:var(--portal-accent)!important;color:#fff!important;
  box-shadow:0 6px 16px color-mix(in srgb,var(--portal-accent) 18%,transparent);
}
.button.danger,button.danger{border-color:#efd0ca;background:#fff4f1;color:#9c3425}
.legacy-page-heading{align-items:flex-end}
.legacy-page-heading>div:first-child>p:last-child{max-width:720px;line-height:1.6}
.legacy-page-actions{align-items:center;flex:0 0 auto}
.legacy-page-actions>.button,.legacy-page-actions>.button-link,.legacy-page-actions>.primary-link{min-height:40px}
.legacy-page-content .panel-head,.legacy-page-content .section-head,.legacy-page-content .card-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:15px
}
.legacy-page-content .panel-head h2,.legacy-page-content .section-head h2,.legacy-page-content .card-head h2{margin:0;font-size:17px;font-weight:680;letter-spacing:-.015em}
.legacy-page-content .panel-head p,.legacy-page-content .section-head p,.legacy-page-content .card-head p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.55}
.legacy-page-content .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.legacy-page-content .field{display:grid;min-width:0;gap:6px}
.legacy-page-content .field.wide{grid-column:1/-1}
.legacy-page-content .field>span,.legacy-page-content label>span:first-child{color:#5e687a;font-size:9px;font-weight:760;letter-spacing:.045em;text-transform:uppercase}
.legacy-page-content .field small{color:var(--muted);font-size:9px;line-height:1.45}
.legacy-page-content input,.legacy-page-content select,.legacy-page-content textarea{width:100%;padding:10px 11px;outline:none}
.legacy-page-content input:focus,.legacy-page-content select:focus,.legacy-page-content textarea:focus{border-color:color-mix(in srgb,var(--portal-accent) 60%,var(--border))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--portal-accent) 10%,transparent)}
.legacy-page-content textarea{min-height:88px;resize:vertical}
.legacy-page-content .footer-actions,.legacy-page-content .footer,.legacy-page-content .form-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.legacy-page-content .metrics,.legacy-page-content .metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.legacy-page-content .metric{
  display:flex;min-height:104px;flex-direction:column;justify-content:center;gap:5px;padding:18px;
  border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-sm)
}
.legacy-page-content .metric strong{color:#2a3448;font-size:26px;font-weight:690;letter-spacing:-.035em}
.legacy-page-content .metric span{color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.045em}
.legacy-page-content .locked,.legacy-page-content .empty-box,.legacy-page-content .empty-state{
  padding:36px 24px;border:1px dashed var(--border-strong);border-radius:14px;background:var(--surface);color:var(--muted);text-align:center
}
.legacy-page-content .locked h2,.legacy-page-content .empty-box h2,.legacy-page-content .empty-state h2{margin:0 0 7px;color:var(--ink);font-size:17px}
.legacy-page-content .notice{margin-bottom:14px;padding:11px 13px;border-radius:10px;font-size:10px;font-weight:700}
.legacy-page-content .warning,.legacy-page-content .warning-box{padding:12px 13px;border-radius:10px}
.legacy-page-content .table,.legacy-page-content .requests-table,.legacy-page-content .register-table{min-width:760px}
.legacy-page-content .table tbody tr:hover,.legacy-page-content .requests-table tbody tr:hover,.legacy-page-content .register-table tbody tr:hover{background:var(--surface-soft)}
.legacy-page-content .status,.legacy-page-content .badge,.legacy-page-content .soft-tag{
  display:inline-flex;min-height:25px;align-items:center;padding:0 8px;border-radius:999px;background:var(--surface-soft);color:var(--ink-soft);font-size:9px;font-weight:720
}

/* Purchase form follows the same panel language while preserving its workflow. */
.purchase-request-page{min-width:0}
.purchase-request-page .workflow{align-items:start}
.purchase-request-page .steps,.purchase-request-page .panel{border-color:var(--border);background:var(--surface);box-shadow:var(--shadow-sm)}
.purchase-request-page .steps{top:88px}
.purchase-request-page .step-button.active{background:var(--portal-accent-soft);color:var(--portal-accent-dark)}
.purchase-request-page .step-button.active span{background:var(--portal-accent)}
.purchase-request-page .items-table th{background:#f8fafc!important;color:#737d8f!important}
.purchase-request-page .items-table td{background:var(--surface);color:var(--ink-soft)}
.purchase-request-page .total-box,.purchase-request-page .review article{background:var(--surface-soft)}
.purchase-request-page .items-view-switch button.active{background:var(--navy);color:#fff}
.purchase-request-page .grn-box{border-color:color-mix(in srgb,var(--portal-accent) 28%,var(--border));background:var(--portal-accent-soft)}

/* TEC content adopts the same visual cards and typography, not a second dashboard. */
.education-content .page-header,.education-content .top-actions{display:none!important}
.education-content .page-grid,.education-content .card-grid,.education-content .stats-grid{gap:14px}
.education-content h1,.education-content h2,.education-content h3{color:#313b4e}
.education-content table{background:var(--surface)}
.education-content th{background:#f8fafc!important;color:#737d8f!important}
.education-content td{color:#4a5468}

@media(max-width:1000px){
 .legacy-page-content .metrics,.legacy-page-content .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .legacy-page-content .grid{grid-template-columns:1fr}
 .legacy-page-content .field.wide{grid-column:auto}
}
@media(max-width:640px){
 .legacy-page-heading{align-items:stretch}
 .legacy-page-actions{display:grid;grid-template-columns:1fr}
 .legacy-page-actions>*{width:100%}
 .legacy-page-content .metrics,.legacy-page-content .metric-grid{grid-template-columns:1fr}
 .legacy-page-content .footer-actions,.legacy-page-content .footer,.legacy-page-content .form-actions{display:grid;grid-template-columns:1fr}
 .legacy-page-content .footer-actions>*,.legacy-page-content .footer>*,.legacy-page-content .form-actions>*{width:100%}
 .purchase-request-page .steps{position:static;display:flex;overflow:auto;padding:8px}
 .purchase-request-page .step-button{min-width:170px;white-space:nowrap}
}
@media print{
 .legacy-page-heading,.legacy-page-actions{display:none!important}
}
.notification-count{position:absolute;top:-4px;right:-5px;display:grid;min-width:17px;height:17px;place-items:center;padding:0 4px;border:2px solid var(--surface);border-radius:999px;background:var(--portal-accent);color:#fff;font-size:8px;font-weight:800;line-height:1}
.notification-button{position:relative}

/* Gate 8.1 visual parity corrections found by browser rendering. */
.panel-heading > a.primary-button,
.panel-heading > a.primary-link,
.panel-heading > a.button.primary {
  color: #fff !important;
  font-size: 10px !important;
}
.education-content > .gate73-page-tabs {
  position: sticky;
  top: 72px;
  z-index: 20;
  margin: 0 0 22px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-sm);
}
.education-content .page-head {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.education-content .page-head > div:first-child { display: none !important; }
.education-content .page-head .actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.education-content .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 0 0 18px !important;
}
.education-content .stat {
  display: flex !important;
  min-width: 0;
  min-height: 104px;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 18px !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm) !important;
}
.education-content .stat > span,
.education-content .stat > small {
  display: block;
  color: var(--muted) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .045em;
  line-height: 1.35;
  text-transform: uppercase;
}
.education-content .stat > strong {
  display: block;
  margin: 0 !important;
  color: #2a3448 !important;
  font-size: 26px !important;
  font-weight: 690 !important;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.education-content .card-grid,
.education-content .page-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px !important;
}
.education-content .card,
.education-content .feature-card,
.education-content .class-card {
  min-width: 0;
  padding: 18px !important;
}
.education-content .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
@media (max-width: 1000px) {
  .education-content .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  .education-content > .gate73-page-tabs {
    position: static;
    margin: 0 0 16px;
    overflow-x: auto;
  }
  .education-content .page-head { align-items: stretch; }
  .education-content .page-head .actions { display: grid !important; grid-template-columns: 1fr; width: 100%; }
  .education-content .page-head .actions > * { width: 100%; }
  .education-content .stats-grid,
  .education-content .card-grid,
  .education-content .page-grid { grid-template-columns: 1fr !important; }
}

/* Gate 8.1 purchase mobile legibility. No financial field may be clipped. */
@media (max-width: 640px) {
  .purchase-request-page .panel { padding: 18px !important; }
  .purchase-request-page .item-card { padding: 13px !important; overflow: hidden; }
  .purchase-request-page .item-card-grid { grid-template-columns: 1fr !important; }
  .purchase-request-page .item-card-grid .wide { grid-column: auto !important; }
  .purchase-request-page .discount-cell,
  .purchase-request-page .discount-editor,
  .purchase-request-page .overall-discount-editor { min-width: 0 !important; width: 100%; }
  .purchase-request-page .discount-editor,
  .purchase-request-page .overall-discount-editor { grid-template-columns: 1fr !important; }
  .purchase-request-page .discount-editor label,
  .purchase-request-page .overall-discount-editor label { min-width: 0; }
  .purchase-request-page .discount-editor input,
  .purchase-request-page .overall-discount-editor input { min-width: 0; width: 100%; }
  .purchase-request-page .discount-editor .remove-discount,
  .purchase-request-page .overall-discount-editor .remove-discount { grid-column: auto !important; width: 100%; }
  .purchase-request-page .financial-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .purchase-request-page .total-box { align-items: flex-start; flex-direction: column; gap: 10px; }
}
@media (max-width: 380px) {
  .purchase-request-page .financial-strip { grid-template-columns: 1fr !important; }
}

/* Gate 8.4: one behavior, appearance, date, and form contract for every renderer. */
[hidden]{display:none!important}
.portal-topbar .topbar-actions{isolation:isolate}
.portal-unified-profile{cursor:pointer;user-select:none}
.portal-unified-profile:focus-visible,.portal-unified-appearance:focus-visible,[data-portal-notifications]:focus-visible{outline:3px solid color-mix(in srgb,var(--portal-accent,#a62b78) 28%,transparent);outline-offset:2px}
.portal-unified-popover{position:fixed;z-index:10050;width:min(340px,calc(100vw - 20px));overflow:hidden;border:1px solid var(--border,#dce3ec);border-radius:14px;background:var(--surface,#fff);color:var(--ink,#26324a);box-shadow:0 22px 60px rgba(15,35,70,.24)}
.portal-unified-account{width:min(260px,calc(100vw - 20px));padding:8px}
.portal-unified-account a,.portal-unified-account form button{display:flex;width:100%;min-height:44px;align-items:center;gap:10px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:inherit;font:inherit;font-weight:750;text-decoration:none;cursor:pointer}
.portal-unified-account a:hover,.portal-unified-account form button:hover{background:var(--surface-soft,#f3f6fb)}
.portal-unified-heading{padding:15px 16px 12px;border-bottom:1px solid var(--border,#dce3ec)}
.portal-unified-heading strong,.portal-unified-heading span{display:block}.portal-unified-heading strong{color:var(--navy,#0b2d61);font-size:14px}.portal-unified-heading span{margin-top:2px;color:var(--muted,#6c7789);font-size:11px}
.portal-unified-notice-list{max-height:340px;overflow:auto;padding:6px}
.portal-unified-notice{display:grid;grid-template-columns:10px minmax(0,1fr);gap:10px;padding:11px;border-radius:10px;color:inherit;text-decoration:none}
.portal-unified-notice:hover{background:var(--surface-soft,#f3f6fb)}
.portal-unified-notice strong,.portal-unified-notice small{display:block}.portal-unified-notice strong{color:var(--ink,#26324a);font-size:12px}.portal-unified-notice small{margin-top:3px;color:var(--muted,#6c7789);font-size:10px;line-height:1.35}
.portal-unified-empty{padding:22px 16px;text-align:center;color:var(--muted,#6c7789);font-size:12px}
.portal-unified-footer{display:flex;justify-content:space-between;gap:8px;padding:10px 14px;border-top:1px solid var(--border,#dce3ec)}
.portal-unified-footer a{color:var(--portal-accent,#a62b78);font-size:11px;font-weight:800;text-decoration:none}
.portal-unified-modal-backdrop{z-index:10100}
.portal-unified-modal{width:min(760px,100%)}
[data-portal-shell="server"] [data-portal-account-menu],[data-portal-shell="server"] [data-portal-notification-menu]{display:none!important}
html[data-theme="dark"] body,html[data-theme="dark"] .portal-root{background:var(--bg,#101724);color:var(--ink,#edf3ff)}
html[data-theme="dark"] .portal-content,html[data-theme="dark"] .subpage-content{background:var(--bg,#101724)}
html[data-theme="dark"] .portal-sidebar,html[data-theme="dark"] .portal-topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .service-card,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .data-card,html[data-theme="dark"] .portal-unified-popover,html[data-theme="dark"] .appearance-modal,html[data-theme="dark"] .legacy-page-content>section,html[data-theme="dark"] .legacy-page-content>.card{background:var(--surface,#172133)!important;border-color:var(--border,#2d3c55)!important;color:var(--ink,#edf3ff)!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] button:not(.primary-button):not(.primary){border-color:var(--border,#2d3c55);color:var(--ink,#edf3ff)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--surface-soft,#1d293d)}
html[data-theme="dark"] .profile-chip,html[data-theme="dark"] .appearance-trigger,html[data-theme="dark"] .icon-button{background:transparent;color:var(--ink,#edf3ff)}
html[data-theme="dark"] .search-box{background:var(--surface-soft,#1d293d);border-color:var(--border,#2d3c55)}
html[data-theme="dark"] .search-box input{background:transparent}
html[data-theme="dark"] .nav-item:hover,html[data-theme="dark"] .portal-unified-account a:hover,html[data-theme="dark"] .portal-unified-account form button:hover,html[data-theme="dark"] .portal-unified-notice:hover{background:var(--surface-soft,#1d293d)}
@media(max-width:760px){.portal-unified-popover{width:min(330px,calc(100vw - 16px))}.portal-unified-appearance span{display:none}.portal-unified-appearance{width:40px;padding:0;justify-content:center}.portal-unified-modal{max-height:94vh}}

/* Gate 8.4: one date convention and one leave-period calculation across every renderer. */
.portal-date-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.portal-date-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.portal-date-display::placeholder { color: var(--muted, #6c7789); opacity: .78; }
.portal-date-display[aria-invalid="true"] { border-color: #c93452 !important; box-shadow: 0 0 0 3px rgba(201,52,82,.12); }
.portal-period-controls { display: grid; gap: 10px; }
.portal-period-controls > select { width: 100%; }
.portal-period-range { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border, #dce3ec); border-radius: 12px; background: var(--surface-soft, #f5f7fb); }
.portal-period-range > span { font-size: 12px; font-weight: 800; color: var(--ink, #26324a); }
.portal-period-range small { color: var(--muted, #6c7789); line-height: 1.5; }
.portal-period-range small strong { color: var(--portal-accent, #a62b78); font-size: 15px; }
html[data-theme="dark"] .portal-period-range { background: var(--surface-soft, #1d293d); border-color: var(--border, #2d3c55); }
select, select option { text-transform: none; }

/* Gate 8.5 calendar picker and responsiveness fixes. */
.portal-date-picker{position:relative;display:block;width:100%}
.portal-date-picker>.portal-date-display{width:100%;padding-right:46px!important}
.portal-date-button{position:absolute;right:7px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:34px;height:34px;padding:0!important;border:0!important;border-radius:8px;background:transparent!important;color:var(--portal-accent,#a62b78)!important;cursor:pointer;z-index:2}
.portal-date-button:hover{background:var(--surface-soft,#f3f6fb)!important}
.portal-date-button:focus-visible{outline:3px solid color-mix(in srgb,var(--portal-accent,#a62b78) 28%,transparent);outline-offset:1px}

/* Gate 9.0: canonical paginated data views */
.request-data-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(150px, .8fr)) minmax(120px, .55fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.request-data-toolbar .search-box { min-width: 0; }
.request-data-toolbar select,
.request-data-toolbar input { width: 100%; }
.request-results-summary,
.section-heading-row,
.portal-pagination,
.compact-limit-form {
  display: flex;
  align-items: center;
  gap: 12px;
}
.request-results-summary {
  justify-content: space-between;
  color: var(--portal-muted, #667085);
  font-size: .875rem;
  margin: 4px 0 12px;
}
.portal-pagination {
  justify-content: space-between;
  margin-top: 16px;
  min-height: 42px;
}
.pagination-end { color: var(--portal-muted, #667085); font-size: .875rem; }
.request-refresh-banner {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--portal-accent, #a62b78) 28%, transparent);
  border-radius: 12px;
  background: var(--portal-accent-soft, #faedf5);
}
.request-refresh-banner:not([hidden]) { display: flex; }
.request-refresh-banner button {
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  background: var(--portal-accent, #a62b78);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.section-heading-row { justify-content: space-between; flex-wrap: wrap; }
.compact-limit-form { margin-left: auto; }
.compact-limit-form label { display: flex; align-items: center; gap: 8px; color: var(--portal-muted, #667085); }
.compact-limit-form select { min-width: 78px; }

@media (max-width: 1180px) {
  .request-data-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .request-data-toolbar .search-box { grid-column: span 2; }
}
@media (max-width: 760px) {
  .request-data-toolbar { grid-template-columns: 1fr; }
  .request-data-toolbar .search-box { grid-column: auto; }
  .request-results-summary,
  .portal-pagination { align-items: flex-start; flex-direction: column; }
  .portal-pagination > * { width: 100%; text-align: center; }
  .request-refresh-banner { align-items: flex-start; flex-direction: column; }
}


/* V12 Express-only pages */
.auth-card{width:min(460px,calc(100vw - 32px));margin:7vh auto;background:var(--surface,#fff);border:1px solid var(--border,#dfe4ea);border-radius:24px;padding:28px;box-shadow:0 24px 70px rgba(15,23,42,.12)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:20px}.auth-brand img{width:52px;height:52px;object-fit:contain}.auth-brand div{display:grid}.auth-brand small{color:var(--muted,#64748b)}
.auth-card form,.form-panel form{display:grid;gap:16px}.auth-card .button{width:100%;justify-content:center}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.metric-card{display:flex;gap:14px;align-items:flex-start;padding:20px;border:1px solid var(--border,#e2e8f0);border-radius:18px;background:var(--surface,#fff)}.metric-card div{display:grid;gap:3px}.metric-card span,.metric-card small{color:var(--muted,#64748b)}.metric-card strong{font-size:1.7rem}
.content-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.8fr);gap:20px}.panel{background:var(--surface,#fff);border:1px solid var(--border,#e2e8f0);border-radius:20px;padding:22px;margin-bottom:20px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.panel h2{margin:0 0 6px}.panel p{color:var(--muted,#64748b)}
.request-list{display:grid}.request-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-top:1px solid var(--border,#e2e8f0);text-decoration:none;color:inherit}.request-row:first-child{border-top:0}.request-row>div{display:grid;gap:5px}.request-row>div:last-child{justify-items:end}.request-row span,.request-row small{color:var(--muted,#64748b)}
.quick-actions,.service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.quick-actions a,.service-card{display:flex;align-items:center;gap:10px;padding:15px;border:1px solid var(--border,#e2e8f0);border-radius:14px;text-decoration:none;color:inherit}.service-card{display:block;padding:22px}.service-card h2{margin-top:0}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid .button{align-self:end}.button-row{display:flex;gap:12px;flex-wrap:wrap}.detail-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-list div{padding:14px;border:1px solid var(--border,#e2e8f0);border-radius:14px}.detail-list dt{color:var(--muted,#64748b)}.detail-list dd{margin:5px 0 0;font-weight:700}
.table-wrap{overflow:auto}.table-wrap table{width:100%;border-collapse:collapse}.table-wrap th,.table-wrap td{padding:12px;text-align:left;border-bottom:1px solid var(--border,#e2e8f0)}.table-wrap td small{display:block;color:var(--muted,#64748b);margin-top:3px}.report-bars,.timeline{display:grid;gap:10px}.report-bars>div,.timeline>div{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--border,#e2e8f0);border-radius:12px}.timeline>div{display:grid}.education-module{min-width:0}.print-document{margin:0;padding:20px;background:#fff;color:#111}
@media(max-width:980px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid{grid-template-columns:1fr}}
@media(max-width:640px){.metric-grid,.quick-actions,.service-grid,.form-grid,.detail-list{grid-template-columns:1fr}.panel-heading,.request-row{align-items:flex-start;flex-direction:column}.request-row>div:last-child{justify-items:start}}

/* Microsoft OneDrive controls share the single portal runtime and shell. */
.onedrive-request-actions .actions{display:flex;flex-wrap:wrap;gap:8px}
.onedrive-request-actions [data-tone="success"]{color:var(--green,#18735a)}
.onedrive-request-actions [data-tone="error"]{color:#a33b2f}
.onedrive-browser{width:min(720px,100%)}
.onedrive-browser-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 22px;border-bottom:1px solid var(--border,#dce3ec)}
.onedrive-browser-toolbar span{overflow:hidden;color:var(--muted,#6c7789);font-size:12px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}
.onedrive-browser-message{padding:20px 22px;color:var(--muted,#6c7789);text-align:center}
.onedrive-file-list{display:grid;gap:8px;padding:16px 22px 22px}
.onedrive-file-row{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:12px;width:100%;padding:12px;border:1px solid var(--border,#dce3ec);border-radius:11px;background:var(--surface,#fff);color:var(--ink,#26324a);font:inherit;text-align:left;cursor:pointer}
.onedrive-file-row:hover{border-color:var(--portal-accent,#a62b78);background:var(--surface-soft,#f5f7fb)}
.onedrive-file-row:disabled{cursor:wait;opacity:.62}
.onedrive-file-row strong,.onedrive-file-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.onedrive-file-row strong{font-size:12px}.onedrive-file-row small{margin-top:3px;color:var(--muted,#6c7789);font-size:10px}
.onedrive-file-kind{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--portal-accent-soft,#f9edf5);color:var(--portal-accent,#a62b78);font-size:17px}
@media(max-width:600px){.onedrive-browser-toolbar{align-items:flex-start;flex-direction:column}.onedrive-file-list{padding-inline:14px}}


/* V12.1 visual polish: theme-correct native controls and restrained scrollbars. */
html {
  color-scheme: light;
  scrollbar-width: thin;
  scrollbar-color: #aeb9c9 #edf1f6;
}
body, .portal-nav, .table-wrap, .items-wrap, .appearance-modal, textarea, select {
  scrollbar-width: thin;
  scrollbar-color: #aeb9c9 #edf1f6;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: #edf1f6;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  min-width: 36px;
  min-height: 36px;
  border: 2px solid #edf1f6;
  border-radius: 999px;
  background: #aeb9c9;
}
*::-webkit-scrollbar-thumb:hover {
  background: #8796aa;
}
*::-webkit-scrollbar-corner {
  background: #edf1f6;
}
.portal-nav::-webkit-scrollbar {
  width: 8px;
}
.portal-nav::-webkit-scrollbar-track {
  margin-block: 8px;
  background: transparent;
}
.portal-nav::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  background-clip: padding-box;
}
input,
select,
textarea,
button {
  color-scheme: light;
  accent-color: var(--purple);
}
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: .58;
  cursor: pointer;
}
html[data-theme="dark"] {
  color-scheme: dark;
  scrollbar-color: #536178 #202b3e;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .portal-nav,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .items-wrap,
html[data-theme="dark"] .appearance-modal,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  scrollbar-color: #536178 #202b3e;
}
html[data-theme="dark"] *::-webkit-scrollbar-track,
html[data-theme="dark"] *::-webkit-scrollbar-corner {
  background: #202b3e;
}
html[data-theme="dark"] *::-webkit-scrollbar-thumb {
  border-color: #202b3e;
  background: #536178;
}
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
  background: #71809a;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] button {
  color-scheme: dark;
}
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .72;
}

/* V12.1 HR experience. */
.leave-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 20px;
  padding: 24px;
  border: 1px solid #dfe6f1;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 12%, rgba(33,143,208,.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #fdf7fb 100%);
  box-shadow: 0 16px 44px rgba(30,50,86,.08);
}
.leave-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -115px;
  width: 240px;
  height: 240px;
  border: 38px solid rgba(166,43,120,.07);
  border-radius: 50%;
}
.leave-hero-copy,
.leave-year-card {
  position: relative;
  z-index: 1;
}
.leave-hero-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}
.leave-hero-copy > span {
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.leave-hero-copy h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -.035em;
}
.leave-hero-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}
.leave-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 5px;
}
.leave-year-card {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 20px;
  border: 1px solid rgba(23,53,129,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
}
.leave-year-ring {
  --progress: 0;
  display: grid;
  width: 142px;
  height: 142px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--purple) calc(var(--progress) * 1%), #e8edf5 0);
  box-shadow: inset 0 0 0 1px rgba(23,53,129,.04);
}
.leave-year-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: white;
}
.leave-year-ring > span {
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--navy);
  text-align: center;
}
.leave-year-ring strong {
  font-size: 26px;
  line-height: 1;
}
.leave-year-ring small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}
.leave-year-card > small {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
}
.leave-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.leave-balance-card {
  --tone: var(--purple);
  --tone-soft: var(--purple-soft);
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--tone);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.leave-balance-card.tone-cyan-card { --tone: var(--cyan); --tone-soft: var(--cyan-soft); }
.leave-balance-card.tone-green-card { --tone: var(--green); --tone-soft: var(--green-soft); }
.leave-balance-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.leave-balance-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--tone-soft);
  color: var(--tone);
}
.leave-balance-head span {
  display: grid;
  gap: 3px;
}
.leave-balance-head strong {
  color: var(--ink);
  font-size: 12px;
}
.leave-balance-head small {
  color: var(--muted);
  font-size: 9px;
}
.leave-balance-number {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.leave-balance-number strong {
  color: var(--navy);
  font-size: 30px;
  letter-spacing: -.04em;
}
.leave-balance-number span {
  color: var(--muted);
  font-size: 10px;
}
.leave-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}
.leave-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone);
}
.hr-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(310px, .72fr);
  gap: 16px;
  margin-top: 16px;
}
.hr-quick-panel {
  display: grid;
  gap: 10px;
  padding: 17px;
}
.hr-quick-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.hr-quick-link:hover {
  transform: translateY(-1px);
  border-color: #b9c8dd;
  background: #fff;
}
.hr-quick-link > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--purple-soft);
  color: var(--purple);
}
.hr-quick-link > span:nth-child(2) {
  display: grid;
  gap: 3px;
}
.hr-quick-link strong {
  color: var(--ink);
  font-size: 11px;
}
.hr-quick-link small {
  color: var(--muted);
  font-size: 9px;
}
.workweek-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
}
.workweek-day {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f7faff);
  text-align: center;
}
.workweek-day strong {
  color: var(--navy);
  font-size: 11px;
}
.workweek-day span {
  margin-top: 5px;
  color: var(--green);
  font-size: 9px;
  font-weight: 750;
}
.calendar-event-list {
  display: grid;
  gap: 9px;
  padding: 0 17px 17px;
}
.calendar-event {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}
.calendar-event-date {
  display: grid;
  place-items: center;
  min-height: 50px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  text-align: center;
}
.calendar-event-date strong { font-size: 16px; line-height: 1; }
.calendar-event-date small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.calendar-event-copy {
  display: grid;
  gap: 3px;
}
.calendar-event-copy strong { font-size: 11px; }
.calendar-event-copy small { color: var(--muted); font-size: 9px; }
.day-type-badge {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}
.day-type-badge.type-working { background: var(--green-soft); color: var(--green); }
.day-type-badge.type-closure,
.day-type-badge.type-holiday { background: #fff0ef; color: #b33b32; }
.day-type-badge.type-shortened { background: var(--amber-soft); color: #ad5100; }
.working-days-layout {
  display: grid;
  grid-template-columns: minmax(340px, .72fr) minmax(0, 1.28fr);
  gap: 16px;
}
.working-day-form {
  display: grid;
  gap: 13px;
  padding: 18px;
}
.working-day-form .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.working-day-form .wide {
  grid-column: 1 / -1;
}
.working-days-list {
  display: grid;
  gap: 10px;
  padding: 17px;
}
.working-day-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}
.working-day-row time {
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}
.working-day-row > div {
  display: grid;
  gap: 4px;
}
.working-day-row strong { font-size: 11px; }
.working-day-row small { color: var(--muted); font-size: 9px; }

/* V12.1 reporting experience. */
.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
  gap: 18px;
  padding: 23px;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(23,53,129,.98), rgba(40,82,164,.94)),
    var(--navy);
  color: white;
  box-shadow: 0 18px 48px rgba(23,53,129,.16);
}
.report-hero h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -.035em;
}
.report-hero p {
  max-width: 700px;
  margin: 9px 0 0;
  color: rgba(255,255,255,.74);
  line-height: 1.6;
}
.report-hero-score {
  display: grid;
  align-content: center;
  justify-items: end;
  text-align: right;
}
.report-hero-score strong {
  font-size: 42px;
  letter-spacing: -.05em;
}
.report-hero-score span {
  color: rgba(255,255,255,.72);
  font-size: 10px;
}
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}
.report-summary-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.report-summary-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.report-summary-card strong {
  color: var(--navy);
  font-size: 26px;
  letter-spacing: -.04em;
}
.report-summary-card small {
  color: var(--muted);
  font-size: 9px;
}
.report-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr);
  gap: 16px;
  margin-top: 16px;
}
.report-chart-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.report-chart-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 13px;
  border-bottom: 1px solid var(--border);
}
.report-chart-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}
.report-chart-card header small {
  color: var(--muted);
  font-size: 8px;
}
.report-bar-list {
  display: grid;
  gap: 13px;
  padding: 18px;
}
.report-bar-row {
  display: grid;
  grid-template-columns: minmax(95px, .55fr) minmax(120px, 1fr) 34px;
  align-items: center;
  gap: 11px;
}
.report-bar-row > span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}
.report-bar-track > span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}
.report-bar-row strong {
  color: var(--navy);
  font-size: 11px;
  text-align: right;
}
.report-month-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.report-month-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
}
.report-month-row > span {
  color: var(--ink-soft);
  font-size: 9px;
}
.report-month-columns {
  display: flex;
  height: 54px;
  align-items: end;
  gap: 4px;
}
.report-month-columns i {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--purple), #c45d9d);
}
.report-month-row strong {
  color: var(--navy);
  font-size: 10px;
  text-align: right;
}

/* V12.1 attendance-machine maintenance state. */
.machine-maintenance {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  padding: 28px;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f5f9ff);
  box-shadow: 0 15px 42px rgba(28,47,80,.08);
}
.machine-maintenance-copy {
  display: grid;
  align-content: center;
  gap: 11px;
}
.machine-maintenance-copy > span {
  width: max-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #a24d00;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.machine-maintenance h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 35px);
  letter-spacing: -.04em;
}
.machine-maintenance p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}
.machine-illustration {
  display: grid;
  place-items: center;
  min-height: 235px;
  border: 1px solid #dce5f1;
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 35%, rgba(33,143,208,.18), transparent 34%),
    #fff;
}
.machine-device {
  position: relative;
  width: 142px;
  height: 174px;
  border: 8px solid #1d3156;
  border-radius: 22px;
  background: linear-gradient(180deg, #213c69, #122542);
  box-shadow: 0 22px 38px rgba(18,37,66,.2);
}
.machine-device::before {
  content: "";
  position: absolute;
  inset: 20px 18px auto;
  height: 62px;
  border-radius: 10px;
  background: linear-gradient(135deg, #86dcff, #2b8bc5);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.16);
}
.machine-device::after {
  content: "CONFIG";
  position: absolute;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  color: #f2f7ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.machine-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.machine-step {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}
.machine-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--cyan-soft);
  color: var(--cyan-dark);
  font-size: 10px;
  font-weight: 800;
}
.machine-step strong { font-size: 11px; }
.machine-step small { color: var(--muted); font-size: 9px; line-height: 1.5; }

/* V12.1 coordination templates can be reused to add several weekly COO sessions. */
.coordination-template-card {
  position: relative;
}
.coordination-template-card::after {
  content: "Reusable";
  justify-self: start;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f1e4ed;
  color: var(--purple-dark);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.coordination-template-card.is-selected::after {
  content: "Add another session";
}
.coordination-copy-hint {
  margin-top: 6px;
  color: var(--purple-dark);
  font-size: 8px;
  font-weight: 750;
}

html[data-theme="dark"] .leave-hero,
html[data-theme="dark"] .machine-maintenance,
html[data-theme="dark"] .workweek-day,
html[data-theme="dark"] .leave-year-card,
html[data-theme="dark"] .machine-illustration {
  border-color: var(--border);
  background: var(--surface-soft);
}
html[data-theme="dark"] .leave-year-ring::before {
  background: var(--surface);
}
html[data-theme="dark"] .hr-quick-link:hover {
  background: var(--surface);
}
html[data-theme="dark"] .leave-progress,
html[data-theme="dark"] .report-bar-track {
  background: #28364b;
}

@media (max-width: 1050px) {
  .leave-hero,
  .hr-overview-grid,
  .report-hero,
  .report-visual-grid,
  .machine-maintenance,
  .working-days-layout {
    grid-template-columns: 1fr;
  }
  .leave-year-card {
    min-height: 180px;
  }
  .report-hero-score {
    justify-items: start;
    text-align: left;
  }
}
@media (max-width: 760px) {
  .leave-balance-grid,
  .report-summary-grid,
  .machine-steps {
    grid-template-columns: 1fr;
  }
  .workweek-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calendar-event,
  .working-day-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .calendar-event > :last-child,
  .working-day-row > :last-child {
    grid-column: 2;
    justify-self: start;
  }
  .working-day-form .grid {
    grid-template-columns: 1fr;
  }
  .working-day-form .wide {
    grid-column: auto;
  }
}


/* V12.4 sidebar request launcher and integration settings. */
.new-request-launcher {
  margin: 12px 10px 4px;
  position: relative;
}
.new-request-launcher > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--border));
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 12%, var(--surface)), var(--surface));
  color: var(--purple-dark);
  font-weight: 850;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.new-request-launcher > summary::-webkit-details-marker { display: none; }
.new-request-launcher > summary .portal-icon:last-child { margin-left: auto; transition: transform .18s ease; }
.new-request-launcher[open] > summary .portal-icon:last-child { transform: rotate(180deg); }
.new-request-menu {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(17,39,72,.12);
}
.new-request-menu a {
  display: grid;
  grid-template-columns: 25px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  padding: 9px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
}
.new-request-menu a:hover { background: var(--surface-soft); }
.new-request-menu strong, .new-request-menu small { display: block; }
.new-request-menu strong { font-size: 11px; }
.new-request-menu small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.portal-root.is-compact .new-request-launcher { margin-inline: 7px; }
.portal-root.is-compact .new-request-launcher > summary { justify-content: center; padding-inline: 8px; }
.portal-root.is-compact .new-request-launcher > summary span,
.portal-root.is-compact .new-request-launcher > summary .portal-icon:last-child { display: none; }
.portal-root.is-compact .new-request-menu { position: absolute; z-index: 40; left: calc(100% + 8px); top: 0; width: 230px; margin: 0; }
.choice-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.choice-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--purple); }
.choice-row strong { font-size: 11px; }
.integration-setting-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.integration-status {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); color: var(--ink-soft);
}
.integration-status strong { color: var(--ink); }
.routing-option {
  display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 9px;
  padding: 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft);
}
.routing-option input { margin-top: 2px; accent-color: var(--purple); }
.routing-option span, .routing-option small { display: block; }
.routing-option span { font-weight: 800; }
.routing-option small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
@media(max-width:760px){ .integration-setting-grid { grid-template-columns:1fr; } }


/* V12.4 canonical UI contract: one theme, one spacing system, one responsive shell. */
:root{
  --danger:#a64032;--danger-soft:#fff1ed;--warning:#946000;--warning-soft:#fff6df;
  --page-pad-x:34px;--page-pad-y:30px;--card-pad:20px;--control-h:42px;
}
html[data-portal-preferences-ready="1"]{
  --purple:var(--portal-accent);--purple-dark:var(--portal-accent-dark);--purple-soft:var(--portal-accent-soft);
}
html[data-density="compact"]{--page-pad-y:22px;--card-pad:15px;--control-h:38px}
.portal-content{padding:var(--page-pad-y) var(--page-pad-x) 24px}
.panel,.legacy-page-content .panel{padding:var(--card-pad)!important}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"]):not([type="range"]),select,textarea,.button,.button-link,.primary-link,button{min-height:var(--control-h)}

/* Login is a single component. It no longer inherits page-form fragments. */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:clamp(18px,4vw,42px);background:radial-gradient(circle at 15% 12%,color-mix(in srgb,var(--portal-accent) 10%,transparent),transparent 28%),var(--bg);color:var(--ink)}
.auth-card{width:min(480px,100%);margin:0;padding:0;overflow:hidden;border:1px solid var(--border);border-radius:22px;background:var(--surface);color:var(--ink);box-shadow:0 26px 75px rgba(17,31,56,.14)}
.auth-card.auth-card-wide{width:min(760px,100%)}
.auth-card .auth-brand{display:flex;align-items:center;gap:12px;margin:0;padding:20px 24px;border-bottom:1px solid var(--border);background:var(--surface-soft)}
.auth-card .auth-brand img{width:54px;height:54px;object-fit:contain}.auth-card .auth-brand div{display:grid;gap:3px}.auth-card .auth-brand strong{color:var(--navy);font-size:14px}.auth-card .auth-brand small{color:var(--muted);font-size:10px}
.auth-card .auth-heading{padding:24px 26px 4px}.auth-card .auth-heading h1{margin:0;color:var(--ink);font-size:clamp(26px,5vw,34px);letter-spacing:-.035em}.auth-card .auth-heading p:not(.eyebrow){margin:8px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.55}
.auth-card .auth-form{display:grid;gap:16px;padding:18px 26px 28px}.auth-card .auth-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.auth-card .auth-wide{grid-column:1/-1}
.auth-field{display:grid;gap:7px;min-width:0}.auth-field>span{color:var(--ink-soft);font-size:10px;font-weight:800}.auth-input{display:flex;min-height:48px;align-items:center;padding:0 13px;border:1px solid var(--border-strong);border-radius:11px;background:var(--surface-soft);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.auth-input:focus-within{border-color:color-mix(in srgb,var(--portal-accent) 62%,var(--border));background:var(--surface);box-shadow:0 0 0 3px color-mix(in srgb,var(--portal-accent) 12%,transparent)}.auth-input input,.auth-input select{width:100%;min-width:0;min-height:0!important;padding:0!important;border:0!important;outline:0!important;background:transparent!important;color:var(--ink)!important;font:inherit;font-size:12px}.auth-input input::placeholder{color:var(--muted)}
.auth-submit{min-height:49px;border:1px solid var(--portal-accent);border-radius:11px;background:var(--portal-accent);color:#fff;font:inherit;font-size:12px;font-weight:850;cursor:pointer;box-shadow:0 8px 20px color-mix(in srgb,var(--portal-accent) 18%,transparent)}.auth-submit:hover{background:var(--portal-accent-dark)}.auth-message{margin:14px 26px 0;padding:11px 13px;border-radius:10px;font-size:11px}.auth-message.error{border:1px solid color-mix(in srgb,var(--danger) 30%,var(--border));background:var(--danger-soft);color:var(--danger)}.auth-help{padding:0 2px;color:var(--muted);font-size:10px;line-height:1.5}

/* Settings is one workspace with internal tabs instead of three sidebar entries. */
.settings-tabs{position:sticky;top:82px;z-index:18;display:flex;gap:6px;overflow-x:auto;margin:0 0 18px;padding:6px;border:1px solid var(--border);border-radius:13px;background:color-mix(in srgb,var(--surface) 96%,transparent);box-shadow:var(--shadow-sm);scrollbar-width:none}.settings-tabs::-webkit-scrollbar{display:none}.settings-tabs a{display:inline-flex;min-height:38px;align-items:center;justify-content:center;padding:0 13px;border-radius:9px;color:var(--ink-soft);font-size:10px;font-weight:800;white-space:nowrap}.settings-tabs a:hover{background:var(--surface-soft);color:var(--ink)}.settings-tabs a.is-active{background:var(--portal-accent-soft);color:var(--portal-accent-dark)}.settings-tab-panel{min-width:0}.settings-tab-panel>.panel:last-child{margin-bottom:0}.settings-notice{margin-bottom:14px}.settings-profile-card .profile-list{margin-top:0}
.settings-table{min-width:960px}.settings-table input,.settings-table select{min-width:120px}.settings-table td:first-child input{min-width:170px}

/* Leave form: period controls exist only for TEC School Period Leave. */
#leavePeriodForm .period-box{padding:14px;border:1px solid color-mix(in srgb,var(--portal-accent) 22%,var(--border));border-radius:12px;background:var(--surface-soft)}
#leavePeriodForm .period-grid select:required:invalid{color:var(--muted)}
#leavePeriodForm .period-grid{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
#leavePeriodForm .period-grid>span{color:var(--muted);font-size:10px;font-weight:800;text-align:center}
#leavePeriodForm #periodCount strong{color:var(--portal-accent)}
#leavePeriodForm .leave-route{background:var(--surface-soft)!important}
#leavePeriodForm .leave-route span{background:var(--portal-accent-soft)!important;color:var(--portal-accent-dark)!important}

/* Theme contract: all normal screen content follows the same surface/text tokens. */
.welcome-row h1,.subpage-heading h1,.legacy-page-heading h1,.panel-heading h2,.requests-heading h2,.metric-copy>strong,.approval-main strong,.quick-action strong,.requests-table td:first-child strong,.amount-cell,.workflow-card-heading h2,.form-field>span,.legacy-page-content .field>span,.legacy-page-content label>span:first-child,.legacy-page-content h1,.legacy-page-content h2,.legacy-page-content h3,.legacy-page-content .metric strong,.education-content h1,.education-content h2,.education-content h3,.education-content .stat>strong,.tec-direct-heading h2,.profile-copy strong,.portal-notification-item strong{color:var(--ink)!important}
.requests-table td,.legacy-page-content td,.education-content td,.form-field input,.form-field select,.form-field textarea{color:var(--ink-soft)!important}
.requests-table th,.legacy-page-content th,.education-content th,.purchase-request-page .items-table th{background:var(--surface-soft)!important;color:var(--muted)!important;border-color:var(--border)!important}
.requests-table tbody tr:hover,.approval-item:hover,.quick-action:hover,.notification-item:hover{background:var(--surface-soft)!important}
.form-field input,.form-field select,.form-field textarea,.item-total,.tec-direct-grid>a,.register-toolbar,.register-table-wrap,.register-filters select,.view-switch button,.register-cards article,.schedule-sheet,.schedule-row>*{background:var(--surface)!important;border-color:var(--border)!important;color:var(--ink)!important}
.line-item-card,.budget-item,.line-item-number,.budget-item-title,.review-block h3,.review-block>div,.note,.report-follow-up,.department-banner,.items-head,.device-register,.punch-summary>span,.trusted-device-list article>span,.onedrive-connect,.onedrive-connection,.onedrive-file-row,.source-form-reference,.source-form-reference figure,.workweek-day,.machine-illustration,.leave-year-card{background:var(--surface-soft)!important;border-color:var(--border)!important;color:var(--ink)!important}
html[data-theme="dark"] .legacy-page-content .warning,html[data-theme="dark"] .legacy-page-content .warning-box,html[data-theme="dark"] .form-error,html[data-theme="dark"] .warning-note,html[data-theme="dark"] .warning-row{background:color-mix(in srgb,var(--danger) 14%,var(--surface))!important;color:#ffb6a8!important;border-color:color-mix(in srgb,var(--danger) 38%,var(--border))!important}
html[data-theme="dark"] .leave-hero,html[data-theme="dark"] .machine-maintenance{background:linear-gradient(135deg,var(--surface),var(--surface-soft))!important}
html[data-theme="dark"] .report-hero{background:linear-gradient(120deg,#152d61,#223f78)!important}
html[data-theme="dark"] .search-box kbd{background:var(--surface-soft);border-color:var(--border);box-shadow:none;color:var(--muted)}
html[data-theme="dark"] .status,html[data-theme="dark"] .soft-tag{border-color:var(--border)}

/* Responsive contract: no shell overlap and no form/control overflow. */
.portal-workspace,.portal-content,.legacy-page-content,.education-content,.panel,.settings-tab-panel{min-width:0}
img,svg,canvas,video{max-width:100%}
input,select,textarea,button{max-width:100%}
.table-wrap,.register-table-wrap,.items-table,.schedule-sheet{max-width:100%;overscroll-behavior-x:contain}
@media(max-width:1100px){:root{--page-pad-x:24px}.subpage-heading{align-items:flex-start;flex-direction:column}.subpage-actions{width:100%;flex-wrap:wrap}.subpage-actions>*{flex:0 1 auto}.topbar-left{min-width:0;flex:1}.search-box{max-width:100%}}
@media(max-width:820px){:root{--page-pad-x:18px;--page-pad-y:22px}.settings-tabs{top:74px}.portal-topbar{gap:10px}.topbar-actions{gap:7px}.appearance-trigger{padding-inline:10px}.portal-sidebar{width:min(300px,88vw)}.new-request-menu{box-shadow:none}.legacy-page-content .grid,.form-grid{grid-template-columns:1fr!important}.legacy-page-content .field.wide,.auth-wide{grid-column:auto}}
@media(max-width:620px){:root{--page-pad-x:13px;--page-pad-y:18px;--card-pad:15px}.portal-content{padding-bottom:18px}.subpage-heading{gap:13px;margin-bottom:16px}.subpage-actions{display:grid;grid-template-columns:1fr}.subpage-actions>*{width:100%}.panel{border-radius:15px}.auth-card .auth-form-grid{grid-template-columns:1fr}.auth-card .auth-heading,.auth-card .auth-form{padding-inline:20px}.auth-card .auth-brand{padding-inline:20px}.settings-tabs{margin-inline:-2px}.settings-tabs a{min-height:36px;padding-inline:11px}.profile-list{grid-template-columns:1fr!important}.integration-setting-grid{grid-template-columns:1fr}.period-grid,#leavePeriodForm .period-grid{grid-template-columns:1fr}.period-grid>span,#leavePeriodForm .period-grid>span{padding:2px 0}.calendar-event,.working-day-row{grid-template-columns:1fr}.calendar-event>:last-child,.working-day-row>:last-child{grid-column:auto}.workweek-strip{grid-template-columns:1fr 1fr}.machine-maintenance{padding:18px}.machine-illustration{min-height:190px}}
@media(max-width:420px){.workweek-strip{grid-template-columns:1fr}.topbar-actions .appearance-trigger span{display:none}.topbar-actions .appearance-trigger{width:40px;padding:0;justify-content:center}.portal-topbar{padding-inline:10px}.avatar{width:34px;height:34px}.auth-page{padding:12px}.auth-card{border-radius:17px}.auth-card .auth-heading,.auth-card .auth-form,.auth-card .auth-brand{padding-inline:16px}}

/* Print stays intentionally white and independent from website appearance. */
@media print{html,body{color-scheme:light!important}.print-document,.sheet{background:#fff!important;color:#111!important}}


/* V12.4.0 final visual contract. Legacy page CSS may describe structure, but these tokens own appearance. */
html[data-theme="dark"]{
  --bg:#0e1726;
  --surface:#172235;
  --surface-soft:#1d2a3e;
  --ink:#f0f5ff;
  --ink-soft:#c3cede;
  --muted:#95a4ba;
  --border:#2c3b52;
  --border-strong:#3d4d66;
  --line:var(--border);
  --navy:#c7dcff;
  --cyan:#66b9e9;
  --cyan-dark:#91cff1;
  --cyan-soft:#193247;
  --green:#72d1ad;
  --green-soft:#17382f;
  --amber:#ffb15f;
  --amber-soft:#402a17;
  --danger:#ff8f7d;
  --danger-soft:#41231f;
  --warning:#ffd082;
  --warning-soft:#3d301a;
  --shadow-sm:0 1px 2px rgba(0,0,0,.18),0 9px 24px rgba(0,0,0,.16);
  --shadow-popover:0 22px 62px rgba(0,0,0,.42);
}
html[data-theme="dark"][data-portal-preferences-ready="1"]{
  --purple:var(--portal-accent);
  --purple-dark:color-mix(in srgb,var(--portal-accent) 74%,#fff);
  --purple-soft:var(--portal-accent-soft);
}
html[data-theme="dark"] .portal-sidebar,
html[data-theme="dark"] .portal-topbar,
html[data-theme="dark"] .sidebar-footer,
html[data-theme="dark"] .brand-row{border-color:var(--border)!important}
html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] .subpage-heading h1,
html[data-theme="dark"] .welcome-row h1,
html[data-theme="dark"] .requests-heading h2,
html[data-theme="dark"] .panel-heading h2,
html[data-theme="dark"] .legacy-page-content h1,
html[data-theme="dark"] .legacy-page-content h2,
html[data-theme="dark"] .legacy-page-content h3,
html[data-theme="dark"] .education-content h1,
html[data-theme="dark"] .education-content h2,
html[data-theme="dark"] .education-content h3{color:var(--ink)!important}
html[data-theme="dark"] .nav-item{color:var(--ink-soft)}
html[data-theme="dark"] .nav-section>p,
html[data-theme="dark"] .portal-footer,
html[data-theme="dark"] .legacy-page-content p,
html[data-theme="dark"] .legacy-page-content li,
html[data-theme="dark"] .legacy-page-content dd,
html[data-theme="dark"] .legacy-page-content dt,
html[data-theme="dark"] .education-content p,
html[data-theme="dark"] .education-content small{color:var(--ink-soft)}
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .table-menu:hover,
html[data-theme="dark"] .notification-item:hover,
html[data-theme="dark"] .topbar-popover a:hover,
html[data-theme="dark"] .topbar-popover form button:hover{background:var(--surface-soft)!important;color:var(--ink)!important}
html[data-theme="dark"] .profile-copy strong,
html[data-theme="dark"] .popover-heading strong,
html[data-theme="dark"] .notification-item strong{color:var(--ink)!important}
html[data-theme="dark"] .requests-table tbody tr:nth-child(even),
html[data-theme="dark"] .register-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--surface-soft) 72%,var(--surface))!important}
html[data-theme="dark"] .status-info{background:#193247;color:#91cff1}
html[data-theme="dark"] .status-success{background:#17382f;color:#72d1ad}
html[data-theme="dark"] .status-warning{background:#402a17;color:#ffb15f}
html[data-theme="dark"] .status-purple{background:var(--portal-accent-soft);color:color-mix(in srgb,var(--portal-accent) 72%,#fff)}

/* Pages that historically carried their own light renderer are forced onto the portal surfaces. */
html[data-theme="dark"] .metrics .metric,
html[data-theme="dark"] .approval-card,
html[data-theme="dark"] .empty-card,
html[data-theme="dark"] .register-toolbar,
html[data-theme="dark"] .register-table-wrap,
html[data-theme="dark"] .register-cards article,
html[data-theme="dark"] .source-form-reference,
html[data-theme="dark"] .source-form-reference figure,
html[data-theme="dark"] .onedrive-connect,
html[data-theme="dark"] .onedrive-connection,
html[data-theme="dark"] .onedrive-file-row,
html[data-theme="dark"] .schedule-tray,
html[data-theme="dark"] .schedule-sheet,
html[data-theme="dark"] .schedule-row>*,
html[data-theme="dark"] .tec-overview-strip a,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .class-card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .lesson-card,
html[data-theme="dark"] .calendar-day-card,
html[data-theme="dark"] .timeline-list>div,
html[data-theme="dark"] .mini-counts span,
html[data-theme="dark"] .coordination-two-clicks article,
html[data-theme="dark"] .scheduled-card,
html[data-theme="dark"] .session-edit-row,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .period-label,
html[data-theme="dark"] .schedule-dropzone,
html[data-theme="dark"] .drag-card,
html[data-theme="dark"] .move-edit-alternative,
html[data-theme="dark"] .schedule-help-line{background:var(--surface)!important;border-color:var(--border)!important;color:var(--ink)!important}
html[data-theme="dark"] .day-editor,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .ghost-link,
html[data-theme="dark"] .schedule-dropzone.empty,
html[data-theme="dark"] .scheduled-card small,
html[data-theme="dark"] .drag-card small,
html[data-theme="dark"] .drag-card span{background:var(--surface-soft)!important;border-color:var(--border)!important;color:var(--ink-soft)!important}
html[data-theme="dark"] .education-content label,
html[data-theme="dark"] .coordination-create-grid label,
html[data-theme="dark"] .coordination-card p span,
html[data-theme="dark"] .coordination-card-head em,
html[data-theme="dark"] .schedule-help-line,
html[data-theme="dark"] .tec-overview-strip a span{color:var(--ink-soft)!important}
html[data-theme="dark"] .education-content input,
html[data-theme="dark"] .education-content select,
html[data-theme="dark"] .education-content textarea{background:var(--surface-soft)!important;border-color:var(--border)!important;color:var(--ink)!important}
html[data-theme="dark"] .coordination-card.status-completed{background:linear-gradient(180deg,var(--surface),#15352e)!important}
html[data-theme="dark"] .coordination-drag-card,
html[data-theme="dark"] .scheduled-coordination,
html[data-theme="dark"] .gate74-agenda-coo{background:color-mix(in srgb,var(--portal-accent) 12%,var(--surface))!important;border-color:color-mix(in srgb,var(--portal-accent) 34%,var(--border))!important}

/* Request-detail theme, including the cards generated by request-detail.cjs. */
html[data-theme="dark"] .overview-card,
html[data-theme="dark"] .page-grid .section,
html[data-theme="dark"] .page-grid .note,
html[data-theme="dark"] .page-grid .report-follow-up,
html[data-theme="dark"] .page-grid .items-head{background:var(--surface)!important;border-color:var(--border)!important;color:var(--ink)!important}
html[data-theme="dark"] .page-grid .note,
html[data-theme="dark"] .page-grid .report-follow-up,
html[data-theme="dark"] .page-grid .items-head,
html[data-theme="dark"] .page-grid .step-dot{background:var(--surface-soft)!important}
html[data-theme="dark"] .page-grid .payment-row,
html[data-theme="dark"] .page-grid .audit-row,
html[data-theme="dark"] .page-grid .file-list a,
html[data-theme="dark"] .page-grid .items-table{border-color:var(--border)!important;color:var(--ink)!important}
html[data-theme="dark"] .page-grid .fact dd,
html[data-theme="dark"] .page-grid .timeline strong,
html[data-theme="dark"] .page-grid .items-row strong{color:var(--ink)!important}

/* Forms use one geometry across login, settings and operational pages. */
.auth-card input,
.auth-card select,
.legacy-page-content .field input,
.legacy-page-content .field select,
.legacy-page-content .field textarea,
.form-field input,
.form-field select,
.form-field textarea{font-size:clamp(12px,calc(12px * var(--portal-font-scale)),15px)}
.choice-row input[type="checkbox"],
.routing-option input[type="radio"],
input[type="checkbox"],input[type="radio"]{min-height:0!important;max-width:none}

/* Layout resilience for laptop, tablet, phone and narrow split-screen windows. */
.portal-topbar,.topbar-left,.topbar-actions,.subpage-heading,.subpage-actions,.panel-head,.footer,.actions{min-width:0}
.topbar-actions{flex:0 0 auto}
.panel-head,.footer,.actions{flex-wrap:wrap}
.legacy-page-content .grid,.form-grid{min-width:0}
.legacy-page-content .grid>* ,.form-grid>*{min-width:0}
.legacy-page-content input,.legacy-page-content select,.legacy-page-content textarea{width:100%;min-width:0}
.table-wrap,.register-table-wrap,.items-table,.schedule-sheet{overflow-x:auto;-webkit-overflow-scrolling:touch}
.settings-tab-panel{overflow:visible}
@media(max-width:900px){
  .settings-table{min-width:820px}
  .approval-grid{grid-template-columns:1fr!important}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-grid{grid-template-columns:1fr!important}
}
@media(max-width:720px){
  .portal-topbar{padding-inline:12px}
  .topbar-left{flex:0 1 auto}
  .topbar-actions{margin-left:auto}
  .search-box{display:none!important}
  .profile-copy,.appearance-trigger span{display:none!important}
  .profile-chip{padding:0}
  .subpage-heading{gap:12px}
  .settings-tabs{position:relative;top:auto;margin-top:-2px}
  .settings-tabs a{flex:0 0 auto}
  .metrics{grid-template-columns:1fr!important}
  .approval-facts{grid-template-columns:1fr!important}
}
@media(max-width:520px){
  :root{--page-pad-x:11px;--page-pad-y:15px;--card-pad:14px}
  .portal-topbar{height:62px}
  .topbar-actions{gap:5px}
  .icon-button,.appearance-trigger{width:38px;height:38px;min-height:38px}
  .avatar{width:34px;height:34px}
  .subpage-heading h1{font-size:clamp(23px,8vw,29px)}
  .subpage-heading>div:first-child>p:last-child{font-size:11px}
  .panel,.overview-card,.page-grid .section{border-radius:13px!important}
  .footer,.actions{display:grid!important;grid-template-columns:1fr;width:100%}
  .footer>* ,.actions>*{width:100%;justify-content:center}
  .settings-tabs{margin-inline:-3px;padding:5px}
  .settings-tabs a{min-height:36px}
  .period-grid,#leavePeriodForm .period-grid{gap:7px}
}


/* Standalone failure pages still honor saved appearance instead of snapping back to white. */
.standalone-error-page{min-height:100vh;margin:0;padding:clamp(18px,6vw,70px) 16px;background:var(--bg)!important;color:var(--ink)!important;font-family:var(--portal-font-family,Inter),ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}
.standalone-error-page .box{width:min(700px,100%);margin:0 auto!important;padding:clamp(22px,4vw,32px)!important;border:1px solid var(--border)!important;border-radius:18px!important;background:var(--surface)!important;color:var(--ink)!important;box-shadow:var(--shadow-sm)}
.standalone-error-page .box h1{margin-top:0;color:var(--ink)!important}.standalone-error-page .box p{color:var(--ink-soft)!important}.standalone-error-page .box a{display:inline-flex;min-height:42px;align-items:center;justify-content:center;padding:0 15px;border-radius:10px;background:var(--portal-accent)!important;color:#fff!important;font-weight:800;text-decoration:none}

/* V12.5 authentication hardening */
.auth-security-note{margin:14px 0 0;color:var(--muted);font-size:.78rem;line-height:1.5;text-align:center}


/* V12.6 request-first workflow, mobile interaction and correction controls. */
.dashboard-request-launcher{display:grid;grid-template-columns:minmax(230px,.72fr) minmax(0,1.55fr);gap:20px;align-items:center;margin-bottom:20px;padding:22px;border:1px solid color-mix(in srgb,var(--portal-accent) 24%,var(--border));border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--portal-accent) 10%,var(--surface)),var(--surface));box-shadow:var(--shadow-sm)}
.dashboard-request-copy h2{margin:3px 0 7px;color:var(--ink);font-size:clamp(22px,2.1vw,30px)}.dashboard-request-copy p{margin:0;color:var(--ink-soft);line-height:1.55}.request-launcher-kicker{display:inline-flex;color:var(--portal-accent);font-size:10px;font-weight:900;letter-spacing:.14em}
.request-start-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.request-start-grid a{min-width:0;min-height:78px;display:flex;align-items:center;gap:11px;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--ink);text-decoration:none;transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}.request-start-grid a:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--portal-accent) 45%,var(--border));box-shadow:var(--shadow-sm)}.request-start-grid strong,.request-start-grid small{display:block}.request-start-grid strong{font-size:13px}.request-start-grid small{margin-top:3px;color:var(--muted);font-size:10px;line-height:1.35}
.topbar-request-launcher{position:relative}.topbar-request-launcher>summary{list-style:none}.topbar-request-launcher>summary::-webkit-details-marker{display:none}.topbar-new-request{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 12px;border:1px solid color-mix(in srgb,var(--portal-accent) 35%,var(--border));border-radius:10px;background:color-mix(in srgb,var(--portal-accent) 9%,var(--surface));color:var(--portal-accent);font-weight:850;cursor:pointer;white-space:nowrap}.topbar-request-launcher[open] .topbar-new-request .portal-icon:last-child{transform:rotate(180deg)}.topbar-request-menu{position:absolute;z-index:1000;right:0;top:calc(100% + 8px);width:260px;margin:0}.topbar-request-menu strong{font-size:12px}.topbar-request-menu small{font-size:9px}
html[data-theme="dark"] .dashboard-request-launcher,html[data-theme="dark"] .request-start-grid a,html[data-theme="dark"] .topbar-new-request{background:var(--surface)!important;border-color:var(--border)!important;color:var(--ink)!important}
.cancel-request-details>summary{list-style:none;cursor:pointer}.cancel-request-details>summary::-webkit-details-marker{display:none}.cancel-request-details form{display:grid;gap:11px;margin-top:12px}.cancel-request-details textarea{min-height:105px;resize:vertical}.button.danger-outline{border-color:color-mix(in srgb,var(--danger,#b54a32) 48%,var(--border));color:var(--danger,#b54a32);background:transparent}.button.danger{background:var(--danger,#b54a32);border-color:var(--danger,#b54a32);color:#fff}.request-cancel-card{border-color:color-mix(in srgb,var(--danger,#b54a32) 24%,var(--border))!important}
.topbar-new-request,.request-start-grid a,.new-request-menu a,.button,.nav-item{touch-action:manipulation}
@media(max-width:900px){.dashboard-request-launcher{grid-template-columns:1fr}.request-start-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.topbar-new-request{width:40px;height:40px;padding:0}.topbar-new-request span,.topbar-new-request .portal-icon:last-child{display:none}.topbar-request-menu{position:fixed;right:10px;top:62px;width:min(290px,calc(100vw - 20px));max-height:calc(100vh - 76px);overflow:auto}.dashboard-request-launcher{padding:17px}.request-start-grid{grid-template-columns:1fr}.request-start-grid a{min-height:64px}}
@media(max-width:420px){.dashboard-request-launcher{margin-inline:-2px;border-radius:16px}.topbar-actions{gap:4px}.topbar-new-request,.notification-button,.appearance-trigger{width:38px;height:38px;min-height:38px}}

/* V12.6 secure attachment actions */
.inline-delete-form{display:inline;margin:0}.link-button{appearance:none;border:0;background:none;padding:0;font:inherit;cursor:pointer;text-decoration:underline}.link-button.danger-link,.link-button.danger-text{color:var(--danger)}
