﻿/* ==========================================================================
   LarScreen - enterprise light theme
   Dense, restrained, professional. No build step, no framework.
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white:      #ffffff;

  --bg:         var(--slate-50);
  --card:       var(--white);
  --text:       var(--slate-900);
  --text-soft:  var(--slate-700);
  --muted:      var(--slate-500);
  --border:     var(--slate-200);
  --border-strong: var(--slate-300);

  --primary:      #2563eb;
  --primary-700:  #1d4ed8;
  --primary-50:   #eff6ff;
  --primary-200:  #bfdbfe;

  --success:      #047857;
  --success-50:   #ecfdf5;
  --success-200:  #a7f3d0;
  --warn:         #b45309;
  --warn-50:      #fffbeb;
  --warn-200:     #fde68a;
  --danger:       #b91c1c;
  --danger-50:    #fef2f2;
  --danger-200:   #fecaca;

  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  --shadow-xs: 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow:    0 6px 20px rgba(15, 23, 42, 0.08);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --sidebar-w: 236px;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -0.011em; line-height: 1.3; }
h1 { font-size: 1.375rem; }
h2 { font-size: 1.0625rem; }
h3 { font-size: 0.9375rem; }
h4 { font-size: 0.875rem; }
p  { margin: 0 0 0.75rem; }
a  { color: var(--primary); text-decoration: none; transition: color 0.12s ease; }
a:hover { color: var(--primary-700); }
small { font-size: 0.8125rem; }
code { font-family: var(--mono); font-size: 0.85em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 3px; }

/* ---------------------------------------------------------------- icons */
.ic {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.btn .ic { display: block; line-height: 0; }

/* --------------------------------------------------------------- layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 460px; }
.container-wide { max-width: 1500px; }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.5rem; }
.gap { gap: 0.875rem; }
.gap-lg { gap: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 0.5rem; }
.mt { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 0.5rem; }
.mb { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 1.5rem; }
.text-muted { color: var(--muted); }
.text-soft { color: var(--text-soft); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.8125rem; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.8125rem; }
.hidden { display: none !important; }
.strong { font-weight: 600; color: var(--text); }

/* --------------------------------------------------------------- grids */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* Two column content split used across the panel pages */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 360px; }
.split > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; }

/* --------------------------------------------------------------- panels */
.panel { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 56px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.015em;
  color: var(--text);
  flex-shrink: 0;
}
.sidebar-brand:hover { color: var(--text); }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Product logo - used in nav, sidebar and auth screens */
.brand-logo {
  height: 46px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.sidebar-brand .brand-logo { height: 42px; }
.auth-brand .brand-logo { height: 72px; max-width: 220px; }

.sidebar-nav { padding: 0.75rem 0.625rem; display: flex; flex-direction: column; gap: 1px; }
.sidebar-section {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-400);
  padding: 0.875rem 0.625rem 0.375rem;
}
.sidebar-section:first-child { padding-top: 0.25rem; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 33px;
  padding: 0 0.625rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}
.sidebar-nav a:hover { background: var(--slate-100); color: var(--text); }
.sidebar-nav a.active {
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 600;
}
.sidebar-nav a.active .ic { color: var(--primary); }
.sidebar-nav .ic { color: var(--slate-400); }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 0.75rem;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.25rem 0.625rem;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--slate-800);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 650;
  flex-shrink: 0;
}
.sidebar-foot-links { display: flex; gap: 0.375rem; }

/* ------------------------------------------------------------- top bar */
.panel-main { min-width: 0; display: flex; flex-direction: column; }

.panel-topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.breadcrumb { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.0625rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--slate-300); margin: 0 0.25rem; }

.panel-content { padding: 1.5rem; flex: 1; max-width: 1500px; width: 100%; }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-head {
  padding: 0.8125rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 46px;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 0.875rem; font-weight: 650; }
