:root {
  --brand: #84DAE0;
  --brand-mid: #3ab5c0;
  --brand-dark: #1e8a96;
  --sidebar-bg: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-active-bg: rgba(132,218,224,0.16);
  --sidebar-active-text: #84DAE0;
  --sidebar-hover-bg: rgba(255,255,255,0.05);
  --content-bg: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --sidebar-width: 240px;
  --color-income: #10b981;
  --color-expense: #ef4444;
  --color-profit: #3b82f6;
  --color-pending: #f59e0b;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Nunito Sans', sans-serif; background: var(--content-bg); color: var(--text-primary); }

/* ── LOGIN ─────────────────────────────────────────────── */
#loginScreen {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

/* Left panel */
.login-left {
  width: 380px;
  min-width: 320px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 32px rgba(0,0,0,0.15);
  z-index: 1;
  position: relative;
}
.login-form-wrap {
  flex: 1;
  padding: 64px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0d1422;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.login-subtitle {
  color: #64748b;
  font-size: 0.875rem;
  margin: 0 0 36px;
}
.login-field { margin-bottom: 20px; }
.login-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #64748b;
  margin-bottom: 7px;
}
.login-input-wrap { position: relative; }
.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}
.login-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.925rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  font-family: inherit;
}
.login-input:focus {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(132,218,224,0.2);
}
.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--brand);
  color: #1e293b;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-stretch: condensed;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  font-family: 'Nunito Sans', sans-serif;
}
.login-btn:hover { background: var(--brand-mid); color: #fff; box-shadow: 0 4px 16px rgba(132,218,224,0.4); }
.login-btn:active { transform: scale(0.99); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error-box {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 20px;
}
.login-left-footer {
  padding: 16px 40px;
  font-size: 0.73rem;
  color: #cbd5e1;
  text-align: center;
}
.login-hint {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.login-hint-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.login-hint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 6px;
  border: none;
  background: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-primary);
  text-align: left;
  font-family: inherit;
}
.login-hint-row:hover { background: #e2e8f0; }
.login-hint-role {
  font-size: 0.65rem;
  font-weight: 700;
  background: #1e40af;
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.login-hint-role.staff { background: #64748b; }

/* Right panel */
.login-right {
  flex: 1;
  background: #0d1422;
  background-image:
    radial-gradient(ellipse at 70% 25%, rgba(132,218,224,0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(132,218,224,0.1) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}
.login-right-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 540px;
  width: 100%;
}
.login-brand-logo {
  height: 88px;
  object-fit: contain;
  margin-bottom: 28px;
  filter: drop-shadow(0 4px 16px rgba(20,184,166,0.25));
}
.login-brand-title {
  font-size: 3rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}
.login-brand-title span { color: var(--brand); }
.login-brand-sub {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 48px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
.login-feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 22px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  cursor: default;
}
.login-feature-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(132,218,224,0.4);
  transform: translateY(-2px);
}
.login-feature-card i {
  font-size: 1.65rem;
  color: var(--brand);
  margin-bottom: 6px;
}
.lfc-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #e2e8f0;
}
.lfc-sub {
  font-size: 0.7rem;
  color: #475569;
  letter-spacing: 0.03em;
}
.login-right-footer {
  position: absolute;
  bottom: 20px;
  font-size: 0.73rem;
  color: #1e293b;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
#mainApp {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}
.sidebar-brand i { font-size: 1.25rem; color: var(--sidebar-active-text); }
.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--sidebar-hover-bg); color: #e2e8f0; }
.nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); font-weight: 600; }
.nav-item i { font-size: 1rem; width: 18px; }
.nav-badge {
  margin-left: auto;
  background: var(--color-pending);
  color: white;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 1px 7px;
  font-weight: 700;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user { flex: 1; min-width: 0; }
.sidebar-user-name { color: #e2e8f0; font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: var(--sidebar-text); font-size: 0.75rem; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
#mainContent {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h4 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── SUMMARY CARDS ─────────────────────────────────────────── */
.summary-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border-left: 4px solid transparent;
}
.summary-card.income { border-left-color: var(--color-income); }
.summary-card.expense { border-left-color: var(--color-expense); }
.summary-card.profit { border-left-color: var(--color-profit); }
.summary-card.pending { border-left-color: var(--color-pending); }
.card-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 6px; }
.card-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); }
.card-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.card-value.income { color: var(--color-income); }
.card-value.expense { color: var(--color-expense); }
.card-value.profit-pos { color: var(--color-income); }
.card-value.profit-neg { color: var(--color-expense); }

