/* ============================================================
   ANACITY Kiosk — Analytics Purple Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === TOKENS === */
:root {
  --bg: #F7F7FB;
  --surface: #FFFFFF;
  --surface-2: #FBFBFE;
  --line: #ECEBF3;
  --line-2: #E4E2EF;
  --ink: #0F0B1F;
  --ink-2: #221C3A;
  --muted: #6B6784;
  --muted-2: #9C98B0;
  --primary: #6E56F8;
  --primary-600: #5A41E6;
  --primary-700: #4A32D4;
  --primary-50: #F1EEFE;
  --primary-100: #E6E0FD;
  --accent: #3B82F6;
  --accent-50: #EAF2FF;
  --success: #12A66B;
  --success-50: #E6F7EF;
  --success-600: #0B7A4E;
  --warn: #E8A317;
  --warn-50: #FFF6E1;
  --danger: #E5484D;
  --danger-50: #FDECEC;
  --chip: #F2F1F8;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(20,14,50,.04), 0 6px 24px -12px rgba(60,40,160,.10);
  --shadow-lg: 0 4px 16px rgba(20,14,50,.08), 0 12px 40px -20px rgba(60,40,160,.18);
  --transition: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #E8E6F0;
  color: var(--ink);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
svg { display: block; }

/* === DEVICE FRAME === */
.device-frame {
  width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
}

.device-bezel {
  width: 1080px;
  height: 810px;
  background: #1B1636;
  border-radius: 28px;
  padding: 20px 28px 20px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.device-camera {
  width: 8px;
  height: 8px;
  background: #2a2548;
  border-radius: 50%;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}

.device-screen {
  width: 1024px;
  height: 748px;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* === KIOSK HEADER === */
.kiosk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}

.kiosk-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kiosk-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.kiosk-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kiosk-back-btn,
.kiosk-home-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: var(--transition);
}
.kiosk-back-btn:hover,
.kiosk-home-btn:hover {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
}

.kiosk-exit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--danger-50);
  color: var(--danger);
  border: 1px solid #F5C6C8;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.kiosk-exit-btn:hover {
  background: var(--danger);
  color: white;
}

/* === KIOSK BODY === */
.kiosk-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.kiosk-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.kiosk-body-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kiosk-body-scroll {
  overflow-y: auto;
}

/* === WELCOME SCREEN === */
.welcome-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #F7F5FF 0%, #EFECFB 40%, #E8E4F8 100%);
  position: relative;
  overflow: hidden;
}

.welcome-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(110,86,248,.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(59,130,246,.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(110,86,248,.03) 0%, transparent 60%);
  pointer-events: none;
}

.welcome-content,
.welcome-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 40px;
}

.welcome-brand {
  margin-bottom: 48px;
}

.welcome-logo {
  width: 72px;
  height: 72px;
  background: conic-gradient(from 210deg, #8B71FF, #4F86FF, #8B71FF);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(110,86,248,.3);
}

.welcome-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 8px;
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.welcome-cta-group {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
}

.welcome-cta {
  width: 240px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 20px;
  border: 2px solid transparent;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s ease;
  animation: scaleIn 0.4s ease both;
}

.welcome-cta-visitor {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  box-shadow: 0 6px 24px rgba(110,86,248,.35);
}
.welcome-cta-visitor:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(110,86,248,.45);
}

.welcome-cta-staff {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.welcome-cta-staff:hover {
  border-color: var(--primary);
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}

.welcome-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-cta-label {
  font-size: 20px;
  font-weight: 700;
}

.welcome-cta-desc {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.75;
}

.welcome-lang {
  display: flex;
  gap: 8px;
}

.lang-pill {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,.6);
  border: 1px solid var(--line);
  transition: var(--transition);
}
.lang-pill.active {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
}
.lang-pill:hover:not(.active) {
  background: var(--surface);
}

/* === PANELS (Visitor choice / Staff PIN) === */
.panel-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.panel-desc {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 32px;
}

