:root {
  --app-primary: #0b5ed7;
  --app-ink: #182230;
  --app-heading: #172b4d;
  --app-muted: #626d7b;
  --app-canvas: #f6f8fb;
  --app-surface: #fff;
  --app-border: #e5eaf0;
  scrollbar-color: #aab6c4 var(--app-canvas);
  scrollbar-width: thin;
}
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--app-canvas); color: var(--app-ink); }
main { width: 100%; flex: 1; }
.app-navbar { background: var(--app-surface); border-bottom: 1px solid var(--app-border); }
.navbar-brand { color: var(--app-heading); letter-spacing: -.035em; }
.navbar-brand:hover { color: var(--app-primary); }
.brand-wordmark { color: var(--app-muted); font-weight: 400; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .65rem; background: #eaf2ff; color: var(--app-primary); font-size: 1.1rem; }
.app-navbar .nav-link { margin: .25rem .1rem; padding: .55rem .75rem; border-radius: .55rem; color: #526176; font-size: .925rem; font-weight: 500; transition: background-color .16s ease, color .16s ease; }
.app-navbar .nav-link:hover { background: #f2f6fc; color: var(--app-primary); }
.app-navbar .nav-link[aria-current="page"] { background: #eaf2ff; color: #084298; font-weight: 650; }
.card { border: 1px solid #e6ebf1; border-radius: .9rem; box-shadow: 0 .15rem .55rem rgba(25, 42, 70, .035); }
.card-header { padding: 1rem 1.25rem; border-color: #edf0f4; border-radius: .9rem .9rem 0 0 !important; }
.metric-card { height: 100%; overflow: hidden; }
.metric-card .card-body { padding: 1.25rem; }
.metric-label { color: var(--app-muted); font-size: .84rem; font-weight: 550; }
.metric-value { margin-top: .45rem; color: var(--app-heading); font-size: clamp(1.45rem, 3vw, 1.9rem); font-weight: 650; letter-spacing: -.04em; line-height: 1.2; }
.dashboard-panel { overflow: hidden; }
.dashboard-chart-wrap { position: relative; height: clamp(18rem, 34vw, 25rem); }
.dashboard-property-table { min-width: 44rem; }
.dashboard-property-table thead th:first-child,
.dashboard-property-table tbody th { width: 46%; }
.dashboard-property-table tbody th,
.dashboard-property-table tbody td { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.dashboard-property-table tbody th { color: #172b4d; }
.dashboard-property-table tbody td:not(:first-child) { font-variant-numeric: tabular-nums; }
.dashboard-property-table tbody tr:last-child > * { border-bottom: 0; }
.water-allocation-table { min-width: 70rem; }
.water-allocation-table .form-control { min-width: 6.5rem; }
.page-heading { margin-bottom: 1.5rem; }
.page-heading h1 { color: var(--app-heading); font-weight: 650; letter-spacing: -.035em; }
.table { --bs-table-bg: transparent; }
.table thead th { padding: .9rem 1rem; background: #f8fafc; color: #526176; font-size: .75rem; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.table tbody td, .table tbody th { padding: .9rem 1rem; border-color: #edf0f4; vertical-align: middle; }
.table-hover tbody tr:hover > * { --bs-table-accent-bg: #f3f7fd; color: #172b4d; }
.table-responsive { border-radius: inherit; }
.form-label { margin-bottom: .4rem; color: #34445a; font-size: .875rem; font-weight: 600; }
.form-control, .form-select { border-color: #dbe2ea; border-radius: .6rem; color: #182230; }
.form-control::placeholder { color: #667085; }
.form-control:focus, .form-select:focus { border-color: #86b7fe; box-shadow: 0 0 0 .22rem rgba(13, 110, 253, .12); }
.text-secondary { --bs-text-opacity: 1; color: var(--app-muted) !important; }
.form-control, textarea { caret-color: var(--app-primary); }
::selection { background: #cfe2ff; color: var(--app-heading); }
::-webkit-scrollbar { width: .7rem; height: .7rem; }
::-webkit-scrollbar-track { background: var(--app-canvas); }
::-webkit-scrollbar-thumb { border: .2rem solid var(--app-canvas); border-radius: 1rem; background: #aab6c4; }
::-webkit-scrollbar-thumb:hover { background: var(--app-muted); }
.btn { border-radius: .6rem; font-weight: 550; }
.btn-primary { box-shadow: 0 .15rem .35rem rgba(13, 110, 253, .17); }
.badge { font-weight: 600; }
.app-footer { padding: 1.1rem 0; border-top: 1px solid var(--app-border); background: var(--app-surface); color: var(--app-muted); font-size: .8rem; }
.skip-link:focus,
.skip-link:focus-visible { position: fixed; top: .75rem; left: .75rem; z-index: 1100; padding: .85rem 1.1rem; border: 2px solid #084298; border-radius: .5rem; background: #fff; color: #084298; font-weight: 700; box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .2); clip: auto; width: auto; height: auto; overflow: visible; }
:focus-visible { outline: 3px solid #084298 !important; outline-offset: 3px; box-shadow: 0 0 0 5px rgba(13, 110, 253, .2); }
.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible,
.page-link:focus-visible,
.nav-link:focus-visible { position: relative; z-index: 1; }
.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"] { border: 2px solid #b02a37; background-color: #fff8f8; }
.form-control[aria-invalid="true"]:focus,
.form-select[aria-invalid="true"]:focus { border-color: #b02a37; box-shadow: 0 0 0 .25rem rgba(176, 42, 55, .2); }
.btn, .form-control, .form-select { min-height: 2.75rem; }
.btn-sm { min-height: 2.25rem; }
.empty-state { padding: 3rem 1rem !important; text-align: center; }
.empty-state .bi { display: block; margin-bottom: .75rem; color: #9aa8ba; font-size: 1.8rem; }
.filter-panel { background: #fff; }
.login-shell { min-height: min(70vh, 46rem); }
.login-brand { color: #172b4d; font-size: 1.05rem; font-weight: 650; letter-spacing: -.02em; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 575.98px) {
  .metric-card .card-body { padding: 1rem; }
  .app-navbar .navbar-collapse { padding-bottom: .75rem; }
  .dashboard-chart-wrap { height: 18rem; }
  .dashboard-property-table { min-width: 40rem; }
}
