/* ApexOS App Shell — claims SPA overlay */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

:root {
  --bg: #09090b;
  --bg-2: #111114;
  --bg-3: #1a1a20;
  --surface: #18181b;
  --surface-2: #222228;
  --surface-3: #2a2a32;
  --border: rgba(255,255,255,0.07);
  --border-2: rgba(255,255,255,0.12);
  --fg: #f4f4f5;
  --fg-2: #a1a1aa;
  --fg-3: #71717a;
  --accent: #8b5cf6;
  --accent-dim: rgba(139,92,246,0.15);
  --accent-hover: #7c3aed;
  --green: #34d399;
  --green-dim: rgba(52,211,153,0.12);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251,191,36,0.12);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.12);
  --blue: #60a5fa;
  --blue-dim: rgba(96,165,250,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --sidebar-w: 260px;
  --topbar-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

::selection { background: rgba(139,92,246,0.3); color: var(--fg); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* ── APP SHELL ─────────────────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 700;
  font-family: var(--font-display);
}

.sidebar-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.sidebar-logo-sub {
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-top: -2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 8px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--surface); color: var(--fg); }

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── MAIN CONTENT ─────────────────────────────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--bg-2);
  flex-shrink: 0;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-2); }

.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); color: var(--fg); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.2);
}
.btn-danger:hover { background: rgba(248,113,113,0.2); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ── BADGES ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-filed    { background: var(--blue-dim);   color: var(--blue); }
.badge-review   { background: var(--yellow-dim); color: var(--yellow); }
.badge-approved { background: var(--green-dim);  color: var(--green); }
.badge-paid     { background: var(--green-dim);  color: var(--green); }
.badge-docs     { background: var(--accent-dim);  color: var(--accent); }
.badge-error    { background: var(--red-dim);    color: var(--red); }
.badge-neutral  { background: var(--surface-2);  color: var(--fg-2); }

/* ── PAGE HEADER ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-subtitle { font-size: 14px; color: var(--fg-3); }

/* ── FILTER BAR ───────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 1;
  max-width: 320px;
}

.search-box svg { width: 14px; height: 14px; color: var(--fg-3); flex-shrink: 0; }

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 13px;
  font-family: var(--font-body);
  width: 100%;
}

.search-box input::placeholder { color: var(--fg-3); }

select.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 13px;
  font-family: var(--font-body);
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
}

select.filter-select option { background: var(--bg-3); }

/* ── DATA TABLE ───────────────────────────────────────────────────────────── */
.data-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background 0.12s;
  cursor: pointer;
}

.data-table tbody tr:hover { background: var(--bg-3); }

.td-claim-number {
  font-weight: 600;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 13px;
}

.td-lead-name { font-weight: 500; color: var(--fg); }

.td-amount {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg);
}

.td-date { color: var(--fg-3); font-size: 12px; }

.table-empty {
  padding: 60px 24px;
  text-align: center;
}

.table-empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.table-empty p { color: var(--fg-3); font-size: 14px; }

/* ── FORM ─────────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}

.form-label span.req { color: var(--accent); }

.form-input, .form-select, .form-textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 14px;
  font-family: var(--font-body);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--fg-3); }

.form-select { cursor: pointer; }
.form-select option { background: var(--bg-3); }

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint { font-size: 11px; color: var(--fg-3); }

.form-error { font-size: 12px; color: var(--red); }

/* ── MODAL ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.modal-close:hover { background: var(--surface-3); color: var(--fg); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ── STEPPER ──────────────────────────────────────────────────────────────── */
.claim-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.stepper-step {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.stepper-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.stepper-step.done:not(:last-child)::after {
  background: var(--green);
}

.stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg-3);
  color: var(--fg-3);
  flex-shrink: 0;
  transition: all 0.2s;
}

.stepper-step.done .stepper-circle {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
}

.stepper-step.current .stepper-circle {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.stepper-label {
  font-size: 11px;
  color: var(--fg-3);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
}

.stepper-step.done .stepper-label,
.stepper-step.current .stepper-label { color: var(--fg-2); }

/* ── CALCULATOR PANEL ──────────────────────────────────────────────────────── */
.calc-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.calc-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-title svg { color: var(--accent); }

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-metric {
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.calc-metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 8px;
}

.calc-metric-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.calc-metric-sub { font-size: 11px; color: var(--fg-3); margin-top: 4px; }

.calc-highlight {
  background: var(--accent-dim);
  border: 1px solid rgba(139,92,246,0.2);
}

.calc-highlight .calc-metric-value { color: var(--accent); }

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

.dep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.dep-row:last-child { border-bottom: none; }
.dep-row-label { color: var(--fg-2); }
.dep-row-val { font-weight: 600; color: var(--fg); font-family: var(--font-display); }

/* ── DOC CHECKLIST ────────────────────────────────────────────────────────── */
.doc-checklist { display: flex; flex-direction: column; gap: 10px; }

.doc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.doc-info { flex: 1; min-width: 0; }

.doc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}

