/* KantineTV admin, operator area and login — the design in design/ (tokens in /kt.css). Plain CSS, mobile first.
   Only Poppins and Source Sans 3 in 400 and 700 are bundled, so weights are written as 400 or 700. */
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 var(--kt-font-ui); color: var(--kt-text-body); background: var(--kt-surface-page); }
a { color: var(--kt-text-link); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--kt-font-display); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; color: var(--kt-text-strong); }
h1 { font-size: var(--kt-text-2xl); margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.0625rem; margin: 0 0 .5rem; }
img { max-width: 100%; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--kt-focus-ring); }
.muted { color: var(--kt-neutral-600); font-weight: 400; }
small.muted { display: block; margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
label + small.muted { margin: -10px 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* hidden must beat the display of button/.button below */
[hidden] { display: none !important; }

/* ---- Shell: sidebar (admin: white, operator: dark) + content ------------------------------------ */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--kt-sidebar-width); flex: none; display: flex; flex-direction: column;
  background: var(--kt-surface-card); border-right: 1px solid var(--kt-border-subtle); }
.club { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sidebar .club { padding: 18px 16px; }
.club-mark { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--kt-radius-md);
  background: var(--kt-color-primary); color: var(--kt-color-on-primary); font: 700 15px var(--kt-font-display); }
.club-text { min-width: 0; }
.club-text strong { display: block; font: 700 15px/1.3 var(--kt-font-display); color: var(--kt-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-text span { display: block; font-size: 12.5px; color: var(--kt-neutral-600); }
.menu { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; flex: 1; overflow-y: auto; }
.menu .sect { padding: 14px 8px 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--kt-tracking-caps); color: var(--kt-neutral-600); }
.menu form { margin: 0; }
.menu a, .navbtn {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--kt-radius-md); background: transparent; box-shadow: none; color: var(--kt-text-body);
  font: 400 15px/1.2 var(--kt-font-ui); text-decoration: none; text-align: left; cursor: pointer;
  transition: background var(--kt-duration-fast) var(--kt-ease-standard);
}
.menu a:hover, .navbtn:hover { background: var(--kt-surface-sunken); }
.navbtn:active { background: var(--kt-surface-sunken); transform: none; }
.menu a[aria-current] { background: var(--kt-surface-selected); color: var(--kt-text-on-soft); font-weight: 700; }
.menu.foot { flex: none; padding: 12px 10px; border-top: 1px solid var(--kt-border-subtle); }
.main { flex: 1; min-width: 0; }
.main > main { max-width: var(--kt-content-max); margin: 0 auto; padding: 28px var(--kt-page-gutter) 48px; }
.mobile-bar { display: none; }
.mnav summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; cursor: pointer;
  border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-md); background: var(--kt-surface-card); color: var(--kt-text-strong); font-weight: 700; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav[open] summary { background: var(--kt-surface-selected); }
.mnav nav { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 64px); overflow-y: auto;
  background: var(--kt-surface-card); border-bottom: 1px solid var(--kt-border-subtle); box-shadow: var(--kt-shadow-md); }

.sidebar.op { width: 232px; padding: 14px; gap: 4px; background: var(--kt-neutral-900); border-right: 0; color: #fff; }
.op-brand { display: flex; align-items: center; gap: 10px; padding: 6px 6px 16px; font: 400 15px/1.2 var(--kt-font-display); }
.op-brand b { font-weight: 700; }
.op-brand small { display: block; margin-top: 2px; font: 400 12px var(--kt-font-ui); color: rgba(255, 255, 255, .62); }
.sidebar.op .menu { padding: 0; }
.sidebar.op .menu a, .sidebar.op .navbtn { padding: 0 10px; color: rgba(255, 255, 255, .78); font-size: 14.5px; }
.sidebar.op .menu a:hover, .sidebar.op .navbtn:hover { background: rgba(255, 255, 255, .08); }
.sidebar.op .menu a[aria-current] { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; }
.sidebar.op .menu.foot { padding: 12px 0 0; border-top-color: rgba(255, 255, 255, .12); }

.operator-banner { position: relative; margin: 0; padding: 12px 16px 12px 46px; background: var(--kt-amber-100); color: var(--kt-neutral-900);
  border-bottom: 1px solid var(--kt-amber-400); font-size: 15px; --i: url(/icons/info.svg); }
.operator-banner::before { left: 16px; top: 13px; }
.operator-banner a { color: inherit; font-weight: 700; }

@media (max-width: 920px) {
  .shell { display: block; }
  .sidebar:not(.op) { display: none; }
  .mobile-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 16px; background: var(--kt-surface-card); border-bottom: 1px solid var(--kt-border-subtle); }
  .mobile-bar .club-mark { width: 34px; height: 34px; font-size: 13px; }
  .sidebar.op { z-index: 20; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 6px 12px; }
  .op-brand { padding: 0; margin-right: auto; }
  .sidebar.op .menu { flex: none; flex-direction: row; }
  .sidebar.op .menu.foot { padding: 0; border: 0; }
  .main > main { padding: 20px 16px 40px; }
}

