:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --text: #101012;
  --muted: #6d6d73;
  --line: #dedee2;
  --primary: #f2ea0b;
  --primary-2: #ded600;
  --success: #168a55;
  --danger: #c53b32;
  --shadow: 0 18px 45px rgba(0, 0, 0, .08);
  --radius: 22px;
  --announced: #f2ea0b;
  --unannounced: #111111;
  --aulix: #55565a;
  --kupzarovky: #d9d9de;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.eyebrow {
  font-size: 12px;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 800;
  color: #7c8798;
}

/* KIOSK */
.kiosk-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 15% 10%, rgba(47,128,237,.08), transparent 28%),
    radial-gradient(circle at 85% 90%, rgba(155,81,224,.07), transparent 30%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid rgba(228,233,241,.9);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
}
.topbar-title {
  margin-top: 6px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
}
.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #a0a8b5;
  box-shadow: 0 0 0 4px rgba(160,168,181,.12);
}
.status-dot.online {
  background: #25a767;
  box-shadow: 0 0 0 4px rgba(37,167,103,.12);
}
.status-dot.offline {
  background: #d54b3d;
  box-shadow: 0 0 0 4px rgba(213,75,61,.12);
}
.topbar-separator { opacity: .45; }

.kiosk-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(34px, 5vh, 72px) 0 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kiosk-heading { text-align: center; }
.kiosk-heading h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.kiosk-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
}

.mode-switch {
  margin: 30px auto 26px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 7px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15,23,42,.05);
}
.mode-button {
  border: 0;
  background: transparent;
  color: #5e697b;
  padding: 11px 16px;
  border-radius: 11px;
  font-weight: 750;
}
.mode-button:hover { color: var(--text); }
.mode-button.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(15,23,42,.18);
}

.visit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.visit-button {
  position: relative;
  min-height: clamp(155px, 20vh, 220px);
  border: 0;
  border-radius: 26px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -.025em;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
  box-shadow: 0 18px 34px rgba(15,23,42,.11);
}
.visit-button:hover { transform: translateY(-3px); box-shadow: 0 22px 38px rgba(15,23,42,.15); }
.visit-button:active { transform: translateY(0) scale(.99); }
.visit-button[disabled] { cursor: wait; opacity: .7; }
.visit-button .key-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 900;
}

.visit-grid.mode-color .visit-button { color: #fff; }
.visit-grid.mode-color .visit-button[data-type="announced"] { background: var(--announced); }
.visit-grid.mode-color .visit-button[data-type="unannounced"] { background: var(--unannounced); }
.visit-grid.mode-color .visit-button[data-type="pickup_aulix"] { background: var(--aulix); }
.visit-grid.mode-color .visit-button[data-type="pickup_kupzarovky"] { background: var(--kupzarovky); }
.visit-grid.mode-color .key-badge { display: none; }

.visit-grid.mode-text .visit-button,
.visit-grid.mode-keyboard .visit-button {
  background: #fff;
  color: var(--text);
  border: 2px solid var(--line);
}
.visit-grid.mode-text .visit-button::before,
.visit-grid.mode-keyboard .visit-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  border-radius: 24px 0 0 24px;
  background: var(--button-color);
}
.visit-grid.mode-text .key-badge { display: none; }
.visit-grid.mode-keyboard .key-badge {
  color: #fff;
  background: var(--button-color);
}

.keyboard-hint {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

.kiosk-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px clamp(20px, 3vw, 42px) 20px;
  color: #8992a0;
  font-size: 13px;
}
.admin-link { text-decoration: none; font-weight: 700; }
.admin-link:hover { color: var(--text); }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 130px);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(420px, calc(100% - 30px));
  padding: 16px 20px;
  color: #fff;
  background: #172033;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15,23,42,.28);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #9f2f25; }
.toast-check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: 20px;
  font-weight: 900;
}
.toast strong, .toast span { display: block; }
.toast #toastText { margin-top: 2px; color: rgba(255,255,255,.78); font-size: 13px; }

/* SHARED BUTTONS */
.primary-button,
.secondary-button {
  border-radius: 11px;
  padding: 11px 16px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary-button { color: #fff; background: var(--primary); }
.primary-button:hover { background: var(--primary-2); }
.secondary-button { color: var(--text); background: #fff; border-color: var(--line); }
.secondary-button:hover { background: #f8fafc; }

/* ADMIN LOGIN */
.admin-page { min-height: 100vh; }
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(47,128,237,.09), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(155,81,224,.07), transparent 30%),
    var(--bg);
}
.login-card {
  width: min(460px, 100%);
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.login-card h1 { margin: 10px 0 10px; font-size: 34px; letter-spacing: -.03em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 16px; }
.login-form label,
.filter-grid label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #5d6778;
}
.login-form input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.login-form input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.16);
}
.form-error {
  color: var(--danger);
  background: #fff2f1;
  border: 1px solid #ffd8d4;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
}

