/*
 * DocketBreeze — site.css
 * Requires Bootstrap 5.3 + bootstrap-overrides.css to load first.
 * This file covers app-specific components only; Bootstrap components
 * (buttons, forms, cards, badges, tables, etc.) are themed in
 * bootstrap-overrides.css via CSS variable remapping.
 */


body { min-height: 100vh; }

/* Account setup wizard (_SetupLayout): white content column */
.setup-layout-card {
    max-width: 720px;
    background-color: #fff;
}

/* Some setup steps (like video) need a wider canvas. */
body.setup-layout .setup-layout-card.setup-layout-card--wide {
    max-width: 100%;
}

/* Choose-role step uses two columns + art — give a bit more width */
body.setup-layout .setup-layout-card:has(.setup-choose-role) {
    max-width: 960px;
}

/* Empty model-state: tag helper adds validation-summary-valid; hide red alert wrapper */
body.setup-layout .validation-summary-valid.alert {
    display: none;
}

div.client-view {
    --border-radius: 1.25em;
}

.card {
    border-radius: var(--border-radius);
}

/* Read-only fields should look visibly non-editable. */
.form-control[readonly] {
  background-color: #e9ecef;
}

/* Attorney previewing /app/client/... — full-width strip above main nav */
.db-attorney-client-preview-banner {
    background: linear-gradient(90deg, rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgb(69 144 242) 100%);
    background-size: 200% 100%; /* allows movement */
    animation: subtleGradientShift 5s ease-in-out infinite;
    color: #fff;
    border-bottom: 3px solid var(--brand-bright, #0d9488);
    text-align: center;
}

@keyframes subtleGradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.brand-glow {
    box-shadow: 0 0 0 4px hsl(var(--brand-rgb) / 0.35), 0 4px 14px rgba(15, 23, 42, 0.35);
}

.db-attorney-client-preview-banner .btn-light {
  color: var(--navy, #0f172a);
}
.db-attorney-client-preview-banner .btn-light:hover {
  background: #fff;
  color: var(--brand, #0f766e);
}

/* Long-form legal copy (public Privacy / Terms) */
.legal-doc { max-width: 52rem; }
.legal-doc p,
.legal-doc li { line-height: 1.65; }
.legal-doc h2 { color: var(--navy); }

/* Nav avatar dropdown */
.nav-avatar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%;
  background: var(--brand-bright); color: white; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.nav-avatar-btn:hover { background: var(--brand-bright); color: white; }
.nav-avatar-btn::after { margin-left: 4px; }
.nav-avatar-btn.dropdown-toggle::after { border-top-color: rgba(255,255,255,.8); }
.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-avatar.has-portrait {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

/* ══════════════════════════════════════════════════════════════
   2. CASE BANNER  (header shown inside case sub-pages)
   ══════════════════════════════════════════════════════════════ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--grey-500);
  text-decoration: none;
  transition: color .15s;
  flex-shrink: 0;
}
.back-link:hover { color: var(--brand-bright); }

/* Attorney “return to last matter” — below .page-header */
.db-back-to-case-strip {
}
.db-back-to-case-strip.db-back-to-case-strip--fallback-pad {
    padding: 0 32px;
}
@media (max-width: 575.98px) {
    .db-back-to-case-strip.db-back-to-case-strip--fallback-pad {
        padding: 0 12px;
    }
}
.db-back-to-case-strip .db-back-to-case-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    font-size: 0.9375rem;
    color: var(--brand-bright);
    text-decoration: none;
    max-width: min(100%, 36rem);
}
.db-back-to-case-strip .db-back-to-case-link #dbBackToCaseLinkText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.db-back-to-case-strip .db-back-to-case-link:hover {
  color: var(--brand-bright, #0d9488);
  text-decoration: underline;
}
.back-link svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.case-banner {
    background: #fff;
    border-bottom: 1px solid var(--brand);
    padding: 0 16px;
}
.case-banner-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 0 0;
}

.case-overline {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 5px;
}
.case-title {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 10px;
}
.case-heading-row {
  margin-bottom: 10px;
  align-items: center;
}
.case-heading-row .case-title--heading {
  flex: 1 1 auto;
  min-width: 0;
}
.case-title em {
    font-style: italic;
    opacity:0.5;
    font-size: 18px;
}
.case-subtitle {
  font-size: 13px;
  color: var(--grey-500);
  margin-top: 5px;
  line-height: 1.5;
  margin-bottom: 2em;
}

/* Case sub-nav: mobile pill bar + desktop tabs */
.case-nav-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
@media (min-width: 992px) {
  .case-nav-wrapper .case-nav {
    flex: 1;
  }
}
@media (max-width: 991.98px) {
  .case-nav-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
}
.case-nav {
    display: flex;
    gap: 0.5em;
    margin-top: 0;
}
@media (max-width: 991.98px) {
  .case-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 0;
  }
}
.case-nav-btn {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-600);
    padding: 9px 16px 10px;
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    align-self: flex-end;
}
@media (max-width: 991.98px) {
  .case-nav-btn {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    margin-bottom: 0;
    min-width: 56px;
  }
  .case-nav-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
}
.case-nav-btn:hover {
    color: var(--navy);
    background: var(--grey-50);
}
@media (max-width: 991.98px) {
  .case-nav-btn:hover { background: var(--brand-ghost); border-color: transparent; color: var(--navy); }
}
.case-nav-btn.active {
    color: var(--brand);
    font-weight: 1000;
    border-bottom: 3px solid var(--brand);
    background:white;
}
@media (max-width: 991.98px) {
  .case-nav-btn.active {
    color: var(--brand);
    font-weight: 600;
    background: var(--brand-ghost);
    border-color: transparent;
    border-bottom-color: transparent;
  }
}
@media (min-width: 992px) {
  .case-nav { margin-top: 0; }
}

/* Larger nav tabs for client portal */
.case-nav-btn-lg {
    font-size: 14px;
    padding: 11px 20px 13px;
}
.case-nav-btn-lg svg {
    width: 16px !important;
    height: 16px !important;
}
@media (max-width: 991.98px) {
    .case-nav-btn-lg {
        padding: 10px 12px;
    }
}

.case-nav-add-dropdown .dropdown-menu {
  z-index: 1080;
  min-width: 11rem;
}

.case-heading-create .dropdown-menu {
  z-index: 1080;
  min-width: 11rem;
}

.case-nav-add-dropdown .dropdown-toggle::after {
  margin-left: 0.15rem;
}

a.msg-cite {
  background: var(--grey-200);
  color: black;
  padding: 0 6px;
  margin: 0 2px;
  border-radius: 5px;
  border: 1px solid #999;
}

/* ══════════════════════════════════════════════════════════════
   3. STATUS STRIP  (AI case summary card)
   ══════════════════════════════════════════════════════════════ */
.status-strip {
  background: white;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 20px;
}
.status-strip > div:first-child { flex: 1; min-width: 0; }
.status-strip-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 575.98px) {
  .status-strip {
    flex-direction: column;
    gap: 10px;
  }
  .status-strip-right { align-items: flex-start; }
}
.status-strip-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: black;
  margin-bottom: 3px;
}
.status-strip-text { font-size: 13.5px; line-height: 1.6; color: var(--navy); }
.status-strip-text strong { color: var(--navy); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   3b. SS-CARD  (client "where things stand" strip)
   ══════════════════════════════════════════════════════════════ */
.ss-card { overflow: hidden; }
.ss-card .card-body { min-height: 0; }

.ss-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 0;
  min-width: 0;
  padding: 22px 24px;
}
.ss-main--on-hold {
  align-items: flex-start;
}
.ss-main--on-hold .ss-icon {
  margin-top: 2px;
}
.ss-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ss-body { min-width: 0; }
.ss-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
  line-height: 1.3;
}
.ss-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--grey-600);
  margin: 0;
}
.ss-status {
  border-left: 1px solid var(--grey-200);
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  flex-shrink: 0;
  min-width: 160px;
}
.ss-status-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 4px;
}
.ss-status-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.15;
}
.ss-status-meta {
  font-size: 12px;
  color: var(--grey-500);
  line-height: 1.55;
  margin-top: 6px;
}
.ss-art {
  width: 148px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.ss-art svg { display: block; width: 100%; height: auto; }

@media (max-width: 991.98px) {
  .ss-art { display: none; }
}
@media (max-width: 575.98px) {
  .ss-card .card-body { flex-direction: column; }
  .ss-main { padding: 16px; }
  .ss-status {
    border-left: none;
    border-top: 1px solid var(--grey-200);
    padding: 14px 16px;
    min-width: 0;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(71,85,105,0.08);
  border: 1px solid rgba(71,85,105,0.18);
  color: var(--grey-600);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status-pill-dot {
  width: 7px; height: 7px;
  background: var(--grey-400);
  border-radius: 50%;
}

/* ══════════════════════════════════════════════════════════════
   3b. CASE PHASE PROGRESS  (overview + ordered litigation phases)
   ══════════════════════════════════════════════════════════════ */
.case-phase-progress__title {
  font-size: 10.5px;
  letter-spacing: 1.1px;
  color: var(--grey-500);
}

.case-phase-track {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
}

.case-phase-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  max-width: 140px;
}

.case-phase-col--compact {
  max-width: none;
  flex: 1 1 0;
  min-width: 0;
}

.case-phase-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s, color 0.2s;
}

.case-phase-node--past {
  background: var(--grey-400);
  color: white;
}

.case-phase-node--current {
  background: var(--brand);
  color: white;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.35), 0 4px 14px rgba(15, 23, 42, 0.35);
  transform: scale(1.06);
}

.case-phase-node--future {
  background: #e2e8f0;
  color: #64748b;
}

.case-phase-label {
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
}

.case-phase-label--past {
  color: var(--grey-500);
}

.case-phase-label--current {
  color: var(--navy);
}

.case-phase-label--future {
  color: #94a3b8;
}

.case-phase-connector {
  flex: 1 1 0;
  min-width: 8px;
  height: 3px;
  margin-top: 16px;
  border-radius: 2px;
  align-self: flex-start;
}

.case-phase-connector--past {
  background: #cbd5e1;
}

.case-phase-connector--future {
  background: #e2e8f0;
}

.case-phase-connector--compact {
  min-width: 4px;
  margin-top: 16px;
}

.case-phase-mobile-ellipsis {
  letter-spacing: 0.02em;
}

.case-phase-progress__edit {
  text-align:right;
}

.case-phase-progress__edit-link {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.case-phase-progress__edit-link:hover {
  color: var(--brand-bright);
  text-decoration: underline;
}

.attorney-strip-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.attorney-strip-btn:hover { background: rgba(255,255,255,0.1); }
.attorney-strip-btn svg { flex-shrink: 0; }
.attorney-btn-text { text-align: left; }
.attorney-btn-name { font-size: 13px; font-weight: 600; color: white; line-height: 1.2; }
.attorney-btn-sub  { font-size: 11px; color: #64748B; }
.attorney-call-icon {
  width: 30px; height: 30px;
  background: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Reusable segmented toggle buttons (e.g., expense type chips). */
.db-segmented-toggle-group {
  gap: 0.5rem;
}
.db-segmented-toggle-btn {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #344054;
  border-radius: 999px;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.db-segmented-toggle-btn:hover:not(:disabled) {
  border-color: #aeb8c4;
  background: #f8fafc;
  color: #1f2937;
}
.db-segmented-toggle-btn:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: 2px;
}
.db-segmented-toggle-btn.active {
  border-color: var(--brand, #0f766e);
  background: rgba(13, 148, 136, 0.12);
  color: var(--brand, #0f766e);
}
.db-segmented-toggle-btn.active:hover:not(:disabled) {
  border-color: var(--brand-bright, #0d9488);
  background: rgba(13, 148, 136, 0.18);
  color: var(--brand-bright, #0d9488);
}
.db-segmented-toggle-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════
   3c. CLIENT GREETING HEADER  (client case portal header)
   ══════════════════════════════════════════════════════════════ */
.client-greeting-header {
    background: white;
    border-bottom: 1px solid var(--grey-200);
    border-left: 5px solid var(--brand);
    padding: 24px 32px 0;
    overflow: visible;
}
.client-view .client-greeting-header {
    border-left:0;
}
.client-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.client-greeting-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.client-greeting-avatar {
  width: 48px; height: 48px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 17px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.client-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Attorney card on client overview */
.atty-card-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 10px;
}
.atty-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--brand-ghost);
    color: var(--brand);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.atty-portrait-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.atty-name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--navy);
    line-height: 1.3;
}
.atty-company {
    font-size: 12.5px;
    color: var(--grey-500);
    margin-top: 2px;
}
.atty-contact {
    padding: 10px 16px 14px;
    border-top: 1px solid var(--grey-100);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.atty-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--grey-600);
    text-decoration: none;
}
.atty-contact-row:hover {
    color: var(--brand);
}
.atty-contact-row svg {
    flex-shrink: 0;
    color: var(--brand);
}
.client-greeting-title {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 800;
  color: var(--navy); letter-spacing: -0.3px;
  line-height: 1.2;
}
.client-greeting-sub {
  font-size: 13px; color: var(--grey-600);
  margin-top: 3px;
}
.client-greeting-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
}
.client-case-meta {
  font-size: 12px; color: var(--grey-400);
  font-family: var(--font-mono);
}
@media (max-width: 767.98px) {
  .client-greeting-header { padding: 20px 16px 0; }
  .client-greeting-right { display: none; }
  .client-greeting-title { font-size: 18px; }
}

/* ══════════════════════════════════════════════════════════════
   2b. CASE BANNER TOPBAR  (breadcrumb / search / actions row)
   ══════════════════════════════════════════════════════════════ */
.case-banner-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--grey-200);
}
.case-banner-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--grey-500);
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}
.case-banner-breadcrumbs a { color: var(--grey-500); text-decoration: none; }
.case-banner-breadcrumbs a:hover { color: var(--navy); text-decoration: underline; }
.breadcrumb-sep { color: var(--grey-300); }
.breadcrumb-case {
  color: var(--grey-600);
  font-weight: 500;
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}
.breadcrumb-current { color: var(--navy); font-weight: 600; white-space: nowrap; }
.case-banner-search { flex: 1; min-width: 0; }
.case-banner-search .form-control {
  border-color: var(--grey-200);
  background: var(--grey-50);
  font-size: 12.5px;
  height: 32px;
  padding: 4px 12px;
  border-radius: 20px;
}
.case-banner-search .form-control:focus {
  background: white;
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}
.case-banner-topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .case-banner-topbar { flex-wrap: wrap; }
  .case-banner-search { order: 3; min-width: 100%; }
  .breadcrumb-case { max-width: 100px; }
}

