/* CASHLESS BALANCE SYSTEM - GLASSMORPHISM DESIGN */
/* Updated: 2025-09-29 18:35 - iOS logo fix + complete translations v4.0 */
/* Fixed iOS Safari logo visibility, completed all form translations */

:root {
  color-scheme: light;
  --page-background: radial-gradient(ellipse at top, #fff7ed 0%, #f8fafc 55%, #eef2ff 100%);
  --text-primary: #1f2937;
  --text-secondary: rgba(17, 24, 39, 0.65);
  --text-inverse: #ffffff;
  --text: var(--text-primary);
  --muted: rgba(71, 85, 105, 0.72);
  --accent: #2563eb;
  --color-orange-500: #f97316;
  --color-orange-400: #fb923c;
  --color-gray-700: #374151;
  --color-gray-900: #111827;
  --color-green: #16a34a;
  --color-red: #ef4444;
  --color-blue: #2563eb;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-solid: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.55);
  --border-radius-sm: 12px;
  --border-radius-md: 18px;
  --border-radius-lg: 26px;
  --shadow-soft: 0 26px 60px rgba(15, 23, 42, 0.18);
  --shadow-orange: 0 24px 48px rgba(249, 115, 22, 0.32);
  --glow-strong: 0 36px 84px rgba(15, 23, 42, 0.24);
  --glow-base-shadow: 0 16px 40px rgba(249, 115, 22, 0.3);
  --timeline-line: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
}

/* TEMA OSCURO */
body[data-theme="dark"] {
  color-scheme: dark;
  --page-background: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 55%, #020617 100%);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-inverse: #0f172a;
  --text: var(--text-primary);
  --muted: rgba(148, 163, 184, 0.72);
  --glass-bg: rgba(30, 41, 59, 0.85);
  --glass-bg-solid: rgba(15, 23, 42, 0.95);
  --glass-border: rgba(71, 85, 105, 0.3);
  --shadow-soft: 0 26px 60px rgba(0, 0, 0, 0.35);
  --shadow-orange: 0 24px 48px rgba(249, 115, 22, 0.25);
  --glow-strong: 0 36px 84px rgba(0, 0, 0, 0.4);
  --glow-base-shadow: 0 16px 40px rgba(249, 115, 22, 0.2);
  --timeline-line: linear-gradient(180deg, rgba(71, 85, 105, 0.4) 0%, rgba(71, 85, 105, 0) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', 'Plus Jakarta Sans', 'Poppins', sans-serif;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--page-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(28px);
}


.hero-topbar {
  width: clamp(280px, 90vw, 680px);
  margin: 0 auto;
  padding: clamp(0.9rem, 3vw, 1.4rem) clamp(1.1rem, 5vw, 1.8rem);
  border-radius: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.2rem);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 72px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(20px);
  text-align: center;
}

.hero-topbar .brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  text-decoration: none;
  color: inherit;
}

.brand-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.45rem, 2vw, 0.7rem) clamp(0.9rem, 6vw, 1.5rem);
  border-radius: clamp(1.8rem, 6vw, 2.8rem);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.35);
  margin-inline: auto;
}

/* Color del logo controlado por tema (single SVG uses --brand-logo-fill) */
.brand-marker { color: var(--brand-logo-color, var(--text)); }
/* Tema: light -> gris muy oscuro (no negro puro). Usamos --text-primary por defecto #1f2937 */
body:not([data-theme="dark"]) { --brand-logo-fill: #1f2937; }
/* Tema: dark -> blanco */
body[data-theme="dark"] { --brand-logo-fill: #ffffff; }

/* Ensure both SVGs match sizing and transitions */
.brand-logo { display: block; width: clamp(180px, 55vw, 240px); height: auto; transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease; }

.brand-logo {
  display: block;
  width: clamp(180px, 55vw, 240px);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.25));
  -webkit-filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.25));
}

/* Brand logo single element styling */
.brand-logo {
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

/* Allow theme-specific drop shadows */
body:not([data-theme="dark"]) .brand-logo {
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.25));
}
body[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 8px 16px rgba(255, 255, 255, 0.85));
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.55rem, 2.5vw, 0.9rem);
  margin: 0 auto;
}

.topbar-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--color-gray-900);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
  text-decoration: none;
  cursor: pointer;
}

.topbar-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 58px rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

.topbar-action:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.topbar-action svg {
  width: 22px;
  height: 22px;
  transition: opacity 200ms ease, transform 200ms ease;
}

.topbar-action--theme {
  padding: 0;
}

.topbar-action--theme svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
}

.topbar-action--theme .icon-sun,
.topbar-action--theme .icon-moon {
  opacity: 0;
}

.topbar-action--theme[data-icon="dark"] .icon-moon,
.topbar-action--theme[data-icon="light"] .icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== BOTÓN DE IDIOMA ===== */

.topbar-action--language {
  position: relative;
  min-width: 48px;
}

.language-text {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: currentColor;
  transition: all 0.2s ease;
}

.topbar-action--language:hover .language-text {
  transform: scale(1.1);
  color: #10b981;
}