.panel-choices {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.panel-choice {
  width: 220px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 20px;
  border: 2px solid var(--line);
  transition: all 0.3s ease;
  animation: scaleIn 0.3s ease both;
}
.panel-choice:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.panel-choice-icon { color: var(--primary); }
.panel-choice-label { font-size: 18px; font-weight: 700; }
.panel-choice-desc { font-size: 13px; color: var(--muted); }

.panel-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.panel-back-btn:hover { color: var(--ink); }

/* === PIN PAD === */
.pin-display {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--surface);
  transition: var(--transition);
}
.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
}

.pin-error {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 10px;
  margin-bottom: 24px;
}

.pin-key {
  width: 72px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.pin-key:active,
.pin-key.pressed {
  background: var(--primary-50);
  border-color: var(--primary);
  transform: scale(0.95);
}
.pin-key-empty {
  visibility: hidden;
}
.pin-key-del {
  color: var(--muted);
}

/* === REGISTRATION FORM === */
.reg-form-container {
  max-width: 560px;
  margin: 0 auto;
  animation: slideUp 0.3s ease;
}

.reg-form-header {
  text-align: center;
  margin-bottom: 28px;
}

.reg-form-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.reg-form-desc {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}

.reg-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.reg-field { display: flex; flex-direction: column; gap: 6px; }
.reg-field-full { grid-column: 1 / -1; }

.reg-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.req { color: var(--danger); }

.reg-input,
.reg-select {
  width: 100%;
  height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}
.reg-input:focus,
.reg-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110,86,248,.12);
}
.reg-input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(229,72,77,.12) !important;
}

.reg-input-wrap {
  position: relative;
}
.reg-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}
.reg-input-prefixed {
  padding-left: 52px;
}

/* Host Search */
.host-search-wrap { position: relative; }
.host-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  overflow: hidden;
}
.host-dd-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.host-dd-item:hover { background: var(--primary-50); }
.host-dd-name { font-size: 15px; font-weight: 600; color: var(--ink); display: block; }
.host-dd-unit { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.host-dd-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.host-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
}
.host-selected-info { display: flex; flex-direction: column; gap: 2px; }
.host-selected-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.host-selected-unit { font-size: 13px; color: var(--muted); }
.host-change-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.host-change-btn:hover {
  background: var(--primary);
  color: white;
}

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 52px;
}
.stepper-sm { height: 40px; }
.stepper-btn {
  width: 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: var(--transition);
}
.stepper-sm .stepper-btn { width: 38px; }
.stepper-btn:hover { background: var(--primary-50); color: var(--primary); }
.stepper-btn:active { background: var(--primary-100); }
.stepper-val {
  min-width: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper-sm .stepper-val { min-width: 36px; font-size: 15px; }

.reg-submit-btn {
  width: 100%;
  margin-top: 28px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(110,86,248,.3);
  transition: all 0.3s ease;
}
.reg-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(110,86,248,.4);
}
.reg-submit-btn:active { transform: translateY(0); }

/* === APPROVAL WAITING === */
.approval-container {
  text-align: center;
  animation: scaleIn 0.3s ease;
}

.approval-countdown-ring {
  width: 120px;
  height: 120px;
  position: relative;
  margin: 0 auto 24px;
}

.countdown-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.countdown-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 6;
}

.countdown-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.countdown-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.approval-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.approval-desc {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
}

.approval-visitor-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.avc-row {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 15px;
}

.avc-label {
  font-weight: 500;
  color: var(--muted);
  min-width: 60px;
  text-align: right;
}

.avc-value {
  font-weight: 600;
  color: var(--ink);
}

.approval-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotPulse 1.4s infinite ease-in-out;
}

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Results */
.approval-result {
  animation: scaleIn 0.3s ease;
}

.result-icon {
  margin-bottom: 16px;
}
.result-icon-approved { color: var(--success); }
.result-icon-denied { color: var(--danger); }
.result-icon-timeout { color: var(--warn); }

.result-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}
.result-title-approved { color: var(--success); }
.result-title-denied { color: var(--danger); }
.result-title-timeout { color: var(--warn); }

.result-desc {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 400px;
}

.result-qr-placeholder {
  margin-bottom: 24px;
}
.qr-box {
  background: white;
  padding: 16px;
  border-radius: var(--radius);
  display: inline-block;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}
