/* ============================================================
   Smart Locker V2 — Web App Mobile-First Stylesheet
   Design: Premium Dark + Vibrant Accents + Glassmorphism
   Ergonomia: Thumb-Friendly & PWA Optimized
   ============================================================ */

:root {
  /* Identidade Lave Clube */
  --primary-teal:        #0b5c64;
  --primary-teal-dark:   #074248;
  --primary-teal-medium: #0F6B76;
  --primary-teal-light:  #e7f2f3;
  --accent-wood:         #C49A6C;
  --accent-wood-hover:   #b08759;
  --accent-wood-light:   #fdfaf7;

  /* Cores de Base (Tema Claro Limpo e Premium) */
  --bg-primary:          #f4f8f8;
  --bg-card:             #ffffff;
  --bg-card-hover:       #eef5f5;
  --bg-glass:            rgba(255, 255, 255, 0.7);
  --border:              rgba(11, 92, 100, 0.08);

  /* Status e Acentos */
  --accent-green:        #16a34a;
  --accent-green-glow:   rgba(22, 163, 74, 0.15);
  --accent-red:          #dc2626;
  --accent-red-glow:     rgba(220, 38, 38, 0.15);
  --accent-yellow:       #d97706;
  --accent-yellow-glow:  rgba(217, 119, 6, 0.15);
  --accent-blue:         #0b5c64; /* Mapeado para o Teal para evitar reescrever referências */
  --accent-blue-glow:    rgba(11, 92, 100, 0.15);
  --accent-purple:       #C49A6C; /* Mapeado para o Wood */

  /* Textos */
  --text-primary:        #1e2f31;
  --text-secondary:      #5e7375;
  --text-muted:          #8fa4a6;

  /* Bordas e Sombras */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-glow-green:  0 8px 24px rgba(22, 163, 74, 0.12);
  --shadow-glow-blue:   0 8px 24px rgba(11, 92, 100, 0.12);
  --shadow-card:        0 10px 30px rgba(11, 92, 100, 0.05);

  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }

html, body {
  width: 100%; height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  overflow-x: hidden;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

/* ─── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6, .brand-name, .screen-title, .locker-number {
  font-family: 'Outfit', sans-serif;
}

/* ─── LAVE CLUBE LOGO STYLING & ROTATION ───────────────────── */
.logo-svg {
  width: 32px;
  height: 32px;
  color: var(--primary-teal-medium);
  flex-shrink: 0;
  display: block;
}
.logo-svg .drum-swirl {
  transform-origin: 50px 60px;
  transform: translate(50px, 60px) scale(0.32) translate(-50px, -50px) rotate(0deg);
  transition: transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.app-header:hover .logo-svg .drum-swirl,
.app-header:active .logo-svg .drum-swirl {
  transform: translate(50px, 60px) scale(0.32) translate(-50px, -50px) rotate(360deg);
}

.brand-name {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}
.brand-name .logo-bold {
  font-weight: 800;
  color: var(--primary-teal-dark);
  margin-right: 1px;
}

/* ─── SCREENS (PWA Mobile Flow) ────────────────────────────── */
.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow-x: hidden;
  overflow-y: auto;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.screen.slide-out {
  opacity: 0;
  transform: translateX(-30px);
}

.screen-inner {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  box-sizing: border-box;
}
.screen-inner.center-content {
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ─── HEADER ──────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 28px; }
.header-text { display: flex; flex-direction: column; }
.brand-name { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.brand-sub  { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.header-time { font-size: 18px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* ─── HOME SCREEN ─────────────────────────────────────────── */
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 16px;
  overflow-y: auto;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.section-title { text-align: center; width: 100%; }
.section-title h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; line-height: 1.3; }
.section-title p  { font-size: 14px; color: var(--text-secondary); }

/* ─── LOCKER GRID (Mobile-First 2 Colunas) ────────────────── */
.locker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.locker-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(11, 92, 100, 0.04);
}
.locker-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
}
.locker-card:active { transform: scale(0.96); }

/* FREE */
.locker-card.free {
  border-color: rgba(22, 163, 74, 0.25);
}
.locker-card.free::before {
  background: radial-gradient(ellipse at top, rgba(22, 163, 74, 0.05), transparent 70%);
  opacity: 1;
}
.locker-card.free:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow-glow-green);
  transform: translateY(-2px);
}