.topbar-action--language:active .language-text {
  transform: scale(0.95);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --page-background: radial-gradient(ellipse at top, #0b1120 0%, #020617 65%, #000 100%);
  --text-primary: rgba(226, 232, 240, 0.95);
  --text-secondary: rgba(148, 163, 184, 0.78);
  --text: rgba(226, 232, 240, 0.95);
  --muted: rgba(148, 163, 184, 0.75);
  --accent: #60a5fa;
  --glass-bg: rgba(13, 18, 27, 0.6);
  --glass-bg-solid: rgba(15, 23, 42, 0.88);
  --glass-border: rgba(148, 163, 184, 0.22);
  --shadow-soft: 0 32px 76px rgba(2, 6, 23, 0.68);
  --glow-strong: 0 42px 92px rgba(2, 6, 23, 0.82);
  --glow-base-shadow: 0 18px 48px rgba(56, 189, 248, 0.35);
  --color-gray-700: rgba(203, 213, 225, 0.88);
  --color-gray-900: rgba(226, 232, 240, 0.94);
  --color-green: #34d399;
  --color-red: #f87171;
  --color-blue: #60a5fa;
  --timeline-line: linear-gradient(180deg, rgba(96, 165, 250, 0.45) 0%, rgba(96, 165, 250, 0) 100%);
}

body[data-theme="dark"] .page-shell {
  background: rgba(2, 6, 23, 0.6);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

body.login-open {
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: clamp(1.8rem, 5vw, 3.4rem) auto 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 4vw, 1.8rem);
  align-items: center;
  text-align: center;
}

@media (min-width: 960px) {
  .hero-content {
    width: min(92vw, 480px);
    flex-direction: column;
    text-align: center;
    gap: clamp(0.7rem, 4vw, 1.1rem);
    text-align: left;
    margin-top: clamp(2.4rem, 5vw, 3.8rem);
  }

  .hero-topbar .brand {
    margin-inline: auto;
  }
}

@media (min-width: 1024px) {
  .hero-topbar {
    width: clamp(360px, 45vw, 750px);
    padding: clamp(1rem, 2.5vw, 1.8rem) clamp(1.25rem, 4vw, 2.2rem);
  }

  .brand-marker {
    width: clamp(240px, 24vw, 340px);
  }
}

.hero-event {
  .topbar-actions {
    margin: 0 auto;
    justify-content: center;
  }

  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(2.7rem, 8vw, 4.2rem);
  letter-spacing: -0.02em;
  text-shadow: 0 14px 32px rgba(15, 19, 24, 0.35);
}

body[data-theme="light"] .hero-topbar {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 30px 72px rgba(15, 23, 42, 0.2);
}

body[data-theme="light"] .brand-marker {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(17, 24, 39, 0.15);
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.2);
}

/* Estilos específicos para tema oscuro */
body[data-theme="dark"] .hero-topbar {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .brand-marker {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .topbar-action {
  border-color: rgba(128, 150, 190, 0.28);
  background: linear-gradient(145deg, rgba(30, 34, 45, 0.92), rgba(18, 22, 32, 0.92));
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 48px rgba(1, 4, 12, 0.55);
}

body[data-theme="dark"] .topbar-action:hover {
  box-shadow: 0 30px 54px rgba(1, 4, 12, 0.62);
}

.login-card {
  width: min(420px, 100%);
  padding: clamp(2rem, 4vw, 2.8rem);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

body[data-theme="dark"] .login-card {
  background: rgba(15, 25, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .login-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.login-logo {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease;
}

.login-logo:hover {
  transform: scale(1.02);
}

.login-tag {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f97316;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(249, 115, 22, 0.2);
}

.login-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 500;
}

body[data-theme="dark"] .login-subtitle {
  color: #9ca3af;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: #374151;
}

body[data-theme="dark"] .login-field {
  color: #d1d5db;
}

.login-field input {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #1f2937;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.login-field input::placeholder {
  color: #9ca3af;
}

.login-field input:focus {
  outline: none;
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(16, 185, 129, 0.1);
}

body[data-theme="dark"] .login-field input {
  background: rgba(15, 25, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f9fafb;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .login-field input::placeholder {
  color: #6b7280;
}

body[data-theme="dark"] .login-field input:focus {
  background: rgba(15, 25, 35, 0.95);
  border-color: #10b981;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(16, 185, 129, 0.2);
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-btn {
  width: 100%;
  justify-content: center;
}

.login-error {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: #ef4444;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
}

.login-help {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
}

body[data-theme="dark"] .login-help {
  color: #9ca3af;
}

.hero {
  position: relative;
  padding: clamp(2.6rem, 5vw, 4rem) clamp(1.5rem, 6vw, 4.8rem) clamp(2.6rem, 6vw, 3.8rem);
  background: linear-gradient(135deg, #ff8a1f 0%, #f6a93a 45%, #f2b75f 100%);
  color: var(--text-inverse);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.2), transparent 50%);
  opacity: 0.8;
  pointer-events: none;
}

body[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #101a2d 0%, #16263d 48%, #0f1a2a 100%);
  color: rgba(255, 255, 255, 0.95);
}

body[data-theme="dark"] .hero::before {
  background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(circle at 78% 18%, rgba(96, 155, 255, 0.18), transparent 60%);
  opacity: 0.9;
}

.layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(2.2rem, 4vw, 3.4rem) clamp(1.2rem, 6vw, 5rem) clamp(3.6rem, 6vw, 5rem);
  margin-top: clamp(-4.6rem, -8vw, -5.2rem);
}

.glass-card {
  position: relative;
  background: var(--glass-bg);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  padding: clamp(1.9rem, 3.2vw, 2.6rem);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

body[data-theme="light"] .glass-card {
  box-shadow: var(--shadow-soft);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: -20% 40% auto -20%;
  height: 200px;
  background: linear-gradient(120deg, rgba(255, 140, 0, 0.22), transparent 70%);
  pointer-events: none;
}

.glass-card.card-form::before {
  inset: -25% 65% auto -25%;
}

.glass-card > * {
  position: relative;
  z-index: 1;
}

.glass-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  opacity: 0.35;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow-strong);
  border-color: rgba(255, 255, 255, 0.45);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.card-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-header h2 {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Poppins', 'Inter', sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 600;
}

.card-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 1.2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-field label {
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--text-primary);
}

.field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.2rem 0.2rem 0.2rem 0.95rem;
  border-radius: var(--border-radius-md);
  background: rgba(20, 22, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Asegurar que el input sea interactivo */
#braceletId {
  pointer-events: auto !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
  touch-action: manipulation !important;
}

body[data-theme="light"] .field-wrapper {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.field-wrapper select,
.field-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  padding: 0.85rem 0.5rem;
  font-family: inherit;
  color: var(--text-primary);
  pointer-events: auto;
  z-index: 2;
  position: relative;
}

.field-wrapper select:focus,
.field-wrapper input:focus {
  outline: none;
}

.field-icon {
  font-size: 1.25rem;
  opacity: 0.7;
}

.input-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(68, 68, 68, 0.12);
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-gray-700);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease, border 160ms ease;
  box-shadow: inset 3px 3px 8px rgba(255, 255, 255, 0.65), inset -4px -4px 12px rgba(68, 68, 68, 0.08);
  backdrop-filter: blur(6px);
}

.icon-btn:hover {
  transform: translateY(-1px);
  color: var(--color-orange-500);
  border-color: rgba(255, 140, 0, 0.45);
  box-shadow: 0 12px 24px rgba(255, 140, 0, 0.18);
}

.icon-btn:active {
  transform: translateY(0);
  box-shadow: inset 2px 2px 6px rgba(68, 68, 68, 0.15), inset -2px -2px 6px rgba(255, 255, 255, 0.45);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-orange-500), var(--color-orange-400));
  color: #fff;
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 32px 60px rgba(255, 140, 0, 0.32);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: -1;
}

