/* ============================================================
   TVLG Board Certification Tracker — Dark Atlas Theme
   ============================================================ */

:root {
  /* ---- Canvas + surfaces (light) ---- */
  --bg-base:     #f4f6fb;   /* app canvas */
  --bg-surface:  #f7f9fd;   /* subtle raised tint (table headers etc.) */
  --bg-card:     #ffffff;   /* cards */
  --bg-hover:    #eef1f9;   /* row / nav hover */
  --border:      #e5e8f1;
  --border-light:#d6dbe9;
  /* ---- Ink ---- */
  --text-primary:#1b2039;
  --text-muted:  #5a6280;
  --text-dim:    #969db6;
  /* ---- Brand (TVLG orange) ---- */
  --brand-orange:#ff7e00;   /* firm primary orange (thevalleylawgroup.com) */
  --accent:      #ef6d00;   /* interactive fill (deepened for white-text contrast) */
  --accent-hover:#d96200;
  --accent-active:#c25800;
  --accent-soft: #fff3e8;   /* soft orange tint background (active nav, highlights) */
  --accent-ink:  #c25e00;   /* readable orange text on light bg */
  /* ---- Status (tuned for white bg) ---- */
  --green:       #1f9d57;   /* text / on pale tint */
  --green-bg:    #e7f5ed;
  --green-solid: #22a55c;   /* vivid fill for bars, rails, borders */
  --amber:       #a5750c;   /* text / on pale tint */
  --amber-bg:    #fbf1d6;
  --amber-solid: #e0a12b;   /* vivid fill (reads as amber, not brown) */
  --red:         #d24141;   /* text / on pale tint */
  --red-bg:      #fcebeb;
  --red-solid:   #de524d;   /* vivid fill */
  --blue:        #2f7dcc;
  --blue-bg:     #e8f1fb;
  --blue-solid:  #3f8ede;
  /* ---- Sidebar (navy rail, white text, orange accent) ---- */
  --sidebar-bg:      #172441;   /* deep navy (matches logo seal) */
  --sidebar-surface: #1e2d4f;
  --sidebar-border:  rgba(255,255,255,.14);   /* subtle divider on navy */
  --sidebar-logo:    #ffffff;
  --sidebar-text:    rgba(255,255,255,.98);   /* nav text */
  --sidebar-dim:     rgba(255,255,255,.68);   /* section labels / muted */
  --sidebar-active-bg:rgba(255,255,255,.10);  /* translucent highlight */
  --sidebar-active:  #ffffff;                 /* active text */
  --sidebar-hover:   rgba(255,255,255,.06);   /* hover */
  --sidebar-ink:     #ffffff;                 /* user name / strong text */
  /* ---- Metrics ---- */
  --sidebar-w:   240px;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md:   0 2px 4px rgba(16,24,40,.05), 0 6px 16px rgba(16,24,40,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-base); color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-active); }

/* ---- App Shell ---- */
.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar (light, Clio-style) ---- */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-header { padding: 22px 16px 18px; border-bottom: 1px solid var(--sidebar-border); text-align: center; }
.sidebar-logo-img { width: 104px; height: 104px; border-radius: 50%; display: block; margin: 0 auto 12px; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 3px 10px rgba(0,0,0,.18); }
.sidebar-logo { font-size: 15px; font-weight: 700; color: var(--sidebar-ink); letter-spacing: .2px; }
.sidebar-firm { font-size: 10px; font-weight: 600; color: var(--sidebar-dim); letter-spacing: .3px; margin-top: 2px; }
.sidebar-subtitle { font-size: 11px; color: var(--sidebar-dim); margin-top: 8px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.sidebar-profile-link { display: block; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sidebar-border); text-decoration: none; border-radius: var(--radius); transition: background .13s; }
.sidebar-profile-link:hover { background: var(--sidebar-hover); }
.sidebar-profile-name { display: block; font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.2px; line-height: 1.2; }
.sidebar-profile-edit { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--sidebar-dim); margin-top: 5px; }
.sidebar-profile-link:hover .sidebar-profile-edit { color: var(--brand-orange); }
.sidebar-profile-edit svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-nav { list-style: none; padding: 12px 10px; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 14px; margin: 2px 0; color: var(--sidebar-text); font-size: 14px; font-weight: 500;
  border-radius: var(--radius); border-left: 3px solid transparent; transition: background .13s, color .13s;
}
.nav-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 1;
}
.sidebar-nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-ink); }
.sidebar-nav a.active {
  background: var(--sidebar-active-bg); color: var(--sidebar-active);
  border-left-color: var(--brand-orange); font-weight: 700;
}
.sidebar-nav a.active .nav-icon { color: var(--brand-orange); opacity: 1; }
.nav-section { padding: 18px 14px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--sidebar-dim); }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--sidebar-border); }
.sidebar-identity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sidebar-user { font-size: 13px; font-weight: 600; color: var(--sidebar-ink); }
.sidebar-role { margin: 0; }
.btn-logout { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--sidebar-dim); font-weight: 500; }
.btn-logout:hover { color: var(--red); }

/* ---- Main Content ---- */
.main-content { flex: 1; padding: 28px 36px; overflow-x: hidden; max-width: 1440px; }

