/* © The CapCon Group and Southern Iron Systems LLC. All rights reserved. */
:root { --brand: #24427a; --brand-light: #486db4; --brand-text: var(--brand); --page-bg: #f4f6fa; }
[data-bs-theme=dark] { --brand: #1b3360; --brand-light: #3a5c9e; --brand-text: #9bb7ea; --page-bg: #15181d; }
body { background: var(--page-bg); }
.bg-brand { background-color: var(--brand) !important; }
.sidebar { width: 250px; min-height: 100vh; flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar .nav-link { color: rgba(255,255,255,.85); border-radius: .375rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar .nav-link.active { background: var(--brand-light); color: #fff; }
.sidebar .nav-link .bi { margin-right: .4rem; }
.content { min-width: 0; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.table-clickable tbody tr { cursor: pointer; }
.table th a { color: inherit; text-decoration: none; white-space: nowrap; }
.table th a:hover { text-decoration: underline; }
dl.case-facts dt { color: var(--bs-secondary-color); font-weight: 500; }
dl.case-facts dd { margin-bottom: .6rem; }
.prewrap { white-space: pre-wrap; }
.stat { font-size: 2rem; font-weight: 600; line-height: 1; }

/* Multi-line text entered in the old app's textareas. */
.text-pre { white-space: pre-wrap; }

/* Hide empty validation summaries (they carry Bootstrap alert classes). */
.validation-summary-valid { display: none; }

/* A-Z filter on the address book. */
.letter-bar { display: flex; flex-wrap: wrap; gap: .15rem; }
.letter-bar a { min-width: 1.9rem; padding: .15rem .35rem; text-align: center; border-radius: .25rem; text-decoration: none; font-size: .85rem; }
.letter-bar a:hover { background: var(--bs-secondary-bg); }
.letter-bar a.active { background: var(--bs-primary); color: #fff; }

/* Files-per-month bar chart on Reports. */
.month-chart { display: flex; align-items: stretch; gap: .4rem; height: 260px; }
.month-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: inherit; }
.month-bar .bar { width: 100%; max-width: 2.25rem; background: var(--bs-primary); border-radius: .25rem .25rem 0 0; min-height: 1px; }
.month-bar:hover .bar { opacity: .8; }
.month-bar .value { font-size: .75rem; margin-bottom: .15rem; }
.month-bar .label { font-size: .75rem; color: var(--bs-secondary-color); margin-top: .25rem; }

/* Keep label/value rows aligned when a value is blank. */
dl dd:empty::before { content: "\00a0"; }

/* Audit log: long values (case notes) wrap instead of stretching the table. */
.audit-log .audit-value { white-space: pre-wrap; word-break: break-word; max-width: 32rem; }

/* Dark theme: Bootstrap keeps .table-light light in dark mode, so give header rows a dark tint instead. */
[data-bs-theme=dark] .table-light {
  --bs-table-color: var(--bs-emphasis-color); --bs-table-bg: var(--bs-tertiary-bg);
  --bs-table-border-color: var(--bs-border-color); --bs-table-striped-bg: var(--bs-secondary-bg);
  --bs-table-hover-bg: var(--bs-secondary-bg); --bs-table-active-bg: var(--bs-secondary-bg);
  --bs-table-striped-color: var(--bs-emphasis-color); --bs-table-hover-color: var(--bs-emphasis-color);
  --bs-table-active-color: var(--bs-emphasis-color);
}
[data-bs-theme=dark] .card { box-shadow: 0 1px 3px rgba(0,0,0,.5); }

/* Theme switch on the sign-in pages (signed-in users have it in the sidebar). */
.theme-toggle-corner { position: fixed; top: .75rem; right: .75rem; }