.btn-primary:hover::before,
.btn-primary:focus-visible::before,
.btn-primary:active::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 18px 40px rgba(255, 140, 0, 0.4);
}

.btn-outline {
  background: rgba(68, 68, 68, 0.08);
  border: 1px solid rgba(68, 68, 68, 0.16);
  color: var(--color-gray-700);
  box-shadow: inset 4px 4px 12px rgba(255, 255, 255, 0.4), inset -6px -6px 18px rgba(68, 68, 68, 0.08);
}

body[data-theme="dark"] .btn-outline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: inset 3px 3px 10px rgba(255, 255, 255, 0.12), inset -6px -6px 18px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .icon-btn {
  background: rgba(34, 36, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.25), inset -4px -4px 10px rgba(255, 255, 255, 0.06);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-primary);
  box-shadow: 0 18px 40px rgba(68, 68, 68, 0.18);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid rgba(41, 121, 255, 0.35);
  outline-offset: 3px;
}

.form-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.balance-card {
  border-left: 6px solid var(--color-orange-500);
}

.balance-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.6rem 1.8rem;
  border-radius: var(--border-radius-md);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(120deg, rgba(255, 140, 0, 0.16), rgba(255, 179, 71, 0.12));
  border: 1px solid rgba(255, 140, 0, 0.3);
  --glow-base-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 25px 45px rgba(255, 140, 0, 0.18);
  box-shadow: var(--glow-base-shadow);
  backdrop-filter: blur(16px);
}

.balance-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(26, 26, 26, 0.7);
}

body[data-theme="dark"] .balance-label {
  color: rgba(255, 255, 255, 0.65);
}

.balance-amount {
  font-family: 'Plus Jakarta Sans', 'Poppins', 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  font-feature-settings: 'tnum' 1, 'salt' 1;
  color: var(--color-gray-900);
}

body[data-theme="dark"] .balance-amount {
  color: rgba(255, 255, 255, 0.95);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.status-active {
  background: rgba(39, 174, 96, 0.16);
  color: var(--color-green);
}

.status-inactive {
  background: rgba(231, 76, 60, 0.16);
  color: var(--color-red);
}

.balance-meta {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 1.6rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meta-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 600;
}

.meta-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.meta-value.code {
  font-family: 'Plus Jakarta Sans', 'Poppins', 'Inter', sans-serif;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.meta-value.emphasis {
  color: var(--color-blue);
}

/* ===== ESTILOS PARA ACCIONES DEL BALANCE ===== */

.balance-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.balance-actions .btn {
  min-width: 160px;
}

/* ===== ESTILOS PARA BOTÓN DE IMPRESIÓN ===== */

.print-action {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.print-receipt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.9), rgba(251, 146, 60, 0.9));
  color: #ffffff;
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: -0.01em;
}

.print-receipt-btn:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 1), rgba(251, 146, 60, 1));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.print-receipt-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.print-receipt-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* ===== ESTILOS PARA TOTALES DEL BALANCE ===== */