/* ── CARDS / TABLES ─────────────────────────────────────────── */
.content-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border: 1px solid var(--border);
  overflow: hidden;
}
.content-card .card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
}
.table { margin: 0; font-size: 0.875rem; }
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); background: #f8fafc; }
.table td { vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }
.table-clickable tbody tr { cursor: pointer; }

/* ── STATUS BADGES ─────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-draft { background: #f1f5f9; color: #64748b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-completed { background: #dbeafe; color: #1e40af; }

/* ── GST REGISTERED BADGE ────────────────────────────────────────────────── */
.gst-reg-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── MONTH GROUP ROW ─────────────────────────────────────────────────────── */
.month-group-row td {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 16px !important;
  border-top: 2px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .btn { font-size: 0.8rem; padding: 4px 14px; border-radius: 999px; }

/* ── UPLOAD ZONE ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f8fafc;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--color-profit);
  background: #eff6ff;
}
.upload-zone i { font-size: 2rem; color: var(--text-muted); }
.upload-zone p { margin: 8px 0 0; color: var(--text-muted); font-size: 0.875rem; }
.upload-zone .hint { font-size: 0.78rem; color: #94a3b8; }

/* ── RECEIPT CARD ─────────────────────────────────────────────── */
.receipt-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.receipt-card-header {
  background: #f8fafc;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.receipt-card-body { padding: 14px; }
.receipt-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.receipt-amount-item { text-align: center; }
.receipt-amount-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.receipt-amount-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

/* ── OCR LOADING ─────────────────────────────────────────────── */
.ocr-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}
.ocr-loading .spinner-border { width: 1.5rem; height: 1.5rem; border-width: 0.2em; color: var(--color-profit); }

/* ── CLAIM DETAIL ─────────────────────────────────────────────── */
.claim-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.claim-timeline li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
}
.claim-timeline li::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  position: absolute;
  left: -5px;
  top: 14px;
}
.claim-timeline li.active { color: var(--text-primary); }
.claim-timeline li.active::before { background: var(--color-profit); }