.card-head .sub { font-size: 0.8125rem; color: var(--muted); }
.card-body { padding: 1rem; }
.card-body-flush { padding: 0; }
.card-foot {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--slate-50);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------------------------------------------------------- stat cards */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-xs);
}
.stat-label {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.stat-label .ic { color: var(--slate-400); }
.stat-value {
  font-size: 1.5rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.stat-value small { font-size: 0.8125rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-note { font-size: 0.75rem; color: var(--muted); margin-top: 0.1875rem; }

/* --------------------------------------------------------------- badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.0625rem 0.4375rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.015em;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.6;
}
.badge-neutral { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.badge-blue    { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-200); }
.badge-success { background: var(--success-50); color: var(--success); border-color: var(--success-200); }
.badge-warn    { background: var(--warn-50); color: var(--warn); border-color: var(--warn-200); }
.badge-danger  { background: var(--danger-50); color: var(--danger); border-color: var(--danger-200); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* --------------------------------------------------------------- chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.4375rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 550;
  border: 1px solid var(--border);
  background: var(--slate-50);
  color: var(--text-soft);
}
.chip-match { background: var(--success-50); border-color: var(--success-200); color: var(--success); }
.chip-miss  { background: var(--danger-50); border-color: var(--danger-200); color: var(--danger); }
.chip-nice  { background: var(--warn-50); border-color: var(--warn-200); color: var(--warn); }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.3125rem; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  height: 34px;
  padding: 0 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease,
              color 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
  text-decoration: none;
  user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { color: inherit; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--primary-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:active { background: var(--primary-700); }

.btn-secondary { background: var(--card); color: var(--text-soft); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--slate-50); color: var(--text); border-color: var(--slate-400); }

.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--slate-100); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; color: #fff; }

.btn-danger-outline { background: var(--card); color: var(--danger); border-color: var(--danger-200); }
.btn-danger-outline:hover { background: var(--danger-50); color: var(--danger); border-color: var(--danger); }

.btn-sm { height: 30px; padding: 0 0.6875rem; font-size: 0.78125rem; gap: 0.375rem; }
.btn-lg { height: 42px; padding: 0 1.25rem; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 34px; }
.btn-icon.btn-sm { width: 30px; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 0.875rem; }
.field:last-child { margin-bottom: 0; }
.field label, .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.3125rem;
}
.field .req { color: var(--danger); margin-left: 0.125rem; }
.field .hint {
  display: block;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 0.3125rem;
  min-height: 2.2em;   /* reserve 2 lines so grid rows stay aligned */
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], input[type="url"], input[type="search"],
select, textarea {
  width: 100%;
  height: 32px;
  padding: 0 0.625rem;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
textarea { height: auto; resize: vertical; min-height: 84px; line-height: 1.55; padding: 0.5rem 0.625rem; }
input:hover, select:hover, textarea:hover { border-color: var(--slate-400); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--slate-400); }
input:disabled, select:disabled, textarea:disabled { background: var(--slate-100); color: var(--muted); cursor: not-allowed; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5625rem center;
  padding-right: 1.75rem;
}

.checkbox { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-soft); }
.checkbox input { width: auto; height: auto; margin-top: 0.1875rem; accent-color: var(--primary); }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.875rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 0.875rem; }
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; padding-top: 0.25rem; }

.fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.fieldset legend {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 0.75rem;
}
.divider { height: 1px; background: var(--border); margin: 1.125rem 0; }

/* inline password edit row (expands inside the table, never clipped) */
.pw-row > td {
  background: var(--slate-50);
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 1rem;
}
.pw-inline {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.pw-inline input[type="text"] { width: 240px; }
.checkbox-row { display: inline-flex; gap: 0.5rem; align-items: center; font-size: 0.8125rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.checkbox-row input { accent-color: var(--primary); }

/* ---------------------------------------------------- impersonation banner */
.impersonate-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex-wrap: wrap;
  padding: 0.5rem 1.25rem;
  background: var(--slate-900);
  color: #fff;
  font-size: 0.8125rem;
  position: sticky;
  top: 0;
  z-index: 60;
}
.impersonate-banner strong { color: #facc15; font-weight: 600; }
.impersonate-banner .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.impersonate-banner .btn-secondary:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
thead th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 1rem;
  background: var(--slate-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}
tbody tr { height: 56px; }
tbody td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--slate-50); }
td .strong { color: var(--text); }
.table-actions { display: flex; gap: 0.3125rem; justify-content: flex-end; align-items: center; }
.table-actions.center { justify-content: center; }