.balance-totals {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .balance-totals {
  background: rgba(20, 22, 26, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.totals-row:first-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 0.25rem;
  padding-bottom: 0.75rem;
}

body[data-theme="dark"] .totals-row:first-child {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.totals-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.totals-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', 'Poppins', 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.totals-positive {
  color: var(--color-green);
}

.totals-negative {
  color: var(--color-red);
}

/* ===== RESPONSIVE PARA MÓVILES ===== */

@media (max-width: 640px) {
  .balance-actions {
    margin-top: 1rem;
  }
  
  .balance-actions .btn {
    min-width: 140px;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
  }
  
  .balance-totals {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
  }
  
  .totals-row {
    padding: 0.4rem 0;
  }
  
  .totals-row:first-child {
    padding-bottom: 0.6rem;
    margin-bottom: 0.2rem;
  }
  
  .totals-label,
  .totals-value {
    font-size: 0.85rem;
  }
  
  .balance-meta {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .balance-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .balance-actions .btn {
    width: 100%;
    max-width: 200px;
  }
  
  .balance-meta {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  
  .totals-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  
  .totals-row:first-child {
    align-items: flex-start;
  }
  
  .totals-value {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .hero-topbar {
    width: min(81vw, 390px);
  }

  .brand-marker {
    width: clamp(180px, 70vw, 260px);
  }



  .topbar-action {
    width: 46px;
    height: 46px;
  }

  .layout {
    margin-top: -72px;
    padding: clamp(2.2rem, 5vw, 3rem) clamp(1rem, 6vw, 2.5rem) clamp(3.5rem, 7vw, 4.5rem);
    gap: clamp(1.6rem, 4vw, 2.4rem);
  }

  .glass-card {
    padding: clamp(1.6rem, 4vw, 2.1rem);
  }

  .balance-highlight {
    padding: 1.3rem 1.4rem;
  }

  .timeline-item {
    padding: 1rem 1.1rem 1.1rem 1.1rem;
  }

  .timeline-item::before {
    left: 30px;
    top: -20px;
    height: calc(100% + 40px);
  }

  .timeline-marker {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .transaction-meta {
    gap: 0.4rem;
  }

  .transaction-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .transaction-amount {
    font-size: 1.2rem;
  }

  .modal {
    padding: 0.5rem 0.25rem;
    align-items: flex-start;
    padding-top: max(env(safe-area-inset-top), 0.5rem);
    padding-bottom: max(env(safe-area-inset-bottom), 0.5rem);
  }

  .modal-content {
    margin: 1rem auto 2rem auto;
    width: calc(100vw - 1rem);
    max-width: 100%;
    padding: 1.5rem 1rem 3rem 1rem;
    transform: translateZ(0);
  }
  
  .form-row {
    margin-bottom: 0.8rem;
  }
  
  .form-input, 
  .form-row input:not(.custom-tip-input) {
    padding: 0.7rem 0.9rem;
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .tip-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .tip-button {
    min-height: 50px;
    padding: 0.6rem 0.3rem;
  }
  
  .tip-amount {
    font-size: 0.9rem;
  }
  
  .tip-label {
    font-size: 0.7rem;
  }
  
  .custom-tip-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.7rem;
  }
  
  .custom-tip-input {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 2.5rem 1.4rem 3.6rem;
  }

  .layout {
    margin-top: -58px;
  }

  .hero-event {
    font-size: clamp(2.3rem, 10vw, 3rem);
  }

  .balance-amount {
    font-size: clamp(2.3rem, 8vw, 2.6rem);
  }

  .timeline-item::before {
    left: 28px;
  }

  .transaction-location,
  .transaction-time,
  .transaction-reference {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
  }

  .transaction-meta {
    font-size: 0.7rem;
  }
}

.transactions-card {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
  position: relative;
  padding-left: 0.3rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.4rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 26, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 18px 35px rgba(17, 23, 42, 0.08);
  animation: fadeInUp 450ms ease forwards;
  opacity: 0;
  transform: translateY(12px);
  position: relative;
  overflow: hidden;
}

body[data-theme="dark"] .timeline-item {
  background: rgba(20, 22, 26, 0.82);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 36px;
  top: -28px;
  width: 2px;
  height: calc(100% + 56px);
  background: var(--timeline-line);
  z-index: 0;
}

.timeline-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.12), transparent 60%);
}

.timeline-item.tx-positive::after {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.18), transparent 65%);
}

.timeline-item.tx-negative::after {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.18), transparent 65%);
}

.timeline-item:first-child::before {
  top: 22px;
  height: calc(100% + 6px);
}

.timeline-item:last-child::before {
  height: 26px;
}

.timeline-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 50px rgba(17, 23, 42, 0.18);
}

.timeline-item:hover::after {
  opacity: 1;
}

.timeline-item:nth-child(even) {
  animation-delay: 80ms;
}

.timeline-item:nth-child(odd) {
  animation-delay: 140ms;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-marker {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  animation: markerPulse 1.8s ease-out forwards;
  transform: scale(0.9);
  position: relative;
  z-index: 2;
}

.timeline-marker.positive {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.95), rgba(46, 204, 113, 0.85));
}

.timeline-marker.negative {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.95), rgba(245, 101, 101, 0.85));
}

.transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.transaction-type-desc {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transaction-type {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--text-secondary);
}

