/* ═══════════════════════════════════════════════ VAKA LEGAL — CSS */
:root {
  --navy: #0D2B52;
  --navy-dark: #091C3A;
  --navy-light: #1A5278;
  --teal: #0C6B7A;
  --teal-light: #0E8B9E;
  --gold: #C49A38;
  --gold-light: #D4AF60;
  --bg: #EAF5F9;
  --sidebar-w: 240px;
  --header-h: 60px;
  --radius: 10px;
}

/* Bootstrap primary override */
.btn-primary { background-color: var(--teal) !important; border-color: var(--teal) !important; }
.btn-primary:hover { background-color: var(--teal-light) !important; border-color: var(--teal-light) !important; }
.btn-outline-primary { color: var(--teal) !important; border-color: var(--teal) !important; }
.btn-outline-primary:hover { background-color: var(--teal) !important; color: #fff !important; }
.text-primary { color: var(--teal) !important; }
.badge.bg-primary { background-color: var(--teal) !important; }
a { color: var(--teal); }

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: #222; }

/* ── LOGIN ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy-dark) 0%, var(--teal) 100%);
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .vaka-wordmark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  line-height: 1;
  margin-bottom: .3rem;
}
.login-logo .wordmark-vaka {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: 3px;
}
.login-logo .wordmark-legal {
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--teal);
  letter-spacing: 3px;
  margin-left: .35rem;
}
.login-logo .login-tagline {
  font-size: .72rem;
  letter-spacing: 2px;
  color: #888;
  text-transform: uppercase;
  margin: 0 0 .4rem;
}
.login-logo .login-sub {
  font-size: .75rem;
  letter-spacing: 1.5px;
  color: #aaa;
  text-transform: uppercase;
  border-top: 1px solid #eee;
  padding-top: .4rem;
  margin-top: .2rem;
}

/* ── APP LAYOUT ── */
.app-wrapper { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--navy-dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .25s;
  overflow: hidden;
}
#sidebar.collapsed { width: 60px; }
#sidebar.collapsed .sidebar-brand span,
#sidebar.collapsed .sidebar-nav .nav-link span,
#sidebar.collapsed .sidebar-footer { display: none; }
#sidebar.collapsed .sidebar-nav .nav-link { justify-content: center; padding: .75rem; }
#sidebar.collapsed .sidebar-nav .nav-link i { margin: 0; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem 1rem;
  color: var(--gold);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 3px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-brand i { font-size: 1.5rem; flex-shrink: 0; }

.sidebar-nav { list-style: none; margin: .5rem 0; padding: 0; flex: 1; overflow-y: auto; }
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  border-radius: 0;
  transition: background .15s, color .15s;
  white-space: nowrap;
  font-size: .92rem;
}
.sidebar-nav .nav-link i { font-size: 1.1rem; flex-shrink: 0; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--gold); color: var(--navy-dark); font-weight: 600; }

.sidebar-footer { padding: 1rem; color: rgba(255,255,255,.5); font-size: .8rem; border-top: 1px solid rgba(255,255,255,.07); }

/* ── MAIN WRAPPER ── */
.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── HEADER ── */
.app-header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid #e0e4ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-left, .header-right { display: flex; align-items: center; gap: .75rem; }
.sidebar-toggle { border: none; background: none; font-size: 1.3rem; color: #555; cursor: pointer; padding: .25rem .5rem; }
.sidebar-toggle:hover { color: var(--navy); }

.timer-widget {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff8e8;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: .3rem .75rem;
  font-size: .9rem;
}
#timerDisplay { font-weight: 700; font-family: monospace; font-size: 1rem; color: var(--navy); }

.user-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: #444;
}
.user-chip i { font-size: 1.2rem; color: var(--navy-light); }
.user-chip .badge { font-size: .7rem; }

