/* «Вигляд В» (the user, 04.11.2026: «Хочу побачити дизайн в такому стилі» — the screen recording of a light sales dashboard): monochrome
   surfaces, white cards on a light grey page, generous rounding, the chosen pill black (white in the dark theme) and sliding, one inverted
   card leading each row of tiles, small delta chips, the theme switched by a circle growing from its button. Laid over «Вигляд Б»
   (theme.css, ui.css, shell.css), which stays as it was: this file alone takes it back. The colours of the data series are not touched:
   the charts keep telling their series apart. */
:root {
  --page: #f1f1ef;
  --surface: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #5d5c58;
  --muted: #8f8e88;
  --grid: #ececea;
  --ring: rgba(11, 11, 11, 0.07);
  --hover-bg: #f5f5f3;
  /* the chosen pill: the ink itself, its text the page's */
  --sel-bg: var(--ink);
  --sel-fg: #ffffff;
  --sel-ring: transparent;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .07);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 6px 20px rgba(0, 0, 0, .04);
  --radius: 18px;
  --radius-sm: 12px;
  --chip-good: color-mix(in srgb, #10b25b 16%, var(--surface));
  --chip-bad: color-mix(in srgb, #e5484d 15%, var(--surface));
  --invert-bg: #0b0b0b;
  --invert-fg: #ffffff;
  --invert-2: #a7a6a0;
}
:root[data-theme="dark"] {
  --page: #0a0a0a;
  --surface: #161616;
  --ink: #f4f4f2;
  --ink-2: #b3b2ac;
  --muted: #7d7c77;
  --grid: #242423;
  --ring: rgba(255, 255, 255, 0.07);
  --hover-bg: #1f1f1e;
  --sel-bg: #f4f4f2;
  --sel-fg: #0b0b0b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .55);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  /* the first tile stays dark in the dark theme too (05.11.2026, «цю плитку також треба зробити темною») */
  --invert-bg: #0b0b0b;
  --invert-fg: #f4f4f2;
  --invert-2: #a7a6a0;
}

body { font-feature-settings: "tnum" 0; letter-spacing: -0.003em; }
h1, h2 { letter-spacing: -0.02em; }

/* the menu: one rounded bar, the chosen section a black pill that slides (nav.ts placeInk), the pages under it the same way */
.navbar { border-radius: var(--radius); border-color: var(--ring); box-shadow: var(--card-shadow); }
.tab-groups { gap: 2px; padding: 6px; }
.tab-groups a { border-radius: 999px; font-weight: 550; }
.tab-groups a[aria-current="page"] { background: var(--sel-bg); color: var(--sel-fg); box-shadow: none; }
.tab-groups.has-ink a[aria-current="page"] { color: var(--sel-fg); }
.group-ink { background: var(--sel-bg); box-shadow: none; border-radius: 999px; }
.tabs { box-shadow: none; padding: 6px; gap: 2px; --ink-shape: pill; }
.tabs:not([hidden]) { border-top: 1px solid var(--grid); }
.tab { border-radius: 999px; border-bottom: 0; padding: 7px 14px; font-size: 14px; font-weight: 550; }
.tab[aria-selected="true"] { color: var(--sel-fg); background: var(--sel-bg); }
.tabs.has-ink .tab[aria-selected="true"] { background: transparent; }
.tab-ink { background: var(--sel-bg); border-radius: 999px; }

/* every other «chosen» of «Вигляд Б» that took --sel-bg without its text colour (the user's screenshot of 04.11.2026: the map's period and
   layer buttons white on white in the dark theme) */
.map-seg .map-mode[aria-pressed="true"],
.map-seg .map-mode[aria-pressed="true"]:hover:not(:disabled),
.mon-toggle[aria-pressed="true"],
.sound-edit-bar .btn[aria-pressed="true"],
.palette-list li.on,
.pill.out.on { color: var(--sel-fg); }
.palette-list li.on .p-where { color: color-mix(in srgb, var(--sel-fg) 70%, var(--sel-bg)); }
.pill.out.on::before { background: var(--sel-fg); }

/* pills and buttons */
.pill { border-color: var(--ring); background: var(--surface); }
.btn { border-radius: 999px; border-color: var(--ring); padding: 7px 14px; }
.btn-sm { padding: 4px 11px; }
.btn-accent { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-fg); }
.btn-accent:hover { background: color-mix(in srgb, var(--sel-bg) 85%, var(--page)); }
.seg { border-radius: 999px; padding: 3px; border-color: var(--ring); }
.seg button { border-radius: 999px; padding: 5px 12px; }
.seg button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); box-shadow: none; }
input:not([type="checkbox"]):not([type="radio"]), select { border-radius: 10px; }

/* cards and tiles: white, rounded, a soft shadow; the first tile of a row inverted, as the leading card of the recording */
.card, .notices, .palette { border-radius: var(--radius); border-color: var(--ring); box-shadow: var(--card-shadow); }
.notices, .palette { box-shadow: var(--shadow); }
.tile { border-radius: var(--radius); border-color: var(--ring); box-shadow: var(--card-shadow); padding: 16px 18px 15px; }
.tile .label { font-size: 12.5px; }
.tile .value { font-weight: 650; letter-spacing: -0.03em; }
.kpis > .tile:first-child { background: var(--invert-bg); color: var(--invert-fg); border-color: transparent; }
.kpis > .tile:first-child .label, .kpis > .tile:first-child .note { color: var(--invert-2); }
/* the delta, a small chip as in the recording («↑ 8.1%») */
.tile .delta { display: inline-block; padding: 1px 7px; border-radius: 999px; font-weight: 600; font-size: 11.5px; }
.tile .delta.good { background: var(--chip-good); }
.tile .delta.bad { background: var(--chip-bad); }
.kpis > .tile:first-child .delta.good { background: color-mix(in srgb, #10b25b 30%, var(--invert-bg)); color: #7ee2a8; }
.kpis > .tile:first-child .delta.bad { background: color-mix(in srgb, #e5484d 30%, var(--invert-bg)); color: #ff9a9d; }

/* tables: lighter rules */
.dt th { color: var(--muted); font-weight: 550; }
.dt td { border-bottom-color: var(--grid); }
.table-wrap { border-radius: var(--radius-sm); }

/* the theme switched by a circle growing from its button (main.ts, View Transitions): the old and the new page are not cross-faded */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
