OOB-Dashboard/web/styles.css

458 lines
20 KiB
CSS

:root {
--bg: #f6f7f9;
--panel: #ffffff;
--ink: #16202e;
--ink-2: #55637a;
--ink-3: #8b97ab;
--line: #e3e7ee;
--line-2: #eef1f6;
--navy: #1f3864;
--accent: #2563eb;
--green: #16a34a;
--amber: #b45309;
--red: #dc2626;
--red-soft: #fee2e2;
--amber-soft: #fef3c7;
--green-soft: #dcfce7;
--shadow: 0 1px 2px rgba(16,32,46,.06), 0 8px 24px rgba(16,32,46,.06);
--radius: 12px;
--row-h: 34px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f1419;
--panel: #171d26;
--ink: #e6ebf2;
--ink-2: #9aa7ba;
--ink-3: #6b7789;
--line: #263040;
--line-2: #1e2734;
--navy: #7aa2e8;
--accent: #60a5fa;
--red-soft: #3b1d1d;
--amber-soft: #3a2e12;
--green-soft: #12301f;
--shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 17px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
p { margin: 0; }
.sub { color: var(--ink-2); font-size: 12.5px; max-width: 78ch; }
.muted { color: var(--ink-3); }
.fineprint { color: var(--ink-3); font-size: 12px; margin-top: 10px; }
/* ------------------------------------------------------------------ chrome */
.topbar {
position: sticky; top: 0; z-index: 40;
display: flex; align-items: center; justify-content: space-between; gap: 16px;
padding: 12px 24px;
background: color-mix(in srgb, var(--panel) 88%, transparent);
backdrop-filter: saturate(180%) blur(12px);
border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark {
width: 30px; height: 30px; border-radius: 8px; flex: none;
background: linear-gradient(135deg, var(--green) 0%, var(--green) 32%, var(--red) 32%, var(--red) 100%);
}
.brand p { font-size: 12px; color: var(--ink-2); }
.topbar-actions { display: flex; gap: 8px; }
main { padding: 24px; max-width: 1680px; margin: 0 auto; }
button {
font: inherit; cursor: pointer; border-radius: 8px; padding: 7px 13px;
border: 1px solid var(--line); background: var(--panel); color: var(--ink);
transition: background .12s, border-color .12s, transform .06s;
}
button:hover { border-color: var(--ink-3); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .primary { color: #0f1419; } }
.primary:hover { filter: brightness(1.08); }
.ghost { background: transparent; }
.danger:hover { border-color: var(--red); color: var(--red); }
.linklike {
border: 0; background: none; padding: 0; color: var(--accent);
text-decoration: underline; text-underline-offset: 2px;
}
/* ------------------------------------------------------------------ upload */
.dropzone {
border: 2px dashed var(--line); border-radius: 16px; background: var(--panel);
padding: 56px 32px; text-align: center; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); outline: none; }
.dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.dz-icon { color: var(--ink-3); margin-bottom: 12px; }
.dropzone h2 { font-size: 19px; margin-bottom: 6px; }
.dropzone p { color: var(--ink-2); }
.upload-extra { max-width: 860px; margin: 20px auto 0; }
.perf-slot {
display: flex; align-items: center; gap: 20px;
background: var(--panel); border: 1px solid var(--line);
border-radius: var(--radius); padding: 16px 18px;
}
.perf-slot p { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }
.perf-slot button { flex: none; }
.filelist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.filelist li {
display: flex; align-items: center; gap: 10px; font-size: 13px;
background: var(--panel); border: 1px solid var(--line);
border-radius: 9px; padding: 9px 13px;
}
.filelist .tag {
font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
padding: 2px 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-2);
}
.filelist .ok { color: var(--green); margin-left: auto; }
#btn-analyze { margin: 18px auto 0; display: block; padding: 11px 30px; font-size: 15px; }
/* ----------------------------------------------------------------- loading */
.loading { text-align: center; padding: 90px 20px; color: var(--ink-2); }
.spinner {
width: 30px; height: 30px; margin: 0 auto 16px; border-radius: 50%;
border: 3px solid var(--line); border-top-color: var(--navy);
animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.callout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.callout.error { border-color: var(--red); }
.callout.error h2 { color: var(--red); margin-bottom: 8px; }
.callout p { color: var(--ink-2); margin-bottom: 14px; word-break: break-word; }
/* ------------------------------------------------------------- answer block */
.answer { border-left: 4px solid var(--red); }
.answer .lede {
font-size: 19px; line-height: 1.5; margin: 8px 0 18px; max-width: 92ch;
letter-spacing: -.005em;
}
.answer .lede b { font-weight: 700; font-variant-numeric: tabular-nums; }
.answer .lede .run { color: var(--green); }
.answer .lede .out { color: var(--red); }
.daybar {
display: flex; height: 42px; border-radius: 8px; overflow: hidden;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.daybar span {
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden;
text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.daykeys { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 11px; font-size: 12.5px; }
.daykeys div { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.daykeys b { color: var(--ink); font-variant-numeric: tabular-nums; }
#answer-account { margin-top: 14px; }
/* -------------------------------------------------------------------- KPIs */
.kpis {
display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
gap: 12px; margin-bottom: 16px;
}
/* Eight tiles: a clean 4 + 4 beats auto-fit's 7 + 1 orphan. */
@media (min-width: 1180px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi {
background: var(--panel); border: 1px solid var(--line);
border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow);
}
.kpi .label {
font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
text-transform: uppercase; color: var(--ink-2);
}
.kpi .value {
font-size: 27px; font-weight: 680; letter-spacing: -.02em;
margin: 5px 0 3px; font-variant-numeric: tabular-nums; color: var(--navy);
}
.kpi .note { font-size: 11.5px; color: var(--ink-3); }
.kpi.alarm .value { color: var(--red); }
/* ------------------------------------------------------------------ panels */
.panel {
background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.panel-head {
display: flex; align-items: flex-start; justify-content: space-between;
gap: 20px; flex-wrap: wrap; margin-bottom: 14px;
}
.controls { display: flex; align-items: center; gap: 10px; }
.controls input[type=search] {
font: inherit; padding: 7px 11px; min-width: 240px;
border: 1px solid var(--line); border-radius: 8px;
background: var(--bg); color: var(--ink);
}
.check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button {
border: 0; border-radius: 0; padding: 7px 12px; font-size: 12.5px;
background: transparent; color: var(--ink-2);
}
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button[aria-pressed="true"] { background: var(--navy); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented button[aria-pressed="true"] { color: #0f1419; } }
/* One cell per day: which days were bad, at a glance. */
.dayheat { display: flex; gap: 2px; height: 15px; margin: 0 10px; }
.dayheat i { flex: 1; border-radius: 2px; min-width: 3px; }
.trendcell { font-size: 11.5px; }
/* ------------------------------------------------------------------- curve */
.curve { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 12px; }
.curve .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
align-items: center; height: 100%; gap: 5px; }
.curve .fill {
width: 100%; border-radius: 4px 4px 0 0; min-height: 2px;
background: linear-gradient(180deg, var(--red), #ef4444);
transition: filter .12s;
}
.curve .bar:hover .fill { filter: brightness(1.2); }
.curve .hour { font-size: 9.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.curve .pct { font-size: 9.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* ----------------------------------------------------------------- reality */
.reality { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.reality div { border-left: 3px solid var(--line); padding-left: 12px; }
.reality .k { font-size: 11.5px; color: var(--ink-2); }
.reality .v { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
/* ------------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip {
border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
font-size: 12px; background: var(--panel); color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { color: #0f1419; } }
.chip .n { opacity: .65; margin-left: 5px; font-variant-numeric: tabular-nums; }
/* ------------------------------------------------------------------- table */
/* Scroll sideways on a narrow window rather than crushing the columns. The
header and body scroll together because both sit inside this wrapper. */
.tablewrap {
border: 1px solid var(--line); border-radius: 10px;
overflow: hidden auto; overflow-x: auto;
}
.tablewrap .thead, .tablewrap .tbody { min-width: 1250px; }
.tablewrap.multi .thead, .tablewrap.multi .tbody { min-width: 1300px; }
.tablewrap.grouped .thead, .tablewrap.grouped .tbody { min-width: 1350px; }
.thead, .row {
display: grid;
/* Duration columns are wide because they read "23 hours 45 min", not "23.75". */
/* "23h 45min" measures 83px with padding, so 94px leaves real headroom;
170px fits the longest diagnosis pill, "Structurally underfunded". */
grid-template-columns: minmax(180px, 2fr) 92px 92px 60px 60px 56px 126px 86px 58px 176px 140px;
align-items: center;
}
/* Per-day grain: one campaign has one row per day, so the date must be shown. */
.tablewrap.multi .thead, .tablewrap.multi .row {
grid-template-columns: minmax(150px, 1.8fr) 76px 92px 92px 56px 56px 52px 112px 82px 56px 176px 138px;
}
/* Per-campaign grain: days collapse into one row with a per-day heat strip. */
.tablewrap.grouped .thead, .tablewrap.grouped .row {
grid-template-columns: minmax(170px, 1.9fr) 56px 92px 92px 92px 56px 100px 64px 82px 56px 176px 138px;
}
.row .date { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.thead {
background: var(--line-2); border-bottom: 1px solid var(--line);
font-size: 11px; font-weight: 700; letter-spacing: .04em;
text-transform: uppercase; color: var(--ink-2);
}
/* Wrap rather than collide: two-word headers need the second line. */
.thead > div { padding: 8px 10px; cursor: pointer; user-select: none; line-height: 1.2; }
.thead > div:hover { color: var(--ink); }
.thead .num, .row .num { text-align: right; font-variant-numeric: tabular-nums; }
.thead .sorted { color: var(--accent); }
.tbody { position: relative; overflow-y: auto; max-height: 620px; }
.tbody:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rows { position: absolute; inset: 0 0 auto 0; }
.spacer { width: 1px; }
.row {
position: absolute; left: 0; right: 0; height: var(--row-h);
border-bottom: 1px solid var(--line-2); cursor: pointer;
background: var(--panel);
}
.row:hover { background: var(--line-2); }
.row > div { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .name { font-size: 12.5px; }
.row .num { font-size: 12.5px; }
.row .num.run, table.grid td.run { color: var(--green); }
.row .num.out, table.grid td.out { color: var(--red); font-weight: 600; }
/* Durations must never wrap or ellipsis -- "23h 45min" is the widest case. */
.row .num.dur { white-space: nowrap; }
/* Base style is unscoped so timeline strips also work inside the drawer. */
.strip {
height: 15px; border-radius: 3px;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.row .strip { margin: 0 10px; width: calc(100% - 20px); }
.row .dx { font-size: 11px; }
.row .act { font-size: 11px; }
.row .act .stale {
display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 600;
background: var(--red-soft); color: var(--red); white-space: nowrap;
overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.row .act .fresh { color: var(--ink-2); white-space: nowrap; }
.pill {
display: inline-block; padding: 2px 8px; border-radius: 999px;
font-size: 10.5px; font-weight: 600; white-space: nowrap;
overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.dx-under { background: var(--red-soft); color: var(--red); }
.dx-early { background: var(--amber-soft); color: var(--amber); }
.dx-thrash { background: #ede9fe; color: #6d28d9; }
.dx-evening { background: var(--amber-soft); color: var(--amber); }
.dx-inter { background: #dbeafe; color: #1d4ed8; }
.dx-healthy { background: var(--green-soft); color: var(--green); }
.dx-paused { background: var(--line-2); color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
.dx-thrash { background: #2e1f4d; color: #c4b5fd; }
.dx-inter { background: #17294d; color: #93c5fd; }
}
.unpriced { color: var(--ink-3); font-style: italic; font-size: 11.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 11px; font-size: 11.5px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.empty { padding: 44px; text-align: center; color: var(--ink-3); }
/* ----------------------------------------------------------------- quality */
.quality { display: grid; gap: 9px; }
.qrow {
display: grid; grid-template-columns: 84px minmax(180px, 1fr) 150px 2.4fr;
gap: 14px; align-items: start; padding: 11px 13px;
border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px;
}
.qrow .badge {
font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
padding: 3px 8px; border-radius: 6px; text-align: center;
}
.q-ok .badge { background: var(--green-soft); color: var(--green); }
.q-review .badge { background: var(--amber-soft); color: var(--amber); }
.q-fail .badge { background: var(--red-soft); color: var(--red); }
.q-fail { border-color: var(--red); }
.qrow .qval { font-variant-numeric: tabular-nums; color: var(--ink); }
.qrow .qnote { color: var(--ink-2); }
/* --------------------------------------------------------------- recurring */
table.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: right; }
table.grid th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
table.grid th:first-child, table.grid td:first-child { text-align: left; }
table.grid td { font-variant-numeric: tabular-nums; }
/* Durations sit on one line and share a column width so "2h 5min" lines up
under "23h 45min" instead of drifting. */
table.grid td.dur { white-space: nowrap; min-width: 78px; }
table.grid th small { display: block; font-size: 9px; font-weight: 500; opacity: .7; }
.trend-worse { color: var(--red); font-weight: 600; }
.trend-better { color: var(--green); }
.spark { display: inline-flex; align-items: flex-end; gap: 1px; height: 18px; }
.spark i { width: 4px; background: var(--red); opacity: .8; border-radius: 1px; }
/* ------------------------------------------------------------------ drawer */
.drawer {
position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 94vw); z-index: 60;
background: var(--panel); border-left: 1px solid var(--line);
box-shadow: -12px 0 40px rgba(16,32,46,.14); padding: 20px; overflow-y: auto;
}
.drawer-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.drawer-head h2 { font-size: 15px; word-break: break-word; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(16,32,46,.35); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dgrid div { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.dgrid .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.dgrid .v { font-size: 17px; font-weight: 640; font-variant-numeric: tabular-nums; margin-top: 3px; }
.dstrip { height: 26px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.drawer h3 { margin: 18px 0 8px; }
/* ------------------------------------------------------- action log (drawer) */
.act-none, .act-yes {
border-radius: 9px; padding: 12px 14px; margin-bottom: 10px;
border-left: 3px solid var(--line);
}
.act-none { background: var(--red-soft); border-left-color: var(--red); }
.act-none strong { color: var(--red); font-size: 13.5px; }
.act-yes { background: var(--line-2); border-left-color: var(--green); }
.act-yes strong { font-size: 13.5px; }
.act-none p, .act-yes p { margin-top: 5px; font-size: 12px; color: var(--ink-2); }
.act-stale-text { color: var(--red); }
table.act-log td { font-size: 11.5px; vertical-align: top; }
table.act-log td:last-child { color: var(--ink-2); word-break: break-word; }
.pill.act-budget { background: #dbeafe; color: #1d4ed8; }
.pill.act-placement { background: #ede9fe; color: #6d28d9; }
.pill.act-strategy { background: #fce7f3; color: #be185d; }
.pill.act-bid { background: var(--green-soft); color: var(--green); }
.pill.act-targeting { background: var(--amber-soft); color: var(--amber); }
.pill.act-status { background: var(--line-2); color: var(--ink-2); }
.pill.act-structure { background: #e0f2fe; color: #0369a1; }
.pill.act-portfolio { background: var(--line-2); color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
.pill.act-budget { background: #17294d; color: #93c5fd; }
.pill.act-placement { background: #2e1f4d; color: #c4b5fd; }
.pill.act-strategy { background: #401027; color: #f9a8d4; }
.pill.act-structure { background: #0c2b3d; color: #7dd3fc; }
}
/* ---------------------------------------------------------------- settings */
dialog {
border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
background: var(--panel); color: var(--ink); max-width: 440px; box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(16,32,46,.4); }
dialog label { display: block; margin: 16px 0; font-size: 12.5px; font-weight: 600; }
dialog input {
display: block; width: 100%; margin-top: 5px; font: inherit; padding: 7px 10px;
border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink);
}
dialog small { display: block; margin-top: 4px; font-weight: 400; color: var(--ink-3); }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 20px 0 0; }
@media (max-width: 1100px) {
.thead, .row { grid-template-columns: minmax(160px, 2fr) 66px 60px 56px 150px 160px; }
.thead > div:nth-child(n+7), .row > div:nth-child(n+7) { display: none; }
}