/* ── REPORT SECTION ─────────────────────────────────────────────── */
.report-tabs { margin-bottom: 20px; }
.pl-row-income { color: var(--color-income); font-weight: 600; }
.pl-row-expense { color: var(--color-expense); font-weight: 600; }
.pl-total-row { background: #f8fafc; font-weight: 700; }

/* ── TOAST ─────────────────────────────────────────────────────── */
.toast-container { z-index: 9999; }

/* ── RECEIPT SPLIT LAYOUT ───────────────────────────────────────────── */
.receipt-split { display: flex; min-height: 480px; }
.receipt-form-pane {
  flex: 0 0 340px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.receipt-preview-pane {
  flex: 1;
  padding: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  border-radius: 0 0 8px 0;
}
.receipt-preview-img {
  max-width: 100%;
  max-height: 765px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.receipt-preview-frame {
  width: 100%;
  height: 765px;
  border: none;
  border-radius: 6px;
}
.receipt-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
  height: 100%;
  width: 100%;
}
.receipt-preview-empty i { font-size: 2.5rem; opacity: 0.3; }

/* ── AMOUNT VALIDATION ──────────────────────────────────────────────── */
.receipt-validation-msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.78rem;
  margin-top: 8px;
  border: 1px solid #fca5a5;
}
.receipt-validation-msg i { flex-shrink: 0; margin-top: 1px; }
.field-autocalc { background: #eff6ff !important; border-color: #93c5fd !important; }
.field-autocalc:focus { background: white !important; }
.field-invalid { border-color: #ef4444 !important; background: #fff5f5 !important; }

/* ── GST TOGGLE ─────────────────────────────────────────────────────── */
.gst-toggle-row { display: flex; align-items: center; gap: 10px; }
.gst-toggle-row .btn { font-size: 0.78rem; padding: 3px 14px; }

/* ── PREVIEW SCROLL AREA ────────────────────────────────────────────── */
.preview-scroll-area {
  overflow-y: auto;
  max-height: 900px;
  width: 100%;
}
.preview-doc-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}
.preview-doc-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── PDF CANVAS CONTAINER ───────────────────────────────────────────────── */
.pdf-canvas-container {
  overflow-y: auto;
  max-height: 720px;
  background: #525659;
  padding: 8px;
}
.pdf-canvas-container canvas {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-radius: 2px;
}

/* ── SUPPORTING DOCS HORIZONTAL SCROLL ─────────────────────────────────── */
.supporting-docs-list {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 8px;
  padding: 6px 0 4px;
}
.supporting-docs-list::-webkit-scrollbar { height: 5px; }
.supporting-docs-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── MINI UPLOAD ZONE ───────────────────────────────────────────────── */
.mini-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.mini-upload-zone:hover, .mini-upload-zone.dragover {
  border-color: var(--color-profit);
  background: #eff6ff;
}
.mini-upload-zone i { font-size: 1.1rem; display: block; margin-bottom: 3px; }

/* ── MANUAL PREVIEW PLACEHOLDER ─────────────────────────────────────── */
.manual-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  height: 100%;
  width: 100%;
}
.manual-preview-placeholder i { font-size: 2rem; opacity: 0.3; }
.manual-preview-placeholder p { margin: 0; font-size: 0.825rem; }

/* ── UTILITIES ─────────────────────────────────────────────────── */
.text-income { color: var(--color-income) !important; }
.text-expense { color: var(--color-expense) !important; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.modal-header { background: #f8fafc; border-bottom: 1px solid var(--border); }

/* ── PROPOSED CHANGES MODULE ─────────────────────────────────── */
.sidebar-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #475569;
  padding: 14px 16px 3px;
}
.proposed-phase-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.phase-a { background: #dbeafe; color: #1d4ed8; }
.phase-b { background: #dcfce7; color: #15803d; }
.phase-c { background: #fef3c7; color: #b45309; }
.phase-d { background: #f3e8ff; color: #7c3aed; }
.feature-card-proposed {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
  height: 100%;
}
.feature-card-proposed:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,0.15);
  transform: translateY(-2px);
  border-color: #a5b4fc;
}
.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
  border: 1.5px solid #c4b5fd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.mockup-table th {
  background: #f8fafc;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 700;
}
.shift-cell {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.shift-eve {
  background: #dcfce7;
  color: #166534;
}
.shift-off {
  color: #cbd5e1;
  font-size: 0.8rem;
}
.shift-stby {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.tv-screen {
  background: #0f172a;
  border-radius: 10px;
  padding: 18px;
  color: #e2e8f0;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  border: 3px solid #334155;
  position: relative;
}
.tv-screen-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #60a5fa;
  margin-bottom: 8px;
  font-weight: 700;
}
.ai-output-box {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 14px 16px;
}
.trigger-card {
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  background: var(--card-bg);
  margin-bottom: 8px;
}
.trigger-red   { border-color: #ef4444; background: #fff5f5; }
.trigger-amber { border-color: #f59e0b; background: #fffbeb; }
.trigger-green { border-color: #10b981; background: #f0fdf4; }
.raci-table th, .raci-table td {
  font-size: 0.72rem;
  padding: 5px 8px;
  text-align: center;
  vertical-align: middle;
}
.raci-table th:first-child, .raci-table td:first-child {
  text-align: left;
  font-weight: 600;
}
.raci-r { background: #fee2e2; color: #991b1b; font-weight: 700; border-radius: 3px; padding: 1px 6px; }
.raci-a { background: #fef3c7; color: #92400e; font-weight: 700; border-radius: 3px; padding: 1px 6px; }
.raci-c { background: #dbeafe; color: #1e40af; font-weight: 700; border-radius: 3px; padding: 1px 6px; }
.raci-i { background: #f1f5f9; color: #64748b; font-weight: 700; border-radius: 3px; padding: 1px 6px; }

/* ══════════════════════════════════════════════════════════════
   NUNITO SANS TYPOGRAPHY SYSTEM
   Body  : Nunito Sans (inherited via body rule above)
   Heads : Nunito Sans Condensed · ALL CAPS · Bold
══════════════════════════════════════════════════════════════ */

/* Semantic headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Page-level and card headers */
.page-header h4,
.content-card .card-head,
.card-head {
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Slide inline heading divs identified by high font-weight in inline style */
[style*="font-weight:900"],
[style*="font-weight:800"] {
  font-stretch: condensed;
}

/* Sidebar section labels */
.sidebar-section-label {
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 800;
  text-transform: uppercase;
}

/* Nav items */
.nav-item {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 500;
}

/* ── BOOTSTRAP PRIMARY BRAND OVERRIDE ── */
.btn-primary {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #1e293b !important;
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-mid) !important;
  border-color: var(--brand-mid) !important;
  color: #ffffff !important;
}
.btn-outline-primary {
  color: var(--brand-dark) !important;
  border-color: var(--brand) !important;
}
.btn-outline-primary:hover {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #1e293b !important;
}
.text-primary { color: var(--brand-dark) !important; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand-mid); }

/* Table headers: condensed uppercase */
.table th {
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Login heading */
.login-title {
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-brand-title {
  font-family: 'Nunito Sans', sans-serif;
  font-stretch: condensed;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* ── PDF EXPORT BUTTON ─────────────────────────────────── */
.nav-pdf-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  background: rgba(132,218,224,0.08);
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #84DAE0;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.nav-pdf-btn:hover { background: rgba(132,218,224,0.18); color: #fff; }
.nav-pdf-btn i { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════
   PRINT / PDF EXPORT
══════════════════════════════════════════════════════════ */

/* Suppress browser URL / date / page-number headers & footers */
@page {
  size: A4 portrait;
  margin: 0;
}

/* Print logo header — invisible on screen */
#print-header { display: none; }

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* ── Logo header: fixed so it repeats at top of every page ── */
  #print-header {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 14mm;
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    padding: 0 16mm;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    box-sizing: border-box;
  }

  /* ── Hide non-slide chrome ── */
  #loginScreen,
  #sidebar,
  #tab_dashboard,
  #tab_claims,
  #tab_accounting,
  #tab_reports,
  #tab_settings,
  #tab_proposed { display: none !important; }

  /* Header clearance lives on #mainApp so it is NOT affected by zoom */
  #mainApp {
    display: block !important;
    padding-top: 16mm !important;
  }

  /* Scale entire slide content to 68% so each slide fits one A4 page */
  #mainContent {
    margin-left: 0 !important;
    padding: 4mm 20mm 6mm !important;
    zoom: 0.68;
  }

  /* Tighten page-header gap inside zoom */
  .page-header {
    display: flex !important;
    margin-bottom: 10px !important;
  }
  .page-header h4 { display: flex !important; }

  /* ── One slide per page ── */
  body.printing-slides #tab_intro,
  body.printing-slides #tab_orgchart,
  body.printing-slides #tab_observations,
  body.printing-slides #tab_hiddencosts,
  body.printing-slides #tab_systems,
  body.printing-slides #tab_targetstate,
  body.printing-slides #tab_conclusion {
    display: block !important;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
  }

  /* ── Org charts: 85% wide, no min-width clamp, containers not clipped ── */
  #orgchart_body > div { overflow: visible !important; }
  #orgchart_body svg {
    min-width: 0 !important;
    width: 85% !important;
    max-width: 85% !important;
    height: auto !important;
  }
  /* Hide the "Real Pain" button container (saves vertical space) */
  #orgchart_body > div:last-child { display: none !important; }

  /* Keep use-case sections collapsed (saves space in Systems slide) */

  /* Hide interactive controls */
  button, .btn { display: none !important; }
}
