/* The signed-in client area (layouts/App.astro). DiamondBack light brand: white cards on paper, ink headings,
   red as the only accent. Self-contained on purpose: none of the marketing site's Elementor CSS loads here. */
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --red: #ee223c; --red-deep: #c1282d; --ink: #09090f; --ink-2: #101118; --soft: #4a4c55; --faint: #6b6e78;
  --paper: #f4f4f6; --rule: #e2e2e8; --card: #fff;
  --display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--soft); font: 400 16px/1.5 var(--body); }
a { color: var(--red-deep); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.app-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(16px, calc((100vw - 1080px) / 2)); background: #fff; border-bottom: 1px solid var(--rule); }
.app-logo img { display: block; height: 30px; width: auto; }
.app-who { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 14px; color: var(--faint); min-width: 0; }
.app-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-who button { background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 7px 16px; font: 600 13px var(--display); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.app-who button:hover { border-color: var(--ink-2); }
.app-main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 56px; }
.app-foot { max-width: 1080px; margin: 0 auto; padding: 0 16px 40px; font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

.eyebrow { font: 700 12px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin: 0 0 6px; }

/* Sign-in card */
.gate { max-width: 460px; margin: 32px auto; padding: 34px 32px; background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--red); border-radius: 4px 4px 14px 14px; box-shadow: 0 10px 30px rgba(9, 9, 15, .06); }
.gate h1 { font-size: 26px; margin: 0 0 8px; }
.gate p { font-size: 15px; margin: 0 0 18px; }
.gate label { display: block; font: 700 13px var(--body); color: var(--ink-2); margin: 0 0 6px; }
.gate input[type='email'] { width: 100%; padding: 12px 14px; border: 1px solid #c9cad1; border-radius: 8px; font: 400 16px var(--body); color: var(--ink-2); margin: 0 0 16px; }
.gate input[type='email']:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(238, 34, 60, .12); }
.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 13px 28px; font: 800 15px var(--display); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--red-deep); }
.gate .note { font-size: 13px; color: var(--faint); margin: 18px 0 0; }
.gate .ok { background: #f4f4f6; border-radius: 8px; padding: 12px 14px; color: var(--ink-2); }
.gate ul { list-style: none; margin: 0 0 8px; padding: 0; }
.gate li a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--rule); border-radius: 10px; margin: 0 0 8px; color: var(--ink-2); font: 600 15px var(--display); text-decoration: none; }
.gate li a:hover { border-color: var(--red); }
.gate li a span { color: var(--faint); font-weight: 400; }

/* Dashboard */
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 0 0 8px; }
.dash-head h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; }
.dash-head .who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.client-logo { flex: none; height: 64px; width: auto; max-width: 190px; object-fit: contain; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 9px 12px; }
.period { margin: 0; display: flex; align-items: center; gap: 8px; }
.period label { font: 600 13px var(--display); color: var(--faint); }
.period select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23101118' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; border: 1px solid #c9cad1; border-radius: 999px; padding: 10px 38px 10px 16px; font: 600 15px var(--display); color: var(--ink-2); cursor: pointer; }
.period button { border: 1px solid #c9cad1; background: #fff; border-radius: 999px; padding: 10px 16px; font: 600 14px var(--display); cursor: pointer; }
.fresh { font-size: 14px; color: var(--faint); margin: 0 0 28px; }
.notice { background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 0 0 24px; font-size: 15px; color: var(--ink-2); }

/* Sections follow the DBA executive reports (Legacy, October 2026): red eyebrow, a two-tone sentence, icon stat cards. */
.sect { margin: 0 0 48px; }
.sect > h2 { font-size: clamp(22px, 3.3vw, 29px); line-height: 1.14; letter-spacing: -.022em; margin: 0 0 6px; text-wrap: balance; }
.sect > h2 em { font-style: normal; color: var(--red); }
.sect > .sub { font-size: 14px; color: var(--faint); margin: 0 0 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 30px rgba(9, 9, 15, .06); padding: 18px 20px; min-width: 0; }
.tile { padding: 16px 17px 15px; }
.tile.hi { background: #fdf0f1; border-color: var(--red); }
.tile .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fdf0f1; color: var(--red); flex: none; }
.ico svg { width: 19px; height: 19px; }
.tile.hi .ico { background: #fff; }
.tile .value { font: 700 30px/1.05 var(--display); color: var(--ink); letter-spacing: -.03em; white-space: nowrap; margin: 11px 0 0; }
.tile .label { font: 600 11.5px var(--display); letter-spacing: .09em; text-transform: uppercase; color: #7a7d87; margin: 5px 0 0; }
.tile .delta { font-size: 13px; color: var(--soft); margin: 9px 0 0; }
.up { display: inline-flex; align-items: center; gap: 4px; font: 700 12.5px var(--display); color: #17703a; background: #e3f4ea; border-radius: 999px; padding: 3px 10px 3px 7px; white-space: nowrap; }
.up svg { width: 13px; height: 13px; }
.tile .then { font-size: 12.5px; color: var(--faint); margin: 4px 0 0; }
.spark { flex: none; display: block; }

.card h3 { font-size: 16px; margin: 0 0 2px; }
.card .cap { font-size: 13px; color: var(--faint); margin: 0 0 12px; }
.chart { display: block; width: 100%; height: auto; font-family: var(--body); }
.chart .col { outline: none; cursor: default; }
.chart .col:hover .bar, .chart .col:focus-visible .bar { filter: brightness(.82); }
.chart .col:focus-visible rect { stroke: var(--red); stroke-width: 1.5; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 12px 0 0; }

.bars { display: grid; grid-template-columns: minmax(90px, max-content) 1fr max-content; gap: 9px 12px; align-items: center; font-size: 14px; }
.bars .n { color: var(--ink-2); overflow-wrap: anywhere; }
.bars .t { height: 14px; }
.bars .t i { display: block; height: 14px; min-width: 4px; background: var(--red); border-radius: 0 4px 4px 0; }
.bars .v { color: var(--ink); font: 700 14px var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.bars .v small { color: var(--faint); font: 400 13px var(--body); margin-left: 6px; }

table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rank th { text-align: left; font: 700 10.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #7a7d87; padding: 0 0 7px; border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
table.rank td { padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); overflow-wrap: anywhere; }
table.rank tr:last-child td { border-bottom: 0; }
table.rank td:first-child { font-family: var(--display); font-weight: 600; }
table.rank th:last-child, table.rank td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 16px; }
table.rank.num th:not(:first-child), table.rank.num td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 16px; }
details.nums { margin: 10px 0 0; font-size: 13px; }
details.nums summary { cursor: pointer; color: var(--faint); font-weight: 600; width: max-content; }
details.nums .scroll { overflow-x: auto; margin: 10px 0 0; }
.card > .scroll { overflow-x: auto; }
details.nums table { border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 100%; }
details.nums th, details.nums td { padding: 6px 10px; border-top: 1px solid var(--rule); text-align: right; white-space: nowrap; }
details.nums th:first-child, details.nums td:first-child { text-align: left; color: var(--ink-2); }
details.nums thead th { border-top: 0; font: 700 10.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #7a7d87; border-bottom: 1.5px solid var(--ink); }
.empty { font-size: 14px; color: var(--faint); margin: 0; }
.legend { display: flex; gap: 18px; align-items: center; font-size: 13px; color: var(--soft); margin: 6px 0 4px; }
.legend i { display: inline-block; width: 20px; height: 3px; border-radius: 2px; background: var(--red); margin-right: 6px; vertical-align: middle; }
.legend i.g { background: #a3a6b0; margin-left: 12px; }
table.roi { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
table.roi th { font: 700 10.5px var(--display); letter-spacing: .07em; text-transform: uppercase; color: #7a7d87; text-align: right; padding: 6px 8px; border-bottom: 1.5px solid var(--ink); line-height: 1.25; vertical-align: bottom; }
table.roi td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.roi td:first-child { text-align: left; font: 600 13.5px var(--display); }
table.roi tr.hi td { background: #fdf0f1; }
table.roi tr.tot td { font-family: var(--display); font-weight: 700; background: var(--paper); border-bottom: 0; }
.fine { font-size: 12.5px; color: #7a7d87; margin: 12px 0 0; line-height: 1.45; }

.staff { background: #fff; border: 1px dashed #c9cad1; border-radius: 10px; padding: 12px 16px; font-size: 13px; margin: 0 0 24px; }
.staff b { color: var(--ink-2); }
.staff .access { border-top: 1px dashed #c9cad1; margin: 10px 0 0; padding: 10px 0 0; }
.staff .access p { margin: 4px 0; }
.staff .access .said { background: #e3f4ea; color: #17703a; border-radius: 8px; padding: 6px 10px; font-weight: 600; width: fit-content; }
.staff .person { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0; }
.staff .invite { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 10px 0 4px; }
.staff .invite label { display: grid; gap: 3px; font: 600 12px var(--display); color: var(--faint); }
.staff .invite input { padding: 8px 10px; border: 1px solid #c9cad1; border-radius: 8px; font: 400 14px var(--body); color: var(--ink-2); min-width: 200px; }
.staff button { background: #fff; border: 1px solid #c9cad1; border-radius: 999px; padding: 7px 14px; font: 600 13px var(--display); color: var(--ink-2); cursor: pointer; }
.staff .invite button { background: var(--red); border-color: var(--red); color: #fff; padding: 9px 18px; }
.staff .hint { color: var(--faint); }
.gate .find { width: 100%; padding: 11px 14px; border: 1px solid #c9cad1; border-radius: 8px; font: 400 16px var(--body); color: var(--ink-2); margin: 0 0 12px; }
.gate .find:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(238, 34, 60, .12); }
.staff .bad { color: var(--red-deep); }

.tip { position: absolute; z-index: 20; background: var(--ink-2); color: #fff; font: 500 12.5px var(--body); padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; max-width: calc(100vw - 16px); }

@media (max-width: 560px) {
  .app-who span { display: none; }
  .tile { padding: 14px 13px 13px; }
  .tile .value { font-size: 23px; }
  .tile .label { font-size: 10.5px; letter-spacing: .07em; }
  .spark { width: 58px; height: auto; }
  .ico { width: 34px; height: 34px; }
  .up { font-size: 11.5px; white-space: normal; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate { padding: 26px 20px; }
  .client-logo { height: 52px; max-width: 120px; padding: 7px 9px; }
}
@media print {
  body { background: #fff; }
  .app-who, .period, .staff, .tip, details.nums summary { display: none; }
  .card { box-shadow: none; break-inside: avoid; }
}
