:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #182230;
  --muted: #667085;
  --line: #d9e1ec;
  --primary: #334155;
  --primary-dark: #1f2937;
  --primary-deep: #0f172a;
  --primary-soft: #f3f6fa;
  --primary-line: #cbd5e1;
  --accent: #0f766e;
  --accent-soft: #f8f4ec;
  --gold: #b08d57;
  --gold-soft: #fbf7ef;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

.identity-reference-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  min-width: 0;
}
.identity-reference-input > span {
  padding: 9px 10px;
  color: var(--muted);
  font-size: 14px;
}
.identity-reference-input > input {
  border: 0 !important;
  border-left: 1px solid var(--line) !important;
  border-radius: 0 6px 6px 0 !important;
  min-width: 0;
  width: 100%;
  text-transform: uppercase;
}
.identity-reference-input:focus-within { outline: 2px solid var(--primary); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 "Segoe UI Variable", "Inter", "Segoe UI", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.mobile-nav-toggle,
.mobile-nav-button,
.mobile-nav-backdrop {
  display: none;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .98)),
    radial-gradient(circle at 20% 0%, rgba(51, 65, 85, .14), transparent 34%);
  border-right: 1px solid #d4dde9;
  box-shadow: 8px 0 30px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding: 14px 12px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-radius: 10px;
  box-shadow: 0 14px 26px rgba(51, 65, 85, .2);
  color: white;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 64px;
  padding: 10px;
}
.brand-mark {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 9px;
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 1000;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.brand strong, .brand small { display: block; }
.brand small { color: rgba(255, 255, 255, .76); font-size: 11px; line-height: 1.2; }
.brand strong { font-size: 16px; line-height: 1.1; }
.eyebrow, .panel-header span { color: var(--muted); }

.side-nav {
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 1px 2px 4px 0;
  scrollbar-color: #b9c8d8 transparent;
  scrollbar-width: thin;
}

.side-nav::-webkit-scrollbar {
  width: 6px;
}

.side-nav::-webkit-scrollbar-thumb {
  background: #b9c8d8;
  border-radius: 999px;
}

.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #344054;
  display: flex;
  font-size: 13px;
  font-weight: 850;
  gap: 9px;
  min-height: 35px;
  padding: 6px 8px;
  position: relative;
}

.nav-icon {
  align-items: center;
  background: #eef4f7;
  border: 1px solid #dde7ef;
  border-radius: 8px;
  color: #475467;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 1000;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.side-nav a:hover,
.side-nav a:focus {
  background: white;
  border-color: #c9d7e6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  color: var(--primary);
  outline: 0;
}

.side-nav a:hover .nav-icon,
.side-nav a:focus .nav-icon {
  background: var(--primary-soft);
  border-color: var(--primary-line);
  color: var(--primary);
}

.side-nav a.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(51, 65, 85, .22);
  color: white;
}

.side-nav a.active::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: 22px;
  left: -12px;
  position: absolute;
  width: 4px;
}

.side-nav a.active .nav-icon {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .24);
  color: white;
}

.main { min-width: 0; padding: 28px; }
.topbar { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 22px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; margin: 0 0 3px; text-transform: uppercase; }
h1, h2 { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }

.legacy-link, .button {
  background: var(--primary);
  border-radius: 8px;
  color: white;
  font-weight: 800;
  padding: 10px 14px;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.top-actions span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 12px;
}
.mom-eservices-link {
  background: #ecfdf8;
  border: 1px solid #99d8c6;
  border-radius: 8px;
  color: #0b6657;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  white-space: nowrap;
}
.mom-eservices-link:hover,
.mom-eservices-link:focus { background: #d7f7ed; border-color: #0f766e; outline: 0; }
.mom-eservices-link span { background: none; border: 0; color: inherit; padding: 0; }

.hero-dashboard {
  align-items: stretch;
  background: linear-gradient(135deg, rgba(51, 65, 85, .96), rgba(23, 37, 84, .94));
  border-radius: 8px;
  color: white;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 300px;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 28px;
}
.hero-dashboard .eyebrow { color: rgba(255, 255, 255, .76); }
.hero-dashboard h2 { font-size: 34px; line-height: 1.12; max-width: 760px; }
.hero-dashboard p { color: rgba(255, 255, 255, .82); font-size: 16px; max-width: 760px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button.secondary { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .36); }
.hero-panel { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; padding: 18px; }
.hero-panel span, .hero-panel p { color: rgba(255, 255, 255, .78); }
.hero-panel strong { display: block; font-size: 30px; margin: 8px 0 18px; }

.module-hero {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-bottom: 18px;
  padding: 24px;
}

.module-hero h2 {
  font-size: 34px;
  line-height: 1.12;
  margin-bottom: 10px;
}

.module-hero p {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
  max-width: 780px;
}

.module-action-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-radius: 8px;
  color: white;
  padding: 18px;
}

.module-action-card span,
.module-action-card p {
  color: rgba(255, 255, 255, .8);
}

.module-action-card strong {
  display: block;
  font-size: 22px;
  margin: 8px 0 12px;
}

.module-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.module-card > span {
  background: var(--primary-soft);
  border-radius: 8px;
  display: block;
  height: 42px;
  margin-bottom: 18px;
  width: 42px;
}

.module-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.module-card p {
  color: var(--muted);
  margin: 0;
}

.pipeline {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}

.pipeline > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.pipeline b {
  color: var(--primary);
  display: block;
  font-size: 12px;
  margin-bottom: 10px;
}

