/* ============================================================
   POINTAGEPRO — Kiosk Terminal Premium CSS
   ============================================================ */

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

:root {
  --kiosk-bg: #0B0F1A;
  --kiosk-surface: #141925;
  --kiosk-surface-2: #1C2333;
  --kiosk-border: rgba(255,255,255,0.06);
  --kiosk-text: #F1F5F9;
  --kiosk-muted: #64748B;
  --kiosk-primary: #6366F1;
  --kiosk-primary-glow: rgba(99,102,241,0.2);
  --kiosk-success: #10B981;
  --kiosk-danger: #EF4444;
  --kiosk-warning: #F59E0B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--kiosk-bg);
  color: var(--kiosk-text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---- HEADER ---- */
.kiosk-header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--kiosk-border);
  background: rgba(20,25,37,0.8);
  backdrop-filter: blur(12px);
}
.kiosk-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #818CF8, #C084FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kiosk-date { font-size: 0.75rem; color: var(--kiosk-muted); margin-top: 2px; }
.kiosk-clock {
  font-size: 2.5rem;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 0 30px rgba(99,102,241,0.3);
}

/* ---- TABS ---- */
.kiosk-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--kiosk-border);
  background: var(--kiosk-surface);
}
.ktab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--kiosk-muted);
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.ktab:hover { color: var(--kiosk-text); background: rgba(255,255,255,0.02); }
.ktab.active {
  color: #818CF8;
  border-bottom-color: #6366F1;
  background: rgba(99,102,241,0.05);
}

/* ---- BODY ---- */
.kiosk-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.kiosk-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ---- PANELS ---- */
.kiosk-panel {
  background: var(--kiosk-surface);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--kiosk-border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  max-width: 420px;
  width: 100%;
}
.panel-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.kiosk-panel h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.02em; text-align: center; }
.panel-hint { margin-top: 1.25rem; color: var(--kiosk-muted); font-size: 0.8rem; text-align: center; }
.panel-hint strong { color: #818CF8; }

/* ---- QR CAMERA ---- */
.qr-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--kiosk-primary);
  box-shadow: 0 0 30px var(--kiosk-primary-glow), inset 0 0 20px rgba(0,0,0,0.5);
}
#qr-video { width: 100%; height: 100%; object-fit: cover; }
.qr-frame {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60%; height: 60%;
  border: 2px solid rgba(99,102,241,0.6);
  border-radius: 12px;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.3);
}

/* ---- QR COUNTDOWN (mode 3) ---- */
.qr-countdown { margin-top: 1.5rem; text-align: center; width: 100%; }
.qr-countdown-text { font-size: 0.75rem; color: var(--kiosk-muted); margin-bottom: 0.5rem; }
.qr-countdown-bar {
  width: 100%;
  height: 4px;
  background: #1E293B;
  border-radius: 4px;
  overflow: hidden;
}
.qr-countdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366F1, #A855F7);
  border-radius: 4px;
  transition: width 1s linear;
}

/* ---- PIN ---- */
.pin-section {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.kiosk-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--kiosk-surface-2);
  border: 1.5px solid var(--kiosk-border);
  color: white;
  border-radius: 12px;
  font-size: 1rem;
  text-align: center;
  outline: none;
  font-family: inherit;
  letter-spacing: 0.05em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.kiosk-input:focus { border-color: var(--kiosk-primary); box-shadow: 0 0 0 3px var(--kiosk-primary-glow); }

.pin-dots { display: flex; justify-content: center; gap: 1rem; }
.pin-dots .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--kiosk-surface-2);
  border: 2px solid var(--kiosk-border);
  transition: all 0.15s;
}
.pin-dots .dot.filled {
  background: var(--kiosk-primary);
  border-color: var(--kiosk-primary);
  box-shadow: 0 0 10px var(--kiosk-primary-glow);
}

/* ---- PIN PAD ---- */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  max-width: 300px;
  width: 100%;
}
.pad-btn {
  background: var(--kiosk-surface-2);
  border: 1px solid var(--kiosk-border);
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0.8rem 0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pad-btn:hover { background: #252D3F; border-color: rgba(255,255,255,0.12); }
.pad-btn:active { transform: scale(0.93); background: var(--kiosk-primary); }
.pad-del { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: var(--kiosk-danger); font-size: 1.25rem; }
.pad-del:active { background: var(--kiosk-danger); color: white; }
.pad-ok { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.25); color: var(--kiosk-success); font-weight: 800; font-size: 1.1rem; }
.pad-ok:active { background: var(--kiosk-success); color: white; }

/* ---- RESULT OVERLAY ---- */
.kiosk-result {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: resultIn 0.3s ease;
  backdrop-filter: blur(8px);
}
.kiosk-result--success { background: rgba(16,185,129,0.92); }
.kiosk-result--error   { background: rgba(239,68,68,0.92); }
.kiosk-result--warn    { background: rgba(245,158,11,0.92); }
.kiosk-result--loading { background: rgba(11,15,26,0.95); }
.kr-icon { font-size: 4rem; margin-bottom: 1rem; animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.kr-title { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.kr-sub { font-size: 1.25rem; opacity: 0.9; text-align: center; margin-top: 0.5rem; font-weight: 500; }

@keyframes resultIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