/* ADMIN DASHBOARD */
.dashboard { min-height: 100vh; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 52px);
  background: rgba(255,255,255,.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.admin-topbar h1 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.02em; }
.admin-userbox { display: flex; align-items: center; gap: 10px; }
.admin-userbox > span { margin-right: 6px; color: var(--muted); font-size: 13px; }
.dashboard-content {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 60px;
}

.filter-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15,23,42,.04);
}
.filter-card { padding: 24px; }
.filter-header,
.panel-heading,
.table-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.filter-header h2,
.panel-heading h2 { margin: 0; font-size: 19px; }
.filter-header p,
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.quick-filters { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.quick-filters button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 8px 11px;
  color: #5d6778;
  font-weight: 750;
  font-size: 13px;
}
.quick-filters button:hover { color: var(--text); background: #f8fafc; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.load-state { margin-left: auto; color: var(--muted); font-size: 13px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: var(--stat-color, #e2e8f0);
  opacity: .12;
}
.stat-label { color: var(--muted); font-size: 13px; font-weight: 750; }
.stat-value { margin-top: 13px; font-size: 36px; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.stat-note { margin-top: 8px; color: #8b95a4; font-size: 12px; }

.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
}
.panel { padding: 22px; }
.daily-chart {
  height: 310px;
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
}
.daily-column {
  flex: 1 0 22px;
  min-width: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 6px;
}
.daily-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
}
.daily-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #334155, #0f172a);
  position: relative;
}
.daily-bar:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 7px;
  color: #fff;
  background: #111827;
  font-size: 11px;
  z-index: 5;
}
.daily-label {
  height: 28px;
  color: #8a94a4;
  font-size: 10px;
  text-align: center;
  transform: rotate(-45deg);
  transform-origin: top center;
  white-space: nowrap;
}
.empty-chart {
  margin: auto;
  color: var(--muted);
  font-size: 14px;
}

.donut-layout {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  align-items: center;
  gap: 26px;
  margin-top: 10px;
}
.donut-chart {
  aspect-ratio: 1;
  border-radius: 999px;
  background: #e9edf3;
  position: relative;
}
.donut-chart::after {
  content: attr(data-total);
  position: absolute;
  inset: 25%;
  display: grid;
  place-items: center;
  text-align: center;
  white-space: pre-line;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}
