/* styles.css — Paralegal AI — Sher Law Group */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  /* Sher Law Group brand colors */
  --slg-orange: #ff7d21;
  --slg-orange-dark: #e06a10;
  --slg-teal: #007a85;
  --slg-teal-dark: #005f69;

  /* App chrome — deep navy keeps it professional */
  --bg-primary: #0d1b2a;
  --bg-secondary: #142233;
  --bg-card: #1c2e42;
  --bg-input: #243548;
  --text-primary: #f0f4f8;
  --text-secondary: #8fa8c0;
  --text-muted: #5a7490;
  --accent: var(--slg-orange);
  --accent-hover: var(--slg-orange-dark);
  --accent2: var(--slg-teal);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #243548;
  --sidebar-width: 240px;
  --header-height: 60px;
  --radius: 8px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4, .logo span, .modal-tab, .btn {
  font-family: "Poppins", sans-serif;
}

/* ─── Layout ───────────────────────────────────────────────── */

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  height: var(--header-height);
  background: linear-gradient(135deg, #0d1b2a 0%, #142233 100%);
  border-bottom: 2px solid var(--slg-orange);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.app-header .logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--slg-orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(255, 125, 33, 0.4);
}

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

#user-display {
  color: var(--text-secondary);
  font-size: 14px;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ─── Sidebar ──────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.sidebar-nav li a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-nav li a.active {
  background: var(--slg-orange);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 125, 33, 0.3);
}

.sidebar-nav li a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-section-label {
  padding: 16px 20px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─── Main Content ─────────────────────────────────────────── */

.main-content {
  flex: 1;
  overflow: auto;
  padding: 24px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

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

.panel-header h1 {
  font-size: 24px;
  font-weight: 700;
}

/* ─── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

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

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--slg-teal);
  color: var(--slg-teal);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-icon:hover {
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 13px;
}

/* ─── Kanban Board ─────────────────────────────────────────── */

#kanban-board {
  display: flex;
  flex-direction: column;
}

/* Board tab bar: Pre-Lit / Litigation */
.board-tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.board-tab-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px 6px 0 0;
}
.board-tab-btn:hover { color: var(--text-primary); background: var(--bg-input); }
.board-tab-btn.active {
  color: var(--slg-orange);
  border-bottom-color: var(--slg-orange);
  background: transparent;
}
.board-tab-count {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
}
.board-tab-btn.active .board-tab-count {
  background: rgba(255,125,33,0.15);
  color: var(--slg-orange);
}

/* Two-row kanban layout */
.kanban-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.kanban-row-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-row-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 2px;
}

/* Scrollable columns row */
.kanban-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-width: 200px;
  max-width: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  background: var(--bg-secondary);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-column-title {
  font-weight: 600;
  font-size: 14px;
}

.kanban-column-count {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.kanban-cards {
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
  border-top: none;
}

.kanban-cards.drag-over {
  background: rgba(99, 102, 241, 0.1);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

.kanban-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.kanban-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.kanban-card.dragging {
  opacity: 0.5;
}

.kanban-card-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.kanban-card-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.kanban-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

.kanban-card-sol {
  font-size: 11px;
  color: var(--slg-teal);
  margin-top: 4px;
}

.kanban-card-value {
  margin-top: 6px;
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
}

/* ─── Agent Panel ──────────────────────────────────────────── */

.agent-form {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.agent-output {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 200px;
}

.agent-output-placeholder {
  color: var(--text-muted);
  text-align: center;
  padding: 60px 20px;
  font-size: 15px;
}

.agent-result {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  background: none;
  border: none;
  margin: 0;
}

.agent-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  padding: 40px 20px;
  justify-content: center;
}

.agent-error {
  color: var(--danger);
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius);
}

.agent-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ─── Settings Panel ───────────────────────────────────────── */

.settings-section {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.settings-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--border);
}

.settings-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.settings-value {
  font-size: 14px;
  color: var(--text-primary);
}

/* ─── Forms ────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}

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

.form-group textarea {
  resize: vertical;
}

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

.full-width {
  grid-column: 1 / -1;
}

/* ─── Modal ────────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
  font-size: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ─── Auth Gate ────────────────────────────────────────────── */

.auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  text-align: center;
  gap: 20px;
  padding: 40px;
}

.auth-gate h2 {
  font-size: 28px;
}

.auth-gate p {
  color: var(--text-secondary);
  max-width: 480px;
  font-size: 16px;
}

/* ─── Toast Notifications ──────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  animation: slideIn 0.25s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 360px;
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ─── Spinner ──────────────────────────────────────────────── */

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Demand Panel ─────────────────────────────────────────── */

.demand-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 0 8px;
}

.demand-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.demand-radio-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: border-color 0.15s;
}

.demand-radio-chip:has(input:checked) {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
}

.demand-radio-chip input[type="radio"] {
  accent-color: var(--accent);
}

.demand-file-input {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--bg-input);
}

.demand-file-input input[type="file"] {
  font-size: 13px;
  color: var(--text-secondary);
}

.demand-charges-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  margin-top: 6px;
}

.demand-charges-table thead tr {
  background: var(--bg-secondary);
}

