/* ============================================================
   CoolingBed Insights — internal dashboard
   Same brand system as coolingbed/product + thank-you:
   Lilita One display · Bebas Neue labels · Schibsted body.
   Editorial, flat, hairline borders. Shadows are rare and soft
   (no hard offset boxes, no left-rails). Strong type hierarchy.
   ============================================================ */
:root {
  --ink: #0E2A35; --ink-2: #04141E;
  --cyan: #4FC3E8; --teal: #147A93; --teal-d: #0E5F73;
  --ice-1: #8FD8F0; --ice-2: #CDEBF3; --ice-3: #EAF6FA; --ice-4: #F4FBFF;
  --orange: #FF7A4D; --orange-d: #C4593A; --gold: #FFC53D; --green: #1E9E5A;
  --line: #DCEAEF; --line-2: #C9DEE6; --muted: #44606A; --muted-2: #6C8792;
  --paper: #FFFFFF; --snow: #F3F9FB;
  --disp: 'Lilita One', system-ui, sans-serif;
  --cond: 'Bebas Neue', system-ui, sans-serif;
  --body: 'Schibsted Grotesk', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 2px rgba(14,42,53,.04), 0 8px 30px rgba(14,42,53,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--snow); -webkit-font-smoothing: antialiased; line-height: 1.55; }
::selection { background: var(--cyan); color: var(--ink); }
img { max-width: 100%; display: block; }
b, strong { font-weight: 800; }
a { color: var(--teal); }

/* ---------- top header (white bar, matches the storefront) ---------- */
.db-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.db-top-in { max-width: 1180px; margin: 0 auto; padding: 13px 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.db-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.db-logo-img { height: 24px; width: auto; }
.db-brand-tag { font-family: var(--cond); letter-spacing: .17em; font-size: 15px; color: var(--teal); text-transform: uppercase; border-left: 1px solid var(--line-2); padding-left: 12px; line-height: 1; }
.db-source { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.db-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.db-dot--demo { background: var(--gold); box-shadow: 0 0 0 3px rgba(255,197,61,.22); }
.db-dot--live { background: var(--green); box-shadow: 0 0 0 3px rgba(30,158,90,.2); }

/* ---------- tabs (underline, not pills) ---------- */
.db-tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 51px; z-index: 30; }
.db-tabs-in { max-width: 1180px; margin: 0 auto; padding: 0 26px; display: flex; gap: 30px; }
.db-tab { appearance: none; background: none; border: 0; cursor: pointer; font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: 18px; color: var(--muted-2); padding: 15px 2px; position: relative; transition: color .15s; }
.db-tab:hover { color: var(--ink); }
.db-tab.is-on { color: var(--ink); }
.db-tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--orange); border-radius: 3px 3px 0 0; }

/* ---------- layout ---------- */
.db-main { max-width: 1180px; margin: 0 auto; padding: 34px 26px 80px; }
.db-view { display: none; }
.db-view.is-on { display: block; animation: db-fade .3s var(--ease); }
@keyframes db-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.db-view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.db-view-head h2 { font-family: var(--disp); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.02; letter-spacing: .006em; margin: 0; }
.db-view-head p { margin: 7px 0 0; color: var(--muted); font-size: 15px; max-width: 60ch; }
.db-eyebrow { font-family: var(--cond); letter-spacing: .16em; font-size: 14px; color: var(--teal); text-transform: uppercase; margin: 0 0 3px; }

.db-sheet-btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--cond); letter-spacing: .05em; font-size: 15.5px; text-transform: uppercase; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; padding: 9px 16px; text-decoration: none; white-space: nowrap; transition: transform .1s var(--ease), box-shadow .1s var(--ease); box-shadow: 3px 3px 0 var(--ink); }
.db-sheet-btn:hover { transform: translate(1.5px,1.5px); box-shadow: 1.5px 1.5px 0 var(--ink); }
.db-sheet-btn svg { width: 15px; height: 15px; }

/* ---------- section grouping ---------- */
.db-section { margin-top: 40px; }
.db-section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.db-section-head h3 { font-family: var(--cond); font-weight: 400; text-transform: uppercase; letter-spacing: .05em; font-size: 24px; line-height: 1; margin: 0; color: var(--ink); }
.db-section-head .db-hint { font-size: 13px; color: var(--muted-2); font-weight: 500; }

/* ---------- KPI row ---------- */
.db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.db-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 17px 18px 16px; position: relative; overflow: hidden; }
.db-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); }
.db-kpi--warn::before { background: var(--orange); }
.db-kpi--good::before { background: var(--green); }
.db-kpi--gold::before { background: var(--gold); }
.db-kpi-lbl { font-family: var(--cond); letter-spacing: .11em; text-transform: uppercase; font-size: 13.5px; color: var(--muted-2); }
.db-kpi-val { font-weight: 800; font-size: clamp(24px, 3vw, 33px); line-height: 1.08; letter-spacing: -.01em; margin: 5px 0 3px; font-variant-numeric: tabular-nums; word-break: break-word; }
.db-kpi-val.is-text { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.15; }
.db-kpi-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- cards + chart grid ---------- */
.db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.db-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; }
.db-card-head { margin-bottom: 15px; }
.db-card-head h4 { font-family: var(--cond); font-weight: 400; text-transform: uppercase; letter-spacing: .045em; font-size: 19px; line-height: 1.05; margin: 0; color: var(--ink); }
.db-decide { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--teal); font-weight: 600; }
.db-card--wide { grid-column: 1 / -1; }