/* ---- Page title bar -------------------------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 0 0 24px; }
.page-head h1 { margin: 0; }
.page-sub { margin: 5px 0 0; font-size: 15px; color: var(--kt-neutral-600); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; text-decoration: none; }
.back:hover { text-decoration: underline; }
p:has(> .back) { margin: -8px 0 4px; }
.section-label { display: block; margin: 0 0 12px; font: 400 11px var(--kt-font-mono); letter-spacing: var(--kt-tracking-caps); text-transform: uppercase; color: var(--kt-neutral-600); }

/* ---- Cards, lists, empty states ---------------------------------------------------------------- */
.card { margin: 0 0 16px; padding: 20px; background: var(--kt-surface-card); border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-lg); box-shadow: var(--kt-shadow-xs); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -20px -20px 16px; padding: 12px 16px; border-bottom: 1px solid var(--kt-border-subtle); }
.panel-head h2, .panel-head h3 { margin: 0; }
.tile { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--kt-radius-md);
  background: var(--kt-color-primary-soft); color: var(--kt-green-700); }

.list { list-style: none; margin: 0 0 16px; padding: 0; background: var(--kt-surface-card); border: 1px solid var(--kt-border-subtle);
  border-radius: var(--kt-radius-lg); box-shadow: var(--kt-shadow-xs); overflow: hidden; }
.list:not(:has(li)) { display: none; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 60px; padding: 10px 16px; border-top: 1px solid var(--kt-border-subtle); }
.list li:first-child { border-top: 0; }
.list form { margin: 0; }
.list .name { font-weight: 700; color: var(--kt-text-strong); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 16px; padding: 40px 24px; text-align: center;
  background: var(--kt-surface-card); border: 1.5px dashed var(--kt-border-strong); border-radius: var(--kt-radius-lg); }
.empty .tile { width: 48px; height: 48px; }
.empty h3 { margin: 0; font-size: 1.25rem; }
.empty p { margin: 0; max-width: 44ch; font-size: 15px; color: var(--kt-neutral-600); }

table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; background: var(--kt-surface-card); border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-lg); box-shadow: var(--kt-shadow-xs); }
th { padding: 13px 12px 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-align: left; white-space: nowrap; color: var(--kt-neutral-600); }
td { padding: 6px 12px; border-top: 1px solid var(--kt-border-subtle); }
td:last-child { text-align: right; }

