/*
 * 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; }

/* 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%;
    }
}
.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); }

/* ══════════════════════════════════════════════════════════════
   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: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 32px;
}
.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: white;
  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;
  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: #a5b4ca;
    padding: 10px 20px 11px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: color .15s, border-color .15s;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    text-decoration: none;
}
@media (max-width: 991.98px) {
  .case-nav-btn {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: none;
    min-width: 56px;
    position: relative;
  }
  .case-nav-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
}
.case-nav-btn:hover {
    color: #c9d4e4;
}
@media (max-width: 991.98px) {
  .case-nav-btn:hover { color: var(--navy); }
}
.case-nav-btn.active {
  color: white;
  border-bottom-color: var(--brand-bright);
}
@media (max-width: 991.98px) {
  .case-nav-btn.active {
    color: var(--brand-bright);
    border-bottom: none;
    font-weight: 600;
  }
}
@media (min-width: 992px) {
  .case-nav { margin-top: 0; }
}

.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  (full-width bar below case banner)
   ══════════════════════════════════════════════════════════════ */
.status-strip {
  background: var(--navy);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
}
@media (max-width: 575.98px) {
  .status-strip {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .status-strip .status-pill { justify-self: center; }
}
.status-strip-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 5px;
}
.status-strip-text { font-size: 14px; line-height: 1.6; color: #94A3B8; }
.status-strip-text strong { color: white; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(217,119,6,0.12);
  border: 1px solid rgba(217,119,6,0.28);
  color: #FCD34D;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-pill-dot {
  width: 7px; height: 7px;
  background: #FCD34D;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ══════════════════════════════════════════════════════════════
   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(--navy);
  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;
}

/* ══════════════════════════════════════════════════════════════
   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;
}
.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: block;
}
.action-card-text {
  min-width: 0;
  width: 100%;
}
.action-title {
  font-size: 12px;
  font-weight: 600;
  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;
  }
}

/* ══════════════════════════════════════════════════════════════
   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-serif); font-size: 16px; 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); }

/* 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;
  border-bottom: 1px solid var(--grey-200);
}
a.activity-item {
  text-decoration: none;
  color: inherit;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--grey-50); }

.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-400); }
.act-chev  { color: var(--grey-200); flex-shrink: 0; margin-top: 3px; }

/* Key facts panel */
.fact-list { padding: 0; }
.fact-item {
  padding: 13px 18px;
  border-bottom: 1px solid var(--grey-200);
  display: flex; flex-direction: column; gap: 3px;
}
.fact-item:last-child { border-bottom: 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(--danger-pale);   color: var(--danger); }
.type-family   { background: #FCE7F3; color: #9D174D; }
.type-probate  { background: #EDE9FE; color: #6D28D9; }
.type-traffic  { background: var(--amber-pale); color: var(--amber); }

/* Activity/document type badges */
.tb-order     { background: #EFF6FF; color: #1D4ED8; }
.tb-motion    { background: #FFF7ED; color: #C2410C; }
.tb-notice    { background: #F0FDF4; color: #166534; }
.tb-complaint { background: #FDF4FF; color: #7E22CE; }
.tb-answer    { background: #FFFBEB; color: #92400E; }
.tb-other     { background: var(--grey-50); color: var(--navy-edge); }

/* ══════════════════════════════════════════════════════════════
   7. CHAT WIDGET  (floating AI assistant)
   ══════════════════════════════════════════════════════════════ */
.chat-widget {
  position: fixed;
  bottom: 20px;
  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: 60px;
  right: 0;
  width: 600px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px);
  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;
}
.chat-widget--open .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); }
.chat-widget-panel .chat-msgs { min-height: 180px; flex: 1; }
.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-family: var(--font-serif); 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; }

.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-200); }

.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; }

.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);
}

.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(--navy); 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; color: white; 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 {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-bright) 100%);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.db-footer__logo-mark svg {
  width: 16px; height: 16px; fill: none; stroke: #fff;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.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;
}

/* ══════════════════════════════════════════════════════════════
   14. PAGE HEADER  (Cases list + other top-level pages)
   ══════════════════════════════════════════════════════════════ */
.page-header {
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 32px;
}
.page-header-inner {
  
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 24px;
}
.page-overline {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--brand-bright); margin-bottom: 6px;
}
.page-title { font-family: var(--font-serif); font-size: 26px; color: white; line-height: 1.2; }
.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: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px; padding: 10px 18px;
  text-align: center; min-width: 80px;
}
.hstat-num   { font-family: var(--font-serif); font-size: 22px; color: white; line-height: 1; margin-bottom: 3px; }
.hstat-label { font-size: 10.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--grey-600); }
.hstat.teal  .hstat-num { color: var(--brand-bright); }
.hstat.amber .hstat-num { color: #FCD34D; }

/* ══════════════════════════════════════════════════════════════
   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-serif); font-size: 14px; 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); }

/* 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; }


/* 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;
}

@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-brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.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%;
}

.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;
}



/* (?) 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);
}