/* OCCUPIED */
.locker-card.occupied {
  border-color: rgba(220, 38, 38, 0.15);
  cursor: not-allowed;
  opacity: 0.65;
}
.locker-card.occupied::before {
  background: radial-gradient(ellipse at top, rgba(220, 38, 38, 0.03), transparent 70%);
  opacity: 1;
}

/* READY */
.locker-card.ready {
  border-color: rgba(196, 154, 108, 0.4);
  animation: pulse-ready 2s ease-in-out infinite;
}
.locker-card.ready::before {
  background: radial-gradient(ellipse at top, rgba(196, 154, 108, 0.08), transparent 70%);
  opacity: 1;
}
@keyframes pulse-ready {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 154, 108, 0); }
  50% { box-shadow: 0 4px 16px 4px rgba(196, 154, 108, 0.18); }
}

.locker-number {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}
.locker-icon { font-size: 32px; }
.locker-status-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
}
.free .locker-status-label     { background: rgba(22, 163, 74, 0.08);  color: var(--accent-green); }
.occupied .locker-status-label { background: rgba(220, 38, 38, 0.08); color: var(--accent-red); }
.ready .locker-status-label    { background: rgba(196, 154, 108, 0.1); color: var(--accent-purple); }
.offline .locker-status-label  { background: rgba(94, 115, 117, 0.08); color: var(--text-secondary); }

.locker-phone {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* ─── LEGEND ──────────────────────────────────────────────── */
.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 10px 0;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-free     { background: var(--accent-green); box-shadow: 0 0 6px rgba(22, 163, 74, 0.3); }
.dot-occupied { background: var(--accent-red); }
.dot-ready    { background: var(--accent-purple); box-shadow: 0 0 6px rgba(196, 154, 108, 0.3); }

/* ─── BADGE ───────────────────────────────────────────────── */
.badge-free {
  display: inline-block;
  background: rgba(22, 163, 74, 0.08);
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.locker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-teal), var(--accent-wood));
  color: white;
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(11, 92, 100, 0.15);
  align-self: center;
}

/* ─── SCREEN TITLES ───────────────────────────────────────── */
.screen-title {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
.screen-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

/* ─── STEPS (Mobile Optimized) ────────────────────────────── */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.step-icon { font-size: 24px; flex-shrink: 0; }
.step-text { display: flex; flex-direction: column; gap: 2px; }
.step-text strong { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.step-text span   { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }

/* ─── PHONE & NAME INPUTS (Thumb-Friendly) ────────────────── */
.phone-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.phone-input-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.phone-row {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
  height: 56px; /* Altura ergonômica mobile */
}
.phone-row:focus-within { border-color: var(--accent-blue); }
.phone-prefix {
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  height: 100%;
}
.phone-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 16px;
  font-size: 16px; /* Evita zoom automático no iOS Safari */
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  height: 100%;
  width: 100%;
}
#phone-input { font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.phone-row input::placeholder { color: var(--text-muted); font-weight: 400; }

/* ─── BUTTONS (Ergonomia Mobile) ──────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px; /* Altura ergonômica robusta */
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800; /* Letras em negrito de destaque */
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, var(--primary-teal-medium), var(--primary-teal-dark));
  color: white;
  box-shadow: 0 6px 18px rgba(11, 92, 100, 0.2);
}
.btn-primary:hover  { transform: translateY(-2px); background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-medium)); box-shadow: 0 8px 24px rgba(11, 92, 100, 0.3); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-success {
  background: linear-gradient(135deg, #16a34a, var(--primary-teal));
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.2);
  font-family: 'Outfit', sans-serif;
}
.btn-primary.btn-success:hover { background: linear-gradient(135deg, var(--primary-teal), #16a34a); box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3); }

.back-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: var(--transition);
  height: 38px;
  display: inline-flex;
  align-items: center;
}
.back-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ─── PIX / PAYMENT (Mobile Layout) ───────────────────────── */
.pix-value-tag {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.qr-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 10px 0;
}
#qrcode {
  padding: 16px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}
#qrcode canvas, #qrcode img { display: block; margin: 0 auto; }

.pix-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  width: 100%;
}
.pix-key-label { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.pix-key-value { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.copy-btn {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--accent-blue);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.copy-btn:hover { background: rgba(59, 130, 246, 0.35); }

.info-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--accent-yellow);
  line-height: 1.4;
}