.qr-instruction {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.result-done-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  color: white;
  transition: var(--transition);
}
.result-btn-approved { background: var(--success); }
.result-btn-approved:hover { background: var(--success-600); }
.result-btn-denied { background: var(--danger); }
.result-btn-denied:hover { opacity: 0.9; }
.result-btn-timeout { background: var(--warn); color: var(--ink); }
.result-btn-timeout:hover { opacity: 0.9; }

/* Demo Controls */
.demo-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 20px;
  background: rgba(0,0,0,.03);
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
}

.demo-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: var(--transition);
}
.demo-btn:hover { box-shadow: var(--shadow); }
.demo-btn-approve { color: var(--success); border-color: #C7ECD8; }
.demo-btn-deny { color: var(--danger); border-color: #F5C6C8; }
.demo-btn-timeout { color: var(--warn); border-color: #F5DFA1; }

/* === QR SCAN === */
.qr-scan-container {
  text-align: center;
  animation: slideUp 0.3s ease;
}

.scan-frame {
  width: 220px;
  height: 220px;
  position: relative;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-corners {
  position: absolute;
  inset: 0;
}
.corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--primary);
  border-style: solid;
  border-width: 0;
}
.corner.tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 12px; }
.corner.tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 12px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 12px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 12px; }

.scan-icon { color: var(--muted-2); }

.scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: scanMove 2.5s ease-in-out infinite;
}

@keyframes scanMove {
  0%, 100% { top: 20%; }
  50% { top: 80%; }
}