/* ══════════════════════════════════════════════════════════════
   3b. OVERVIEW SECTION LABELS
   ══════════════════════════════════════════════════════════════ */
.overview-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: black;
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--grey-200);
}

/* ══════════════════════════════════════════════════════════════
   4. ACTION CARDS  (Overview quick-nav grid)
   ══════════════════════════════════════════════════════════════ */
/* Action grid: layout via Bootstrap row/col; this only adds spacing */
.row.action-grid { margin-bottom: 28px; }

/* Mobile / tablet: compact 2-col tiles, descriptions hidden; icon + title in one row */
.action-card {
  background: white;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius);
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
  min-height: 3.25rem;
  position: relative;
  overflow: hidden;
}
 
 
.row.action-grid .action-card.h-100 {
  height: auto !important;
}
.action-card:hover {
  border-color: var(--brand-bright);
  box-shadow: 0 4px 20px rgba(13,148,136,0.1);
  transform: translateY(-1px);
}
.action-card.featured { background: var(--brand-pale); border-color: rgba(13,148,136,0.3); }
.action-card.featured:hover { border-color: var(--brand); }
.action-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.action-icon svg { display: block; flex-shrink: 0; }
.action-card-text {
  min-width: 0;
  width: 100%;
}
.action-title {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--navy);
  margin-bottom: 0;
  line-height: 1.25;
}
.action-card.featured .action-title { color: var(--brand); }
.action-sub {
  font-size: 12px;
  color: var(--grey-400);
  line-height: 1.4;
  display: none;
}

/* Desktop: icon + title on one row; subtitle below */
@media (min-width: 992px) {
  .action-card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding: 14px 16px 16px;
    min-height: 0;
  }
  .row.action-grid .action-card.h-100 {
    height: 100% !important;
  }
  .action-icon {
    font-size: 22px;
    margin-bottom: 0;
    margin-top: 1px;
  }
  .action-card-text {
    flex: 1;
    width: auto;
  }
  .action-title {
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
  }
  .action-sub {
    display: block;
  }
}

/* Compact variant for Log & Notes row */
.action-card--sm { padding: 8px 12px; }
@media (min-width: 992px) {
  .action-card--sm { padding: 10px 14px; align-items: center; }
  .action-card--sm .action-icon { font-size: 18px; margin-top: 0; }
  .action-card--sm .action-title { font-size: 13px; margin-bottom: 2px; }
  .action-card--sm .action-sub { display: block; font-size: 11px; }
}

/* ─── Recommended Next Steps horizontal panel ───────────────────── */
.ns-panel {
  background: var(--brand-ghost);
  border: 1.5px solid var(--brand-pale);
  border-radius: var(--border-radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.ns-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.ns-header-action {
  flex-shrink: 0;
  letter-spacing: 0;
  text-transform: none;
}
.ns-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ns-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.ns-icon {
  color: var(--brand);
}
.ns-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-edge);
  line-height: 1.3;
}
.ns-sub {
  font-size: 11.5px;
  color: var(--grey-400);
  margin-top: 2px;
}
.ns-sep {
  font-size: 11px;
  color: var(--grey-400);
  flex-shrink: 0;
}
.ns-btn {
  flex-shrink: 0;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: var(--font-sans);
  white-space: nowrap;
  margin-left: auto;
}
.ns-btn:hover { background: var(--brand-bright); }

@media (max-width: 767px) {
  .ns-header {
    align-items: flex-start;
  }
  .ns-row {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   5. DETAIL GRID + PANELS  (Overview 3-column layout)
   ══════════════════════════════════════════════════════════════ */
/* Detail grid: layout via Bootstrap row/col; no CSS columns */
.detail-grid {
  /* row/col handle layout */
}

.panel {
  background: white;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 0;
}
.panel-wrapper { margin-bottom: 20px; }
.panel-header {
  padding: 14px 18px 13px;
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--navy); }
.panel-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font-sans);
}
.panel-link:hover { color: var(--brand-bright); }
.panel-header--teal { background: var(--brand-ghost); border-bottom-color: rgba(13,148,136,0.18); }
.panel-header--teal .panel-title { color: var(--brand); }

.alert-teal {
    background: var(--brand-ghost);
    color: var(--brand);
    border-color: var(--brand);
}

/* Activity list */
.activity-list { padding: 8px 0; }
.activity-item {
  padding: 11px 18px;
  display: flex; gap: 12px; align-items: flex-start;
  cursor: pointer; transition: background .1s;
  position: relative;
}
.activity-item::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: var(--grey-100);
}
a.activity-item {
  text-decoration: none;
  color: inherit;
}
.activity-item:last-child::after { display: none; }
.activity-item:hover { background: var(--grey-50); }
.activity-list a.activity-item {
    font-size: 20px;
}
.act-dot {
  width: 9px; height: 9px;
  border-radius: 50%; flex-shrink: 0;
  margin-top: 5px; border: 2px solid white;
}
.act-body { flex: 1; min-width: 0; }
.act-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.act-title {
  font-size: 13px; font-weight: 600; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
@media (max-width: 575.98px) {
  .act-title { white-space: normal; }
}
.act-date  { font-size: 11.5px; color: var(--grey-400); flex-shrink: 0; }
.act-party { font-size: 11.5px; color: var(--grey-600); }
.act-chev  { color: var(--grey-200); flex-shrink: 0; margin-top: 3px; }

.cf-file-icon { font-size: 18px; flex-shrink: 0; width: 20px; text-align: center; margin-top: 2px; }
.cf-meta-row  { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; overflow: hidden; }
.cf-sep       { color: var(--grey-300); }
.cf-dl-icon   { font-size: 12px; color: var(--grey-400); flex-shrink: 0; margin-top: 4px; transition: color .1s; }
a.activity-item:hover .cf-dl-icon { color: var(--brand); }

/* Key facts panel */
.fact-list { padding: 0; }
.fact-item {
  padding: 13px 18px;
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
}
.fact-item::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: var(--grey-100);
}
.fact-item:last-child::after { display: none; }
.fact-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--grey-400);
}
.fact-value { font-size: 13.5px; font-weight: 500; color: var(--navy); line-height: 1.4; }
.fact-value.highlight { color: var(--brand); }
.fact-value.warning   { color: var(--amber); }

/* Overview panels: expand/collapse long lists (Show more under preview; Show less at bottom when expanded) */
.overview-list-toggle-wrap {
  padding: 8px 18px 12px;
  border-top: 1px solid var(--grey-200);
}
.overview-collapsible-block .overview-show-less-wrap { display: none; }
.overview-collapsible-block:has(.overview-collapsible-extra.collapse.show) .overview-show-more-wrap { display: none; }
.overview-collapsible-block:has(.overview-collapsible-extra.collapse.show) .overview-show-less-wrap { display: block; }

/* ══════════════════════════════════════════════════════════════
   6. TYPE BADGES  (document/case type chips)
   ══════════════════════════════════════════════════════════════ */
.type-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 5px;
  white-space: nowrap;
}
/* Case list type variants */
.type-civil               { background: var(--info-pale);    color: var(--info); }
.type-criminal            { background: var(--purple-pale);  color: var(--purple); }
.type-family              { background: #FCE7F3;             color: #9D174D; }
.type-probate             { background: #EDE9FE;             color: #6D28D9; }
.type-traffic             { background: var(--amber-pale);   color: var(--amber); }
.type-housing             { background: var(--amber-pale);   color: var(--amber); }
.type-personal-injury     { background: var(--danger-pale);  color: var(--danger); }
.type-medical-malpractice { background: var(--info-pale);    color: var(--info); }
.type-contract            { background: var(--success-pale); color: var(--success); }

/* Document type badge: solid colored (matches tl-cal month header) */
.type-badge.icon-blue    { background: var(--icon-blue);    color: white; }
.type-badge.icon-orange  { background: var(--icon-orange);  color: white; }
.type-badge.icon-green   { background: var(--icon-green);   color: white; }
.type-badge.icon-purple  { background: var(--icon-purple);  color: white; }
.type-badge.icon-amber   { background: var(--icon-amber);   color: white; }
.type-badge.icon-teal    { background: var(--icon-teal);    color: white; }
.type-badge.icon-emerald { background: var(--icon-emerald); color: white; }
.type-badge.icon-red     { background: var(--icon-red);     color: white; }
.type-badge.icon-slate   { background: var(--icon-slate);   color: white; }
.type-badge.icon-indigo  { background: var(--icon-indigo);  color: white; }
.type-badge.icon-rose    { background: var(--icon-rose);    color: white; }
.type-badge.icon-yellow  { background: var(--icon-yellow);  color: var(--icon-yellow-fg); }

/* ══════════════════════════════════════════════════════════════
   7. CHAT WIDGET  (floating AI assistant)
   ══════════════════════════════════════════════════════════════ */
.chat-widget {
  position: fixed;
  bottom: 40px;
  right: 20px;
  z-index: 999;
  font-family: var(--font-sans);
}
.chat-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
  transition: background .2s, box-shadow .2s, transform .15s;
  font-size: 14px;
  font-weight: 600;
}
.chat-fab:hover {
  background: var(--brand-bright);
  box-shadow: 0 6px 24px rgba(13, 148, 136, 0.45);
  transform: translateY(-1px);
}
.chat-fab svg { flex-shrink: 0; }
.chat-fab-label { white-space: nowrap; }
@media (max-width: 575.98px) {
  .chat-fab-label { display: none; }
  .chat-fab { padding: 14px; }
}
.chat-widget-panel {
  display: none;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 600px;
  max-width: calc(100vw - 40px);
  /* Tall as possible up to 800px; shorter viewports shrink — flex scroll is on .chat-widget-body */
  height: min(800px, calc(100dvh - 40px - env(safe-area-inset-bottom, 0px)));
  max-height: min(800px, calc(100dvh - 40px - env(safe-area-inset-bottom, 0px)));
  background: white;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  min-height: 0;
}
.chat-widget--open .chat-fab { display: none; }
.client-view .chat-fab { display: none; }
.chat-widget--open .chat-widget-panel {
  display: flex;
  flex-direction: column;
}
.chat-widget-panel .chat-head {
  flex-shrink: 0;
  position: relative;
}
.chat-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.3); }
/* Scroll messages + chips here so header/close and input stay in view on short viewports */
.chat-widget-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.chat-widget-body .chat-msgs {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}
.chat-widget-body .chat-sugs {
  border-bottom: none;
}
.chat-head {
  background: var(--brand);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.chat-head-top {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
}
.chat-head-focused {
  background: #999;
  padding: 13px 16px;
}
.chat-head-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.15);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-head-info  { flex: 1; }
.chat-head-title { font-size: 14px; font-weight: 600; color: white; flex:1; }
.chat-head-sub   { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 1px; }
.chat-head-focused {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.chat-focused-label { font-size: 11px; color: rgba(255,255,255,0.8); }
.chat-focused-title { font-size: 12px; font-weight: 500; color: white; }
.chat-focused-clear {
  background: rgba(255,255,255,0.2); border: none; color: white;
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center;
}
.chat-focused-clear:hover { background: rgba(255,255,255,0.35); }
.chat-online {
  width: 8px; height: 8px;
  background: #4ADE80; border-radius: 50%;
  border: 2px solid var(--brand);
  animation: pulse 2s infinite;
}

.chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 11px;
  background: #FAFCFF; min-height: 200px;
}
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--grey-200); border-radius: 2px; }

.msg { display: flex; gap: 8px; animation: fadeUp .25s ease both; }
.msg-user { flex-direction: row-reverse; }
.m-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.msg-ai   .m-av { background: var(--brand-pale); color: var(--brand); }
.msg-user .m-av { background: var(--navy);  color: white; }

.m-bub {
  max-width: 84%;
  padding: 9px 13px;
  font-size: 13px; line-height: 1.55;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.msg-ai .m-bub {
    background: white;
    border: 1.5px solid var(--grey-200);
    border-radius: 4px 12px 12px 12px;
    color: var(--navy);
    white-space: pre-wrap;
}
.msg-user .m-bub { background: var(--brand); color: white; border-radius: 12px 4px 12px 12px; }

.m-referral {
  margin-top: 8px; padding: 8px 10px;
  background: var(--amber-pale);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: 7px;
  font-size: 11.5px; color: var(--amber); line-height: 1.4;
  display: flex; gap: 5px;
}

/* Typing indicator */
.typing-dots { display: flex; gap: 4px; padding: 3px 0; }
.typing-dot {
  width: 6px; height: 6px;
  background: var(--grey-400); border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

/* Suggested prompts */
.chat-sugs {
  padding: 10px 14px;
  border-bottom: 1px solid var(--grey-200);
  background: #FAFCFF; flex-shrink: 0;
}
.chat-sugs-label {
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--grey-400); margin-bottom: 6px;
}
.sug-chips { display: flex; flex-direction: column; gap: 5px; }
.sug-chip {
  font-size: 12px; font-family: var(--font-sans);
  padding: 7px 11px;
  background: white; border: 1.5px solid var(--grey-200);
  border-radius: 8px; cursor: pointer;
  text-align: left; color: var(--navy);
  transition: all .15s;
}
.sug-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }

/* Chat input row */
.chat-input-row {
  padding: 11px 13px;
  background: white;
  border-top: 1px solid var(--grey-200);
  display: flex; gap: 8px; align-items: flex-end;
  flex-shrink: 0;
}
.chat-ta {
  flex: 1;
  border: 1.5px solid var(--grey-200);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 13px; font-family: var(--font-sans);
  resize: none; outline: none;
  line-height: 1.4; max-height: 90px;
  color: var(--navy); background: var(--grey-50);
  transition: border-color .15s, background .15s;
}
.chat-ta::placeholder { color: var(--grey-400); }
.chat-ta:focus { border-color: var(--brand); background: white; }
.chat-send {
  width: 36px; height: 36px;
  background: var(--brand); border: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, transform .1s;
}
.chat-send:hover  { background: var(--brand-bright); }
.chat-send:active { transform: scale(0.94); }
.chat-disclaimer {
  padding: 8px 14px;
  font-size: 10.5px; color: var(--grey-400);
  text-align: center;
  background: var(--grey-50);
  border-top: 1px solid var(--grey-200);
  line-height: 1.4; flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   8. TIMELINE PANE
   ══════════════════════════════════════════════════════════════ */
.tl-layout {
  display: block;
  padding-top: 24px;
  overflow: visible;
}
.tl-controls {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap:wrap;
}
.tl-title { font-size: 18px; color: var(--navy); }

.filter-row  { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-events-toggle {
  margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--grey-200);
}
.tl-events-toggle .form-check-label { font-size: 12px; color: var(--navy-edge); cursor: pointer; }
.filter-chip {
  font-size: 12px; font-weight: 500;
  padding: 5px 13px; border-radius: 20px;
  border: 1.5px solid var(--grey-200);
  background: white; color: var(--navy-edge);
  cursor: pointer; font-family: var(--font-sans);
  transition: all .15s;
}
.filter-chip:hover  { border-color: var(--brand); color: var(--brand); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: white; }
/* Document-type chips carry --chip-color and --chip-bg via inline style */
.filter-chip[style] { background: var(--chip-bg); color: var(--chip-color); border-color: var(--chip-bg); }
.filter-chip[style]:hover { background: var(--chip-bg); color: var(--chip-color); border-color: var(--chip-color); }
.filter-chip[style].active { background: var(--chip-color); color: white; border-color: var(--chip-color); }

.legend { display: flex; gap: 16px; margin-bottom: 16px; }
.legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--grey-400);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.timeline {
  position: relative;
  padding-left: 28px;
  overflow: visible;
}
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--grey-200);
  border-radius: 2px;
}
.timeline.timeline--empty {
  padding-left: 0;
}
.timeline.timeline--empty::before {
  display: none;
}

.year-div {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 10px -28px;
}
.year-div span {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--grey-400);
  white-space: nowrap; z-index: 2;
  background: var(--grey-50);
}
.year-div::after { content: ''; flex: 1; height: 1px; background: var(--grey-100); }

.t-entry {
  position: relative;
  margin-bottom: 8px;
  overflow: visible;
  animation: fadeUp .3s ease both;
}
/* Open filing-card dropdown must stack above the next timeline entry */
.t-entry:has(.dropdown-menu.show) {
  z-index: 1000;
}
.t-entry:has(.dropdown-menu.show) .dropdown-menu {
  z-index: 1001;
}
.t-entry:nth-child(1) { animation-delay: .04s }
.t-entry:nth-child(2) { animation-delay: .08s }
.t-entry:nth-child(3) { animation-delay: .12s }
.t-entry:nth-child(4) { animation-delay: .16s }
.t-entry:nth-child(5) { animation-delay: .20s }
.t-entry:nth-child(6) { animation-delay: .24s }
.t-entry:nth-child(7) { animation-delay: .28s }

.t-dot {
  position: absolute; left: -24px; top: 16px;
  width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid white;
  background: gray; box-shadow: 0 0 0 1.5px gray;
}
.dot-court,    .party-pip-court    { background: var(--navy-edge);  box-shadow: 0 0 0 1.5px var(--navy-edge); }
.dot-other,    .party-pip-other    { background: var(--purple); box-shadow: 0 0 0 1.5px var(--purple); }
/* First/second party colors: teal + blue so amber stays clearly tied to calendar events */
.dot-party-first,  .dot-plaintiff,  .party-pip-party-first,  .party-pip-plaintiff  { background: var(--brand);  box-shadow: 0 0 0 1.5px var(--brand); }
.dot-party-second, .dot-defendant, .party-pip-party-second, .party-pip-defendant { background: var(--info);  box-shadow: 0 0 0 1.5px var(--info); }
.dot-event      { background: var(--amber); box-shadow: 0 0 0 1.5px var(--amber); }

/* Event entries: contrasting color, indented */
.t-entry-event { margin-left: 20px; }
.t-entry-event .t-dot { left: -44px; }
.t-card-event {
  background: var(--amber-pale);
  border-color: rgba(217,119,6,0.35);
  cursor: pointer;
}
.t-card-event:hover { border-color: var(--amber); box-shadow: 0 2px 14px rgba(217,119,6,0.12); }
.t-card-event.expanded { border-color: var(--amber); box-shadow: 0 2px 18px rgba(217,119,6,0.13); }
.tb-event { background: var(--amber); color: white; }
.t-event-desc { font-weight: 400; color: var(--navy-edge); }
.t-event-details { font-size: 12px; color: var(--grey-400); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.t-event-link { margin-top: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.t-event-source { font-size: 12px; color: var(--brand-bright); text-decoration: none; }
.t-event-source:hover { color: var(--brand); text-decoration: underline; }
.t-event-calendar { font-size: 12px; color: var(--grey-400); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.t-event-calendar-label { color: var(--grey-400); }
.t-event-calendar-sep { color: var(--grey-400); user-select: none; }
.t-calendar-link { color: var(--brand-bright); text-decoration: none; }
.t-calendar-link:hover { color: var(--brand); text-decoration: underline; }

/* ─── Calendar-gutter timeline variant (client view) ──────────────── */
.timeline--cal {
  padding-left: 88px;
}
.timeline--cal::before {
  left: 68px;
}
.timeline--cal .year-div {
  margin-left: -88px;
}
/* All dots are neutral grey on the client calendar timeline */
.timeline--cal .t-dot {
  background: var(--grey-400);
  box-shadow: 0 0 0 1.5px var(--grey-400);
}
/* Badge never shown — the tl-cal card carries the date; badge colors carried by chips */
.timeline--cal .type-badge { display: none; }
/* On desktop the full t-meta row is redundant (tl-cal shows the date) */
@media (min-width: 768px) {
  .timeline--cal .t-meta { display: none; }
}

/* Date card widget in left gutter */
.tl-cal {
  position: absolute;
  left: -93px;
  top: 6px;
  width: 54px;
  border-radius: 8px;
  border: 1.5px solid var(--grey-200);
  overflow: hidden;
  background: white !important;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.tl-cal-month {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--brand);
  color: white;
  padding: 3px 0;
}
.tl-cal-day {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-edge);
  line-height: 1;
  padding: 3px 0 1px;
}
.tl-cal-year {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--grey-400);
  padding-bottom: 4px;
}

/* Month header color matches document type */
.tl-cal.icon-blue    .tl-cal-month { background: var(--icon-blue); }
.tl-cal.icon-orange  .tl-cal-month { background: var(--icon-orange); }
.tl-cal.icon-green   .tl-cal-month { background: var(--icon-green); }
.tl-cal.icon-purple  .tl-cal-month { background: var(--icon-purple); }
.tl-cal.icon-amber   .tl-cal-month { background: var(--icon-amber); }
.tl-cal.icon-teal    .tl-cal-month { background: var(--icon-teal); }
.tl-cal.icon-emerald .tl-cal-month { background: var(--icon-emerald); }
.tl-cal.icon-red     .tl-cal-month { background: var(--icon-red); }
.tl-cal.icon-slate   .tl-cal-month { background: var(--icon-slate); }
.tl-cal.icon-indigo  .tl-cal-month { background: var(--icon-indigo); }
.tl-cal.icon-rose    .tl-cal-month { background: var(--icon-rose); }
.tl-cal.icon-yellow  .tl-cal-month { background: var(--icon-yellow); color: var(--icon-yellow-fg); }

/* Event entries are indented 20px — shift the cal card left to match normal alignment */
.timeline--cal .t-entry-event .tl-cal {
  left: -114px;
}

@media (max-width: 767px) {
  .timeline--cal {
    padding-left: 0;
  }
  .timeline--cal::before {
    display: none;
  }
  .timeline--cal .t-dot {
    display: none;
  }
  .tl-cal {
    display: none;
  }
}

/* ─── Flat-list timeline variant (client view) ────────────────────
   White card shell; spine line runs through centered icon tiles (no dots).
*/
.timeline-flat-card {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: var(--border-radius);
  padding: 20px 24px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.timeline--flat {
  position: relative;
  padding-left: 0;
  overflow: visible;
}
.timeline--flat::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--grey-200);
  border-radius: 0;
  z-index: 0;
}
.timeline--flat .year-div {
    margin-left: -13px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 5px;
    background: white;
    z-index: 4;
    padding-bottom: 4px;
    position: relative;
}
.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  padding: 18px 0;
  animation: fadeUp .3s ease both;
  z-index: 1;
}
.tl-row:last-child {
  border-bottom: 0;
}
.tl-track {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2px;
  position: relative;
  z-index: 1;
}
.tl-icon {
  width: 40px;
  height: 40px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  font-size:20px;
  box-shadow: 0 0 0 2px #fff;
}
.tl-icon.icon-blue    { background: var(--icon-blue-bg);    color: var(--icon-blue); }
.tl-icon.icon-orange  { background: var(--icon-orange-bg);  color: var(--icon-orange); }
.tl-icon.icon-green   { background: var(--icon-green-bg);   color: var(--icon-green); }
.tl-icon.icon-purple  { background: var(--icon-purple-bg);  color: var(--icon-purple); }
.tl-icon.icon-amber   { background: var(--icon-amber-bg);   color: var(--icon-amber); }
.tl-icon.icon-teal    { background: var(--icon-teal-bg);    color: var(--icon-teal); }
.tl-icon.icon-emerald { background: var(--icon-emerald-bg); color: var(--icon-emerald); }
.tl-icon.icon-red     { background: var(--icon-red-bg);     color: var(--icon-red); }
.tl-icon.icon-slate   { background: var(--icon-slate-bg);   color: var(--icon-slate); }
.tl-icon.icon-indigo  { background: var(--icon-indigo-bg);  color: var(--icon-indigo); }
.tl-icon.icon-rose    { background: var(--icon-rose-bg);    color: var(--icon-rose); }
.tl-icon.icon-yellow  { background: var(--icon-yellow-bg);  color: var(--icon-yellow-fg); }

.tl-body {
  min-width: 0;
}
.tl-row .tl-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}
.tl-row .tl-date {
  font-size: 12.5px;
  color: var(--grey-400);
  margin-top: 2px;
}
.tl-row .tl-summary {
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
  margin: 10px 0 0;
}
.tl-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--grey-400);
}
.tl-actions .tl-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--grey-500, #64748b);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: color .15s;
}
.tl-actions .tl-action:hover {
  color: var(--navy);
}
.tl-actions .tl-action i {
  font-size: 13px;
}
.tl-actions .tl-sep {
  color: var(--grey-200);
  user-select: none;
}
.tl-actions .tl-spacer {
  flex: 1;
}
.timeline-flat-card .tl-actions .btn-ask.tl-ask {
  color: var(--icon-purple);
  border-color: color-mix(in srgb, var(--icon-purple) 42%, var(--grey-200));
}
.timeline-flat-card .tl-actions .btn-ask.tl-ask:hover {
  color: #fff;
  background: var(--icon-purple);
  border-color: var(--icon-purple);
}

