/* ═══════════════════════════════════════════════════════════════
   VETRA Command Center — Light Theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #f3f4f6;
  --bg-card: #ffffff;
  --bg-card-hover: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --green: #10b981;
  --green-light: #d1fae5;
  --yellow: #f59e0b;
  --yellow-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fee2e2;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --navy: #1e3a5f;
  --navy-dark: #0f172a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
code, .code-label { font-family: 'SF Mono', Menlo, monospace; font-size: 0.8em; background: var(--bg); padding: 2px 6px; border-radius: 4px; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-left { display: flex; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo { height: 32px; width: auto; max-width: 160px; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-title { font-size: 1.1rem; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.nav-subtitle { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.nav-center { display: flex; gap: 0.25rem; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.nav-link:hover { background: var(--bg); color: var(--text-primary); }
.nav-link.active { background: var(--accent-light); color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-alerts { color: var(--text-secondary); cursor: pointer; padding: 0.5rem; border-radius: var(--radius); }
.nav-alerts:hover { background: var(--bg); }

.nav-user { display: flex; align-items: center; gap: 0.75rem; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem;
}
.nav-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.nav-user-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.nav-role-badge {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 1px 6px; border-radius: 3px;
  display: inline-block; width: fit-content;
}
.role-contractor { background: var(--blue-light); color: var(--blue); }
.role-carrier { background: var(--purple-light); color: var(--purple); }
.role-homeowner { background: var(--green-light); color: var(--green); }
.role-technician { background: var(--yellow-light); color: #b45309; }

.nav-logout { color: var(--text-muted); padding: 0.4rem; border-radius: var(--radius); }
.nav-logout:hover { background: var(--red-light); color: var(--red); }

/* ── Stat Bar (dark strip) ───────────────────────────────── */
.stat-bar {
  background: var(--navy-dark);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 2rem;
}
.stat-bar-item { display: flex; align-items: center; gap: 0.75rem; }
.stat-bar-data { display: flex; flex-direction: column; }
.stat-bar-value { color: #fff; font-size: 1.25rem; font-weight: 700; line-height: 1; }
.stat-bar-label { color: rgba(255,255,255,0.5); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Content ─────────────────────────────────────────────── */
.content { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

/* ── Quick Stats ─────────────────────────────────────────── */
.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.qs-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.qs-card:hover { box-shadow: var(--shadow-md); }
.qs-info { display: flex; flex-direction: column; }
.qs-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.qs-value { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
.qs-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.qs-green { background: var(--green-light); color: var(--green); }
.qs-blue { background: var(--blue-light); color: var(--blue); }
.qs-yellow { background: var(--yellow-light); color: var(--yellow); }
.qs-purple { background: var(--purple-light); color: var(--purple); }

/* ── Dashboard Grid ──────────────────────────────────────── */
.dash-grid-main, .dash-grid-secondary {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.dash-col-wide { min-width: 0; }
.dash-col-narrow { min-width: 0; }

/* ── Panels ──────────────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.panel-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.panel-badge {
  font-size: 0.75rem; color: var(--text-muted);
  background: var(--bg); padding: 2px 10px; border-radius: 12px;
}
.panel-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border-light); text-align: center; }

/* ── Live Indicator ──────────────────────────────────────── */
.live-indicator { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--green); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: pulse 2s infinite;
}
.live-dot-small {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Job Cards ───────────────────────────────────────────── */
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; padding: 1.25rem; }
.job-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.job-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border); }
.job-card-header { display: flex; justify-content: space-between; align-items: center; }
.job-client { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.job-type { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.job-tech { font-size: 0.75rem; color: var(--text-secondary); }

.job-thumb {
  aspect-ratio: 16/9;
  background: var(--navy-dark);
  border-radius: var(--radius);
  margin: 0.5rem 0;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.thumb-placeholder { color: rgba(255,255,255,0.4); }

.job-meta { display: flex; justify-content: space-between; align-items: center; }
.job-date { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.job-action { margin-top: 0.5rem; }
.btn-view {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  background: var(--navy-dark); color: white; padding: 0.4rem 0.75rem;
  border-radius: var(--radius); font-size: 0.75rem; font-weight: 500;
  transition: background 0.15s;
  width: 100%;
}
.job-card:hover .btn-view { background: var(--accent); }

/* ── Live Viewer ────────────────────────────────────────── */
.live-viewer { padding: 1.25rem; }
.live-main { margin-bottom: 1rem; }
.live-main-frame {
  aspect-ratio: 16/9;
  background: var(--navy-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.live-main-frame img { display: block; }
.live-info-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.25rem;
  font-size: 0.75rem; color: var(--text-muted);
}
.live-filmstrip {
  display: flex; gap: 0.5rem; overflow-x: auto;
  padding-bottom: 0.25rem;
}
.filmstrip-thumb {
  width: 80px; height: 48px; flex-shrink: 0;
  background: var(--navy-dark); border-radius: 6px;
  overflow: hidden; cursor: pointer;
  border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, transform 0.15s;
}
.filmstrip-thumb:hover { border-color: var(--border); transform: scale(1.05); }
.filmstrip-thumb.active { border-color: var(--accent); }
.filmstrip-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Status Pills ────────────────────────────────────────── */
.status-pill, .status-badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 10px;
  display: inline-block;
}
.status-open, .status-scheduled { background: var(--blue-light); color: var(--blue); }
.status-in_review, .status-in-review, .status-pending { background: var(--yellow-light); color: var(--yellow); }
.status-approved, .status-completed, .status-resolved, .status-active { background: var(--green-light); color: var(--green); }
.status-closed, .status-settled { background: #e5e7eb; color: #6b7280; }
.status-submitted { background: var(--purple-light); color: var(--purple); }
.status-disputed { background: var(--red-light); color: var(--red); }

/* ── Alert List ──────────────────────────────────────────── */
.alert-list { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; max-height: 420px; overflow-y: auto; }
.alert-item {
  display: flex; gap: 0.75rem; padding: 0.65rem 0.75rem;
  border-radius: var(--radius); border: 1px solid transparent;
}
.alert-info { background: var(--blue-light); border-color: #bfdbfe; }
.alert-info .alert-icon { color: var(--blue); }
.alert-warning { background: var(--yellow-light); border-color: #fde68a; }
.alert-warning .alert-icon { color: var(--yellow); }
.alert-item:not(.alert-info):not(.alert-warning) { background: var(--bg); }
.alert-icon { flex-shrink: 0; margin-top: 2px; }
.alert-content { min-width: 0; }
.alert-title { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.alert-detail { font-size: 0.7rem; color: var(--text-secondary); }
.alert-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }

/* ── Data Tables ─────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border); text-align: left;
}
.data-table tbody td {
  padding: 0.75rem 1rem; font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

.user-cell { display: flex; align-items: center; gap: 0.5rem; }
.user-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600; flex-shrink: 0;
}

.btn-sm {
  display: inline-block; padding: 0.3rem 0.75rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.75rem; font-weight: 500;
  color: var(--text-secondary); transition: all 0.15s;
}
.btn-sm:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Message List ────────────────────────────────────────── */
.message-list { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.message-item {
  display: flex; gap: 0.75rem; padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
}
.message-auto { background: var(--blue-light); }
.message-auto .message-icon { color: var(--blue); }
.message-client { background: var(--green-light); }
.message-client .message-icon { color: var(--green); }
.message-system { background: var(--bg); }
.message-system .message-icon { color: var(--text-muted); }
.message-icon { flex-shrink: 0; margin-top: 2px; }
.message-content { min-width: 0; }
.message-head { display: flex; justify-content: space-between; align-items: baseline; }
.message-type { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.message-time { font-size: 0.65rem; color: var(--text-muted); }
.message-body { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

.btn-outline {
  display: inline-block; padding: 0.4rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  transition: all 0.15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Flash Messages ──────────────────────────────────────── */
.flash-container { max-width: 1400px; margin: 0 auto; padding: 1rem 1.5rem 0; }
.flash {
  padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
}
.flash-success { background: var(--green-light); color: #065f46; border: 1px solid #6ee7b7; }
.flash-error { background: var(--red-light); color: #991b1b; border: 1px solid #fca5a5; }
.flash-warning { background: var(--yellow-light); color: #92400e; border: 1px solid #fcd34d; }
.flash-info { background: var(--blue-light); color: #1e40af; border: 1px solid #93c5fd; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 2rem; color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  text-align: center; padding: 1.5rem;
  color: var(--text-muted); font-size: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-compliance {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.75rem;
}
.footer-compliance a {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); font-size: 0.75rem; font-weight: 500;
  padding: 2px 4px; border-radius: 3px;
  transition: color 0.15s;
}
.footer-compliance a:hover { color: var(--accent); }
.footer-sep { color: var(--border); font-size: 0.6rem; }
.footer-copy { color: var(--text-muted); font-size: 0.7rem; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   OLD DASHBOARD compat (carrier, homeowner, detail pages)
   ═══════════════════════════════════════════════════════════ */
.dashboard { padding: 0; }
.dashboard h1, .section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-primary); }
.section { margin-bottom: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.25rem;
  box-shadow: var(--shadow); text-align: center;
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }
.stat-active .stat-value { color: var(--blue); }
.stat-success .stat-value { color: var(--green); }

/* ══════════════════════════════════════════════════════════
   COMPLIANCE CENTER (tabs)
   ══════════════════════════════════════════════════════════ */
.tabs {
  display: flex; gap: 0.25rem; padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tab-link {
  padding: 0.5rem 0.75rem; border-radius: var(--radius);
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap; transition: all 0.15s;
}
.tab-link:hover { background: var(--bg); color: var(--text-primary); }
.tab-link.active { background: var(--accent); color: white; }
.tab-content { background: var(--bg-card); border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); }

/* ── Compliance Detail Cards ─────────────────────────────── */
.detail-card {
  background: var(--bg); border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: 1rem;
}
.detail-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border-light); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.detail-value { font-size: 0.8rem; color: var(--text-primary); font-weight: 600; }

/* ── Claim Detail / Review pages ─────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }

.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; padding: 1.25rem; }
.frame-card {
  background: var(--bg); border-radius: var(--radius); padding: 0.75rem;
  text-align: center;
}
.frame-card img { max-width: 100%; border-radius: var(--radius); margin-bottom: 0.5rem; }
.frame-placeholder {
  aspect-ratio: 4/3; background: var(--navy-dark); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.3);
  margin-bottom: 0.5rem; font-size: 0.75rem;
}

/* ── Session Groups ───────────────────────────────── */
.session-groups {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.session-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.session-header:hover { background: #e2e8f0; }
.session-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.session-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  color: var(--text-muted);
}
.session-group.collapsed .session-chevron { transform: rotate(-90deg); }
.session-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.session-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.session-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.session-summary {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 400;
  font-style: italic;
  margin-top: 0.15rem;
  line-height: 1.4;
}
.session-body {
  border-top: 1px solid var(--border);
}
.session-group.collapsed .session-body { display: none; }
.session-body .frame-grid { padding: 1rem; }
@media (max-width: 768px) {
  .session-groups { padding: 0.5rem; }
  .session-header { padding: 0.65rem 0.75rem; }
  .session-title { font-size: 0.8rem; }
}

/* ── Blocking Party Pills ─────────────────────────────── */
.blocking-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.blocking-waiting_on_you {
  background: rgba(248,113,113,0.15);
  color: #f87171;
}
.blocking-waiting_on_carrier {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}
.blocking-waiting_on_homeowner {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
}

/* ── Days-Idle Warning ───────────────────────────────── */
.job-date-warning {
  color: #f87171 !important;
  font-weight: 600;
}
.idle-flag {
  display: block;
  font-size: 0.6rem;
  color: #f87171;
  margin-top: 0.1rem;
  font-weight: 600;
}

/* ── Estimate Display ────────────────────────────────── */
.job-estimate {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.15rem;
}

/* ── Stat Bar Alert Pulse ────────────────────────────── */
.stat-bar-alert .stat-bar-value {
  color: #f87171;
  font-weight: 800;
}
.stat-bar-alert {
  background: rgba(248,113,113,0.08);
  border-radius: 0.5rem;
}
.stat-bar-ready .stat-bar-value {
  color: #34d399;
  font-weight: 800;
}
.stat-bar-ready {
  background: rgba(52,211,153,0.08);
  border-radius: 0.5rem;
}
.stat-bar-sub {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.05rem;
  letter-spacing: 0.01em;
}

.analysis-card {
  background: var(--bg); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.analysis-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.finding-card {
  padding: 0.75rem; border-radius: var(--radius); margin-bottom: 0.5rem;
  border-left: 3px solid var(--border);
  background: var(--bg-card);
}
.finding-card.severity-high { border-left-color: var(--red); }
.finding-card.severity-medium { border-left-color: var(--yellow); }
.finding-card.severity-low { border-left-color: var(--green); }

/* ── Review Layout ───────────────────────────────────────── */
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.review-form { margin-top: 1rem; }
.review-form textarea {
  width: 100%; padding: 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: inherit; font-size: 0.875rem;
  resize: vertical; min-height: 100px;
}
.review-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; border: none; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #0f766e; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-small { padding: 0.3rem 0.75rem; font-size: 0.8rem; background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-small:hover { background: var(--accent); color: white; border-color: var(--accent); }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.65rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.875rem; font-family: inherit; background: var(--bg-card);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}

/* ── Login ────────────────────────────────────────────────── */
.login-container {
  min-height: calc(100vh - 60px - 80px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.login-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 2.5rem; width: 100%; max-width: 400px;
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h1 { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: 2px; }
.login-header p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }
.login-form .btn { margin-top: 0.5rem; }
.login-error { color: var(--red); font-size: 0.8rem; margin-top: 0.75rem; text-align: center; min-height: 1.2em; }

/* ── Error Page ──────────────────────────────────────────── */
.error-page { text-align: center; padding: 4rem 2rem; }
.error-page h1 { font-size: 6rem; font-weight: 800; color: var(--red); opacity: 0.6; line-height: 1; }
.error-page p { color: var(--text-secondary); margin: 1rem 0 2rem; }

/* ── Severity Badges ─────────────────────────────────────── */
.severity-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; }
.severity-info { background: var(--blue-light); color: var(--blue); }
.severity-warning { background: var(--yellow-light); color: var(--yellow); }
.severity-critical { background: var(--red-light); color: var(--red); }

/* ── Chain Verify ────────────────────────────────────────── */
.chain-verify { background: var(--bg); border-radius: var(--radius); padding: 1.25rem; }
.chain-input { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.chain-input input { flex: 1; }
.chain-result { padding: 1rem; border-radius: var(--radius); font-size: 0.875rem; }
.chain-valid { background: var(--green-light); color: #065f46; border: 1px solid #6ee7b7; }
.chain-invalid { background: var(--red-light); color: #991b1b; border: 1px solid #fca5a5; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash-grid-main, .dash-grid-secondary { grid-template-columns: 1fr; }
  .quick-stats { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .quick-stats { grid-template-columns: 1fr; }
  .stat-bar { flex-wrap: wrap; gap: 1rem; justify-content: center; }
  .navbar { padding: 0 0.75rem; }
  .nav-center { display: none; }
  .nav-user-info { display: none; }
  .job-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filmstrip-thumb { width: 60px; height: 36px; }
  .live-info-bar { flex-direction: column; gap: 0.25rem; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════
   TECHNICIAN JOB LIST (mobile-first)
   ═══════════════════════════════════════════════════════════ */
.tech-jobs-list { display: flex; flex-direction: column; gap: 0.75rem; }
.tech-job-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow); border: 1px solid transparent;
  transition: all 0.15s; cursor: pointer;
  text-decoration: none; color: inherit;
}
.tech-job-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-1px); }
.tech-job-left { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.tech-job-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tech-job-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tech-job-addr {
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tech-job-meta { font-size: 0.75rem; color: var(--text-secondary); }
.tech-job-tags { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; }
.tech-frame-count {
  font-size: 0.65rem; color: var(--text-muted);
  background: var(--bg); padding: 1px 6px; border-radius: 8px;
}
.tech-job-right { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.tech-record-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.tech-job-card:hover .tech-record-btn { background: #0f766e; }
.tech-record-label { font-size: 0.65rem; font-weight: 600; color: var(--accent); }

@media (max-width: 480px) {
  .tech-job-icon { width: 36px; height: 36px; }
  .tech-job-icon svg { width: 18px; height: 18px; }
  .tech-job-addr { font-size: 0.85rem; }
  .tech-record-btn { width: 40px; height: 40px; }
}

/* ═══════════════════════════════════════════════════════════
   RECORDING PAGE
   ═══════════════════════════════════════════════════════════ */

/* ── Top Bar ─────────────────────────────────────────────── */
.rec-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--navy-dark); color: #fff;
}
.rec-back {
  display: inline-flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.7); font-size: 0.8rem; font-weight: 500;
  transition: color 0.15s;
}
.rec-back:hover { color: #fff; }
.rec-claim-info {
  display: flex; flex-direction: column; align-items: center; line-height: 1.3;
}
.rec-claim-id { font-size: 0.85rem; font-weight: 700; }
.rec-claim-addr { font-size: 0.7rem; color: rgba(255,255,255,0.5); }
.rec-status {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600;
}
.rec-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #6b7280;
}

/* ── Camera Viewport ─────────────────────────────────────── */
.rec-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px - 48px - 100px); /* navbar + topbar + controls */
  min-height: 300px;
  background: #000;
  overflow: hidden;
}
.rec-viewport video {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ── Overlay ─────────────────────────────────────────────── */
.rec-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.rec-overlay-content {
  text-align: center; padding: 2rem;
  max-width: 400px;
}
.rec-overlay-content h3 {
  color: #fff; font-size: 1.25rem; margin: 1rem 0 0.5rem;
}
.rec-overlay-content p {
  color: rgba(255,255,255,0.6); font-size: 0.875rem; line-height: 1.6;
}

/* ── HUD (heads-up stats) ────────────────────────────────── */
.rec-hud {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.75rem 1rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
  z-index: 5;
}
.rec-hud-left { display: flex; gap: 1.5rem; }
.rec-hud-item { display: flex; flex-direction: column; }
.rec-hud-val {
  color: #fff; font-size: 1.25rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rec-hud-label {
  color: rgba(255,255,255,0.5); font-size: 0.65rem;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.rec-privacy-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(16,185,129,0.15); color: var(--green);
  padding: 4px 10px; border-radius: 12px;
  font-size: 0.7rem; font-weight: 600;
  border: 1px solid rgba(16,185,129,0.3);
}

/* ── Flash effect ────────────────────────────────────────── */
.rec-flash {
  position: absolute; inset: 0;
  background: #fff; opacity: 0;
  pointer-events: none; z-index: 8;
  transition: opacity 0.1s;
}

/* ── Last frame thumbnail ────────────────────────────────── */
.rec-last-frame {
  position: absolute; bottom: 0.75rem; right: 0.75rem;
  width: 120px; z-index: 6;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.rec-last-frame img {
  width: 100%; display: block;
}
.rec-last-label {
  display: block; text-align: center;
  background: rgba(0,0,0,0.7); color: rgba(255,255,255,0.7);
  font-size: 0.6rem; padding: 2px 0;
}

/* ── Controls Bar ────────────────────────────────────────── */
.rec-controls {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; padding: 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.rec-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-lg);
  font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.15s;
}
.rec-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rec-btn-start {
  background: var(--accent); color: white;
}
.rec-btn-start:hover:not(:disabled) { background: #0f766e; }
.rec-btn-stop {
  background: var(--red); color: white;
}
.rec-btn-stop:hover { background: #dc2626; }
.rec-controls-info {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; color: var(--text-muted);
  flex-wrap: wrap; justify-content: center;
}
.rec-sep { color: var(--border); }

/* ── Recording responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .rec-viewport { height: calc(100vh - 60px - 48px - 120px); }
  .rec-claim-info { display: none; }
  .rec-hud-left { gap: 1rem; }
  .rec-hud-val { font-size: 1rem; }
  .rec-last-frame { width: 80px; }
  .rec-btn { padding: 0.65rem 1.5rem; font-size: 0.9rem; }
  .rec-controls-info { font-size: 0.6rem; }
}


/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); max-width: 560px; width: 90%;
  max-height: 80vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--text-muted); line-height: 1; padding: 0 0.25rem;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 1.25rem 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ── Readiness Checklist ────────────────────────────────────── */
.readiness-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.45rem 0; border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem; color: var(--text-primary);
}
.readiness-item:last-child { border-bottom: none; }
.readiness-check {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.readiness-check.ok { background: var(--green-light); color: var(--green); }
.readiness-check.missing { background: var(--red-light); color: var(--red); }

/* ── Gap Items (modal) ──────────────────────────────────────── */
.gap-item {
  padding: 0.65rem 0.85rem; border-radius: var(--radius);
  margin-bottom: 0.5rem; font-size: 0.85rem;
}
.gap-item strong {
  display: block; font-size: 0.8rem; margin-bottom: 2px;
}
.gap-item span {
  display: block; font-size: 0.75rem; opacity: 0.8;
}
.gap-blocking {
  background: var(--red-light); color: #991b1b;
  border: 1px solid #fca5a5;
}
.gap-warning {
  background: var(--yellow-light); color: #92400e;
  border: 1px solid #fcd34d;
}

/* ═══════════════════════════════════════════════════════════════
   VETRA CHAT WIDGET
   ═══════════════════════════════════════════════════════════════ */

.vetra-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.vetra-chat-toggle:hover {
  background: #0f766e;
  transform: scale(1.05);
}
.vetra-chat-toggle.active {
  background: #475569;
}
.vetra-chat-toggle svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Panel */
.vetra-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.vetra-chat-header {
  background: #0f172a;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.vetra-chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vetra-chat-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.vetra-chat-subtitle {
  font-size: 0.7rem;
  color: #94a3b8;
}
.vetra-chat-header-actions {
  display: flex;
  gap: 4px;
}
.vetra-chat-header-actions button {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vetra-chat-header-actions button:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.vetra-chat-header-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Messages */
.vetra-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vetra-chat-messages::-webkit-scrollbar { width: 5px; }
.vetra-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Message bubbles */
.vetra-chat-msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
}
.vetra-chat-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.vetra-chat-msg-assistant {
  align-self: flex-start;
}
.vetra-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.vetra-chat-msg-text {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-break: break-word;
}
.vetra-chat-msg-user .vetra-chat-msg-text {
  background: #ccfbf1;
  color: #0f172a;
  border-bottom-right-radius: 4px;
}
.vetra-chat-msg-assistant .vetra-chat-msg-text {
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}
.vetra-chat-msg-text code {
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.vetra-chat-msg-text ul {
  margin: 4px 0;
  padding-left: 18px;
}
.vetra-chat-msg-text li {
  margin: 2px 0;
}

/* Typing indicator */
.vetra-chat-typing .vetra-chat-msg-text {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 18px;
}
.vetra-chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: vetra-bounce 1.4s infinite ease-in-out both;
}
.vetra-chat-dot:nth-child(1) { animation-delay: -0.32s; }
.vetra-chat-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes vetra-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Input area */
.vetra-chat-input-area {
  border-top: 1px solid #e2e8f0;
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.vetra-chat-input-area textarea {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 100px;
  line-height: 1.4;
}
.vetra-chat-input-area textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}
.vetra-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.vetra-chat-send:hover { background: #0f766e; }
.vetra-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.vetra-chat-send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Responsive: full-screen on mobile */
@media (max-width: 768px) {
  .vetra-chat-panel {
    width: 100vw;
    height: calc(100vh - 70px);
    max-height: none;
    bottom: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
  }
  .vetra-chat-toggle {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CONTRACTOR REPORTS
   ═══════════════════════════════════════════════════════════════ */

/* Report Header */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #0f766e; }

/* Readiness table row color coding */
.readiness-row-ready { border-left: 3px solid var(--green); }
.readiness-row-blocked { border-left: 3px solid var(--red); }
.readiness-row-waiting { border-left: 3px solid var(--yellow); }

/* Small blocking pill for tables */
.blocking-pill-sm {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}
.blocking-pill-sm.blocking-waiting_on_carrier {
  background: var(--yellow-light);
  color: #92400e;
}
.blocking-pill-sm.blocking-waiting_on_you {
  background: var(--red-light);
  color: var(--red);
}

/* Readiness state pills */
.status-ready { background: var(--green-light); color: var(--green); }
.status-not-started { background: var(--border-light); color: var(--text-muted); }
.status-inspection-in-progress { background: var(--blue-light); color: var(--blue); }
.status-awaiting-review { background: var(--yellow-light); color: #92400e; }
.status-review-blocked { background: var(--red-light); color: var(--red); }
.status-awaiting-report { background: var(--purple-light); color: var(--purple); }
.status-awaiting-estimate { background: var(--yellow-light); color: #92400e; }
.status-awaiting-consent { background: var(--yellow-light); color: #92400e; }

/* Gap summary badge */
.gap-summary {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--yellow-light);
  color: #92400e;
  cursor: help;
}
.text-success { color: var(--green); font-size: 0.75rem; font-weight: 600; }
.text-warning { color: var(--red); font-weight: 600; }

/* ── Career Record ──────────────────────────────────────────── */

.career-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.career-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
}
.career-card-highlight {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green-light) 0%, var(--bg-card) 100%);
}
.career-card-streak {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-card) 100%);
}
.career-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.career-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.career-sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Chart container */
.chart-container {
  padding: 1.25rem;
  position: relative;
  height: 340px;
}
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Responsive: Reports ───────────────────────────────────── */
@media (max-width: 900px) {
  .career-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .report-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
@media (max-width: 600px) {
  .career-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   CARRIER CLAIMS QUEUE
   ═══════════════════════════════════════════════════════════════ */

/* Evidence Status Badges */
.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: help;
}
.evidence-complete {
  background: var(--green-light);
  color: var(--green);
}
.evidence-gaps {
  background: var(--yellow-light);
  color: #92400e;
}
.evidence-blocked {
  background: var(--red-light);
  color: var(--red);
}

/* Contractor Trust Badges */
.contractor-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: help;
  width: fit-content;
}
.trust-verified {
  background: var(--green-light);
  color: var(--green);
}
.trust-good {
  background: var(--blue-light);
  color: var(--blue);
}
.trust-new {
  background: var(--border-light);
  color: var(--text-muted);
}
.trust-caution {
  background: var(--red-light);
  color: var(--red);
}

/* Age warning */
.age-warning {
  color: var(--red);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   CARRIER REPORTS
   ═══════════════════════════════════════════════════════════════ */

/* Report hub cards */
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.report-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.report-card-icon {
  width: 40px;
  height: 40px;
  background: rgba(13,148,136,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.report-card-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.report-card-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.report-card-frequency {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}
.freq-daily { background: #dbeafe; color: #2563eb; }
.freq-rolling { background: #dcfce7; color: #16a34a; }
.freq-quarterly { background: #ede9fe; color: #7c3aed; }
.freq-realtime { background: #fee2e2; color: #dc2626; }

/* Fraud flags */
.fraud-flags-list { display: flex; flex-direction: column; }
.fraud-flag {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--border);
  transition: background 0.15s;
}
.fraud-flag:hover { background: rgba(0,0,0,0.015); }
.fraud-flag:last-child { border-bottom: none; }
.flag-high { border-left-color: #ef4444; }
.flag-medium { border-left-color: #f59e0b; }
.flag-low { border-left-color: #3b82f6; }
.flag-severity { flex-shrink: 0; padding-top: 0.1rem; }
.flag-content { flex: 1; min-width: 0; }
.flag-title { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.flag-description { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.flag-meta { display: flex; gap: 1rem; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.5rem; align-items: center; }
.flag-signal { font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; font-size: 0.65rem; }

/* Severity badges */
.severity-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
}
.severity-high { background: #fee2e2; color: #dc2626; }
.severity-medium { background: #fef3c7; color: #d97706; }
.severity-low { background: #dbeafe; color: #2563eb; }

/* Risk score bars */
.risk-bar-container {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.risk-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.risk-low { background: #34d399; }
.risk-medium { background: #fbbf24; }
.risk-high { background: #ef4444; }

/* ── Print: Readiness Report ───────────────────────────────── */
@media print {
  .report-header .btn-primary,
  .report-header .btn-outline,
  .navbar, .footer, .vetra-chat { display: none !important; }
  .panel { break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEOWNER PROGRESS VIEW
   ═══════════════════════════════════════════════════════════════ */

/* ── Progress Tracker (six-stage horizontal timeline) ──────── */
.progress-tracker {
  display: flex;
  align-items: flex-start;
  padding: 1.5rem 1.25rem;
  gap: 0;
  overflow-x: auto;
}
.progress-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  min-width: 100px;
}
.progress-stage:not(:first-child) .stage-connector {
  position: absolute;
  top: 16px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress-stage:not(:first-child) .stage-connector.connector-complete {
  background: #34d399;
}
.stage-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s;
}
.stage-complete .stage-dot {
  background: #34d399;
  border-color: #34d399;
  color: #fff;
}
.stage-current .stage-dot {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.08);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
  animation: stage-pulse 2s infinite;
}
@keyframes stage-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.08); }
}
.stage-number { font-size: 0.7rem; font-weight: 700; }
.stage-info {
  text-align: center;
  margin-top: 0.5rem;
  max-width: 120px;
}
.stage-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}
.stage-complete .stage-label { color: #34d399; }
.stage-current .stage-label { color: var(--accent); font-weight: 700; }
.stage-desc {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* Mobile: vertical progress tracker */
@media (max-width: 768px) {
  .progress-tracker {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
  }
  .progress-stage {
    flex-direction: row;
    align-items: center;
    min-width: unset;
    gap: 0.75rem;
    padding: 0.35rem 0;
  }
  .progress-stage:not(:first-child) .stage-connector {
    top: -50%;
    left: 15px;
    right: unset;
    width: 2px;
    height: 100%;
  }
  .stage-info {
    text-align: left;
    max-width: none;
    margin-top: 0;
  }
}

/* ── Daily Work Timeline ───────────────────────────────────── */
.daily-timeline {
  padding: 0.75rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.daily-date-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.daily-date-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.daily-date-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.daily-date-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.daily-sessions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
  margin-left: 4px;
}
.daily-session-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}
.daily-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.daily-session-header:hover { background: #f1f5f9; }
.daily-session-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.daily-session-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.daily-session-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.daily-session-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.daily-session-who {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.daily-session-summary {
  padding: 0 1rem;
}
.summary-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.65rem 0;
  font-style: italic;
  margin: 0;
}
.summary-loading {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  font-style: italic;
}
.daily-session-body {
  border-top: 1px solid var(--border);
}
.daily-session-card.collapsed .daily-session-body,
.daily-session-card.collapsed .daily-session-summary { display: none; }
.daily-session-card.collapsed .session-chevron { transform: rotate(-90deg); }

/* ── Technician Chips ──────────────────────────────────────── */
.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  background: #eff6ff;
  border-radius: 999px;
  font-size: 0.68rem;
  color: #2563eb;
  font-weight: 600;
}
.tech-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
}
.tech-chip-name { white-space: nowrap; }

/* ── Reconciliation Table ─────────────────────────────── */
.reconciliation-summary {
  margin-bottom: 1rem;
}
.reconciliation-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}
.reconciliation-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.recon-stat {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  border: 1px solid var(--border-light, var(--border));
}
.recon-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.recon-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.reconciliation-coverage {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(13, 148, 136, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