/* two-line cell (name / contact) stays centred relative to single-line cells */
.cell-stack { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.cell-stack .cell-sub { font-size: 0.75rem; color: var(--muted); }

.empty-state { padding: 2.25rem 1rem; text-align: center; color: var(--muted); }
.empty-state > .ic { color: var(--slate-300); margin-bottom: 0.5rem; }
.empty-state h4 { color: var(--text-soft); margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.8125rem; margin: 0; }

/* --------------------------------------------------------------- alerts */
.alert {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.alert .ic { margin-top: 0.0625rem; }
.alert-success { background: var(--success-50); border-color: var(--success-200); color: var(--success); }
.alert-error   { background: var(--danger-50);  border-color: var(--danger-200);  color: var(--danger); }
.alert-warning { background: var(--warn-50);     border-color: var(--warn-200);     color: var(--warn); }
.alert-info    { background: var(--primary-50); border-color: var(--primary-200); color: var(--primary-700); }

/* ------------------------------------------------------------- progress */
.progress { height: 6px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.4s ease; }
.progress-bar.success { background: var(--success); }
.progress-bar.warn { background: var(--warn); }
.progress-bar.danger { background: var(--danger); }

/* ----------------------------------------------------------- pagination */
.pagination { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.25rem 0.5625rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--card);
  min-width: 26px;
  text-align: center;
}
.pagination a:hover { background: var(--slate-50); color: var(--text); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled { opacity: 0.45; pointer-events: none; }

/* =========================================================== app shell */
.app { display: flex; min-height: 100vh; flex-direction: column; background: var(--bg); }

.appbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.appbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1.5rem;
}
.appbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.appbar-brand:hover { color: var(--text); text-decoration: none; }

/* Gradient wordmark - blue to purple, matching the logo */
.appbar-brand span,
.sidebar-brand span,
.auth-brand span {
  background: linear-gradient(100deg, #2563eb 0%, #4f46e5 45%, #9333ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}
.sidebar-brand span,
.auth-brand span { font-size: 1.25rem; }
.auth-brand span { font-size: 1.5rem; }
.appbar-links { display: flex; align-items: center; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.appbar-links a { color: var(--text-soft); font-weight: 500; font-size: 0.875rem; }
.appbar-links a:hover { color: var(--text); }
.appbar-actions { display: flex; align-items: center; gap: 0.5rem; }

/* =========================================================== landing page */
.hero {
  padding: 3.75rem 0 3.5rem;
  background: var(--slate-50);
  border-bottom: 1px solid var(--border);
}
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 { font-size: 2.375rem; line-height: 1.13; letter-spacing: -0.032em; margin-bottom: 0.875rem; }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { font-size: 1rem; color: var(--slate-600); max-width: 500px; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.hero-trust {
  display: flex;
  gap: 1.125rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 0.375rem; }
.hero-trust .ic { color: var(--success); }

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--primary-200);
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ------------------------------------------------- product UI mockup */
.mock {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 0.875rem;
  border-bottom: 1px solid var(--border);
  background: var(--slate-50);
}
.mock-dots { display: flex; gap: 0.25rem; }
.mock-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-300); display: block; }
.mock-crumb { font-size: 0.75rem; color: var(--muted); }
.mock-crumb strong { color: var(--text-soft); font-weight: 600; }
.mock-count {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
  text-align: center;
}
.mock-body { padding: 0.25rem 0.875rem 0.5rem; }

.mock-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.mock-item:last-child { border-bottom: none; }
.mock-name { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.mock-role { font-size: 0.6875rem; color: var(--muted); margin-top: 0.0625rem; }
.mock-skills { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.375rem; }
.mock-skill {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 3px;
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--border);
}
.mock-skill.hit { background: var(--success-50); color: var(--success); border-color: var(--success-200); }
.mock-skill.gap { background: var(--danger-50); color: var(--danger); border-color: var(--danger-200); }
.mock-right { text-align: right; }
.mock-pct { font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.02em; }
.mock-verdict { font-size: 0.6875rem; color: var(--muted); margin-top: 0.0625rem; }

.score-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--pct) * 1%), var(--slate-100) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.score-ring span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text);
}