.donut-legend { display: grid; gap: 13px; }
.legend-row { display: grid; grid-template-columns: 11px 1fr auto; align-items: center; gap: 9px; }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; }
.legend-name { color: #5e697b; font-size: 13px; }
.legend-value { font-weight: 850; font-size: 13px; }

.table-panel { padding: 0; overflow: hidden; }
.table-heading { padding: 22px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf0f4; text-align: left; font-size: 13px; }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #6f7a8b;
  background: #f8fafc;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
tbody tr:hover { background: #fbfcfe; }
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f7f8fb;
  border: 1px solid var(--line);
  font-weight: 750;
}
.type-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--pill-color, #64748b);
}
.muted-cell { color: #7d8796; }
.empty-row td { padding: 34px 18px; text-align: center; color: var(--muted); }

@media (max-width: 1120px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card:first-child { grid-column: 1 / -1; }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .topbar-status { flex-wrap: wrap; justify-content: flex-end; }
  .topbar-status #connectionText, .topbar-separator { display: none; }
  .kiosk-shell { width: min(100% - 24px, 700px); padding-top: 28px; }
  .visit-grid { grid-template-columns: 1fr; }
  .visit-button { min-height: 118px; font-size: 25px; }
  .mode-switch { width: 100%; }
  .mode-button { flex: 1 1 140px; }
  .kiosk-footer { font-size: 12px; }

  .admin-topbar { position: static; align-items: flex-start; flex-direction: column; }
  .admin-userbox { width: 100%; flex-wrap: wrap; }
  .admin-userbox > span { width: 100%; }
  .dashboard-content { width: min(100% - 24px, 900px); padding-top: 18px; }
  .filter-header, .table-heading { flex-direction: column; }
  .quick-filters { justify-content: flex-start; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-actions { flex-wrap: wrap; }
  .load-state { width: 100%; margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .donut-layout { grid-template-columns: 160px 1fr; }
}

@media (max-width: 520px) {
  .topbar-title { font-size: 17px; }
  .kiosk-heading h1 { font-size: 34px; }
  .kiosk-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .login-shell { padding: 14px; }
  .login-card { padding: 24px; }
  .filter-grid, .stats-grid { grid-template-columns: 1fr; }
  .stat-card:first-child { grid-column: auto; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .donut-chart { width: 170px; }
  .donut-legend { width: 100%; }
}

/* =========================================================
   AULIX THEME / STUDIO VISITS v2
   ========================================================= */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #77777d;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 900;
}
.section-kicker::before {
  content: "";
  width: 18px;
  height: 5px;
  border-radius: 1px;
  background: var(--primary);
}

.aulix-topbar,
.admin-topbar {
  background: #0b0b0d;
  border-bottom: 0;
  color: #fff;
  backdrop-filter: none;
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.brand-logo {
  display: block;
  width: clamp(170px, 14vw, 235px);
  height: auto;
  flex: 0 0 auto;
}
.brand-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.22);
  flex: 0 0 auto;
}
.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.brand-copy span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}
.brand-copy strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.aulix-topbar .topbar-status {
  color: #d5d5d8;
}
.aulix-topbar .topbar-status strong { color: #fff; }

.kiosk-page {
  background:
    linear-gradient(180deg, rgba(242,234,11,.045), transparent 28%),
    #f4f4f5;
}
.kiosk-shell {
  width: min(1180px, calc(100% - 40px));
  padding-top: clamp(38px, 5vh, 64px);
}
.kiosk-heading h1 {
  color: #0b0b0d;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 900;
}
.kiosk-heading p { color: #77777d; }

.mode-switch {
  margin-top: 26px;
  background: #fff;
  border-color: #d8d8dc;
  box-shadow: 0 8px 28px rgba(0,0,0,.045);
}
.mode-button { color: #55565a; }
.mode-button:hover { color: #0b0b0d; background: #f3f3f4; }
.mode-button.active {
  color: #0b0b0d;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.mode-button:disabled { cursor: wait; opacity: .6; }

.visit-grid { gap: 18px; }
.visit-button {
  min-height: clamp(145px, 18vh, 205px);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,.08);
  font-size: clamp(22px, 2.35vw, 34px);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(0,0,0,.085);
}
.visit-button:hover { box-shadow: 0 19px 34px rgba(0,0,0,.13); }
.visit-grid.mode-color .visit-button[data-type="announced"] {
  background: var(--announced);
  color: #101012;
}
.visit-grid.mode-color .visit-button[data-type="unannounced"] {
  background: var(--unannounced);
  color: #fff;
}
.visit-grid.mode-color .visit-button[data-type="pickup_aulix"] {
  background: var(--aulix);
  color: #fff;
}
.visit-grid.mode-color .visit-button[data-type="pickup_kupzarovky"] {
  background: var(--kupzarovky);
  color: #101012;
}
.visit-grid.mode-text .visit-button {
  background: #fff;
  color: #111;
  border: 1px solid #d8d8dc;
}
.visit-grid.mode-text .visit-button::before {
  width: 11px;
  border-radius: 19px 0 0 19px;
}

.manual-entry-card {
  grid-column: 1 / -1;
  width: 100%;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #d9d9dd;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(0,0,0,.06);
}
.manual-entry-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 22px;
}
.manual-entry-heading h2 {
  margin: 8px 0 0;
  color: #111;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -.025em;
}
.manual-entry-heading p {
  margin: 0;
  max-width: 360px;
  color: #77777d;
  text-align: right;
  font-size: 13px;
}
.manual-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px 14px 12px 18px;
  border: 1px solid #e0e0e3;
  border-radius: 15px;
  background: #fafafa;
}
.manual-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #202023;
  font-size: 16px;
  font-weight: 800;
}
.manual-label i {
  display: inline-block;
  width: 8px;
  height: 34px;
  border-radius: 5px;
  background: var(--manual-color);
  flex: 0 0 auto;
}
.manual-input {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid #d2d2d6;
  border-radius: 10px;
  background: #fff;
  color: #111;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  outline: none;
}
.manual-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 4px rgba(242,234,11,.45);
}
.manual-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  color: #85858b;
  font-size: 12px;
}
.manual-save { min-width: 190px; }

.today-card {
  width: min(480px, 100%);
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border: 1px solid #d8d8dc;
  border-left: 7px solid var(--primary);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}