@media (max-width: 600px) {
  .timeline-flat-card {
    padding: 16px 16px 8px;
  }
  .timeline--flat::before {
    left: 21px;
  }
  .timeline--flat .year-div {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .tl-row {
    grid-template-columns: 44px 1fr;
    gap: 12px;
  }
  .tl-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .tl-actions {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .tl-actions .tl-spacer {
    display: none;
  }
}

.t-card {
  background: white;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius);
  padding: 13px 15px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  overflow: visible;
}

/* Timeline filing cards: role-tinted border/shadow (spine is neutral gray above) */
.timeline .t-card.t-card--tl-court {
  border-color: rgba(51, 65, 85, 0.32);
}
.timeline .t-card.t-card--tl-court:hover {
  border-color: var(--navy-edge);
  box-shadow: 0 2px 14px rgba(51, 65, 85, 0.12);
}
.timeline .t-card.t-card--tl-court.expanded {
  border-color: var(--navy-edge);
  box-shadow: 0 2px 18px rgba(51, 65, 85, 0.14);
}
.timeline .t-card.t-card--tl-party-first {
  border-color: rgba(13, 148, 136, 0.35);
}
.timeline .t-card.t-card--tl-party-first:hover {
  border-color: var(--brand-bright);
  box-shadow: 0 2px 14px rgba(13, 148, 136, 0.14);
}
.timeline .t-card.t-card--tl-party-first.expanded {
  border-color: var(--brand);
  box-shadow: 0 2px 18px rgba(13, 148, 136, 0.16);
}
.timeline .t-card.t-card--tl-party-second {
  border-color: rgba(29, 78, 216, 0.28);
}
.timeline .t-card.t-card--tl-party-second:hover {
  border-color: var(--info);
  box-shadow: 0 2px 14px rgba(29, 78, 216, 0.14);
}
.timeline .t-card.t-card--tl-party-second.expanded {
  border-color: var(--info);
  box-shadow: 0 2px 18px rgba(29, 78, 216, 0.18);
}
.timeline .t-card.t-card--tl-other {
  border-color: rgba(126, 34, 206, 0.3);
}
.timeline .t-card.t-card--tl-other:hover {
  border-color: var(--purple);
  box-shadow: 0 2px 14px rgba(126, 34, 206, 0.16);
}
.timeline .t-card.t-card--tl-other.expanded {
  border-color: var(--purple);
  box-shadow: 0 2px 18px rgba(126, 34, 206, 0.2);
}
.timeline .t-card.t-card--tl-doc-type {
  border-color: color-mix(in srgb, var(--tl-card-color) 35%, transparent);
}
.timeline .t-card.t-card--tl-doc-type:hover {
  border-color: var(--tl-card-color);
  box-shadow: 0 2px 14px color-mix(in srgb, var(--tl-card-color) 14%, transparent);
}
.timeline .t-card.t-card--tl-doc-type.expanded {
  border-color: var(--tl-card-color);
  box-shadow: 0 2px 18px color-mix(in srgb, var(--tl-card-color) 18%, transparent);
}

.legend-dot-tl-other { background: var(--purple); }

.t-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.t-left { flex: 1; min-width: 0; }
.t-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.t-title { font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.35; margin-bottom: 3px; }
.t-party { font-size: 12px; color: var(--grey-400); display: flex; align-items: center; gap: 4px; }
.party-pip { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.t-date { font-size: 11.5px; color: var(--grey-400); }
.t-chev { color: var(--grey-400); flex-shrink: 0; transition: transform .2s; margin-top: 2px; }
.t-card.expanded .t-chev { transform: rotate(180deg); }

.t-body { display: none; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--grey-200); }
.t-card.expanded .t-body { display: block; }
.t-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 10px;
}
.t-primary-actions .t-action-subtle {
  color: var(--navy-edge);
  background-color: var(--grey-50);
  border: 1px solid var(--grey-200);
}
.t-primary-actions .t-action-subtle:hover {
  background-color: var(--grey-200);
  color: var(--navy);
}
.t-summary { font-size: 13.5px; line-height: 1.65; color: #334155; margin-bottom: 11px; }
.t-actions { display: flex; justify-content: space-between; gap: 7px; flex-wrap: wrap; }

.t-actions-wrap {
    display:flex;
    gap:0.5rem;
    flex-wrap:wrap;
}
@media (max-width: 575.98px) {
    .t-actions-wrap {
        display: grid !important;
        width:100%;
        grid-template-columns: 1fr 1fr;
    }
}

/* Small inline buttons used in timeline/docs */
.btn svg, .btn-sm svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn-doc { background: var(--navy); color: white; }
.btn-doc:hover { background: var(--navy-mid); color: white; }
.btn-ask {
  background: var(--amber-pale); color: var(--amber);
  border: 1.5px solid rgba(217,119,6,0.2);
}
.btn-ask:hover { background: #FDE68A; }
.dropdown-item.btn-ask {
  background: transparent;
  color: inherit;
  border: none;
}
.dropdown-item.btn-ask:hover,
.dropdown-item.btn-ask:focus {
  background-color: var(--bs-dropdown-link-hover-bg, #e9ecef);
  color: var(--bs-dropdown-link-hover-color, #212529);
}
.dropdown-item.btn-ask:active {
  background-color: var(--bs-dropdown-link-active-bg, #0d6efd);
  color: var(--bs-dropdown-link-active-color, #fff);
}

/* ══════════════════════════════════════════════════════════════
   9. DOCUMENTS PANE
   ══════════════════════════════════════════════════════════════ */
.docs-layout {
  padding-top: 24px;
  align-items: start;
  overflow: visible;
}
.docs-main {
  overflow: visible;
  min-width: 0;
}

.docs-sidebar-toggle {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-bright);
  border: none;
  background: none;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.15s ease, transform 0.25s ease;
}
.docs-sidebar-toggle:hover {
  color: var(--brand);
}
.docs-sidebar-toggle .docs-sidebar-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
@media (min-width: 768px) {
  .docs-layout.docs-sidebar-collapsed .docs-sidebar-col {
    flex: 0 0 2.75rem !important;
    max-width: 2.75rem !important;
    transition: flex-basis 0.25s ease, max-width 0.25s ease;
  }
  .docs-layout.docs-sidebar-collapsed .docs-sidebar-col .docs-sidebar {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, height 0.25s ease;
  }
  .docs-layout.docs-sidebar-collapsed .docs-sidebar-col .docs-sidebar-toggle .docs-sidebar-chevron {
    transform: rotate(180deg);
  }
  .docs-layout.docs-sidebar-collapsed .docs-sidebar-col .docs-sidebar-toggle .docs-sidebar-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .docs-layout.docs-sidebar-collapsed .docs-main {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .docs-sidebar-col,
  .docs-main {
    transition: flex-basis 0.25s ease, max-width 0.25s ease, width 0.25s ease;
  }
  .docs-sidebar-col {
    max-width: 280px;
    position: relative;
  }
}

/* Sidebar */
.docs-sidebar { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 12px; }
.docs-search-wrap { position: relative; }
.docs-search {
  width: 100%;
  padding: 9px 13px 9px 36px;
  border: 1.5px solid var(--grey-200); border-radius: 10px;
  font-size: 13px; font-family: var(--font-sans);
  color: var(--navy); background: white;
  outline: none; transition: border-color .15s;
}
.docs-search::placeholder { color: var(--grey-400); }
.docs-search:focus { border-color: var(--brand); }
.docs-search-icon {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400); pointer-events: none;
}

.docs-filter-panel {
  background: white; border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius); overflow: hidden;
}
.docs-filter-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--grey-200);
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--grey-400);
}
.docs-filter-list { padding: 6px 0; }
.docs-filter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  font-size: 13px; color: var(--navy-edge);
  cursor: pointer; transition: background .1s, color .1s;
  border-left: 3px solid transparent;
  font-family: var(--font-sans);
}
.docs-filter-item:hover  { background: var(--grey-50); color: var(--navy); }
.docs-filter-item.active {
  background: var(--brand-pale); color: var(--brand);
  border-left-color: var(--brand); font-weight: 600;
}
.docs-filter-count {
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
  background: var(--grey-200); color: var(--grey-500);
}
.docs-filter-item.active .docs-filter-count { background: rgba(13,148,136,0.15); color: var(--brand); }

.docs-stat-card {
  background: var(--brand-pale); border-radius: var(--border-radius);
  padding: 16px; display: flex; flex-direction: column; gap: 4px;
}
.docs-mobile-filters .docs-search-wrap { margin-bottom: 0; }
.docs-mobile-filters .form-select { font-size: 13px; }
.docs-stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #475569; }
.docs-stat-val   { font-family: var(--font-serif); font-size: 22px; line-height: 1.1; }
.docs-stat-sub   { font-size: 11.5px; color: #64748B; }

/* Docs main area */
.docs-toolbar {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
@media (max-width: 575.98px) {
  .docs-toolbar { flex-direction: column; align-items: stretch; }
  .docs-toolbar-left { flex-wrap: wrap; }
  .docs-toolbar-right {
    width: 100%;
    justify-content: stretch;
  }
  .docs-toolbar-search { max-width: none; }
}
.docs-toolbar-left  { display: flex; align-items: center; gap: 10px; }
.docs-toolbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.docs-toolbar-search {
  width: 100%;
  max-width: min(100%, 20rem);
}
.docs-toolbar-title { font-family: var(--font-serif); font-size: 18px; color: var(--navy); }
.docs-count-pill {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 10px;
  background: var(--grey-200); color: var(--grey-400);
}
/* Year group headers */
.docs-year-group { margin-bottom: 20px; }
.docs-year-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.docs-year-label span {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--grey-400); white-space: nowrap;
}
.docs-year-label::after { content: ''; flex: 1; height: 1px; background: var(--grey-200); }

.doc-comments-thread { max-height: 320px; overflow-y: auto; }
.doc-comments-item { border-bottom: 1px solid var(--grey-200); padding: 0.65rem 0; }
.doc-comments-item:last-child { border-bottom: 0; }
.doc-comments-header { font-size: 0.85rem; color: var(--grey-600); }
.doc-comments-body { margin-top: 0.35rem; white-space: pre-wrap; word-break: break-word; }
.t-actions-wrap .btn-doc-comments,
.dropdown-menu .btn-doc-comments { flex-shrink: 0; }

.docs-explorer-wrap {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius);
  overflow: visible;
  background: white;
}
.docs-explorer-table {
  width: 100%;
}
.docs-explorer-table thead th {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey-400);
  border-bottom: 1px solid var(--grey-200);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 6;
  background-color: var(--bs-secondary-bg, #e9ecef);
  box-shadow: 0 1px 0 var(--grey-200);
}
.docs-explorer-table tbody td { vertical-align: middle; font-size: 13px; }
.docs-explorer-table .btn-doc-comments.btn-link {
  font-size: inherit;
  vertical-align: baseline;
}
.docs-col-title {
  max-width: 18rem;
}
.docs-col-filename {
  max-width: 22rem;
}
.docs-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.docs-filename-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.doc-table-row { cursor: pointer; transition: background-color .12s ease; }
.doc-table-row:hover { background: var(--grey-50); }
.doc-table-detail { display: none; }
.doc-table-row.expanded + .doc-table-detail { display: table-row; }