.transaction-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(68, 68, 68, 0.08);
  color: var(--text-primary);
  width: fit-content;
}

.transaction-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.transaction-tag.tag-positive {
  background: rgba(39, 174, 96, 0.15);
  color: var(--color-green);
}

.transaction-tag.tag-negative {
  background: rgba(231, 76, 60, 0.15);
  color: var(--color-red);
}

.transaction-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.transaction-desc {
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 600;
  color: var(--text-primary);
}

.transaction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.transaction-location,
.transaction-time,
.transaction-reference {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(68, 68, 68, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
}

body[data-theme="dark"] .transaction-location,
body[data-theme="dark"] .transaction-time,
body[data-theme="dark"] .transaction-reference {
  background: rgba(255, 255, 255, 0.08);
}

.transaction-reference {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
}

.transaction-amount {
  font-family: 'Plus Jakarta Sans', 'Poppins', 'Inter', sans-serif;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-feature-settings: 'tnum' 1;
  white-space: nowrap;
}

.amount-positive {
  color: var(--color-green);
}

.amount-negative {
  color: var(--color-red);
}

.transaction-summary {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.placeholder {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 1.2rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(68, 68, 68, 0.18);
}

body[data-theme="dark"] .placeholder {
  background: rgba(20, 22, 26, 0.65);
  border-color: rgba(255, 255, 255, 0.1);
}

.app-footer {
  margin-top: auto;
  background: #f0f2f6;
  padding: 1.8rem clamp(1.5rem, 5vw, 5rem);
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-gray-700);
}

.app-footer span {
  font-weight: 700;
  color: var(--color-orange-500);
}

body[data-theme="dark"] .app-footer {
  background: #16181d;
  color: rgba(255, 255, 255, 0.65);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  min-width: 220px;
  max-width: 320px;
  padding: 1rem 1.2rem;
  border-radius: var(--border-radius-md);
  background: rgba(17, 17, 26, 0.85);
  color: #fff;
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 1200;
}

.toast.hidden {
  display: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.95), rgba(39, 174, 96, 0.75));
}

.toast.error {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.95), rgba(192, 57, 43, 0.78));
}

.toast.warning {
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.95), rgba(255, 179, 71, 0.85));
}