/* ---------- horizontal bars ---------- */
.db-bars { display: flex; flex-direction: column; gap: 11px; }
.db-bar { display: grid; grid-template-columns: 1fr; gap: 5px; }
.db-bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.db-bar-lbl { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.db-bar-val { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-bar-val em { font-style: normal; color: var(--muted-2); font-weight: 600; }
.db-bar-track { height: 9px; background: var(--ice-3); border-radius: 6px; overflow: hidden; }
.db-bar-track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--cyan), var(--teal)); width: 0; transition: width .8s var(--ease); }
.db-bar--hot .db-bar-track i { background: linear-gradient(90deg, #FF9D74, var(--orange-d)); }
.db-bar--lead .db-bar-lbl { color: var(--teal-d); }
.db-empty { color: var(--muted-2); font-size: 13.5px; padding: 14px 0; text-align: center; font-style: italic; }

/* ---------- split (satisfaction) ---------- */
.db-split { display: flex; height: 15px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.db-split i { display: block; height: 100%; transition: width .8s var(--ease); }
.db-split-good { background: var(--green); }
.db-split-bad { background: var(--orange); }
.db-split-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; }
.db-split-legend b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; display: block; }
.db-split-legend .lg-good b { color: var(--green); }
.db-split-legend .lg-bad { text-align: right; }
.db-split-legend .lg-bad b { color: var(--orange-d); }
.db-split-legend span { color: var(--muted-2); font-weight: 600; text-transform: uppercase; font-family: var(--cond); letter-spacing: .08em; font-size: 12.5px; }

/* ---------- voice of customer: phrase chips ---------- */
.db-phrases { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.db-phrase { display: inline-flex; align-items: baseline; gap: 7px; background: var(--ice-3); border: 1px solid var(--line); border-radius: 20px; padding: 6px 13px; color: var(--ink); line-height: 1; }
.db-phrase .pw { font-weight: 700; }
.db-phrase .pn { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--teal); border-radius: 10px; padding: 2px 7px; }
.db-phrase--xl .pw { font-size: 20px; } .db-phrase--xl { background: var(--ice-2); }
.db-phrase--lg .pw { font-size: 17px; }
.db-phrase--md .pw { font-size: 15px; }
.db-phrase--sm .pw { font-size: 13.5px; }

/* ---------- voice of customer: quote cards ---------- */
.db-quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px; }
.db-quote { background: var(--ice-4); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px 13px; display: flex; flex-direction: column; gap: 10px; }
.db-quote-mark { font-family: var(--disp); font-size: 28px; line-height: .5; color: var(--cyan); height: 14px; }
.db-quote-txt { font-size: 14.5px; line-height: 1.5; color: var(--ink); flex: 1; }
.db-quote-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 9px; }
.db-quote-meta { font-size: 11.5px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.db-copy { appearance: none; border: 1px solid var(--line-2); background: #fff; border-radius: 7px; padding: 4px 10px; font-family: var(--cond); letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; color: var(--teal); cursor: pointer; transition: background .12s, color .12s; white-space: nowrap; }
.db-copy:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.db-copy.is-done { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- data table ---------- */
.db-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.db-table-scroll { overflow-x: auto; }
.db-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.db-table thead th { text-align: left; font-family: var(--cond); letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: var(--muted-2); font-weight: 400; padding: 13px 15px; background: var(--snow); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.db-table tbody td { padding: 12px 15px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.db-table tbody tr:last-child td { border-bottom: 0; }
.db-table tbody tr:hover td { background: var(--snow); }
.db-table td.db-td-strong { font-weight: 700; }
.db-table td.db-td-quote { color: var(--muted); max-width: 340px; }
.db-tag { display: inline-block; background: var(--ice-3); border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 600; color: var(--teal-d); }

/* ---------- info / connect banner ---------- */
.db-note { display: flex; gap: 13px; align-items: flex-start; background: #FFF9E9; border: 1px solid #F1DFA6; border-radius: 12px; padding: 14px 17px; margin-bottom: 26px; font-size: 13.5px; line-height: 1.5; color: #6A5518; }
.db-note[hidden] { display: none; } /* author display:flex above would otherwise beat the UA [hidden] rule */
.db-note svg { flex: none; width: 19px; height: 19px; color: var(--gold); margin-top: 1px; }
.db-note b { color: #4A3B0E; }
.db-note code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

.db-foot { max-width: 1180px; margin: 0 auto; padding: 26px; color: var(--muted-2); font-size: 12.5px; border-top: 1px solid var(--line); text-align: center; }

@media (max-width: 620px) {
  .db-top-in, .db-tabs-in, .db-main { padding-left: 16px; padding-right: 16px; }
  .db-brand-tag { display: none; }
  .db-view-head h2 { font-size: 27px; }
  .db-grid { grid-template-columns: 1fr; }
}