/* ---- Page Header ---- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-primary); }

/* ---- Flash Messages ---- */
.flash { padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.flash-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green); }
.flash-error   { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn-primary   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:hover { box-shadow: 0 2px 8px rgba(255,126,0,.32); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-light); box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--accent-active); border-color: var(--accent); }
.btn-ghost     { background: transparent; color: var(--text-muted); border-color: var(--border-light); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--accent-active); border-color: var(--accent); }
.btn-danger    { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: var(--red-solid); color: #fff; border-color: var(--red-solid); }
.dz-note { margin-right: auto; align-self: center; font-size: 12px; color: var(--text-muted); max-width: 360px; line-height: 1.35; }
.dash-findings { display: flex; flex-direction: column; gap: 14px; }
.dash-find-caption { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.dash-find-head { margin-bottom: 6px; }
.dash-find-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.dash-find-list li { font-size: 13px; line-height: 1.4; color: var(--text-primary); padding-left: 10px; border-left: 2px solid var(--border); }
.dash-find-list.dash-find-red li   { border-left-color: var(--red); }
.dash-find-list.dash-find-amber li { border-left-color: var(--amber); }
.dash-find-list.dash-find-blue li  { border-left-color: var(--blue); }
.dash-find-cat { font-weight: 700; }
.confirm-pop {
  position: fixed; z-index: 1000; width: 260px; max-width: calc(100vw - 24px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .22); padding: 12px 13px;
}
.confirm-pop-msg { font-size: 12.5px; color: var(--text-primary); line-height: 1.4; margin-bottom: 10px; }
.confirm-pop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-sm        { padding: 4px 10px; font-size: 12px; }
.btn-xs        { padding: 2px 6px; font-size: 11px; }
.btn-group     { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form   { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-actions  { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- Badges ---- */
.badge {
  display: inline-block; padding: 2px 7px; border-radius: 9999px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-green     { background: var(--green-bg); color: var(--green); }
.badge-red       { background: var(--red-bg); color: var(--red); }
.badge-amber     { background: var(--amber-bg); color: var(--amber); }
.badge-blue      { background: var(--blue-bg); color: var(--blue); }
.badge-gray      { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }
.badge-lg        { font-size: 13px; padding: 4px 12px; }
.badge-xs        { font-size: 10px; padding: 1px 5px; }
.badge-administrator { background: var(--red-bg); color: var(--red); }
.badge-attorney      { background: var(--blue-bg); color: var(--blue); }
.badge-reviewer      { background: var(--amber-bg); color: var(--amber); }
.badge-staff         { background: var(--green-bg); color: var(--green); }
.badge-readonly      { background: var(--bg-card); color: var(--text-muted); }
.ml-1 { margin-left: 4px; }

/* ---- Cards ---- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 22px; box-shadow: var(--shadow); }
.card-title { font-size: 12px; font-weight: 700; margin-bottom: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; }
/* Collapsible card header (<details>/<summary>) */
summary.collapsible-summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
summary.collapsible-summary::-webkit-details-marker { display: none; }
summary.collapsible-summary::after { content: '▾'; font-size: 22px; line-height: 1; font-weight: 700; color: var(--brand-orange); transition: transform .2s; }
details:not([open]) > summary.collapsible-summary { margin-bottom: 0; }
details:not([open]) > summary.collapsible-summary::after { transform: rotate(-90deg); }
summary.collapsible-summary:hover { color: var(--text-primary); }

/* Educational requirement reference (Requirements page) */
.req-edu-head { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.req-edu-head::-webkit-details-marker { display: none; }
.req-edu-title { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.req-edu-title::after { content: '▾'; color: var(--brand-orange); font-size: 22px; line-height: 1; font-weight: 700; transition: transform .2s; }
details:not([open]) > .req-edu-head .req-edu-title::after { transform: rotate(-90deg); }
.req-edu-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand-orange); background: var(--accent-soft); padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
details[open] > .req-edu-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.req-edu-body { font-size: 14px; line-height: 1.7; color: var(--text-primary); }
.req-edu-body p { margin-bottom: 10px; }
.req-edu-body ul { margin: 8px 0 12px 20px; }
.req-edu-body li { margin-bottom: 5px; }
.req-edu-body h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 16px 0 6px; font-weight: 700; }
.req-edu-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin: 8px 0 12px; }
.req-edu-cats > div { font-size: 13px; line-height: 1.5; display: flex; }
.req-edu-cats .roman { color: var(--brand-orange); font-weight: 700; flex-shrink: 0; width: 34px; }
.req-edu-note { background: var(--blue-bg); color: var(--blue); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.breadth-key { margin-top: 18px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.breadth-key-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px; }
.breadth-key .req-edu-cats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .breadth-key .req-edu-cats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .breadth-key .req-edu-cats { grid-template-columns: 1fr; } }
.req-edu-quote { border-left: 3px solid var(--border-light); background: var(--bg-surface); padding: 10px 14px; margin: 6px 0 14px; font-size: 13px; color: var(--text-muted); font-style: italic; border-radius: 0 var(--radius) var(--radius) 0; }
.req-edu-quote cite { display: block; margin-top: 7px; font-style: normal; font-size: 11px; color: var(--text-dim); }
.req-edu-plain { background: var(--green-bg); border-radius: var(--radius); padding: 10px 14px; margin: 6px 0 12px; }
.req-edu-plain p:last-child, .req-edu-plain ul:last-child { margin-bottom: 0; }
.req-edu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; margin: 16px 0 6px; display: flex; align-items: center; gap: 6px; }
.req-edu-label.official { color: var(--text-muted); }
.req-edu-label.plain { color: var(--green); }
@media (max-width: 640px) { .req-edu-cats { grid-template-columns: 1fr; } }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---- Tables ---- */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-surface); color: var(--text-dim); padding: 11px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table th.th-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.data-table th.th-sortable:hover { color: var(--text-primary); background: var(--bg-hover); }
.data-table th.th-sortable::after { content: ' ⇅'; color: var(--brand-orange); font-size: 12px; font-weight: 700; opacity: .9; }
.data-table th.th-sortable[data-dir]::after { content: ''; }  /* active column shows the ▲/▼ instead */
.data-table th.th-sortable:hover::after { opacity: 1; }
.data-table th .sort-ind { color: var(--brand-orange); font-size: 12px; font-weight: 700; }
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .empty-state { text-align: center; color: var(--text-muted); padding: 24px; }
/* Row selection state is shown via the status badge column, not a background tint */
.row-selected, .row-backup { background: transparent; }

/* ---- Forms ---- */
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius);
  color: var(--text-primary); padding: 8px 10px; font-size: 13px;
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.deadline-status { margin-top: 8px; font-size: 12px; }
.deadline-legend { margin-top: 8px; font-size: 11px; color: var(--text-muted); line-height: 1.6; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }

/* ---- Repeatable-row editor (Application Statements) ---- */
.repeater-group { margin-bottom: 22px; }
.rep-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.rep-card {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
}
.rep-field { display: flex; flex-direction: column; gap: 3px; flex: 1 1 160px; min-width: 0; }
.rep-field.sm { flex: 1 1 90px; max-width: 130px; }
.rep-field.md { flex: 1.5 1 200px; }
.rep-field.lg { flex: 2 1 240px; }
.rep-field.full { flex: 1 1 100%; }
textarea.rep-input { resize: vertical; min-height: 56px; font-family: inherit; line-height: 1.5; }
.rep-field label { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; }
.rep-input {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text-primary); padding: 6px 8px; font-size: 13px;
}
.rep-input:focus { outline: none; border-color: var(--accent); }
.rep-foot { flex-basis: 100%; display: flex; justify-content: flex-end; }
.rep-remove {
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; padding: 2px 4px;
}
.rep-remove:hover { color: var(--red); }
.rep-add { margin-top: 10px; }
.form-section-title { font-size: 17px; font-weight: 800; letter-spacing: -.2px; color: var(--text-primary); margin: 30px 0 16px; border-bottom: 2px solid var(--border); padding-bottom: 10px; padding-left: 11px; border-left: 4px solid var(--brand-orange); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.form-actions-sticky { position: sticky; bottom: 0; background: var(--bg-card); border-top: 1px solid var(--border); padding: 14px 0; margin-top: 24px; display: flex; gap: 10px; justify-content: flex-end; z-index: 10; }
.checkbox-group label { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text-primary); cursor: pointer; }
.checkbox-group input[type=checkbox] { width: 14px; height: 14px; cursor: pointer; }
.input-sm { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); padding: 5px 8px; font-size: 12px; }
.input-md { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); padding: 7px 10px; font-size: 13px; min-width: 180px; }
.input-xs { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); padding: 3px 6px; font-size: 12px; width: 70px; }
.select-sm { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); padding: 5px 8px; font-size: 12px; }
.select-xs { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); padding: 3px 6px; font-size: 11px; }
.label-sm { font-size: 11px; color: var(--text-muted); }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.checkbox-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: 4px; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text-primary); font-weight: 500; cursor: pointer; }
.checkbox-row input[type=checkbox] { width: 14px; height: 14px; cursor: pointer; }
.checkbox-list { display: flex; flex-direction: column; gap: 8px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }

/* ---- Filter Bar ---- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-bar select, .filter-bar input { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius); color: var(--text-primary); padding: 7px 10px; font-size: 13px; }
.search-input { min-width: 320px; }
.th-note { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-size: 10px; }
.clio-cell { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.clio-link { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--accent-active); }
.clio-link:hover { color: var(--accent-hover); text-decoration: underline; }
.clio-ext { font-size: 10px; }
.clio-num { color: var(--text-muted); }
.form-hint code { background: var(--bg-hover); border: 1px solid var(--border-light); border-radius: 4px; padding: 1px 5px; font-size: 11px; color: var(--text-primary); word-break: break-all; }
.form-hint br + span, .form-hint br { line-height: 1.7; }

/* ---- Status Banners ---- */
.status-banner { padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; border: 1px solid; }
.status-green  { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.status-amber  { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.status-red    { background: var(--red-bg);   color: var(--red);   border-color: var(--red);   }
.status-blue   { background: var(--blue-bg);  color: var(--blue);  border-color: var(--blue);  }
.status-gray   { background: var(--bg-card);  color: var(--text-muted); border-color: var(--border); }

/* ---- Requirement snapshot (list-page header) ---- */
.snapshot { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px 20px; margin-bottom: 22px; }
.snapshot-status-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.snapshot-status { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 6px 14px; border-radius: 999px; white-space: nowrap; text-align: center; }
.snapshot-gap { font-size: 11px; font-weight: 700; text-align: center; }
.snapshot-stats { display: flex; gap: 0; flex-wrap: wrap; align-items: center; }
.snap-tile { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 48px; padding: 4px 22px; border-left: 1px solid var(--border); }
.snap-num { font-size: 22px; font-weight: 800; line-height: 1; color: var(--text-primary); }
.snap-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; margin-top: 5px; white-space: nowrap; }
.snapshot-bar { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 14px; }
.snapshot-bar .req-bar-wrap, .snapshot-bar .req-scale { max-width: 440px; }
@media (max-width: 720px) { .snapshot { grid-template-columns: 1fr; } .snap-tile { border-left: none; padding: 4px 14px 4px 0; } .snapshot-stats { gap: 14px; } }

.info-banner { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue); padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.info-banner-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.info-banner-red   { background: var(--red-bg); color: var(--red); border-color: var(--red); }

/* ---- Detail Layouts ---- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.detail-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--text-muted); font-size: 12px; }
.stat-value { font-size: 20px; font-weight: 700; }
.detail-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; }
.text-muted { color: var(--text-muted); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-amber  { color: var(--amber); }
.text-sm     { font-size: 12px; }
.text-mono   { font-family: monospace; }
/* detail field full-width (matters detail) */
.detail-field-full { grid-column: 1 / -1; padding: 10px 0; }
.detail-value { font-size: 13px; margin-top: 4px; line-height: 1.6; }

/* ---- Attorney Profile Detail ---- */
.profile-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.summary-card  { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.summary-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.summary-val   { font-size: 16px; font-weight: 700; }
/* req card inner stats row */
.req-name     { font-size: 13px; font-weight: 700; }
.req-numbers  { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.req-stat     { display: flex; flex-direction: column; align-items: center; min-width: 40px; }
.req-stat-num { font-size: 20px; font-weight: 800; line-height: 1; }
.req-stat-label { font-size: 10px; text-transform: uppercase; color: var(--text-dim); margin-top: 2px; }
/* nav sections row on attorney detail */
.nav-sections { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.nav-section-link { display: inline-block; padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: var(--text-muted); transition: all .15s; }
.nav-section-link:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent); }
/* next deadline banner */
.next-deadline-banner { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); padding: 10px 16px; font-size: 13px; margin: 12px 0; }
/* notes card */
.notes-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* ---- Attorney Dashboard (attorney role) ---- */
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.profile-card-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.profile-meta { font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; text-align: right; }
.next-deadline { color: var(--amber); }
/* Dashboard profile card: info + readiness on the left, section nav on the right */
.profile-card-body { display: flex; gap: 26px; align-items: stretch; flex-wrap: wrap; }
.profile-main { flex: 1 1 360px; min-width: 0; }
.profile-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-id h2 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.profile-main .profile-meta { text-align: left; margin-top: 8px; }
.profile-nav { flex: 0 0 236px; display: flex; flex-direction: column; gap: 8px; border-left: 1px solid var(--border); padding-left: 24px; }
.profile-nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 700; margin-bottom: 2px; }
.profile-nav .section-link { display: block; text-align: left; }
.dash-rollup { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dash-rollup-item { flex: 1 1 110px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 14px; }
.dash-rollup-num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1; color: var(--text-primary); }
.dash-rollup-of { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.dash-rollup-num-sm { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.2; padding: 4px 0 3px; }
.dash-rollup-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; margin-top: 7px; white-space: nowrap; }
.info-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; background: var(--border);
  color: var(--text-muted); font-size: 10px; font-weight: 700; line-height: 1;
  cursor: help; position: relative; margin-left: 4px; vertical-align: middle;
  text-transform: none; letter-spacing: 0;
}
.info-tip:hover { background: var(--brand-orange); color: #fff; }
.info-tip:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  width: 210px; background: #1b2039; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.45;
  text-transform: none; letter-spacing: normal; text-align: left; padding: 9px 11px; border-radius: 7px;
  box-shadow: 0 6px 20px rgba(15,23,42,.28); z-index: 60; white-space: normal;
}
.info-tip:hover::before {
  content: ''; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1b2039; z-index: 60;
}
@media (max-width: 720px) { .profile-nav { flex-basis: 100%; border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 16px; } }
.readiness-overall { }
.readiness-pct { font-size: 22px; font-weight: 800; margin-top: 4px; }
/* gap labels under req cards */
.req-gap { font-size: 12px; margin-top: 8px; padding: 4px 8px; border-radius: var(--radius); }
.req-gap-red   { background: var(--red-bg); color: var(--red); }
.req-gap-amber { background: var(--amber-bg); color: var(--amber); }
.req-gap-green { background: var(--green-bg); color: var(--green); }
.req-progress { margin: 12px 0 8px; }
.req-bar-wrap { position: relative; padding-top: 17px; }
.req-current-label { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }
.req-current-label::after { content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 4px solid var(--text-muted); }
.req-min-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text-muted); }
.req-scale { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 5px; }
/* section links row (attorney dashboard) */
.section-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.section-link  { display: inline-block; padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: var(--text-muted); font-weight: 500; transition: all .15s; }
.section-link:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent); }
/* finding rec text */
.finding-rec { font-size: 12px; color: var(--text-muted); font-style: italic; margin-top: 4px; }