/* ─── LOCK SCREEN ─────────────────────────────────────────── */
.lock-animation { margin-bottom: 12px; }

.door-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.door-frame {
  width: 120px;
  height: 160px;
  border: 4px solid var(--text-muted);
  border-radius: 8px 8px 4px 4px;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}
.door-panel {
  position: absolute;
  inset: 4px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transform-origin: left center;
  animation: door-swing 2s ease-in-out infinite;
}
@keyframes door-swing {
  0%, 40% { transform: perspective(300px) rotateY(0deg); }
  60%, 100%  { transform: perspective(300px) rotateY(-30deg); }
}
.door-handle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 8px var(--accent-yellow);
}
.push-arrow {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-blue);
  animation: arrow-pulse 1s ease-in-out infinite;
}
@keyframes arrow-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(6px); }
  50% { opacity: 1; transform: translateX(0); }
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  width: 100%;
}
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  flex-shrink: 0;
}
.status-dot.pulse { animation: dot-pulse 1.2s ease-in-out infinite; }
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
}

.locked-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fade-in 0.5s ease;
}
@keyframes fade-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.big-check { font-size: 64px; }
.locked-confirm h3 { font-size: 24px; font-weight: 800; color: var(--accent-green); }
.locked-confirm p  { color: var(--text-secondary); font-size: 14px; max-width: 300px; line-height: 1.5; text-align: center; }

/* ─── ADMIN PIN (Mobile Pad) ──────────────────────────────── */
.pin-display {
  display: flex;
  gap: 14px;
  margin: 12px 0;
}
.pin-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: var(--transition);
}
.pin-dot.filled { background: var(--accent-blue); border-color: var(--accent-blue); box-shadow: 0 0 12px var(--accent-blue); }
.pin-dot.error  { background: var(--accent-red); border-color: var(--accent-red); }

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 12px;
  justify-content: center;
}
.pin-key {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.pin-key:hover  { background: var(--bg-card-hover); border-color: var(--accent-blue); }
.pin-key:active { transform: scale(0.92); }
.pin-clear { color: var(--accent-red); }
.pin-ok    { background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple)); border-color: transparent; }

/* ─── ADMIN DASHBOARD (Mobile 1 Coluna) ───────────────────── */
.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.admin-locker-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 coluna no mobile para cards imponentes e super fáceis de tocar! */
  gap: 16px;
  width: 100%;
}
.admin-locker-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.admin-locker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-locker-title { font-size: 16px; font-weight: 800; }
.admin-status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
}
.admin-status-badge.free     { background: rgba(34, 197, 94, 0.2);  color: var(--accent-green); }
.admin-status-badge.occupied { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.admin-status-badge.ready    { background: rgba(245, 158, 11, 0.2); color: var(--accent-yellow); }
.admin-status-badge.offline  { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

.admin-locker-info { font-size: 12px; color: var(--text-secondary); }

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.admin-btn-deliver, .admin-btn-open, .admin-btn-free, .admin-logout {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-btn-deliver {
  border: none;
  background: linear-gradient(135deg, #16a34a, var(--accent-green));
  color: white;
}
.admin-btn-deliver:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4); }

.admin-btn-open {
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-primary);
}
.admin-btn-open:hover { background: var(--bg-card-hover); border-color: var(--text-secondary); }

.admin-btn-free {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}
.admin-btn-free:hover { background: rgba(239, 68, 68, 0.2); }

.admin-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
  margin-top: 16px;
}
.admin-logout:hover { background: rgba(239, 68, 68, 0.25); }

.header-logout-btn {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--accent-red);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.header-logout-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}
.header-logout-btn:active {
  transform: scale(0.95);
}

/* ─── ADMIN BTN DISCRETO ───────────────────────────────────── */
.admin-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 50;
}
.admin-btn:hover { background: var(--bg-card); color: var(--text-secondary); }