/* ── CONTENT AREA ── */
.content-area { flex: 1; overflow-y: auto; padding: 1.5rem; }
.content-section { animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.section-header h2 { margin: 0; font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.section-header h2 i { margin-right: .4rem; color: var(--gold); }

/* ── STAT CARDS ── */
.stat-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.stat-blue  { background: linear-gradient(135deg, #0D2B52, #0C6B7A); }
.stat-gold  { background: linear-gradient(135deg, #a07820, #c9a050); }
.stat-green { background: linear-gradient(135deg, #1a6a3c, #28a745); }
.stat-red   { background: linear-gradient(135deg, #8b1a1a, #dc3545); }
.stat-icon { font-size: 2rem; opacity: .85; }
.stat-num  { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .82rem; opacity: .88; margin-top: .15rem; }

/* ── CARDS ── */
.card { border-radius: var(--radius); border: 1px solid #e4e8ee; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.card-header {
  background: #f8f9fb;
  border-bottom: 1px solid #e4e8ee;
  font-weight: 600;
  font-size: .92rem;
  color: var(--navy);
  padding: .65rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ── DASHBOARD LIST ── */
.dash-list { max-height: 280px; overflow-y: auto; }
.dash-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  font-size: .88rem;
  transition: background .12s;
}
.dash-item:last-child { border-bottom: none; }
.dash-item:hover { background: #f8f9fb; }
.dash-item .di-date { color: var(--gold); font-weight: 600; min-width: 80px; }
.dash-item .di-client { font-weight: 600; color: var(--navy); }
.dash-item .di-meta { color: #777; font-size: .82rem; }
.dash-empty { padding: 1.5rem; text-align: center; color: #aaa; font-size: .9rem; }

/* ── TABLES ── */
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: #667; background: #f8f9fb; border-bottom: 2px solid #e4e8ee; }
.table td { font-size: .88rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f4f7fb; }

/* ── BADGES ── */
.badge-active   { background: #e6f4ed; color: #1a6a3c; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-inactive { background: #fff4e6; color: #a06010; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-closed   { background: #f0f0f0; color: #666; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-paid     { background: #e6f4ed; color: #1a6a3c; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-draft    { background: #e8edf5; color: #445; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-sent     { background: #e6f0ff; color: #1a4a9c; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-overdue  { background: #fce8e8; color: #8b1a1a; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-billed   { background: #e6f0ff; color: #1a4a9c; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-unbilled { background: #fff8e6; color: #a06010; padding: .25rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }

/* Court type badges */
.ct-M   { background: #e8f5e9; color: #2e7d32; }
.ct-SCT { background: #e3f2fd; color: #1565c0; }
.ct-MC  { background: #fff3e0; color: #e65100; }
.ct-HC  { background: #fce4ec; color: #880e4f; }
.ct-SC  { background: #f3e5f5; color: #6a1b9a; }
.ct-CA  { background: #e0f2f1; color: #004d40; }
.ct-badge { padding: .2rem .55rem; border-radius: 12px; font-size: .78rem; font-weight: 700; }

/* ── CALENDAR ── */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #dde; border-radius: var(--radius); overflow: hidden; border: 1px solid #dde; }
.cal-day-header { background: var(--navy); color: #fff; text-align: center; padding: .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .5px; }
.cal-day {
  background: #fff;
  min-height: 90px;
  padding: .4rem;
  border-bottom: 1px solid #eee;
  font-size: .82rem;
  cursor: pointer;
  transition: background .12s;
}
.cal-day:hover { background: #f4f7fb; }
.cal-day.other-month { background: #f9f9f9; }
.cal-day.other-month .cal-date { color: #bbb; }
.cal-day.today { background: #fff8e6; }
.cal-day.today .cal-date { background: var(--gold); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.cal-date { font-weight: 600; color: #333; margin-bottom: .2rem; display: inline-block; }
.cal-event {
  background: var(--navy-light);
  color: #fff;
  border-radius: 4px;
  padding: .1rem .35rem;
  margin-bottom: 2px;
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-event:hover { background: var(--navy-dark); }

/* ── FILES GRID ── */
.file-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e4e8ee;
  padding: 1.1rem;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.file-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.12); transform: translateY(-2px); }
.file-card-num { font-size: .8rem; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.file-card-name { font-size: 1rem; font-weight: 700; color: var(--navy); margin: .25rem 0; }
.file-card-meta { font-size: .8rem; color: #777; }
.file-card-timer { margin-top: .75rem; }

/* ── TIMER BUTTON ── */
.btn-timer-start { background: #e6f4ed; color: #1a6a3c; border: 1px solid #1a6a3c; font-size: .8rem; padding: .25rem .6rem; border-radius: 6px; }
.btn-timer-start:hover { background: #1a6a3c; color: #fff; }
.btn-timer-running { background: #fce8e8; color: #8b1a1a; border: 1px solid #8b1a1a; font-size: .8rem; padding: .25rem .6rem; border-radius: 6px; }
.btn-timer-running:hover { background: #8b1a1a; color: #fff; }

/* ── CLIENT TABS ── */
.nav-tabs .nav-link { color: #555; font-size: .9rem; }
.nav-tabs .nav-link.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--gold); }

/* ── CONTACT CARDS ── */
.contact-field { margin-bottom: .4rem; font-size: .88rem; }
.contact-field .label { color: #888; font-size: .78rem; margin-bottom: .05rem; }
.contact-field .value { font-weight: 500; color: #222; }

/* ── INVOICE PRINT ── */
.invoice-print {
  font-family: 'Segoe UI', sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}
.invoice-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
.inv-firm { }
.inv-firm-name { font-size: 1.6rem; font-weight: 800; color: var(--navy); letter-spacing: 2px; }
.inv-firm-sub { color: var(--gold); font-weight: 600; font-size: .9rem; letter-spacing: 1px; }
.inv-firm-addr { color: #555; font-size: .85rem; margin-top: .5rem; }
.inv-right { text-align: right; }
.inv-label { font-size: 2rem; font-weight: 800; color: var(--navy); }
.inv-meta { font-size: .85rem; color: #555; margin-top: .5rem; }
.inv-divider { border-top: 3px solid var(--navy); margin: 1.5rem 0; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.inv-party-label { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: .25rem; }
.inv-party-name { font-weight: 700; color: var(--navy); font-size: 1rem; }
.inv-party-detail { font-size: .85rem; color: #555; }
.inv-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.inv-table th { background: var(--navy); color: #fff; padding: .6rem .75rem; font-size: .82rem; text-align: left; }
.inv-table td { padding: .55rem .75rem; border-bottom: 1px solid #eee; font-size: .88rem; }
.inv-table tr:nth-child(even) td { background: #f8f9fb; }
.inv-total-box { text-align: right; margin-top: 1rem; }
.inv-total-row { display: flex; justify-content: flex-end; gap: 2rem; font-size: .9rem; padding: .25rem 0; }
.inv-total-row.grand { font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--navy); padding-top: .5rem; margin-top: .25rem; }
.inv-footer { margin-top: 3rem; border-top: 1px solid #ddd; padding-top: 1.5rem; font-size: .82rem; color: #666; }
.inv-sign-area { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.inv-sign { border-top: 1px solid #333; padding-top: .4rem; font-size: .82rem; color: #555; }

/* ── COURT DATE CARDS ── */
.court-date-card {
  background: #fff;
  border: 1px solid #e4e8ee;
  border-left: 4px solid var(--navy-light);
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-bottom: .75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.court-date-card.past { opacity: .6; border-left-color: #ccc; }
.court-date-card .cdc-date { font-weight: 700; color: var(--navy); font-size: .95rem; }
.court-date-card .cdc-time { font-size: .82rem; color: var(--gold); }
.court-date-card .cdc-title { font-weight: 600; }
.court-date-card .cdc-meta { font-size: .82rem; color: #777; }

/* ── NOTE CARDS ── */
.note-card {
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-bottom: .75rem;
}
.note-card-title { font-weight: 700; color: var(--navy); margin-bottom: .35rem; }
.note-card-content { font-size: .88rem; color: #444; white-space: pre-wrap; }
.note-card-meta { font-size: .78rem; color: #aaa; margin-top: .5rem; }

/* ── FORM STYLES ── */
.form-label { font-size: .85rem; font-weight: 600; color: #444; margin-bottom: .3rem; }
.form-control, .form-select {
  border-radius: 8px;
  border-color: #d0d5dd;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(44,95,138,.15);
}

/* ── BREADCRUMB ── */
.breadcrumb-item { font-size: .85rem; color: #888; }
.breadcrumb-item.active { color: var(--navy); font-weight: 600; }

/* ── UTILITY ── */
.text-navy { color: var(--navy) !important; }
.text-gold  { color: var(--gold)  !important; }
.fw-800 { font-weight: 800; }
.cursor-pointer { cursor: pointer; }

/* ── PRINT ── */
@media print {
  body * { visibility: hidden; }
  #invoicePrintArea, #invoicePrintArea * { visibility: visible; }
  #invoicePrintArea { position: fixed; top: 0; left: 0; width: 100%; background: #fff; }
  .modal-header { display: none !important; }
}

/* ── PROCEDURE TIMELINE ── */
.proc-timeline { position: relative; padding-left: 2.5rem; }
.proc-timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(to bottom, var(--navy-light), #dde);
  border-radius: 2px;
}

.proc-step-card {
  position: relative;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: box-shadow .15s;
  overflow: hidden;
}
.proc-step-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.proc-step-card::before {
  content: attr(data-num);
  position: absolute;
  left: -2.1rem;
  top: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #dde;
  z-index: 1;
}
.proc-step-card.ps-completed::before { background: #28a745; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #a8dfba; }
.proc-step-card.ps-in-progress::before { background: var(--gold); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e8d89a; }
.proc-step-card.ps-skipped::before { background: #aaa; }
.proc-step-card.ps-not-applicable::before { background: #ccc; }

.proc-step-card.ps-completed { border-left: 4px solid #28a745; }
.proc-step-card.ps-in-progress { border-left: 4px solid var(--gold); }
.proc-step-card.ps-pending { border-left: 4px solid #dde; }
.proc-step-card.ps-skipped { border-left: 4px solid #aaa; opacity: .7; }
.proc-step-card.ps-not-applicable { border-left: 4px solid #ccc; opacity: .55; }

.proc-step-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  cursor: pointer;
  user-select: none;
  background: #fafbfd;
  border-bottom: 1px solid transparent;
  transition: background .12s;
}
.proc-step-header:hover { background: #f0f4fa; }
.proc-step-header.open { border-bottom-color: #e4e8ee; background: #f0f4fa; }

.proc-step-name { font-weight: 700; color: var(--navy); flex: 1; font-size: .95rem; }
.proc-step-dates-preview { font-size: .78rem; color: #888; display: flex; gap: 1rem; }
.proc-step-dates-preview .has-date { color: var(--gold); font-weight: 600; }
.proc-step-dates-preview .overdue { color: #dc3545; font-weight: 700; }
.proc-chevron { font-size: .85rem; color: #aaa; transition: transform .2s; }
.proc-chevron.open { transform: rotate(180deg); }

.proc-step-body {
  padding: 1rem;
  display: none;
}
.proc-step-body.open { display: block; }

.proc-desc {
  font-size: .85rem;
  color: #555;
  background: #f8f9fb;
  border-radius: 8px;
  padding: .65rem .85rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--navy-light);
  line-height: 1.5;
}

.proc-dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .75rem;
  align-items: end;
  margin-bottom: .75rem;
}
@media (max-width: 640px) {
  .proc-dates-row { grid-template-columns: 1fr; }
}

.proc-cal-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  color: var(--navy-light);
  background: #e6f0ff;
  border-radius: 12px;
  padding: .2rem .6rem;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.proc-cal-badge:hover { background: var(--navy-light); color: #fff; }
.proc-cal-badge.linked { background: #e6f4ed; color: #1a6a3c; }
.proc-cal-badge.linked:hover { background: #1a6a3c; color: #fff; }

.proc-status-select {
  font-size: .8rem;
  padding: .2rem .5rem;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #fff;
  min-width: 130px;
}
.proc-status-select.ps-completed { background: #e6f4ed; color: #1a6a3c; border-color: #a8dfba; }
.proc-status-select.ps-in-progress { background: #fff8e6; color: #a06010; border-color: #e8d89a; }
.proc-status-select.ps-skipped { background: #f0f0f0; color: #666; }
.proc-status-select.ps-not-applicable { background: #f5f5f5; color: #999; }

.proc-save-btn {
  font-size: .82rem;
  padding: .3rem .85rem;
}

.proc-empty {
  text-align: center;
  color: #aaa;
  padding: 3rem 1rem;
  font-size: .95rem;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  #sidebar { position: fixed; left: -100%; top: 0; bottom: 0; z-index: 1000; transition: left .25s; }
  #sidebar.mobile-open { left: 0; }
  .content-area { padding: 1rem; }
}

/* ═══════════════════════════════════════ MASTER CONSOLE */
.master-page {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.master-sidebar {
  width: 240px;
  background: var(--navy-dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 0;
}
.master-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.master-badge {
  font-size: .65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-top: 2px;
}
.master-nav {
  flex: 1;
  padding: .5rem 0;
}
.master-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .92rem;
  transition: background .15s, color .15s;
}
.master-nav-link i { font-size: 1.1rem; }
.master-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.master-nav-link.active { background: var(--gold); color: var(--navy-dark); font-weight: 600; }
.master-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,.07); color: rgba(255,255,255,.55); font-size: .8rem; }
.master-main { flex: 1; overflow-y: auto; padding: 2rem; background: var(--bg); }
.master-section { animation: fadeIn .2s; }
.master-firms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.master-firm-card {
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  transition: border-color .15s, box-shadow .15s;
}
.master-firm-card:hover { border-color: var(--teal); box-shadow: 0 4px 16px rgba(12,107,122,.12); }
.master-firm-card h5 { margin: 0; font-weight: 700; color: var(--navy); }
.master-firm-card .firm-meta { font-size: .8rem; color: #888; font-family: monospace; }
.master-firm-card .firm-actions { display: flex; gap: .5rem; }

/* ═══════════════════════════════════════ IMPERSONATION BANNER */
.impersonation-banner {
  background: linear-gradient(90deg, var(--navy-dark), var(--teal));
  color: #fff;
  padding: .6rem 1.25rem;
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.impersonation-banner strong { font-weight: 700; }