/* ---- Staff Dashboard ---- */
.empty-state-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px; }
.attorney-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.attorney-card  { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.attorney-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card-links a { font-size: 12px; color: var(--accent-hover); padding: 2px 0; }

/* ---- Dashboard Stat Widgets ---- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-widget, .stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.stat-widget:hover, .stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-widget .stat-value, .stat-card .stat-value,
.stat-widget .stat-num,   .stat-card .stat-num   { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; color: var(--text-primary); }
.stat-widget .stat-label, .stat-card .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); margin-top: 6px; font-weight: 600; }
/* left accent rail instead of top border for a cleaner look */
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.stat-red::before   { background: var(--red-solid);   }
.stat-amber::before { background: var(--amber-solid); }
.stat-green::before { background: var(--green-solid); }
.stat-red .stat-num   { color: var(--red);   }
.stat-amber .stat-num { color: var(--amber); }
.stat-green .stat-num { color: var(--green); }

/* ---- Progress Bars ---- */
.progress-bar-wrap { margin: 8px 0; background: var(--border); border-radius: 999px; height: 8px; position: relative; overflow: hidden; }
.progress-bar-track { background: var(--border); border-radius: 999px; height: 8px; position: relative; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 999px; transition: width .4s; }
/* .progress-bar used directly as the fill element in several templates */
.progress-bar { height: 100%; border-radius: 999px; transition: width .4s; display: block; }
.progress-label { font-size: 12px; color: var(--text-muted); }
.progress-green  { background: var(--green-solid); }
.progress-amber  { background: var(--amber-solid); }
.progress-red    { background: var(--red-solid); }
.progress-gray   { background: var(--text-dim); }
.progress-bar-pad-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.3); }
/* readiness bar in attorney dashboard */
.readiness-bar-wrap { background: var(--border); border-radius: 999px; height: 10px; overflow: hidden; margin: 8px 0; }
.readiness-bar { height: 100%; border-radius: 999px; transition: width .4s; }
.bg-green { background: var(--green-solid); }
.bg-amber { background: var(--amber-solid); }
.bg-red   { background: var(--red-solid); }