/* ---- Alerts (InlineAlert): icon + text, never colour alone ------------------------------------ */
.notice, .error, .info { position: relative; margin: 0 0 16px; padding: 13px 15px 13px 45px; border-radius: var(--kt-radius-md); font-size: 15px; }
.notice::before, .error::before, .info::before, .operator-banner::before {
  content: ""; position: absolute; left: 15px; top: 15px; width: 19px; height: 19px; background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.notice { background: var(--kt-success-50); color: var(--kt-success-700); --i: url(/icons/circle-check.svg); }
.error { background: var(--kt-danger-50); color: var(--kt-danger-700); --i: url(/icons/triangle-alert.svg); }
.info { background: var(--kt-info-50); color: var(--kt-info-700); --i: url(/icons/info.svg); }
.notice a, .error a, .info a { color: inherit; font-weight: 700; }
.notice p { margin: 0 0 8px; }

/* ---- Buttons ----------------------------------------------------------------------------------- */
input, select, textarea, button { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px;
  border: 1px solid transparent; border-radius: var(--kt-radius-md); background: var(--kt-color-primary); color: var(--kt-color-on-primary);
  box-shadow: var(--kt-shadow-primary); font: 700 15px/1.2 var(--kt-font-ui); text-align: center; text-decoration: none; cursor: pointer;
  transition: background var(--kt-duration-fast) var(--kt-ease-standard), border-color var(--kt-duration-fast) var(--kt-ease-standard),
    box-shadow var(--kt-duration-fast) var(--kt-ease-standard), transform var(--kt-duration-instant);
}
button:hover, .button:hover { background: var(--kt-color-primary-hover); }
button:active, .button:active { background: var(--kt-color-primary-active); box-shadow: none; transform: translateY(1px); }
.button.secondary, button.secondary { background: var(--kt-surface-card); color: var(--kt-text-strong); border-color: var(--kt-border-subtle); box-shadow: var(--kt-shadow-xs); }
.button.secondary:hover, button.secondary:hover { background: var(--kt-surface-hover); border-color: var(--kt-border-strong); }
.button.ghost, button.ghost { background: transparent; color: var(--kt-text-body); box-shadow: none; }
.button.ghost:hover, button.ghost:hover { background: var(--kt-surface-sunken); }
button.danger, .button.danger { background: var(--kt-surface-card); color: var(--kt-danger-500); border-color: var(--kt-danger-500); box-shadow: none; }
button.danger:hover, .button.danger:hover { background: var(--kt-danger-50); color: var(--kt-danger-700); border-color: var(--kt-danger-700); }
.button.secondary:active, button.secondary:active, .button.ghost:active, button.ghost:active, button.danger:active { background: var(--kt-surface-sunken); }
button.lg, .button.lg { min-height: 52px; padding: 10px 26px; font-size: 17px; }
button.full, .button.full { width: 100%; }
.iconbtn, button.iconbtn { width: 44px; padding: 0; flex: none; background: var(--kt-surface-card); color: var(--kt-neutral-700); border-color: var(--kt-border-subtle); box-shadow: none; }
.iconbtn:hover, button.iconbtn:hover { background: var(--kt-surface-sunken); border-color: var(--kt-border-strong); }
button.iconbtn.danger { color: var(--kt-danger-500); border-color: var(--kt-border-subtle); }
button.iconbtn.danger:hover { color: var(--kt-danger-700); border-color: var(--kt-danger-500); background: var(--kt-danger-50); }
.iconbtn.up .ic { transform: rotate(180deg); }

/* ---- Form controls ------------------------------------------------------------------------------ */
label, .field { display: block; margin: 0 0 16px; font-size: 14px; font-weight: 700; color: var(--kt-text-strong); }
.field > span { display: block; }
input:where(:not([type=checkbox], [type=radio], [type=color], [type=file], [type=hidden])), select, textarea {
  display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 9px 12px;
  border: 1px solid var(--kt-border-strong); border-radius: var(--kt-radius-md); background-color: var(--kt-surface-card);
  color: var(--kt-text-strong); font: 400 16px/1.4 var(--kt-font-ui);
  transition: border-color var(--kt-duration-fast), box-shadow var(--kt-duration-fast);
}
textarea { min-height: 7rem; }
input:hover, select:hover, textarea:hover { border-color: var(--kt-neutral-400); }
input:focus, select:focus, textarea:focus { outline: 2px solid transparent; border-color: var(--kt-border-focus); box-shadow: var(--kt-focus-ring); }
input::placeholder, textarea::placeholder { color: var(--kt-neutral-500); }
select { appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--kt-surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a5751' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 18px; }
input[type=color] { display: block; width: 5rem; height: 44px; margin-top: 6px; padding: 3px; border: 1px solid var(--kt-border-strong); border-radius: var(--kt-radius-md); background: var(--kt-surface-card); cursor: pointer; }
input[type=file] { display: block; max-width: 100%; margin-top: 6px; font-size: 15px; font-weight: 400; color: var(--kt-text-body); }
input[type=file]::file-selector-button { min-height: 44px; margin-right: 12px; padding: 0 16px; border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-md);
  background: var(--kt-surface-card); color: var(--kt-text-strong); font: 700 15px var(--kt-font-ui); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--kt-surface-hover); border-color: var(--kt-border-strong); }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; margin: 0; accent-color: var(--kt-color-primary); vertical-align: middle; cursor: pointer; }
label.check { position: relative; display: block; min-height: 44px; margin: 0; padding: 10px 0 10px 32px; font-size: 15px; font-weight: 400; color: var(--kt-text-body); cursor: pointer; }
label.check > input { position: absolute; left: 0; top: 11px; }
input.code { min-height: 60px; text-align: center; font: 700 28px/1.2 var(--kt-font-display); letter-spacing: .15em; text-transform: uppercase; }
input.copy { font: 400 14px var(--kt-font-mono); }

fieldset { min-width: 0; margin: 0 0 20px; padding: 16px; border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-lg); }
legend { padding: 0 6px; font: 700 15px var(--kt-font-display); color: var(--kt-text-strong); }
.theme-card { position: relative; display: block; margin: 0 0 8px; padding: 12px 14px 12px 46px; border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-md);
  background: var(--kt-surface-card); font-size: 15px; font-weight: 400; color: var(--kt-text-body); cursor: pointer; transition: background var(--kt-duration-fast), border-color var(--kt-duration-fast); }
