/**
 * kiosk.css — /apq.cz/sub/kiosk/assets/css/kiosk.css
 * Version: 1.1.0 | Last modified: 2025-01-02
 * Self-contained NeuGlass-compatible styles for Kiosk APQ
 * Works as standalone OR as extension on top of framework CSS
 */

/* ══════════════════════════════════════════════════════════════════
   CSS VARIABLES — NeuGlass palette (matches framework defaults)
   ══════════════════════════════════════════════════════════════════ */
:root {
  --color-bg          : #f0f2f5;
  --color-surface     : #ffffff;
  --color-border      : #e2e6ea;
  --color-text        : #1a1d23;
  --color-text-muted  : #6b7280;
  --color-primary     : #6366f1;
  --color-primary-h   : #4f52d3;
  --color-primary-bg  : rgba(99,102,241,.1);
  --color-success     : #22c55e;
  --color-danger      : #ef4444;
  --color-warning     : #f59e0b;
  --color-info        : #3b82f6;
  --color-purple      : #a855f7;

  --radius-sm : 6px;
  --radius-md : 10px;
  --radius-lg : 14px;
  --shadow-sm : 0 1px 3px rgba(0,0,0,.08);
  --shadow-md : 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg : 0 10px 40px rgba(0,0,0,.14);

  --sidebar-w : 240px;
  --topbar-h  : 60px;
}

/* Dark mode */
[data-theme="dark"], .dark {
  --color-bg          : #0f1117;
  --color-surface     : #1a1d2e;
  --color-border      : #2a2d3e;
  --color-text        : #e2e4f0;
  --color-text-muted  : #8b8fa8;
  --color-primary-bg  : rgba(99,102,241,.18);
}

/* ══════════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background  : var(--color-bg);
  color       : var(--color-text);
  line-height : 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ══════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════ */
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.4rem;  font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem;    font-weight: 600; }
.small, small { font-size: .82rem; }
.muted { color: var(--color-text-muted); }

/* ══════════════════════════════════════════════════════════════════
   CARD
   ══════════════════════════════════════════════════════════════════ */
.card {
  background   : var(--color-surface);
  border       : 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow   : var(--shadow-sm);
}
.card-header {
  display    : flex;
  align-items: center;
  justify-content: space-between;
  padding    : 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  gap: .75rem;
}
.card-title { margin: 0; font-size: 1rem; font-weight: 600; }
.card-body  { padding: 1.25rem; }

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display        : inline-flex;
  align-items    : center;
  justify-content: center;
  gap            : .4rem;
  padding        : .5rem 1.1rem;
  border         : 1px solid transparent;
  border-radius  : var(--radius-sm);
  font-size      : .88rem;
  font-weight    : 500;
  line-height    : 1.4;
  transition     : background .15s, opacity .15s, transform .1s, box-shadow .15s;
  white-space    : nowrap;
  text-decoration: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary  { background: var(--color-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-h); box-shadow: 0 2px 8px rgba(99,102,241,.35); }

