/* ============================================
   KIRT VERIFY — MVP Demo Styles
   Premium dark theme SaaS UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0f1729;
  --bg-secondary: #151d32;
  --bg-card: #1a2340;
  --bg-card-hover: #1e2a4a;
  --bg-input: #111a2e;
  --bg-surface: #1e293b;
  --border: #2a3654;
  --border-light: #334466;
  --text-primary: #e8edf5;
  --text-secondary: #8899b4;
  --text-muted: #5a6d8a;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
  --accent-gradient-text: linear-gradient(135deg, #60a5fa, #22d3ee);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info-bg: rgba(59, 130, 246, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-full: 9999px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drawCircle {
  from { stroke-dashoffset: 283; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

.animate-in { animation: fadeInUp 0.5s ease-out forwards; opacity: 0; }
.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }

/* --- Screen Management --- */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  animation: pulse 8s ease-in-out infinite;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 0 24px;
  animation: scaleIn 0.6s ease-out;
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.login-logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-logo h1 span {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 24px;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238899b4' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

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

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

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.form-check label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
  top: calc(50% - 100px);
  left: calc(50% - 100px);
  opacity: 0;
  transition: 0s;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.btn-block { width: 100%; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-xs);
  font-size: 1rem;
}

/* ============================================
   APP LAYOUT
   ============================================ */
#app-screen {
  flex-direction: column;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-logo-text span {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
}

.nav-item-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.nav-item-badge {
  margin-left: auto;
  background: var(--accent-blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  min-width: 22px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

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

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

.content-header {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.content-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

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

.header-search {
  position: relative;
}

.header-search input {
  padding: 8px 16px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.85rem;
  width: 240px;
  outline: none;
  transition: var(--transition);
}

.header-search input:focus {
  border-color: var(--accent-blue);
  width: 300px;
}

.header-search::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
}

.content-body {
  padding: 32px 40px;
}

/* --- Page Sections --- */
.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.3s ease-out; }

/* ============================================
   DASHBOARD
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-light);
}

.stat-card:hover::before { opacity: 1; }

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-card-icon.blue { background: var(--info-bg); }
.stat-card-icon.green { background: var(--success-bg); }
.stat-card-icon.yellow { background: var(--warning-bg); }
.stat-card-icon.red { background: var(--danger-bg); }

.stat-card-trend {
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card-trend.up { color: var(--success); }
.stat-card-trend.down { color: var(--danger); }

.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  animation: countUp 0.6s ease-out;
}

.stat-card-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

/* --- Case Table --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 0;
}

.card-body.padded {
  padding: 24px;
}

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

.data-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(42, 54, 84, 0.5);
  vertical-align: middle;
}

.data-table tr {
  transition: var(--transition);
  cursor: pointer;
}

.data-table tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

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

/* --- Status Chips --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.chip.completed { background: var(--success-bg); color: var(--success); }
.chip.completed .chip-dot { background: var(--success); }

.chip.in-progress { background: var(--info-bg); color: var(--accent-blue); }
.chip.in-progress .chip-dot { background: var(--accent-blue); animation: pulse 2s infinite; }

.chip.flagged { background: var(--warning-bg); color: var(--warning); }
.chip.flagged .chip-dot { background: var(--warning); }

.chip.critical { background: var(--danger-bg); color: var(--danger); }
.chip.critical .chip-dot { background: var(--danger); }

.chip.pending { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.chip.pending .chip-dot { background: #94a3b8; }

/* Severity chips */
.severity-low { background: var(--success-bg); color: var(--success); }
.severity-moderate { background: var(--warning-bg); color: var(--warning); }
.severity-high { background: var(--danger-bg); color: var(--danger); }

/* --- Score Badge --- */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
}

.score-badge.high { background: var(--success-bg); color: var(--success); }
.score-badge.moderate { background: var(--warning-bg); color: var(--warning); }
.score-badge.low { background: var(--danger-bg); color: var(--danger); }

/* --- Activity Feed --- */
.activity-feed {
  padding: 8px 0;
}

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 24px;
  transition: var(--transition);
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.activity-dot.blue { background: var(--accent-blue); }
.activity-dot.green { background: var(--success); }
.activity-dot.yellow { background: var(--warning); }
.activity-dot.red { background: var(--danger); }

.activity-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.activity-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
}

/* ============================================
   NEW VERIFICATION FORM
   ============================================ */