.theme-card > input { position: absolute; left: 14px; top: 13px; }
.theme-card:hover { border-color: var(--kt-border-strong); }
.theme-card:has(input:checked) { border-color: var(--kt-color-primary); background: var(--kt-surface-selected); }
.theme-card .muted { display: block; }
.font-title { margin: 8px 0; }
.font-options { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); margin-bottom: 16px; }
.font-options .theme-card { margin: 0; font-size: 1.15rem; }

/* ---- Layout helpers ------------------------------------------------------------------------------ */
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.inline:has(> label.grow) { align-items: flex-end; }
.inline > label { margin: 0; }
.inline > input, .inline > select, .inline > .euro input { margin-top: 0; }
.grow { flex: 1 1 12rem; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.row > label { flex: 1 1 9rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.days { display: flex; flex-wrap: wrap; gap: 0 16px; }
.narrow { max-width: 720px; margin: 0 auto; }
td strong { color: var(--kt-text-strong); }
.item-row { padding: 12px 0; border-top: 1px solid var(--kt-border-subtle); }
.panel-head + .item-row, .card > p + .item-row { border-top: 0; }

/* ---- Prijslijst ------------------------------------------------------------------------------------ */
.euro { position: relative; display: block; width: 7.5rem; flex: none; }
.euro::before { content: "€"; position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: var(--kt-neutral-600); font-weight: 700; }
.euro input { padding-left: 28px; text-align: right; font-weight: 700; }
.product { padding: 12px 0; border-top: 1px solid var(--kt-border-subtle); }
.product.new { border-top: 1px dashed var(--kt-border-strong); }
.cat-name { font-family: var(--kt-font-display); font-size: 1.0625rem; font-weight: 700; }
.duration { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.duration input { width: 5.5rem; margin: 0; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; border-radius: var(--kt-radius-pill); background: var(--kt-neutral-100); color: var(--kt-neutral-800);
  font-size: 11.5px; font-weight: 700; line-height: 1.3; letter-spacing: var(--kt-tracking-caps); text-transform: uppercase; }
.badge.warning { background: var(--kt-warning-50); color: var(--kt-warning-700); }
.badge.off { background: var(--kt-neutral-100); color: var(--kt-neutral-600); }
/* Op TV switch (also used on other pages). */
label.check.switch { padding-left: 50px; }
label.check.switch > input { appearance: none; width: 40px; height: 22px; border-radius: 11px; background: var(--kt-neutral-300); transition: background var(--kt-duration-fast); }
label.check.switch > input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--kt-duration-fast); }
label.check.switch > input:checked { background: var(--kt-color-primary); }
label.check.switch > input:checked::before { transform: translateX(18px); }
label.check.switch > input:focus-visible { outline: 2px solid var(--kt-color-primary); outline-offset: 2px; }
.product .thumb { object-fit: cover; }

/* Prijslijst: products on the left, the sticky Op de TV panel on the right; one column (panel below) on narrow screens. */
.main > main:has(.pl-grid) { max-width: 1480px; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 24px; align-items: start; margin-bottom: 16px; }
.pl-main { min-width: 0; }
.pl-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pl-side .card { margin: 0; padding: 16px; }
@media (max-width: 1400px) {
  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-side { position: static; max-height: none; overflow: visible; }
  .pl-side > .card { width: 100%; max-width: 640px; }
}
.pl-label { margin: 0; font: 700 13px var(--kt-font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--kt-neutral-600); }
.pl-kop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 2px 12px; }
.pl-kop .muted { font-size: 14px; color: var(--kt-neutral-500); }
.pl-hint { margin: -4px 2px 16px; font-size: 13.5px; }
.cat-nieuw { margin-bottom: 12px; }

/* Save status (header): Opgeslagen, Opslaan… or Niet opgeslagen. */
.opslag-status { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--kt-radius-md);
  background: var(--kt-color-primary-soft); color: var(--kt-color-primary); font-size: 14px; font-weight: 700; white-space: nowrap; }
.opslag-status .dot { background: currentColor; }
.opslag-status[data-state=bezig] { background: var(--kt-surface-sunken); color: var(--kt-neutral-700); }
.opslag-status[data-state=bezig] .dot { animation: kt-puls 1s ease-in-out infinite; }
.opslag-status[data-state=fout] { background: var(--kt-danger-50); color: var(--kt-danger-700); }
@keyframes kt-puls { 50% { opacity: .25; } }