/* ---- Requirements Dashboard ---- */
.requirements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.req-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.req-card-green  { border-left: 3px solid var(--green-solid); }
.req-card-amber  { border-left: 3px solid var(--amber-solid); }
.req-card-red    { border-left: 3px solid var(--red-solid); }
.req-card-gray   { border-left: 3px solid var(--border-light); }
.req-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.req-title { font-size: 14px; font-weight: 700; }
.req-progress-row { display: flex; justify-content: space-between; align-items: center; }
.req-current { font-size: 24px; font-weight: 800; color: var(--text-primary); }
.req-min { font-size: 14px; color: var(--text-muted); }
.req-sep { font-size: 16px; color: var(--text-dim); margin: 0 4px; }
.req-pad { font-size: 12px; margin-left: 6px; }
.req-breakdown { display: flex; gap: 12px; margin-top: 10px; }
.req-sub { display: flex; flex-direction: column; align-items: center; }
.req-sub-label { font-size: 10px; text-transform: uppercase; color: var(--text-dim); }
.req-sub-val { font-size: 16px; font-weight: 700; }
.req-extra { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.req-extra-item { font-size: 11px; color: var(--text-muted); background: var(--bg-surface); padding: 2px 6px; border-radius: 3px; }
.req-actions { margin-top: auto; padding-top: 14px; }
.status-chip { display: inline-block; padding: 2px 8px; border-radius: var(--radius); font-size: 11px; font-weight: 700; }

/* ---- Breadth Grid ---- */
.breadth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; align-items: start; }
.breadth-card { display: flex; flex-direction: column; gap: 9px; height: 250px; background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--border-light); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); }
.breadth-card-active { border-left-color: var(--green-solid); }
.breadth-card-has    { border-left-color: var(--amber-solid); }
.breadth-card-empty  { border-left-color: var(--border-light); }
.breadth-card-top { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.breadth-card-top:hover .breadth-name { color: var(--accent); }
.breadth-roman { font-size: 15px; font-weight: 800; color: var(--brand-orange); flex-shrink: 0; min-width: 26px; }
.breadth-name  { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--text-primary); }
.breadth-chip  { align-self: flex-start; }
.breadth-stats { display: flex; flex-wrap: wrap; gap: 6px 13px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; }
.breadth-stat-n { font-size: 16px; font-weight: 800; color: var(--text-primary); margin-right: 3px; }
.breadth-matters { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.breadth-matter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; padding: 4px 6px; border-radius: var(--radius); text-decoration: none; color: var(--accent); }
.breadth-matter-row:hover { background: var(--bg-hover); }
.breadth-matter-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadth-empty { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.breadth-empty:hover { color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green-solid); }
.dot-blue  { background: var(--blue-solid); }