/* ─── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.2s;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-icon { font-size: 48px; }
.modal h3 { font-size: 20px; font-weight: 800; }
.modal p  { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* ─── TOAST ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── UTILITY ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── CONNECTION BANNER & DISABLED ─────────────────────────── */
.connection-banner {
  background: #ef4444;
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  animation: pulse-banner 2s infinite;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  width: 100%;
}
@keyframes pulse-banner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}
.connection-banner.connecting {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-dim) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  animation: none !important;
  padding: 10px 0 !important;
  font-weight: 500 !important;
}
.spinner-circle {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin-circle 0.8s linear infinite;
}
@keyframes spin-circle {
  to { transform: rotate(360deg); }
}
.disabled {
  opacity: 0.5 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ─── RESPONSIVE EXPANSION (Tablets/Desktops) ──────────────── */
@media (min-width: 600px) {
  .locker-grid { grid-template-columns: repeat(3, 1fr); max-width: 860px; }
  .home-main, .screen-inner, .admin-main { max-width: 860px; }
  .admin-locker-grid { grid-template-columns: repeat(2, 1fr); }
  .pin-pad { grid-template-columns: repeat(3, 80px); }
  .pin-key { width: 80px; height: 80px; font-size: 24px; }
}

/* ─── SWIPE REFRESH (PWA Mobile-First) ──────────────── */
.swipe-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100px);
  z-index: 9999;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.refresh-spinner {
  font-size: 18px;
  transition: transform 0.2s ease;
}
.refresh-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.spin-fast {
  transform: rotate(180deg);
}
.spin-infinite {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ─── GATEWAY PAGBANK (Aba de Pagamento) ──────────────── */
.payment-methods-tab {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.method-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.method-tab:hover {
  color: var(--primary-teal);
  background: var(--bg-primary);
}
.method-tab.active {
  background: var(--primary-teal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 92, 100, 0.2);
}
.payment-view {
  animation: fadeIn 0.3s ease;
}

/* ─── ACEITE DOS TERMOS DE USO & MODAL DE TERMOS ──────────────── */
.terms-accept-container {
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.terms-accept-container:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}
.terms-accept-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-blue);
  flex-shrink: 0;
}
.modal-terms-content::-webkit-scrollbar {
  width: 6px;
}
.modal-terms-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.modal-terms-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.modal-terms-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── BASKET SELECTION ────────────────────────────────────── */
.basket-selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.basket-btn {
  height: 48px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
}
.basket-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-teal-medium);
}
.basket-btn.active {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
  color: var(--primary-teal-dark);
}
.basket-estimated-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 5px 0 0;
}
.basket-estimated-text .price-value {
  color: var(--primary-teal-dark);
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

/* ─── OWNER PANEL STYLING ─────────────────────────────────── */
.owner-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(11, 92, 100, 0.03);
  margin-bottom: 20px;
}
.owner-section-title {
  margin-top: 0;
  color: var(--primary-teal-dark);
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.owner-field-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
}
.owner-input {
  width: 100%;
  height: 44px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.owner-input:focus {
  border-color: var(--primary-teal);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(11, 92, 100, 0.1);
}
.owner-select {
  width: 100%;
  height: 44px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.owner-select:focus {
  border-color: var(--primary-teal);
  background: var(--bg-card);
}
.owner-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  outline: none;
  transition: var(--transition);
}
.owner-textarea:focus {
  border-color: var(--primary-teal);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(11, 92, 100, 0.1);
}
.owner-secondary-btn {
  height: 38px;
  padding: 0 16px;
  background: var(--primary-teal-light);
  border: 1.5px solid var(--primary-teal);
  border-radius: 8px;
  color: var(--primary-teal-dark);
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-sizing: border-box;
  font-family: inherit;
}
.owner-secondary-btn:hover {
  background: var(--primary-teal);
  color: white;
}

/* Animações e Estilos para Monitor de Máquinas do Admin */
@keyframes pulse-cyan {
  0% { transform: scale(0.98); opacity: 0.85; box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.3); }
  70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
  100% { transform: scale(0.98); opacity: 0.85; box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

@keyframes pulse-yellow {
  0% { transform: scale(0.98); opacity: 0.85; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.98); opacity: 0.85; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.machine-status-pulse-cyan {
  animation: pulse-cyan 2s infinite;
  border: 1px solid rgba(0, 242, 254, 0.4) !important;
  background: rgba(0, 242, 254, 0.08) !important;
}

.machine-status-pulse-yellow {
  animation: pulse-yellow 2s infinite;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.admin-machine-select {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 140px;
}

.admin-machine-select:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 5px rgba(11, 92, 100, 0.2);
}

.admin-machine-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