/* Op de TV: mode switch, mini TV with the editable tile grid and the list, steppers, status line. */
.tv-kop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-bottom: 12px; }
.modus { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--kt-surface-sunken); border-radius: var(--kt-radius-md); }
button.modus-knop { min-height: 32px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--kt-neutral-600); font-size: 13px; }
button.modus-knop:hover { background: rgba(255, 255, 255, .6); color: var(--kt-text-strong); }
button.modus-knop[aria-pressed=true] { background: var(--kt-surface-card); color: var(--kt-color-primary); box-shadow: var(--kt-shadow-xs); }
.mini-tv { overflow: hidden; border: 1px solid var(--kt-border-subtle); border-radius: 12px; box-shadow: 0 10px 24px rgba(26, 25, 23, .10); }
.mini-balk { display: flex; align-items: center; height: 30px; padding: 0 10px; background: var(--kt-neutral-900); color: #fff; font: 700 12.5px var(--kt-font-display);
  white-space: nowrap; overflow: hidden; }
.mini-scherm { aspect-ratio: 16 / 9.5; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #f3f2ee; }
.mini-raster { flex: 0 0 54%; min-height: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 2), minmax(0, 1fr)); }
.mini-scherm[data-mode=tegels] .mini-raster { flex: 1 1 auto; }
.mini-cel { min-width: 0; min-height: 0; border: 1.5px dashed #d9d5cb; border-radius: 6px; }
button.mini-cel { padding: 0; background: transparent; box-shadow: none; color: #9c9890; font-size: 14px; }
button.mini-cel:hover { background: var(--kt-color-primary-soft); border-color: var(--kt-color-primary); color: var(--kt-color-primary); }
.mini-tegel { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: 8px; cursor: pointer; outline: 1px solid rgba(26, 25, 23, .10);
  background: #cfcbc2 repeating-linear-gradient(135deg, rgba(21, 21, 15, .09) 0 5px, transparent 5px 11px); }
.mini-tegel.gekozen { outline: 2px solid var(--kt-color-primary); outline-offset: 1px; }
.mini-tegel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-tekst { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: linear-gradient(to top, rgba(12, 11, 10, .78), rgba(12, 11, 10, 0));
  color: #fff; font-size: 11px; line-height: 1.2; }
.mini-tekst strong { display: block; overflow: hidden; font: 700 11.5px/1.2 var(--kt-font-display); white-space: nowrap; text-overflow: ellipsis; }
.mini-label { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: var(--kt-radius-pill); background: var(--kt-amber-400); color: var(--kt-neutral-900);
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mini-maat { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(12, 11, 10, .62); color: #fff; font-size: 9.5px; font-weight: 700;
  opacity: 0; transition: opacity var(--kt-duration-fast); }
.mini-tegel.gekozen .mini-maat { opacity: 1; }
/* The resize corner; the ::after gives a finger-sized target, touch-action: none lets a touch drag instead of scroll. */
.mini-hoek { position: absolute; right: -1px; bottom: -1px; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 4px 0 8px 0;
  background: var(--kt-color-primary); cursor: nwse-resize; opacity: .55; touch-action: none; }
.mini-hoek::after { content: ""; position: absolute; inset: -12px -2px -2px -12px; }
.mini-tegel.gekozen .mini-hoek, .mini-hoek:hover { opacity: 1; }
.mini-lijst { flex: 1 1 auto; min-height: 0; overflow: hidden; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); align-content: start; }
.mini-cat { min-width: 0; padding: 7px 9px; background: #fff; border: 1px solid #e4e1d9; border-radius: 6px; }
.mini-cat strong { display: block; margin-bottom: 4px; font: 700 11px var(--kt-font-display); color: var(--kt-text-strong); }
.mini-cat div + strong { margin-top: 6px; }
.mini-cat div { display: flex; align-items: baseline; gap: 8px; padding: 1.5px 0; font-size: 10.5px; }
.mini-cat div span:first-child { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; text-transform: uppercase; color: var(--kt-text-strong); }
.instellingen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.stepper { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 400; color: var(--kt-neutral-600); }
.stepper-box { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--kt-border-strong); border-radius: var(--kt-radius-md); background: var(--kt-surface-card); }
button.stap { width: 34px; min-height: 36px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--kt-text-strong); font-size: 16px; }
button.stap:hover { background: var(--kt-surface-sunken); }
button.stap:disabled { background: transparent; color: var(--kt-neutral-300); cursor: default; }
.stepper output { min-width: 22px; padding: 0 2px; text-align: center; font-size: 14.5px; font-weight: 700; color: var(--kt-text-strong); }
.stepper select { width: auto; min-height: 36px; margin: 0; padding-top: 4px; padding-bottom: 4px; font-size: 14.5px; }
.raster-status { margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--kt-border-subtle); font-size: 13.5px; line-height: 1.5; color: var(--kt-neutral-600); }
.raster-status:empty { display: none; }
#op-de-tv h3.pl-label { margin: 12px 0 8px; font-size: 12px; }

/* Tile button of a product row: In lijst, or Tegel W×H (filled). */
button.tile-btn { min-height: 34px; padding: 0 10px; border: 1px solid var(--kt-border-subtle); background: var(--kt-surface-card); box-shadow: none; color: var(--kt-neutral-600);
  font-size: 13.5px; white-space: nowrap; }
button.tile-btn:hover { background: var(--kt-surface-hover); border-color: var(--kt-border-strong); }
button.tile-btn.actief { background: var(--kt-color-primary); border-color: var(--kt-color-primary); color: #fff; }
button.tile-btn.actief:hover { background: var(--kt-color-primary-hover); }

.card.cat { padding: 0; overflow: hidden; }
.cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border-bottom: 1px solid var(--kt-border-subtle); }
.cat-tv { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0 14px; border-bottom: 1px solid var(--kt-border-subtle); }
.cat-tv label.check { font-size: 13.5px; color: var(--kt-neutral-600); }
.cat-head .spacer { flex: 1; }
.cat-head .cat-count { font-size: 13px; }
.cat-head button { min-height: 36px; }
.cat-head .iconbtn { width: 36px; }
.cat-head button.ghost { padding: 6px 12px; }
.cat .empty-cat { margin: 0; padding: 10px 14px 14px; font-size: 14px; }
input.cat-name { flex: 0 1 14rem; width: 14rem; min-width: 6rem; min-height: 36px; margin: 0; padding: 4px 8px; border-color: transparent; background: transparent;
  font: 700 17px var(--kt-font-display); color: var(--kt-text-strong); }
/* Product rows: a wrapping row of fields (the table markup is kept for the drag, search and save code). */
table.producten, table.producten > tbody, table.producten > tfoot { display: block; }
table.producten tr.product { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 9px 14px; border-top: 1px solid var(--kt-neutral-50); }
table.producten tr.product.new { border-top: 1px dashed var(--kt-border-strong); }
table.producten td { display: block; padding: 0; border: 0; text-align: left; }
table.producten .c-naam { flex: 1 1 130px; min-width: 120px; }
table.producten .c-label select { width: 7rem; }
table.producten input:where(:not([type=checkbox], [type=file])), table.producten select { min-height: 36px; margin: 0; padding-top: 5px; padding-bottom: 5px; font-size: 15px; }
table.producten .euro { width: 6rem; }
table.producten .iconbtn { width: 36px; min-height: 36px; }
tbody tr.product:hover { background: var(--kt-neutral-25); }
tr.product.uit > td { opacity: .55; }
tr.product.dragging { background: var(--kt-surface-selected); box-shadow: var(--kt-shadow-md); }
.card.cat.dragging { box-shadow: var(--kt-shadow-lg); border-color: var(--kt-color-primary); }
.product .desc { margin-top: 6px; border-color: transparent; background: transparent; }
.product .desc:hover { border-color: var(--kt-border-subtle); }
.product .desc:focus, input.cat-name:hover, input.cat-name:focus { border-color: var(--kt-border-strong); background: var(--kt-surface-card); }
.naam-rij { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 36px; }
.naam-rij .naam, .prijs { font-weight: 700; color: var(--kt-text-strong); white-space: nowrap; }
.badge.twelve { background: var(--kt-info-50); color: var(--kt-info-700); }
/* A finger-sized handle; touch-action: none lets a touch drag instead of scroll. */
.grip { display: inline-flex; margin: -8px -6px; padding: 8px 6px; color: var(--kt-neutral-300); cursor: grab; touch-action: none; user-select: none; }
.grip:hover { color: var(--kt-neutral-600); }
.dragging .grip { cursor: grabbing; }
/* Photo: a thumbnail button (hatched when empty) with a small remove button on it. */
.foto { position: relative; width: 34px; }
button.thumb-btn { width: 34px; min-height: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--kt-radius-sm); overflow: hidden; background: none; box-shadow: none; }
button.thumb-btn:hover { background: none; filter: brightness(.92); }
.thumb-btn .thumb { display: block; width: 34px; height: 34px; }
.thumb-btn span.thumb { background: #e8e6e0 repeating-linear-gradient(135deg, rgba(21, 21, 15, .07) 0 4px, transparent 4px 9px); }
button.foto-weg { position: absolute; top: -6px; right: -8px; width: 18px; min-height: 18px; height: 18px; padding: 0; border-radius: 50%;
  background: var(--kt-neutral-800); color: #fff; box-shadow: none; }
button.foto-weg:hover { background: var(--kt-danger-500); }
/* A refused value: red border and the reason under the field. */
[aria-invalid=true], [aria-invalid=true]:hover { border-color: var(--kt-danger-500) !important; }
button.thumb-btn[aria-invalid=true] { outline: 2px solid var(--kt-danger-500); }
.veld-fout { display: block; max-width: 18rem; margin-top: 4px; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--kt-danger-700); white-space: normal; }
.tv-preview.klein { margin: 0; }
.pl-side .tv-preview.klein + .muted { margin: 8px 0 0; }
.verborgen-lijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.verborgen-lijst:empty { display: none; }
.verborgen-lijst li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.verborgen-lijst button { min-height: 32px; padding: 4px 12px; font-size: 14px; }
#verborgen .niets { margin: 0; font-size: 14px; }
/* Toasts (Toast): bottom-right, a success-coloured edge, title and detail. */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; flex-direction: column; gap: 2px; min-width: 280px; max-width: 420px; padding: 12px 16px; background: var(--kt-surface-card);
  border: 1px solid var(--kt-border-subtle); border-left: 4px solid var(--kt-success-500); border-radius: var(--kt-radius-md); box-shadow: var(--kt-shadow-lg); }
.toast strong { font-size: 15px; color: var(--kt-text-strong); }
.toast span { font-size: 14px; color: var(--kt-neutral-600); }
.toast.danger { border-left-color: var(--kt-danger-500); }

/* Producten: search on name, "Ongedaan maken" in the notice, prullenbak rows. */
.search-field { position: relative; max-width: 24rem; margin: 0 0 16px; }
.search-field .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--kt-neutral-500); pointer-events: none; }
.search-field input { margin-top: 0; padding-left: 38px; }
.notice form { display: inline; }
button.link { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font-weight: 700; text-decoration: underline; }
button.link:hover, button.link:active { background: none; transform: none; }
.product.trash .grow { color: var(--kt-neutral-700); }
.product.trash .thumb { opacity: .7; }