.scan-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.scan-desc {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

.scan-demo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.scan-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.scan-demo-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.scan-demo-valid { border-color: #C7ECD8; color: var(--success); }
.scan-demo-expired { border-color: #F5DFA1; color: var(--warn); }
.scan-demo-revoked { border-color: #F5C6C8; color: var(--danger); }
.scan-demo-wrong { border-color: #F5DFA1; color: #8A5D06; }
.scan-demo-used { border-color: var(--line-2); color: var(--muted); }

.scan-result-wrap { animation: scaleIn 0.3s ease; }
.scan-result-card {
  padding: 40px;
  border-radius: 20px;
  max-width: 440px;
  margin: 0 auto;
}
.scan-result-card.result-valid { background: var(--success-50); border: 2px solid #C7ECD8; }
.scan-result-card.result-denied { background: var(--danger-50); border: 2px solid #F5C6C8; }

.scan-result-icon { margin-bottom: 16px; }
.result-valid .scan-result-icon { color: var(--success); }
.result-denied .scan-result-icon { color: var(--danger); }

.scan-result-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}
.result-valid .scan-result-title { color: var(--success); }
.result-denied .scan-result-title { color: var(--danger); }

.scan-result-desc {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 16px;
}

.scan-result-meta {
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 16px;
}

.scan-result-timer {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* === CONSOLE SCREEN === */
.console-screen .kiosk-body { padding: 0; }
.console-body { padding: 16px; overflow-y: auto; flex: 1; }

.console-split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  height: 100%;
}

.console-left,
.console-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.console-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.console-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.console-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-card-body {
  padding: 14px 16px;
}

.console-count {
  background: var(--primary-50);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.console-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.console-field { display: flex; flex-direction: column; gap: 4px; }
.console-field-full { grid-column: 1 / -1; }

.console-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.console-input,
.console-select,
.console-textarea {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}
.console-textarea { height: auto; resize: none; }
.console-input:focus,
.console-select:focus,
.console-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(110,86,248,.12);
}

.console-host-wrap { position: relative; }
.console-host-dd {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}
.console-host-sel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.console-host-change {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--primary-100);
  border-radius: 6px;
}

.console-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: var(--transition);
}
.console-photo-btn:hover { background: var(--primary-50); color: var(--primary); }

.photo-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  padding: 8px 0;
}

.console-submit-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.console-submit-btn:hover { background: var(--primary-600); }

/* Console Tabs */
.console-tabs {
  display: flex;
  gap: 4px;
  background: #F1F0F8;
  border-radius: var(--radius-xs);
  padding: 3px;
}

.console-tab {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.console-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.tab-count {
  background: #DDDAEC;
  color: #4B4577;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
}
.console-tab.active .tab-count {
  background: var(--primary-50);
  color: var(--primary-600);
}

/* Console Table */
.console-table-wrap { overflow-y: auto; max-height: 440px; }
.console-card-table { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.console-card-table .console-table-wrap { flex: 1; }

.console-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.console-table thead th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 2;
}
.console-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.console-table tbody tr:hover { background: #FAFAFE; }
.console-table-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-style: italic;
}

.console-visitor { display: flex; flex-direction: column; gap: 2px; }
.cv-name { font-weight: 600; color: var(--ink); font-size: 12.5px; }
.cv-meta { font-size: 11px; color: var(--muted); }

.console-host { display: flex; flex-direction: column; gap: 1px; }
.ch-name { font-weight: 500; color: var(--ink-2); font-size: 12px; }
.ch-unit { font-size: 10.5px; color: var(--muted); }

.console-time {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Status Chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.chip-approved { background: var(--success-50); color: var(--success-600); }
.chip-pending { background: var(--warn-50); color: #8A5D06; }
.chip-denied { background: var(--danger-50); color: #B4373B; }
.chip-timeout { background: var(--danger-50); color: #B4373B; }
.chip-checked { background: #EFF3FA; color: #3F4A63; }

.console-row-actions { display: flex; gap: 6px; }
.console-action-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.console-action-btn:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
.dispatch-btn { background: var(--primary); color: white; border-color: var(--primary); }
.dispatch-btn:hover { background: var(--primary-600); }
.dispatch-btn.dispatched { background: var(--success); border-color: var(--success); }
.console-checked-label { font-size: 11px; color: var(--muted); font-weight: 500; }

/* Override Items */
.override-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.override-item:last-child { border-bottom: none; }

.override-info { display: flex; flex-direction: column; gap: 2px; }
.override-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.override-meta { font-size: 11px; color: var(--muted); }
.override-time { font-size: 11px; color: var(--muted-2); }

.override-approve-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--warn-50);
  color: #8A5D06;
  border: 1px solid #F5DFA1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.override-approve-btn:hover { background: var(--success); color: white; border-color: var(--success); }

.console-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
}

.console-quick-links { display: flex; flex-direction: column; gap: 8px; }
.console-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.console-quick-link:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.console-quick-link svg:last-child { margin-left: auto; color: var(--muted-2); }

/* === PARCEL SCREEN === */
.parcel-list { display: flex; flex-direction: column; }
.parcel-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.parcel-item:last-child { border-bottom: none; }

.parcel-item-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.parcel-item-info { display: flex; flex-direction: column; gap: 2px; }
.parcel-recipient { font-size: 13px; font-weight: 600; color: var(--ink); }
.parcel-unit { font-size: 11px; color: var(--primary); font-weight: 500; }
.parcel-meta { font-size: 11px; color: var(--muted); }

.parcel-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.parcel-time { font-size: 11px; color: var(--muted); }

.parcel-status-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.chip-dropped { background: var(--warn-50); color: #8A5D06; }
.chip-notified { background: var(--accent-50); color: #1E4FC2; }
.chip-picked { background: var(--success-50); color: var(--success-600); }

.parcel-item-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.parcel-pickup-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.parcel-pickup-btn:hover { background: var(--success-50); color: var(--success); border-color: #C7ECD8; }

.parcel-item-done {
  font-size: 11px;
  color: var(--success);
  font-weight: 500;
  margin-top: 4px;
}

/* === MODAL === */
.kiosk-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,11,31,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.kiosk-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  width: 400px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.modal-parcel-info {
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

.modal-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 20px;
  cursor: pointer;
}
.modal-checkbox-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}
.modal-btn-cancel {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.modal-btn-cancel:hover { background: var(--surface-2); }
.modal-btn-confirm {
  background: var(--success);
  color: white;
}
.modal-btn-confirm:hover { background: var(--success-600); }

/* === TOAST === */
.kiosk-toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  transition: bottom 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.kiosk-toast.show { bottom: 60px; }

/* === ANIMATIONS === */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shake 0.5s ease; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(110,86,248,.4); }
  70% { box-shadow: 0 0 0 10px rgba(110,86,248,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,86,248,0); }
}

/* Sortable cursor */
.sortable { cursor: pointer; }
.sortable:hover { color: var(--primary); }
.sortable svg { display: inline; vertical-align: middle; }