/* ---- Warning Lists ---- */
.warning-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.warning-item { padding: 8px 12px; border-radius: var(--radius); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.warning-critical { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
.warning-moderate { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber); }
.warning-icon { font-weight: 700; font-size: 15px; }
.warning-sm { font-size: 11px; color: var(--amber); margin-top: 2px; }

/* ---- AI Review ---- */
.findings-section { margin-bottom: 20px; }
.findings-header { font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: var(--radius) var(--radius) 0 0; text-transform: uppercase; letter-spacing: .5px; }
.findings-critical { background: var(--red-bg); color: var(--red); }
.findings-moderate { background: var(--amber-bg); color: var(--amber); }
.findings-info     { background: var(--bg-card); color: var(--text-muted); }
.finding-card { background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--border); padding: 12px; margin-top: 1px; }
.finding-card.finding-critical { border-left-color: var(--red-solid); }
.finding-card.finding-moderate { border-left-color: var(--amber-solid); }
.finding-card.finding-informational { border-left-color: var(--blue-solid); }
.finding-card.finding-resolved { opacity: .6; }
.finding-header { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.finding-category { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.finding-description { font-size: 13px; margin-bottom: 6px; }
.finding-recommendation { font-size: 12px; color: var(--text-muted); font-style: italic; margin-bottom: 6px; }
.finding-resolution { font-size: 12px; color: var(--green); }
.finding-actions { margin-top: 8px; }

/* ---- Application Builder ---- */
.readiness-header { text-align: center; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; }
.readiness-pct { font-size: 48px; font-weight: 800; color: var(--accent-hover); }
.readiness-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; }
.readiness-header .readiness-bar { max-width: 300px; margin: 0 auto; }
.readiness-fill { height: 6px; border-radius: 999px; background: var(--accent); transition: width .4s; }
.readiness-header .readiness-pct.text-red   { color: var(--red); }
.readiness-header .readiness-pct.text-amber { color: var(--amber); }
.readiness-header .readiness-pct.text-green { color: var(--green); }
.readiness-bar .readiness-fill.bg-red   { background: var(--red-solid); }
.readiness-bar .readiness-fill.bg-amber { background: var(--amber-solid); }
.readiness-bar .readiness-fill.bg-green { background: var(--green-solid); }
.app-sections { display: flex; flex-direction: column; gap: 20px; }
.app-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.app-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.app-section-header h2 { font-size: 15px; font-weight: 700; }
.pool-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pool-col { }
.pool-col-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; }
.pool-item { padding: 8px 10px; border-radius: var(--radius); margin-bottom: 4px; font-size: 13px; }
.pool-item-selected { background: rgba(34,165,92,.1); border: 1px solid var(--green-solid); }
.pool-item-backup   { background: rgba(63,142,222,.08); border: 1px solid var(--blue-solid); }
.pool-item-name { font-weight: 600; }
.pool-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pool-actions { display: flex; gap: 5px; margin-top: 8px; }
.breadth-builder-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.breadth-builder-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--bg-surface); }
.breadth-builder-head { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.breadth-builder-head .roman { color: var(--brand-orange); margin-right: 2px; }
.breadth-builder-count { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.checklist-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.checklist-actions { display: flex; justify-content: flex-start; margin-top: 4px; }
.help-steps { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.help-steps li { font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.ai-run-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.ai-disclaimer { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.5; }
.ai-score-hero { text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 20px; margin-bottom: 20px; }
.ai-score-label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; color: var(--text-muted); }
.ai-score-value { font-size: 72px; font-weight: 800; line-height: 1; margin-top: 6px; letter-spacing: -1px; }
.ai-score-max { font-size: 30px; font-weight: 700; color: var(--text-muted); }
.ai-score-caption { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-top: 6px; }
.checklist-approvals { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.approval-row { display: flex; align-items: center; gap: 12px; }
.override-item { padding: 8px; background: var(--bg-surface); border-radius: var(--radius); margin-bottom: 6px; font-size: 13px; }

/* ---- Practice Grid ---- */
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.practice-item { display: flex; flex-direction: column; gap: 4px; }

/* ---- FAQ ---- */
.faq-category-header { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.faq-entry { padding: 10px 0; border-bottom: 1px solid var(--border); }
.faq-question { font-size: 14px; font-weight: 500; }
.faq-answer-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; font-size: 14px; line-height: 1.7; }
.faq-pending-card { background: var(--amber-bg); border: 1px solid var(--amber); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.related-list { display: flex; flex-direction: column; gap: 4px; }

/* Reorganized FAQ list: jump nav + topic groups + Q&A accordion */
.faq-topicnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.faq-topic-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; transition: all .15s; }
.faq-topic-chip:hover { color: var(--accent-active); border-color: var(--accent); }
.faq-topic-chip span { font-size: 11px; font-weight: 800; color: #fff; background: var(--brand-orange); border-radius: 999px; min-width: 17px; text-align: center; padding: 0 5px; }
.faq-group { margin-top: 26px; }
.faq-group-title { font-size: 18px; font-weight: 800; letter-spacing: -.2px; color: var(--text-primary); padding-left: 11px; border-left: 4px solid var(--brand-orange); }
.faq-group-desc { font-size: 12.5px; color: var(--text-muted); margin: 4px 0 12px 15px; }
.faq-topic { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); scroll-margin-top: 16px; overflow: hidden; }
.faq-topic-head { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 13px 16px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.faq-topic-head::-webkit-details-marker { display: none; }
.faq-topic-name { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.faq-topic-name::after { content: '▾'; color: var(--brand-orange); font-size: 20px; line-height: 1; font-weight: 700; transition: transform .2s; }
details:not([open]) > .faq-topic-head .faq-topic-name::after { transform: rotate(-90deg); }
.faq-topic-count { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--text-muted); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.faq-topic-body { padding: 0 16px 6px; border-top: 1px solid var(--border); }
.faq-qa { border-bottom: 1px solid var(--border-light); }
.faq-qa:last-child { border-bottom: none; }
.faq-qa-q { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; list-style: none; padding: 12px 2px; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.faq-qa-q::-webkit-details-marker { display: none; }
.faq-qa-q::before { content: '+'; color: var(--brand-orange); font-size: 17px; font-weight: 700; line-height: 1.3; width: 14px; flex: none; }
details[open] > .faq-qa-q::before { content: '\2212'; }
.faq-qa-q:hover { color: var(--accent-active); }
.faq-qa-a { padding: 0 2px 14px 25px; font-size: 13.5px; line-height: 1.65; color: var(--text-secondary, var(--text-primary)); }
.faq-qa-foot { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.internal-note { background: var(--amber-bg); color: var(--amber); padding: 8px 12px; border-radius: var(--radius); font-size: 12px; }
.version-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.version-item { background: var(--bg-surface); padding: 8px; border-radius: var(--radius); font-size: 12px; }
.version-header { color: var(--text-muted); margin-bottom: 4px; }

/* ---- Admin ---- */
.req-config-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.req-config-label { flex: 1; min-width: 200px; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 16px; }
.page-btn { padding: 5px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted); font-size: 12px; }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ---- Auth Pages ---- */
body.auth-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-base); }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-base); }
.auth-card { width: 480px; max-width: 94vw; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 52px; box-shadow: var(--shadow-md); }
.auth-logo { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 2px; color: var(--accent-hover); letter-spacing: 3px; }
.auth-logo-img { width: 120px; height: 120px; border-radius: 50%; display: block; margin: 0 auto 20px; box-shadow: 0 2px 8px rgba(16,24,40,.16); }
.auth-firm { font-size: 11px; font-weight: 600; text-align: center; color: var(--text-muted); letter-spacing: .3px; margin-bottom: 12px; }
.auth-title { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 8px; letter-spacing: -.3px; }
.auth-sub { font-size: 16px; text-align: center; color: var(--text-muted); margin-bottom: 28px; }
.auth-subtitle { font-size: 12px; text-align: center; color: var(--text-muted); margin-bottom: 24px; }
.auth-card .form-group { margin-bottom: 14px; }
.auth-card .form-group input { width: 100%; }
.auth-card .btn-primary, .btn-full { width: 100%; justify-content: center; padding: 10px; font-size: 14px; margin-top: 8px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* ---- Misc ---- */
.empty-state { color: var(--text-muted); text-align: center; padding: 32px; font-size: 13px; }
details summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
code { background: var(--bg-surface); padding: 1px 4px; border-radius: 3px; font-size: 12px; font-family: monospace; }

/* ---- Enhanced Empty States ---- */
.empty-state-block { padding: 36px 24px; text-align: center; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-state-body { font-size: 13px; color: var(--text-muted); max-width: 480px; margin: 0 auto 20px; line-height: 1.6; }

/* ---- Next Best Actions ---- */
.next-actions-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: action-counter; }
.action-item { padding: 10px 14px 10px 38px; border-radius: var(--radius); font-size: 13px; counter-increment: action-counter; position: relative; }
.action-item::before { content: counter(action-counter); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: 13px; }
.action-item a { color: inherit; text-decoration: none; display: block; font-weight: 500; }
.action-item a:hover { text-decoration: underline; }
.action-critical { background: var(--red-bg); color: var(--red); border-left: 3px solid var(--red-solid); }
.action-amber { background: var(--amber-bg); color: var(--amber); border-left: 3px solid var(--amber-solid); }

/* ============================================================
   Light Theme Polish — elevation, hierarchy, dashboard hero
   ============================================================ */

/* Consistent soft elevation for card families */
.req-card, .profile-card, .summary-card, .attorney-card, .detail-card,
.detail-section, .empty-state-card, .readiness-header, .form-card,
.faq-answer-card, .app-section, .notes-card, .breadth-card, .finding-card {
  box-shadow: var(--shadow);
}
.req-card, .profile-card, .summary-card, .attorney-card, .detail-card,
.readiness-header, .app-section { border-radius: var(--radius-lg); }

/* Interactive lift on the clickable requirement / attorney cards */
.req-card, .attorney-card, .summary-card { transition: box-shadow .18s, transform .18s, border-color .18s; }
.req-card:hover, .attorney-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---- Attorney dashboard readiness hero ---- */
.profile-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  padding: 24px 26px;
}
.profile-card-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.readiness-overall { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.readiness-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); }
.readiness-bar-wrap { height: 12px; background: var(--bg-hover); box-shadow: inset 0 1px 2px rgba(16,24,40,.06); }
.readiness-overall .readiness-pct { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-top: 8px; color: var(--text-primary); }
.readiness-overall .readiness-pct.text-red   { color: var(--red); }
.readiness-overall .readiness-pct.text-amber { color: var(--amber); }
.readiness-overall .readiness-pct.text-green { color: var(--green); }

/* Requirement card numbers cleaner on white */
.req-card { padding: 18px; }
.req-stat-num { color: var(--text-primary); }
.req-name { font-size: 14px; font-weight: 700; letter-spacing: -.1px; }

/* Section link chips */
.section-link, .nav-section-link { box-shadow: var(--shadow); font-weight: 500; }
.section-link:hover, .nav-section-link:hover { box-shadow: var(--shadow-md); }

/* Progress bar track reads better on light */
.progress-bar-wrap, .progress-bar-track { background: var(--bg-hover); box-shadow: inset 0 1px 2px rgba(16,24,40,.05); }

/* ===================== Call Analytics additions ===================== */
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.page-head h1{margin:0;font-size:22px}
.page-sub{margin:4px 0 0;color:var(--text-muted,#64748b);font-size:13px}
.page-sub a{color:var(--accent,#2f5fb0);text-decoration:none}
.range-form{display:flex;align-items:center;gap:12px}
.range-dates{font-size:13px;color:var(--text-muted,#64748b)}
.badge-viewer{background:var(--blue-bg,#e6effb);color:var(--blue-solid,#2f5fb0)}

.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:18px}
.kpi-card{background:var(--bg-card,#fff);border:1px solid var(--border-light,#e6e9f0);border-radius:var(--radius,10px);padding:16px 18px;box-shadow:var(--shadow,0 1px 2px rgba(16,24,40,.05));position:relative}
.kpi-card.kpi-good{border-top:3px solid var(--green-solid,#1f9d55)}
.kpi-card.kpi-bad{border-top:3px solid var(--red-solid,#e02424)}
.kpi-label{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted,#64748b);font-weight:600}
.kpi-value{font-size:30px;font-weight:700;color:var(--sidebar-bg,#172441);margin-top:4px;line-height:1.1}
.kpi-foot{font-size:12px;color:var(--text-muted,#64748b);margin-top:6px}
.kpi-spark{margin-top:6px;height:40px}
.kpi-hint{cursor:help;color:#b0b7c3;font-size:11px}

.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;margin-bottom:16px}
.card-head{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--border-light,#e6e9f0)}
.card-head h2{margin:0;font-size:15px;font-weight:600}
.card-body{padding:16px 18px}
.card-body.no-pad{padding:0}
.card-body.center{display:flex;justify-content:center;align-items:center;min-height:150px}
.card-foot{padding:10px 18px;border-top:1px solid var(--border-light,#e6e9f0);font-size:12px}
.center{text-align:center}
.muted{color:var(--text-muted,#64748b)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.ok{color:var(--green-solid,#1f9d55);font-weight:600}
.err{color:var(--red-solid,#e02424);font-weight:600}
.tag{display:inline-block;font-size:10px;text-transform:uppercase;letter-spacing:.03em;background:#eef1f7;color:#5b6472;border-radius:4px;padding:1px 5px;vertical-align:middle}

.legend{display:flex;flex-wrap:wrap;gap:14px;padding:8px 18px 14px;font-size:12px;color:var(--text-muted,#64748b)}
.legend-col{flex-direction:column;gap:6px}
.legend-item{display:flex;align-items:center;gap:6px}
.legend-item b{color:var(--sidebar-bg,#172441)}
.dot{width:10px;height:10px;border-radius:3px;display:inline-block}
.chart-empty{color:var(--text-muted,#64748b);font-size:13px;padding:30px;text-align:center}

.axis-label{font-size:9px;fill:#9aa2b1}
.bar-label{font-size:11px;fill:#3b4250}
.bar-value{font-size:11px;fill:#6b7280;font-weight:600}
.donut-total{font-size:22px;font-weight:700;fill:var(--sidebar-bg,#172441)}
.donut-sub{font-size:10px;fill:#9aa2b1}
svg.spark,svg.area-chart,svg.hbar,svg.heatmap{display:block;max-width:100%}

.filter-bar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.filter-bar input,.filter-bar select,.range-form select{padding:6px 10px;border:1px solid var(--border,#cdd3de);border-radius:8px;font-size:13px}
.stat-line{margin:4px 0;font-size:14px}
.stat-line b{color:var(--sidebar-bg,#172441)}
.btn-row{display:flex;gap:8px;margin-top:12px}
.btn-block{display:block;width:100%;text-align:center}

.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.detail-grid>div{display:flex;flex-direction:column;gap:3px}
.dl-label{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted,#64748b);font-weight:600}
.data-table.compact td,.data-table.compact th{padding:6px 10px;font-size:12px}
.total-row td{border-top:2px solid var(--border,#cdd3de);background:#fafbfd}

.login-body{display:flex;align-items:center;justify-content:center;min-height:100vh;background:var(--sidebar-bg,#172441)}
.login-card{background:#fff;border-radius:14px;padding:34px 30px;width:340px;box-shadow:0 20px 50px rgba(0,0,0,.3);text-align:center}
.login-logo{max-width:180px;margin-bottom:8px}
.login-title{font-size:18px;margin:6px 0 18px;color:var(--sidebar-bg,#172441)}
.login-form{display:flex;flex-direction:column;gap:14px;text-align:left}
.login-form label{font-size:13px;font-weight:600;display:flex;flex-direction:column;gap:5px;color:#3b4250}
.login-form input{padding:9px 11px;border:1px solid var(--border,#cdd3de);border-radius:8px;font-size:14px}

/* ===== Phase 2: caller identity ===== */
.section-title{font-size:13px;text-transform:uppercase;letter-spacing:.05em;color:#8a93a3;font-weight:700;margin:22px 0 10px}
.alert-card{border-left:3px solid var(--red-solid,#e02424)}
.tag-client{background:#e3f5ea;color:#1f7a44}