.btn-secondary { background: var(--color-border); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: #d1d5db; }

.btn-danger   { background: var(--color-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-success  { background: var(--color-success); color: #fff; }
.btn-ghost    { background: transparent; color: var(--color-text); border-color: transparent; }
.btn-ghost:hover { background: var(--color-primary-bg); color: var(--color-primary); }

.btn-sm  { padding: .3rem .75rem; font-size: .82rem; }
.btn-xs  { padding: .18rem .5rem; font-size: .75rem; }
.btn-lg  { padding: .7rem 1.5rem; font-size: 1rem; }
.w-100   { width: 100%; }
.mt-2    { margin-top: .5rem; }

/* ══════════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════════ */
.form-group  { margin-bottom: 1rem; }
.form-label  { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .35rem; color: var(--color-text-muted); }
.form-input, .form-select {
  width        : 100%;
  padding      : .55rem .85rem;
  border       : 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background   : var(--color-bg);
  color        : var(--color-text);
  font-size    : .92rem;
  transition   : border-color .15s, box-shadow .15s;
  outline      : none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow  : 0 0 0 3px var(--color-primary-bg);
}
.form-input::placeholder { color: var(--color-text-muted); }
textarea.form-input { resize: vertical; min-height: 90px; }
.form-hint  { font-size: .78rem; color: var(--color-text-muted); margin-top: .3rem; }
.form-row   { display: flex; gap: .9rem; flex-wrap: wrap; }
.form-row .form-group { min-width: 0; }
.flex-1     { flex: 1; }
.flex-2     { flex: 2; }
.form-input-sm {
  padding: .25rem .5rem; font-size: .82rem;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); outline: none; width: auto;
}
.form-input-sm:focus { border-color: var(--color-primary); }

/* Password input with icon */
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-input { padding-right: 2.5rem; }
.input-icon-btn {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--color-text-muted); padding: .2rem;
  font-size: 1rem; line-height: 1;
}
.input-icon-btn:hover { color: var(--color-primary); }

/* ══════════════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════════════ */
.alert {
  padding      : .7rem 1rem;
  border-radius: var(--radius-sm);
  font-size    : .88rem;
  border       : 1px solid transparent;
  margin-bottom: .75rem;
}
.alert-success { background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.3);  color: #166534; }
.alert-danger  { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.3);  color: #991b1b; }
.alert-warning { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #92400e; }
.alert-info    { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); color: #1e40af; }

[data-theme="dark"] .alert-success { color: #86efac; }
[data-theme="dark"] .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .alert-warning { color: #fde68a; }
[data-theme="dark"] .alert-info    { color: #93c5fd; }

/* ══════════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: .18rem .6rem; border-radius: 100px;
  font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.badge-success { background: rgba(34,197,94,.15);  color: #15803d; }
.badge-danger  { background: rgba(239,68,68,.15);  color: #dc2626; }
.badge-warning { background: rgba(245,158,11,.15); color: #d97706; }
.badge-info    { background: rgba(59,130,246,.15);  color: #2563eb; }
.badge-purple  { background: rgba(168,85,247,.15); color: #9333ea; }
.badge-muted   { background: var(--color-border);  color: var(--color-text-muted); }
.badge-secondary { background: var(--color-border); color: var(--color-text-muted); }

[data-theme="dark"] .badge-success { color: #86efac; }
[data-theme="dark"] .badge-danger  { color: #fca5a5; }
[data-theme="dark"] .badge-info    { color: #93c5fd; }

/* ══════════════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ══════════════════════════════════════════════════════════════════ */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--color-border); cursor: pointer;
  border-radius: 23px; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 17px; width: 17px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: var(--shadow-sm);
}
input:checked + .toggle-slider { background: var(--color-primary); }
input:checked + .toggle-slider::before { transform: translateX(19px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

/* ══════════════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════════════ */
.progress {
  background: var(--color-border); border-radius: 100px; overflow: hidden;
  height: 8px; width: 100%;
}
.progress-sm { height: 5px; }
.progress-xs { height: 3px; }
.progress-bar {
  height: 100%; border-radius: 100px;
  background: var(--color-primary); transition: width .4s ease;
}
.progress-bar.bg-danger  { background: var(--color-danger); }
.progress-bar.bg-warning { background: var(--color-warning); }
.progress-bar.bg-success { background: var(--color-success); }

/* ══════════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════════ */
.table-wrap  { overflow-x: auto; }
.table       { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th    { padding: .65rem 1rem; text-align: left; border-bottom: 2px solid var(--color-border); font-size: .78rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table td    { padding: .7rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--color-primary-bg); }

/* ══════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════ */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5); align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(2px);
}
.modal.open { display: flex; }
.modal-dialog {
  background: var(--color-surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
.modal-dialog.modal-lg { max-width: 740px; }
@keyframes modalIn { from { opacity:0; transform: scale(.97) translateY(8px); } to { opacity:1; transform: none; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-surface); z-index: 1;
}
.modal-title  { margin: 0; font-size: 1.05rem; font-weight: 600; }
.modal-close  {
  background: none; border: none; font-size: 1.3rem; line-height: 1;
  color: var(--color-text-muted); padding: .25rem; border-radius: var(--radius-sm);
  transition: background .1s;
}
.modal-close:hover { background: var(--color-border); }
.modal-body   { padding: 1.4rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: .6rem;
  padding: 1rem 1.4rem; border-top: 1px solid var(--color-border);
}

/* ══════════════════════════════════════════════════════════════════
   AUTH PAGE
   ══════════════════════════════════════════════════════════════════ */
.auth-body {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--color-bg); padding: 1.5rem;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card { padding: 2.25rem 2.5rem; }
.auth-logo  { text-align: center; margin-bottom: 1.75rem; }
.auth-icon  { font-size: 3rem; display: block; margin-bottom: .4rem; }
.auth-title { font-size: 1.7rem; font-weight: 800; margin: 0 0 .25rem; }
.lang-switcher { display: flex; justify-content: center; gap: .75rem; }
.lang-flag { color: var(--color-text-muted); font-size: .9rem; padding: .25rem .5rem; border-radius: var(--radius-sm); transition: background .1s; }
.lang-flag.active, .lang-flag:hover { background: var(--color-primary-bg); color: var(--color-primary); text-decoration: none; }
.mt-4 { margin-top: 1.25rem; }
.mb-3 { margin-bottom: .75rem; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT: SIDEBAR + TOPBAR
   ══════════════════════════════════════════════════════════════════ */
body:not(.auth-body) { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--color-surface); border-right: 1px solid var(--color-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 200; flex-shrink: 0;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.1rem 1.25rem; font-weight: 700; font-size: 1rem;
  border-bottom: 1px solid var(--color-border); white-space: nowrap;
  min-height: var(--topbar-h);
}
.brand-icon { font-size: 1.3rem; }
.sidebar-close-btn { display: none; margin-left: auto; background: none; border: none; font-size: 1rem; color: var(--color-text-muted); }
.sidebar-nav { flex: 1; padding: .75rem 0; }
.nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem 1.25rem; color: var(--color-text-muted);
  text-decoration: none; font-size: .9rem;
  transition: background .12s, color .12s, border-color .12s;
  border-right: 3px solid transparent;
}
.nav-item:hover { background: var(--color-primary-bg); color: var(--color-primary); text-decoration: none; }
.nav-item.active { background: var(--color-primary-bg); color: var(--color-primary); font-weight: 600; border-right-color: var(--color-primary); }
.nav-icon { font-size: 1rem; width: 1.3rem; text-align: center; flex-shrink: 0; }
.sidebar-footer { padding: .85rem 1.25rem; border-top: 1px solid var(--color-border); }

/* Sidebar backdrop (mobile overlay) */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 190; backdrop-filter: blur(1px);
}
.sidebar-backdrop.show { display: block; }

/* Main wrapper */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h); background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; padding: 0 1.5rem; gap: .75rem;
  position: sticky; top: 0; z-index: 100;
}
.topbar-title { font-weight: 600; font-size: 1rem; flex: 1; color: var(--color-text-muted); }
.topbar-right  { display: flex; align-items: center; gap: .75rem; }
.sidebar-toggle {
  display: none; background: none; border: none; font-size: 1.25rem;
  padding: .3rem; color: var(--color-text-muted); border-radius: var(--radius-sm);
  transition: background .1s;
}
.sidebar-toggle:hover { background: var(--color-primary-bg); color: var(--color-primary); }

.page-content { flex: 1; padding: 1.5rem 2rem; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.page-header h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── User menu (topbar) ─────────────────────────────────────────── */
.user-menu        { position: relative; }
.user-menu-btn    {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--color-border);
  border-radius: 100px; padding: .25rem .75rem .25rem .3rem;
  color: var(--color-text); transition: background .12s, border-color .12s;
}
.user-menu-btn:hover { background: var(--color-primary-bg); border-color: var(--color-primary); }
.user-name-topbar { font-size: .85rem; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron          { font-size: .65rem; color: var(--color-text-muted); }
.avatar-sm        { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-xs        { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-lg        { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-border); }
.avatar-fallback  {
  width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary);
  color: #fff; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.user-dropdown    {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); min-width: 170px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 999;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a  {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; color: var(--color-text); font-size: .88rem;
  text-decoration: none; transition: background .1s;
}
.user-dropdown a:hover  { background: var(--color-primary-bg); color: var(--color-primary); }
.user-dropdown a.danger { color: var(--color-danger); }
.user-dropdown a.danger:hover { background: rgba(239,68,68,.1); }
.dropdown-divider { border: none; border-top: 1px solid var(--color-border); margin: .3rem 0; }

/* ══════════════════════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
  position: relative; overflow: hidden;
}
.stat-card--success { border-left: 4px solid var(--color-success); }
.stat-card--danger  { border-left: 4px solid var(--color-danger); }
.stat-value  { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-label  { font-size: .8rem; color: var(--color-text-muted); margin-top: .2rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.stat-sub    { font-size: .75rem; color: var(--color-text-muted); margin-top: .15rem; }
.stat-badge  { position: absolute; top: .9rem; right: .9rem; }

/* ══════════════════════════════════════════════════════════════════
   KIOSK CARDS
   ══════════════════════════════════════════════════════════════════ */
.kiosk-cards-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 1rem; }
.kiosk-card { padding: 1.1rem; transition: box-shadow .2s, transform .2s; }
.kiosk-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kiosk-card.kiosk-online { border-left: 3px solid var(--color-success); }

.kiosk-card-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.kiosk-card-header h4 { margin: 0; font-size: .95rem; }
.kiosk-card-footer { display: flex; gap: .35rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.meta-row { display: flex; align-items: center; gap: .4rem; padding: .18rem 0; color: var(--color-text-muted); font-size: .83rem; }
.kiosk-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kiosk-status-dot.success { background: var(--color-success); box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.kiosk-status-dot.danger  { background: #d1d5db; }
.kiosk-status-dot.warning { background: var(--color-warning); }

.pair-code-box {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: .4rem .65rem;
  display: flex; align-items: center; gap: .5rem; font-size: .82rem; margin-top: .5rem;
}
.pair-code-value {
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 1rem; font-weight: 700;
  letter-spacing: .18em; cursor: pointer; color: var(--color-primary);
}
.pair-code-value:hover { text-decoration: underline; }
.pair-info-box { background: var(--color-bg); border-radius: var(--radius-sm); padding: .55rem .8rem; font-size: .83rem; margin-top: .4rem; }

/* Kiosk list rows (dashboard) */
.kiosk-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--color-border);
  transition: background .1s;
}
.kiosk-row:last-child { border-bottom: none; }
.kiosk-row:hover { background: var(--color-primary-bg); }
.kiosk-info  { flex: 1; font-size: .9rem; }
.kiosk-meta  { font-size: .78rem; color: var(--color-text-muted); margin-top: .12rem; }
.kiosk-actions { display: flex; gap: .3rem; align-items: center; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════
   CONTENT GRID
   ══════════════════════════════════════════════════════════════════ */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 1rem; }
.content-card { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.1rem; transition: box-shadow .2s; }
.content-card:hover { box-shadow: var(--shadow-md); }
.content-card-icon  { font-size: 1.8rem; flex-shrink: 0; }
.content-card-body  { flex: 1; min-width: 0; }
.content-card-body h4 { margin: 0 0 .25rem; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-meta { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; font-size: .76rem; }
.content-card-actions { display: flex; gap: .3rem; flex-shrink: 0; }

.filter-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-tab {
  padding: .35rem .9rem; border-radius: 100px; border: 1px solid var(--color-border);
  background: var(--color-surface); font-size: .82rem; transition: all .15s;
}
.filter-tab.active, .filter-tab:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.storage-bar-wrap { font-size: .88rem; }
.storage-label    { margin-bottom: .3rem; }

/* ══════════════════════════════════════════════════════════════════
   UPLOAD ZONE
   ══════════════════════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--color-border); border-radius: var(--radius-md);
  padding: 1.75rem; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--color-primary); background: var(--color-primary-bg); }
.upload-icon { font-size: 2.2rem; margin-bottom: .4rem; display: block; }
.link { color: var(--color-primary); cursor: pointer; }

.upload-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.upload-thumb {
  width: 78px; height: 78px; border-radius: var(--radius-sm);
  overflow: hidden; position: relative;
  background: var(--color-bg); border: 1px solid var(--color-border);
}
.upload-thumb img, .upload-thumb video { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb.uploading { display: flex; align-items: center; justify-content: center; }
.upload-thumb-progress { font-size: .65rem; color: var(--color-text-muted); text-align: center; padding: .3rem; }
.thumb-remove {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,.65); color: #fff; border: none; border-radius: 50%;
  width: 18px; height: 18px; font-size: .65rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════
   SPLIT PREVIEW
   ══════════════════════════════════════════════════════════════════ */
.split-preview-row { display: flex; gap: .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; min-height: 180px; }
.split-panel { padding: .85rem; transition: width .3s; background: var(--color-bg); }
.range-row   { display: flex; align-items: center; gap: .75rem; }

/* ══════════════════════════════════════════════════════════════════
   SCHEDULE PAGE
   ══════════════════════════════════════════════════════════════════ */
.schedule-list { display: flex; flex-direction: column; gap: 1rem; }
.schedule-card { padding: 1.1rem; }
.schedule-system { border-left: 3px solid var(--color-primary); }
.schedule-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; flex-wrap: wrap; gap: .5rem; }
.schedule-card-header h4 { margin: 0; }
.schedule-hours-grid { display: flex; flex-direction: column; gap: .15rem; }
.day-row { display: flex; align-items: center; gap: .6rem; font-size: .85rem; padding: .15rem 0; }
.day-open   { color: var(--color-success); }
.day-closed { color: var(--color-text-muted); }
.day-name   { width: 78px; font-weight: 500; }
.day-hours  { font-family: monospace; font-size: .83rem; }
.day-closed-label { color: var(--color-text-muted); font-size: .8rem; }
.schedule-night-mode { font-size: .83rem; margin-top: .5rem; }

.day-schedule-row { display: flex; align-items: center; gap: .85rem; padding: .5rem 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.day-schedule-row:last-of-type { border-bottom: none; }
.day-toggle  { display: flex; align-items: center; gap: .55rem; min-width: 140px; }
.day-times   { display: flex; align-items: center; gap: .4rem; }
.day-label   { font-size: .88rem; white-space: nowrap; }
.day-closed-info { color: var(--color-text-muted); font-size: .82rem; }
.night-panel { margin-top: .5rem; }
.hidden      { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════════════════════════════════════ */
.settings-layout { display: grid; grid-template-columns: repeat(auto-fill,minmax(380px,1fr)); gap: 1.5rem; align-items: start; }
.avatar-section  { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.25rem; }
.avatar-controls { display: flex; flex-direction: column; gap: .45rem; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--color-border); font-size: .88rem; }
.info-row:last-child { border-bottom: none; }

/* ══════════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════════ */
.tab-bar { display: flex; gap: .2rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--color-border); }
.tab-btn { padding: .5rem .95rem; border: none; background: none; color: var(--color-text-muted); font-size: .86rem; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; cursor: pointer; white-space: nowrap; }
.tab-btn.active, .tab-btn:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ══════════════════════════════════════════════════════════════════
   PLAYLIST
   ══════════════════════════════════════════════════════════════════ */
.playlist-container { display: flex; flex-direction: column; gap: .35rem; min-height: 54px; background: var(--color-bg); border-radius: var(--radius-sm); padding: .45rem; border: 1px solid var(--color-border); }
.playlist-item { display: flex; align-items: center; gap: .55rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: .45rem .65rem; cursor: grab; user-select: none; font-size: .85rem; }
.playlist-item:active { cursor: grabbing; opacity: .75; }
.drag-handle   { color: var(--color-text-muted); font-size: .95rem; cursor: grab; }
.playlist-icon { font-size: .95rem; }
.playlist-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-duration { width: 56px; }

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 2rem; text-align: center; color: var(--color-text-muted); }
.empty-icon  { font-size: 3rem; margin-bottom: .85rem; }

/* ══════════════════════════════════════════════════════════════════
   PULSE DOT
   ══════════════════════════════════════════════════════════════════ */
.pulse-dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ══════════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════════ */
.ms-1  { margin-left: .25rem; }
.ms-auto { margin-left: auto; }
.mt-1  { margin-top: .25rem; }
.mt-2  { margin-top: .5rem; }
.mt-3  { margin-top: 1rem; }
.mb-2  { margin-bottom: .5rem; }
.mb-4  { margin-bottom: 1.5rem; }
.p-0   { padding: 0; }
.py-3  { padding-top: .75rem; padding-bottom: .75rem; }
.btn-group { display: flex; gap: .3rem; flex-wrap: wrap; }
.text-muted  { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  body:not(.auth-body) .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%); z-index: 300;
    box-shadow: none; transition: transform .25s ease, box-shadow .25s;
  }
  body:not(.auth-body) .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,.18);
  }
  .sidebar-toggle { display: block; }
  .sidebar-close-btn { display: block; }
  .page-content    { padding: 1rem; }
  .kiosk-cards-grid, .settings-layout { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: repeat(2,1fr); }
  .form-row    { flex-direction: column; }
  .split-preview-row { flex-direction: column; }
  .split-panel { width: 100% !important; }
  .user-name-topbar { display: none; }
}
@media (max-width: 480px) {
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .auth-card   { padding: 1.5rem; }
}
