/*
 * The operator panel to Nikola's design of 2026-10-14 (apps/backend/docs/panel-design-2026-10-14.md, task 0015 part 1):
 * the design's own look, not the TV's design system. Dark by default, light under html[data-theme='light'] (the
 * server writes the attribute from a cookie, src/panel/look.ts). Three layouts from one markup: the menu at the left
 * from 1100 pixels, an icon rail from 700, tabs at the foot below 700. No script is needed to read or change anything.
 *
 * The Chromium 63 CSS floor of code rule 5.2 holds here too (scripts/test/panel-stylesheet.test.mjs): margins and
 * grid-gap instead of flexbox gap, :focus instead of :focus-visible, no min(), max() or clamp(), no inset. No style
 * attribute anywhere, since the Content-Security-Policy refuses inline styles.
 */

/* Roboto Condensed, the product's typeface since task 0283 (Nikola, 2026-10-29: "svuda Roboto", task 0340; DM Sans and
   Syne before): Regular 400 for the body, Bold 700 for headings and every weight above 500 (the design's 600 and 800
   draw it, never a false bold), Italic 400 should a text ask for it. The same Fontsource 5.3.0 files as
   apps/web/src/fonts, unchanged, under the SIL Open Font License (OFL.txt beside them); the customer portal serves
   them too (src/portal/fonts.ts). Latin, Latin Extended and Cyrillic subsets: unicode-range makes the browser fetch a
   subset's file only when a text needs one of its letters. swap: the system font shows while a file loads, then this one.
   The TV preview of the Brand page draws the TV's headline at 800, Bold here too. */
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(roboto-condensed-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(roboto-condensed-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(roboto-condensed-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(roboto-condensed-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(roboto-condensed-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(roboto-condensed-cyrillic-400-italic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(roboto-condensed-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(roboto-condensed-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(roboto-condensed-cyrillic-700-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* The design's tokens, dark first (its "tamna"), then light. */
:root,
html[data-theme='dark'] {
  --page: #10141a;
  --side: #141920;
  --card: #181e26;
  --card2: #1e252e;
  --line: #252d38;
  --line2: #323c49;
  --field: #6f7884;
  --text: #e6ebf0;
  --muted: #9aa5b1;
  --faint: #868f9a;
  --hover: #202833;
  --acc: #3cc2ab;
  --acc-hover: #5ed1be;
  --acc-soft: rgba(60, 194, 171, 0.14);
  --acc-ink: #7fe0cf;
  --on-acc: #062520;
  --warn: #e3a94a;
  --warn-bg: rgba(227, 169, 74, 0.14);
  --danger: #e57c78;
  --danger-bg: rgba(229, 124, 120, 0.14);
  --info: #a9c2e6;
  --info-bg: rgba(120, 160, 220, 0.15);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --veil: rgba(0, 0, 0, 0.55);
  --logo: #e5b975;
  --logo-play: #2a140b;
  --tv-bg: #100c0a;
  --tv-mod: #211a16;
  --tv-text: #f4f1ec;
  --tv-dim: #b0a59c;
  --tv-acc: #e5b975;
  color-scheme: dark;
}

/*
 * Four of the design's colours moved to the nearest shade of the same hue with 4.5:1 for text (filler 17, the lead's
 * answer of 2026-10-26): faint #8995a1 to #666f78 (light) and #6c7785 to #868f9a (dark), the light accent #1b9a86 to
 * #167e6e under white button text (hover #16826f to #116658), the light warning #a8701a to #946316.
 * Filler 151 (WCAG 2.1 AA): the light danger #b9504c to #a64643, 4.8:1 on its own fill where the form's problems are
 * written (3.99:1 before); --field, the border of a text field or a list box, 3:1 against every surface it sits on
 * (1.4.11), where --line2 gave 1.4:1 and the field's fill is the card's own.
 */
html[data-theme='light'] {
  --page: #f3f5f7;
  --side: #ffffff;
  --card: #ffffff;
  --card2: #f6f8fa;
  --line: #e3e8ed;
  --line2: #d2d9e1;
  --field: #7a838d;
  --text: #17202a;
  --muted: #5a6672;
  --faint: #666f78;
  --hover: #eef2f5;
  --acc: #167e6e;
  --acc-hover: #116658;
  --acc-soft: #ddf2ee;
  --acc-ink: #0c5c50;
  --on-acc: #ffffff;
  --warn: #946316;
  --warn-bg: #fbf0dc;
  --danger: #a64643;
  --danger-bg: #f9e4e3;
  --info: #3a5a80;
  --info-bg: #e5ecf6;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 56px rgba(16, 24, 40, 0.18);
  --veil: rgba(16, 24, 40, 0.35);
  --logo: #311c09;
  --logo-play: #e5b975;
  --tv-bg: #17120f;
  --tv-mod: #28201b;
  --tv-text: #f4f1ec;
  --tv-dim: #b0a59c;
  --tv-acc: #e5b975;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
}

body {
  font: 14px/1.5 'Roboto Condensed', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--acc-ink);
}

form {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The first link of a signed-in page (WCAG 2.4.1): out of sight until focused, then over the header's corner. Main
   takes the focus it hands over (tabindex -1), with no ring around the whole page. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 11px;
  background: var(--acc);
  color: var(--on-acc);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

main:focus {
  outline: none;
}

.icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

/* The frame. */
body.framed .frame {
  min-height: 100vh;
}

.column {
  min-width: 0;
}

.side {
  display: none;
}

@media (min-width: 700px) {
  body.framed .frame {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .side {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--side);
    border-right: 1px solid var(--line);
  }
}

@media (min-width: 1100px) {
  body.framed .frame {
    grid-template-columns: 248px minmax(0, 1fr);
  }
}

.brand {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 18px;
  flex: none;
}

.mark {
  width: 30px;
  height: 30px;
  flex: none;
}

/* KokiePlay's mark (src/panel/icons.ts): its own two colours on each theme, apart from the turquoise accent. */
.mark-biscuit {
  fill: var(--logo);
}

.mark-play {
  fill: var(--logo-play);
  stroke: var(--logo-play);
}

.brand-text {
  margin-left: 10px;
  min-width: 0;
}

.brand-name {
  display: block;
  font: 700 16px/1.2 'Roboto Condensed', system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--faint);
}

nav.menu {
  padding: 4px 12px 12px;
}

nav.menu .group {
  margin: 18px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

nav.menu .item {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  margin: 0 0 2px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
}

nav.menu .item .icon {
  margin-right: 12px;
}

nav.menu .item:hover {
  background: var(--hover);
  color: var(--text);
}

nav.menu .item[aria-current='page'] {
  background: var(--acc-soft);
  color: var(--acc-ink);
  font-weight: 700;
}

.side-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.seg {
  display: inline-block;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card2);
  white-space: nowrap;
  vertical-align: middle;
}

.seg button {
  height: 32px;
  min-width: 36px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 700 12px/32px 'Roboto Condensed', system-ui, sans-serif;
  cursor: pointer;
}

/* Its own hover: the accent of button:hover under the muted text would be unreadable. */
.seg button:hover {
  background: var(--hover);
  color: var(--text);
}

.seg button[aria-pressed='true'] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.seg.theme {
  display: block;
  margin: 0 0 12px;
}

.seg.theme button {
  width: 50%;
  font-size: 13px;
}

.user {
  display: flex;
  align-items: center;
}

.avatar {
  display: inline-block;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--acc-soft);
  color: var(--acc-ink);
  font: 700 13px/36px 'Roboto Condensed', system-ui, sans-serif;
  text-align: center;
}

/* The menu foot's avatar, a link to Your sign-in (task 0169). */
a.avatar {
  text-decoration: none;
}

a.avatar:hover {
  color: var(--acc-ink);
  background: var(--hover);
}

.user-text {
  margin-left: 10px;
  min-width: 0;
}

.user-name,
.user-role,
.user-link {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-name {
  font-weight: 700;
}

.user-role,
.user-link {
  font-size: 12px;
}

.user-role {
  color: var(--muted);
}

.sign-out {
  margin: 10px 0 0;
}

/* The tablet's icon rail. */
@media (min-width: 700px) and (max-width: 1099px) {
  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-text,
  .side nav.menu .group,
  .side .seg,
  .side .user-text {
    display: none;
  }

  .side nav.menu {
    padding: 8px 8px 12px;
  }

  .side nav.menu .item {
    flex-direction: column;
    justify-content: center;
    width: 72px;
    height: auto;
    min-height: 60px;
    margin: 0 auto 4px;
    padding: 8px 4px;
    text-align: center;
  }

  .side nav.menu .item .icon {
    width: 22px;
    height: 22px;
    margin: 0 0 4px;
  }

  .side nav.menu .item .label {
    font-size: 11px;
    line-height: 1.2;
  }

  .side .side-foot {
    padding: 12px 6px;
  }

  .side .user {
    justify-content: center;
  }

  .side .sign-out {
    text-align: center;
  }

  .side .sign-out button {
    padding: 0 6px;
    font-size: 11px;
  }
}

/*
 * The bar while viewing the panel as someone else (task 0117, row 8.60): above the header of every page, held at the
 * top of the content as it scrolls, with Back. The warning's colour on the menu's, so it reads as a state, not a page.
 */
.view-as-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: var(--side);
  border-bottom: 3px solid var(--warn);
  box-shadow: var(--shadow);
}

/* The platform's status notice (filler 24): one line above the header on every page while it is posted. */
.status-notice {
  padding: 8px 20px;
  background: var(--info-bg);
  color: var(--info);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.status-notice p {
  margin: 0;
}

.view-as-text {
  margin: 0;
  min-width: 0;
}

.view-as-text strong {
  color: var(--warn);
}

.view-as-note {
  color: var(--muted);
  font-size: 13px;
}

.view-as-back {
  flex: none;
  margin: 0 0 0 12px;
}

.view-as-card form label {
  margin-right: 6px;
}

/* The header, in the menu's colour as the design draws it (comparison 0019, defect 2). */
.head {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--side);
}

.head > * {
  margin-left: 8px;
}

.head > :first-child {
  margin-left: 0;
}

.head-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.head-button {
  display: inline-block;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  line-height: 38px;
  text-align: center;
  cursor: pointer;
}

.head-button:hover,
.head-search:hover,
.help-item:hover,
.back:hover {
  background: var(--hover);
}

.toggle {
  display: inline-block;
}

.back {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.back .icon {
  margin-right: 4px;
}

.head-search {
  display: inline-flex;
  align-items: center;
  height: 40px;
  min-width: 220px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
}

.head-search .label {
  flex: 1;
  margin: 0 12px 0 8px;
}

/* The Help menu (pull request 8 of the panel plan): the header's round button, a <details> whose box opens below it at
   the right, 260 wide, on a tablet and a phone too. Its links are reached with Tab; the summary takes focus as a
   button does. */
details.help-menu {
  position: relative;
}

details.help-menu > summary {
  list-style: none;
}

details.help-menu > summary::-webkit-details-marker {
  display: none;
}

details.help-menu > summary:focus {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

details.help-menu[open] > summary {
  background: var(--hover);
}

.help-box {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 20;
  width: 260px;
  padding: 6px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.help-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.help-item .label {
  min-width: 0;
  margin-left: 10px;
}

.help-address {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: break-word;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  color: var(--muted);
  font: 700 11px/16px 'Roboto Condensed', system-ui, sans-serif;
}

/* The menu button opens /panel/menu on a phone only: from 700 the rail or the menu shows every page (task 0169), and the
   rail's avatar opens Your sign-in. A tablet's search box gives up its 220 so that the header keeps its Help menu. */
@media (min-width: 700px) {
  .menu-button {
    display: none;
  }
}

@media (min-width: 700px) and (max-width: 1099px) {
  .head-search {
    min-width: 0;
  }
}

/* The page. */
.content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.content.narrow {
  max-width: 560px;
}

body.plain .content {
  max-width: 480px;
  padding-top: 56px;
}

/* The privacy policy (src/panel/privacy-page.ts): a wider column for reading, the draft's line and its review marks. */
body.plain .content.site {
  max-width: 760px;
  padding-top: 32px;
}

.draft-banner {
  padding: 10px 14px;
  border-radius: 11px;
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: 700;
}

.policy-lang {
  text-align: right;
}

section.card.policy ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

section.card.policy li {
  margin: 0 0 6px;
}

/* The sign-in pages' footer: the privacy policy. */
.site-foot {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 32px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

mark.draft-mark {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: 700;
}

h1 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

h1 + h2 {
  margin: -8px 0 16px;
  color: var(--muted);
}

p {
  margin: 0 0 12px;
}

section.card {
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

section.card > :last-child {
  margin-bottom: 0;
}

.muted,
p.muted,
span.muted,
td.muted {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Forms. */
form.inline {
  display: inline;
}

form.stack label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

/* A confirmation box with its sentence (the guide pages' licence box). */
form.stack label.check {
  font-weight: 400;
}

/* The guide page's coverage: its line, a bar in the accent colour and where the guides come from. */
.coverage-line {
  font-size: 18px;
  font-weight: 700;
}

progress.coverage-bar {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 9px;
  margin: 0 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--card2);
  color: var(--acc);
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}

progress.coverage-bar::-webkit-progress-bar {
  border-radius: 6px;
  background: var(--card2);
}

progress.coverage-bar::-webkit-progress-value {
  border-radius: 6px;
  background: var(--acc);
}

progress.coverage-bar::-moz-progress-bar {
  border-radius: 6px;
  background: var(--acc);
}

/* The guide page's Confirm all and Reject all above its channels table: the count's sentence, then both buttons. */
.guide-bulk {
  margin: 0 0 14px;
}

.guide-bulk form.inline + form.inline {
  margin-left: 8px;
}

/* The Logos page's preview of our logo (task 0269): on white, since many logos are dark on transparent. */
img.logo-preview {
  max-width: 96px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #fff;
  vertical-align: middle;
}

/* The Logos page's Library tab (task 0363): our logos as a grid of cards, the 60-pixel image on white at the top. Grid
   with grid-gap, not flexbox gap (the floor). */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.logo-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow-wrap: break-word;
}

.logo-card p {
  margin: 6px 0 0;
}

.logo-card .logo-image {
  height: 68px;
  line-height: 68px;
}

.logo-card img.logo-preview {
  max-width: 100%;
  height: 60px;
}

.logo-card .logo-alt {
  font-size: 12px;
}

.logo-card form {
  margin-top: 8px;
}

.library-search input[type='search'] {
  width: 320px;
  max-width: 100%;
  margin-right: 8px;
}

/* An address's refresh: its words, then the list to change it and a small Save, both 34 high (the design's row
   buttons). */
form.refresh {
  display: block;
  margin-top: 6px;
  white-space: nowrap;
}

form.refresh select {
  width: auto;
  height: 34px;
  border-radius: 9px;
}

form.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

form.row > * {
  margin: 0 8px 8px 0;
}

form.row label,
form.row .form-label {
  width: 100%;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* A hint under a row form's field, such as Set date's "Blank: no end date." (task 0054). */
form.row p.muted {
  width: 100%;
  margin: 0 0 8px;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='search'],
select,
textarea {
  width: 100%;
  max-width: 420px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}

form.stack input,
form.stack select {
  height: 44px;
  font-size: 15px;
}

textarea {
  max-width: 100%;
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--acc);
}

/* Buttons: 42 high, small ones 34. */
button,
a.button,
summary.button {
  display: inline-block;
  height: 42px;
  margin: 12px 0 0;
  padding: 0 16px;
  border: 1px solid var(--acc);
  border-radius: 11px;
  background: var(--acc);
  color: var(--on-acc);
  font: 700 14px/40px 'Roboto Condensed', system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
}

button:hover,
a.button:hover {
  background: var(--acc-hover);
  border-color: var(--acc-hover);
}

/* A summary that is a button opens something in place, so it is quiet unless its own block says otherwise (the
   invite card's is the team page's main action). */
button.quiet,
a.button.quiet,
summary.button {
  background: var(--card);
  border-color: var(--line2);
  color: var(--text);
}

button.quiet:hover,
a.button.quiet:hover,
summary.button:hover {
  background: var(--hover);
  border-color: var(--line2);
}

/* A danger button is outlined on the card, as the design's "Obriši neaktivne"; filled only while hovered (comparison
   0019, defect 3). */
button.danger,
a.button.danger {
  background: var(--card);
  border-color: var(--danger);
  color: var(--danger);
}

button.danger:hover,
a.button.danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

button.small,
a.button.small {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 32px;
}

/* The line form on a customer's page (task 0028): closed behind a quiet button inside the line card until opened, a
   <details> that needs no script; open, its own heading and the form under it. */
details.enter-line {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

details.enter-line > summary.button {
  list-style: none;
  margin: 0;
}

details.enter-line > summary.button::-webkit-details-marker {
  display: none;
}

details.enter-line > summary.button:focus {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

details.enter-line[open] > summary.button {
  margin: 0 0 12px;
}

details.enter-line h3 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
}

form.row button,
td button,
.head button,
.sign-out button,
.quick button {
  margin-top: 0;
}

/* Filter chips: 34 high, fully round. */
.chip {
  display: inline-block;
  height: 34px;
  margin: 0 8px 8px 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  color: var(--text);
  font: 700 13px/32px 'Roboto Condensed', system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.chip[aria-current='page'],
.chip[aria-pressed='true'] {
  background: var(--acc-soft);
  border-color: transparent;
  color: var(--acc-ink);
}

.chip .count {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

.chip[aria-current='page'] .count {
  color: var(--acc-ink);
}

/* The customer list (task 0015 part 2): header, toolbar, bulk bar, and rows that are a grid on a computer and cards on
   a phone, from the same markup. */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 20px;
}

.page-head h1 {
  margin: 0;
}

.page-head .sub {
  margin: 4px 0 0;
  color: var(--muted);
}

.page-title {
  margin: 0 16px 8px 0;
}

.page-actions {
  margin: 0 0 8px;
}

/* A page's own buttons in its head, links and form buttons alike (Brand's Save, comparison 0019, defect 9). */
.page-actions .button,
.page-actions button {
  margin: 0 0 0 8px;
}

.page-actions .button:first-child,
.page-actions button:first-child {
  margin-left: 0;
}

form.search {
  display: flex;
  max-width: 420px;
  margin: 0 0 12px;
}

form.search input[type='search'] {
  flex: 1;
  min-width: 0;
  margin: 0 8px 0 0;
}

form.search button {
  margin: 0;
}

nav.chips {
  margin: 0 0 8px;
}

/* The customer list's toolbar (task 0169): the search, the owner switch and the chips in one row that wraps, as the
   design's card head draws them, with a line under it from the card's edge to its edge. No search button: Enter sends
   the one field, and htmx searches as it is typed. */
.ctools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 -20px 12px;
  padding: 0 20px 8px;
  border-bottom: 1px solid var(--line);
}

.ctools > * {
  margin: 0 12px 8px 0;
}

.ctools > nav.chips {
  margin: 0;
}

.ctools form.search {
  position: relative;
  display: block;
  flex: 1 1 240px;
  max-width: 420px;
}

.ctools form.search input[type='search'] {
  margin: 0;
  padding-left: 38px;
}

/* The page size (task 0649, the board's "Prikaži"): its label, a narrow select and the button that sends it. */
.ctools form.page-size {
  display: flex;
  align-items: center;
  margin: 0 0 8px auto;
}

.ctools form.page-size label {
  margin: 0 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ctools form.page-size select {
  width: auto;
  height: 34px;
  margin: 0 8px 0 0;
  font-size: 13px;
}

/* The seller choice (task 0649): a disclosure, no script, its form of ticked sellers with their counts under it. */
.ctools details.seller-choice > summary {
  list-style: none;
  cursor: pointer;
}

.ctools details.seller-choice > summary::-webkit-details-marker {
  display: none;
}

.ctools details.seller-choice > form {
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
}

.ctools details.seller-choice fieldset {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.ctools details.seller-choice label.check {
  display: block;
  margin: 0 0 6px;
}

.ctools details.seller-choice .count {
  margin-left: 6px;
  color: var(--muted);
}

/* Select by colour above the bulk bar (task 0649): the status pills as links, each with its count on this page. Its
   own row, outside the bar the script hides while nothing is ticked (review of pull request 1182). */
.bulk-colours {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 8px;
}

.bulk-colours > * {
  margin: 4px 0;
}

.bulk-colours a.badge {
  margin: 4px 6px 4px 0;
  text-decoration: none;
  line-height: 24px;
}

.bulk-colours a.badge[aria-current='true'] {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

/* Select by colour's choices (task 0665): the board's dots, green, yellow, red and black, by days to expiry. */
.bulk-colours a.badge.expiry-all {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bulk-colours a.badge.expiry-green {
  background: var(--acc-soft);
  color: var(--acc-ink);
}

.bulk-colours a.badge.expiry-yellow {
  background: var(--warn-bg);
  color: var(--warn);
}

.bulk-colours a.badge.expiry-red {
  background: var(--danger-bg);
  color: var(--danger);
}

.bulk-colours a.badge.expiry-black {
  background: var(--text);
  color: var(--page);
}

.bulk-colours .bulk-label {
  margin: 0 8px 0 0;
}

.search-icon {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--faint);
  line-height: 0;
  pointer-events: none;
}

.search-icon .icon {
  width: 17px;
  height: 17px;
}

/* The owner switch (row 8.25, task 0169): the segmented control of the header's switches, with links for parts. */
.seg.owners a {
  display: inline-block;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font: 700 13px/32px 'Roboto Condensed', system-ui, sans-serif;
  text-decoration: none;
}

.seg.owners a:hover {
  background: var(--hover);
  color: var(--text);
}

.seg.owners a[aria-current='page'] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* The account limits button's numbers, muted after its label (task 0169). */
.button-note {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

/* The bulk bar: a flat band from the card's edge to its edge, as the design draws it (comparison 0019, defect 4). */
.bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 -20px 12px;
  padding: 10px 20px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: var(--acc-soft);
  color: var(--acc-ink);
}

.bulk > * {
  margin: 4px 8px 4px 0;
}

/* `a.button` outranks `.bulk > *`; Clear selection takes the bar's margin like the buttons beside it. */
.bulk > a.button {
  margin: 4px 8px 4px 0;
}

/* Clear selection at the bar's far end, as the design places it (task 0169). */
.bulk > a.bulk-clear {
  margin: 4px 0 4px auto;
}

.bulk-count {
  margin-right: 12px;
  font-weight: 700;
}

/* "Extend:" before the bar's +1, +3 and +12 months (task 0054). */
.bulk-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.crow {
  display: grid;
  grid-template-columns: 44px minmax(180px, 2fr) 1.2fr 1fr 1fr 0.9fr 1.1fr 16px;
  grid-gap: 16px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}

/* With the Owner column (task 0169), the design's widths. */
.with-owner .crow {
  grid-template-columns: 44px minmax(180px, 2fr) 0.9fr 1.3fr 1fr 0.9fr 1fr 1.1fr 16px;
}

.crow.chead {
  padding: 10px 8px;
  border-radius: 10px;
  border-bottom: 0;
  background: var(--card2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

ul.clist {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.clist .crow:last-child {
  border-bottom: 0;
}

ul.clist .crow:hover {
  background: var(--hover);
}

/* A picked row is tinted (task 0169), by panel.js; without the script only its box shows it. */
ul.clist .crow.picked {
  background: var(--acc-soft);
}

.cpick {
  text-align: center;
}

.ccust {
  display: flex;
  align-items: center;
  min-width: 0;
}

.ccust .avatar {
  margin-right: 12px;
}

a.cname {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.cname:hover {
  text-decoration: underline;
}

/* The customer's name, or address, with the telephone (or the address) under it, muted (task 0169). */
.cwho {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cunder {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cline,
.ctvs,
.cown,
.cseen {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cseen {
  color: var(--muted);
}

/* The TV column (task 0169): a long maker and model end in an ellipsis, never the count after it ("+1 more", or the
   warning "2 of 1" of task 0160), which keeps its width. The space between the two is not drawn in a flex line. */
.tvcell {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.tvname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tvcount {
  flex-shrink: 0;
  margin-left: 4px;
  white-space: nowrap;
}

/* Subscription ends (task 0311 step 4, the date the TVs report): it wraps rather than cutting "Not reported yet". */
.cvalid {
  min-width: 0;
}

/* The age of a read older than 7 days, under the reported day (task 0311). */
.cvalid .read-age {
  display: block;
  font-size: 12px;
}

.info-text {
  color: var(--info);
}

.cgo {
  color: var(--faint);
}

.cgo .icon {
  width: 16px;
  height: 16px;
}

.warn {
  color: var(--warn);
  font-weight: 700;
}

.avatar.tone-1 {
  background: var(--info-bg);
  color: var(--info);
}

.avatar.tone-2 {
  background: var(--warn-bg);
  color: var(--warn);
}

.avatar.tone-3 {
  background: var(--danger-bg);
  color: var(--danger);
}

.empty {
  padding: 32px 8px;
  text-align: center;
}

.empty-icon {
  display: block;
  margin: 0 0 6px;
  color: var(--faint);
}

.empty-icon .icon {
  width: 32px;
  height: 32px;
}

/* How many rows are shown, of how many the filter keeps, under the rows (task 0169). */
.ccount {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.warning-card {
  border-color: var(--danger);
}

.danger-text {
  color: var(--danger);
}

@media (max-width: 699px) {
  .crow.chead {
    display: none;
  }

  /* The address wraps rather than ending in an ellipsis, so customers stay told apart (comparison 0019, defect 5). */
  a.cname {
    white-space: normal;
    word-break: break-all;
  }

  .bulk {
    margin: 0 -16px 12px;
    padding: 10px 16px;
  }

  .ctools {
    margin: 0 -16px 12px;
    padding: 0 16px 8px;
  }

  /* The design's card (task 0169): the line's source, then when last seen with the owner, then the subscription's end. */
  .crow,
  .with-owner .crow {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas: 'pick cust state' 'pick line line' 'pick seen own' 'pick valid valid';
    grid-gap: 2px 12px;
    min-height: 68px;
    padding: 10px 4px;
  }

  .cpick {
    grid-area: pick;
  }

  .ccust {
    grid-area: cust;
  }

  .cstate {
    grid-area: state;
    text-align: right;
  }

  .cline {
    grid-area: line;
    padding-left: 52px;
    color: var(--muted);
    font-size: 12px;
  }

  .cseen {
    grid-area: seen;
    padding-left: 52px;
    font-size: 12px;
  }

  .cown {
    grid-area: own;
    font-size: 12px;
    text-align: right;
  }

  /* The subscription's end under the line's source (task 0311 step 4). */
  .cvalid {
    grid-area: valid;
    padding-left: 52px;
    font-size: 12px;
  }

  .ctvs,
  .cgo {
    display: none;
  }

  .ccust .avatar {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }

  a.cname {
    font-size: 15px;
  }

  .page-actions .button,
  .page-actions button {
    margin: 8px 8px 0 0;
  }
}

/* The home page (task 0015 part 3): four tiles (label 13, value 26 on 700 in tabular figures, sub-line 12; 4 columns,
   2 below 700; gap 12), then For today and Latest activity, side by side from 1100. */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  margin: 0 0 20px;
}

/* Five tiles when the home page has the Sellers tile, or a seller's own limit (row 8.12), and on Statistics with its
   Sellers tile (task 0289). */
.tiles.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

a.tile,
div.tile {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}

a.tile:hover {
  border-color: var(--line2);
  background: var(--hover);
}

.tile-label,
.tile-value,
.tile-sub {
  display: block;
}

.tile-label {
  color: var(--muted);
  font-size: 13px;
}

.tile-value {
  margin: 4px 0 2px;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tile-sub {
  color: var(--faint);
  font-size: 12px;
}

/* The operator's package (task 0055): a fifth tile, three a row from 700 and five from 1400; from 14 days
   before its last paid day in the warning colour, after it in the danger colour, its words saying the same. */
.tiles.with-package {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tile.soon {
  border-color: var(--warn);
}

.tile.soon .tile-value,
.tile.soon .tile-sub {
  color: var(--warn);
}

.tile.ended {
  border-color: var(--danger);
}

.tile.ended .tile-value,
.tile.ended .tile-sub {
  color: var(--danger);
}

.home-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 20px;
  align-items: start;
}

.home-cards section.card {
  margin: 0;
}

a.today-row {
  display: flex;
  align-items: center;
  margin: 0 -20px;
  padding: 14px 20px;
  color: var(--text);
  text-decoration: none;
}

a.today-row:hover {
  background: var(--hover);
}

.today-badge {
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0 14px 0 0;
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 44px;
  text-align: center;
}

/* For today's information and danger counts (task 0054); the warning colour is the badge's own. */
.today-badge.info {
  background: var(--info-bg);
  color: var(--info);
}

.today-badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.today-text {
  flex: 1;
  min-width: 0;
}

.today-title,
.today-sub {
  display: block;
}

.today-title {
  font-weight: 700;
}

.today-sub {
  color: var(--muted);
  font-size: 12px;
}

a.today-row .icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--faint);
}

.today-none {
  color: var(--muted);
}

ul.changes,
ul.log-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.change a {
  display: block;
  margin: 0 -20px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

li.change a:hover {
  background: var(--hover);
}

.change-what,
.change-meta {
  display: block;
}

.change-what {
  font-weight: 700;
}

.change-meta {
  color: var(--muted);
  font-size: 12px;
}

.latest .more {
  margin: 12px 0 0;
}

/* Latest activity's two lists (request 4 of 2026-10-16): Changes, and Line access for the owner and administrators.
   A failed opening says "Failed" in words; the danger colour only repeats it. */
.latest h3 {
  margin: 20px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.latest h2 + h3 {
  margin-top: 0;
}

li.change.failed .change-what {
  color: var(--danger);
}

/* The audit log's Changes tab: when (13, muted, tabular), what (700), the customer and who (12). A row about a customer
   is one link to the customer (task 0649), drawn as the row with a hover. */
li.log-row {
  border-bottom: 1px solid var(--line);
}

.log-row-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-areas: 'when what' 'when who';
  grid-gap: 2px 16px;
  padding: 10px 0;
}

a.log-row-body {
  margin: 0 -20px;
  padding-right: 20px;
  padding-left: 20px;
  color: var(--text);
  text-decoration: none;
}

a.log-row-body:hover {
  background: var(--hover);
}

li.log-row:last-child {
  border-bottom: 0;
}

.log-when {
  grid-area: when;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.log-what {
  grid-area: what;
  font-weight: 700;
  overflow-wrap: break-word;
}

.log-who {
  grid-area: who;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: break-word;
}

@media (min-width: 1100px) {
  .home-cards {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Five tiles a row only where a date of 26 pixels fits in each, beside the menu. */
@media (min-width: 1400px) {
  .tiles.with-package {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  /* Six tiles, the package's and the Sellers tile both (row 8.12): two rows of three. */
  .tiles.with-package.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* The Statistics page (row 8.18): the home page's tiles (not links here), then New customers per month and the
   devices card, side by side from 1100. A month is a column: its numbers, two bars 140 high at most and 10 wide each
   (an SVG 44 wide whose rectangles' heights are shares of the tallest, since no style attribute may size them), its
   short name. A device row: its label and count, then a bar 6 high, its length the row's share of the
   largest (a <progress>, as the guide's coverage). */
.stats-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 20px;
  align-items: start;
  margin: 0 0 16px;
}

.stats-cards section.card {
  margin: 0;
}

/* Task 0257: a period's bars, 1 to 21 of them (days, weeks, months or years), share the card's width equally, so the
   list is a flexible row (no flexbox gap: each column's padding spaces it). */
ol.months {
  display: flex;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

li.month {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 4px;
  grid-template-rows: auto 140px auto;
  justify-items: center;
  align-items: end;
}

/* The chart's choices (task 0257): the from and to days with the browser's calendar, the expired-after chips with
   their label, and the period's two sums with the legend's squares. The Inactive tile's days form sits under its line. */
form.range-form {
  margin: 0 0 12px;
}

form.range-form label,
form.tile-form label {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
}

form.range-form input[type='date'] {
  height: 34px;
  margin-left: 4px;
}

form.tile-form {
  margin: 8px 0 0;
}

form.tile-form input[type='number'] {
  width: 72px;
  height: 30px;
  margin-left: 4px;
}

.chips-label {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
}

p.period-sums {
  margin: 4px 0 12px;
  font-size: 14px;
  font-weight: 700;
}

/* Row 8.19: each month's new number and bar in the accent colour, its expired number and bar beside them in orange,
   as the design's "Novi i istekli"; the legend's keys are squares of the same colours. */
.month-values {
  margin: 0 0 6px;
  white-space: nowrap;
}

.month-value,
.month-expired {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.month-expired {
  margin-left: 6px;
  color: var(--warn);
}

svg.month-bar {
  display: block;
  width: 100%;
  max-width: 44px;
  height: 140px;
  border-bottom: 1px solid var(--line2);
}

svg.month-bar rect.bar-new {
  fill: var(--acc);
}

svg.month-bar rect.bar-expired {
  fill: var(--warn);
}

.key {
  margin-right: 14px;
}

.key::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -1px;
}

.key-new::before {
  background: var(--acc);
}

.key-expired::before {
  background: var(--warn);
}

/* Row 8.20: most watched this week, its switch and three lists (channels, series, films), side by side from 900. */
section.card.watched {
  margin: 0 0 16px;
}

.card-head h2 {
  display: inline;
  margin-right: 10px;
}

/* Most watched's switch row (task 0169, the design's): the label and its state, then a track 44 by 24 whose knob of
   18 sits left when off and right when on, in the accent colour; a form's one submit button for the owner and
   administrators, the state alone for support. A rule under it as in the design. No animation: the page reloads. */
.switch-row {
  display: block;
  width: 100%;
  margin: 12px 0 0;
}

button.switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  grid-column-gap: 14px;
  align-items: center;
  height: auto;
  min-height: 54px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  white-space: normal;
  text-align: left;
  cursor: pointer;
}

button.switch-row:hover {
  border-color: var(--line);
  background: var(--hover);
}

div.switch-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.switch-text,
.switch-label,
.switch-state {
  display: block;
}

.switch-label {
  font-weight: 600;
}

.switch-state {
  color: var(--muted);
  font-size: 12px;
}

.switch-track {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--line2);
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
}

button.switch-row[aria-checked='true'] .switch-track {
  background: var(--acc);
}

button.switch-row[aria-checked='true'] .switch-knob {
  left: 23px;
}

/* The devices card's platforms (task 0169): under the model list, opened without a script. */
details.platforms {
  margin: 4px 0 0;
}

details.platforms > summary {
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.watched-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-column-gap: 20px;
}

@media (min-width: 900px) {
  .watched-lists {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.month-name {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.share-group h3 {
  margin: 16px 0 10px;
  font-size: 14px;
  font-weight: 700;
}

ul.shares {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-row-gap: 4px;
  grid-column-gap: 12px;
  align-items: center;
  margin: 0 0 10px;
}

.share-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-n {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

progress.share-bar {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--card2);
  color: var(--acc);
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}

progress.share-bar::-webkit-progress-bar {
  border-radius: 3px;
  background: var(--card2);
}

progress.share-bar::-webkit-progress-value {
  border-radius: 3px;
  background: var(--acc);
}

progress.share-bar::-moz-progress-bar {
  border-radius: 3px;
  background: var(--acc);
}

/* Task 0289: a device row's two bars share one grid cell, every TV of the model in grey and those online now over it
   in the accent colour, then "N online now". */
li.share.device progress.share-bar {
  grid-row: 2;
}

progress.share-bar.all::-webkit-progress-value {
  background: var(--line2);
}

progress.share-bar.all::-moz-progress-bar {
  background: var(--line2);
}

progress.share-bar.online,
progress.share-bar.online::-webkit-progress-bar {
  background: transparent;
}

.share-online {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

/* Task 0661: under a series' bar, its most played episode ("S2 E5 · title"), cut with an ellipsis when long. */
.share-sub {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-note {
  font-size: 13px;
}

@media (min-width: 1100px) {
  .stats-cards {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 699px) {
  .tiles,
  .tiles.five,
  .tiles.with-package {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  a.tile,
  div.tile {
    padding: 14px 16px;
  }

  a.today-row,
  li.change a,
  a.log-row-body {
    margin: 0 -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .log-row-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'what' 'who' 'when';
  }
}

/* The team (task 0015 part 4): rows 14 × 20 with a 40 avatar, the name and e-mail address, the role, the status pill,
   the second factors and today's actions as 34-high buttons; stacked below 1100. No track follows its own row's
   content, so every row draws the same columns (comparison 0019, defect 7); the role and the status pill keep 96 and
   88, so "Administrator" and "Disabled" never spill over at 1,100 to 1,250; the actions wrap inside theirs. Then the
   role cards, at least 220 wide with a gap of 12, sharing the whole width (auto-fit, defect 8), and the invite card, a
   <details> that its summary opens without a script. */
section.card.team {
  padding: 0;
}

ul.team-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.member {
  display: grid;
  grid-template-columns: 40px minmax(180px, 2fr) minmax(96px, 1fr) minmax(88px, 0.8fr) minmax(0px, 1.4fr) minmax(0px, 2.4fr);
  grid-template-areas: 'avatar who role state factors actions';
  grid-gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

li.member .avatar {
  grid-area: avatar;
  width: 40px;
  height: 40px;
  line-height: 40px;
}

.member-who {
  grid-area: who;
  min-width: 0;
}

.member-name,
.member-email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name {
  font-weight: 700;
}

.member-you {
  color: var(--muted);
  font-weight: 400;
}

.member-email {
  color: var(--muted);
  font-size: 12px;
}

.member-role {
  grid-area: role;
}

.member-state {
  grid-area: state;
}

.member-factors {
  grid-area: factors;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.member-factors .label {
  display: block;
  color: var(--faint);
  font-size: 11px;
}

.member-actions {
  grid-area: actions;
  text-align: right;
}

.member-actions button {
  margin: 4px 0 4px 8px;
}

/* A disabled member's live API keys (task 0144): a line of its own under the row, from the name to the end. */
.member-keys {
  grid-column: 2 / -1;
  color: var(--danger);
  font-size: 13px;
}

.team-note {
  margin: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 12px;
  margin: 0 0 20px;
}

section.role-card {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

section.role-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

section.role-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* The Registration page (task 0169): its two ways side by side, each card at least 280 wide (auto-fit, grid-gap, not
   flexbox gap), a numbered circle above the title, and the import card's foot line with the last import. */
.ways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 16px;
  margin: 0 0 20px;
}

.ways section.card.way {
  margin: 0;
}

.way-number {
  display: inline-block;
  width: 26px;
  height: 26px;
  margin: 0 0 10px;
  border-radius: 50%;
  background: var(--acc-soft);
  color: var(--acc-ink);
  font: 700 13px/26px 'Roboto Condensed', system-ui, sans-serif;
  text-align: center;
}

.way-foot {
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* The Sellers page (task 0169, the design's Agenti): three numbered step cards under the title, at least 210 wide;
   then one card per seller, two columns beside the docked menu (from 1100, the design's agCols) and one below, each
   with a 44 avatar, the name and address, the status pill at the right, "N of L customers" over a 6-high bar, the
   limit and the links; no seller yet: a dashed box. grid-gap and margins, never flexbox gap (the Chromium 63 floor). */
ol.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  grid-gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

li.step {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card2);
}

.step-number {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0 12px 0 0;
  border-radius: 50%;
  background: var(--acc-soft);
  color: var(--acc-ink);
  font: 700 13px/26px 'Roboto Condensed', system-ui, sans-serif;
  text-align: center;
}

.seller-cards {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 16px;
  margin: 0 0 16px;
}

@media (min-width: 1100px) {
  .seller-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.seller-cards section.card.seller-card {
  margin: 0;
}

.seller-head {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
}

.seller-head .avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
  line-height: 44px;
}

.seller-text {
  flex: 1 1 0px;
  min-width: 0;
  margin: 0 12px;
}

.seller-name,
.seller-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-name {
  font-size: 16px;
}

.seller-sub {
  font-size: 12px;
}

p.seller-count {
  margin: 0 0 6px;
  font-size: 13px;
}

progress.seller-bar {
  display: block;
  width: 100%;
  height: 6px;
  margin: 0 0 14px;
  border: 0;
  border-radius: 3px;
  background: var(--card2);
  color: var(--acc);
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}

progress.seller-bar::-webkit-progress-bar {
  border-radius: 3px;
  background: var(--card2);
}

progress.seller-bar::-webkit-progress-value {
  border-radius: 3px;
  background: var(--acc);
}

progress.seller-bar::-moz-progress-bar {
  border-radius: 3px;
  background: var(--acc);
}

.seller-limit {
  margin: 0 0 12px;
  font-weight: 700;
}

/* The limit's stepper (task 0656, the design board's): − and + as square buttons either side of a narrow number, in
   one line, and Save after it; margins, not flexbox gap. Focus is the panel's own :focus ring. */
.stepper {
  display: inline-flex;
  align-items: center;
  margin: 0 8px 0 0;
  vertical-align: middle;
}

.stepper button.step {
  width: 34px;
  padding: 0;
  font-size: 18px;
}

.stepper input[type='number'] {
  width: 80px;
  height: 34px;
  margin: 0 6px;
  text-align: center;
}

/* A seller's rights (migration 0082): rows at least 48 high, each switch a whole-width button with its state at the
   right, the accent's soft fill when on (.switch[aria-checked='true']). */
.seller-rights {
  margin: 0 0 12px;
}

p.seller-rights-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
}

.seller-rights ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.seller-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

li.seller-right form {
  width: 100%;
  margin: 4px 0;
}

li.seller-right button.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  text-align: left;
}

.switch-state {
  margin: 0 0 0 12px;
  font-weight: 700;
}

.seller-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.seller-actions form.inline {
  margin: 0 0 0 auto;
}

p.empty-state {
  margin: 0 0 20px;
  padding: 40px 20px;
  border: 1px dashed var(--line2);
  border-radius: 16px;
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

details.invite {
  margin: 0 0 20px;
}

details.invite > summary {
  margin: 0;
  list-style: none;
}

details.invite > summary::-webkit-details-marker {
  display: none;
}

details.invite[open] > summary {
  margin: 0 0 12px;
}

details.invite > summary.button {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--on-acc);
}

details.invite > summary.button:hover {
  background: var(--acc-hover);
  border-color: var(--acc-hover);
}

@media (max-width: 1099px) {
  li.member {
    grid-template-columns: 40px 1fr auto;
    grid-template-areas: 'avatar who state' 'avatar role role' '. factors factors' '. actions actions';
    grid-gap: 4px 12px;
  }

  .member-role {
    color: var(--muted);
    font-size: 13px;
  }

  .member-actions {
    text-align: left;
  }

  .member-actions button {
    margin: 4px 8px 4px 0;
  }
}

/* The brand page (task 0015 part 4): the form (inputs 44 high, 15) beside the preview from 1100, stacked below. The
   preview draws the TV's dark look with the TV's own tokens, the same in both panel themes but for the page behind it;
   never an image of the logo's address, which the Content-Security-Policy refuses anyway. DEVICE-UNVERIFIED: how close
   it is to what a TV draws. */
.brand-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 20px;
  margin: 0 0 20px;
}

.brand-grid section.card {
  margin: 0;
}

@media (min-width: 1100px) {
  .brand-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.field-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* The TV sketches (Brand, Messages) in KokiePlay's warm tokens of the design of 2026-10-19 (task 0169): --tv-*
   on both themes, the caramel accent instead of the old orange. The Brand page's preview is the exception: it draws
   the TV's activation screen in the TV's own colours (.tv-activation). The TV app itself is not rebranded yet. */
.tv {
  padding: 24px;
  border-radius: 16px;
  background: var(--tv-bg);
  color: var(--tv-text);
  box-shadow: var(--shadow-lg);
}

.tv-name {
  min-width: 0;
  overflow: hidden;
  font: 700 22px/1.2 'Roboto Condensed', system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-module {
  padding: 16px;
  border-radius: 12px;
  background: var(--tv-mod);
}

.tv-label {
  display: block;
  margin: 0 0 8px;
  color: var(--tv-acc);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

/*
 * The Brand preview: the TV's activation screen (apps/web/src/activation/activation.dp.css) at 0.4 of its size, in its
 * own page colour, text colour, fonts and grey, on both panel themes (src/panel/tv-look.ts; apps/web/test/
 * panel-tv-look.test.ts holds the page colour and the grey to the TV's). The brand box keeps the TV's 384 x 96, empty; the
 * empty band between the steps and the provider line, and the code's column on the right, are left out.
 */
.tv.tv-activation {
  padding: 22px 38px 16px;
  background: #0e0a08;
  color: #f4f1ec;
  font-family: 'Roboto Condensed', system-ui, sans-serif;
}

/* The brand box's place, empty: no TV app draws a logo or a name there since 2026-11-02 (no logo inside the app). */
.tv-brand {
  width: 154px;
  height: 38px;
}

.tv-headline {
  box-sizing: border-box;
  height: 108px;
  margin: 21px 0 0;
  padding-top: 7px;
  overflow: hidden;
  font: 800 48px/46px 'Roboto Condensed', system-ui, sans-serif;
  font-variant-numeric: lining-nums;
  letter-spacing: -1.2px;
}

.tv-headline-line {
  display: block;
  white-space: nowrap;
}

.tv-headline-accent {
  display: block;
  overflow: visible;
}

ol.tv-steps {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.tv-step {
  display: flex;
  align-items: center;
  height: 17px;
  margin: 0 0 7px;
}

.tv-step-number {
  display: block;
  flex: none;
  margin: 0 7px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.tv-step-text {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tv-provider,
.tv-support {
  margin: 0;
  overflow: hidden;
  color: #c9bfb5;
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tv-provider {
  margin-top: 16px;
}

.tv-steps + .tv-support {
  margin-top: 16px;
}

/* Without a contact the TV draws no Help line; the panel's own words say so, in the dim token. */
.tv-support.none {
  color: var(--tv-dim);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.tv-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* The Messages page (row 8.54): the form's choices as rows of radio buttons, the chosen customers, the TV's two looks
   drawn with the brand preview's tokens, and the list of messages, one row each, wrapping on a phone. DEVICE-UNVERIFIED:
   how close the sketch is to what a TV draws (apps/web/src/notice/OperatorNotice.tsx). */
fieldset.choices {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

fieldset.choices legend {
  margin: 0 0 6px;
  padding: 0;
  font-weight: 700;
}

form.stack label.choice {
  display: inline-block;
  margin: 0 18px 6px 0;
  font-weight: 400;
}

input[type='radio'] {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--acc);
}

.message-to-line {
  margin: 0 0 6px;
}

.message-chosen {
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
}

.form-actions {
  margin: 4px 0 0;
}

/* Design finding 119 (task 0169): the reach beside the send button, and the text's counter under it. */
.message-reach-now {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
}

.message-count {
  text-align: right;
}

.tv-screen {
  position: relative;
  min-height: 200px;
  padding: 0;
  overflow: hidden;
}

.tv-banner {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tv-mod);
}

.tv-banner-name {
  flex: none;
  margin: 0 12px 0 0;
  color: var(--tv-acc);
  font-size: 12px;
  font-weight: 800;
}

.tv-banner-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

.tv-banner-ok {
  flex: none;
  margin: 0 0 0 12px;
  color: var(--tv-dim);
  font-size: 12px;
  white-space: nowrap;
}

.tv-full {
  padding: 28px 24px;
  text-align: center;
}

.tv-full .tv-name {
  display: block;
  margin: 0 0 12px;
}

.tv-full-text {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  word-break: break-word;
}

ul.messages {
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.message-row:last-child {
  border-bottom: 0;
}

.message-row > * {
  margin: 0 12px 4px 0;
}

.message-main {
  flex: 1 1 320px;
  min-width: 0;
}

.message-to,
.message-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.message-text {
  display: block;
  margin: 2px 0;
  font-weight: 700;
  word-break: break-word;
}

.message-reach {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.message-row form.inline button {
  margin: 0;
}

/* Messages. */
.notice,
.problem {
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: 11px;
}

.notice {
  background: var(--acc-soft);
  color: var(--acc-ink);
  transition: opacity 0.4s ease;
}

.notice.faded {
  opacity: 0;
}

.problem {
  background: var(--danger-bg);
  color: var(--danger);
}

.problem ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

/* Status pills: 24 high with a 6-pixel dot. */
.badge {
  display: inline-block;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
}

.badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 6px 0 0;
  border-radius: 3px;
  background: currentColor;
  vertical-align: middle;
}

.badge.active,
.badge.solved {
  background: var(--acc-soft);
  color: var(--acc-ink);
}

.badge.suspended,
.badge.expired,
.badge.disabled,
.badge.failed {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge.closed,
.badge.no-line,
.badge.not-sent,
.badge.open {
  background: var(--warn-bg);
  color: var(--warn);
}

code,
.secret {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  word-break: break-all;
}

.secret {
  display: block;
  padding: 8px 10px;
  border: 1px dashed var(--line2);
  border-radius: 11px;
  background: var(--card2);
  font-size: 15px;
}

ol.codes {
  columns: 2;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
}

svg.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 8px 0;
  padding: 8px;
  border-radius: 11px;
  background: #ffffff;
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-gap: 6px 16px;
  margin: 0;
}

dl.facts dt {
  color: var(--muted);
}

dl.facts dd {
  margin: 0;
}

/* A trial's line under its end (task 0054). */
.fact-sub {
  display: block;
  font-size: 12px;
}

.pager {
  margin-top: 12px;
}

/* Search results, on the search page and in the quick-search box. */
.results-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.result {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.result:hover,
.result:focus {
  background: var(--hover);
}

.result-kind {
  display: inline-block;
  min-width: 76px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-page nav.menu {
  padding: 0 0 12px;
}

.menu-page .seg.lang {
  margin: 0 0 12px;
}

/* The More page's language switch and Report a problem side by side, as the design's phone drawer: the button takes
   the rest of the row, 38 high. */
.menu-extras {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
}

.menu-page .menu-extras .seg.lang {
  margin: 0;
}

a.button.menu-report {
  flex: 1;
  min-width: 0;
  height: 38px;
  margin: 0 0 0 8px;
  padding: 0 10px;
  border-color: var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 36px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-report .icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.menu-page .side-foot {
  padding: 12px 0 0;
}

/* The phone's menu drawer (the board's, task 0679, layout.ts side): below 700 the menu waits off the screen's left
   edge, hidden from the keyboard and screen readers, and slides in by transform alone when panel.js puts
   menu-drawer-open on the body, over a veil that closes it; over the phone's tabs (40) and under the quick search (50).
   Its close button and extras show only there; without the script the menu button and More open /panel/menu. */
.menu-drawer-backdrop,
.menu-drawer-close,
.menu-drawer-extras {
  display: none;
}

@media (max-width: 699px) {
  .side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 43;
    display: flex;
    flex-direction: column;
    width: 300px;
    max-width: 86%;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    background: var(--side);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }

  body.menu-drawer-open .side {
    visibility: visible;
    transform: none;
    transition: transform 0.2s ease;
  }

  body.menu-drawer-open .menu-drawer-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 42;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--veil);
  }

  body.menu-drawer-open .menu-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
  }

  body.menu-drawer-open .menu-drawer-close .icon {
    width: 18px;
    height: 18px;
  }

  body.menu-drawer-open .menu-drawer-extras {
    display: flex;
    align-items: center;
    padding: 0 16px 12px;
  }

  .menu-drawer-extras .seg.lang {
    margin: 0;
  }
}

/* Quick search: 620 wide, 12 % from the top; the whole screen on a phone. */
.quick {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  background: var(--veil);
}

.quick-box {
  position: absolute;
  top: 12%;
  left: 50%;
  width: 620px;
  margin-left: -310px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.quick-form {
  display: flex;
  align-items: center;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--line);
}

.quick-form > .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.quick-form input[type='search'] {
  flex: 1;
  max-width: none;
  height: 44px;
  margin: 0 8px;
  border: 0;
  background: transparent;
  font-size: 16px;
}

/* One ✕ in the box: its own close button, not the browser's clear button beside it (comparison 0019, defect 11). */
.quick-form input[type='search']::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

.quick-close {
  margin-left: 6px;
}

#quick-results .card {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

#quick-results .muted {
  margin: 12px;
}

.quick-help {
  margin: 10px 4px 0;
  color: var(--faint);
  font-size: 12px;
}

/* The phone: tabs at the foot, a narrow header. */
.tabs,
.tab-add {
  display: none;
}

@media (max-width: 699px) {
  body.framed {
    padding-bottom: 72px;
  }

  .head {
    padding: 0 12px;
  }

  .head-search {
    min-width: 0;
    padding: 0 10px;
  }

  .head-search .label,
  .head-search kbd,
  .head .seg.lang,
  .back .label {
    display: none;
  }

  .content {
    padding: 16px 16px 32px;
  }

  h1 {
    font-size: 22px;
  }

  section.card {
    padding: 14px 16px;
  }

  .tabs {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    height: 64px;
    border-top: 1px solid var(--line);
    background: var(--side);
  }

  .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-decoration: none;
  }

  .tab .pill {
    position: relative;
    display: block;
    width: 58px;
    height: 30px;
    border-radius: 15px;
    text-align: center;
    line-height: 30px;
  }

  .tab .icon {
    width: 20px;
    height: 20px;
  }

  .tab .label {
    margin-top: 2px;
    font-size: 11px;
  }

  .tab[aria-current='page'] {
    color: var(--acc-ink);
    font-weight: 700;
  }

  .tab[aria-current='page'] .pill {
    background: var(--acc-soft);
  }

  /* Reports' count on its tab (the design of 2026-10-23), at the pill's top right corner. */
  .tab .menu-badge {
    position: absolute;
    top: -6px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0 5px;
    font-size: 11px;
    line-height: 18px;
  }

  /* The round + (Add customer) on the customer list, above the tabs at the right. */
  .tab-add {
    position: fixed;
    right: 16px;
    bottom: 80px;
    z-index: 41;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--acc);
    color: var(--on-acc);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    text-decoration: none;
  }

  .tab-add .icon {
    width: 26px;
    height: 26px;
  }

  .quick-box {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
  }
}

/* The code a TV shows, typed to link it (row 8.45): digits spaced like the TV shows them. */
input.tv-code {
  max-width: 180px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
}

form.row p.hint {
  width: 100%;
  margin-top: -4px;
  font-size: 13px;
}

/* The frame's sentence when a part htmx refreshes could not be read (layout.ts liveProblem, filler 32): at the foot of
   the window, so it is seen however far the page is scrolled; over the side panel (46), under the quick search (50),
   and above the phone's tabs (64 high). */
.live-problem {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 48;
  max-width: 560px;
  margin: 0;
  border: 1px solid var(--danger);
  /* The danger tint over the card's colour: the dark theme's tint is see-through, and the page must not show under it. */
  background: linear-gradient(var(--danger-bg), var(--danger-bg)), var(--card);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

@media (max-width: 699px) {
  .live-problem {
    left: 16px;
    bottom: 80px;
  }
}

/* A customer's side panel over the list (design status row 8.40, docs/panel-customer-panel.md): 640 wide at the right
   on a computer and a tablet, over a veil that keeps the list in view and closes the panel; under the quick search
   (50) and over the phone's tabs (40). The whole screen on a phone, with a back arrow for ✕, and no list behind. */
.drawer-veil {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 44;
  background: var(--veil);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  display: flex;
  flex-direction: column;
  width: 640px;
  max-width: 100%;
  border-left: 1px solid var(--line);
  background: var(--page);
  box-shadow: var(--shadow-lg);
}

.drawer-head {
  display: flex;
  flex: none;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--side);
}

.drawer-close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

.drawer-close:hover {
  background: var(--hover);
}

.drawer-close .icon {
  display: block;
  width: 18px;
  height: 18px;
}

.drawer-close .when-phone {
  display: none;
}

.drawer-head .avatar {
  width: 46px;
  height: 46px;
  margin-left: 12px;
  font-size: 16px;
  line-height: 46px;
}

.drawer-name {
  flex: 1;
  min-width: 0;
  margin: 0 12px;
}

.drawer-title {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The heading takes the page's first focus (panel.js) only as a starting point: it is no control, so no ring. */
.drawer-title:focus {
  outline: none;
}

.drawer-sub {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 28px;
}

/* The panel's tabs (task 0169, the design of 2026-10-19): a segmented control of links under the head, outside the
   body's scrolling; the current tab in the card's colour with the small shadow. Margins, not flexbox gap (the floor). */
.drawer-tabs {
  display: flex;
  flex: none;
  margin: 14px 20px 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card2);
}

.drawer-tabs a {
  flex: 1 0 auto;
  height: 36px;
  margin-right: 4px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 36px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.drawer-tabs a:last-child {
  margin-right: 0;
}

.drawer-tabs a:hover {
  background: var(--hover);
  color: var(--text);
}

.drawer-tabs a[aria-current='page'] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Most watched's tabs Live TV, Films and Series (task 0649): the same control inside the card; the week's programmes
   under Live TV set apart by a line. */
.drawer-tabs.watched-tabs {
  margin: 14px 0 0;
}

.watched-week {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* The overview's tiles: two a row, the personal code across both. */
.dtiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 10px;
}

.dtile {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card2);
}

.dtile.wide {
  grid-column: 1 / -1;
}

.dtile-label,
.dtile-value {
  display: block;
}

.dtile-label {
  color: var(--muted);
  font-size: 12px;
}

.dtile-value {
  font-weight: 600;
}

.drawer-email {
  margin: 12px 0;
  font-size: 13px;
  overflow-wrap: break-word;
}

.owner-field label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* The seller's field: the select and its Save on one line, the select taking what the button leaves. */
.owner-field .row {
  display: flex;
  align-items: center;
}

.owner-field .row select {
  flex: 1 1 auto;
  min-width: 0;
}

.owner-field .row button {
  flex: none;
  margin: 0 0 0 8px;
}

/* The limits box: a row for TVs and one for profiles, each with its − and + around the number. */
.limits-head,
.limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.limits-head {
  align-items: baseline;
  flex-wrap: wrap;
}

.limits-head h2 {
  margin-right: 8px;
}

.limit-row {
  margin: 0 0 12px;
}

.limit-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  margin-right: 12px;
}

.limit-name .muted,
.device-name .muted,
.module-name .muted,
.dlog-text .muted {
  font-size: 12px;
}

.stepper {
  display: flex;
  flex: none;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 10px;
}

.stepper button {
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--card2);
  font-size: 18px;
  line-height: 38px;
}

.stepper button[aria-disabled='true'] {
  opacity: 0.4;
  cursor: default;
}

.stepper-value {
  width: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 38px;
  text-align: center;
}

/* A TV's row, a module's row and a change's row: an icon or a dot, the name with a muted line under it. */
.device-rows,
.dlog {
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-row {
  display: flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.device-icon,
.module-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.device-icon {
  background: var(--hover);
  color: var(--muted);
}

.module-icon {
  background: var(--acc-soft);
  color: var(--acc-ink);
}

.device-icon .icon,
.module-icon .icon {
  width: 18px;
  height: 18px;
}

.device-name,
.module-name,
.dlog-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.device-name,
.module-name {
  margin: 0 12px;
}

/* Task 0347: a TV's network address and network, an IPv6 address broken anywhere rather than past the row. */
.device-ip {
  overflow-wrap: anywhere;
}

/* Task 0347: a TV's diagnosis line, said in words (never by colour alone). */
.device-diagnosis {
  font-size: 12px;
  font-weight: 600;
}

.module-row {
  display: flex;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}

/* A module's choice beside its name, at most a little over half the row, so the name always keeps a column. */
.module-row select {
  flex: none;
  width: auto;
  max-width: 55%;
}

/* The Modules tab's one Save, under every row. */
.modules-card p.row {
  margin: 12px 0 0;
}

.modules-card p.row button {
  margin-top: 0;
}

/* On a phone the choice goes under the name, from the name's edge to the row's end. */
@media (max-width: 699px) {
  .module-row {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .module-row .module-name {
    flex: 1 1 calc(100% - 62px);
  }

  .module-row select {
    flex: 1 1 auto;
    max-width: none;
    margin: 8px 0 0 50px;
  }
}

.dlog li {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.dlog-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin: 7px 12px 0 0;
  border-radius: 50%;
  background: var(--acc);
}

/* The drawer's Activity tab (task 0649): the summary line, then per day its date and total, and each play: title and
   length on one line, kind and time, then the TV and its address, both 12 and muted. */
.activity-sum {
  margin: 0 0 12px;
  font-weight: 700;
}

.activity-day-head {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 4px;
  font-size: 13px;
  font-weight: 700;
}

.activity-day-head .muted {
  margin-left: 12px;
  font-weight: 400;
}

ul.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.activity-item {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

li.activity-item .muted {
  font-size: 12px;
}

.activity-line {
  display: flex;
  justify-content: space-between;
}

.activity-title {
  overflow-wrap: break-word;
}

.activity-length {
  flex: none;
  margin-left: 12px;
  font-variant-numeric: tabular-nums;
}

/* The still list behind the panel: the list's look, with spans where the list has links. */
.page-title .h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.behind p.chips {
  margin: 0 0 8px;
}

.behind .chip.current {
  background: var(--acc-soft);
  border-color: transparent;
  color: var(--acc-ink);
}

.behind .chip.current .count {
  color: var(--acc-ink);
}

.behind .cname {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 699px) {
  .drawer {
    width: 100%;
    border-left: 0;
  }

  .drawer-veil,
  .behind {
    display: none;
  }

  .drawer-head {
    padding: 12px 16px;
  }

  .drawer-body {
    padding: 16px 16px 28px;
  }

  .drawer-tabs {
    margin: 12px 16px 0;
  }

  .drawer-close .when-wide {
    display: none;
  }

  .drawer-close .when-phone {
    display: inline;
  }
}

/* Support (task 0046, design status row 8.56): report rows as a grid on a computer and cards on a phone, the report's
   status switch, and its thread of messages, the staff's own on the right in the accent's soft colour. */
ul.slist,
ul.thread {
  margin: 0;
  padding: 0;
  list-style: none;
}

a.srow {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) 1.3fr 1fr auto;
  grid-gap: 14px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

ul.slist li:last-child a.srow {
  border-bottom: 0;
}

a.srow:hover {
  background: var(--hover);
}

.ssubj {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stitle {
  font-weight: 700;
}

.sline,
.smeta,
.swhen {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.sline {
  font-size: 12px;
}

.report-from {
  margin: 0 0 12px;
}

/* A report's screenshot (task 0105): the file field of the form to our team, and the link on the report's page. */
input[type='file'] {
  display: block;
  max-width: 100%;
  margin: 6px 0 0;
  color: var(--muted);
  font: inherit;
}

.report-shot {
  margin: 12px 0 0;
}

section.report-head .button {
  margin: 0 0 12px;
}

/* A 360-pixel phone has no room for the three labels on one line: a long one wraps inside its button. */
.seg.report-status {
  display: flex;
  white-space: normal;
}

.seg.report-status button {
  flex: 1;
  height: auto;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
}

ul.thread {
  margin: 0 0 16px;
}

li.msg {
  max-width: 85%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card2);
}

li.msg.ours {
  margin-left: auto;
  background: var(--acc-soft);
  color: var(--acc-ink);
}

.msg-who {
  display: block;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.8;
}

/* Our own messages' line keeps its full colour: at 0.8 the accent's ink on its soft fill was 4.3:1 (WCAG 1.4.3). */
li.msg.ours .msg-who {
  opacity: 1;
}

.msg-text {
  white-space: pre-wrap;
  word-wrap: break-word;
}

@media (max-width: 699px) {
  a.srow {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'subj state' 'meta when';
    grid-gap: 4px 12px;
    padding: 12px 4px;
  }

  .ssubj {
    grid-area: subj;
  }

  .sstate {
    grid-area: state;
    text-align: right;
  }

  .smeta {
    grid-area: meta;
    font-size: 12px;
  }

  .swhen {
    grid-area: when;
    font-size: 12px;
    text-align: right;
  }

  li.msg {
    max-width: 100%;
  }
}

/* A seller's or a module's switch, on. */
.switch[aria-checked='true'] {
  border-color: var(--acc);
  background: var(--acc-soft);
}

/* The Radio page's countries of stations: ticks in columns as wide as a name, the list scrolled inside its box. */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 6px 18px;
  max-height: 420px;
  margin: 12px 0 16px;
  padding: 10px 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.country-grid legend {
  padding: 0 6px;
  font-weight: 700;
}

.country-grid label {
  display: flex;
  align-items: baseline;
}

.country-grid label input {
  margin-right: 8px;
}

.country-grid label .muted {
  margin-left: auto;
  padding-left: 8px;
}

/* The Categories page (task 0073 B1): a narrow place field and small arrow buttons in each row. */
table.category-order input[type='number'] {
  width: 84px;
}

table.category-order td.moves {
  white-space: nowrap;
}

table.category-order td.moves button {
  height: 34px;
  margin: 0 4px 0 0;
  padding: 0 12px;
  line-height: 32px;
}

/* A customer's own channel list (task 0649, the board's "Lista kanala"): one row per group, its place, its switch (a
   chip pressed while shown), its name, Channels and the arrows; an opened group's channels as chips that wrap. Margins,
   not flexbox gap, as everywhere in the panel. */
.channel-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

ol.channel-groups {
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-group {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.channel-group-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.channel-group-row > * {
  margin-right: 10px;
}

.channel-group-row .chip {
  margin-bottom: 0;
}

.channel-group-place {
  width: 28px;
  color: var(--muted);
  text-align: right;
}

.channel-group-name {
  flex: 1 1 200px;
  min-width: 0;
}

.channel-group-row .moves button {
  height: 34px;
  margin: 0 4px 0 0;
  padding: 0 12px;
  line-height: 32px;
}

.channel-ticks {
  padding: 10px 0 0 38px;
}

.channel-list-foot {
  margin-top: 12px;
}

/* The Modules page of 19 October (task 0169, apps/backend/docs/panel-modules.md): a card per module that opens its
   own page, and on that page the switch for every customer (a checkbox drawn as the design's switch beside a track
   that follows it), the place as a segmented choice of radio buttons, both plain form fields, and the TV's box drawn
   with the brand preview's tokens beside them from 900 pixels. */
.module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 16px;
  margin: 0 0 20px;
}

a.card.module-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}

a.card.module-card:hover,
a.card.module-card:focus {
  border-color: var(--acc);
}

.module-name {
  display: block;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.module-about {
  display: block;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.module-foot {
  display: flex;
  align-items: center;
}

.module-go {
  margin-left: auto;
  color: var(--acc);
  font-weight: 700;
}

.module-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 20px;
  align-items: start;
}

@media (min-width: 900px) {
  .module-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

label.switch {
  display: flex;
  position: relative;
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  cursor: pointer;
}

.switch-text {
  flex: 1 1 auto;
  min-width: 0;
}

.switch-label {
  display: block;
  font-weight: 700;
}

.switch-state {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

/* The checkbox itself stays in the page, focusable and read by a screen reader; the track beside it is drawn. */
label.switch input.switch {
  position: absolute;
  right: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  opacity: 0;
}

.switch-track {
  display: block;
  position: relative;
  width: 44px;
  height: 24px;
  flex: none;
  margin: 0 0 0 14px;
  border-radius: 12px;
  background: var(--line2);
}

.switch-track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #ffffff;
  transition: transform 0.15s;
}

input.switch:checked + .switch-track {
  background: var(--acc);
}

input.switch:checked + .switch-track::before {
  transform: translateX(20px);
}

input.switch:focus + .switch-track,
.seg.choice input:focus + span {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.seg.choice {
  white-space: normal;
}

.seg.choice label {
  display: inline-block;
  position: relative;
  margin: 0;
  cursor: pointer;
}

.seg.choice input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.seg.choice span {
  display: inline-block;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font: 700 12px/32px 'Roboto Condensed', system-ui, sans-serif;
}

.seg.choice input:checked + span {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.module-form fieldset.choices .seg.choice {
  margin: 0 0 8px;
}

/* The module's name, as the TV writes a box's head. */
.tv-module-head {
  text-transform: uppercase;
}

.tv-place {
  margin: 0 0 12px;
  color: #9aa5b1;
  font-size: 12px;
}

.tv-module + .tv-place {
  margin: 12px 0 0;
}

ul.tv-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.tv-items li {
  margin: 0 0 12px;
}

ul.tv-items li:last-child {
  margin: 0;
}

.tv-when {
  display: block;
  color: var(--tv-acc);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.tv-what {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.tv-where {
  display: block;
  color: #9aa5b1;
  font-size: 13px;
}

/* The TV guide (task 0169): the finished state of a source's channels, in the accent's soft colour as the design's. */
p.all-covered {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--acc-soft);
  color: var(--acc-ink);
  font-weight: 700;
}

/* Task 0193, Nikola's design of 2026-10-20 ("Panel, Izveštaji" and "Panel, Paketi i plaćanje"): the menu's count of
   active problems, the Reports page, Home's Reports card, the Customers page's Registration button and the Packages
   page's tiles. Icons drawn here carry their size as width and height attributes (icons.ts), so the style sheet leaves
   them at it. Margins, not flexbox gap, as the rest of the panel. */
svg.icon[width] {
  width: auto;
  height: auto;
}

nav.menu .item .label {
  flex: 1;
  min-width: 0;
}

.menu-badge {
  flex: none;
  min-width: 22px;
  height: 22px;
  margin: 0 0 0 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 22px;
  text-align: center;
}

@media (min-width: 700px) and (max-width: 1099px) {
  .side nav.menu .item .menu-badge {
    margin: 4px 0 0;
  }
}

.pill {
  display: inline-block;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--card2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
  vertical-align: middle;
}

.pill.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.pill.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill.accent {
  background: var(--acc-soft);
  color: var(--acc-ink);
}

.pill.accent-fill {
  background: var(--acc);
  color: var(--on-acc);
  font-size: 11px;
  font-weight: 700;
}

.pill.count-pill {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pill .icon {
  margin: 0 4px 0 0;
}

.accent-text {
  color: var(--acc-ink);
}

.strong {
  font-weight: 600;
}

/* The Reports page: the head with its tools, then the live cards (or the period's) beside the side cards from 1100. */
.reports-sub {
  max-width: 760px;
}

.reports-sub strong {
  color: var(--text);
  font-weight: 600;
}

.reports-head h1 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.reports-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 8px;
}

.reports-tools > * {
  margin: 0 0 0 8px;
}

.reports-last {
  font-size: 13px;
}

details.period-picker {
  position: relative;
}

details.period-picker > summary {
  display: inline-flex;
  align-items: center;
  margin: 0;
  list-style: none;
}

details.period-picker > summary::-webkit-details-marker {
  display: none;
}

details.period-picker > summary .icon {
  margin: 0 8px 0 0;
}

.period-box {
  position: absolute;
  right: 0;
  z-index: 5;
  width: 340px;
  margin: 8px 0 0;
  padding: 16px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.period-presets {
  margin: 0 0 8px;
}

.period-form label {
  display: inline-block;
  margin: 0 8px 8px 0;
}

.period-form input[type='date'] {
  display: block;
  margin: 4px 0 0;
}

.period-form button,
.period-form .button {
  margin: 4px 8px 0 0;
}

a.button.text-button,
button.text-button {
  border-color: transparent;
  background: transparent;
  color: var(--acc-ink);
}

button.quiet.text-button {
  height: 36px;
  color: var(--muted);
  font-weight: 600;
  line-height: 34px;
}

.reports {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 20px;
  align-items: start;
  margin: 0 0 20px;
}

@media (min-width: 1100px) {
  .reports {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

.reports-main > section.card,
.reports-side > section.card {
  margin: 0 0 20px;
}

section.card.reports-card,
section.card.side-card,
section.card.reports-home {
  padding: 0;
}

.reports-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.reports-card-head h2 {
  margin: 0 8px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.reports-card-head .watch-window {
  margin: 0 0 0 auto;
  font-size: 13px;
}

.watch-window select {
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
}

.watch-window button {
  margin: 0;
}

.problem-chips {
  margin: 0;
  padding: 12px 20px 4px;
}

.problem-chips .chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
}

/* The count in its own colour, the muted one or the chosen chip's ink, unfaded: at 0.7 it read 3.1 to 4.0:1 (WCAG
   1.4.3, filler 151). */
.problem-chips .chip .count {
  font-variant-numeric: tabular-nums;
}

ul.problem-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.problem-row {
  display: flex;
  align-items: flex-start;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

li.problem-row:target {
  background: var(--acc-soft);
}

.kind-tile {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 14px 0 0;
  border-radius: 12px;
  background: var(--card2);
  color: var(--muted);
}

.kind-tile.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.kind-tile.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.kind-tile.small {
  width: 32px;
  height: 32px;
  margin: 0 12px 0 0;
  border-radius: 10px;
}

.problem-text {
  flex: 1;
  min-width: 0;
}

.problem-text p {
  margin: 0;
}

.problem-title strong {
  margin: 0 6px 0 0;
  font-weight: 700;
}

.problem-title .pill {
  margin: 0 4px 0 0;
}

.problem-detail {
  margin: 4px 0 0;
}

p.problem-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

p.problem-meta.danger-text {
  color: var(--danger);
}

.problem-action {
  flex: none;
  margin: 0 0 0 14px;
}

button.quiet.resolve {
  display: inline-flex;
  align-items: center;
  height: 36px;
  margin: 0;
  border-radius: 10px;
  font-weight: 600;
  line-height: 34px;
}

button.quiet.resolve .icon {
  margin: 0 6px 0 0;
}

progress.watch-bar {
  display: block;
  width: 100%;
  height: 6px;
  margin: 8px 0 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  color: var(--acc);
  appearance: none;
}

progress.watch-bar::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--line);
}

progress.watch-bar::-webkit-progress-value {
  border-radius: 999px;
  background: var(--acc);
}

progress.watch-bar::-moz-progress-bar {
  border-radius: 999px;
  background: var(--acc);
}

p.reports-note {
  margin: 0;
  padding: 12px 20px;
  color: var(--muted);
  font-size: 13px;
}

p.reports-empty {
  margin: 0;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

p.reports-foot {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--card2);
  color: var(--muted);
  font-size: 12px;
}

p.reports-sum {
  margin: 0;
  padding: 12px 20px 0;
  font-size: 13px;
}

a.reports-more {
  display: block;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--acc-ink);
  font-weight: 600;
  text-decoration: none;
}

a.reports-more:hover {
  background: var(--hover);
}

/* The side cards: <details>, closed or open without a script. */
.side-card details > summary {
  list-style: none;
  cursor: pointer;
}

.side-card details > summary::-webkit-details-marker {
  display: none;
}

.side-summary {
  display: flex;
  align-items: center;
  padding: 16px 20px;
}

.side-summary > .icon {
  margin: 0 0 0 10px;
  color: var(--faint);
}

.side-card details[open] > .side-summary > .icon {
  transform: rotate(90deg);
}

.side-title {
  flex: 1;
  min-width: 0;
}

.side-title strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.side-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.recurring-entry {
  border-top: 1px solid var(--line);
}

details.recurring-item > summary {
  display: flex;
  align-items: center;
  padding: 14px 20px;
}

.recurring-text {
  flex: 1;
  min-width: 0;
}

.recurring-text strong,
.recurring-line,
.recurring-last {
  display: block;
}

.recurring-line {
  color: var(--muted);
  font-size: 13px;
}

.recurring-last {
  color: var(--muted);
  font-size: 12px;
}

.recurring-badge {
  flex: none;
  width: 60px;
  margin: 0 0 0 12px;
  padding: 6px 10px;
  border-radius: 12px;
  text-align: center;
}

.recurring-badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.recurring-badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.recurring-number {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.recurring-times {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

p.recurring-label {
  margin: 0;
  padding: 0 20px 4px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

ul.recurring-times-list {
  margin: 0;
  padding: 0 20px 12px;
  list-style: none;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

p.recurring-warn {
  margin: 0 20px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

ul.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

li.rule-row {
  display: flex;
  align-items: flex-start;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

.rule-text strong,
.rule-line {
  display: block;
}

.rule-text strong {
  font-weight: 600;
}

.rule-line {
  color: var(--muted);
  font-size: 13px;
}

/* Home's Reports card, in For today's place. */
.reports-home-head {
  display: flex;
  align-items: baseline;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.reports-home-head h2 {
  flex: none;
  margin: 0 12px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.reports-home-head h2 a {
  color: var(--text);
  text-decoration: none;
}

.reports-home-sum {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.home-problem {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

a.home-problem:hover {
  background: var(--hover);
}

a.home-problem .kind-tile {
  width: 44px;
  height: 44px;
}

.home-problem-text {
  flex: 1;
  min-width: 0;
}

.home-problem-title,
.home-problem-meta {
  display: block;
}

.home-problem-title {
  font-weight: 600;
}

.home-problem-meta {
  color: var(--muted);
  font-size: 12px;
}

a.home-problem > .icon {
  color: var(--faint);
}

section.card.reports-home p.reports-empty {
  padding: 24px 20px;
  text-align: left;
}

a.reports-recurring {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 0 0 16px 16px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

a.reports-recurring > span {
  flex: 1;
  margin: 0 8px;
}

/* The Customers page's Registration button: first in the head's buttons. */
a.button.registration-button {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font-weight: 600;
}

a.button.registration-button .icon {
  margin: 0 8px 0 0;
}

/* The Packages page's tiles. */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-gap: 10px;
  margin: 12px 0 0;
}

.pkg-grid > form {
  display: block;
}

.pkg-tile,
button.pkg-tile {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

button.pkg-tile:hover {
  border-color: var(--acc);
  background: var(--hover);
}

.pkg-tile.current {
  border-color: var(--acc);
}

.pkg-tile.off,
button.pkg-tile[disabled] {
  opacity: 0.45;
  cursor: default;
}

button.pkg-tile[disabled]:hover {
  border-color: var(--line2);
  background: var(--card);
}

.pkg-count {
  display: block;
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.pkg-unit {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.pkg-price {
  display: block;
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
}

.pkg-period {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.pkg-order {
  display: block;
  margin: 8px 0 0;
  color: var(--acc-ink);
  font-size: 13px;
  font-weight: 700;
}

.pkg-inquiry {
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px dashed var(--line2);
  border-radius: 14px;
}

.pkg-inquiry p {
  margin: 0 0 4px;
}

p.pkg-inquiry-title {
  font-weight: 700;
}

.pkg-inquiry .button {
  height: 40px;
  line-height: 38px;
}

/* The inquiry's short form (task 0247): its fields one under the other, full width. */
.pkg-inquiry-form {
  display: grid;
  margin: 12px 0 0;
}

.pkg-inquiry-form label {
  margin: 8px 0 4px;
  font-weight: 600;
}

.pkg-inquiry-form textarea,
.pkg-inquiry-form input {
  width: 100%;
  box-sizing: border-box;
}

.pkg-inquiry-form button {
  justify-self: start;
  margin: 8px 0 0;
}

/* The viewing statistics' pages (task 0458 part 2): the Live page's table, a channel in trouble in the danger colour
   with a bar at its left, a viewer whose channel stopped likewise; the hourly charts and the customer's stall timeline
   as the Statistics page's bars, SVG rectangles coloured here (the Content-Security-Policy refuses style attributes). */
table.live-table {
  width: 100%;
}
tr.live-item.trouble td {
  background: var(--danger-bg);
  color: var(--danger);
}
tr.live-item.trouble td:first-child {
  box-shadow: inset 4px 0 0 var(--danger);
}
tr.live-viewers td {
  padding-top: 0;
}
ul.live-viewer-list {
  margin: 0;
  padding-left: 20px;
}
li.live-viewer.stopped {
  color: var(--danger);
}
.hour-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  grid-gap: 16px;
}
svg.hour-chart,
svg.stall-timeline {
  display: block;
  width: 100%;
  height: 120px;
}
svg.stall-timeline {
  height: 14px;
}
svg.hour-chart rect {
  fill: var(--acc);
}
svg.hour-chart.stalls rect,
svg.hour-chart.failed rect,
svg.stall-timeline rect {
  fill: var(--danger);
}
svg.hour-chart.start rect {
  fill: var(--warn);
}
svg.stall-timeline rect.stall-day {
  fill: var(--hover);
}
.hour-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 4px 0 0;
}
ul.stall-list {
  margin: 4px 0 12px;
  padding-left: 20px;
}

/* Add customer as the board's dialog (task 0679, customer-list.ts addDialog), with no script: a <details> whose summary
   is the head's button while closed and, while open, the veil over the page (a press on it closes the dialog); the box
   560 wide in the middle, the whole screen on a phone; over the phone's tabs (40), under the quick search (50). */
.add-dialog > summary {
  list-style: none;
}

.add-dialog > summary::-webkit-details-marker {
  display: none;
}

.add-dialog[open] > summary.add-open {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 44;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--veil);
  color: transparent;
  font-size: 0;
}

.add-dialog .add-box {
  position: fixed;
  top: 5vh;
  right: 0;
  left: 0;
  z-index: 46;
  width: 560px;
  max-width: 92%;
  max-height: 90vh;
  margin: 0 auto;
  overflow-y: auto;
  text-align: left;
  box-shadow: var(--shadow-lg);
}

.add-head {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
}

.add-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.add-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
}

.add-close:hover {
  background: var(--hover);
}

.add-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin: 8px 0 0;
}

.add-actions > * {
  margin: 0 0 8px 8px;
}

.add-actions button .icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

@media (max-width: 699px) {
  .add-dialog .add-box {
    top: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
}