.thumb { width: 44px; height: 44px; flex: none; object-fit: contain; background: var(--kt-surface-sunken); border-radius: var(--kt-radius-sm); }
.preview { display: block; max-width: 12rem; max-height: 8rem; margin: 8px 0; background: var(--kt-surface-sunken); border-radius: var(--kt-radius-sm); }
/* Sponsor "Volledig scherm uiting": the whole image, with what a 16:9 TV cuts off shaded (sponsor.js). */
.crop-preview { margin: 12px 0 0; }
.crop-frame { position: relative; max-width: 420px; margin: 0 0 4px; background: var(--kt-surface-sunken); }
.crop-frame img { display: block; width: 100%; height: auto; }
.crop-shade { position: absolute; background: rgba(15, 14, 13, .55); }

/* ---- Status (StatusPill): dot + icon + word ---------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; min-height: 28px; margin: 10px 0; padding-left: 38px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--kt-color-primary-soft); color: var(--kt-green-700); font: 700 13px/28px var(--kt-font-display); text-align: center; }
.steps li.done { color: var(--kt-neutral-600); text-decoration: line-through; }
.steps li.done::before { content: ""; background: var(--kt-color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--kt-neutral-500); }
.online .dot { background: var(--kt-success-500); }
.offline .dot { background: var(--kt-danger-500); }
p.online, p.offline { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; margin: 0 0 12px; padding: 4px 12px 4px 10px;
  border-radius: 16px; background: var(--kt-surface-sunken); font-size: 14px; font-weight: 700; }
.status { list-style: none; margin: 0 0 16px; padding: 0; }
.status li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; padding: 12px 16px; background: var(--kt-surface-card);
  border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-lg); box-shadow: var(--kt-shadow-xs); }
.status li > .dot { margin-top: 8px; }
.status li > .ic { margin-top: 4px; }
.status.compact li { align-items: center; margin: 0; padding: 4px 0; border: 0; background: none; box-shadow: none; font-size: 14px; }
.status.compact li > .dot, .status.compact li > .ic { margin-top: 0; }

/* TV previews: the real player in a 16:9 iframe (it sizes itself in viewport units) */
.tv-preview { display: block; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 12px; border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-md); background: #000; pointer-events: none; }
.previews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); margin-bottom: 16px; }
.previews .card { margin: 0; padding: 0; overflow: hidden; }
.previews .tv-preview { margin: 0; border: 0; border-bottom: 1px solid var(--kt-border-subtle); border-radius: 0; }
.previews .card-body { padding: 14px 16px; }
.previews h3 { margin-bottom: 6px; }