.demand-charges-table th,
.demand-charges-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.demand-charges-table th {
  font-weight: 600;
  text-align: left;
  color: var(--text-muted);
}

.demand-charges-table td input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text-primary);
  font-size: 13px;
}

.demand-total {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
}

.demand-progress {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}

.demand-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.demand-progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ─── Deadline Calendar ────────────────────────────────────── */

.deadline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  margin-bottom: 8px;
}

.deadline-safe { border-left-color: #22c55e; }
.deadline-warning { border-left-color: #f59e0b; }
.deadline-urgent { border-left-color: #ef4444; }
.deadline-past { border-left-color: #6b7280; opacity: 0.6; }

.deadline-date {
  min-width: 110px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 2px;
}

.deadline-body { flex: 1; }

.deadline-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.deadline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.deadline-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.deadline-days { margin-left: auto; }

/* ─── SOL Calendar Groups ──────────────────────────────────── */
.sol-group {
  margin-bottom: 6px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.sol-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.sol-group-header:hover { background: var(--bg-input); }
.sol-group-chevron {
  font-size: 13px;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}
.sol-group-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
}
.sol-group-count {
  background: var(--slg-teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.sol-group-body { background: var(--bg-secondary); }
.sol-group-body .deadline-item { border-bottom: 1px solid var(--border); }
.sol-group-body .deadline-item:last-child { border-bottom: none; }

/* ─── LOR Tab ──────────────────────────────────────────────── */
.lor-list { display: flex; flex-direction: column; gap: 8px; }

.lor-row {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.lor-row-sent { opacity: 0.7; }

.lor-row-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lor-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  min-width: 220px;
}
.lor-check-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--slg-orange);
  flex-shrink: 0;
}

/* Email / fax options — always visible inline */
.lor-method-inline {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}
.lor-method-opt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
}
.lor-method-opt input { accent-color: var(--slg-teal); }
.lor-contact-val {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lor-sent-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.lor-warn-inline {
  font-size: 11px;
  color: #f97316;
  font-weight: 500;
}
.lor-warn {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.deadline-notes {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ─── Data Tables ──────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

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

.data-table tfoot td {
  padding: 10px;
  background: var(--bg-card);
}

/* ─── Research Output ──────────────────────────────────────── */

.research-output-text {
  line-height: 1.7;
  font-size: 14px;
  color: var(--text-secondary);
}

.research-output-text h3 {
  color: var(--accent);
  margin: 16px 0 8px;
  font-size: 16px;
}

.research-output-text li {
  margin-left: 16px;
  margin-bottom: 4px;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar-nav li a span:not(.nav-icon) {
    display: none;
  }

  .sidebar-section-label {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  #kanban-board {
    flex-direction: column;
  }

  .kanban-column {
    min-width: 100%;
    max-width: 100%;
  }
}

/* ─── Modal Tabs ──────────────────────────────────────────── */

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.modal-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.modal-tab:hover {
  color: var(--text-primary);
}

.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ─── Data Tables ─────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.data-table tfoot td {
  padding: 10px;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

/* ─── Settlement Sheet ────────────────────────────────────── */

.settlement-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.settlement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.settlement-card .amount {
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0;
}

.settlement-card .label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Litigation Timeline ─────────────────────────────────── */

.lit-timeline {
  position: relative;
  padding-left: 24px;
}

.lit-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.lit-event {
  position: relative;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.lit-event::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.lit-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.lit-event-title {
  font-weight: 600;
  font-size: 14px;
}

.lit-event-date {
  font-size: 12px;
  color: var(--text-muted);
}

.lit-event-details {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Contact Alert Cards ─────────────────────────────────── */

.contact-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.contact-alert:hover {
  border-color: var(--accent);
}

.contact-alert.overdue {
  border-left: 3px solid var(--danger);
}

.contact-alert.warning {
  border-left: 3px solid var(--warning);
}

.contact-alert.ok {
  border-left: 3px solid var(--success);
}

/* ─── Research Output ─────────────────────────────────────── */

.research-output-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ─── SOL Alert Banner ─────────────────────────────────────── */

#sol-banner {
  width: 100%;
  z-index: 40;
  flex-shrink: 0;
}

.sol-banner-inner {
  display: flex;
  align-items: center;
  gap: 0;
  background: #1a1a2e;
  border-bottom: 1px solid #2d2d4e;
  height: 36px;
  overflow: hidden;
}

.sol-banner-label {
  flex-shrink: 0;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ef4444;
  background: #2d0a0a;
  border-right: 1px solid #4a1010;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.sol-ticker-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.sol-ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: sol-scroll 40s linear infinite;
  will-change: transform;
}

@keyframes sol-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.sol-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-size: 12px;
}

.sol-ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sol-ticker-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1.6;
}

.sol-ticker-sep {
  color: #4a4a6a;
  padding: 0 4px;
  font-size: 14px;
}

.sol-brief-btn {
  flex-shrink: 0;
  margin: 0 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  border: 1px solid #4a4a6a;
  color: #a0a0c0;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.sol-brief-btn:hover {
  background: #2d2d4e;
  color: #fff;
}

.sol-brief-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