.doc-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 17px;
}
.doc-icon-order     { background: #EFF6FF; }
.doc-icon-motion    { background: #FFF7ED; }
.doc-icon-notice    { background: #F0FDF4; }
.doc-icon-complaint { background: #FDF4FF; }
.doc-icon-answer    { background: #FFFBEB; }
.doc-icon-other     { background: var(--grey-50); }

.btn-related { background: var(--brand-ghost); color: var(--brand-bright); border: 1.5px solid var(--brand-pale); }
.btn-related:hover { background: var(--brand-pale); color: var(--navy); }

/* New-docs notification banner */
.docs-new-banner {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.docs-new-icon {
  width: 38px; height: 38px;
  background: rgba(20,184,166,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--brand-bright);
}
.docs-new-text  { flex: 1; }
.docs-new-title { font-size: 13.5px; font-weight: 600; color: white; margin-bottom: 2px; }
.docs-new-sub   { font-size: 12px; color: #64748B; }
.docs-new-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 11px; border-radius: 12px;
  background: var(--brand); color: white; white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   10. TEAL PULSE DOT  (navbar brand)
   ══════════════════════════════════════════════════════════════ */
.teal-dot {
  width: 8px; height: 8px;
  background: var(--brand-bright);
  border-radius: 50%;
  animation: pulse 2.5s infinite;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════════
   11. FOOTER
   ══════════════════════════════════════════════════════════════ */
.db-footer {
  background-color: var(--navy);
  border-top: 1px solid var(--navy-edge);
  font-family: var(--font-sans);
  color: var(--grey-500);
  font-size: .8125rem; line-height: 1.6;
  margin-top: 60px;
  position: sticky; top: 100vh;
}
.db-footer__upper {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 2rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--navy-edge);
}
.db-footer__brand { display: flex; align-items: center; gap: .625rem; text-decoration: none; }
.db-footer__logo-mark { display: flex; align-items: center; flex-shrink: 0; }
.db-footer__logo-mark img { height: 1.3em; display: block; }
.db-footer__brand-name { font-family: var(--font-serif); font-size: 1rem; color: var(--white); }
.db-footer__case-pill {
  display: flex; align-items: center; gap: .5rem;
  background: var(--navy-mid); border: 1px solid var(--navy-edge);
  border-radius: 999px; padding: .3125rem .875rem;
  font-size: .75rem; color: var(--grey-500); white-space: nowrap;
}
.db-footer__case-pill span.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-bright); flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(20,184,166,0.18);
}
.db-footer__case-pill strong { color: var(--brand-pale); font-weight: 500; }
.db-footer__ssl {
  display: flex; align-items: center; gap: .375rem;
  font-size: .6875rem; color: var(--grey-600);
}
.db-footer__ssl svg {
  width: 12px; height: 12px; stroke: var(--brand); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.db-footer__lower {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem 2rem; padding: .875rem 2rem;
}
.db-footer__copy { color: var(--grey-600); font-size: .75rem; }
.db-footer__copy a { color: var(--brand-bright); text-decoration: none; transition: color .15s; }
.db-footer__copy a:hover { color: var(--white); }
.db-footer__nav {
  display: flex; align-items: center; gap: .25rem; flex-wrap: wrap;
}
.db-footer__nav a {
  color: var(--grey-600); text-decoration: none;
  font-size: .75rem; padding: .25rem .5rem; border-radius: 4px;
  transition: color .15s, background .15s;
}
.db-footer__nav a:hover { color: var(--white); background: var(--navy-mid); }
.db-footer__nav-sep { color: var(--navy-edge); user-select: none; font-size: .6875rem; }
.db-footer__disclaimer {
  width: 100%; padding: .75rem 2rem;
  border-top: 1px solid var(--navy-mid);
  font-size: .6875rem; color: var(--grey-600);
  line-height: 1.55; font-style: italic;
}

/* ══════════════════════════════════════════════════════════════
   12. CUSTOM MODAL  (db-modal system, different from BS modal)
   ══════════════════════════════════════════════════════════════ */
.db-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,16,30,0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.db-modal-overlay.is-open { opacity: 1; visibility: visible; }

.db-modal {
  background: white; border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto; overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 32px rgba(10,16,30,0.28), 0 32px 64px rgba(10,16,30,0.18);
  position: relative;
  transform: translateY(18px) scale(0.97);
  transition: transform .25s cubic-bezier(0.34,1.36,0.64,1);
}
.db-modal-overlay.is-open .db-modal { transform: translateY(0) scale(1); }
.db-modal-sm { max-width: 400px; }
.db-modal-lg { max-width: 680px; }
.db-modal-xl { max-width: 860px; }

.db-modal-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
  padding: 24px 28px 0;
}
.db-modal-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-bottom: 4px;
}
.db-modal-titles { flex: 1; }
.db-modal-overline {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--brand-bright); margin-bottom: 5px;
}
.db-modal-title { font-family: var(--font-serif); font-size: 21px; color: var(--navy); line-height: 1.25; margin: 0; }
.db-modal-close {
  width: 32px; height: 32px;
  border: 1.5px solid var(--grey-200); border-radius: 8px;
  background: white; color: var(--grey-500); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s; margin-top: -2px;
}
.db-modal-close:hover { border-color: var(--grey-400); color: var(--navy); background: var(--grey-50); }
.db-modal-close svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.db-modal-body  { padding: 16px 28px 24px; font-size: 14px; line-height: 1.7; color: var(--grey-600); }
.db-modal-body p + p { margin-top: 12px; }
.db-modal-body strong { color: var(--navy); font-weight: 600; }
.db-modal-divider { height: 1px; background: var(--grey-200); margin: 0 28px; }
.db-modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 18px 28px 24px; flex-wrap: wrap;
}
.db-modal-footer--between { justify-content: space-between; }

/* Modal buttons */
.db-btn {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  padding: 10px 20px; border-radius: 9px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; text-decoration: none;
}
.db-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.db-btn--primary      { background: var(--brand);  color: white;         border-color: var(--brand); }
.db-btn--primary:hover{ background: #0b8077;      border-color: #0b8077; }
.db-btn--ghost        { background: white;         color: var(--navy);   border-color: var(--grey-200); }
.db-btn--ghost:hover  { border-color: var(--grey-400); color: var(--navy); }
.db-btn--danger       { background: var(--danger);   color: white;         border-color: var(--danger); }
.db-btn--danger:hover { background: #b91c1c;      border-color: #b91c1c; }
.db-btn--danger-ghost { background: white; color: var(--danger); border-color: #FECACA; }
.db-btn--danger-ghost:hover { background: #FEF2F2; border-color: #FCA5A5; }

/* Modal form fields */
.db-field        { margin-bottom: 16px; }
.db-field:last-child { margin-bottom: 0; }
.db-label        { display: block; font-size: 12px; font-weight: 600; color: var(--navy-edge); margin-bottom: 6px; letter-spacing: .2px; }
.db-hint         { font-size: 11.5px; color: var(--grey-500); margin-top: 5px; }
.db-input, .db-select, .db-textarea {
  font-family: var(--font-sans); font-size: 13.5px; width: 100%;
  background: var(--grey-50); border: 1.5px solid var(--grey-200);
  border-radius: 9px; padding: 10px 13px;
  color: var(--navy); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.db-input::placeholder, .db-textarea::placeholder { color: var(--grey-500); }
.db-input:focus, .db-select:focus, .db-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
  background: white;
}
.db-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.db-textarea   { resize: vertical; min-height: 90px; }

.db-callout { border-radius: 9px; padding: 12px 16px; font-size: 13px; line-height: 1.6; margin-bottom: 18px; display: flex; gap: 10px; align-items: flex-start; }
.db-callout svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 1px; }
.db-callout--warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.db-callout--danger  { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.db-callout--info    { background: var(--brand-ghost); color: #0F4C45; border: 1px solid var(--brand-pale); }

/* Related documents modal list */
.related-docs-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (max-width: 480px) {
  .related-docs-list { grid-template-columns: 1fr; }
}
.related-doc-item {
  display: grid; grid-template-columns: minmax(11em, max-content) 1fr; gap: 12px; padding: 12px 14px;
  background: var(--grey-50); border-radius: 12px; border: 1px solid var(--grey-200);
  cursor: pointer; transition: background .15s, border-color .15s;
  text-decoration: none; color: inherit; align-items: start;
  margin-bottom:8px;
}
.related-doc-item:hover { background: var(--brand-ghost); border-color: var(--brand-pale); }
.related-doc-item .conn-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 4px 8px; border-radius: 6px;
  background: var(--brand-pale); color: var(--brand-bright); 
  width:200px;
}
.related-doc-item .conn-badge.conn-target { background: var(--navy-edge); color: var(--white); }
.related-doc-item .related-doc-body { min-width: 0; }
.related-doc-item .related-doc-title { font-weight: 600; color: var(--navy); line-height: 1.3; }
.related-doc-item .related-doc-meta { font-size: 12px; color: var(--grey-600); margin-top: 4px; }

@media (max-width: 480px) {
  .db-modal { border-radius: 14px; max-height: calc(100vh - 24px); }
  .db-modal-header { padding: 20px 20px 0; }
  .db-modal-body, .db-modal-footer { padding: 14px 20px 20px; }
  .db-modal-divider { margin: 0 20px; }
  .db-modal-footer { flex-direction: column-reverse; }
  .db-btn { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════
   13. TOAST SYSTEM
   ══════════════════════════════════════════════════════════════ */
#db-toast-container {
  position: fixed; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
  bottom: 24px; right: 24px; align-items: flex-end;
}
#db-toast-container.pos-top-right    { top: 24px; right: 24px; bottom: auto; left: auto; align-items: flex-end; flex-direction: column; }
#db-toast-container.pos-top-left     { top: 24px; left: 24px;  bottom: auto; right: auto; align-items: flex-start; flex-direction: column; }
#db-toast-container.pos-top-center   { top: 24px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); align-items: center; }
#db-toast-container.pos-bottom-right { bottom: 24px; right: 24px; top: auto; left: auto; align-items: flex-end; flex-direction: column-reverse; }
#db-toast-container.pos-bottom-left  { bottom: 24px; left: 24px;  top: auto; right: auto; align-items: flex-start; flex-direction: column-reverse; }
#db-toast-container.pos-bottom-center{ bottom: 24px; left: 50%; right: auto; top: auto; transform: translateX(-50%); align-items: center; flex-direction: column-reverse; }
@media (max-width: 480px) {
  #db-toast-container { left: 12px !important; right: 12px !important; bottom: 16px !important; top: auto !important; transform: none !important; align-items: stretch !important; }
}

.db-toast {
  pointer-events: all;
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--navy-mid); border: 1px solid var(--navy-edge);
  border-radius: 12px; padding: 13px 14px 13px 13px;
  min-width: 280px; max-width: 380px;
  box-shadow: 0 2px 8px rgba(10,16,30,0.25), 0 8px 24px rgba(10,16,30,0.18);
  position: relative; overflow: hidden; cursor: default;
  opacity: 0; transform: translateX(24px) scale(0.97);
  transition: opacity .22s ease, transform .26s cubic-bezier(0.34,1.3,0.64,1), max-height .3s ease, margin .3s ease, padding .3s ease;
}
#db-toast-container.pos-top-left .db-toast,
#db-toast-container.pos-bottom-left .db-toast { transform: translateX(-24px) scale(0.97); }
#db-toast-container.pos-top-center .db-toast,
#db-toast-container.pos-bottom-center .db-toast { transform: translateY(-12px) scale(0.97); }
.db-toast.is-visible    { opacity: 1; transform: translateX(0) scale(1) !important; }
.db-toast.is-dismissing { opacity: 0; transform: translateX(100%) scale(0.95) !important; max-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; margin-bottom: -10px; pointer-events: none; }

.db-toast__progress { position: absolute; bottom: 0; left: 0; height: 2.5px; border-radius: 0 0 12px 12px; transform-origin: left; width: 100%; transform: scaleX(1); transition: transform linear; }
.db-toast__icon    { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.db-toast__icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.db-toast__content { flex: 1; min-width: 0; }
.db-toast__title   { font-size: 13.5px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.db-toast__message { font-size: 12.5px; line-height: 1.55; opacity: .78; }
.db-toast__action  { display: inline-block; margin-top: 7px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; background: none; border: none; padding: 0; letter-spacing: .1px; font-family: var(--font-sans); }
.db-toast__dismiss { width: 22px; height: 22px; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 5px; flex-shrink: 0; margin-top: 1px; transition: background .12s; opacity: .5; }
.db-toast__dismiss:hover { opacity: 1; }
.db-toast__dismiss svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Toast colour variants */
.db-toast--success  { border-color: rgba(22,163,74,0.35); }
.db-toast--success  .db-toast__icon     { background: rgba(22,163,74,0.15); color: #4ADE80; }
.db-toast--success  .db-toast__title    { color: #DCFCE7; }
.db-toast--success  .db-toast__message  { color: #86EFAC; }
.db-toast--success  .db-toast__action,
.db-toast--success  .db-toast__dismiss  { color: #4ADE80; }
.db-toast--success  .db-toast__progress { background: #4ADE80; }

.db-toast--error    { border-color: rgba(220,38,38,0.35); }
.db-toast--error    .db-toast__icon     { background: rgba(220,38,38,0.15); color: #FCA5A5; }
.db-toast--error    .db-toast__title    { color: #FEE2E2; }
.db-toast--error    .db-toast__message  { color: #FCA5A5; }
.db-toast--error    .db-toast__action,
.db-toast--error    .db-toast__dismiss  { color: #FCA5A5; }
.db-toast--error    .db-toast__progress { background: #F87171; }

.db-toast--warning  { border-color: rgba(217,119,6,0.35); }
.db-toast--warning  .db-toast__icon     { background: rgba(217,119,6,0.15); color: #FCD34D; }
.db-toast--warning  .db-toast__title    { color: #FEF3C7; }
.db-toast--warning  .db-toast__message  { color: #FCD34D; }
.db-toast--warning  .db-toast__action,
.db-toast--warning  .db-toast__dismiss  { color: #FCD34D; }
.db-toast--warning  .db-toast__progress { background: #FCD34D; }

.db-toast--info     { border-color: rgba(13,148,136,0.35); }
.db-toast--info     .db-toast__icon     { background: rgba(13,148,136,0.15); color: var(--brand-bright); }
.db-toast--info     .db-toast__title    { color: var(--brand-pale); }
.db-toast--info     .db-toast__message,
.db-toast--info     .db-toast__action,
.db-toast--info     .db-toast__dismiss  { color: var(--brand-bright); }
.db-toast--info     .db-toast__progress { background: var(--brand-bright); }

.db-toast--default  .db-toast__icon     { background: var(--navy-edge); color: var(--grey-500); }
.db-toast--default  .db-toast__title    { color: var(--white); }
.db-toast--default  .db-toast__message  { color: var(--grey-500); }
.db-toast--default  .db-toast__action   { color: var(--brand-bright); }
.db-toast--default  .db-toast__dismiss  { color: var(--grey-500); }
.db-toast--default  .db-toast__progress { background: var(--grey-500); }

.db-toast--loading  .db-toast__icon     { background: var(--navy-edge); color: var(--brand-bright); }
.db-toast--loading  .db-toast__title    { color: var(--white); }
.db-toast--loading  .db-toast__message,
.db-toast--loading  .db-toast__dismiss  { color: var(--grey-500); }

.db-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(20,184,166,0.25); border-top-color: var(--brand-bright);
  border-radius: 50%; animation: db-spin .7s linear infinite;
}

/* Attorney analysis modal loading state (overview: brief + next steps) */
.analysis-loading-box {
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 14px 14px 12px;
  color: var(--grey-500);
}
.analysis-loading-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
}
.analysis-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(20, 184, 166, 0.24);
  border-top-color: var(--brand-bright);
  border-right-color: var(--brand);
  border-radius: 50%;
  animation: db-spin .8s linear infinite;
  flex-shrink: 0;
}
.analysis-loading-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--grey-500);
}
.analysis-loading-bars {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}
.analysis-loading-bars span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(13,148,136,0.08), rgba(13,148,136,0.25), rgba(13,148,136,0.08));
  background-size: 220% 100%;
  animation: analysis-shimmer 1.2s ease-in-out infinite;
}
.analysis-loading-bars span:nth-child(1) { width: 88%; }
.analysis-loading-bars span:nth-child(2) { width: 96%; animation-delay: .12s; }
.analysis-loading-bars span:nth-child(3) { width: 76%; animation-delay: .24s; }
@keyframes analysis-shimmer {
  0% { background-position: 100% 0; opacity: .65; }
  50% { opacity: 1; }
  100% { background-position: -100% 0; opacity: .65; }
}

/* Structured next-steps rendering */
.next-steps-result {
  display: grid;
  gap: 14px;
}
.next-steps-section {
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}
.next-steps-section h6 {
  margin: 0 0 10px;
  color: var(--navy);
}
.next-steps-section ul,
.next-steps-section ol {
  padding-left: 1.1rem;
}
.next-steps-actions {
  display: grid;
  gap: 10px;
}
.next-steps-action-card {
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 10px 12px;
}
.next-steps-action-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.next-steps-action-title {
  margin: 0 0 8px;
  color: var(--navy);
}
.next-steps-priority {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}
.next-steps-priority-high {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}
.next-steps-priority-medium {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}
.next-steps-priority-low {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}
.next-steps-days-away {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}
.next-steps-action-card p {
  margin: 0 0 7px;
}

/* ══════════════════════════════════════════════════════════════
   14. PAGE HEADER  (Cases list + other top-level pages)
   ══════════════════════════════════════════════════════════════ */
.page-header {
  background: transparent;
  border-bottom: none;
  padding: 0;
}
.page-header-inner {
  padding: 28px 28px 16px;
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 24px;
}
.page-overline {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 6px;
}
.page-title { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1.15; letter-spacing: -0.5px; }
.page-subtitle { font-size: 13px; color: var(--grey-500); margin-top: 5px; line-height: 1.5; }

/* Header stat pills */
.header-stats { display: flex; gap: 10px; flex-shrink: 0; }
.hstat {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 10px; padding: 10px 18px;
  text-align: center; min-width: 80px;
}
.hstat-num   { font-family: var(--font-serif); font-size: 22px; color: var(--navy); line-height: 1; margin-bottom: 3px; }
.hstat-label { font-size: 10.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--grey-500); }
.hstat.teal  .hstat-num { color: var(--brand); }
.hstat.amber .hstat-num { color: var(--amber); }

/* ══════════════════════════════════════════════════════════════
   15. TOOLBAR  (search + filter pills + sort)
   ══════════════════════════════════════════════════════════════ */
.toolbar {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: var(--grey-500); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.search-input {
  font-family: var(--font-sans); font-size: 13px;
  background: white; border: 1.5px solid var(--grey-200);
  border-radius: 9px; padding: 8px 12px 8px 34px;
  width: 330px; color: var(--navy); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input::placeholder { color: var(--grey-500); }
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }

.filter-group { display: flex; gap: 4px; flex-wrap:wrap; }
.filter-btn {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  padding: 7px 13px; border: 1.5px solid var(--grey-200);
  border-radius: 999px; background: white; color: var(--grey-600);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.filter-btn:hover  { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--brand); border-color: var(--brand); color: white; font-weight: 600; }
.filter-btn .cnt {
  display: inline-block; background: rgba(255,255,255,0.25);
  border-radius: 999px; padding: 0 6px; margin-left: 4px;
  font-size: 10.5px; font-weight: 700; line-height: 16px; vertical-align: middle;
}
.filter-btn:not(.active) .cnt { background: var(--grey-200); color: var(--grey-600); }

.sort-select {
  font-family: var(--font-sans); font-size: 12.5px; color: var(--grey-600);
  background: white; border: 1.5px solid var(--grey-200); border-radius: 9px;
  padding: 7px 30px 7px 11px; outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: border-color .15s;
}
.sort-select:focus { border-color: var(--brand); }

.row-count { font-size: 12px; color: var(--grey-500); white-space: nowrap; }
.row-count strong { color: var(--navy); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   16. CASES TABLE  (scoped to .table-card to avoid global leakage)
   ══════════════════════════════════════════════════════════════ */
.table-card {
  background: white; border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow);
}
.table-card table      { width: 100%; border-collapse: collapse; }
.table-card thead tr   { background: var(--grey-50); border-bottom: 1.5px solid var(--grey-200); }
.table-card th {
  font-size: 10.5px; font-weight: 700; letter-spacing: .9px;
  text-transform: uppercase; color: var(--grey-600);
  padding: 11px 16px; text-align: left; white-space: nowrap;
  user-select: none; transition: color .15s;
}
.table-card th:hover    { color: var(--navy); }
.table-card th.th-sortable { cursor: pointer; }
.table-card th:not(.th-sortable) { cursor: default; user-select: auto; }
.table-card th.sorted   { color: var(--brand); }
.table-card th.sorted .th-sort-chevron { stroke: var(--brand); color: var(--brand); }
.table-card th .th-inner { display: flex; align-items: center; gap: 5px; }
.table-card th svg {
  width: 12px; height: 12px; stroke: var(--grey-400); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
/* Sortable headers: dim both chevrons until hover; when sorted show only active direction */
.table-card th .th-sort-triggers {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin-left: 2px;
  gap: 0;
  opacity: 0.42;
}
.table-card th.th-sortable:hover .th-sort-triggers { opacity: 0.78; }
.table-card th.th-sortable.sorted .th-sort-triggers { opacity: 1; }
.table-card th.th-sortable.sorted.sort-asc .th-sort-chevron--down { display: none; }
.table-card th.th-sortable.sorted.sort-desc .th-sort-chevron--up { display: none; }
.table-card th .th-sort-chevron {
  width: 12px;
  height: 9px;
  flex-shrink: 0;
  display: block;
}
.table-card tbody tr       { border-bottom: 1px solid var(--grey-200); transition: background .1s; cursor: pointer; }
.table-card tbody tr:last-child { border-bottom: none; }
.table-card tbody tr:hover { background: var(--brand-ghost); }
.table-card tbody tr:hover .case-link { color: var(--brand); }
.table-card td             { padding: 15px 16px; font-size: 13px; vertical-align: middle; }

/* Clients directory: horizontal scroll on small screens + sticky Edit column */
.clients-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.clients-data-table {
  min-width: 720px;
}
@media (max-width: 991.98px) {
  /* Let inner scroller show horizontal scrollbar (parent overflow:hidden would clip it). */
  .clients-table-wrapper .table-card {
    overflow: visible;
  }
  .clients-data-table th:last-child,
  .clients-data-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 1%;
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 12px;
    border-left: 1px solid var(--grey-200);
    box-shadow: -6px 0 12px -8px rgba(15, 23, 42, 0.18);
  }
  .clients-data-table thead th:last-child {
    background: var(--grey-50);
  }
  .clients-data-table tbody td:last-child {
    background: #fff;
  }
  .clients-data-table tbody tr:hover td:last-child {
    background: var(--brand-ghost);
  }
}

/* Case cell sub-elements */
.case-cell  { min-width: 280px; }
.case-num   { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; color: var(--grey-500); margin-bottom: 4px; font-family: 'Courier New', monospace; }
.case-link  { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--navy); text-decoration: none; line-height: 1.3; transition: color .15s; display: block; }
.case-link:hover { color: var(--brand); }
.case-parties { font-size: 11.5px; color: var(--grey-500); margin-top: 3px; line-height: 1.4; }
.case-parties em { font-style: italic; }
.court-cell { min-width: 180px; }
.court-name { font-size: 13px; color: var(--navy); font-weight: 500; line-height: 1.3; }
.court-county { font-size: 11px; color: var(--grey-500); margin-top: 2px; }
.date-cell  { white-space: nowrap; }
.date-main  { font-size: 13px; color: var(--navy); }
.date-rel   { font-size: 11px; color: var(--grey-500); margin-top: 2px; }
.event-cell { min-width: 180px; }
.event-name { font-size: 12.5px; font-weight: 500; color: var(--navy); line-height: 1.3; }
.event-date { font-size: 11px; color: var(--grey-500); margin-top: 2px; }
.event-soon { color: var(--amber) !important; font-weight: 600; }
.event-none { font-size: 12.5px; color: var(--grey-400); font-style: italic; }

/* View button */
.view-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  color: var(--brand); background: var(--brand-ghost);
  border: 1.5px solid rgba(13,148,136,0.2); border-radius: 8px;
  padding: 7px 13px; text-decoration: none; white-space: nowrap;
  transition: all .15s; cursor: pointer;
}
.view-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.view-btn:hover { background: var(--brand); color: white; border-color: var(--brand); }

/* ══════════════════════════════════════════════════════════════
   NEW. APP SHELL — sidebar layout
   ══════════════════════════════════════════════════════════════ */

.db-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
  background: linear-gradient(to right, var(--sidebar-bg) 220px, transparent 220px);
}

/* ── Sidebar ── */
.db-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
  z-index: 100;
}

.db-sidebar-logo {
  padding: 18px 20px 14px;
  flex-shrink: 0;
}

.db-sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.db-brand-name {
  font-family: sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  user-select: none;
}
.db-brand-docket {
  color: var(--navy);
}
.db-brand-breeze {
  color: var(--brand);
}

.db-logo-wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.db-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* Nav sections */
.db-sidebar-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.db-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-label);
  padding: 12px 18px 3px;
}

.db-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 10px;
  margin: 0 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-link);
  text-decoration: none;
  border-radius: 8px;
  border-left: none;
  transition: color .13s, background .13s;
}
.client-view .db-nav-link {
    margin: 4px 8px;
}

.db-nav-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity .15s;
}

.db-nav-link:hover {
  color: var(--sidebar-link-hover);
  background: var(--brand-ghost);
}

.db-nav-link.active {
  color: var(--sidebar-link-active);
  background: var(--brand-pale);
  font-weight: 600;
}

.db-nav-link.active svg,
.db-nav-link:hover svg {
  opacity: 1;
}

/* Recent cases list */
.db-recent-cases {
  padding: 0 12px 4px;
}

.db-recent-case-link {
  display: block;
  font-size: 12px;
  color: var(--sidebar-link);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s, background .15s;
  line-height: 1.4;
}

.db-recent-case-link:hover {
  color: var(--sidebar-link-hover);
  background: var(--brand-ghost);
}

/* Sidebar divider between nav sections */
.db-sidebar-divider {
  height: 1px;
  background: var(--sidebar-border);
  margin: 8px 18px;
}

/* Case-specific sub-nav items in sidebar */
.db-case-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  margin: 0 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--sidebar-link);
  font-size: 13px;
  font-weight: 500;
  transition: background .13s, color .13s;
}

.db-case-nav-item:hover {
  background: var(--grey-100);
  color: var(--navy);
}

.db-case-nav-item.active {
  background: var(--grey-100);
  color: var(--navy);
  font-weight: 600;
}

.db-case-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grey-200);
  flex-shrink: 0;
  margin-left: 4px;
  transition: background .13s;
}

.db-case-nav-item.active .db-case-nav-dot,
.db-case-nav-item:hover .db-case-nav-dot {
  background: var(--brand);
}

/* Logo mark: navy square */
.db-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--navy);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.db-logo-wordmark {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.4px;
}

.db-logo-wordmark .text-brand {
  color: var(--brand);
}

/* User widget at bottom of sidebar */
.db-sidebar-user {
  padding: 10px 10px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.db-sidebar-user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: background 0.13s;
}

.db-sidebar-user-trigger:hover {
  background: var(--grey-100);
}

.db-sidebar-user-trigger[aria-expanded="true"] {
  background: var(--grey-100);
}

.db-sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.db-sidebar-avatar.has-portrait {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

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

.db-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-sidebar-user-role {
  font-size: 11px;
  color: var(--grey-500);
  margin-top: 1px;
}

.db-sidebar-chevron {
  width: 14px; height: 14px;
  color: var(--grey-400);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.db-sidebar-user-trigger[aria-expanded="true"] .db-sidebar-chevron {
  transform: rotate(180deg);
}

/* User dropdown menu */
.db-sidebar-user-dropdown {
  min-width: 196px;
  border: 1px solid var(--grey-200);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-md);
  padding: 5px 0;
  margin-bottom: 6px !important;
}

.db-sidebar-user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--grey-600);
  padding: 8px 14px;
  border-radius: 0;
}

.db-sidebar-user-dropdown .dropdown-item:hover,
.db-sidebar-user-dropdown .dropdown-item:focus {
  background: var(--grey-100);
  color: var(--navy);
}

.db-sidebar-user-dropdown .dropdown-item svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: var(--grey-400);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.db-sidebar-user-dropdown .dropdown-divider {
  margin: 4px 0;
  border-color: var(--grey-200);
}

.db-sidebar-logout {
  color: var(--danger) !important;
}

.db-sidebar-logout svg {
  color: var(--danger) !important;
}

.db-sidebar-logout:hover,
.db-sidebar-logout:focus {
  background: var(--danger-pale) !important;
  color: var(--danger) !important;
}

/* ─── Chat promo card (client left nav) ─────────────────────────── */
.db-chat-promo {
    margin: 32px 16px 10px 16px;
    background: var(--grey-50);
    border: 1.5px solid var(--grey-200);
    border-radius: 12px;
    padding: 18px 14px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.db-chat-promo-icon {
  font-size: 2.6rem;
  color: var(--brand);
  margin-bottom: 6px;
  line-height: 1;
}
.db-chat-promo-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-edge);
  line-height: 1.3;
}
.db-chat-promo-sub {
  font-size: 12px;
  color: var(--grey-400);
  margin-bottom: 6px;
}
.db-chat-promo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: var(--font-sans);
}
.db-chat-promo-btn:hover {
  background: var(--brand-bright);
}