/* ---- Login, invite and messages ------------------------------------------------------------------ */
.plain { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.plain > main { width: 100%; max-width: 440px; }
.plain .card { padding: 28px; }
.plain.wide { display: block; padding: 0; }
.plain.wide > main { max-width: none; }
.lockup { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; margin: 0 0 16px; color: var(--kt-text-strong); text-decoration: none;
  font: 400 24px var(--kt-font-display); letter-spacing: -0.015em; }
.lockup b { font-weight: 700; color: var(--kt-green-600); }
.login { display: grid; grid-template-columns: minmax(0, 1fr) 1fr; min-height: 100vh; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-form > div { width: 100%; max-width: 380px; }
.login h1 { margin: 18px 0 0; font-size: 30px; }
.login .page-sub { margin: 8px 0 24px; font-size: 16px; }
.login form { margin-bottom: 16px; }
.login-side { display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; color: #fff;
  background: var(--kt-motif-pitch-lines), linear-gradient(160deg, var(--kt-green-600), var(--kt-green-900)); }
.login-side p { margin: 16px 0 0; font-size: 15px; color: rgba(255, 255, 255, .85); }
.login-side .promise { margin: 0; max-width: 22ch; font: 700 30px/1.2 var(--kt-font-display); letter-spacing: -0.02em; color: #fff; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-side { display: none; } }

/* ---- Weekplanning: a week grid of 7 day columns; blocks are placed by minute (top/height in % of 24 h). ---- */
.wp-scroll { overflow: auto; max-height: 70vh; margin-bottom: 16px; background: var(--kt-surface-card); border: 1px solid var(--kt-border-subtle); border-radius: var(--kt-radius-lg); box-shadow: var(--kt-shadow-xs); }
.wp-week { display: grid; grid-template-columns: 3.4rem repeat(7, minmax(5.5rem, 1fr)); grid-template-rows: auto 48rem; min-width: 44rem; }
.wp-head { position: sticky; top: 0; z-index: 3; padding: 8px 4px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: var(--kt-tracking-caps);
  text-transform: uppercase; color: var(--kt-neutral-600); background: var(--kt-surface-sunken); border-left: 1px solid var(--kt-border-subtle); }
.wp-corner { position: sticky; top: 0; left: 0; z-index: 4; background: var(--kt-surface-sunken); }
.wp-hours { position: sticky; left: 0; z-index: 2; display: grid; grid-template-rows: repeat(24, 1fr); background: var(--kt-surface-card); border-right: 1px solid var(--kt-border-subtle); }
.wp-hours span { padding-left: 4px; border-top: 1px solid var(--kt-neutral-100); font: 11.5px var(--kt-font-mono); color: var(--kt-neutral-600); }
.wp-col { position: relative; border-left: 1px solid var(--kt-border-subtle);
  background: repeating-linear-gradient(var(--kt-surface-card) 0 calc(100% / 24 - 1px), var(--kt-neutral-100) 0 calc(100% / 24)); }
button.wp-block {
  position: absolute; left: 2px; right: 2px; overflow: hidden; display: block; min-height: 1.2rem; padding: 2px 5px;
  border: 0; border-radius: var(--kt-radius-sm); box-shadow: none; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.2; text-align: left; touch-action: none;
}
button.wp-block:hover { filter: brightness(.9); }
button.wp-block:active { transform: none; }
.wp-block .wp-name { display: block; font-weight: 700; }
.wp-handle { position: absolute; left: 0; right: 0; bottom: 0; height: .6rem; cursor: ns-resize; background: rgba(0, 0, 0, .15); }
button.wp-block.wp-inherited { color: var(--kt-neutral-800); background: var(--kt-neutral-100); opacity: .8; border: 1px dashed var(--kt-neutral-400); }
.wp-inherited-row { opacity: .7; }
/* Deterministic colours per screen, so one screen looks the same across the week. All carry white text at >= 4.5:1. */
button.wp-c0 { background: #0e6e3e; } button.wp-c1 { background: #154d75; } button.wp-c2 { background: #5b2a86; }
button.wp-c3 { background: #7d4b06; } button.wp-c4 { background: #c0362c; } button.wp-c5 { background: #0f6f78; }
.wp-dialog { width: min(30rem, 94vw); padding: 24px; border: 0; border-radius: var(--kt-radius-xl); box-shadow: var(--kt-shadow-xl); color: var(--kt-text-body); }
.wp-dialog::backdrop { background: rgba(15, 14, 13, .45); }
table.producten label.check.switch { display: inline-block; width: 40px; min-height: 22px; padding: 0; vertical-align: middle; }
table.producten label.check.switch > input { position: relative; top: 0; display: block; }