.metrics-grid { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.metric-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.metric-card { padding: 18px; }
.metric-card span { color: var(--muted); display: block; font-weight: 700; }
.metric-card strong { display: block; font-size: 30px; margin-top: 8px; }
.metric-card small { color: var(--muted); display: block; font-weight: 700; margin-top: 2px; }

.dashboard-filterbar { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding: 12px 16px; }
.dashboard-filterbar label { color: var(--text); font-size: 13px; font-weight: 800; }
.dashboard-filterbar input,
.trend-year-filter select { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--text); min-height: 38px; padding: 7px 10px; }
.dashboard-filterbar button,
.trend-year-filter button { background: var(--primary); border: 0; border-radius: 8px; color: #fff; cursor: pointer; font-weight: 700; min-height: 38px; padding: 7px 12px; }
.dashboard-filterbar > span { color: var(--muted); font-size: 12px; margin-left: auto; }
.dashboard-trend-panel { padding-bottom: 12px; }
.trend-panel-header { flex-wrap: wrap; }
.trend-year-filter { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.trend-year-filter label { color: var(--muted); font-size: 12px; font-weight: 700; }
.trend-legend { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 18px 0; }
.trend-legend span { align-items: center; color: var(--muted); display: inline-flex; font-size: 12px; gap: 6px; }
.trend-legend i { background: #0f766e; border-radius: 3px; height: 10px; width: 10px; }
.trend-legend .legend-deployments i { background: #d97706; }
.trend-legend .legend-returns i { background: #2563eb; }
.trend-legend .legend-cancellations i { background: #dc2626; }
.trend-chart-wrap { overflow-x: auto; }
.trend-chart { align-items: end; display: grid; gap: 8px; grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: 188px; padding: 18px 20px 0; }
.trend-chart { min-width: 720px; }
.trend-month { display: grid; grid-template-rows: auto 118px auto; min-width: 0; text-align: center; }
.trend-values { color: var(--muted); display: flex; font-size: 10px; gap: 3px; justify-content: center; line-height: 1.2; }
.trend-values span { min-width: 11px; }
.trend-values span:nth-child(1) { color: #0f766e; }
.trend-values span:nth-child(2) { color: #b45309; }
.trend-values span:nth-child(3) { color: #2563eb; }
.trend-values span:nth-child(4) { color: #dc2626; }
.trend-bars { align-items: end; border-bottom: 1px solid var(--line); display: flex; gap: 3px; justify-content: center; padding: 0 3px; }
.trend-bars i { border-radius: 4px 4px 0 0; display: block; max-width: 20px; min-height: 2px; width: 22%; }
.trend-bookings { background: linear-gradient(180deg, #14b8a6, #0f766e); }
.trend-deployments { background: linear-gradient(180deg, #fbbf24, #d97706); }
.trend-returns { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.trend-cancellations { background: linear-gradient(180deg, #f87171, #dc2626); }
.trend-month-label { color: var(--muted); font-size: 11px; padding-top: 6px; }
.trend-note { color: var(--muted); font-size: 11px; margin: 8px 20px 0; }

.panel { margin-bottom: 18px; overflow: hidden; }
.panel-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; padding: 16px 18px; }
.dashboard-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); margin-bottom: 18px; }
.workflow-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px; }
.workflow-card, .stack-list > div, .activity-list > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.workflow-card b { color: var(--primary); display: block; font-size: 12px; margin-bottom: 18px; }
.workflow-card h3 { font-size: 15px; margin: 0 0 8px; }
.workflow-card p, .stack-list span, .activity-list p, .empty-state { color: var(--muted); margin: 4px 0 0; }
.stack-list, .activity-list { display: grid; gap: 10px; padding: 18px; }
.stack-list strong, .activity-list strong { display: block; }

.smart-ops-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  margin-bottom: 18px;
}
.smart-count {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 18px;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  padding: 0 12px;
}
.priority-list,
.reminder-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.dashboard-explainer {
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 14px 18px 0;
  padding: 10px 12px;
}
.dashboard-quick-panel { margin-bottom: 18px; }
.dashboard-quick-links {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}
.dashboard-quick-links a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  display: grid;
  gap: 5px 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 12px;
  text-decoration: none;
}
.dashboard-quick-links a:hover,
.dashboard-quick-links a:focus { border-color: var(--primary); outline: 0; }
.dashboard-quick-links a > span {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 9px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.dashboard-quick-links strong { align-self: end; font-size: 14px; }
.dashboard-quick-links small { color: var(--muted); font-size: 11px; grid-column: 2; line-height: 1.4; }
.priority-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 74px minmax(0, 1fr);
  padding: 12px;
}
.priority-row > span {
  border-radius: 999px;
  font-size: 12px;
  padding: 7px 9px;
  text-align: center;
}
.priority-row strong,
.priority-row small { display: block; }
.priority-row small { color: var(--muted); margin-top: 2px; }
.priority-danger > span { background: #fef2f2; color: #991b1b; }
.priority-warning > span { background: #fffbeb; color: #92400e; }
.priority-good > span { background: #ecfdf3; color: #166534; }
.priority-row:hover,
.priority-row:focus {
  background: #f8fafc;
  outline: 0;
}
.followup-form {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 16px 16px;
}
.followup-composer { border-bottom: 1px solid var(--line); }
.followup-composer > summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; padding: 14px 18px; }
.followup-composer > summary::-webkit-details-marker { display: none; }
.followup-composer > summary span,
.followup-composer > summary strong,
.followup-composer > summary small { display: block; }
.followup-composer > summary strong { color: var(--text); font-size: 14px; }
.followup-composer > summary small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.followup-composer > summary b { background: var(--primary); border-radius: 8px; color: white; font-size: 12px; padding: 9px 12px; }
.followup-composer[open] > summary { background: #f8fafc; border-bottom: 1px solid var(--line); }
.followup-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 6px;
  text-transform: uppercase;
}
.followup-form .wide,
.followup-form > .reminder-more-fields { grid-column: 1 / -1; }
.followup-form input,
.followup-form select,
.followup-form textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  min-height: 42px;
  padding: 9px 11px;
  text-transform: none;
}
.followup-form textarea { resize: vertical; }
.followup-form .field-help { color: var(--muted); font-size: 11px; text-transform: none; }
.reminder-more-fields { border: 1px solid var(--line); border-radius: 9px; grid-column: 1 / -1; }
.reminder-more-fields > summary { color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 700; list-style-position: inside; padding: 10px 12px; }
.reminder-more-fields > summary span { color: var(--muted); float: right; font-size: 11px; font-weight: 500; }
.reminder-extra-grid { border-top: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
.followup-form button {
  align-self: end;
  background: var(--primary);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  min-height: 42px;
  padding: 9px 14px;
}
.reminder-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}
.reminder-row strong,
.reminder-row span,
.reminder-row small { display: block; }
.reminder-row span,
.reminder-row small { color: var(--muted); margin-top: 2px; }
.reminder-row button {
  background: #ecfdf3;
  border: 1px solid #86efac;
  border-radius: 999px;
  color: #166534;
  cursor: pointer;
  padding: 8px 12px;
}

.action-items-panel { margin-bottom: 18px; }
.action-item-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}
.action-item-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.action-item-head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}
.action-item-head h3 { font-size: 16px; margin: 0 0 5px; }
.action-item-head p { color: var(--muted); font-size: 13px; margin: 0; }
.action-item-head strong {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 18px;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  padding: 0 12px;
}
.action-warning .action-item-head strong { background: #fffbeb; color: #92400e; }
.action-danger .action-item-head strong { background: #fef2f2; color: #991b1b; }
.action-good .action-item-head strong { background: #ecfdf3; color: #166534; }
.action-mini-list {
  border-top: 1px solid var(--line);
  display: grid;
}
.action-mini-row {
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 4px;
  padding: 11px 14px;
}
.action-mini-row:hover,
.action-mini-row:focus {
  background: #f8fafc;
  outline: 0;
}
.action-mini-row b,
.action-mini-row small,
.action-mini-row em { display: block; }
.action-mini-row b { color: var(--text); font-size: 13px; }
.action-mini-row small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.action-mini-row em { color: #475467; font-size: 12px; font-style: normal; }
.action-empty {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 14px;
}

.settings-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operations-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ops-side-panel {
  position: sticky;
  top: 16px;
}

.switch-field {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  line-height: 1.2;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.switch-field input {
  accent-color: var(--primary);
  margin: 0;
  min-height: auto;
  width: auto;
}

.package-header-grid {
  align-items: end;
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, .8fr) minmax(130px, .7fr) auto auto !important;
}

.package-header-grid .switch-field {
  align-self: end;
  border-radius: 8px;
  height: 44px;
  min-height: 44px;
}

.package-create-action {
  align-self: end;
}

.package-create-action button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 44px;
  padding: 10px 14px;
  white-space: nowrap;
}

.package-browser {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, .42fr) minmax(0, .58fr);
  margin-bottom: 18px;
}

.package-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding: 14px;
}

.package-select-card {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.package-select-card strong,
.package-select-card small,
.package-select-card b {
  display: block;
}

.package-select-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.package-select-card b {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 12px;
  padding: 7px 9px;
}

.package-select-card:hover,
.package-select-card:focus,
.package-select-card.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  outline: 0;
}

.selected-package-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px;
}

.selected-package-summary div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.selected-package-summary span,
.selected-package-summary strong {
  display: block;
}

.selected-package-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.selected-package-summary strong {
  font-size: 16px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.existing-items {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.existing-items h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.compact-table table {
  min-width: 520px;
}

.current-item-list {
  display: grid;
  gap: 10px;
}

.current-item-form {
  align-items: end;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) 100px 92px 34px 76px;
  padding: 12px;
}

.current-item-form.disabled {
  background: #f2f4f7;
  opacity: .78;
}

.current-item-form [data-remove-saved-item] { width:auto; color:#b42318; background:#fff1f0; border:1px solid #f4b4ad; font-size:12px; padding:8px; }

.current-item-form label {
  color: #344054;
  display: grid;
  font-weight: 800;
  gap: 5px;
}

.current-item-form input[type="text"],
.current-item-form input:not([type]) {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

.line-enabled {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex !important;
  gap: 7px !important;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
  white-space: nowrap;
}

.line-enabled input {
  accent-color: var(--primary);
  height: 16px;
  margin: 0;
  width: 16px;
}

.line-enabled span {
  font-size: 12px;
  line-height: 1;
}

.current-item-form button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 40px;
  padding: 9px 12px;
}

.current-item-form .icon-save {
  align-items: center;
  display: inline-flex;
  font-size: 0;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.current-item-form .icon-save::before {
  content: "✓";
  font-size: 16px;
  line-height: 1;
}

.current-item-form .icon-save:disabled {
  cursor: wait;
  opacity: .72;
}

.current-item-form .icon-save.saved {
  background: #12b76a;
}

.current-item-form .icon-save.error {
  background: #d92d20;
}

.current-item-form .icon-save.error::before {
  content: "!";
}

.package-items-block {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.package-items-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.package-items-head h3 {
  font-size: 16px;
  margin: 0;
}

.package-items-head p {
  color: var(--muted);
  margin: 2px 0 0;
}

.package-items-head button,
.icon-remove {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 36px;
  padding: 8px 11px;
}

.package-items-head button {
  background: var(--primary-soft);
  color: var(--primary);
  flex: 0 0 auto;
  height: 38px;
  white-space: nowrap;
}

.package-items {
  display: grid;
  gap: 10px;
}

.package-item-row {
  align-items: end;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) 140px 40px;
  padding: 12px;
}

.package-item-row label {
  color: #344054;
  display: grid;
  font-weight: 800;
  gap: 5px;
}

.package-item-row input {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

.package-item-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}

.icon-remove {
  align-self: end;
  background: white;
  color: #b42318;
  font-size: 0;
  height: 40px;
  min-height: 40px;
  padding: 0;
  position: relative;
  width: 40px;
}

.icon-remove::before {
  content: "×";
  font-size: 22px;
  line-height: 1;
}

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 920px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
th { background: var(--surface-2); color: #475467; font-size: 12px; text-transform: uppercase; }
.status {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  line-height: 1;
  padding: 8px 11px;
  white-space: nowrap;
}
.status::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 8px;
  width: 8px;
}
.status-available { background: #d1fadf; border-color: #32d583; color: #05603a; }
.status-taken {
  background: #fff1f3;
  border-color: #f63d68;
  box-shadow: 0 8px 18px rgba(214, 31, 72, .24);
  color: #c01048;
}
.status-pending { background: #fef0c7; border-color: #f79009; color: #93370d; }
.status-booked { background: #dbeafe; border-color: #94a3b8; color: #334155; }
.status-deployed {
  background: #dcfce7;
  border-color: #22c55e;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .18);
  color: #166534;
}
.status-returned { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.status-cancelled {
  background: #fee2e2;
  border-color: #ef4444;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .18);
  color: #991b1b;
}
.status-cancelled::before { background: #dc2626; }
.status-canceled { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.status-repatriate { background: #ebe9fe; border-color: #9b8afb; color: #4a1fb8; }
.alert { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; color: #9a3412; margin-bottom: 18px; padding: 12px 14px; }
.success-alert { background: #ecfdf3; border: 1px solid #abefc6; border-radius: 8px; color: #027a48; font-weight: 800; margin-bottom: 18px; padding: 12px 14px; }

.tracking-hero {
  align-items: stretch;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 58%, var(--primary-deep) 100%);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 420px;
  margin-bottom: 18px;
  padding: 24px;
}

.tracking-hero .eyebrow,
.tracking-hero p {
  color: rgba(255, 255, 255, .78);
}

.tracking-hero h2 {
  font-size: 32px;
  line-height: 1.12;
  max-width: 780px;
}

.tracking-hero p {
  font-size: 15px;
  margin: 10px 0 0;
  max-width: 860px;
}

.tracking-stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tracking-stat-grid div {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  padding: 14px;
}

.tracking-stat-grid span,
.tracking-stat-grid strong {
  display: block;
}

.tracking-stat-grid span {
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tracking-stat-grid strong {
  font-size: 28px;
  margin-top: 4px;
}

.tracking-search-panel {
  margin-bottom: 14px;
}

.tracking-searchbar {
  border-top: 0;
  margin: 0;
  padding: 14px 18px 18px;
}

.tracking-board {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tracking-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.tracking-card-head,
.tracking-card-foot,
.tracking-progress {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.tracking-card h3 {
  font-size: 20px;
  line-height: 1.22;
  margin: 4px 0;
}

.tracking-card p,
.tracking-card small,
.tracking-parties span,
.tracking-detail-grid span,
.tracking-progress small {
  color: var(--muted);
}

.tracking-code {
  color: var(--primary);
  display: block;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .04em;
}

.tracking-parties,
.tracking-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tracking-parties div,
.tracking-detail-grid div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}

.tracking-parties span,
.tracking-detail-grid span,
.tracking-parties strong,
.tracking-detail-grid strong,
.tracking-parties small,
.tracking-detail-grid small {
  display: block;
}

.tracking-parties span,
.tracking-detail-grid span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tracking-parties strong,
.tracking-detail-grid strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.tracking-progress {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.tracking-progress-line {
  background: #e4eaf2;
  border-radius: 999px;
  flex: 1 1 auto;
  height: 10px;
  overflow: hidden;
}

.tracking-progress-line span {
  background: linear-gradient(90deg, var(--primary), #64748b);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.tracking-progress strong {
  color: var(--primary);
  font-size: 18px;
}

.tracking-stage-list,
.tracking-mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tracking-stage-list span,
.tracking-mini-badges > span {
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 9px;
}

.tracking-stage-list span.done {
  background: var(--primary-soft);
  border-color: #cbd5e1;
  color: var(--primary);
}

.tracking-card-foot .button {
  flex: 0 0 auto;
  padding: 9px 12px;
}

.tracking-loading {
  align-items: center;
  display: flex;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 18px;
}

.tracking-workspace-form {
  display: grid;
  gap: 16px;
}

.tracking-edit-hero {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px;
}

.tracking-edit-hero h2 {
  font-size: 28px;
}

.tracking-edit-hero p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 900;
  margin: 6px 0 0;
}

.tracking-edit-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tracking-edit-actions button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 40px;
  padding: 10px 14px;
}

.tracking-edit-grid {
  display: grid;
  gap: 16px;
}

.tracking-flow {
  position: sticky;
  top: 10px;
  z-index: 12;
}

.tracking-tablist {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.tracking-tabs-form .form-panel {
  scroll-margin-top: 158px;
}

.tracking-tabs-form .form-grid input,
.tracking-tabs-form .form-grid select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.tracking-tabs-form .form-grid input:focus,
.tracking-tabs-form .form-grid select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}

.tracking-tabs-form .form-grid input[readonly] {
  background: #f2f4f7;
  color: var(--muted);
}

.tracking-tabs-form input[type="file"] {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: auto;
  padding: 0;
}

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid .wide-field {
  grid-column: span 2;
}

.tracking-doc-upload {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  padding: 12px;
}

.tracking-doc-upload .document-thumb {
  width: 86px;
}

.tracking-selected-file {
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 999px;
  color: var(--primary) !important;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900 !important;
  justify-self: start;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-doc-remove {
  align-self: center;
  background: #fff1f3;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #be123c;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 1000;
  min-height: 34px;
  padding: 7px 10px;
}

.tracking-doc-remove:hover,
.tracking-doc-remove:focus {
  background: #ffe4e6;
  outline: 0;
}

.tracking-doc-upload.document-marked-remove {
  background: #fff7ed;
  border-color: #fed7aa;
}

.tracking-workspace-form .sticky-actions {
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 34px rgba(15, 23, 42, .08);
}

.tracking-workspace-form .sticky-actions button {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(51, 65, 85, .18);
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 1000;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
}

.tracking-workspace-form .sticky-actions button:hover,
.tracking-workspace-form .sticky-actions button:focus {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-deep));
  outline: 0;
}

.tracking-doc-upload.has-error-box {
  border-color: #fda29b;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .08);
}

.planner-hero {
  align-items: stretch;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 58%, var(--primary-deep) 100%);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
  margin-bottom: 18px;
  padding: 24px;
}

.planner-hero .eyebrow,
.planner-hero p {
  color: rgba(255, 255, 255, .78);
}

.planner-hero h2 {
  font-size: 32px;
  line-height: 1.12;
}

.planner-hero p {
  font-size: 15px;
  margin: 10px 0 0;
  max-width: 760px;
}

.planner-month-card {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.planner-month-card span,
.planner-month-card small {
  color: rgba(255, 255, 255, .78);
  font-weight: 900;
}

.planner-month-card strong {
  font-size: 24px;
}

.planner-month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planner-month-nav a {
  background: var(--primary-soft);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--primary);
  font-weight: 900;
  padding: 8px 10px;
}

.planner-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 180px minmax(320px, 1fr) 220px auto;
  padding: 16px 18px 18px;
}

.planner-filters label,
.planner-filters fieldset {
  display: grid;
  gap: 6px;
}

.planner-filters label,
.planner-filters legend {
  color: #344054;
  font-weight: 900;
}

.planner-filters fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.planner-filters input[type="month"],
.planner-filters select {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 44px;
  padding: 9px 11px;
  width: 100%;
}

.planner-filters button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 44px;
  padding: 10px 14px;
  white-space: nowrap;
}

.planner-status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planner-status-check {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex !important;
  gap: 7px !important;
  min-height: 44px;
  padding: 8px 11px;
  white-space: nowrap;
}

.planner-status-check input {
  accent-color: var(--primary);
  margin: 0;
}

.planner-status-booked { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
.planner-status-deployed { background: #ecfdf3; border-color: #86efac; color: #166534; }
.planner-status-returned { background: #fffbeb; border-color: #fbbf24; color: #92400e; }
.planner-status-cancelled { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

.planner-calendar-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.planner-calendar-head,
.planner-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.planner-calendar-head div {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: #475467;
  font-size: 12px;
  font-weight: 1000;
  padding: 10px;
  text-transform: uppercase;
}

.planner-day {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 176px;
  padding: 9px;
  position: relative;
}

.planner-day.outside-month {
  background: #f8fafc;
  color: #98a2b3;
}

.planner-day.today {
  box-shadow: inset 0 0 0 2px rgba(51, 65, 85, .34);
}

.planner-day-number {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.planner-day-number strong {
  font-size: 16px;
}

.planner-day-number span {
  background: var(--primary-soft);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  padding: 5px 7px;
}

.planner-events {
  display: grid;
  gap: 4px;
}

.planner-event {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  gap: 5px;
  grid-template-columns: 8px minmax(0, 1fr) 18px;
  min-height: 24px;
  padding: 3px 5px;
  position: relative;
  z-index: 1;
}

.planner-event:hover,
.planner-event:focus {
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
  outline: 0;
  z-index: 20;
}

.planner-event-dot {
  border-radius: 999px;
  display: block;
  height: 8px;
  width: 8px;
}

.planner-event strong {
  display: block;
  font-size: 11px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-event-status {
  align-items: center;
  background: rgba(255, 255, 255, .72);
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 1000;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.planner-event-popover {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .32);
  color: white;
  display: none;
  left: 12px;
  min-width: 240px;
  padding: 10px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 40;
}

.planner-event-popover::before {
  background: #111827;
  content: "";
  height: 10px;
  left: 18px;
  position: absolute;
  top: -5px;
  transform: rotate(45deg);
  width: 10px;
}

.planner-event-popover b,
.planner-event-popover small {
  display: block;
}

.planner-event-popover b {
  font-size: 13px;
  margin-bottom: 5px;
}

.planner-event-popover small {
  color: #d1d5db;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.planner-event:hover .planner-event-popover,
.planner-event:focus .planner-event-popover {
  display: block;
}

.planner-event-booked { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
.planner-event-booked .planner-event-dot { background: #334155; }
.planner-event-deployed { background: #ecfdf3; border-color: #86efac; color: #166534; }
.planner-event-deployed .planner-event-dot { background: #16a34a; }
.planner-event-returned { background: #fffbeb; border-color: #fbbf24; color: #92400e; }
.planner-event-returned .planner-event-dot { background: #d97706; }
.planner-event-cancelled { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.planner-event-cancelled .planner-event-dot { background: #dc2626; }

.success-banner {
  background: #ecfdf3;
  border: 1px solid #86efac;
  border-radius: 10px;
  color: #166534;
  font-weight: 900;
  margin: 0 0 18px;
  padding: 12px 14px;
}

.interview-planner-panel {
  margin-bottom: 16px;
}

.planner-soft-pill {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-weight: 900;
  min-height: 40px;
  padding: 8px 14px;
}

.interview-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.interview-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 7px;
  text-transform: uppercase;
}

.interview-form input,
.interview-form select,
.interview-form textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: 800 14px/1.35 inherit;
  min-height: 46px;
  padding: 11px 13px;
  text-transform: none;
}

.interview-form textarea {
  resize: vertical;
}

.interview-helper-field,
.interview-notes {
  grid-column: span 2;
}

.interview-form-actions {
  align-items: end;
  display: flex;
  justify-content: flex-end;
}

.interview-form-actions button {
  background: #1d4ed8;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-height: 46px;
  padding: 11px 18px;
}

.field-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.planner-event-interview {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.planner-event-interview .planner-event-dot {
  background: #2563eb;
}

.planner-interview-completed {
  background: #ecfdf3;
  border-color: #86efac;
  color: #166534;
}

.planner-interview-cancelled,
.planner-interview-no-show {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.interview-list-panel {
  margin-top: 16px;
}

.interview-list {
  display: grid;
  gap: 10px;
}

.interview-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: 96px 1.2fr 1.2fr auto;
  padding: 12px;
}

.interview-row strong,
.interview-row span {
  display: block;
}

.interview-row strong {
  color: var(--ink);
  font-weight: 900;
}

.interview-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
}

.interview-date {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
}

.interview-status-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3 !important;
  font-weight: 900 !important;
  margin: 0 !important;
  padding: 8px 12px;
  text-align: center;
}

.interview-hero {
  background: linear-gradient(135deg, #172554, #1e3a8a);
}

.interview-workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-bottom: 18px;
}

.interview-form-panel {
  overflow: visible;
}

.interview-form.refined {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.interview-form-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.interview-form-section h3 {
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 14px;
}

.interview-field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.interview-field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.interview-field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.interview-field-grid .wide {
  grid-column: 1 / -1;
}

.interview-field-grid .wide-two {
  grid-column: span 2;
}

.interview-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.panel-header.compact {
  align-items: flex-start;
  gap: 12px;
}

.interview-filter {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.interview-filter input,
.interview-filter select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 800;
  min-height: 42px;
  padding: 9px 11px;
}

.interview-filter button {
  background: #1d4ed8;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-height: 42px;
}

.interview-mini-calendar {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.interview-mini-calendar > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.interview-mini-calendar > div {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-height: 42px;
  padding: 5px;
  position: relative;
  text-align: center;
}

.interview-mini-calendar > div.muted {
  opacity: .38;
}

.interview-mini-calendar strong {
  font-size: 13px;
}

.interview-mini-calendar em {
  align-items: center;
  background: #2563eb;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  height: 18px;
  justify-content: center;
  position: absolute;
  right: -4px;
  top: -5px;
  width: 18px;
}

/* Typography balance: keep the app scannable without making every field feel heavy. */
body,
input,
select,
textarea,
td,
p,
small,
.panel-header span,
.helper-card small,
.interview-row span,
.planner-event-popover small {
  font-weight: 400 !important;
}

h1,
h2,
h3,
.brand strong,
.metric-card strong,
.helper-card strong,
.employer-card strong,
.booking-list-table strong,
.interview-row strong,
.planner-month-card strong,
.profile-hero h2,
.module-hero h2 {
  font-weight: 650 !important;
}

label,
th,
.eyebrow,
.side-nav a,
.top-actions span,
.section-title,
.planner-status-check,
.interview-status-badge,
.status-bubble,
.helper-status,
.booking-status,
.receipt-status {
  font-weight: 600 !important;
}

button,
.button,
.legacy-link,
.form-actions button,
.interview-form-actions button,
.booking-save-command,
.icon-action,
.nav-icon,
.brand-mark {
  font-weight: 650 !important;
}

input,
select,
textarea {
  letter-spacing: 0;
}

.share-strip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  padding: 14px;
}

.biodata-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px;
}

.icon-action {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
}

.icon-action:hover,
.icon-action:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .1);
  outline: 0;
}

.icon-action svg {
  background: var(--primary-soft);
  border-radius: 8px;
  color: var(--primary);
  flex: 0 0 auto;
  height: 38px;
  padding: 8px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 38px;
}

.icon-action svg path {
  fill: none;
}

.icon-action span,
.icon-action small {
  display: block;
}

.icon-action b {
  display: block;
  font-size: 14px;
}

.icon-action small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.2;
}

.auth-body {
  background: linear-gradient(135deg, #f8fafc 0%, #e9f6f4 100%);
}
.signin-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.signin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 460px;
  padding: 28px;
  width: 100%;
}
.signin-brand { margin-bottom: 24px; }
.signin-copy h1 { font-size: 30px; line-height: 1.14; margin: 0 0 10px; }
.signin-copy p { color: var(--muted); margin: 0 0 18px; }
.signin-form { display: grid; gap: 14px; }
.signin-form label { color: #344054; display: grid; font-weight: 800; gap: 6px; }
.signin-form input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
}
.signin-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}
.signin-form button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 46px;
}
.signin-note { color: var(--muted); margin: 18px 0 0; }
.signin-note b { color: var(--text); }

.button.light {
  background: white;
  color: var(--primary);
}

.button.secondary-form {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

.helper-ai-assistant {
  bottom: 22px;
  color: white;
  position: fixed;
  right: 22px;
  z-index: 30;
}

.helper-ai-fab {
  align-items: center;
  background: var(--primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(51, 65, 85, .3);
  color: white;
  cursor: pointer;
  display: inline-flex;
  gap: 0;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
  width: 58px;
}

.helper-ai-fab span {
  align-items: center;
  background: white;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: 16px;
  font-weight: 1000;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.helper-ai-fab strong {
  color: white;
  font-size: 13px;
  line-height: 1;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width .18s ease, opacity .18s ease, margin-left .18s ease;
  white-space: nowrap;
}

.helper-ai-fab:hover,
.helper-ai-fab:focus,
.helper-ai-assistant.open .helper-ai-fab {
  gap: 9px;
  justify-content: flex-start;
  padding-right: 16px;
  width: auto;
}

.helper-ai-fab:hover strong,
.helper-ai-fab:focus strong,
.helper-ai-assistant.open .helper-ai-fab strong {
  margin-left: 1px;
  max-width: 110px;
  opacity: 1;
}

.helper-ai-drawer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 58%, var(--primary-deep) 100%);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  bottom: 72px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .32);
  display: grid;
  gap: 12px;
  max-height: min(680px, calc(100vh - 110px));
  overflow: auto;
  padding: 16px;
  position: absolute;
  right: 0;
  width: min(420px, calc(100vw - 28px));
}

.helper-ai-drawer[hidden] {
  display: none;
}

.helper-ai-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.helper-ai-close {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  line-height: 1;
  width: 32px;
}

.helper-ai-copy span {
  color: #cbd5e1;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.helper-ai-copy h3 {
  color: white;
  font-size: 22px;
  line-height: 1.12;
  margin: 7px 0;
}

.helper-ai-example,
.helper-ai-results p {
  color: #ccfbf1;
  margin: 0;
}

.helper-ai-input {
  display: grid;
  gap: 10px;
}

.helper-ai-input textarea {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 104px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.helper-ai-input textarea:focus {
  box-shadow: 0 0 0 3px rgba(153, 246, 228, .38);
  outline: 0;
}

.helper-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.helper-ai-actions button {
  background: white;
  border: 0;
  border-radius: 8px;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 12px;
}

.helper-ai-actions button + button {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .32);
  color: white;
}

.helper-ai-results {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 12px;
}

.helper-ai-results strong {
  color: white;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.ai-result-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.ai-result-list a {
  background: rgba(255, 255, 255, .96);
  border-radius: 8px;
  color: #0f172a;
  display: block;
  padding: 8px 10px;
}

.ai-result-list b,
.ai-result-list span {
  display: block;
}

.ai-result-list span {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
}

.helper-toolbar {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) 160px 170px 210px;
  margin-bottom: 18px;
  padding: 14px;
}

.helper-toolbar input,
.helper-toolbar select,
.ops-form input,
.ops-form select,
.ops-form textarea {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.helper-toolbar input:focus,
.helper-toolbar select:focus,
.ops-form input:focus,
.ops-form select:focus,
.ops-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}

.ops-form textarea {
  min-height: 116px;
  resize: vertical;
}

.helper-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.helper-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 12px;
}

.helper-card.ai-recommended {
  border-color: #94a3b8;
  box-shadow: 0 16px 36px rgba(51, 65, 85, .18);
}

.helper-card[data-owned-card][hidden],
#owned-empty[hidden] {
  display: none;
}

.helper-card.ai-top-pick {
  border-color: #f59e0b;
  box-shadow: 0 18px 40px rgba(245, 158, 11, .24);
}

.helper-avatar {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.helper-photo-tile {
  aspect-ratio: 3 / 4;
  box-shadow: inset 0 0 0 3px white;
  flex: 0 0 auto;
  height: 78px;
  max-height: 78px;
  max-width: 58px;
  overflow: hidden;
  width: 58px;
}

.helper-photo-tile img {
  display: block;
  height: 100%;
  max-height: 78px;
  max-width: 58px;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.helper-photo-tile span {
  align-items: center;
  display: flex;
  font-size: 22px;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.helper-photo-tile .helper-emoji-placeholder {
  font-size: 34px;
  line-height: 1;
}

.helper-avatar.large .helper-emoji-placeholder {
  font-size: 48px;
}

.helper-avatar.large {
  font-size: 30px;
  height: 76px;
  width: 76px;
}

.helper-main {
  min-width: 0;
}

.helper-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.helper-card-head strong,
.helper-card-head span {
  display: block;
}

.helper-card-head div span,
.helper-meta,
.profile-hero p {
  color: var(--muted);
}

.helper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.helper-meta span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-row span,
.check-grid label {
  background: var(--primary-soft);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.skill-row.padded {
  padding: 18px;
}

.ai-match-card {
  align-items: center;
  background: linear-gradient(135deg, #ecfdf3 0%, #f0fdfa 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
  padding: 9px 10px;
}

.ai-match-card span,
.ai-match-card small {
  color: #667085;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ai-match-card strong {
  color: #064e3b;
  display: block;
  font-size: 13px;
  line-height: 1.25;
  margin: 2px 0;
}

.ai-match-card small {
  letter-spacing: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.ai-match-card b {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  height: 38px;
  justify-content: center;
  min-width: 38px;
  padding: 0 7px;
}

.match-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.match-row span {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  color: #92400e;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 7px;
}

.ai-card-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  margin-top: 8px;
  padding: 7px 8px;
}

.progress-line {
  background: #e2e8f0;
  border-radius: 999px;
  height: 7px;
  margin: 12px 0 10px;
  overflow: hidden;
}

.progress-line span {
  background: var(--primary);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.helper-link {
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
}

.helper-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  overflow: hidden;
}

.helper-card-actions a {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #475467;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.helper-card-actions a:hover,
.helper-card-actions a:focus {
  background: var(--primary-soft);
  border-color: #cbd5e1;
  color: var(--primary);
  outline: 0;
}

.helper-card-actions svg {
  display: block;
  flex: 0 0 15px;
  height: 15px;
  max-height: 15px;
  max-width: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 15px;
}

.helper-card-actions svg path,
.helper-card-actions svg circle {
  fill: none;
}

.print-popup,
.document-popup {
  background: rgba(15, 23, 42, .58);
  inset: 0;
  padding: 18px;
  position: fixed;
  z-index: 80;
}

.print-popup[hidden],
.document-popup[hidden] {
  display: none;
}

.print-popup-open,
.document-popup-open {
  overflow: hidden;
}

.print-popup-panel,
.document-popup-panel {
  background: white;
  border-radius: 0;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .34);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 36px);
  margin: 0 auto;
  max-width: 1040px;
  overflow: hidden;
  width: 100%;
}

.print-popup-bar,
.document-popup-bar {
  align-items: center;
  background: var(--primary);
  color: white;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 52px;
  padding: 9px 12px;
}

.print-popup-bar strong,
.document-popup-bar strong {
  color: white;
  font-size: 15px;
}

.print-popup-bar div,
.document-popup-bar div {
  display: flex;
  gap: 8px;
}

.print-popup-bar button,
.document-popup-bar button,
.document-popup-bar a {
  align-items: center;
  background: white;
  border: 0;
  border-radius: 6px;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  text-decoration: none;
}

.print-popup-bar button + button,
.document-popup-bar button {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .35);
  color: white;
}

.print-popup iframe,
.document-popup iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.ops-form {
  display: grid;
  gap: 18px;
}

.biodata-flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 16px;
  position: sticky;
  top: 10px;
  z-index: 6;
}

.biodata-flow-head {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.biodata-flow-head strong {
  font-size: 16px;
}

.biodata-flow-head > span {
  color: var(--primary);
  font-weight: 900;
}

.biodata-progress {
  background: #e2e8f0;
  border-radius: 999px;
  height: 6px;
  margin-bottom: 14px;
  overflow: hidden;
}

.biodata-progress span {
  background: var(--primary);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width .2s ease;
  width: 20%;
}

.biodata-tablist {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.employer-tablist {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.biodata-tablist button {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 9px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
}

.biodata-tablist button b {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.biodata-tablist button span,
.biodata-tablist button small {
  display: block;
}

.biodata-tablist button span {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.biodata-tablist button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

.biodata-tablist button.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.biodata-tablist button.active b,
.biodata-tablist button.complete b {
  background: var(--primary);
  color: white;
}

.biodata-tablist button.complete:not(.active) {
  border-color: #9ad8cd;
}

.biodata-tabs-form > .form-panel {
  scroll-margin-top: 148px;
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.personal-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.personal-grid .photo-upload {
  grid-column: span 2;
}

.form-grid .span-3 {
  grid-column: 1 / -1;
}

.form-grid label {
  color: #344054;
  display: grid;
  font-weight: 800;
  gap: 5px;
}

.checkbox-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-grid label {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
}

.checkbox-grid input {
  min-height: 0 !important;
  width: auto;
}

.document-prep-popup {
  background: var(--bg);
  min-height: 100vh;
  padding: 18px;
}

.document-prep-popup .documents-hero {
  margin-bottom: 14px;
}

.document-prep-popup .documents-hero h2 {
  font-size: 24px;
}

.document-prep-popup .biodata-tabs-form {
  display: grid;
  gap: 14px;
}

.compact-biodata .panel-header {
  padding: 12px 14px;
}

.compact-biodata .panel-header h2 {
  font-size: 16px;
}

.compact-biodata .panel-header span {
  font-size: 12px;
}

.compact-biodata .form-panel {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.compact-biodata .form-grid input,
.compact-biodata .form-grid select,
.compact-biodata .form-grid textarea,
.compact-biodata .matrix-row input {
  min-height: 38px;
  padding: 8px 10px;
}

.compact-biodata .form-grid textarea {
  min-height: 82px;
}

.photo-upload {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 92px minmax(0, 1fr);
  padding: 10px;
}

.photo-preview {
  align-items: center;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 50% 32%, rgba(51, 65, 85, .16), transparent 34%),
    linear-gradient(180deg, #f8fafc, #eef4f7);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px white, 0 10px 24px rgba(15, 23, 42, .08);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 82px;
}

.photo-preview img {
  height: 100%;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.photo-preview span {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
  text-align: center;
}

.photo-preview span b {
  color: var(--primary);
  font-size: 13px;
}

.photo-preview span small {
  color: var(--muted);
  font-size: 10px;
}

.photo-upload label {
  color: #344054;
  display: grid;
  font-weight: 900;
  gap: 5px;
}

.photo-upload input {
  font-size: 12px;
  min-height: auto;
  padding: 0;
}

.photo-upload small {
  color: var(--muted);
  font-weight: 700;
}

.form-grid small,
.field-error {
  color: #b42318;
  font-weight: 800;
  margin: 0;
}

.has-error input,
.has-error select,
.has-error textarea,
.has-error-box {
  border-color: #f04438 !important;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, .12);
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.check-grid label {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.check-grid input {
  min-height: auto;
  width: auto;
}

.field-error {
  padding: 0 18px 18px;
}

.required-pill,
.privacy-pill {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.required-pill {
  background: var(--primary-soft);
  color: var(--primary);
}

.privacy-pill {
  background: #fff7ed;
  color: #9a3412;
}

.document-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}

.document-grid label {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  font-weight: 800;
  min-height: 56px;
  padding: 12px;
}

.biodata-document-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.document-upload {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 12px;
}

.document-thumb {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--primary);
  display: flex;
  font-weight: 900;
  justify-content: center;
  overflow: hidden;
  width: 96px;
}

.document-thumb img {
  height: 100%;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.pdf-thumb {
  align-items: center;
  background: #fff1f3;
  border: 1px solid #fda4af;
  border-radius: 8px;
  color: #be123c;
  display: inline-flex;
  font-size: 18px;
  height: 54px;
  justify-content: center;
  width: 66px;
}

.empty-thumb {
  color: var(--muted);
  font-size: 12px;
}

.document-upload label,
.tracking-doc-upload label {
  color: #344054;
  display: grid;
  font-weight: 900;
  gap: 5px;
}

.document-upload input,
.tracking-doc-upload input {
  font-size: 12px;
  min-height: auto;
  padding: 0;
}

.document-upload small,
.tracking-doc-upload small {
  color: var(--muted);
  font-weight: 700;
}

.document-file-name {
  color: var(--primary) !important;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employer-searchbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 220px auto auto auto;
  padding: 14px 18px;
}

.employer-searchbar input,
.employer-searchbar select,
.employer-searchbar button,
.employer-searchbar .button {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.employer-searchbar button {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  cursor: pointer;
  min-width: 96px;
}

.employer-searchbar .button {
  align-items: center;
  background: var(--surface);
  display: inline-flex;
  justify-content: center;
  min-width: 78px;
  text-decoration: none;
}

.employer-result-count {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 1000;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
}

.employer-searchbar input:focus,
.employer-searchbar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}

.employer-workbench {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr);
  min-height: 520px;
}

.employer-results {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 10px;
  max-height: 680px;
  overflow: auto;
  padding: 14px;
}

.employer-searchbar.is-searching input,
.employer-searchbar.is-searching select {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .12);
}

.employer-search-loading {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}

.employer-search-loading strong {
  color: var(--primary);
  font-size: 18px;
}

.employer-search-loading small {
  color: var(--muted);
  font-weight: 800;
}

.employer-search-spinner {
  animation: helperops-spin .75s linear infinite;
  border: 4px solid rgba(51, 65, 85, .18);
  border-top-color: var(--primary);
  border-radius: 999px;
  height: 36px;
  width: 36px;
}

@keyframes helperops-spin {
  to { transform: rotate(360deg); }
}

.employer-card {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) 70px;
  padding: 12px;
  text-align: left;
}

.employer-card:hover,
.employer-card:focus,
.employer-card.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  outline: 0;
}

.employer-avatar {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 18px;
  font-weight: 1000;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.employer-avatar.large {
  font-size: 26px;
  height: 66px;
  width: 66px;
}

.employer-card-main,
.employer-card-main strong,
.employer-card-main small,
.employer-card-meta,
.employer-card-meta b,
.employer-card-meta small {
  display: block;
  min-width: 0;
}

.employer-card-main strong {
  font-size: 15px;
  line-height: 1.25;
}

.employer-card-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employer-card-main .employer-credit-pill {
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 999px;
  color: #166534;
  display: inline-block;
  font-weight: 1000;
  margin-top: 6px;
  max-width: 100%;
  padding: 4px 8px;
}

.employer-card-meta {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.employer-card-meta b {
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
}

.employer-card-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.employer-detail {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  min-width: 0;
  padding: 18px;
}

.employer-detail-content {
  position: relative;
}

.employer-detail-edit-icon {
  align-items: center;
  background: #f59e0b;
  border: 1px solid #d97706;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(245, 158, 11, .24);
  color: #111827;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 0;
  text-decoration: none;
  top: 0;
  width: 42px;
  z-index: 2;
}

.employer-detail-edit-icon svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.employer-detail-edit-icon:hover,
.employer-detail-edit-icon:focus {
  background: #fbbf24;
  box-shadow: 0 12px 26px rgba(245, 158, 11, .34);
  outline: 0;
}

.employer-detail-empty {
  align-items: center;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 900;
  justify-content: center;
  min-height: 260px;
  padding: 18px;
  text-align: center;
}

.employer-detail-empty[hidden],
.employer-detail-content[hidden] {
  display: none !important;
}

.employer-detail-head {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 66px minmax(0, 1fr);
  margin-bottom: 14px;
  padding-right: 52px;
}

.employer-detail-head h2 {
  font-size: 26px;
  line-height: 1.1;
}

.employer-detail-head p:last-child {
  color: var(--muted);
  margin: 4px 0 0;
}

.employer-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
}

.employer-summary-grid strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.employer-booking-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin: 14px 0;
}

.employer-booking-form button,
.employer-booking-form .button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 46px;
  padding: 11px 14px;
  width: 100%;
}

.employer-booking-form .button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  display: inline-flex;
  justify-content: center;
}

.employer-booking-form .employer-edit-button {
  background: #f59e0b;
  border: 1px solid #d97706;
  box-shadow: 0 10px 22px rgba(245, 158, 11, .24);
  color: #111827;
  font-size: 15px;
  letter-spacing: .01em;
}

.employer-booking-form .employer-edit-button:hover,
.employer-booking-form .employer-edit-button:focus {
  background: #fbbf24;
  box-shadow: 0 12px 26px rgba(245, 158, 11, .34);
}

.mini-history {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.mini-history-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.history-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: block;
  padding: 11px 12px;
  text-decoration: none;
}

.history-item:hover,
.history-item:focus {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(51, 65, 85, .10);
  outline: 0;
}

.history-item strong,
.history-item span,
.history-item small {
  display: block;
}

.history-item span {
  color: var(--text);
  font-weight: 800;
  margin-top: 3px;
}

.history-item small {
  color: var(--muted);
  font-weight: 800;
  margin-top: 3px;
}

.history-item small .status {
  display: inline-flex;
  margin-right: 6px;
  padding: 5px 8px;
}

.booking-builder {
  display: grid;
  gap: 18px;
}

.booking-searchbar {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  padding: 14px 18px;
}

.booking-searchbar input,
.booking-searchbar button,
.booking-searchbar .button {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.booking-searchbar button {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  cursor: pointer;
  min-width: 96px;
}

.booking-searchbar .button {
  align-items: center;
  background: var(--surface);
  display: inline-flex;
  justify-content: center;
  min-width: 78px;
  text-decoration: none;
}

.booking-searchbar span {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 1000;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
}

.booking-table-wrap {
  overflow-x: visible;
}

.booking-table {
  min-width: 0;
  table-layout: fixed;
}

.booking-table th,
.booking-table td {
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.booking-table th:nth-child(1) { width: 19%; }
.booking-table th:nth-child(2) { width: 22%; }
.booking-table th:nth-child(3) { width: 22%; }
.booking-table th:nth-child(4) { width: 12%; }
.booking-table th:nth-child(5) { width: 11%; }
.booking-table th:nth-child(6) { width: 14%; }

.clickable-booking-row {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.clickable-booking-row:hover,
.clickable-booking-row:focus {
  background: #f1f5f9;
  box-shadow: inset 4px 0 0 var(--primary), 0 8px 18px rgba(15, 23, 42, .07);
  outline: 0;
}

.clickable-booking-row:active {
  transform: scale(.998);
}

.booking-main-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.booking-main-cell strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 1000;
  line-height: 1.25;
}

.booking-main-cell small,
.booking-muted-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.booking-code-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 1000;
  padding: 4px 8px;
}

.booking-total-cell {
  color: var(--primary);
  font-size: 15px;
  font-weight: 1000;
  white-space: nowrap;
}

.booking-search-progress td {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 12px;
  padding: 18px;
}

.booking-search-progress strong {
  color: var(--text);
  display: block;
  font-size: 14px;
  font-weight: 1000;
}

.booking-search-progress small {
  display: block;
  font-weight: 800;
  margin-top: 3px;
}

.booking-search-spinner {
  animation: helperops-spin .75s linear infinite;
  border: 3px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 999px;
  display: inline-block;
  height: 22px;
  width: 22px;
}

.booking-row-link {
  color: var(--primary);
  text-decoration: none;
}

.booking-row-link:hover {
  text-decoration: underline;
}

.booking-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.booking-edit-hero {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px;
}

.booking-edit-hero h2 {
  font-size: 28px;
  margin: 2px 0 6px;
}

.booking-edit-hero p {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
}

.booking-status-card {
  align-items: flex-end;
  display: grid;
  gap: 7px;
  justify-items: end;
  min-width: 180px;
}

.booking-status-card small {
  color: var(--muted);
  font-weight: 900;
}

.booking-status-card strong {
  color: #c01048;
  font-size: 13px;
}

.booking-tool-strip {
  align-items: stretch;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  padding: 8px;
}

.booking-tool,
.booking-tool-menu summary {
  align-items: center;
  appearance: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 1px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(51, 65, 85, .16);
  box-sizing: border-box;
  color: white;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 4px;
  justify-items: center;
  min-height: 54px;
  padding: 6px 5px;
  text-decoration: none;
  width: 100%;
}

.booking-tool span,
.booking-tool-menu summary span {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0;
  font-weight: 1000;
  height: 24px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
  padding: 0 6px;
}

.booking-tool span::before,
.booking-tool-menu summary span::before {
  font-size: 13px;
  line-height: 1;
}

.tool-save span::before { content: "\2713"; }
.tool-payment span::before { content: "$"; }
.tool-docs span::before { content: "\25A3"; }
.tool-track span::before { content: "\2192"; }
.tool-return span::before { content: "\21B5"; }
.tool-cancel span::before { content: "\00D7"; }
.tool-deploy span::before { content: "\25B6"; }
.tool-pdf span::before { content: "PDF"; font-size: 8px; }
.tool-print span::before { content: "PR"; font-size: 8px; }

.booking-tool strong,
.booking-tool-menu summary strong {
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
}

.booking-tool:hover,
.booking-tool-menu summary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-deep));
  border-color: var(--primary-dark);
  box-shadow: 0 12px 26px rgba(51, 65, 85, .24);
}

.booking-tool.good span {
  background: rgba(220, 252, 231, .22);
  color: white;
}

.booking-tool.danger span {
  background: rgba(255, 228, 230, .22);
  color: white;
}

.booking-tool.warning span {
  background: rgba(254, 243, 199, .22);
  color: white;
}

.booking-tool:disabled,
.booking-tool-menu summary:has(+ div:empty) {
  cursor: not-allowed;
  opacity: .45;
}

.booking-tool-menu {
  min-width: 0;
  position: relative;
}

.booking-tool-menu summary {
  list-style: none;
}

.booking-tool-menu summary::-webkit-details-marker {
  display: none;
}

.booking-tool-menu > div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
  left: 0;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 30;
}

.booking-tool-menu a {
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  padding: 9px 10px;
  text-decoration: none;
}

.booking-tool-menu a:hover {
  background: var(--surface);
  color: var(--primary);
}

.booking-documents-menu > .booking-documents-dropdown {
  width: min(360px, calc(100vw - 48px));
  min-width: 0;
  max-height: min(480px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.booking-documents-dropdown .booking-documents-workspace {
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
}

.booking-documents-group h3 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin: 10px 8px 3px;
  text-transform: uppercase;
}

.booking-document-entry {
  display: flex;
  align-items: center;
  gap: 4px;
}

.booking-document-entry > a {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  padding: 8px;
}

.booking-document-entry > .booking-document-edit {
  flex: 0 0 auto;
  color: var(--primary);
  border: 1px solid var(--line);
  font-size: 12px;
  padding: 5px 8px;
}

.booking-command-bar {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 8px;
}

.booking-command-left,
.booking-command-right {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-command-right {
  justify-content: flex-end;
}

.booking-icon-tool,
.booking-icon-menu > summary {
  align-items: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(51, 65, 85, .14);
  color: white;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
}

.booking-icon-tool:hover,
.booking-icon-tool:focus,
.booking-icon-menu > summary:hover,
.booking-icon-menu > summary:focus,
.booking-save-command:hover,
.booking-save-command:focus,
.booking-status-actions > summary:hover,
.booking-status-actions > summary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  outline: 0;
}

.booking-icon-tool span,
.booking-icon-menu > summary span,
.booking-save-command span,
.booking-workflow-actions button span {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0;
  font-weight: 1000;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-width: 22px;
  padding: 0 5px;
}

.booking-icon-tool span::before,
.booking-icon-menu > summary span::before,
.booking-save-command span::before,
.booking-workflow-actions button span::before {
  font-size: 12px;
  line-height: 1;
}

.booking-icon-tool strong,
.booking-icon-menu > summary strong {
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.booking-workflow-actions {
  align-items: center;
  background: #f8fbff;
  border: 1px solid var(--primary-line);
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  padding: 4px;
}

.booking-workflow-actions button,
.booking-save-command {
  align-items: center;
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 1000;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
}

.booking-workflow-actions button {
  background: var(--primary);
  justify-content: center;
  min-width: 86px;
}

.booking-workflow-actions button.good { background: #15803d; }
.booking-workflow-actions button.warning { background: #b45309; }
.booking-workflow-actions button.danger { background: #be123c; }

.booking-save-command {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 22px rgba(51, 65, 85, .2);
  padding-inline: 16px;
}

.booking-workflow-actions button:disabled,
.booking-save-command:disabled {
  cursor: not-allowed;
  filter: grayscale(.35);
  opacity: .46;
}

.booking-freeze-alert {
  background: #fff1f3;
  border: 1px solid #fda4af;
  border-radius: 8px;
  color: #9f1239;
  font-weight: 900;
  padding: 14px 16px;
}

.booking-payment-panel {
  scroll-margin-top: 18px;
}

.booking-payment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.booking-payment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.booking-payment-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.booking-payment-card strong {
  color: var(--primary);
  font-size: 24px;
  font-weight: 1000;
}

.booking-payment-card small {
  color: var(--muted);
  font-weight: 900;
}

.payment-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-bubble {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  padding: 9px 11px;
}

.payment-bubble.paid {
  background: #dcfce7;
  border: 1px solid #22c55e;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .16);
  color: #166534;
}

.payment-bubble.balance {
  background: #ffe4e6;
  border: 1px solid #fb7185;
  box-shadow: 0 8px 18px rgba(225, 29, 72, .17);
  color: #be123c;
}

.booking-payment-card.total {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.booking-payment-form {
  align-items: end;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.1fr 1fr 1fr .9fr 1.4fr auto;
  padding: 12px;
}

.booking-payment-form label {
  color: var(--text);
  display: grid;
  font-size: 12px;
  font-weight: 1000;
  gap: 6px;
}

.booking-payment-form input,
.booking-payment-form select {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

.booking-payment-form button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}

.credit-summary-bar {
  align-items: center;
  background: linear-gradient(120deg, #f7fbfa 0%, #ffffff 70%);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 14px 16px;
}

.credit-refund-trigger {
  align-items: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(51, 65, 85, .16);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  gap: 9px;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
  white-space: nowrap;
}

.credit-refund-trigger:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 7px 18px rgba(51, 65, 85, .23);
  transform: translateY(-1px);
}

.credit-refund-trigger:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .35);
  outline-offset: 2px;
}

.credit-refund-trigger:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.credit-refund-trigger-icon {
  align-items: center;
  background: rgba(255, 255, 255, .15);
  border-radius: 50%;
  display: inline-flex;
  font-size: 17px;
  height: 25px;
  justify-content: center;
  line-height: 1;
  width: 25px;
}

.credit-summary-bar h3,
.credit-dialog-heading h3 {
  margin: 0 0 4px;
}

.credit-summary-bar span,
.credit-dialog-heading span {
  color: var(--muted);
}

.employer-credit-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 620px;
  padding: 0;
  width: min(620px, calc(100vw - 32px));
}

.employer-credit-dialog::backdrop {
  background: rgba(15, 23, 42, .42);
}

.credit-refund-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
}

.credit-dialog-heading,
.credit-dialog-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.credit-refund-form label {
  color: var(--text);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  min-width: 0;
}

.credit-refund-form input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
  min-width: 0;
  padding: 9px 11px;
  width: 100%;
}

.credit-note-field,
.credit-dialog-actions {
  grid-column: 1 / -1;
}

.booking-payment-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.booking-payment-receipt {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 12px;
}

.booking-payment-receipt.voided {
  background: #f8fafc;
  opacity: .72;
}

.booking-payment-receipt .receipt-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.booking-payment-receipt strong {
  color: var(--text);
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-payment-receipt small {
  color: var(--muted);
  font-weight: 850;
}

.booking-payment-amount {
  color: var(--primary);
  font-size: 18px;
  font-weight: 1000;
  white-space: nowrap;
}

.receipt-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.receipt-icon {
  align-items: center;
  background: #eef8f6;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 1000;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 34px;
}

.receipt-icon:hover,
.receipt-icon:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .12);
  outline: 0;
}

.receipt-icon svg {
  display: block;
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.receipt-icon.danger {
  background: #fff1f3;
  border-color: #fecdd3;
  color: #be123c;
  list-style: none;
}

.receipt-void-menu {
  position: relative;
}

.receipt-void-menu summary {
  list-style: none;
}

.receipt-void-menu summary::-webkit-details-marker {
  display: none;
}

.receipt-void-menu form {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  grid-template-columns: 180px auto;
  padding: 9px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  width: 270px;
  z-index: 35;
}

.receipt-void-menu input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  min-height: 36px;
  padding: 7px 9px;
  width: 100%;
}

.receipt-void-menu button {
  background: #be123c;
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 36px;
  padding: 7px 10px;
}

.receipt-edit-menu form {
  align-items: stretch;
  grid-template-columns: 1fr;
  width: 310px;
}

.receipt-edit-menu label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 4px;
}

.receipt-edit-menu select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  min-height: 36px;
  padding: 7px 9px;
  width: 100%;
}

.receipt-edit-menu button {
  background: var(--primary);
}

.voided-pill {
  background: #ffe4e6;
  border: 1px solid #fb7185;
  border-radius: 999px;
  color: #be123c;
  font-size: 12px;
  font-weight: 1000;
  padding: 8px 10px;
  text-transform: uppercase;
}

.booking-flow {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.booking-flow span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  padding: 9px 10px;
  text-align: center;
}

.booking-flow span.active {
  background: #d1fadf;
  border-color: #32d583;
  color: #05603a;
}

.booking-flow span.danger {
  background: #ffe4e6;
  border-color: #fb7185;
  color: #be123c;
}

.booking-status-dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 520px;
  padding: 0;
  width: min(520px, calc(100vw - 32px));
}

.booking-status-dialog::backdrop {
  background: rgba(15, 23, 42, .35);
}

.booking-status-dialog form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.booking-status-dialog h3 {
  margin: 0;
}

.status-dialog-head {
  align-items: center;
  background: linear-gradient(135deg, #f1f5f9, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 12px;
}

.status-dialog-head > span {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-weight: 1000;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.status-dialog-head p {
  color: var(--muted);
  font-weight: 800;
  margin: 4px 0 0;
}

.status-dialog-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-dialog-summary div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.status-dialog-summary span,
.status-date-field small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.status-dialog-summary strong {
  color: var(--text);
  display: block;
  font-size: 16px;
  margin-top: 3px;
}

.status-date-field {
  color: var(--text);
  display: grid;
  font-weight: 1000;
  gap: 7px;
}

.status-date-field input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 44px;
  padding: 9px 11px;
}

.status-date-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}

.status-dialog-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-weight: 900;
  padding: 10px 12px;
}

.status-payment-warning {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #9f1239;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.status-payment-warning[hidden] {
  display: none;
}

.status-payment-warning strong {
  color: #be123c;
  font-size: 15px;
}

.status-payment-warning p {
  margin: 0;
}

.status-payment-warning div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-payment-warning span {
  background: #ffffff;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  padding: 7px 10px;
}

.status-payment-warning b {
  color: #be123c;
}

.return-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.return-saved-banner {
  background: #ecfdf3;
  border: 1px solid #86efac;
  border-radius: 8px;
  color: #166534;
  font-weight: 900;
  padding: 10px 12px;
}

.return-saved-banner strong {
  color: #064e3b;
}

.return-panel[hidden] {
  display: none;
}

.return-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.return-grid div {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px;
}

.return-grid span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.return-grid strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  margin-top: 3px;
}

.return-inputs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.return-inputs label {
  color: var(--text);
  display: grid;
  font-weight: 1000;
  gap: 6px;
}

.return-inputs input,
.return-inputs textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  padding: 10px 11px;
}

.return-inputs .span-2 {
  grid-column: 1 / -1;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dialog-actions button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 42px;
  padding: 9px 14px;
}

.dialog-actions button[type="submit"] {
  background: var(--primary);
  color: white;
}

.dialog-actions .warning-action {
  background: #f59e0b;
  color: #111827;
}

.dialog-actions .warning-action[hidden] {
  display: none;
}

.dialog-actions .secondary-action {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.booking-type-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  font-weight: 1000;
  padding: 12px;
}

.choice-card input {
  accent-color: var(--primary);
}

.booking-replacement-code {
  display: grid;
  font-weight: 900;
  gap: 8px;
  margin-top: 12px;
}

.booking-replacement-code input,
.booking-package-row select,
.booking-add-line input,
.booking-line-item input,
.booking-total-panel input,
.booking-term-field input {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.booking-term-field {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 1000;
  gap: 7px;
  padding: 12px;
  text-transform: uppercase;
}

.booking-term-field input {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 1000;
  min-height: 28px;
  padding: 0;
}

.booking-term-field input:focus {
  box-shadow: none;
  outline: 0;
}

.booking-term-field:focus-within {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .12);
}

.booking-helper-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  padding: 16px;
}

.booking-helper-picker {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.booking-helper-picker label {
  color: var(--text);
  display: grid;
  font-weight: 1000;
  gap: 8px;
}

.booking-helper-picker input {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 48px;
  padding: 11px 13px;
  width: 100%;
}

.booking-helper-picker input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, .14);
  outline: 0;
}

.booking-helper-selected {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr);
  padding: 12px;
}

.booking-helper-selected strong,
.booking-helper-selected small {
  display: block;
}

.booking-helper-selected small {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.booking-helper-card {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr);
  padding: 12px;
  text-align: left;
}

.booking-helper-card:hover,
.booking-helper-card:focus,
.booking-helper-card.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  outline: 0;
}

.booking-helper-card strong,
.booking-helper-card small {
  display: block;
  min-width: 0;
}

.booking-helper-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-main-grid {
  grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr);
}

.booking-package-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}

.booking-line-items {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.booking-line-item {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 110px 74px 36px;
  padding: 10px;
}

.booking-line-item input {
  background: white;
  font-size: 14px;
  font-weight: 1000;
}

.booking-line-item input[type="checkbox"],
.booking-add-line input[type="checkbox"] {
  accent-color: var(--primary);
  height: 20px;
  min-height: 20px;
  padding: 0;
  width: 20px;
}

.booking-line-item label,
.booking-add-line label {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  font-weight: 1000;
  gap: 6px;
  justify-content: center;
}

.booking-line-item button {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  cursor: pointer;
  font-weight: 1000;
  height: 36px;
}

.booking-add-line {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px 70px auto;
  padding: 16px;
}

.booking-total-panel {
  padding: 16px;
}

.booking-totals {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(140px, .9fr) repeat(3, minmax(120px, 1fr)) auto;
}

.booking-totals label,
.booking-totals div {
  display: grid;
  gap: 6px;
}

.booking-totals span,
.booking-totals label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.booking-totals strong {
  color: var(--primary);
  font-size: 22px;
}

.booking-totals button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  min-height: 46px;
  padding: 11px 18px;
  white-space: nowrap;
}

.matrix-grid {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.matrix-row {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(140px, 1fr) 92px 72px 86px 82px 82px;
  padding: 10px;
}

.matrix-grid.compact .matrix-row {
  grid-template-columns: 150px 92px 72px 86px 82px 82px;
}

.matrix-row label {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  font-weight: 800;
}

.matrix-row input {
  min-height: 38px;
}

.span-full {
  grid-column: 1 / -1;
  padding: 0;
}

.form-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.sticky-actions {
  background: rgba(244, 247, 251, .9);
  border-top: 1px solid var(--line);
  bottom: 0;
  margin: 0 -28px -28px;
  padding: 14px 28px;
  position: sticky;
  z-index: 5;
}

.form-actions button {
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 42px;
  padding: 10px 16px;
}

.form-actions .secondary-action {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

.form-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.profile-hero {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding: 22px;
}

.profile-hero h2 {
  font-size: 32px;
  line-height: 1.12;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.profile-actions .button.secondary {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
}

.summary-grid div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.summary-grid span {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.summary-grid strong {
  display: block;
  font-size: 22px;
  margin-top: 5px;
}

.summary-grid strong.status {
  display: inline-flex;
  font-size: 12px;
  margin-top: 8px;
}

.summary-grid .credit-summary {
  background: #ecfdf3;
  border-color: #86efac;
}

.summary-grid .credit-summary span,
.summary-grid .credit-summary strong {
  color: #166534;
}

.summary-grid .credit-summary small {
  color: #047857;
  display: block;
  font-weight: 900;
  margin-top: 4px;
}

.documents-hero {
  align-items: center;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 28px;
}

.documents-hero h2 {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  margin: 4px 0 10px;
  max-width: 820px;
}

.documents-hero p {
  color: rgba(255, 255, 255, .84);
  font-size: 17px;
  margin: 0;
  max-width: 760px;
}

.documents-hero .eyebrow {
  color: rgba(255, 255, 255, .72);
}

.documents-hero .primary-action {
  background: #ffffff;
  border-radius: 8px;
  color: var(--primary-deep);
  flex: 0 0 auto;
  font-weight: 900;
  padding: 14px 18px;
  text-decoration: none;
}

.documents-hero.documents-compact-heading {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin-bottom: 14px;
  gap: 12px;
}

.documents-compact-heading h2 {
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
}

.documents-compact-heading .primary-action {
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
}

.documents-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
}

.documents-booking-panel,
.documents-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  min-width: 0;
}

.documents-booking-panel {
  align-self: start;
  overflow: hidden;
  position: sticky;
  top: 18px;
}

.documents-search {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.documents-search input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  min-width: 0;
  padding: 13px 14px;
}

.documents-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.documents-booking-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 330px);
  overflow: auto;
  padding: 14px;
}

.documents-booking-list a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 5px;
  padding: 12px;
  text-decoration: none;
}

.documents-booking-list a.active,
.documents-booking-list a:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.documents-booking-list strong {
  font-size: 16px;
}

.documents-booking-list small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.documents-workspace {
  padding: 14px;
}

.selected-document-booking {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, var(--primary-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 12px;
  overflow-wrap: anywhere;
}

.selected-document-booking h2 {
  font-size: 20px;
  margin: 3px 0;
}

.selected-document-booking p,
.selected-document-booking small {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  margin: 0;
}

.selected-document-booking > div:last-child {
  display: grid;
  gap: 9px;
  justify-items: end;
}

.document-group + .document-group {
  margin-top: 0;
}

.document-group h3 {
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 7px;
}

.document-group h3 small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-left: 4px;
}

.document-card-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
}

.document-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  position: relative;
  transition: border-color .18s ease, background-color .18s ease;
}

.document-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.document-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.documents-batch-form {
  display: grid;
  gap: 12px;
}

.document-batch-bar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px;
  position: sticky;
  top: 8px;
  z-index: 5;
}

.document-selection-count {
  color: var(--muted);
  font-size: 12px;
  margin-right: auto;
}

.document-select-all,
.document-card-check {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 500;
  gap: 8px;
}

.document-select-all input,
.document-card-check input {
  accent-color: var(--primary);
  height: 18px;
  width: 18px;
  flex: 0 0 18px;
  margin: 0;
}

.document-card-check {
  min-height: 34px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.document-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.document-batch-actions button {
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  min-height: 36px;
  padding: 8px 12px;
}

.document-batch-actions button:last-child {
  background: #ffffff;
  color: var(--primary-deep);
}

.document-batch-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.document-icon {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: 8px;
  color: var(--primary-deep);
  display: inline-flex;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  margin-bottom: 12px;
  width: 38px;
}

.document-card h4 {
  font-size: 18px;
  margin: 0 74px 7px 0;
}

.document-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  margin: 0;
}

.document-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 26px;
}

.document-actions a,
.document-actions span {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--primary-deep);
  display: inline-flex;
  font-size: 12px;
  font-weight: 500;
  min-height: 30px;
  padding: 4px 9px;
  text-decoration: none;
}

.document-actions a:first-child {
  background: var(--primary-soft);
  border-color: var(--primary-line);
  color: var(--primary-deep);
}

.document-actions span {
  color: var(--muted);
  opacity: .72;
}

@media (max-width: 760px) {
  .document-batch-bar {
    align-items: center;
    flex-direction: row;
  }

  .document-batch-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .document-batch-actions button {
    flex: 1;
  }

  .booking-documents-menu > .booking-documents-dropdown {
    position: static;
    margin-top: 6px;
    width: 100%;
    max-height: 50vh;
  }

  .booking-edit-hero {
    align-items: flex-start;
    flex-direction: column;
    overflow-wrap: anywhere;
  }

  .booking-edit-hero h2 {
    font-size: 22px;
  }

  .booking-status-card {
    justify-items: start;
    min-width: 0;
  }

  .document-actions a {
    min-height: 36px;
  }
}

.vendors-hero { align-items: stretch; }
.vendor-stat-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: min(520px, 100%);
}
.vendor-stat-strip div {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  padding: 14px;
}
.vendor-stat-strip span,
.vendor-kpis small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.accounting-hero {
  align-items: stretch;
}

.accounting-hero h2 {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  max-width: 760px;
}

.accounting-workspace-nav {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 6px;
  margin: 14px 0 18px;
  overflow-x: auto;
  padding: 8px;
  scrollbar-width: thin;
}

.accounting-workspace-nav a {
  border-radius: 8px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 850;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.accounting-workspace-nav a:hover { background: #f3f6fa; color: var(--ink); }
.accounting-workspace-nav a.active { background: #203754; color: #fff; }

.accounting-hero-actions {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.accounting-hero-actions .button.secondary {
  background: #ffffff;
  color: var(--primary-deep);
}

.accounting-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.accounting-kpi {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.accounting-kpi span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.accounting-kpi strong {
  color: var(--ink);
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-top: 10px;
}

.accounting-kpi small {
  color: var(--muted);
  display: block;
  font-weight: 750;
  margin-top: 9px;
}

.accounting-kpi.income strong,
.accounting-cashbook-list article.income span {
  color: #047857;
}

.accounting-kpi.expense strong,
.accounting-cashbook-list article.expense span {
  color: #be123c;
}

.accounting-kpi.credit strong { color: #1d4ed8; }
.accounting-kpi.refund strong { color: #b45309; }

.accounting-kpi.net-positive strong {
  color: #1f3f77;
}

.accounting-kpi.net-negative strong {
  color: #be123c;
}

.accounting-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  margin-bottom: 16px;
}

.accounting-layout.accounting-single { grid-template-columns: minmax(0, 1fr); }

.accounting-overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 18px;
}

.accounting-overview-card { padding: 22px; }
.accounting-overview-card h2 { color: var(--ink); font-size: 21px; margin: 8px 0; }
.accounting-overview-card p { color: var(--muted); line-height: 1.6; margin: 0; max-width: 620px; }
.accounting-overview-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

.accounting-expense-form,
.accounting-filter-form,
.accounting-integration-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accounting-expense-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounting-integration-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounting-expense-form label,
.accounting-filter-form label,
.accounting-integration-form label {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  font-weight: 850;
  gap: 7px;
}

.accounting-expense-form input,
.accounting-expense-form select,
.accounting-expense-form textarea,
.accounting-filter-form input,
.accounting-filter-form select,
.accounting-integration-form input,
.accounting-integration-form select,
.accounting-integration-form textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: 800 14px var(--font);
  min-height: 42px;
  padding: 10px 12px;
}

.accounting-expense-form textarea {
  resize: vertical;
}

.accounting-integration-form textarea {
  grid-column: 1 / -1;
  resize: vertical;
}

.accounting-integration-form .accounting-check {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding-top: 25px;
}

.accounting-integration-form .accounting-check input {
  accent-color: #167d72;
  height: 18px;
  margin: 0;
  width: 18px;
}

.accounting-note {
  background: #f1f7f7;
  border-left: 3px solid #167d72;
  color: #53657d;
  line-height: 1.5;
  margin: 14px 0 0;
  padding: 10px 12px;
}

.accounting-note-panel {
  align-self: stretch;
}

.accounting-expense-form .span-2,
.accounting-filter-form .span-2 {
  grid-column: span 2;
}

.accounting-inline-history {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 16px 2px;
}

.accounting-inline-history strong { color: var(--ink); font-size: 12px; }
.accounting-inline-history small { color: var(--muted); font-size: 11px; }

.accounting-filter-form button,
.accounting-expense-form button,
.accounting-integration-form button {
  align-self: end;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font: 950 14px var(--font);
  min-height: 42px;
  padding: 10px 16px;
}

.accounting-expense-list,
.accounting-cashbook-list,
.accounting-integration-list {
  display: grid;
  gap: 9px;
}

.accounting-expense-list article,
.accounting-cashbook-list article,
.accounting-integration-list article {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.accounting-expense-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.accounting-expense-actions .button {
  background: #ffffff;
  border: 1px solid #b8c7d8;
  color: #203754;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
}

.accounting-expense-actions .expense-action-icon {
  border-radius: 8px;
  height: 36px;
  padding: 0;
  width: 36px;
}

.accounting-expense-actions .expense-action-icon svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.accounting-expense-actions .expense-action-pdf { color: #b42338; }
.accounting-expense-actions .expense-action-pdf:hover,
.accounting-expense-actions .expense-action-pdf:focus-visible { color: #fff; }

.accounting-expense-actions .button:hover,
.accounting-expense-actions .button:focus-visible {
  background: #203754;
  border-color: #203754;
  color: #ffffff;
  outline: 2px solid rgba(32, 55, 84, .2);
  outline-offset: 1px;
}

.accounting-expense-search {
  display: grid;
  gap: 5px;
  margin: 0 16px 14px;
}

.accounting-expense-search .visually-hidden {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.accounting-expense-search input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: 700 13px var(--font);
  min-height: 40px;
  min-width: 0;
  padding: 9px 11px;
}

.accounting-expense-search-hint {
  color: var(--muted);
  font-size: 11px;
}

.accounting-expense-search input:focus {
  border-color: #4f86c6;
  box-shadow: 0 0 0 3px rgba(79, 134, 198, .14);
  outline: 0;
}

.accounting-expense-list [hidden] { display: none !important; }

@media (max-width: 640px) {
  .accounting-expense-search { grid-template-columns: minmax(0, 1fr); }
}

.accounting-success-notice {
  border-color: #86efac;
  color: #166534;
}

.accounting-expense-list strong,
.accounting-cashbook-list strong,
.accounting-integration-list strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
}

.accounting-expense-list small,
.accounting-cashbook-list small,
.accounting-integration-list small {
  color: var(--muted);
  display: block;
  font-weight: 750;
  margin-top: 3px;
}

.accounting-expense-list span,
.accounting-cashbook-list span {
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.accounting-integration-list {
  margin-top: 12px;
}

.accounting-integration-list article {
  grid-template-columns: minmax(0, .5fr) minmax(0, .5fr);
}

.accounting-integration-list small {
  grid-column: 1 / -1;
}

.accounting-filter-panel,
.accounting-report-panel,
.accounting-cashbook-panel {
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .accounting-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounting-layout {
    grid-template-columns: 1fr;
  }

  .accounting-overview-grid { grid-template-columns: 1fr; }

  .accounting-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .accounting-kpi-grid,
  .accounting-expense-form,
  .accounting-filter-form {
    grid-template-columns: 1fr;
  }

  .accounting-workspace-nav { margin-left: -4px; margin-right: -4px; }

  .accounting-expense-form .span-2,
  .accounting-filter-form .span-2 {
    grid-column: auto;
  }
}
.vendor-stat-strip strong {
  color: var(--ink);
  display: block;
  font-size: 25px;
  margin-top: 4px;
}
.vendor-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
}
.vendor-searchbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 220px auto auto;
  padding: 14px 18px;
}
.vendor-searchbar input,
.vendor-searchbar select,
.vendor-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
.vendor-searchbar button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
}
.search-progress {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}
.vendor-card-list {
  display: grid;
  gap: 12px;
  max-height: 680px;
  overflow: auto;
  padding: 16px 18px 18px;
}
.vendor-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.vendor-card:hover {
  border-color: rgba(30, 64, 175, .36);
  box-shadow: 0 16px 30px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.vendor-avatar {
  align-items: center;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 19px;
  font-weight: 850;
  height: 58px;
  justify-content: center;
  letter-spacing: .02em;
}
.vendor-main { min-width: 0; }
.vendor-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.vendor-card h3 { font-size: 18px; margin: 0 0 3px; }
.vendor-card p { color: var(--muted); margin: 0; }
.vendor-edit-icon {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  color: #1e3a8a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  padding: 8px 10px;
}
.vendor-meta,
.vendor-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.vendor-meta span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}
.vendor-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.vendor-kpis div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.vendor-kpis strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  margin-top: 4px;
}
.vendor-form-panel {
  align-self: start;
  position: sticky;
  top: 18px;
}
.vendor-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.vendor-form label {
  color: var(--ink);
  display: grid;
  font-weight: 750;
  gap: 7px;
}
.vendor-form-two {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.vendor-form small {
  color: #b42318;
  font-weight: 700;
}
.vendor-form .has-error input {
  border-color: #f97066;
  box-shadow: 0 0 0 4px rgba(249, 112, 102, .14);
}
.vendor-active-switch {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.small-link {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
  text-decoration: none;
}

.users-hero { align-items: stretch; }
.user-role-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: min(520px, 100%);
}
.role-chip {
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  padding: 14px;
}
.role-chip span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.role-chip strong {
  color: var(--ink);
  display: block;
  font-size: 27px;
  margin-top: 4px;
}
.user-management-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 410px;
}
.user-searchbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 220px auto auto;
  padding: 14px 18px;
}
.user-searchbar input,
.user-searchbar select,
.user-form input,
.user-form select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
.user-form input[readonly] {
  background: #f8fafc;
  color: var(--muted);
}
.user-searchbar button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  min-height: 44px;
  padding: 0 16px;
}
.user-card-list {
  display: grid;
  gap: 12px;
  max-height: 700px;
  overflow: auto;
  padding: 16px 18px 18px;
}
.user-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 54px minmax(0, 1fr);
  padding: 14px;
}
.user-avatar {
  align-items: center;
  background: linear-gradient(135deg, #0f172a, #475569);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 20px;
  font-weight: 850;
  height: 54px;
  justify-content: center;
}
.user-main { min-width: 0; }
.user-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.user-card h3 { font-size: 18px; margin: 0 0 3px; }
.user-card p { color: var(--muted); margin: 0; }
.access-badge {
  border: 1px solid;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}
.access-sales { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.access-admin { background: #ecfdf3; border-color: #abefc6; color: #027a48; }
.access-accounts { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.access-super-admin { background: #fef2f2; border-color: #fecaca; color: #b42318; }
.user-meta,
.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.user-meta span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}
.user-card-actions button {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  color: #1e3a8a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  padding: 8px 10px;
}
.user-card-actions form button {
  background: #fff1f3;
  border-color: #fecdd3;
  color: #be123c;
}
.user-form-panel {
  align-self: start;
  position: sticky;
  top: 18px;
}
.user-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.user-form label {
  color: var(--ink);
  display: grid;
  font-weight: 750;
  gap: 7px;
}
.user-form-two {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.user-form small {
  color: #b42318;
  font-weight: 700;
}
.user-form .has-error input,
.user-form .has-error select {
  border-color: #f97066;
  box-shadow: 0 0 0 4px rgba(249, 112, 102, .14);
}
.permission-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}
.permission-grid div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.permission-grid p {
  color: var(--muted);
  font-weight: 650;
  margin: 12px 0 0;
}

.payments-hero {
  align-items: stretch;
}
.payment-hero-actions {
  align-content: center;
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: min(360px, 100%);
}
.payment-hero-actions .button {
  text-align: center;
  width: 100%;
}
.payment-hero-actions .secondary {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.34);
  color: #fff;
}
.payment-year-filter {
  width: 100%;
}
.payment-year-filter label {
  color: rgba(255,255,255,.82);
  display: grid;
  font-size: 12px;
  font-weight: 850;
  gap: 6px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.payment-year-filter select {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 9px 12px;
  width: 100%;
}
.payment-metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}
.payment-metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.payment-metric-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
}
.payment-metric-card strong {
  color: var(--ink);
  display: block;
  font-size: 28px;
  margin-top: 8px;
}
.payment-metric-card small {
  color: var(--muted);
  display: block;
  font-weight: 750;
  margin-top: 8px;
}
.payment-metric-card.paid { border-top: 4px solid #16a34a; }
.payment-metric-card.booking { border-top: 4px solid #2563eb; }
.payment-metric-card.placement { border-top: 4px solid #7c3aed; }
.payment-metric-card.balance { border-top: 4px solid #dc2626; }
.payment-metric-card.voided { border-top: 4px solid #64748b; }
.payment-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
}
.payment-searchbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 170px 180px auto auto;
  padding: 14px 18px;
}
.payment-searchbar input,
.payment-searchbar select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
.payment-searchbar button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  min-height: 44px;
  padding: 0 16px;
}
.payment-ledger-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding: 16px 18px 18px;
}
.payment-ledger-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.2fr) 130px auto;
  padding: 14px;
}
.payment-ledger-row.voided {
  background: #f8fafc;
  opacity: .75;
}
.payment-ledger-row strong,
.payment-ledger-row span,
.payment-ledger-row small {
  display: block;
}
.payment-ledger-row small {
  color: var(--muted);
  font-weight: 700;
  margin-top: 3px;
}
.payment-row-amount {
  text-align: right;
}
.payment-row-amount strong {
  color: #047857;
  font-size: 18px;
}
.payment-ledger-row.voided .payment-row-amount strong {
  color: #64748b;
  text-decoration: line-through;
}
.payment-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.payment-row-actions a,
.payment-row-actions span {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
  text-decoration: none;
}
.payment-row-actions a.receipt-icon {
  border-radius: 8px;
  flex: 0 0 34px;
  height: 34px;
  padding: 0;
  width: 34px;
}
.payment-row-actions span {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
}
.payment-followup-panel {
  align-self: start;
  position: sticky;
  top: 18px;
}
.payment-balance-split {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  padding: 16px 18px 0;
}
.payment-balance-split div {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
}
.payment-balance-split span {
  color: #9a3412;
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.payment-balance-split strong {
  color: #9a3412;
  display: block;
  font-size: 21px;
  margin-top: 5px;
}
.payment-pending-list {
  display: grid;
  gap: 10px;
  max-height: 584px;
  overflow: auto;
  padding: 16px 18px 18px;
}
.payment-pending-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  padding: 13px;
  text-decoration: none;
}
.payment-pending-card:hover {
  border-color: #2563eb;
}
.payment-pending-card small {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-top: 3px;
}
.payment-pending-card span {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #b42318;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  margin: 2px 4px 0 0;
  padding: 7px 9px;
}

.reports-hero { align-items: stretch; }
.report-quick-list {
  align-content: start;
  display: grid;
  gap: 8px;
  min-width: min(420px, 100%);
}
.report-quick-list a {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 8px;
  color: #fff;
  font-weight: 850;
  padding: 10px 12px;
  text-decoration: none;
}
.report-quick-list a.active {
  background: #fff;
  color: var(--primary-deep);
}
.report-filter-form {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.3fr .7fr repeat(2, 1fr) repeat(4, .9fr) auto;
  padding: 16px 18px;
}
.report-filter-form label {
  color: var(--ink);
  display: grid;
  font-weight: 750;
  gap: 7px;
}
.report-filter-form input,
.report-filter-form select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}
.report-filter-form button,
.report-print-button {
  align-self: end;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  min-height: 42px;
  padding: 0 16px;
}

.report-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-output-actions a.report-print-button {
  text-decoration: none;
}
.report-print-button {
  align-self: center;
}
.report-table-wrap {
  overflow: auto;
  padding: 0 18px 18px;
}
.report-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
  width: 100%;
}
.report-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}
.report-table th,
.report-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.report-table tbody tr:hover td {
  background: #f8fafc;
}
.report-table .amount {
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}
.report-table tfoot td {
  background: #ecfdf3;
  color: #027a48;
  font-weight: 900;
}

@media print {
  .sidebar, .topbar, .module-hero, .report-filter-panel, .report-print-button { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; }
  .panel { border: 0; box-shadow: none; }
  .report-table-wrap { overflow: visible; padding: 0; }
  .report-table { font-size: 10px; min-width: 0; }
  .report-table th, .report-table td { padding: 5px; }
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-nav-toggle {
    height: 1px;
    left: -999px;
    position: fixed;
    top: -999px;
    width: 1px;
  }

  .mobile-nav-button {
    align-items: center;
    background: var(--primary);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    left: 14px;
    min-height: 42px;
    padding: 9px 13px;
    position: fixed;
    top: 12px;
    z-index: 80;
  }

  .mobile-nav-button span,
  .mobile-nav-button span::before,
  .mobile-nav-button span::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    display: block;
    height: 2px;
    width: 17px;
  }

  .mobile-nav-button span {
    position: relative;
  }

  .mobile-nav-button span::before,
  .mobile-nav-button span::after {
    left: 0;
    position: absolute;
  }

  .mobile-nav-button span::before { top: -6px; }
  .mobile-nav-button span::after { top: 6px; }

  .mobile-nav-button strong {
    font-size: 13px;
    line-height: 1;
  }

  .mobile-nav-backdrop {
    background: rgba(15, 23, 42, .42);
    bottom: 0;
    display: block;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity .18s ease;
    z-index: 70;
  }

  .sidebar {
    bottom: 0;
    height: 100dvh;
    left: 0;
    max-width: min(82vw, 320px);
    overflow: hidden;
    padding: 16px 12px;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: 300px;
    z-index: 90;
  }

  .mobile-nav-toggle:checked ~ .sidebar {
    transform: translateX(0);
  }

  .mobile-nav-toggle:checked ~ .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .brand {
    margin-bottom: 10px;
    min-height: 56px;
  }
  .side-nav {
    grid-template-columns: 1fr;
    overflow-y: auto;
    padding: 0 2px 8px 0;
  }
  .side-nav a {
    min-height: 42px;
  }
  .side-nav a.active::before {
    bottom: auto;
    height: 24px;
    left: -12px;
    right: auto;
    top: 9px;
    width: 4px;
  }
  .main { padding-top: 72px; }
  .metrics-grid, .dashboard-grid, .hero-dashboard, .module-hero, .profile-hero, .settings-grid, .operations-grid, .package-browser, .employer-workbench, .vendor-workspace, .user-management-grid, .payment-metric-grid, .payment-workspace, .booking-main-grid, .booking-payment-grid, .booking-totals, .tracking-hero, .tracking-board, .planner-hero, .planner-filters, .documents-grid, .interview-workspace, .action-item-grid, .smart-ops-grid, .report-filter-form { grid-template-columns: 1fr; }
  .interview-side { position: static; }
  .documents-booking-panel { position: static; }
  .documents-booking-list { max-height: 360px; }
  .document-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employer-results { border-bottom: 1px solid var(--line); border-right: 0; max-height: 420px; }
  .employer-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-side-panel { position: static; }
  .vendor-form-panel { position: static; }
  .user-form-panel { position: static; }
  .payment-followup-panel { position: static; }
  .workflow-grid, .module-grid, .pipeline, .helper-grid, .form-grid, .form-grid.two-col, .form-grid.personal-grid, .form-grid.three-col, .document-grid, .biodata-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .current-item-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selected-package-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix-row, .matrix-grid.compact .matrix-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .helper-toolbar { grid-template-columns: 1fr 1fr; }
  .helper-toolbar input { grid-column: 1 / -1; }
  .profile-actions { justify-content: flex-start; }
  .biodata-tablist {
    grid-template-columns: repeat(6, minmax(170px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .tracking-tablist {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
  }
}
@media (max-width: 560px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main { padding: 72px 12px 18px; }
  .topbar, .panel-header { align-items: flex-start; flex-direction: column; }
  .topbar { gap: 10px; margin-bottom: 14px; }
  .top-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .top-actions span,
  .top-actions .legacy-link { text-align: center; width: 100%; }
  .top-actions .mom-eservices-link span { text-align: initial; width: auto; }
  .side-nav { gap: 6px; grid-template-columns: 1fr; }
  .side-nav a {
    font-size: 12px;
    min-height: 38px;
    padding: 6px 7px;
  }
  .nav-icon {
    height: 24px;
    width: 24px;
  }
  .module-hero,
  .hero-dashboard,
  .profile-hero,
  .documents-hero {
    padding: 16px;
  }
  .module-hero h2,
  .hero-dashboard h2 {
    font-size: 25px;
    line-height: 1.15;
  }
  .panel {
    max-width: 100%;
    overflow: hidden;
  }
  .report-table-wrap,
  .booking-table-wrap,
  .schedule-wrap {
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .report-table,
  .booking-table {
    min-width: 680px;
  }
  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }
  .metrics-grid, .workflow-grid, .module-grid, .pipeline, .helper-toolbar, .helper-grid, .form-grid, .form-grid.two-col, .form-grid.personal-grid, .form-grid.three-col, .document-grid, .biodata-document-grid, .summary-grid, .settings-grid, .operations-grid, .employer-searchbar, .employer-workbench, .employer-summary-grid, .vendor-searchbar, .vendor-form-two, .vendor-stat-strip, .vendor-kpis, .user-searchbar, .user-form-two, .user-role-summary, .permission-grid, .payment-searchbar, .payment-ledger-row, .payment-balance-split, .report-filter-form, .booking-searchbar, .booking-type-grid, .booking-package-row, .booking-line-item, .booking-add-line, .booking-payment-grid, .booking-payment-form, .credit-refund-form, .credit-summary-bar, .booking-totals, .tracking-hero, .tracking-stat-grid, .tracking-board, .tracking-parties, .tracking-detail-grid, .planner-hero, .planner-filters, .planner-calendar-head, .planner-calendar, .document-card-grid, .interview-form, .interview-row, .interview-field-grid.two, .interview-field-grid.three, .action-item-grid, .smart-ops-grid, .followup-form, .priority-row, .reminder-row { grid-template-columns: 1fr; }
  .documents-hero, .selected-document-booking { align-items: flex-start; flex-direction: column; }
  .selected-document-booking > div:last-child { justify-items: start; }
  .tracking-edit-hero { align-items: flex-start; flex-direction: column; }
  .tracking-edit-actions { justify-content: flex-start; width: 100%; }
  .form-grid .wide-field { grid-column: auto; }
  .tracking-card-head, .tracking-card-foot, .tracking-progress { align-items: flex-start; flex-direction: column; }
  .planner-calendar-head { display: none; }
  .planner-day {
    border-right: 0;
    min-height: 0;
  }
  .planner-day.outside-month:empty { display: none; }
  .planner-day-number::after {
    color: var(--muted);
    content: attr(data-weekday);
    font-size: 12px;
    font-weight: 900;
  }
  .planner-event-popover {
    left: 0;
    min-width: 0;
    right: 0;
    width: min(300px, calc(100vw - 56px));
  }
  .interview-helper-field,
  .interview-notes,
  .interview-field-grid .wide-two {
    grid-column: auto;
  }
  .interview-form-actions {
    justify-content: stretch;
  }
  .interview-form-actions button {
    width: 100%;
  }
  .followup-form .wide {
    grid-column: auto;
  }
  .followup-form button,
  .reminder-row button {
    width: 100%;
  }
  .booking-command-bar,
  .booking-command-left,
  .booking-command-right {
    align-items: stretch;
    flex-direction: column;
  }
  .booking-icon-tool,
  .booking-icon-menu > summary,
  .booking-workflow-actions,
  .booking-save-command {
    justify-content: center;
    width: 100%;
  }
  .booking-workflow-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .booking-workflow-actions button {
    width: 100%;
  }
  .package-items-head { align-items: stretch; flex-direction: column; }
  .package-header-grid { grid-template-columns: 1fr !important; }
  .package-item-row { grid-template-columns: 1fr; }
  .current-item-form { grid-template-columns: 1fr; }
  .selected-package-summary { grid-template-columns: 1fr; }
  .icon-remove { justify-self: end; width: 40px; }
  .employer-card { grid-template-columns: 42px minmax(0, 1fr); }
  .employer-card-meta { grid-column: 1 / -1; }
  .matrix-row, .matrix-grid.compact .matrix-row { grid-template-columns: 1fr; }
  .share-strip, .biodata-actions { grid-template-columns: 1fr; }
  .icon-action { width: 100%; }
  .helper-toolbar input { grid-column: auto; }
  .helper-ai-assistant { bottom: 14px; right: 14px; }
  .helper-ai-fab { min-height: 52px; padding-right: 13px; }
  .helper-ai-fab span { height: 36px; width: 36px; }
  .helper-ai-drawer {
    bottom: 64px;
    max-height: calc(100vh - 92px);
    width: calc(100vw - 28px);
  }
  .print-popup, .document-popup { padding: 0; }
  .print-popup-panel, .document-popup-panel { height: 100vh; }
  .print-popup-bar, .document-popup-bar { align-items: flex-start; flex-direction: column; }
  .print-popup-bar div, .document-popup-bar div { width: 100%; }
  .print-popup-bar button, .document-popup-bar button, .document-popup-bar a { flex: 1; }
  .helper-ai-actions button { width: 100%; }
  .helper-card { grid-template-columns: 1fr; }
  .sticky-actions { margin: 0 -12px -18px; padding: 12px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button, .form-actions button { text-align: center; width: 100%; }
  .profile-hero { align-items: flex-start; }
  .profile-actions .button { text-align: center; width: 100%; }
  .biodata-flow { margin: 0 -4px; padding: 12px; top: 4px; }
  .biodata-tablist { grid-template-columns: repeat(6, 168px); }
  .tracking-tablist { grid-template-columns: repeat(5, 170px); overflow-x: auto; }
  .biodata-flow-head { align-items: center; }
  .biodata-tabs-form > .form-panel { scroll-margin-top: 138px; }
  .tracking-tabs-form .form-panel { scroll-margin-top: 138px; }
  .personal-grid .photo-upload { grid-column: auto; }
  .photo-upload { grid-template-columns: 78px minmax(0, 1fr); }
  .photo-preview { width: 70px; }
  .document-upload { grid-template-columns: 76px minmax(0, 1fr); }
  .tracking-doc-upload { grid-template-columns: 76px minmax(0, 1fr); }
  .tracking-doc-upload .document-thumb { width: 76px; }
  .tracking-doc-remove { grid-column: 1 / -1; width: 100%; }
  .document-thumb { width: 76px; }
}
@media (max-width: 900px) {
  .dashboard-quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dashboard-quick-links { grid-template-columns: 1fr; }
}




.upload-drop-zone { display: block; border: 2px dashed #9ab8b2; border-radius: 10px; background: #f7fbfa; padding: 12px; min-width: 0; transition: background .15s, border-color .15s; }
.upload-drop-zone.is-dragging { background: #dcf5ec; border-color: #087f68; }
.upload-drop-zone:focus-within { outline: 2px solid #087f68; outline-offset: 2px; }
.upload-drop-zone input[type="file"] { max-width: 100%; }
.upload-drop-hint, .upload-drop-status { display: block; margin-top: 7px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.upload-drop-hint { color: #526862; }
.upload-drop-status { color: #174f43; }
.upload-drop-status:empty { display: none; }
.upload-drop-zone .upload-cancel { display: inline-block; width: auto; margin-top: 8px; padding: 6px 10px; border: 1px solid #b9c8c3; border-radius: 6px; background: #fff; color: #374c45; cursor: pointer; font: 600 12px/1.4 Arial, sans-serif; }
.upload-drop-zone .upload-cancel[hidden] { display: none; }

/* Keep the ledger usable within its panel, including at increased browser zoom. */
.payment-workspace > *, .payment-ledger-list, .payment-ledger-row > * { min-width: 0; }
.payment-ledger-panel { container-type: inline-size; }
.payment-searchbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.payment-searchbar input[type="search"] { grid-column: 1 / -1; min-width: 0; }
.payment-searchbar select { min-width: 0; }
.payment-searchbar .search-progress { grid-column: 1 / -1; }
.payment-ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 10px 16px; }
.payment-ledger-row > div:first-child { grid-column: 1; grid-row: 1; }
.payment-ledger-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
.payment-ledger-row .payment-row-amount { grid-column: 2; grid-row: 1; align-self: start; }
.payment-ledger-row .payment-row-actions { grid-column: 2; grid-row: 2; align-self: end; }
.payment-ledger-row strong, .payment-ledger-row span, .payment-ledger-row small { overflow-wrap: anywhere; }
.payment-row-amount strong { white-space: nowrap; }
@container (max-width: 420px) {
  .payment-ledger-row { grid-template-columns: minmax(0, 1fr); }
  .payment-ledger-row > div:first-child, .payment-ledger-row > div:nth-child(2),
  .payment-ledger-row .payment-row-amount, .payment-ledger-row .payment-row-actions { grid-column: 1; grid-row: auto; text-align: left; }
  .payment-ledger-row .payment-row-actions { justify-content: flex-start; }
  .payment-searchbar { grid-template-columns: minmax(0, 1fr); }
}

/* Accounting controls and long values must stay within their own panels. */
.accounting-layout > *, .accounting-kpi-grid > *,
.accounting-hero > *, .accounting-expense-form > *,
.accounting-filter-form > *, .accounting-integration-form > * { min-width: 0; }
.accounting-layout > .panel, .accounting-filter-panel,
.accounting-report-panel, .accounting-cashbook-panel { container-type: inline-size; }
.accounting-expense-form input, .accounting-expense-form select, .accounting-expense-form textarea,
.accounting-filter-form input, .accounting-filter-form select,
.accounting-integration-form input:not([type="checkbox"]), .accounting-integration-form select,
.accounting-integration-form textarea { box-sizing: border-box; min-width: 0; width: 100%; max-width: 100%; }
.accounting-kpi strong { font-size: clamp(20px, 2.2vw, 30px); overflow-wrap: anywhere; }
.accounting-layout .panel-header, .accounting-report-panel .panel-header,
.accounting-filter-panel .panel-header, .accounting-cashbook-panel .panel-header { flex-wrap: wrap; gap: 12px; }
.accounting-layout .panel-header > *, .accounting-report-panel .panel-header > * { min-width: 0; overflow-wrap: anywhere; }
.accounting-expense-list article > *, .accounting-cashbook-list article > *,
.accounting-integration-list article > * { min-width: 0; overflow-wrap: anywhere; }
.accounting-report-panel .report-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; }
.accounting-report-panel .report-output-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@container (max-width: 460px) {
  .accounting-expense-form, .accounting-integration-form, .accounting-filter-form { grid-template-columns: minmax(0, 1fr); }
  .accounting-expense-form .span-2, .accounting-filter-form .span-2 { grid-column: 1 / -1; }
  .accounting-expense-list article, .accounting-cashbook-list article,
  .accounting-integration-list article { grid-template-columns: minmax(0, 1fr); }
  .accounting-integration-form .accounting-check { padding-top: 0; }
}
@media (max-width: 720px) {
  .accounting-integration-form { grid-template-columns: minmax(0, 1fr); }
  .accounting-hero-actions { justify-content: flex-start; }
}
.accounting-expense-form, .accounting-integration-form, .accounting-filter-form,
.accounting-expense-list, .accounting-cashbook-list { padding: 16px; }
.accounting-layout .accounting-note { margin: 0 16px 16px; }
.auth-body { display: flex; flex-direction: column; min-height: 100vh; }
.auth-body .signin-page { flex: 1; min-height: 0; }
.main { display: flex; flex-direction: column; }
.main > .software-footer { margin-top: auto !important; }
.software-footer { flex-shrink: 0; }

.brand.helperops-brand { flex-direction: column; justify-content: center; gap: 5px; background: #fff; border: 1px solid #d7e6e2; box-shadow: 0 4px 14px rgba(15, 80, 70, .06); padding: 12px 8px; }
.helperops-logo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; object-position: center; }
.brand.helperops-brand small { color: #526862; text-align: center; }
.signin-brand.helperops-brand { padding: 20px 16px; }
.signin-brand .helperops-logo { max-width: 340px; }
.helper-card[hidden], [data-helper-empty][hidden] { display: none !important; }
.form-grid label.assessment-interview { display:flex; align-items:center; gap:8px; }
.form-grid label.assessment-interview input { width:17px; height:17px; min-height:0; margin:0; }
.assessment-grid { display: grid; gap: 12px; padding: 16px; }
.assessment-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(165px, 1.2fr) repeat(3, minmax(95px, 1fr)); gap: 12px; align-items: center; padding: 14px; border: 1px solid #d7e0ea; border-radius: 8px; background: #f8fafc; }
.assessment-row > * { min-width: 0; }
.assessment-checks { display: flex; flex-wrap: wrap; gap: 12px; }
.assessment-checks label { display: flex; align-items: center; gap: 6px; }
.assessment-row .assessment-field { display: grid; gap: 5px; font-size: 12px; }
.assessment-row select, .assessment-row input:not([type="checkbox"]) { width: 100%; min-width: 0; }
.assessment-row input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; margin: 0; }
.assessment-notes { grid-column: 1 / -1; }
@media (max-width: 1100px) { .assessment-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .assessment-row > strong { grid-column: 1 / -1; } .assessment-checks { grid-column: 1 / -1; } }
@media (max-width: 520px) { .assessment-grid { padding: 8px; } .assessment-row { padding: 10px; gap: 8px; } }

/* Booking amounts share one readable size; optional totals must stay hidden. */
.booking-totals input[data-discount] { font-size:22px; font-weight:700; color:var(--primary); width:100%; min-width:0; padding:10px; }
.booking-totals { grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); }
.booking-totals [hidden] { display:none !important; }
.booking-line-item { grid-template-columns:minmax(0, 1fr) 130px 36px; }
.booking-add-line { grid-template-columns:minmax(0, 1fr) 130px auto; }
@media(max-width:600px) { .booking-add-line { grid-template-columns:1fr; } .booking-line-item { grid-template-columns:minmax(0, 1fr) 85px 36px; } }
.agency-fee-total {
  align-self: end;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 54px;
  padding: 12px 16px;
}

.agency-fee-total span {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.agency-fee-total strong {
  color: #1d2939;
  font-size: 22px;
}