.form-container {
  max-width: 720px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.form-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card h3 .step-number {
  width: 28px;
  height: 28px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.employment-entry {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}

.employment-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.employment-entry-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* ============================================
   CASE DETAIL
   ============================================ */
.case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.case-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.case-avatar {
  width: 64px;
  height: 64px;
  background: var(--accent-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.case-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.case-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.case-meta-sep {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

.case-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-score-display {
  text-align: center;
}

.case-score-circle {
  position: relative;
  width: 80px;
  height: 80px;
}

.case-score-circle svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.case-score-circle .bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.case-score-circle .progress {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 283;
  transition: stroke-dashoffset 1s ease-out;
}

.case-score-circle .progress.high { stroke: var(--success); }
.case-score-circle .progress.moderate { stroke: var(--warning); }
.case-score-circle .progress.low { stroke: var(--danger); }

.case-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 800;
}

.case-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* --- Tab Navigation --- */
.case-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 28px;
  overflow-x: auto;
}

.case-tab {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  background: none;
  font-family: var(--font);
}

.case-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.case-tab.active {
  background: var(--accent-blue);
  color: white;
}

.tab-content { display: none; }
.tab-content.active { display: block; opacity: 1; transform: translateY(0); animation: fadeIn 0.3s ease-out forwards; }

/* --- Timeline Visualization --- */
.timeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline-legend {
  display: flex;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-color.claimed { background: var(--accent-blue); }
.legend-color.verified { background: var(--success); }
.legend-color.undisclosed { background: var(--danger); }
.legend-color.overlap { background: repeating-linear-gradient(45deg, var(--danger), var(--danger) 3px, rgba(239,68,68,0.3) 3px, rgba(239,68,68,0.3) 6px); }

.timeline-chart {
  position: relative;
  padding: 0 0 0 180px;
}

.timeline-axis {
  display: flex;
  justify-content: space-between;
  padding-left: 180px;
  margin-bottom: 16px;
  position: relative;
}

.timeline-axis::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 180px;
  right: 0;
  height: 1px;
  background: var(--border);
}

.timeline-axis-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  min-height: 44px;
}

.timeline-row-label {
  position: absolute;
  left: -180px;
  width: 170px;
  text-align: right;
  padding-right: 16px;
}

.timeline-row-label .role-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline-row-label .company-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.timeline-track {
  flex: 1;
  height: 36px;
  position: relative;
  border-radius: 6px;
}

.timeline-bar {
  position: absolute;
  height: 100%;
  border-radius: 6px;
  transition: opacity 0.3s;
  cursor: pointer;
  min-width: 4px;
}

.timeline-bar:hover {
  opacity: 0.85;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.timeline-bar.claimed {
  background: var(--accent-blue);
  opacity: 0.7;
}

.timeline-bar.verified {
  background: var(--success);
  opacity: 0.85;
}

.timeline-bar.undisclosed {
  background: var(--danger);
  opacity: 0.85;
}

.timeline-bar.overlap-zone {
  background: repeating-linear-gradient(
    45deg,
    rgba(239, 68, 68, 0.5),
    rgba(239, 68, 68, 0.5) 4px,
    rgba(239, 68, 68, 0.2) 4px,
    rgba(239, 68, 68, 0.2) 8px
  );
  border: 2px solid var(--danger);
  z-index: 5;
  animation: pulse 2s infinite;
}

.timeline-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.timeline-bar:hover .timeline-bar-tooltip {
  opacity: 1;
}

.overlap-indicator {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.overlap-indicator-icon {
  font-size: 1.5rem;
}

.overlap-indicator-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 2px;
}

.overlap-indicator-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* --- Findings Panel --- */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: var(--transition);
}

.finding-card:hover {
  border-color: var(--border-light);
}

.finding-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.finding-card.severity-info::before { background: var(--accent-blue); }
.finding-card.severity-low::before { background: var(--success); }
.finding-card.severity-moderate::before { background: var(--warning); }
.finding-card.severity-high::before { background: var(--danger); }

.finding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.finding-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.finding-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.finding-evidence {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--info-bg);
  color: var(--accent-blue);
}

/* --- Source Provenance --- */
.provenance-table {
  width: 100%;
  border-collapse: collapse;
}

.provenance-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.15);
}

.provenance-table td {
  padding: 12px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(42, 54, 84, 0.5);
}

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

.source-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-status-icon {
  font-size: 0.9rem;
}

/* --- Reviewer Notes --- */
.notes-area {
  margin-top: 24px;
}

.note-entry {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.note-entry:last-child { border-bottom: none; }

.note-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.note-content {
  flex: 1;
}

.note-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.note-author {
  font-size: 0.85rem;
  font-weight: 600;
}

.note-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.note-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.add-note-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.add-note-form .form-input {
  flex: 1;
}

/* ============================================
   REPORT VIEW
   ============================================ */
.report-view {
  max-width: 900px;
  margin: 0 auto;
}

.report-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.report-document {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

.report-letterhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.report-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.report-brand-text {
  font-size: 1.2rem;
  font-weight: 700;
}

.report-brand-text span {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.report-meta {
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.report-meta div { margin-bottom: 3px; }

.report-title {
  text-align: center;
  margin-bottom: 36px;
}

.report-title h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.report-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.report-score-section {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
  padding: 28px;
  background: var(--bg-surface);
  border-radius: var(--radius);
}

.report-score-main {
  text-align: center;
}

.report-score-big {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.report-score-big.high { color: var(--success); }
.report-score-big.moderate { color: var(--warning); }
.report-score-big.low { color: var(--danger); }

.report-score-sublabel {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.report-section {
  margin-bottom: 32px;
}

.report-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.report-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border);
}

.report-table td {
  padding: 12px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(42, 54, 84, 0.4);
}

.report-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay.open {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .content-header {
    padding: 16px 20px;
  }
  
  .content-body {
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .case-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .timeline-chart {
    padding-left: 0;
  }
  
  .timeline-axis {
    padding-left: 0;
  }
  
  .timeline-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .timeline-row-label {
    position: static;
    width: auto;
    text-align: left;
    padding-right: 0;
    margin-bottom: 6px;
  }
  
  .report-document {
    padding: 24px;
  }
  
  .report-letterhead {
    flex-direction: column;
    gap: 16px;
  }
  
  .report-meta {
    text-align: left;
  }
  
  .header-search input {
    width: 160px;
  }
  
  .header-search input:focus {
    width: 200px;
  }
}

/* --- Print Styles --- */
@media print {
  body { background: white; color: #1a1a1a; }
  .sidebar, .content-header, .case-tabs, .report-controls, .add-note-form, .btn { display: none !important; }
  .main-content { margin-left: 0; }
  .report-document { border: none; box-shadow: none; padding: 0; background: white; color: #1a1a1a; }
  .report-document * { color: #1a1a1a !important; }
  .report-table th { background: #f3f4f6 !important; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* --- Back button --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
  border: none;
  background: none;
  font-family: var(--font);
}

.back-link:hover {
  color: var(--accent-blue);
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

/* --- Loading skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card-hover) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}