/* ── Main content area ── */
.db-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Mobile: collapse sidebar, show full-width layout ── */
@media (max-width: 991.98px) {
  .db-shell {
    display: block;
  }
  .db-sidebar {
    display: none !important;
  }
  .db-main {
    min-height: 100vh;
    background:white;
  }
}

/* Cases table responsive column visibility */
@media (max-width: 1399.98px) {
  #casesTable .col-open,
  #casesTable .col-closed,
  #casesTable .col-sol {
    display: none;
  }
}

@media (max-width: 999.98px) {
  #casesTable .col-court {
    display: none;
  }
}

@media (max-width: 599.98px) {
  #casesTable .col-court,
  #casesTable .col-type,
  #casesTable .col-status,
  #casesTable .col-open,
  #casesTable .col-closed,
  #casesTable .col-sol,
  #casesTable .col-filed {
    display: none;
  }

  #casesTable .case-cell {
    min-width: 0;
  }

  #casesTable .case-num {
    font-size: 10px;
    margin-bottom: 2px;
  }

  #casesTable .case-link {
    font-size: 13px;
    line-height: 1.25;
  }

  #casesTable .view-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Empty state */
.empty-state  { text-align: center; padding: 64px 32px; display: none; }
.empty-icon   { width: 56px; height: 56px; background: var(--grey-50); border: 1.5px solid var(--grey-200); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty-icon svg { width: 26px; height: 26px; stroke: var(--grey-400); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-title  { font-family: var(--font-serif); font-size: 17px; color: var(--navy); margin-bottom: 6px; }
.empty-sub    { font-size: 13px; color: var(--grey-500); }

/* ══════════════════════════════════════════════════════════════
   17. STATUS BADGES + PAGINATION  (case list)
   ══════════════════════════════════════════════════════════════ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 7px;
    white-space: nowrap;
    background: rgba(13,148,136,0.08);
    color: var(--brand);
    border: 1px solid rgba(13,148,136,0.22);
}
.status-badge .dot {
    background: var(--brand-bright);
    animation: pulse 2s infinite;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-badge--vertical {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    font-size: 10.5px;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.status-badge--vertical .dot {
    width: 8px;
    height: 8px;
}


/* draft / intake */

.status-draft,
.status-filed,
.status-served {
    background: rgba(100,116,139,0.08);
    color: #475569;
    border: 1px solid rgba(100,116,139,0.22);
}

.status-draft .dot,
.status-filed .dot,
.status-served .dot {
    background: #64748b;
}


/* active progress */

.status-active,
.status-discovery,
.status-pretrial {
    background: rgba(29,78,216,0.07);
    color: var(--info);
    border: 1px solid rgba(29,78,216,0.2);
}

.status-active .dot,
.status-discovery .dot,
.status-pretrial .dot {
    background: var(--info);
}


/* waiting / queued */

.status-pending,
.status-mediation,
.status-arbitration {
    background: rgba(217,119,6,0.08);
    color: #B45309;
    border: 1px solid rgba(217,119,6,0.22);
}

.status-pending .dot,
.status-mediation .dot,
.status-arbitration .dot {
    background: var(--amber);
}


/* critical stage */

.status-trial,
.status-deliberation,
.status-verdict,
.status-judgment {
    background: rgba(220,38,38,0.08);
    color: #B91C1C;
    border: 1px solid rgba(220,38,38,0.25);
}

.status-trial .dot,
.status-deliberation .dot,
.status-verdict .dot,
.status-judgment .dot {
    background: #dc2626;
}


/* appeal */

.status-on-appeal,
.status-remanded {
    background: rgba(29,78,216,0.07);
    color: var(--info);
    border: 1px solid rgba(29,78,216,0.2);
}

.status-on-appeal .dot,
.status-remanded .dot {
    background: var(--info);
    animation: pulse 2s infinite;
}


/* administrative */

.status-stayed,
.status-transferred,
.status-consolidated,
.status-reopened {
    background: rgba(124,58,237,0.08);
    color: #6D28D9;
    border: 1px solid rgba(124,58,237,0.22);
}

.status-stayed .dot,
.status-transferred .dot,
.status-consolidated .dot,
.status-reopened .dot {
    background: #7c3aed;
}


/* resolved */

.status-settled,
.status-dismissed,
.status-dismissed-w-prejudice,
.status-dismissed-wo-prejudice,
.status-withdrawn {
    background: rgba(16,185,129,0.08);
    color: #047857;
    border: 1px solid rgba(16,185,129,0.25);
}

.status-settled .dot,
.status-dismissed .dot,
.status-dismissed-w-prejudice .dot,
.status-dismissed-wo-prejudice .dot,
.status-withdrawn .dot {
    background: #10b981;
}


/* enforcement */

.status-enforcing {
    background: rgba(59,130,246,0.08);
    color: #1D4ED8;
    border: 1px solid rgba(59,130,246,0.25);
}

.status-enforcing .dot {
    background: #3b82f6;
}


/* final */

.status-closed {
    background: var(--grey-50);
    color: var(--grey-600);
    border: 1px solid var(--grey-200);
}

.status-closed .dot {
    background: var(--grey-400);
}


/* archived */

.status-archived {
    background: rgba(107,114,128,0.07);
    color: #6B7280;
    border: 1px solid rgba(107,114,128,0.2);
}

.status-archived .dot {
    background: #9CA3AF;
}


/* unknown */

.status-unknown {
    background: rgba(148,163,184,0.08);
    color: #475569;
    border: 1px dashed rgba(148,163,184,0.25);
}

.status-unknown .dot {
    background: #94A3B8;
}


.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; flex-wrap: wrap; gap: 12px;
}
.pagination-info         { font-size: 12.5px; color: var(--grey-500); }
.pagination-info strong  { color: var(--navy); }
.pagination-controls     { display: flex; gap: 4px; }
.page-btn {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500;
  width: 34px; height: 34px;
  border: 1.5px solid var(--grey-200); border-radius: 8px;
  background: #fff; color: var(--grey-600); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background-color .15s, color .15s;
}
/* Navy on mint so label/icon never matches the hover background (teal-on-teal edge cases). */
.page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--brand-bright);
  background: var(--brand-ghost);
  color: var(--navy);
}
.page-btn.active {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700;
}
.page-btn.active:hover:not(:disabled) {
  background: var(--brand-bright); border-color: var(--brand-bright); color: #fff;
}
.page-btn:disabled  { opacity: .35; cursor: default; }
.page-btn svg       { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════════════════════════════════════════════════════════
   18. UPLOAD — DROP ZONE
   ══════════════════════════════════════════════════════════════ */
.drop-zone {
  position: relative;
  border: 2px dashed var(--grey-400); border-radius: 16px;
  background: white; padding: 56px 40px;
  text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  margin-bottom: 28px; overflow: hidden;
}
.drop-zone::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(13,148,136,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--brand); background: var(--brand-ghost); }
.drop-zone.drag-over { transform: scale(1.005); border-style: solid; }
.drop-zone.drag-over .dz-icon-wrap { transform: scale(1.08); background: rgba(13,148,136,0.15); border-color: rgba(13,148,136,0.4); }
.drop-zone.drag-over button, .drop-zone.drag-over h2, .drop-zone.drag-over p { opacity: 0; }