/* -------------------------------------------------------- trust strip */
.strip {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strip-item {
  padding: 1.125rem 1.25rem;
  border-right: 1px solid var(--border);
}
.strip-item:last-child { border-right: none; }
.strip-item .ic { color: var(--primary); margin-bottom: 0.5rem; }
.strip-item h4 { font-size: 0.8125rem; margin-bottom: 0.1875rem; }
.strip-item p { font-size: 0.75rem; color: var(--muted); margin: 0; }

/* ------------------------------------------------------ generic bands */
.section { padding: 3.75rem 0; }
.section-alt { background: var(--slate-50); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 620px; margin-bottom: 2.25rem; }
.section-head h2 { font-size: 1.5rem; margin-bottom: 0.5rem; letter-spacing: -0.022em; }
.section-head p { color: var(--muted); margin: 0; font-size: 0.9375rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 680;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------- numbered flow */
.flow { counter-reset: flow; display: grid; gap: 0; }
.flow-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.flow-item:last-child { border-bottom: none; }
.flow-num {
  counter-increment: flow;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--primary-200);
  background: var(--primary-50);
  color: var(--primary-700);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.flow-num::before { content: counter(flow); }
.flow-item h3 { font-size: 0.9375rem; margin-bottom: 0.25rem; }
.flow-item p { font-size: 0.875rem; color: var(--muted); margin: 0; max-width: 460px; }

/* ------------------------------------------------- specification table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.spec-table thead th {
  text-align: left;
  padding: 0.625rem 1rem;
  font-size: 0.6875rem;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-strong);
  background: var(--card);
  vertical-align: bottom;
}
.spec-table tbody th {
  text-align: left;
  font-weight: 650;
  color: var(--text);
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--slate-50);
}
.spec-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}
.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-yes { color: var(--success); }
.spec-no { color: var(--slate-300); }
.spec-table .role-head { display: flex; align-items: center; gap: 0.5rem; }
.spec-table .role-head .ic { color: var(--slate-400); }

/* ------------------------------------------------------- weight visual */
.weight-bar {
  display: flex;
  height: 34px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.weight-bar span {
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 650;
  color: #fff;
}
.w-req  { background: var(--primary); }
.w-nice { background: #6366f1; }
.w-exp  { background: #0ea5e9; }
.w-llm  { background: var(--slate-400); }
.weight-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.weight-legend-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.weight-legend div { font-size: 0.75rem; color: var(--muted); }
.weight-legend strong { display: block; color: var(--text); font-size: 0.8125rem; font-weight: 600; }
.weight-key { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 0.375rem; }

/* ------------------------------------------------------- does / does not */
.dodont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.dodont-col { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: var(--card); }
.dodont-col h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.dodont-col ul { list-style: none; margin: 0; padding: 0; }
.dodont-col li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  color: var(--text-soft);
  padding: 0.375rem 0;
}
.dodont-col li .ic { margin-top: 0.1875rem; flex-shrink: 0; }
.dodont-col:not(.no) li .ic { color: var(--success); }
.dodont-col.no li .ic { color: var(--slate-400); }
.dodont-col.no h4 { color: var(--slate-600); }

/* ------------------------------------------------------------------ faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { color: var(--muted); transition: transform 0.15s ease; flex-shrink: 0; }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-item p { font-size: 0.875rem; color: var(--muted); margin: 0 0 1rem; max-width: 660px; }

/* --------------------------------------------------------- dark cta band */
.human-strip {
  background: var(--slate-900);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}
.human-strip h2 { color: #fff; margin-bottom: 0.5rem; }
.human-strip p { color: var(--slate-300); max-width: 580px; margin: 0 auto; font-size: 0.875rem; }
.human-strip .btn-secondary { background: transparent; color: var(--slate-100); border-color: var(--slate-600); }
.human-strip .btn-secondary:hover { background: var(--slate-800); color: #fff; border-color: var(--slate-500); }
.human-strip .hero-actions { justify-content: center; }

/* ------------------------------------------------------------- pricing */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.price-name { font-size: 0.8125rem; font-weight: 650; }
.price-tag { font-size: 0.6875rem; color: var(--muted); margin-top: 0.125rem; }
.price-figure { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.025em; margin: 0.875rem 0 0.125rem; }
.price-figure span { font-size: 0.8125rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-limits {
  font-size: 0.75rem;
  color: var(--muted);
  padding-bottom: 0.875rem;
  margin-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.price-limits b { color: var(--text-soft); font-weight: 600; }
.price-card ul { list-style: none; margin: 0 0 1.125rem; padding: 0; flex: 1; }
.price-card li {
  font-size: 0.8125rem;
  color: var(--text-soft);
  padding: 0.25rem 0;
  display: flex;
  gap: 0.4375rem;
  align-items: flex-start;
}
.price-card li .ic { color: var(--success); margin-top: 0.125rem; flex-shrink: 0; }

/* --------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--border); background: var(--card); padding: 2.75rem 0 1.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-brand p { font-size: 0.8125rem; color: var(--muted); margin: 0.75rem 0 0; max-width: 260px; }
.footer-col h5 {
  font-size: 0.6875rem;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.625rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.4375rem; }
.footer-col a { font-size: 0.8125rem; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------------------------------------------------------- auth pages */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(720px 300px at 50% -80px, #e3ecfd 0%, rgba(227, 236, 253, 0) 70%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 460px; }
.auth-brand { display: flex; align-items: center; gap: 0.5rem; justify-content: center; margin-bottom: 1.25rem; font-weight: 700; }
.auth-card h1 { font-size: 1.125rem; text-align: center; margin-bottom: 0.25rem; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 0.8125rem; margin-bottom: 1.25rem; }

.tabs {
  display: flex;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.25rem;
  gap: 3px;
}
.tabs a {
  flex: 1;
  text-align: center;
  padding: 0.3125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.tabs a.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-xs); }

.auth-foot { text-align: center; margin-top: 1.125rem; font-size: 0.8125rem; color: var(--muted); }

/* ---------------------------------------------------------------- misc */
.inline-form { display: inline; }
.divider-lg { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* timeline / activity list */
.activity-scroll {
  max-height: 272px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
}
.activity-scroll::-webkit-scrollbar { width: 8px; }
.activity-scroll::-webkit-scrollbar-track { background: transparent; }
.activity-scroll::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 999px; }
.activity-scroll::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  padding: 0.5625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.timeline li:last-child { border-bottom: none; }
.timeline .when { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }

.toast-host { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--slate-900);
  color: #fff;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
  max-width: 320px;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------ responsive */
.nav-toggle { display: none; }
.mobile-only { display: none; }

@media (max-width: 1180px) {
  .split, .split-wide { grid-template-columns: minmax(0, 1fr); }
  .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-split { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero p.lead { max-width: none; }
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-item:nth-child(2n) { border-right: none; }
  .strip-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .dodont { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 1.875rem; }
  .weight-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Public / candidate header: collapsible links */
  .appbar { position: relative; }
  .appbar-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 56;
  }
  .appbar-links.open { display: flex; }
  .appbar-links a { display: block; padding: 0.6rem 0; }
  .appbar-toggle { display: grid; }
}

/* --------------- mobile panels: compact header + drawer navigation ------ */
@media (max-width: 768px) {
  .panel { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 55;
    height: 56px;
    padding: 0 1rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .sidebar-brand { height: 56px; padding: 0; border-bottom: none; }
  .sidebar-brand .brand-logo { height: 36px; }
  .sidebar-brand span { font-size: 1.05rem; }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--text-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-toggle:active { background: var(--slate-100); }

  .sidebar-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 0.6rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .sidebar-nav.open { display: flex; }
  .sidebar-nav a { height: 42px; font-size: 0.9rem; }
  .sidebar-section { display: block; padding: 0.6rem 0.6rem 0.25rem; }
  .sidebar-foot { display: none; }

  .panel-topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
  }
  .panel-topbar > div:last-child { width: 100%; flex-wrap: wrap; }
  .panel-content { padding: 0.875rem; }
  .mobile-only { display: inline-flex; }

  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 600px; }
  .spec-table { min-width: 560px; }
  .auth-card { padding: 1.35rem; }
  .impersonate-banner { padding: 0.5rem 0.75rem; font-size: 0.78rem; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.75rem; }
  .container { padding: 0 1rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .pricing { grid-template-columns: minmax(0, 1fr); }
  .strip-grid { grid-template-columns: minmax(0, 1fr); }
  .strip-item { border-right: none; border-bottom: 1px solid var(--border); }
  .strip-item:last-child { border-bottom: none; }
  .weight-legend { grid-template-columns: minmax(0, 1fr); }
  .mock-item { grid-template-columns: 36px minmax(0, 1fr); }
  .mock-right { display: none; }
  .human-strip { padding: 1.75rem 1.25rem; }

  /* public header (landing / apply / subscription) */
  .appbar-inner { gap: 0.5rem; }
  .appbar-brand .brand-logo { height: 38px; }
  .appbar-brand span { font-size: 1.02rem; }
  .appbar-actions { gap: 0.35rem; }
  .appbar-actions .btn { height: 30px; padding: 0 0.6rem; font-size: 0.75rem; }
  .appbar-toggle { width: 32px; height: 30px; }
  .pick-row { gap: 0.4rem; }

  /* Product mock card: keep the candidate count on one line */
  .mock-bar { gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .mock-dots { display: none; }
  .mock-crumb { font-size: 0.7rem; line-height: 1.35; }
  .mock-count { font-size: 0.65rem; }
}

@media print {
  .sidebar, .panel-topbar, .btn, .appbar { display: none !important; }
  .panel { grid-template-columns: 1fr; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