.doc-required {
  font-size: 11px;
  color: var(--yellow);
  font-weight: 600;
}

.doc-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.doc-status.pending { background: var(--yellow-dim); color: var(--yellow); }
.doc-status.uploaded { background: var(--green-dim); color: var(--green); }
.doc-status.missing  { background: var(--red-dim); color: var(--red); }

/* ── SUPPLEMENTS ──────────────────────────────────────────────────────────── */
.supplement-list { display: flex; flex-direction: column; gap: 10px; }

.supplement-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.supplement-amount {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  min-width: 90px;
}

.supplement-info { flex: 1; }
.supplement-label { font-size: 13px; font-weight: 500; color: var(--fg); }
.supplement-date { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

/* ── CARRIER DOC REQS ─────────────────────────────────────────────────────── */
.carrier-reqs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.carrier-reqs-header {
  padding: 14px 18px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.carrier-reqs-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.carrier-reqs-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carrier-reqs-body:empty { display: none; }

.req-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-2);
}

.req-doc::before { content: '✓'; color: var(--green); font-weight: 700; }

/* ── SECTION DIVIDER ──────────────────────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
}

.section-divider-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}

.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── STAT CARDS ───────────────────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.stat-sub { font-size: 11px; color: var(--fg-3); margin-top: 4px; }

/* ── TABS ────────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-3);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}

.tab-btn:hover { color: var(--fg-2); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-width: 360px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── SKELETON ────────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-row { display: flex; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.skeleton-row > div { flex: 1; }
.skeleton-row > div:first-child { max-width: 100px; }
.skeleton-row > div:last-child { max-width: 80px; }

/* ── AI FLAG ─────────────────────────────────────────────────────────────── */
.ai-flag {
  background: var(--yellow-dim);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-flag-icon { font-size: 16px; flex-shrink: 0; }

.ai-flag-text {
  font-size: 13px;
  color: var(--yellow);
  font-weight: 500;
  flex: 1;
}

.ai-flag-text strong { font-weight: 700; }

/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */
.empty-state {
  padding: 60px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.25;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p { color: var(--fg-3); font-size: 13px; }
.empty-state .btn { margin-top: 20px; }

/* ── CLAIM DETAIL LAYOUT ──────────────────────────────────────────────────── */
.claim-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.claim-main { display: flex; flex-direction: column; gap: 20px; }
.claim-sidebar { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-3);
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}

.card-body { padding: 18px; }

/* ── AUTOCOMPLETE ────────────────────────────────────────────────────────── */
.autocomplete-wrap { position: relative; }

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--surface-2); }
.autocomplete-item-name { font-weight: 600; color: var(--fg); }
.autocomplete-item-sub { font-size: 11px; color: var(--fg-3); margin-top: 1px; }

.autocomplete-no-results {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--fg-3);
  text-align: center;
}

/* ── LOGO SWITCHER ──────────────────────────────────────────────────────── */
.company-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  cursor: pointer;
}

/* ── UTIL ────────────────────────────────────────────────────────────────── */
.text-muted { color: var(--fg-3); font-size: 13px; }
.text-sm    { font-size: 12px; }
.text-lg    { font-size: 16px; }
.fw-500     { font-weight: 500; }
.fw-700     { font-weight: 700; }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-center { text-align: center; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── CALENDAR ──────────────────────────────────────────────────────────────── */
.calendar-grid { display: flex; flex-direction: column; }

.calendar-cell { min-height: 64px; transition: background 0.15s; }
.calendar-cell.drop-hover { background: rgba(139,92,246,0.12) !important; outline: 2px dashed var(--accent); outline-offset: -2px; }
.calendar-cell.drag-over { background: var(--accent-dim) !important; }

.calendar-job-card { cursor: grab; user-select: none; transition: opacity 0.15s, transform 0.1s; }
.calendar-job-card:hover { opacity: 0.85; transform: translateY(-1px); }
.calendar-job-card.dragging { opacity: 0.4; cursor: grabbing; }

.calendar-block { border-radius: 6px; padding: 6px 8px; font-size: 12px; cursor: pointer; transition: filter 0.15s; }
.calendar-block:hover { filter: brightness(1.1); }
.calendar-block.dragging { opacity: 0.5; }

.weather-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(251,191,36,0.3);
  letter-spacing: 0.04em;
}

.conflict-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: white;
  line-height: 1;
}

.conflict-cell { background: rgba(248,113,113,0.06) !important; }

.calendar-nav { display: flex; align-items: center; gap: 12px; }

.view-toggle button { transition: background 0.15s, color 0.15s; }

.dim-cell { opacity: 0.35; }

@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }