/* BRYZE Insights — presentation layer. Existing data and reports are unchanged. */
:root {
  --page: #f3f5f9;
  --surface: #ffffff;
  --text: #18263e;
  --text-2: #526079;
  --muted: #6b7890;
  --grid: #e8edf4;
  --axis: #c4cede;
  --border: #e2e8f1;
  --hover: #f0f5ff;
  --accent: #3568e8;
  --good: #18825e;
  --bad: #cb4252;
  --critical: #cb4252;
  --warning-ink: #98651b;
  --series-1: #4775e7;
  --series-2: #ee9760;
  --series-3: #39a38d;
  --series-4: #ab86cf;
  --series-5: #6b9fbc;
  --series-6: #d77d9a;
  --series-7: #899b4d;
  --series-8: #bf6965;
  --other: #a4aebd;
  --radius: 16px;
  --soft: #f5f7fb;
  --shadow: 0 3px 14px rgba(29, 47, 80, .025);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
}
body { margin: 0; -webkit-font-smoothing: antialiased; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button, a, input, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid #7398f2; outline-offset: 4px; }
.skip-link { position: absolute; left: 24px; top: -80px; z-index: 110; padding: 12px 20px; background: var(--surface); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.masthead { background: #14243e; color: #fff; }
.masthead-inner { max-width: 1440px; margin: 0 auto; height: 66px; padding: 0 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.wordmark { display: flex; align-items: center; gap: 13px; }
.brand-symbol { width: 31px; height: 31px; display: grid; place-items: center; background: #396ce8; border-radius: 9px; }
.brand-symbol svg { width: 20px; height: 20px; }
.wordmark strong { font-size: 20px; letter-spacing: 2.8px; font-weight: 750; }
.wordmark .divider { width: 1px; height: 19px; background: #40506a; margin: 0 4px; }
.wordmark .product { color: #b9c8e1; font-size: 12px; letter-spacing: 2px; }
.source-label { color: #c1cde0; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.source-label svg { width: 16px; height: 16px; color: #8daffd; }
.topbar { max-width: 1440px; margin: 0 auto; padding: 27px 32px 23px; background: transparent; border: 0; gap: 22px; }
.brand { display: block; }
.brand-title { display: flex; align-items: center; gap: 10px; }
h1 { font-size: 24px; font-weight: 750; letter-spacing: -.8px; }
.brand p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.filters { gap: 8px; }
.field { gap: 7px; min-width: 0; }
.field > span { color: var(--text-2); font-size: 11px; font-weight: 600; padding-left: 2px; }
select, input[type="date"], .btn { height: 39px; padding: 0 11px; font-size: 12px; border-radius: 8px; box-shadow: 0 1px 2px rgba(25,40,70,.02); }
input[type="date"] { min-width: 0; width: 126px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; transition: background .15s, border-color .15s; }
.btn svg { width: 14px; height: 14px; flex: none; }
#refresh { background: var(--accent); color: #fff; border-color: var(--accent); padding: 0 14px; }
#refresh:hover { background: #2858d2; border-color: #2858d2; }
#refresh:disabled { opacity: .6; }
.site-nav { max-width: 1376px; margin: 0 auto; padding: 0; }
.tabs { padding: 7px; gap: 4px; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); scrollbar-width: thin; }
.tab { padding: 10px 17px; border: 0; border-radius: 7px; font-size: 12px; transition: background .15s, color .15s; }
.tab:hover { background: var(--soft); }
.tab[aria-selected="true"] { color: #fff; background: var(--accent); box-shadow: 0 3px 7px rgba(53,104,232,.18); }
.tab:first-child { margin-right: 8px; }
.content { padding: 28px 32px 44px; gap: 20px; }
.page-head { align-items: center; gap: 7px 16px; }
.page-head h2 { font-size: 18px; font-weight: 750; letter-spacing: -.45px; display: flex; align-items: center; gap: 9px; }
.page-head h2::before { content: ""; width: 4px; height: 16px; background: var(--accent); border-radius: 3px; }
.page-head .sub { font-size: 11px; color: var(--muted); line-height: 1.8; }
.kpis { gap: 16px; }
.kpi { min-width: 0; padding: 22px 22px 19px; border-radius: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .label { font-size: 12px; font-weight: 550; color: var(--text-2); }
.kpi .label[data-tip] { text-decoration: none; }
.kpi .value { font-size: 32px; font-weight: 750; letter-spacing: -1px; margin: 9px 0 7px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .cmp { font-size: 11px; gap: 5px; }
.kpis:not(.secondary) .kpi { border-top: 3px solid #dce6fb; }
.kpis:not(.secondary) .kpi:first-child { background: #1c345b; border-color: #1c345b; color: #fff; }
.kpis:not(.secondary) .kpi:first-child .label { color: #dce6f9; }
.kpis:not(.secondary) .kpi:first-child .cmp,
.kpis:not(.secondary) .kpi:first-child .flat { color: #b3c5e3; }
.kpis:not(.secondary) .kpi:first-child .good { color: #7ce2bf; }
.kpis:not(.secondary) .kpi:first-child .bad { color: #ffb3bc; }
.kpis:not(.secondary) .kpi:first-child::after { content: ""; position: absolute; right: -12px; bottom: -28px; width: 95px; height: 95px; border: 16px solid rgba(255,255,255,.035); border-radius: 50%; pointer-events: none; }
.kpis:not(.secondary) .kpi:nth-child(3) { border-top-color: #c6e9e1; }
.kpis:not(.secondary) .kpi:nth-child(4) { border-top-color: #e1d7f2; }
.kpis.secondary { gap: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 15px 5px; box-shadow: var(--shadow); }
.kpis.secondary .kpi { border: 0; border-radius: 0; box-shadow: none; padding: 0 18px; background: transparent; }
.kpis.secondary .kpi + .kpi { border-left: 1px solid var(--grid); }
.kpis.secondary .value { font-size: 21px; margin: 5px 0 4px; letter-spacing: -.5px; }
.kpis.secondary .label { font-size: 11px; }
.card { padding: 23px 24px; box-shadow: var(--shadow); border-radius: 14px; }
.card-head { margin-bottom: 20px; gap: 12px; }
h3 { font-size: 15px; font-weight: 700; letter-spacing: -.3px; }
.card-head p { font-size: 11px; margin-top: 5px; }
.card:has(.checks) { background: var(--surface); border-left: 3px solid #d6a85d; padding: 17px 22px; display: grid; grid-template-columns: 130px 1fr; align-items: start; gap: 16px; }
.card:has(.checks) .card-head { margin: 0; padding-top: 3px; }
.checks { gap: 9px; }
.checks li { grid-template-columns: 100px minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.checks .site { font-size: 12px; font-weight: 500; color: var(--text-2); line-height: 1.7; }
.chip { font-size: 10px; line-height: 20px; padding: 1px 7px; border-radius: 5px; margin-left: 0; gap: 4px; width: fit-content; }
.chip-info { color: #65728a; background: var(--soft); }
.chip-warning { background: #fff3dc; }
.notice { background: var(--soft); padding: 17px 20px; }
.table-wrap { border: 1px solid var(--grid); border-radius: 9px; scrollbar-width: thin; }
table { font-size: 12px; }
th, td { padding: 13px 14px; }
th { font-size: 11px; background: var(--soft); color: var(--text-2); font-weight: 600; }
td { border-bottom-color: var(--grid); }
tbody tr:last-child td { border-bottom: 0; }
tr.clickable { transition: background .15s; }
tr.clickable:hover { background: var(--hover); }
tr.clickable .cell-main .t { font-weight: 650; }
.cell-main .s { font-size: 11px; margin-top: 4px; }
.cell-main .s a { color: var(--muted); }
.cell-main .s a:hover { color: var(--accent); }
tfoot td { background: var(--soft); border-top: 1px solid var(--grid); padding-top: 15px; padding-bottom: 15px; }
.btn-sm { height: 32px; font-size: 11px; padding: 0 12px; background: var(--surface); }
.seg { border: 0; border-radius: 7px; background: var(--soft); padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { font-size: 11px; padding: 6px 10px; border-radius: 5px; background: transparent; flex-shrink: 0; white-space: nowrap; }
.seg button + button { border: 0; }
.seg button[aria-pressed="true"] { color: var(--accent); background: var(--surface); box-shadow: 0 1px 4px rgba(20,40,70,.1); font-weight: 650; }
.controls { min-width: 0; max-width: 100%; }
.chart-box { height: 320px; }
.grid2 { gap: 20px; }
.stack { height: 24px; gap: 3px; }
.stack-rows { gap: 16px 14px; }
.stack-rows .name { font-size: 12px; }
.legend { margin-top: 18px; gap: 10px 16px; font-size: 11px; line-height: 1.8; }
.foot { margin-top: 14px; font-size: 11px; line-height: 1.8; }
.dashboard-footer { max-width: 1440px; margin: 0 auto; padding: 0 32px 30px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; gap: 12px; }
.dashboard-footer strong { font-weight: 650; letter-spacing: 1px; }
.status { padding: 70px 16px; }
.tip { padding: 12px 14px; line-height: 1.7; }
@media (max-width: 1440px) {
  .site-nav { margin: 0 32px; }
}
@media (max-width: 1150px) {
  .topbar { align-items: flex-start; }
  .brand { width: 100%; }
  .filters { width: 100%; }
  .field { flex: 1; }
  .field select, .field input { width: 100%; }
  #refresh { min-width: 105px; }
  .tab { padding-left: 14px; padding-right: 14px; }
  .kpi { padding: 20px 17px 17px; }
  .kpi .value { font-size: 29px; }
}
@media (max-width: 720px) {
  .masthead-inner { height: 59px; padding: 0 20px; }
  .wordmark { gap: 10px; }
  .wordmark strong { font-size: 17px; }
  .wordmark .product { font-size: 10px; letter-spacing: 1.3px; }
  .source-label { font-size: 0; }
  .source-label svg { width: 19px; height: 19px; }
  .topbar { padding: 23px 20px 20px; gap: 19px; }
  h1 { font-size: 23px; }
  .brand p { font-size: 11px; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .field:first-child { grid-column: 1 / -1; }
  .field > span { font-size: 11px; }
  select, input[type="date"], .btn { height: 42px; }
  #refresh { align-self: end; }
  .site-nav { margin: 0 20px; }
  .tabs { padding: 5px; border-radius: 10px; }
  .tab { padding: 10px 14px; }
  .content { padding: 24px 20px 32px; gap: 16px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .page-head .sub { font-size: 10px; }
  .kpis { gap: 10px; }
  .kpi { padding: 17px 14px; border-radius: 11px; }
  .kpi .label { font-size: 11px; }
  .kpi .value { font-size: 27px; margin: 10px 0 7px; }
  .kpi .cmp { font-size: 10px; }
  .kpis.secondary { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 0; gap: 0; }
  .kpis.secondary .kpi { padding: 14px; border-bottom: 1px solid var(--grid); }
  .kpis.secondary .kpi + .kpi { border-left: 0; }
  .kpis.secondary .kpi:nth-child(even) { border-left: 1px solid var(--grid); }
  .kpis.secondary .kpi:last-child { border-bottom: 0; }
  .card { padding: 19px 16px; border-radius: 12px; }
  .card-head { margin-bottom: 16px; }
  .card:has(.checks) { display: block; padding: 17px 16px; }
  .card:has(.checks) .card-head { padding: 0; margin-bottom: 12px; }
  .checks li { grid-template-columns: 95px minmax(0,1fr); gap: 9px; align-items: start; }
  .checks .site { font-size: 11px; }
  .checks .why { grid-column: 2; }
  .grid2 { gap: 16px; }
  .chart-box { height: 260px; }
  .seg button { padding: 7px 9px; }
  .stack-rows { grid-template-columns: 85px minmax(0,1fr); }
  .stack-rows .name { font-size: 11px; }
  th, td { padding: 12px; }
  .dashboard-footer { padding: 0 20px 24px; font-size: 10px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #111b2c; --surface: #1a2840; --text: #e7edf8; --text-2: #b7c5db;
    --muted: #97a7c1; --grid: #2b3b55; --axis: #4e607d; --border: #2d3b54;
    --hover: #253957; --accent: #86aaff; --soft: #202f49;
    --good: #63cfab; --bad: #ff9ca8; --critical: #ff9ca8; --warning-ink: #f1c57d;
    --series-1: #85a7ff; --series-2: #f6ad7f; --series-3: #60c7b1; --series-4: #bca0de;
    --series-5: #7eafce; --series-6: #eb9fb8; --series-7: #b3c479; --series-8: #e89994;
  }
  :root:not([data-theme="light"]) .tab[aria-selected="true"],
  :root:not([data-theme="light"]) #refresh { background: #3b69d5; border-color: #3b69d5; }
  :root:not([data-theme="light"]) .kpis:not(.secondary) .kpi { border-top-color: #3b5075; }
  :root:not([data-theme="light"]) .chip-info { color: var(--text-2); }
  :root:not([data-theme="light"]) .chip-warning { background: #473b29; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