.toast.info {
  background: linear-gradient(135deg, rgba(41, 121, 255, 0.95), rgba(45, 152, 218, 0.85));
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 0.5rem;
  background: rgba(11, 13, 15, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1300;
  /* Permitir que el contenido se centre correctamente con scroll fluido */
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* Eliminar rebote en iOS */
  overscroll-behavior: contain;
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(620px, 92vw);
  margin: 2rem auto;
  border-radius: var(--border-radius-lg);
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  /* Sin restricciones de altura - scroll natural del modal padre */
  /* Mejorar rendimiento del contenido */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
}

.close-btn {
  border: none;
  background: rgba(68, 68, 68, 0.12);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.close-btn:hover {
  transform: rotate(6deg) scale(1.05);
  background: rgba(68, 68, 68, 0.2);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ===== ESTILOS MEJORADOS PARA MODAL DE RETIRO ===== */

.withdraw-step {
  display: block;
}

.withdraw-step.hidden {
  display: none;
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.withdrawal-costs {
  background: rgba(254, 242, 242, 0.95);
  border: 2px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #374151;
}

.cost-amount {
  color: #dc2626;
  font-weight: 700;
}

.cost-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.cost-note p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.6;
  font-weight: 500;
}

/* Paso 2 - Confirmación */
.confirmation-header {
  text-align: center;
  margin-bottom: 2rem;
}

.confirmation-header h4 {
  margin: 0 0 0.5rem;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
}

.confirmation-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.confirmation-data {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.confirmation-item:last-child {
  border-bottom: none;
}

.confirmation-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.confirmation-value {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.95rem;
}

.confirmation-totals {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  font-size: 0.95rem;
}

.total-line span:first-child {
  font-weight: 600;
  color: #374151;
}

.total-line.deduction {
  color: #374151;
}

.total-line.total {
  border-top: 2px solid rgba(229, 231, 235, 0.9);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  font-size: 1.1rem;
}

.total-line.total span:first-child {
  color: #1f2937;
  font-weight: 700;
}

.amount-positive {
  color: #059669;
  font-weight: 700;
}

.amount-negative {
  color: #dc2626;
  font-weight: 700;
}

.amount-final {
  color: #2563eb;
  font-weight: 800;
  font-size: 1.2rem;
}

/* Paso 3 - Éxito */
.success-content {
  text-align: center;
  padding: 1rem;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: successPulse 1.5s ease-in-out;
}

.success-content h4 {
  margin: 0 0 1rem;
  color: var(--color-green);
  font-size: 1.4rem;
  font-weight: 700;
}

.success-content > p {
  margin: 0 0 2rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.request-details {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item strong {
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
}

.request-id {
  font-family: 'Courier New', monospace;
  background: rgba(59, 130, 246, 0.15);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #1e40af;
  font-weight: 600;
}

.status-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-pending::before {
  content: "⏳";
  font-size: 0.9rem;
}

/* ===== SISTEMA DE FEEDBACK CON ESTRELLAS ===== */

.feedback-section {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 1.8rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feedback-section h5 {
  margin: 0 0 1.5rem;
  color: #1f2937;
  font-size: 1.15rem;
  font-weight: 600;
}

.rating-container {
  margin-bottom: 1.5rem;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.star-btn {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: all 200ms ease;
  padding: 0.2rem;
  border-radius: 4px;
}

.star-btn:hover {
  color: #fbbf24;
  transform: scale(1.1);
}

.star-btn.selected {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  transform: scale(1.1);
}

.star-btn.hover {
  color: #fbbf24;
  transform: scale(1.05);
}

.rating-text {
  display: block;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
}

.comment-section {
  text-align: left;
  margin: 1.5rem 0;
}

.feedback-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
}

.feedback-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(209, 213, 219, 0.8);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  transition: all 200ms ease;
  box-sizing: border-box;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
  background: rgba(255, 255, 255, 1);
}

.feedback-textarea::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.character-count {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.feedback-btn {
  background: linear-gradient(135deg, #16a34a, #059669);
  color: white;
  border: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
}

.feedback-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
}

/* ===== INFORMACIÓN DE ESTADO ===== */

.status-info {
  background: rgba(239, 246, 255, 0.95);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 1.2rem;
  margin: 2rem 0 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.status-text {
  margin: 0;
  color: #1e40af;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 500;
}

.status-text strong {
  color: #1e3a8a;
  font-weight: 700;
}

/* ===== ESTILOS TEMA OSCURO PARA PANTALLA DE ÉXITO ===== */

body[data-theme="dark"] .request-details {
  background: rgba(10, 15, 25, 0.98);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .detail-item {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body[data-theme="dark"] .detail-item strong {
  color: #e5e7eb;
}

body[data-theme="dark"] .request-id {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

body[data-theme="dark"] .status-pending {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

body[data-theme="dark"] .feedback-section {
  background: rgba(10, 15, 25, 0.98);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .feedback-section h5 {
  color: #f9fafb;
}

body[data-theme="dark"] .star-btn {
  color: #4b5563;
}

body[data-theme="dark"] .star-btn:hover {
  color: #fbbf24;
}

body[data-theme="dark"] .star-btn.selected {
  color: #f59e0b;
  transform: scale(1.1);
}

body[data-theme="dark"] .star-btn.hover {
  color: #fbbf24;
  transform: scale(1.05);
}

body[data-theme="dark"] .rating-text {
  color: #9ca3af;
}

body[data-theme="dark"] .feedback-label {
  color: #e5e7eb;
}

body[data-theme="dark"] .feedback-textarea {
  background: rgba(10, 15, 25, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f9fafb;
}

body[data-theme="dark"] .feedback-textarea:focus {
  background: rgba(10, 15, 25, 1);
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

body[data-theme="dark"] .feedback-textarea::placeholder {
  color: #6b7280;
}

body[data-theme="dark"] .character-count {
  color: #9ca3af;
}

body[data-theme="dark"] .status-info {
  background: rgba(15, 25, 35, 0.95);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

body[data-theme="dark"] .status-text {
  color: #93c5fd;
}

body[data-theme="dark"] .status-text strong {
  color: #dbeafe;
}

/* ===== HIGHLIGHT BOX PARA INFORMACIÓN DESTACADA ===== */

.highlight-box {
  margin: 1.5rem 0 !important;
  border: 2px solid #10b981 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05)) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2) !important;
  animation: gentle-pulse 3s ease-in-out infinite;
}

.highlight-box .status-text {
  font-size: 1.05rem !important;
  font-weight: 500 !important;
}

.highlight-box .status-text strong {
  color: #059669 !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
}

body[data-theme="dark"] .highlight-box {
  border-color: #10b981 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08)) !important;
}

body[data-theme="dark"] .highlight-box .status-text strong {
  color: #34d399 !important;
}

@keyframes gentle-pulse {
  0%, 100% { 
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    transform: scale(1.02);
  }
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.detected-text {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius-sm);
  padding: 0.8rem 1rem;
  border: 1px solid rgba(41, 121, 255, 0.3);
  color: var(--color-blue);
}

/* ===== ESTILOS MEJORADOS TEMA OSCURO PARA MODAL DE CONFIRMACIÓN ===== */

body[data-theme="dark"] .confirmation-data {
  background: rgba(30, 35, 45, 0.98);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"] .confirmation-item {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .confirmation-label {
  color: #f3f4f6;
  font-weight: 600;
}

body[data-theme="dark"] .confirmation-value {
  color: #ffffff;
  font-weight: 700;
}

body[data-theme="dark"] .confirmation-totals {
  background: rgba(30, 35, 45, 0.98);
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"] .total-line span:first-child {
  color: #e5e7eb;
  font-weight: 600;
}

body[data-theme="dark"] .total-line.deduction {
  color: #e5e7eb;
}

body[data-theme="dark"] .total-line.total {
  border-top-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .total-line.total span:first-child {
  color: #ffffff;
  font-weight: 700;
}

body[data-theme="dark"] .amount-positive {
  color: #10b981;
}

body[data-theme="dark"] .amount-negative {
  color: #ef4444;
}

body[data-theme="dark"] .amount-final {
  color: #60a5fa;
}

/* Estilos tema oscuro para sección de costos */
body[data-theme="dark"] .withdrawal-costs {
  background: rgba(20, 15, 15, 0.95);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .cost-item {
  color: #e5e7eb;
}

body[data-theme="dark"] .cost-amount {
  color: #f87171;
}

body[data-theme="dark"] .cost-note {
  border-top-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .cost-note p {
  color: #d1d5db;
}

/* ===== ESTILOS MEJORADOS PARA FORMULARIO DE RETIRO ===== */

/* Campos de entrada mejorados */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row .label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.form-input, 
.form-row input:not(.custom-tip-input) {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(203, 213, 225, 0.8);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 200ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.form-input:focus, 
.form-row input:not(.custom-tip-input):focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 1);
}

.form-input:hover, 
.form-row input:not(.custom-tip-input):hover {
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos para tema oscuro - MEJORADO CONTRASTE */
body[data-theme="dark"] .form-row .label {
  color: #e2e8f0;
}

body[data-theme="dark"] .form-input,
body[data-theme="dark"] .form-row input:not(.custom-tip-input) {
  background: rgba(15, 20, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .form-input:focus,
body[data-theme="dark"] .form-row input:not(.custom-tip-input):focus {
  background: rgba(15, 20, 30, 1);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

body[data-theme="dark"] .form-input:hover,
body[data-theme="dark"] .form-row input:not(.custom-tip-input):hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Sistema de propinas mejorado */
.tip-selection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tip-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.tip-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.4rem;
  border: 2px solid rgba(203, 213, 225, 0.8);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  min-height: 60px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tip-button:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.tip-button.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.tip-amount {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.tip-label {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.1rem;
  line-height: 1.1;
}

.tip-button.selected .tip-label {
  opacity: 0.95;
}

/* Campo personalizado de propina */
.custom-tip-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem;
  background: rgba(249, 250, 251, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--border-radius-sm);
}

.custom-tip-label {
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: 0.9rem;
}

.custom-tip-input {
  flex: 1;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  text-align: center;
  max-width: 100px;
  box-sizing: border-box;
}

.custom-tip-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  background: rgba(255, 255, 255, 1);
}

.tip-currency {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Estilos para tema oscuro en propinas - MEJORADO CONTRASTE */
body[data-theme="dark"] .tip-button {
  background: rgba(15, 20, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .tip-button:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

body[data-theme="dark"] .tip-button.selected {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body[data-theme="dark"] .custom-tip-row {
  background: rgba(15, 20, 30, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
}

body[data-theme="dark"] .custom-tip-label {
  color: #cbd5e1;
}

body[data-theme="dark"] .custom-tip-input {
  background: rgba(15, 20, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .custom-tip-input:focus {
  background: rgba(15, 20, 30, 1);
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  color: #ffffff;
}

body[data-theme="dark"] .tip-currency {
  color: #e2e8f0;
}

@media (max-width: 480px) {
  .modal {
    padding: 0.5rem 0.125rem;
    padding-top: max(env(safe-area-inset-top), 1rem);
    padding-bottom: max(env(safe-area-inset-bottom), 1rem);
  }

  .modal-content {
    margin: 0.5rem auto 1.5rem auto;
    width: calc(100vw - 0.5rem);
    padding: 1.25rem 0.75rem 2.5rem 0.75rem;
    transform: translateZ(0);
  }

  .form-row .label {
    font-size: 0.85rem;
  }
  
  .form-input, 
  .form-row input:not(.custom-tip-input) {
    padding: 0.65rem 0.8rem;
  }
  
  .tip-buttons {
    gap: 0.4rem;
  }
  
  .tip-button {
    min-height: 45px;
    padding: 0.5rem 0.2rem;
  }
}

/* Específico para iPhone - Modal optimizado */
@media screen and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
  .modal {
    padding: 0.75rem 0.25rem;
    align-items: flex-start;
    padding-top: max(env(safe-area-inset-top), 1.5rem);
    padding-bottom: max(env(safe-area-inset-bottom), 1.5rem);
  }

  .modal-content {
    margin: 0.5rem auto 1rem auto;
    padding: 1.5rem 1rem 3rem 1rem;
    min-height: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .modal-buttons {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
  }
}

/* Específico para iOS Safari - Renderizado optimizado */
@supports (-webkit-touch-callout: none) {
  .brand-logo {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    opacity: 1 !important;
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  #brand-logo-light,
  #brand-logo-dark {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    opacity: 1 !important;
  }
}

.system-banner{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:9999;max-width:880px;width:clamp(280px,92vw,880px);background:linear-gradient(135deg,rgba(249,115,22,0.92),rgba(255,142,53,0.92));color:#fff;font-weight:600;padding:.85rem 1.2rem;border-radius:0 0 18px 18px;box-shadow:0 16px 40px rgba(249,115,22,.45);display:flex;align-items:center;gap:.75rem;font-size:.9rem;letter-spacing:.3px;backdrop-filter:blur(14px)}
.system-banner.hidden{display:none}
.system-banner--warn{background:linear-gradient(135deg,rgba(234,179,8,.92),rgba(250,204,21,.92));color:#1f2937;box-shadow:0 16px 40px rgba(202,138,4,.45)}
.system-banner--error{background:linear-gradient(135deg,#dc2626,#ef4444);box-shadow:0 16px 40px rgba(239,68,68,.5)}
body[data-theme="dark"] .system-banner--warn{color:#0f172a}

/* ====================== KIOSK NFC MODE ====================== */
body.kiosk-mode{
  min-height:100vh;
}

body.kiosk-mode .page-shell{
  align-items:stretch;
}

body.kiosk-mode .hero-topbar{
  width:clamp(320px,85vw,640px);
}

body.kiosk-mode .topbar-actions{
  display:none;
}

.brand--static{
  cursor:default;
  pointer-events:none;
}

.kiosk-header-copy{
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:.4rem;
}

.hero-subtitle{
  margin:0;
  font-size:1rem;
  color:var(--text-secondary);
}

.kiosk-layout{
  width:min(960px,100%);
  margin-inline:auto;
}

.kiosk-panel{
  text-align:center;
}

.btn-xl{
  font-size:1.1rem;
  line-height:1.1;
  padding:.95rem 1.9rem;
  min-width:clamp(220px,55vw,320px);
  border-radius:999px;
}

.btn-active{
  box-shadow:0 0 0 2px rgba(37,99,235,.22) inset;
}

.is-loading{
  position:relative;
  pointer-events:none;
  opacity:.85;
}

.is-loading::after{
  content:'⏳';
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  font-size:1rem;
}

.kiosk-hint{
  margin-top:.85rem;
  font-size:.95rem;
  color:var(--muted);
}

.kiosk-status{
  margin-top:1.35rem;
  padding:1rem 1.25rem;
  border-radius:var(--border-radius-md);
  font-weight:600;
  transition:background .25s ease,color .25s ease;
}

.kiosk-status--info{
  background:rgba(37,99,235,.12);
  color:#1d4ed8;
}

.kiosk-status--success{
  background:rgba(22,163,74,.16);
  color:#15803d;
}

.kiosk-status--error{
  background:rgba(239,68,68,.16);
  color:#b91c1c;
}

body[data-theme="dark"] .kiosk-status--info{
  background:rgba(59,130,246,.2);
  color:#bfdbfe;
}

body[data-theme="dark"] .kiosk-status--success{
  background:rgba(34,197,94,.22);
  color:#bbf7d0;
}

body[data-theme="dark"] .kiosk-status--error{
  background:rgba(248,113,113,.22);
  color:#fecaca;
}

.kiosk-code{
  margin-top:1.6rem;
  font-size:1.05rem;
  display:inline-flex;
  align-items:baseline;
  gap:.5rem;
  color:var(--text);
}

.kiosk-code .label{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.82rem;
  color:var(--muted);
  font-weight:600;
}

.kiosk-code .value{
  font-family:'Plus Jakarta Sans','Inter',sans-serif;
  letter-spacing:.14em;
  font-size:1.2rem;
}

.kiosk-countdown{
  margin-top:1.5rem;
  font-size:.95rem;
  color:var(--muted);
}

.kiosk-hidden{
  display:none!important;
}

body.kiosk-loading .kiosk-status{
  animation:kioskPulse 1.2s ease-in-out infinite alternate;
}

@keyframes kioskPulse{
  from{
    transform:translateY(0);
    opacity:.9;
  }
  to{
    transform:translateY(-2px);
    opacity:1;
  }
}

body.kiosk-mode .glass-card:hover{
  transform:none;
}

body.kiosk-mode .glass-card::before{
  opacity:.7;
}

@media (max-width:768px){
  body.kiosk-mode .hero-topbar{
    width:min(92vw,560px);
  }

  .btn-xl{
    width:100%;
  }

  .kiosk-code{
    flex-direction:column;
    align-items:center;
  }
}

/* ==================== VENDOR DETAILS MODAL STYLES ==================== */

.orden-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.orden-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.orden-tipo {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-blue);
}

.orden-tipo.RECHARGE {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-green);
}

.orden-estado {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.orden-estado.COMPLETED {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
}

.orden-estado.PENDING {
  background: rgba(249, 115, 22, 0.15);
  color: var(--color-orange-500);
}

.orden-estado.CANCELLED {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
}

.orden-monto {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-left: auto;
}

.orden-productos {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 0.65rem;
  margin-top: 0.5rem;
}

body[data-theme="dark"] .orden-productos {
  background: rgba(255, 255, 255, 0.03);
}

.producto-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body[data-theme="dark"] .producto-item {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.producto-item:last-child {
  border-bottom: none;
}

.producto-item span:first-child {
  flex: 1;
  color: var(--text-secondary);
}

.producto-item span:nth-child(2) {
  font-weight: 600;
  color: var(--muted);
}

.producto-item span:last-child {
  font-weight: 700;
  color: var(--text-primary);
}

.orden-nfc {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
}

.orden-fecha {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

.transacciones-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tx-stat {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem;
  text-align: center;
}

.tx-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.tx-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.no-data {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.5rem;
  font-style: italic;
}

#modalOrdenesList, #modalTransacciones {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#modalOrdenesList::-webkit-scrollbar, #modalTransacciones::-webkit-scrollbar {
  width: 6px;
}

#modalOrdenesList::-webkit-scrollbar-track, #modalTransacciones::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

#modalOrdenesList::-webkit-scrollbar-thumb, #modalTransacciones::-webkit-scrollbar-thumb {
  background: var(--color-orange-400);
  border-radius: 3px;
}

body[data-theme="dark"] #modalOrdenesList::-webkit-scrollbar-track,
body[data-theme="dark"] #modalTransacciones::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.vendor-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.vendor-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