.today-label {
  display: block;
  color: #111;
  font-size: 19px;
  font-weight: 900;
}
.today-date {
  margin-top: 4px;
  color: #85858b;
  font-size: 12px;
}
.today-count {
  color: #111;
  font-size: clamp(42px, 5vw, 62px);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.05em;
}

.primary-button {
  color: #111;
  background: var(--primary);
  border-color: #ddd500;
}
.primary-button:hover { color: #111; background: var(--primary-2); }
.secondary-button { color: #111; }

.kiosk-footer { color: #7a7a80; }
.admin-link {
  color: #222;
  border-bottom: 2px solid var(--primary);
}

/* ADMIN AULIX */
.login-shell {
  background:
    linear-gradient(135deg, rgba(242,234,11,.08), transparent 35%),
    #f4f4f5;
}
.login-card { border-radius: 18px; }
.login-brand {
  margin: -34px -34px 26px;
  padding: 22px 28px;
  background: #0b0b0d;
  border-radius: 18px 18px 0 0;
}
.login-brand img { display: block; width: 220px; max-width: 75%; height: auto; }
.login-card .eyebrow { color: #77777d; }

.admin-topbar {
  padding-top: 13px;
  padding-bottom: 13px;
}
.admin-topbar .admin-userbox > span { color: #d0d0d4; }
.admin-topbar .secondary-button {
  color: #fff;
  background: #252529;
  border-color: #404046;
}
.admin-topbar .secondary-button:hover { background: #333338; }
.filter-card,
.panel,
.stat-card { border-color: #dcdce0; }
.quick-filters button:hover { border-color: #c8c800; background: #fffef0; }
.stat-card:first-child::after { background: var(--primary); opacity: .42; }
.daily-bar { background: linear-gradient(180deg, #f2ea0b, #aaa400); }
th { color: #5d5d63; background: #f2f2f3; }
.type-pill { background: #fafafa; }
.actions-cell { width: 95px; text-align: right; }
.delete-visit-button {
  border: 1px solid #e2b6b3;
  border-radius: 8px;
  padding: 7px 10px;
  color: #a92f28;
  background: #fff8f7;
  font-size: 12px;
  font-weight: 850;
}
.delete-visit-button:hover { background: #ffefed; border-color: #d88f89; }
.delete-visit-button:disabled { cursor: wait; opacity: .55; }

@media (max-width: 760px) {
  .brand-divider, .brand-copy { display: none; }
  .brand-logo { width: 170px; }
  .manual-entry-heading { align-items: flex-start; flex-direction: column; }
  .manual-entry-heading p { text-align: left; }
  .manual-fields { grid-template-columns: 1fr; }
  .manual-actions { align-items: stretch; flex-direction: column; }
  .manual-save { width: 100%; }
  .today-card { width: 100%; }
}

@media (max-width: 520px) {
  .aulix-topbar { padding: 14px 16px; }
  .brand-logo { width: 145px; }
  .topbar-status { font-size: 12px; }
  .manual-row { grid-template-columns: minmax(0, 1fr) 84px; }
  .manual-label { font-size: 14px; }
  .today-card { padding: 17px 19px; }
  .login-brand { margin: -24px -24px 24px; }
}

/* =========================================================
   ADMIN ANALYTICS / HISTORICAL DATA v4
   ========================================================= */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.inline-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #ded88a;
  border-radius: 10px;
  background: #fffef0;
  color: #625f22;
  font-size: 12px;
  line-height: 1.5;
}

.historical-import-panel {
  margin-top: 18px;
  background:
    linear-gradient(105deg, rgba(242,234,11,.10), transparent 42%),
    #fff;
}
.historical-import-heading { align-items: center; }
.historical-import-heading h2 { margin-top: 7px; }
.historical-import-actions {
  min-width: 270px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.import-state {
  color: #6d6d72;
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.comparison-panel { margin-bottom: 18px; }
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.comparison-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #e0e0e3;
  border-radius: 14px;
  background: #fafafa;
}
.comparison-card-title {
  min-height: 34px;
  color: #5e5e64;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.comparison-card-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}
.comparison-card-main > strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.04em;
}
.comparison-change {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.comparison-change.up { color: #111; background: #f2ea0b; }
.comparison-change.down { color: #fff; background: #4a4a4f; }
.comparison-change.neutral { color: #606066; background: #e9e9eb; }
.comparison-card-sub,
.comparison-card-range,
.comparison-card-note {
  margin-top: 9px;
  color: #77777e;
  font-size: 11px;
  line-height: 1.45;
}
.comparison-card-range { margin-top: 4px; }
.comparison-card-note {
  padding-top: 8px;
  border-top: 1px solid #e5e5e7;
  color: #8a8a90;
}

.comparison-charts-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 1fr);
}
.section-comparison-chart { margin-top: 18px; }
.section-compare-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: #67676d;
  font-size: 11px;
  font-weight: 800;
}
.section-compare-legend span,
.monthly-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.compare-dot,
.trend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.compare-dot.current,
.section-compare-fill.current { background: #f2ea0b; }
.compare-dot.previous,
.section-compare-fill.previous { background: #111; }
.compare-dot.year,
.section-compare-fill.year { background: #8b8b91; }
.section-compare-rows { display: grid; gap: 13px; }
.section-compare-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  align-items: center;
  padding-bottom: 13px;
  border-bottom: 1px solid #efeff1;
}
.section-compare-row:last-child { border-bottom: 0; padding-bottom: 0; }
.section-compare-row.strong .section-compare-label { color: #111; font-weight: 900; }
.section-compare-row.subtle .section-compare-label { color: #898990; font-size: 11px; }
.section-compare-label {
  color: #5f5f65;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.section-compare-bars { display: grid; gap: 5px; }
.section-compare-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 9px;
  align-items: center;
}
.section-compare-line strong {
  color: #4d4d52;
  font-size: 11px;
  text-align: right;
}
.section-compare-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ededf0;
}
.section-compare-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
}

.monthly-trend-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: #67676d;
  font-size: 11px;
  font-weight: 800;
}
.trend-dot.announced,
.monthly-segment.announced { background: #f2ea0b; }
.trend-dot.unannounced,
.monthly-segment.unannounced { background: #111; }
.trend-dot.pickup,
.monthly-segment.pickup { background: #85858b; }
.monthly-trend-chart {
  height: 300px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-top: 17px;
  padding: 0 2px;
  overflow-x: auto;
  border-bottom: 1px solid #dedee1;
}
.monthly-column {
  flex: 1 0 42px;
  min-width: 42px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}
.monthly-value {
  min-height: 17px;
  margin-bottom: 5px;
  color: #77777d;
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}
.monthly-stack {
  height: 225px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 6px 6px 2px 2px;
}
.monthly-segment { width: 100%; min-height: 0; }
.monthly-label {
  height: 38px;
  padding-top: 7px;
  color: #7e7e84;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.table-note {
  max-width: 420px;
  color: #7b7b81;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}
.historical-table-panel { margin-top: 18px; }
.historical-table-panel table { min-width: 720px; }

@media (max-width: 1280px) {
  .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .historical-import-heading { align-items: flex-start; flex-direction: column; }
  .historical-import-actions { width: 100%; min-width: 0; align-items: stretch; }
  .import-state { text-align: left; }
  .comparison-grid { grid-template-columns: 1fr; }
  .section-compare-row { grid-template-columns: 1fr; gap: 8px; }
  .table-actions { justify-content: flex-start; }
  .table-note { text-align: left; }
}


/* =========================================================
   AULIX STUDIO v5 - Zpetny zapis v administraci
   ========================================================= */
.backfill-panel {
  margin-top: 18px;
  border-left: 4px solid #f2ea0b;
  background: linear-gradient(110deg, rgba(242,234,11,.07), transparent 48%), #fff;
}
.backfill-panel .section-kicker { color: #6b6900; }
.backfill-form { margin-top: 20px; }
.backfill-fields {
  display: grid;
  grid-template-columns: minmax(170px,1.1fr) minmax(240px,2fr) minmax(150px,.8fr) auto;
  align-items: end;
  gap: 14px;
}
.backfill-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #515158;
  font-size: 13px;
  font-weight: 800;
}
.backfill-fields input,
.backfill-fields select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  color: #101014;
  background: #fff;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
}
.backfill-fields input:focus,
.backfill-fields select:focus {
  outline: 2px solid rgba(242,234,11,.75);
  outline-offset: 1px;
}
.backfill-fields > button { min-height: 46px; padding: 11px 20px; }
.backfill-fields > button:disabled { opacity: .55; cursor: wait; }
.backfill-state { margin: 12px 0 0; color: #6c6c73; font-size: 12px; line-height: 1.5; }
.backfill-state[data-status="success"] { color: #176a42; font-weight: 750; }
.backfill-state[data-status="error"] { color: #b22e28; font-weight: 750; }
.backfill-table-panel { margin-top: 18px; }
.backfill-table-panel table { min-width: 700px; }
@media (max-width: 950px) {
  .backfill-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .backfill-fields > button { width: 100%; }
}
@media (max-width: 600px) {
  .backfill-fields { grid-template-columns: 1fr; }
}
