/* Skylimit Building Company (SBC) Management System — brand navy #1e3264 and roof gold #eaab1e from the company logo */
:root {
  /* Skylimit Building Company brand: navy + roof gold, taken from the logo */
  --navy: #1e3264;       /* logo navy: sidebar, primary buttons, headings */
  --navy-deep: #152449;  /* darker navy for hover and the sidebar edge */
  --gold: #eaab1e;       /* logo gold: the single accent (fills only, with navy text) */
  --gold-deep: #c98f10;
  --ink: var(--navy);
  --cement: #5b6679;     /* secondary text, cool grey */
  --slab: #f1f3f7;       /* page background */
  --surface: #ffffff;
  --sand: var(--gold);
  --rule: #d9dde6;
  --good: #2f7a57;
  --bad: #b23a2c;
  --bs-body-font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
  --bs-body-color: #1f2a3f;
  --bs-body-bg: var(--slab);
  --bs-link-color: #2a4a91;
  --bs-link-hover-color: var(--navy);
  --bs-border-color: var(--rule);
}
body { font-size: .95rem; }
h1, h2, h3, h4, .figure, .page-title { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .01em; color: var(--ink); }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: 0 0 236px; background: var(--navy); border-right: 4px solid var(--gold); color: #c9d2e6; padding: 1rem .75rem 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; padding: .35rem .5rem 1rem; margin-bottom: .25rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand img { display: block; width: 100%; max-width: 190px; height: auto; }
.brand-logo { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto 1.25rem; }
.nav-group { font-size: .78rem; color: #9fb0d4; text-transform: uppercase; letter-spacing: .06em; margin: 1rem .5rem .3rem; font-weight: 600; }
.nav-item { display: flex; justify-content: space-between; align-items: center; color: #e1e7f3; text-decoration: none; padding: .4rem .6rem; border-radius: 4px; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.1); border-left-color: var(--sand); color: #fff; }
.nav-item .count { background: var(--gold); color: var(--navy); font-size: .75rem; font-weight: 700; border-radius: 10px; padding: 0 .45rem; }
.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: var(--surface); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 10; }
.page-title { font-size: 1.6rem; font-weight: 600; margin: 0; }
.content { padding: 1.5rem; max-width: 1400px; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.panel > h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: .8rem; }
/* KPI strip: big condensed figures, the one bold element of the interface */
.kpis { border-top: 3px solid var(--navy) !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--rule); background: var(--surface); border-radius: 6px; margin-bottom: 1.25rem; }
.kpi { padding: .9rem 1.1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.kpi .figure { font-size: 2rem; font-weight: 700; line-height: 1.05; }
.kpi .label { color: var(--cement); font-size: .88rem; }
.kpi .sub { font-size: .8rem; color: var(--cement); }
.figure.good { color: var(--good); } .figure.bad { color: var(--bad); }
.table { --bs-table-bg: transparent; font-size: .9rem; }
.table thead th { color: var(--cement); font-weight: 600; border-bottom-width: 2px; white-space: nowrap; }
.table td.n, .table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 600; border-top: 2px solid var(--rule); }
.form-label { font-weight: 500; font-size: .88rem; margin-bottom: .2rem; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-deep); --bs-btn-hover-border-color: var(--navy-deep); --bs-btn-active-bg: var(--navy-deep); --bs-btn-active-border-color: var(--navy-deep); }
.btn-outline-secondary { --bs-btn-color: var(--navy); --bs-btn-border-color: #aeb8cf; --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); }
.nav-tabs .nav-link.active { border-top: 3px solid var(--gold); color: var(--navy); font-weight: 600; }
.nav-tabs .nav-link { color: var(--cement); }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(234,171,30,.25); }
.btn-accent { background: var(--gold); color: var(--navy); font-weight: 600; border: 0; }
.btn-accent:hover, .btn-accent:focus { background: var(--gold-deep); color: var(--navy); }
.line-row { border-bottom: 1px dashed var(--rule); padding-bottom: .5rem; margin-bottom: .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.filters .form-control, .filters .form-select { min-width: 150px; }
.alert-list { list-style: none; padding: 0; margin: 0; }
.alert-list li { padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.alert-list li:last-child { border-bottom: 0; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, var(--navy) 0 45%, var(--slab) 45% 100%); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--rule); border-top: 5px solid var(--gold); border-radius: 6px; padding: 2rem; box-shadow: 0 10px 30px rgba(21,36,73,.18); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 991px) {
  .sidebar { position: fixed; left: -250px; z-index: 30; transition: left .2s; }
  .sidebar.open { left: 0; }
  .content { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
@media print {
  .sidebar, .no-print, .topbar, form.filters, .btn { display: none !important; }
  .content { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  body { background: #fff; }
  .print-head { display: block !important; }
}
.print-head { display: none; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 3px solid var(--gold); }
.print-head .letterhead { display: flex; align-items: center; gap: 1rem; }
.print-head .letterhead img { height: 64px; width: auto; }
.print-head .letterhead h1 { margin: 0; font-size: 1.4rem; }
@media print { * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