#fileInput { display: none; }

.dz-icon-wrap {
  width: 72px; height: 72px; border-radius: 18px;
  background: var(--grey-50); border: 1.5px solid var(--grey-200);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  transition: transform .2s, background .2s, border-color .2s;
}
.dz-icon-wrap svg { width: 32px; height: 32px; stroke: var(--grey-500); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.drop-zone:hover .dz-icon-wrap svg,
.drop-zone.drag-over .dz-icon-wrap svg { stroke: var(--brand); }

.dz-title { font-family: var(--font-serif); font-size: 20px; color: var(--navy); margin-bottom: 8px; line-height: 1.25; }
.dz-sub   { font-size: 13.5px; color: var(--grey-600); margin-bottom: 24px; line-height: 1.6; }
.dz-browse {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  background: var(--brand); color: white; border: none; border-radius: 9px;
  padding: 11px 24px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s; margin-bottom: 16px;
}
.dz-browse:hover { background: #0b8077; }
.dz-browse svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dz-mobile-tip { font-size: 12px; color: var(--grey-500); display: flex; align-items: center; justify-content: center; gap: 5px; }
.dz-mobile-tip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dz-types { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--grey-200); display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dz-type-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px;
  background: var(--grey-50); border: 1px solid var(--grey-200); color: var(--grey-600);
}

.drag-overlay { position: absolute; inset: 0; background: rgba(13,148,136,0.08); border-radius: 14px; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .15s; }
.drop-zone.drag-over .drag-overlay { opacity: 1; }
.drag-overlay-inner { font-family: var(--font-serif); font-size: 22px; color: var(--brand); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drag-overlay-inner svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; animation: bounce .8s ease infinite; }

/* ══════════════════════════════════════════════════════════════
   19. UPLOAD — QUEUE + FILE TABLE
   ══════════════════════════════════════════════════════════════ */
.queue-section { display: none; }
.queue-section.has-files { display: block; }
.queue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.queue-title  { font-family: var(--font-serif); font-size: 18px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.queue-count  { font-family: var(--font-sans); font-size: 12px; font-weight: 700; background: var(--navy-mid); color: var(--brand-bright); padding: 3px 9px; border-radius: 999px; }
.queue-actions { display: flex; gap: 8px; }

.file-table-card { background: white; border: 1.5px solid var(--grey-200); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; }
.file-table      { width: 100%; border-collapse: collapse; }
.file-table thead tr  { background: var(--grey-50); border-bottom: 1.5px solid var(--grey-200); }
.file-table th        { font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--grey-600); padding: 10px 16px; text-align: left; white-space: nowrap; }
.file-table th:last-child { text-align: right; }
.file-table tbody tr  { border-bottom: 1px solid var(--grey-200); transition: background .1s; }
.file-table tbody tr:last-child { border-bottom: none; }
.file-table tbody tr:hover { background: var(--grey-50); }
.file-table td        { padding: 12px 16px; vertical-align: middle; font-size: 13px; }
.file-table td:last-child { text-align: right; }

.file-name-cell  { display: flex; align-items: center; gap: 11px; min-width: 0; }
.file-icon       { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 10px; font-weight: 800; letter-spacing: .3px; }
.file-icon svg   { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fi-pdf  { background: #FEE2E2; color: #DC2626; }
.fi-word { background: #DBEAFE; color: #1D4ED8; }
.fi-excel{ background: #DCFCE7; color: #16A34A; }
.fi-ppt  { background: #FEF3C7; color: #D97706; }
.fi-img  { background: #EDE9FE; color: #7C3AED; }
.fi-text, .fi-other { background: var(--grey-50); color: var(--grey-600); border: 1px solid var(--grey-200); }

.file-name-info  { min-width: 0; }
.file-name-text  { font-size: 13px; font-weight: 500; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.file-size-text  { font-size: 11.5px; color: var(--grey-500); margin-top: 2px; }

.type-chip { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }

/* Upload progress */
.progress-cell       { min-width: 160px; }
.progress-wrap       { display: flex; flex-direction: column; gap: 5px; }
.progress-bar-track  { height: 5px; background: var(--grey-200); border-radius: 999px; overflow: hidden; }
.progress-bar-fill   { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-bright) 100%); transition: width .3s ease; width: 0%; }
.progress-bar-fill.error { background: var(--danger); }
.progress-label      { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; }
.progress-pct        { color: var(--grey-500); font-weight: 500; }
.progress-pct.done   { color: var(--success); font-weight: 700; }
.progress-pct.error  { color: var(--danger); font-weight: 600; }

/* Upload status badges */
.sb-queued    { background: var(--grey-50);              color: var(--grey-600);  border: 1px solid var(--grey-200); }
.sb-uploading { background: rgba(13,148,136,0.08);     color: var(--brand);   border: 1px solid rgba(13,148,136,0.2); }
.sb-done      { background: var(--success-pale);             color: var(--success);  border: 1px solid #BBF7D0; }
.sb-error     { background: var(--danger-pale);               color: var(--danger);    border: 1px solid #FECACA; }
.sb-skipped   { background: var(--amber-pale);             color: var(--amber);  border: 1px solid #FDE68A; }

.spin-dot     { width: 10px; height: 10px; border: 2px solid rgba(13,148,136,0.25); border-top-color: var(--brand); border-radius: 50%; animation: db-spin .7s linear infinite; flex-shrink: 0; }

.btn-remove {
  width: 28px; height: 28px;
  border: 1.5px solid var(--grey-200); border-radius: 7px;
  background: white; color: var(--grey-500); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-remove:hover    { border-color: #FECACA; color: var(--danger); background: #FEF2F2; }
.btn-remove:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.btn-remove svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Upload case-context pill + error banner */
.case-context {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand-ghost); border: 1px solid var(--brand-pale);
  border-radius: 999px; padding: 7px 16px 7px 10px;
  margin-bottom: 24px; font-size: 12.5px; color: var(--brand);
}
.case-context svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.case-context strong { font-weight: 600; }

.error-banner {
  display: none; align-items: flex-start; gap: 10px;
  background: var(--danger-pale); border: 1px solid #FECACA;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 13px; color: #991B1B;
}
.error-banner.visible { display: flex; }
.error-banner svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 1px; }

/* Summary bar */
.summary-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border: 1.5px solid var(--grey-200);
  border-radius: var(--border-radius); padding: 16px 20px;
  box-shadow: var(--shadow); flex-wrap: wrap; gap: 12px;
}
.summary-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.summary-stat  { text-align: center; }
.summary-stat-num       { font-family: var(--font-serif); font-size: 20px; color: var(--navy); line-height: 1; margin-bottom: 2px; }
.summary-stat-num.teal  { color: var(--brand); }
.summary-stat-num.green { color: var(--success); }
.summary-stat-num.red   { color: var(--danger); }
.summary-stat-label     { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: var(--grey-500); }

/* ══════════════════════════════════════════════════════════════
   20. KEYFRAME ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  30%       { transform: translateY(-6px); }
}
@keyframes db-spin {
  to { transform: rotate(360deg); }
}


.alert-link:hover {
    text-decoration: underline;
    color: var(--bs-alert-link-color);
}

/* ══════════════════════════════════════════════════════════════
   21. PUBLIC — HERO PAGE (shared split shell: contact, login, register, …)
   ══════════════════════════════════════════════════════════════ */
.db-hero-page {
  max-width: 1100px;
  margin-inline: auto;
}

.db-hero {
  background: var(--white);
}

.db-hero__visual {
  background: var(--grey-200);
  min-height: 200px;
}

.db-hero__img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Portrait hero crops (e.g. client welcome) */
.db-hero__img--portrait-focus {
  object-position: center 22%;
}

/* Client invite welcome: no marketing navbar — hero layout already carries brand */
body.db-public-welcome-client > nav.navbar {
  display: none !important;
}

@media (min-width: 992px) {
  .db-hero__visual { min-height: 100%; }
  .db-hero__img { min-height: 560px; }
}
@media (max-width: 598px) {
    .db-hero__visual {
        display:none;
    }
}

.db-hero__panel {
  background: var(--white);
}

.db-hero-title {
  font-family: var(--font-serif);
  color: var(--navy);
  letter-spacing: -0.02em;
}

.db-hero-lead {
  font-size: 1.02rem;
  line-height: 1.6;
}

/* Secondary copy + links inside the hero panel (support line, account switcher, …) */
.db-hero-muted {
  font-size: 0.9375rem;
  color: var(--grey-500);
}

.db-hero-muted a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.db-hero-muted a:hover {
  text-decoration: underline;
  color: var(--brand-bright);
}

/* Auth (login / register) — form styling */
.db-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: opacity 0.15s;
}

.db-auth-brand:hover {
  color: var(--navy);
  opacity: 0.85;
}


.db-auth-fields .form-label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.db-auth-fields .form-control {
  border-radius: 12px;
  border: 1.5px solid var(--grey-200);
  padding: 0.65rem 1rem;
  font-size: 1rem;
}

.db-auth-fields .form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.db-auth-submit.btn {
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  width: 100%;
}

/* ============================================================
   Password rules checklist + strength meter
   Rendered by Areas/Public/Views/Shared/_PasswordHelp.cshtml.
   Tier classes (--0..--5) map to the JS strength score.
   ============================================================ */
.db-password-help {
  margin-top: -0.25rem;
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem 0.9rem;
  border: 1px solid var(--grey-200, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}

.db-password-help__meter {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--grey-200, #e2e8f0);
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.db-password-help__meter-fill {
  height: 100%;
  width: 0;
  background: var(--grey-200, #e2e8f0);
  transition: width 180ms ease, background-color 180ms ease;
  border-radius: 999px;
}

.db-password-help__meter-fill--0 { background: var(--grey-200, #e2e8f0); }
.db-password-help__meter-fill--1 { background: #dc2626; } /* red-600  - Very weak */
.db-password-help__meter-fill--2 { background: #ef4444; } /* red-500  - Weak */
.db-password-help__meter-fill--3 { background: #f59e0b; } /* amber-500 - Fair */
.db-password-help__meter-fill--4 { background: #10b981; } /* emerald-500 - Good */
.db-password-help__meter-fill--5 { background: #059669; } /* emerald-600 - Strong */

.db-password-help__label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.db-password-help__label > span {
  font-weight: 700;
}

.db-password-help__intro {
  margin-bottom: 0.35rem;
}

.db-password-help__rules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 0.75rem;
}

@media (min-width: 576px) {
  .db-password-help__rules {
    grid-template-columns: 1fr 1fr;
  }
}

.db-password-help__rules li {
  display: flex;
  align-items: center;
  color: var(--grey-500, #64748b);
  line-height: 1.5;
}

.db-password-help__rules li i {
  /* Fixed width so the text never shifts as the icon swaps between
     fa-regular fa-circle and fa-solid fa-circle-check. */
  width: 1rem;
  text-align: center;
  color: var(--grey-500, #94a3b8);
}

.db-password-help__rules li.db-password-help__rule--met {
  color: #047857; /* emerald-700 */
}

.db-password-help__rules li.db-password-help__rule--met i {
  color: #10b981; /* emerald-500 */
}

.db-auth-oauth-sep {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--grey-500);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.db-auth-oauth-sep::before,
.db-auth-oauth-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--grey-200);
}

.db-auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 576px) {
  .db-auth-oauth {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .db-auth-oauth form {
    flex: 1 1 calc(50% - 0.33rem);
    min-width: 0;
  }
}

.db-auth-oauth .btn {
  width: 100%;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-weight: 500;
  justify-content: center;
}

/* Contact — topic tiles & form (page-specific) */
.db-contact-fieldset legend {
  float: none;
  width: auto;
  font-size: 1rem;
}

.db-contact-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 576px) {
  .db-contact-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.db-contact-tile-wrap { min-width: 0; }

.db-contact-tile {
  display: block;
  margin: 0;
  cursor: pointer;
  height: 100%;
  border-radius: 12px;
}

.db-contact-tile__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.85rem 0.45rem;
  border: 2px solid var(--grey-200);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 5.5rem;
  height: 100%;
}

.db-contact-tile:hover .db-contact-tile__inner {
  border-color: #cbd5e1;
  background: var(--grey-50);
}

.db-contact-tile-input:checked + .db-contact-tile .db-contact-tile__inner {
  border-color: var(--brand);
  background: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 1px var(--brand);
}

.db-contact-tile-input:focus-visible + .db-contact-tile .db-contact-tile__inner {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
}

.db-contact-tile__icon {
  color: var(--brand);
  font-size: 1.2rem;
  line-height: 1;
}

.db-contact-tile__text {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--navy);
  hyphens: auto;
}

#db-contact-submit:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.db-contact-calendly {
  border: 1px solid var(--grey-200);
  border-radius: 14px;
  padding: 1rem;
  background: var(--grey-50);
}

.db-contact-calendly__header {
  margin-bottom: 0.9rem;
}

.db-contact-calendly__embed {
  min-height: 700px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--grey-200);
}

.db-contact-calendly__fallback {
  display: none;
  margin-top: 0.85rem;
}

.db-contact-calendly__fallback.is-visible {
  display: block;
}

@media (max-width: 767.98px) {
  .db-contact-calendly__embed {
    min-height: 620px;
  }
}

/* Contact — screenshot upload preview */
.db-contact-upload input[type="file"] {
  cursor: pointer;
}

.db-contact-upload__preview {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.db-contact-upload__preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--grey-200);
  background: var(--grey-50);
  object-fit: contain;
  display: block;
}

/* Contact — bottom demo / scheduler section */
.db-contact-demo {
  background: var(--white);
}

.db-contact-demo .db-contact-calendly {
  margin: 0;
}



/* (?) field hints */
.db-field-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    background: var(--bs-body-bg);
    color: var(--grey-500, #64748b);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    cursor: help;
    flex-shrink: 0;
}

.db-field-hint:hover,
.db-field-hint:focus-visible {
    color: var(--bs-primary);
    border-color: rgba(13, 148, 136, 0.45);
    outline: none;
}

/* Tooltip theme */
.tooltip.db-settings-tooltip .tooltip-inner {
    max-width: min(320px, 92vw);
    text-align: left;
    background: var(--navy, #0f172a);
    color: #fff;
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--bs-border-radius);
    box-shadow: var(--shadow-md, 0 4px 24px rgba(15, 23, 42, 0.12));
}

.tooltip.db-settings-tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--navy, #0f172a);
}

.tooltip.db-settings-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--navy, #0f172a);
}

.tooltip.db-settings-tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: var(--navy, #0f172a);
}

.tooltip.db-settings-tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: var(--navy, #0f172a);
}


.icon-bubble {
    width: 44px;
    height: 44px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    corner-shape: squircle;
}

.icon-purple {
    background: var(--icon-purple-bg);
    color: var(--icon-purple);
}

.icon-blue {
    background: var(--icon-blue-bg);
    color: var(--icon-blue);
}

.icon-green {
    background: var(--icon-green-bg);
    color: var(--icon-green);
}

.icon-emerald {
    background: var(--icon-emerald-bg);
    color: var(--icon-emerald);
}

.icon-orange {
    background: var(--icon-orange-bg);
    color: var(--icon-orange);
}

.icon-red {
    background: var(--icon-red-bg);
    color: var(--icon-red);
}

.icon-slate {
    background: var(--icon-slate-bg);
    color: var(--icon-slate);
}

.icon-teal {
    background: var(--icon-teal-bg);
    color: var(--icon-teal);
}

.icon-amber {
    background: var(--icon-amber-bg);
    color: var(--icon-amber);
}

.icon-yellow {
    background: var(--icon-yellow-bg);
    color: var(--icon-yellow-fg);
}

.icon-indigo {
    background: var(--icon-indigo-bg);
    color: var(--icon-indigo);
}

.icon-rose {
    background: var(--icon-rose-bg);
    color: var(--icon-rose);
}

.icon-bubble--sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 13px;
}

/* ——— Setup wizard: Choose role (reference art under wwwroot/img/setup/) ——— */
body.setup-layout .setup-choose-role {
    --setup-role-attorney: #0f766e;
    --setup-role-attorney-bright: #14b8a6;
    --setup-role-attorney-border: #5eead4;
    --setup-role-attorney-soft: #ccfbf1;
    --setup-role-client: #1d4ed8;
    --setup-role-client-bright: #3b82f6;
    --setup-role-client-border: #93c5fd;
    --setup-role-client-soft: #dbeafe;
    --setup-role-ink: #0f172a;
}

body.setup-layout .setup-choose-role__hero-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: 700;
    font-size: clamp(1.65rem, 2.5vw, 2.1rem);
    color: var(--setup-role-ink);
    letter-spacing: -0.02em;
}

body.setup-layout .setup-choose-role__hero-icon {
    display: inline-block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

body.setup-layout .setup-choose-role__hero-lead {
    max-width: 34rem;
    font-size: 1.05rem;
    line-height: 1.55;
}

body.setup-layout .setup-choose-role__hero-accent {
    color: var(--setup-role-attorney);
    font-weight: 600;
}

body.setup-layout .setup-role-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.35rem 1.35rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.setup-layout .setup-role-card--attorney {
    border-color: var(--setup-role-attorney-border);
}

body.setup-layout .setup-role-card--client {
    border-color: var(--setup-role-client-border);
}

body.setup-layout .setup-role-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 16px 40px rgba(15, 23, 42, 0.08);
}

body.setup-layout .setup-role-card__title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--setup-role-ink);
}

body.setup-layout .setup-role-card__rule {
    width: 2.75rem;
    height: 3px;
    border-radius: 2px;
}

body.setup-layout .setup-role-card__rule--attorney {
    background: linear-gradient(90deg, var(--setup-role-attorney), var(--setup-role-attorney-bright));
}

body.setup-layout .setup-role-card__rule--client {
    background: linear-gradient(90deg, var(--setup-role-client), var(--setup-role-client-bright));
}

body.setup-layout .setup-role-card__desc {
    font-size: 0.95rem;
    line-height: 1.5;
}

body.setup-layout .setup-role-card__icon-bubble {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

body.setup-layout .setup-role-card__icon-bubble--attorney {
    background: linear-gradient(145deg, var(--setup-role-attorney) 0%, #0d9488 100%);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

body.setup-layout .setup-role-card__icon-bubble--client {
    background: linear-gradient(145deg, var(--setup-role-client) 0%, var(--setup-role-client-bright) 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

body.setup-layout .setup-role-card__art {
    max-width: min(230px, 100%);
    height: auto;
    max-height: 200px;
    width: auto;
    object-fit: contain;
    object-position: center bottom;
}

@media (min-width: 768px) {
    body.setup-layout .setup-role-card__art {
        max-height: 280px;
    }
}

body.setup-layout .setup-role-card__cta {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
}

body.setup-layout .setup-role-card__cta--attorney {
    background: linear-gradient(180deg, #0d9488 0%, var(--setup-role-attorney) 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

body.setup-layout .setup-role-card__cta--attorney:hover {
    background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
    color: #fff;
}

body.setup-layout .setup-role-card__cta--client {
    background: linear-gradient(180deg, var(--setup-role-client-bright) 0%, var(--setup-role-client) 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

body.setup-layout .setup-role-card__cta--client:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%);
    color: #fff;
}

body.setup-layout .setup-role-card__cta-arrow {
    font-size: 1.15rem;
    line-height: 1;
    opacity: 0.95;
}

body.setup-layout .setup-role-card__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #64748b;
}

body.setup-layout .setup-role-card__trust--attorney .setup-role-card__trust-icon {
    color: var(--setup-role-attorney);
}

body.setup-layout .setup-role-card__trust--client .setup-role-card__trust-icon {
    color: var(--setup-role-client);
}

body.setup-layout .setup-card-footer {
    border-top-color: var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08)) !important;
}

body.setup-layout .setup-card-footer__primary {
    min-width: 0;
}

@media (max-width: 575.98px) {
    body.setup-layout .setup-card-footer {
        flex-direction: column;
        align-items: stretch !important;
    }

    body.setup-layout .setup-card-footer__back {
        align-self: flex-end;
    }
}

body.setup-layout .setup-portrait-welcome {
    padding: 1.35rem 1.35rem 1.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(165deg, rgba(13, 148, 136, 0.07) 0%, rgba(241, 245, 249, 0.95) 42%, #fff 100%);
    border: 1px solid rgba(13, 148, 136, 0.18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

body.setup-layout .setup-portrait-welcome__eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-bright, #0d9488);
    margin-bottom: 0.65rem;
}

body.setup-layout .setup-portrait-welcome__hi {
    color: var(--bs-body-color, #0f172a);
    font-family: var(--bs-font-serif, Georgia, "Times New Roman", serif);
    letter-spacing: -0.01em;
}

body.setup-layout .setup-portrait-welcome__body {
    font-size: 0.95rem;
    line-height: 1.7;
}

body.setup-layout .setup-portrait-welcome__bullets {
    padding-left: 1.15rem;
    margin-bottom: 0;
}

body.setup-layout .setup-portrait-welcome__bullets li {
    margin-bottom: 0.35rem;
}

body.setup-layout .setup-portrait-welcome__bullets li:last-child {
    margin-bottom: 0;
}

body.setup-layout .setup-portrait-welcome__signoff {
    font-size: 0.95rem;
    line-height: 1.55;
}

body.setup-layout .setup-portrait-welcome__ps {
    line-height: 1.65;
}

@media (min-width: 768px) {
    body.setup-layout .setup-portrait-welcome {
        padding: 1.75rem 2rem 1.85rem;
    }
}

/* Post–role setup wizard: teal progress dashes */
body.setup-layout .setup-wizard-progress {
    width: 100%;
    max-width: min(32rem, 100%);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.25rem;
}

body.setup-layout .setup-wizard-progress__track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

body.setup-layout .setup-wizard-progress__item {
    flex: 1 1 0;
    min-width: 0;
}

body.setup-layout .setup-wizard-progress__dash {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--bs-border-color, #dee2e6);
}

body.setup-layout .setup-wizard-progress__dash--filled {
    background: var(--brand-bright, #0d9488);
}

body.setup-layout .setup-wizard-progress__dash--current {
    height: 5px;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.22);
}

/* Shared portrait uploader (Account Settings + Setup wizard). */
.account-portrait-frame {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color);
    background: var(--grey-50, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.account-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-portrait-initial {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy, #0f172a);
}

.portrait-crop-frame {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    background: var(--grey-50, #f8fafc);
}

.portrait-crop-frame canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.case-hold-item {
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    padding: 0.75rem;
    background: #fff;
    margin-bottom: 0.75rem;
}

.client-view .case-hold-item {
    border-color: #dc3545;
    background: #ffe3e6;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.22);
}

.client-view .case-hold-item .badge.rounded-pill {
    background: #fff !important;
    color: #b42318 !important;
    font-weight: 700;
    border: 1px solid rgba(180, 35, 24, 0.28);
}

.case-hold-item:last-child {
    margin-bottom: 0;
}

.case-hold-item--client {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.12);
    background: #fff5f5;
}

.case-hold-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.case-hold-date {
    color: var(--grey-600, #64748b);
    font-size: 0.825rem;
}

.case-hold-reason {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.case-hold-description {
    color: var(--grey-700, #334155);
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.case-hold-actions {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ss-icon--on-hold {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.22);
}

/* Admin area — tool hub tiles (full-card links) */

a.db-admin-tool-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    min-height: 6.5rem;
    padding: 1.15rem 1.35rem;
    border: 1px solid var(--grey-200, #e2e8f0);
    border-radius: 0.65rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

a.db-admin-tool-tile:hover {
    border-color: rgba(13, 148, 136, 0.45);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    background: rgba(13, 148, 136, 0.03);
    color: inherit;
    transform: translateY(-1px);
}

a.db-admin-tool-tile:focus-visible {
    outline: 2px solid rgba(13, 148, 136, 0.65);
    outline-offset: 2px;
}

.db-admin-tool-tile__name {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    color: var(--grey-900, #0f172a);
}

.db-admin-tool-tile__desc {
    display: block;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--grey-600, #64748b);
    font-weight: 400;
}
