@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Barlow+Condensed:wght@400;500;600;700&family=Ms+Madi&display=swap');

/* ─── Wings Army Design Tokens ─────────────────────── */
:root {
  --wa-cream:       #E4DFD5;
  --wa-cream-dark:  #C6B9A2;
  --wa-tan:         #C6B9A2;
  --wa-gold:        #988053;
  --wa-gold-dark:   #807050;
  --wa-olive-light: #7A7A56;
  --wa-olive:       #575728;
  --wa-dark:        #424A35;
  --wa-darker:      #333828;
  --wa-darkest:     #2B2D21;
  --wa-white:       #FFFFFF;
  --wa-black:       #000000;

  /* Semánticos */
  --color-bg:         var(--wa-cream);
  --color-surface:    var(--wa-white);
  --color-surface-2:  #F5F2ED;
  --color-border:     #D4CFC6;
  --color-text:       var(--wa-dark);
  --color-text-muted: var(--wa-olive-light);
  --color-primary:    var(--wa-darker);
  --color-primary-hover: var(--wa-darkest);
  --color-accent:     var(--wa-olive-light);
  --color-accent-hover: var(--wa-olive);

  /* Sidebar */
  --sidebar-bg:     var(--wa-darker);
  --sidebar-text:   var(--wa-cream);
  --sidebar-active: var(--wa-olive-light);
  --sidebar-hover:  rgba(228,223,213,0.08);
  --sidebar-width:  240px;

  /* Espaciado */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 3em;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(43,45,33,0.08);
  --shadow-md: 0 4px 16px rgba(43,45,33,0.10);
  --shadow-lg: 0 8px 32px rgba(43,45,33,0.14);
}

/* ─── Reset base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: none;
  height: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  min-height: 100dvh;
  overscroll-behavior-y: none;   /* evita el rebote que descoloca el bottom nav en iOS */
}

#root {
  min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  line-height: 1.2;
  font-weight: 600;
}

p { font-size: 1rem; font-weight: 400; line-height: 1.5; }

a { color: inherit; text-decoration: none; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

input, select, textarea {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-text);
}

/* ─── Utilidades tipográficas ───────────────────────── */
.font-barlow   { font-family: 'Barlow Condensed', sans-serif; }
.font-script   { font-family: 'Ms Madi', cursive; }
.text-muted    { color: var(--color-text-muted); }
.text-xs       { font-size: 0.75rem; }
.text-sm       { font-size: 0.875rem; }
.text-base     { font-size: 1rem; }
.text-lg       { font-size: 1.125rem; }
.text-xl       { font-size: 1.25rem; }
.text-2xl      { font-size: 1.5rem; }
.text-3xl      { font-size: 1.875rem; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.uppercase     { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }

/* ─── Botones ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55em 1.6em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background-color: var(--wa-darker);
  color: var(--wa-white);
  border-color: var(--wa-darker);
}
.btn-primary:hover {
  background-color: var(--wa-darkest);
  border-color: var(--wa-darkest);
}
.btn-outline {
  background-color: transparent;
  color: var(--wa-darker);
  border-color: var(--wa-darker);
}
.btn-outline:hover {
  background-color: var(--wa-darker);
  color: var(--wa-white);
}
.btn-ghost {
  background-color: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background-color: var(--sidebar-hover); }
.btn-sm { font-size: 0.875rem; padding: 0.4em 1.2em; }
.btn-lg { font-size: 1.125rem; padding: 0.65em 2em; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Inputs ────────────────────────────────────────── */
.input-field {
  width: 100%;
  background-color: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.4;
  padding: 0.65em 1em;
  transition: border-color 0.2s;
  outline: none;
}
.input-field:focus { border-color: var(--wa-olive-light); }
.input-field::placeholder { color: var(--wa-olive-light); opacity: 1; }
.input-field.error { border-color: #C0392B; }

.field-label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.field-error {
  font-size: 0.8rem;
  color: #C0392B;
  margin-top: 4px;
}

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card-compact { padding: 16px; }

/* ─── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}
.badge-olive   { background: rgba(122,122,86,0.12); color: var(--wa-olive); }
.badge-gold    { background: rgba(152,128,83,0.14); color: var(--wa-gold); }
.badge-green   { background: rgba(66,74,53,0.12); color: var(--wa-dark); }
.badge-muted   { background: rgba(198,185,162,0.3); color: var(--wa-gold-dark); }

/* ─── Divider ───────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 16px 0;
}

/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--wa-cream-dark); border-radius: 99px; }

/* ─── Animaciones ───────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.25s ease forwards; }
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* Logo */
.sidebar-logo {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
}
.sidebar-logo-img {
  width: 140px;
  display: block;
  /* Logo es para fondos claros — invertir para el sidebar oscuro */
  filter: brightness(0) invert(1) opacity(0.85);
}
.sidebar-logo-sub {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--wa-olive-light);
  margin-top: 8px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: rgba(228,223,213,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
}
.sidebar-nav-item:hover {
  background-color: var(--sidebar-hover);
  color: var(--wa-cream);
}
.sidebar-nav-item.active {
  background-color: rgba(122,122,86,0.22);
  color: var(--wa-cream);
}
.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--wa-olive-light);
  border-radius: 0 3px 3px 0;
}
.sidebar-nav-arrow {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.18s;
}
.sidebar-nav-item:hover .sidebar-nav-arrow,
.sidebar-nav-item.active .sidebar-nav-arrow {
  opacity: 0.5;
}

/* Footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.sidebar-admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--wa-olive-light);
  color: var(--wa-cream);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-admin-meta { min-width: 0; }
.sidebar-admin-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wa-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-admin-role {
  font-size: 0.7rem;
  color: var(--wa-olive-light);
  letter-spacing: 0.08em;
}
.sidebar-logout {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(228,223,213,0.45);
  transition: all 0.18s;
  flex-shrink: 0;
}
.sidebar-logout:hover {
  background: rgba(255,255,255,0.08);
  color: var(--wa-cream);
}
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--color-bg);
}
.admin-content {
  padding: 32px 36px;
  max-width: 1280px;
}

/* Page header reutilizable */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wa-darkest);
  line-height: 1.2;
}
.page-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

/* Toast flotante global */
.wa-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.wa-toast.success { background: #dcfce7; color: #166534; }
.wa-toast.error   { background: #fee2e2; color: #dc2626; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wa-darkest);
  line-height: 1;
}
.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(122,122,86,0.1);
  color: var(--wa-olive-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
/* ── Bottom Nav — Liquid Glass Wings Army ── */
.client-bottom-nav {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom, 0px), 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 568px;          /* mismo ancho máximo que el layout */
}

.client-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(51, 56, 40, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(228, 223, 213, 0.15);
  border-radius: 999px;
  padding: 8px 6px;
  box-shadow:
    0 8px 32px rgba(43, 45, 33, 0.35),
    0 2px 8px rgba(43, 45, 33, 0.2),
    inset 0 1px 0 rgba(228, 223, 213, 0.1);
}

.client-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s;
  min-width: 0;
}

.client-nav-pill {
  position: absolute;
  inset: 0;
  background: rgba(228, 223, 213, 0.14);
  border-radius: 999px;
  border: 1px solid rgba(228, 223, 213, 0.1);
}

.client-nav-icon-svg {
  color: rgba(228, 223, 213, 0.5);
  position: relative; z-index: 1;
  transition: color 0.2s;
}
.client-nav-item.active .client-nav-icon-svg {
  color: var(--wa-cream);
}

/* Quitar focus outline azul del navegador */
.client-nav-item:focus,
.client-nav-item:focus-visible {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Botón central QR */
.client-nav-qr-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  border-radius: 999px;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.client-nav-qr-btn svg {
  color: rgba(228, 223, 213, 0.5);
}
.client-nav-qr-btn .client-nav-label {
  color: rgba(228, 223, 213, 0.5);
}

.client-nav-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgba(228, 223, 213, 0.5);
  position: relative;
  z-index: 1;
  transition: color 0.2s;
  white-space: nowrap;
}

.client-nav-item.active .client-nav-label {
  color: var(--wa-cream);
}
.client-layout {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--wa-cream);
  display: flex;
  flex-direction: column;
}

/* ── Topbar ── */
.client-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 14px;
  background: var(--wa-cream);
  border-bottom: 1px solid rgba(122,122,86,0.12);
  position: sticky;
  top: 0;
  z-index: 50;
}

.client-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-topbar-logo {
  height: 22px;
  filter: brightness(0) saturate(100%) invert(28%) sepia(10%) saturate(800%) hue-rotate(60deg) brightness(80%);
  opacity: 0.7;
}

.client-topbar-name {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.client-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(122,122,86,0.1);
  color: var(--color-text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.client-logout-btn:hover {
  background: rgba(122,122,86,0.2);
  color: var(--wa-dark);
}

/* ── Contenido de las páginas ── */
.client-content {
  flex: 1;
  width: 100%;
  max-width: 600px;          /* crece hasta 600px en tablet/desktop */
  margin: 0 auto;            /* centrado horizontal */
  padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 100px), 108px);
}

/* Todas las páginas del cliente heredan el ancho del layout */
.card-page,
.benefits-page,
.activity-page,
.notif-client-page {
  width: 100%;
  box-sizing: border-box;
}
.login-page {
  display: flex;
  min-height: 100vh;
}

/* Panel izquierdo */
.login-panel-left {
  flex: 1;
  background-color: var(--wa-darker);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(122,122,86,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(152,128,83,0.15) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 60px 56px;
  position: relative;
  overflow: hidden;
}
.login-panel-left::before { display: none; }

.login-icon-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-icon-star {
  position: absolute;
  border-radius: 20%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
.login-panel-content {
  position: relative;
  z-index: 2;
  max-width: 420px;
}
.login-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43,45,33,0.6) 0%, transparent 60%);
  pointer-events: none;
}
.login-panel-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--wa-olive-light);
  margin-bottom: 16px;
}
.login-panel-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--wa-cream);
  line-height: 1.1;
  margin-bottom: 16px;
}
.login-panel-desc {
  font-size: 0.9375rem;
  color: rgba(228,223,213,0.55);
  line-height: 1.6;
}

/* Panel derecho */
.login-panel-right {
  width: 460px;
  flex-shrink: 0;
  background: var(--wa-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 48px;
  border-left: 1px solid var(--color-border);
}
.login-form-wrap {
  width: 100%;
  max-width: 340px;
}

/* Logo */
.login-logo-wrap {
  margin-bottom: 36px;
}
.login-logo {
  width: 160px;
  display: block;
}

/* Header */
.login-header { margin-bottom: 28px; }
.login-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--wa-darkest);
  margin-bottom: 6px;
}
.login-subtitle { font-size: 0.875rem; }

/* Formulario */
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-field { display: flex; flex-direction: column; }

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wa-olive-light);
  pointer-events: none;
}
.input-with-icon { padding-left: 40px; }

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #C0392B;
  font-size: 0.875rem;
}

.login-submit { width: 100%; justify-content: center; margin-top: 4px; }

.login-footer-note {
  text-align: center;
  margin-top: 32px;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .login-panel-left { display: none; }
  .login-panel-right { width: 100%; padding: 40px 28px; }
}
/* ── AdminDashboard ── */
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .dashboard-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .dashboard-metrics { grid-template-columns: 1fr; } }

.dashboard-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
}
.dashboard-metric-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.dashboard-metric--olive .dashboard-metric-icon { background: rgba(122,122,86,0.12); color: var(--wa-olive-light); }
.dashboard-metric--gold  .dashboard-metric-icon { background: rgba(152,128,83,0.12); color: var(--wa-gold); }
.dashboard-metric--dark  .dashboard-metric-icon { background: rgba(43,45,33,0.08);   color: var(--wa-darker); }

.dashboard-metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wa-darkest);
  line-height: 1;
}
.dashboard-metric-label { font-size: 0.8125rem; font-weight: 600; color: var(--wa-darkest); }

/* Bottom grid */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 780px) { .dashboard-bottom { grid-template-columns: 1fr; } }

.dashboard-chart, .dashboard-top { padding: 20px; }

.dashboard-section-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px; color: var(--wa-darkest);
}
.dashboard-section-title { font-size: 0.9rem; font-weight: 600; }

/* Barras */
.dashboard-bars {
  display: flex; align-items: flex-end; gap: 8px;
  height: 120px;
}
.dashboard-bar-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; height: 100%;
}
.dashboard-bar-value { font-size: 0.65rem; color: var(--color-text-muted); font-weight: 600; }
.dashboard-bar-track {
  flex: 1; width: 100%;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  display: flex; align-items: flex-end; overflow: hidden;
}
.dashboard-bar-fill {
  width: 100%;
  background: linear-gradient(to top, var(--wa-olive-light), rgba(122,122,86,0.5));
  border-radius: var(--radius-sm);
  min-height: 4px;
  transition: height 0.6s ease;
}
.dashboard-bar-label { font-size: 0.6rem; color: var(--color-text-muted); text-align: center; }

/* Top clientes */
.dashboard-top-list { display: flex; flex-direction: column; gap: 2px; }
.dashboard-top-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.dashboard-top-row:last-child { border-bottom: none; }
.dashboard-top-rank { width: 20px; text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted); }
.dashboard-top-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--wa-darker); color: var(--wa-cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.dashboard-top-info { flex: 1; min-width: 0; }
.dashboard-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.dashboard-top-medals { font-size: 0.8rem; font-weight: 600; color: var(--wa-darkest); }
.scan-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 860px;
  align-items: stretch;
}
@media (max-width: 700px) {
  .scan-layout { grid-template-columns: 1fr; }
}

.scan-card, .scan-manual-card {
  display: flex;
  flex-direction: column;
}

/* Header de cada panel */
.scan-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--wa-darkest);
}
.scan-card-title { font-size: 1rem; font-weight: 600; }

/* ── Viewport de la cámara ── */
.scan-viewport-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--wa-darkest);
  /* Aspecto cuadrado */
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
}
.scan-viewport-wrap.hidden { display: none; }
.scan-viewport-wrap.active { display: block; }

/* El video del lib ocupa todo el contenedor */
.scan-viewport {
  width: 100%;
  height: 100%;
}
#wa-qr-reader {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}
#wa-qr-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: var(--radius-md) !important;
}
/* Ocultar todo lo que renderiza el lib (botones, selects, textos) */
#wa-qr-reader > img,
#wa-qr-reader > div:not([id*="shaded"]) {
  display: none !important;
}
#wa-qr-reader__dashboard,
#wa-qr-reader__header_message,
#wa-qr-reader__status_span,
#wa-qr-reader__camera_selection,
#wa-qr-reader__camera_permission_button {
  display: none !important;
}

/* Overlay con marco de escaneo */
.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scan-frame {
  width: 200px;
  height: 200px;
  position: relative;
}
/* Cuatro esquinas del marco */
.scan-frame::before,
.scan-frame::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--wa-olive-light);
  border-style: solid;
}
.scan-frame::before {
  top: 0; left: 0;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}
.scan-frame::after {
  bottom: 0; right: 0;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}
/* Esquinas restantes vía pseudo-elements en wrapper adicional */
.scan-frame > span {
  display: block;
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--wa-olive-light);
  border-style: solid;
}
/* línea de escaneo animada */
@keyframes scan-line {
  0%   { top: 10%; }
  100% { top: 90%; }
}

/* Estado idle */
.scan-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 0;
  text-align: center;
}
.scan-idle-icon {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  background: rgba(122,122,86,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wa-olive-light);
}

.scan-stop {
  align-self: center;
  margin-top: 4px;
}

.scan-error {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #C0392B;
  font-size: 0.875rem;
  text-align: center;
  width: 100%;
}

/* ── Panel manual ── */
.scan-manual-card { gap: 0; }
.scan-manual-desc { margin-bottom: 20px; }
.scan-manual-form { display: flex; flex-direction: column; gap: 12px; }
.scan-manual-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--color-text-muted);
}

/* Inputs con icono — compartidos */
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--wa-olive-light); pointer-events: none;
}
.input-with-icon { padding-left: 40px; }
.customers-search-wrap { margin-bottom: 16px; }

.customers-card { padding: 0; overflow: hidden; }

.customers-loading, .customers-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 48px;
  color: var(--color-text-muted);
}

/* Tabla */
.customers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.customers-table thead tr {
  border-bottom: 1px solid var(--color-border);
}
.customers-table th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}
.customers-row {
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.15s;
}
.customers-row:last-child { border-bottom: none; }
.customers-row:hover { background: var(--color-surface-2); }
.customers-row td { padding: 14px 16px; }

.customer-name-cell { display: flex; align-items: center; gap: 10px; }
.customer-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(122,122,86,0.12);
  color: var(--wa-olive-light);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.customer-points-cell {
  display: flex; align-items: center; gap: 4px;
  color: var(--wa-dark);
}

/* Pagination */
.customers-pagination {
  display: flex; align-items: center;
  justify-content: center; gap: 16px;
  margin-top: 16px;
}

/* Reutiliza input icon */
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--wa-olive-light); pointer-events: none;
}
.input-with-icon { padding-left: 40px; }
.card-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--wa-olive-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.redeem-modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  min-height: 100vh;
  background: rgba(43, 45, 33, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.redeem-modal {
  position: relative;
  z-index: 201;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 24px;
  width: 100%;
  max-width: 420px;
}

.redeem-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  transition: background 0.2s;
}
.redeem-modal-close:hover { background: var(--color-surface-2); }

.redeem-modal-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(152, 128, 83, 0.1);
  color: var(--wa-gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

.redeem-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wa-darkest);
  text-align: center;
  margin-bottom: 10px;
}

.redeem-modal-body {
  font-size: 0.9375rem;
  color: var(--color-text);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 16px;
}

.redeem-modal-warning {
  background: rgba(152, 128, 83, 0.08);
  border: 1px solid rgba(152, 128, 83, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 24px;
  color: var(--wa-darkest);
}

.redeem-modal-actions {
  display: flex;
  gap: 10px;
}
.redeem-modal-btn-cancel { flex: 1; justify-content: center; }
.redeem-modal-btn-confirm { flex: 2; justify-content: center; }
.detail-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
}
.card-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--wa-olive-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.detail-back { margin-bottom: 4px; padding-left: 0; }

/* Feedback */
.detail-feedback {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.detail-feedback--success {
  background: rgba(66,74,53,0.1);
  border: 1px solid rgba(66,74,53,0.25);
  color: var(--wa-dark);
}
.detail-feedback--error {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  color: #C0392B;
}

/* Grid principal — dos columnas full width */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* Columnas */
.detail-col-left  { display: flex; flex-direction: column; gap: 16px; }
.detail-col-right { display: flex; flex-direction: column; gap: 16px; }

/* Fila superior y bottom row — legacy, ya no se usan */
.detail-top-row,
.detail-bottom-row {
  display: contents; /* invisibles, los hijos van directo al grid */
}


/* Tarjeta de puntos */
.detail-points-card {
  background: var(--wa-darker);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  color: var(--wa-cream);
  position: relative;
  overflow: hidden;
  width: 100%;
}
.detail-points-bg-text {
  position: absolute;
  right: -12px; bottom: -8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 6rem; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.detail-points-header {
  display: flex; gap: 16px; margin-bottom: 24px;
}
.detail-points-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.875rem;
  color: rgba(228,223,213,0.5);
}
.detail-points-value {
  display: flex; align-items: baseline; gap: 10px;
}
.detail-points-star { color: var(--wa-gold); margin-bottom: -2px; }
.detail-points-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 5rem; font-weight: 700; line-height: 1;
}
.detail-points-label {
  font-size: 0.875rem; letter-spacing: 0.1em;
  color: rgba(228,223,213,0.5);
}

/* QR card */
.detail-qr-card { display: flex; flex-direction: column; align-items: center; gap: 0; }

/* Add points */
.detail-add-points { display: flex; flex-direction: column; gap: 12px; }
.detail-points-selector {
  display: flex; align-items: center; gap: 16px;
}
.detail-points-num-sm {
  font-size: 2rem; font-weight: 700;
  color: var(--wa-darkest);
  min-width: 48px; text-align: center;
}

/* Rewards list */
.detail-rewards-list { display: flex; flex-direction: column; gap: 8px; }
.detail-reward-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  text-align: left;
  transition: all 0.18s;
  width: 100%;
  background: transparent;
  cursor: pointer;
}
.detail-reward-item.can-redeem:hover,
.detail-reward-item.selected {
  border-color: var(--wa-olive-light);
  background: rgba(122,122,86,0.06);
}
.detail-reward-item.cannot-redeem { opacity: 0.5; cursor: not-allowed; }
.detail-reward-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.detail-reward-name { font-size: 0.9rem; font-weight: 600; color: var(--wa-darkest); }
.detail-reward-arrow { color: var(--wa-olive-light); flex-shrink: 0; }

/* History */
.detail-history { display: flex; flex-direction: column; }
.detail-history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.detail-history-item:last-child { border-bottom: none; }
.detail-history-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.detail-history-note { color: var(--wa-darkest); font-weight: 500; }
.detail-history-pts {
  font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}
.detail-history-pts.earn { color: var(--wa-dark); }
.detail-history-pts.redeem { color: var(--wa-gold); }

/* Nombre del cliente dentro de la tarjeta */
.detail-card-name {
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: #f0ece5;
  margin-bottom: 2px;
}
.detail-card-contact {
  color: rgba(228, 223, 213, 0.55);
  margin-bottom: 16px;
}


.detail-points-card--sargento {
  background: linear-gradient(135deg, #1a1608 0%, #2B2410 35%, #3D3218 60%, #1a1608 100%);
  box-shadow:
    0 8px 32px rgba(152,128,83,0.25),
    0 2px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(228,217,19,0.08);
}
.detail-points-card--sargento::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(152,128,83,0.35);
  pointer-events: none;
}
.detail-points-card--sargento .detail-points-bg-text {
  color: rgba(152,128,83,0.07);
}
.detail-points-card--sargento .detail-points-num {
  color: #f5e6c8;
  text-shadow: 0 0 20px rgba(152,128,83,0.25);
}
.detail-points-card--sargento .detail-points-label { color: rgba(245,230,200,0.6); }
.detail-points-card--sargento .detail-points-meta  { color: rgba(245,230,200,0.65); }
.detail-points-card--sargento .detail-card-name    { color: #f5e6c8; }
.detail-points-card--sargento .detail-card-contact { color: rgba(245,230,200,0.5); }
.detail-points-card--sargento .detail-spent        { color: rgba(245,230,200,0.5); }
.detail-points-card--sargento .detail-medal-icon {
  filter: drop-shadow(0 0 6px rgba(152,128,83,0.4));
}
.detail-total-medals {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(228,223,213,0.4);
  margin-top: 4px;
  margin-bottom: 2px;
}
.detail-points-card--sargento .detail-total-medals { color: rgba(245,230,200,0.4); }
.detail-spent {
  font-size: 0.75rem; letter-spacing: 0.04em;
  color: rgba(228,223,213,0.45);
  margin-top: 12px;
}
.detail-purchase-form { display: flex; flex-direction: column; gap: 12px; }
.detail-medals-preview { margin-top: -4px; }
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--wa-olive-light); pointer-events: none;
}
/* Tabs de canje */
.detail-redeem-tabs {
  display: flex;
  gap: 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 14px;
}
.detail-redeem-tab {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.detail-redeem-tab.active { color: var(--wa-darkest); }
.detail-redeem-tab-indicator {
  position: absolute;
  inset: 0;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  z-index: -1;
}

.scan-card-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; color: var(--wa-darkest);
}
.scan-card-title { font-size: 1rem; font-weight: 600; }

/* ── AdminRewards ── */
.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.rewards-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  transition: opacity 0.2s;
}
.rewards-item--inactive { opacity: 0.55; }

.rewards-item-info { flex: 1; min-width: 0; }
.rewards-item-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.rewards-item-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--wa-darkest);
}
.rewards-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rewards-item-desc { line-height: 1.45; }

.rewards-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Toast */
.rewards-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 12px;
  max-width: 400px;
}
.rewards-toast.success { background: #dcfce7; color: #166534; }
.rewards-toast.error   { background: #fee2e2; color: #dc2626; }

/* ── Modal compartido wa-modal ── */
.wa-modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  min-height: 100vh;
  background: rgba(43, 45, 33, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
}
.wa-modal-wrap {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  min-height: 100vh;
  z-index: 501;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
}
.wa-modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  pointer-events: all;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}
.wa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border);
}
.wa-modal-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--wa-darkest);
}
.wa-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wa-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
}

/* Form helpers */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.8125rem; font-weight: 600; color: var(--wa-darkest); letter-spacing: 0.02em; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
}
.form-checkbox input { width: 16px; height: 16px; accent-color: var(--wa-olive-light); cursor: pointer; }

/* Tabs animados */
.rewards-tabs {
  display: flex;
  gap: 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
  margin-bottom: 16px;
}
.rewards-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.rewards-tab.active { color: var(--wa-darkest); }
.rewards-tab-indicator {
  position: absolute;
  inset: 0;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  z-index: -1;
}
.rewards-tab-content {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

/* Empty state */
.rewards-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}

/* Badges */
.rewards-badge-type    { background: var(--color-surface-2); color: var(--color-text-muted); }
.rewards-badge-inactive { background: #fee2e2; color: #dc2626; }
.rewards-toggle-on     { color: var(--wa-olive-light); }

/* Btn icon danger */
.btn-icon--danger:hover { color: #dc2626 !important; }

/* ── AdminLevels ── */
.levels-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

/* Acordeón */
.levels-accordion {
  border-radius: 0;
}
.levels-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wa-darkest);
  text-align: left;
}
.levels-accordion-title {
  font-size: 0.9375rem;
  font-weight: 600;
}
.levels-accordion-body {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Input con prefijo */
.input-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.input-with-prefix { padding-left: 28px; }

/* Hint bajo input */
.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Emoji picker */
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emoji-option {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.emoji-option:hover { background: var(--color-border); }
.emoji-option.selected {
  border-color: var(--wa-olive-light);
  background: rgba(122,122,86,0.12);
}
/* ── AdminQR ── */
.admin-qr-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.admin-qr-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 820px) {
  .admin-qr-layout { grid-template-columns: 1fr; }
}

/* Preview wrap */
.admin-qr-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.admin-qr-preview-label {
  letter-spacing: 0.06em;
}

/* ── La tarjeta imprimible ── */
.admin-qr-card {
  width: 340px;
  background: var(--wa-darker);
  border-radius: 20px;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(43,45,33,0.25);
}

/* Patrón decorativo de fondo */
.admin-qr-card-bg {
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(228,223,213,0.06)' stroke-width='1.5'%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(228,223,213,0.04)' stroke-width='1.5'%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26'/%3E%3C/svg%3E");
  background-size: 200px 200px, 90px 90px;
  background-position: -60px -60px, 85% 90%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.admin-qr-card-header {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.admin-qr-card-logo {
  height: 36px;
  filter: brightness(0) invert(1) opacity(0.9);
}

.admin-qr-card-tagline {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f0ece5;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 18px;
}

.admin-qr-card-qr {
  background: var(--wa-cream);
  border-radius: 14px;
  padding: 8px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.admin-qr-card-instruction {
  font-size: 0.78rem;
  color: rgba(228,223,213,0.65);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 8px;
}

.admin-qr-card-url {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: rgba(228,223,213,0.35);
  text-align: center;
  margin-bottom: 16px;
  word-break: break-all;
}

.admin-qr-card-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.admin-qr-card-footer-line {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.admin-qr-card-footer-text {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(228,223,213,0.4);
}

/* ── Info lateral ── */
.admin-qr-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--wa-darkest);
}
.admin-qr-info-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-qr-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.admin-qr-step-num {
  min-width: 28px; height: 28px;
  background: var(--wa-darker);
  color: var(--wa-cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
}
.admin-qr-step-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--wa-darkest);
  margin-bottom: 3px;
}
.admin-qr-step-desc {
  line-height: 1.5;
  word-break: break-all;
}

/* ── Print styles ── */
@media print {
  /* Ocultar todo excepto la tarjeta */
  body * { visibility: hidden !important; }
  #wa-print-card, #wa-print-card * {
    visibility: visible !important;
  }
  #wa-print-card {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 340px !important;
    box-shadow: none !important;
    border-radius: 16px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  @page {
    size: A4;
    margin: 0;
  }
}
/* ── AdminNotifications ── */
.notif-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 780px) { .notif-layout { grid-template-columns: 1fr; } }

.notif-compose, .notif-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}
.notif-compose-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--wa-darkest);
  margin-bottom: 4px;
}
.notif-compose-title { font-size: 0.9375rem; font-weight: 600; }

/* Segmentos */
.notif-segments {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-segment-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--wa-darkest);
}
.notif-segment-btn:hover { background: var(--color-surface-2); }
.notif-segment-btn.active {
  border-color: var(--wa-olive-light);
  background: rgba(122,122,86,0.06);
}
.notif-segment-label { font-size: 0.875rem; font-weight: 600; }
.notif-segment-desc  { margin-top: 1px; }

/* Textarea */
.notif-textarea { resize: vertical; }
.notif-char-count { text-align: right; margin-top: 2px; }

/* Preview */
.notif-preview {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.notif-preview-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.notif-preview-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: white;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.notif-preview-icon { font-size: 1.2rem; flex-shrink: 0; }
.notif-preview-title { font-size: 0.8125rem; font-weight: 600; color: #111; }
.notif-preview-body  { margin-top: 2px; line-height: 1.4; color: #555; }

/* Send btn */
.notif-send-btn { width: 100%; justify-content: center; margin-top: 4px; }

/* Historial */
.notif-history-list { display: flex; flex-direction: column; }
.notif-history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notif-history-item:last-child { border-bottom: none; }
.notif-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notif-history-title { font-size: 0.875rem; color: var(--wa-darkest); }
.notif-history-body  { line-height: 1.45; }
.notif-history-meta  { display: flex; gap: 6px; align-items: center; }
.install-page {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow: hidden;
}

/* Fondo estático con gradiente Wings Army oscuro */
.install-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(122,122,86,0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(152,128,83,0.2) 0%, transparent 55%),
    linear-gradient(160deg, #1a1c14 0%, #2B2D21 40%, #333828 70%, #1a1c14 100%);
}

/* Partículas */
.install-particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(228, 223, 213, 0.25);
  pointer-events: none;
}

/* Tarjeta central */
.install-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

/* Logo */
.install-logo-wrap {
  width: 140px; height: 140px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(228,223,213,0.15),
    0 16px 48px rgba(0,0,0,0.4),
    0 4px 16px rgba(152,128,83,0.2);
}
.install-logo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 32px;
}

/* Título */
.install-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wa-cream);
  line-height: 1.15;
  margin-bottom: 10px;
}
.install-subtitle {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(228,223,213,0.65);
  max-width: 300px;
  margin: 0 auto;
}

/* Features */
.install-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  background: rgba(228,223,213,0.06);
  border: 1px solid rgba(228,223,213,0.1);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-align: left;
}
.install-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.install-feature-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.install-feature-row p { color: rgba(228,223,213,0.8); line-height: 1.45; }

/* Acciones */
.install-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.install-cta {
  width: 100%;
  justify-content: center;
  background: var(--wa-cream);
  color: var(--wa-darkest);
  border-color: var(--wa-cream);
  font-size: 1.05rem;
}
.install-cta:hover {
  background: rgba(228,223,213,0.9);
  border-color: rgba(228,223,213,0.9);
  color: var(--wa-darkest);
}
.install-skip {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(228,223,213,0.4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}
.install-skip:hover { color: rgba(228,223,213,0.7); }

/* Guía iOS */
.install-back {
  align-self: flex-start;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(228,223,213,0.5);
  background: none; border: none; cursor: pointer; padding: 0;
}
.install-guide-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wa-cream);
  line-height: 1.25;
}
.install-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  text-align: left;
}
.install-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(228,223,213,0.06);
  border: 1px solid rgba(228,223,213,0.1);
  border-radius: 0;
}
.install-step:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.install-step:last-child  { border-radius: 0 0 var(--radius-md) var(--radius-md); border-top: none; }
.install-step + .install-step { border-top: none; }

.install-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--wa-olive-light);
  color: var(--wa-cream);
  font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.install-step-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 28px; text-align: center;
}
.install-step-title { color: var(--wa-cream); }
.install-step-desc  { color: rgba(228,223,213,0.5); margin-top: 2px; }

/* Flecha Safari */
.install-safari-arrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(228,223,213,0.5);
}

/* Success */
.install-success {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.install-success-icon { font-size: 4rem; }
.install-success-text {
  font-size: 1.1rem; letter-spacing: 0.1em;
  color: var(--wa-cream);
}
.register-page {
  min-height: 100vh;
  background-color: var(--wa-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.register-card {
  background: var(--wa-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
}

/* Header */
.register-header { text-align: center; margin-bottom: 24px; }
.register-logo { width: 140px; margin: 0 auto 20px; display: block; }
.register-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wa-darkest);
  line-height: 1.25;
  margin-bottom: 10px;
}
.register-subtitle { font-size: 0.875rem; line-height: 1.55; }

/* Perks */
.register-perks {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-bottom: 20px;
}
.register-perk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.register-perk-icon { font-size: 1.4rem; }
.register-perk-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  line-height: 1.2;
}

/* Formulario */
.register-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.register-field { display: flex; flex-direction: column; }

/* Reutiliza .input-icon-wrap, .input-icon, .input-with-icon de index.css */
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wa-olive-light);
  pointer-events: none;
}
.input-with-icon { padding-left: 40px; }

.register-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #C0392B;
  font-size: 0.875rem;
}

.register-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.register-footer {
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
}

.register-lookup-link {
  text-align: center;
  margin-top: 16px;
}
.register-lookup-link a {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border-radius: 3em;
  border: 1.5px solid var(--wa-olive-light);
  color: var(--wa-dark);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.register-lookup-link a:hover {
  background: var(--wa-olive-light);
  color: #fff;
}

@media (max-width: 400px) {
  .register-card { padding: 28px 20px 24px; }
  .register-title { font-size: 1.3rem; }
}
.benefits-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0;
  gap: 16px;
}


/* Loading */
.benefits-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}
.benefits-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--wa-olive-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Header */
.benefits-header { text-align: center; }
.benefits-title { font-size: 1.5rem; font-weight: 700; color: var(--wa-darkest); }
.benefits-sub { margin-top: 4px; }

/* ── Tarjeta de rango — misma familia que loyalty-card ── */
.benefits-rank-card {
  width: 100%; max-width: 100%;
  background: var(--wa-darker);
  border-radius: 20px;
  padding: 24px 24px 20px;
  color: var(--wa-cream);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.benefits-rank-card--sargento {
  background: linear-gradient(135deg, #1a1608 0%, #2B2410 35%, #3D3218 60%, #1a1608 100%);
  box-shadow: 0 8px 32px rgba(152,128,83,0.25), 0 2px 8px rgba(0,0,0,0.4);
}
.benefits-rank-card--sargento::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 20px;
  border: 1.5px solid rgba(152,128,83,0.35);
  pointer-events: none;
}

/* Texto decorativo */
.benefits-rank-bg {
  position: absolute; right: -12px; bottom: -8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 4rem; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.04);
  pointer-events: none; user-select: none; white-space: nowrap;
}

.benefits-rank-top {
  display: flex; align-items: flex-start; gap: 14px;
}
.benefits-rank-emoji { font-size: 2.2rem; flex-shrink: 0; line-height: 1; }
.benefits-rank-name {
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--wa-cream);
}
.benefits-rank-desc {
  font-size: 0.8rem;
  color: rgba(228,223,213,0.55);
  line-height: 1.4;
  margin-top: 3px;
}

/* Tasa */
.benefits-rate-row { display: flex; flex-direction: column; gap: 6px; }
.benefits-rate-pill {
  display: inline-flex; align-items: center;
  background: rgba(228,223,213,0.08);
  border: 1px solid rgba(228,223,213,0.12);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.8rem; font-weight: 700;
  color: var(--wa-cream);
  align-self: flex-start;
}
.benefits-rank-card--sargento .benefits-rate-pill {
  background: rgba(152,128,83,0.15);
  border-color: rgba(152,128,83,0.3);
  color: var(--wa-gold);
}
.benefits-rate-hint {
  font-size: 0.75rem;
  color: rgba(228,223,213,0.45);
  padding-left: 4px;
}

/* Progreso hacia Sargento */
.benefits-progress-row { display: flex; flex-direction: column; gap: 6px; }
.benefits-progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px; overflow: hidden;
}
.benefits-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wa-olive-light), var(--wa-cream));
  border-radius: 999px;
}
.benefits-progress-label {
  font-size: 0.72rem;
  color: rgba(228,223,213,0.5);
}

/* Aviso de mantenimiento */
.benefits-warn-row {
  font-size: 0.75rem;
  color: rgba(228, 150, 83, 0.8);
  background: rgba(152,128,83,0.1);
  border: 1px solid rgba(152,128,83,0.2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  line-height: 1.4;
}

/* ── Secciones de recompensas ── */
.benefits-section {
  width: 100%; max-width: 100%;
}
.benefits-section-title {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.benefits-empty {
  background: var(--wa-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

/* Grid de recompensas */
.benefits-rewards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefits-reward-tile {
  background: var(--wa-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  transition: border-color 0.2s;
}
.benefits-reward-tile.available {
  border-color: var(--wa-olive-light);
  background: rgba(122,122,86,0.03);
}
.benefits-reward-tile.locked {
  opacity: 0.6;
  border-style: dashed;
}
.benefits-reward-tile.empty {
  opacity: 0.75;
}

/* Badge de cantidad */
.benefits-reward-badge {
  position: absolute;
  top: 10px; right: 12px;
  background: var(--wa-darker);
  color: var(--wa-cream);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.benefits-reward-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wa-darkest);
  padding-right: 48px; /* espacio para el badge */
}
.benefits-reward-desc {
  margin-top: 4px;
  line-height: 1.45;
}
.benefits-reward-hint {
  margin-top: 4px;
  color: var(--wa-olive-light);
}
.locked-text { filter: blur(4px); user-select: none; }
.benefits-reward-lock {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 0.9rem;
}

/* ── Tabs animados ── */
.benefits-tabs {
  display: flex;
  gap: 0;
  background: rgba(43,45,33,0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  width: 100%;
  max-width: 100%;
}
.benefits-tab {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.benefits-tab.active { color: var(--wa-darkest); }
.benefits-tab-indicator {
  position: absolute;
  inset: 0;
  background: var(--wa-white);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  z-index: -1;
}
.benefits-tab-content {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.benefits-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--wa-darker);
  color: var(--wa-cream);
  font-size: 0.6rem;
  font-weight: 700;
}

/* Empty inline */
.benefits-empty-tile {
  background: var(--wa-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

/* Cupones */
.benefits-coupon-badge {
  position: absolute;
  top: 10px; right: 12px;
  background: var(--wa-darker);
  color: var(--wa-cream);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.benefits-coupon-badge.urgent { background: #dc2626; }
.benefits-coupon-exp { margin-top: 6px; font-style: italic; }

/* ── Loyalty Card ── */
.loyalty-card {
  width: 100%;
  background: var(--wa-darker);
  border-radius: 20px;
  padding: 28px 24px 20px;
  color: var(--wa-cream);
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.loyalty-card::before {
  content: 'LOYALTY';
  position: absolute; right: -12px; bottom: -8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 5rem; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.03);
  pointer-events: none; user-select: none; white-space: nowrap;
}

/* Sargento */
.loyalty-card--sargento {
  background: linear-gradient(135deg, #1a1608 0%, #2B2410 35%, #3D3218 60%, #1a1608 100%);
  box-shadow: 0 8px 32px rgba(152,128,83,0.25), 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(228,217,19,0.08);
}
.loyalty-card--sargento::after {
  content: ''; position: absolute; inset: 0; border-radius: 20px;
  border: 1.5px solid rgba(152,128,83,0.35); pointer-events: none;
}
.loyalty-card--sargento::before { content: 'SARGENTO'; color: rgba(152,128,83,0.07); font-size: 4rem; }

/* Header */
.loyalty-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.loyalty-card-logo { width: 110px; filter: brightness(0) invert(1) opacity(0.85); }
.loyalty-level-badge {
  font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--wa-olive-light);
  border: 1px solid var(--wa-olive-light);
  border-radius: var(--radius-pill); padding: 4px 10px;
}
.loyalty-card--sargento .loyalty-level-badge { color: var(--wa-gold); border-color: var(--wa-gold); background: rgba(152,128,83,0.12); }

/* Nombre */
.loyalty-card-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #f0ece5; margin-bottom: 12px;
}
.loyalty-card--sargento .loyalty-card-name { color: #f5e6c8; }

/* Medallas */
.loyalty-card-medals { display: flex; align-items: baseline; gap: 8px; }
.loyalty-medal-icon { font-size: 1.5rem; margin-bottom: -4px; }
.loyalty-points-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--wa-cream);
}
.loyalty-points-label {
  font-size: 0.75rem; letter-spacing: 0.1em;
  color: rgba(228,223,213,0.7);
  font-family: 'Barlow Condensed', sans-serif;
}
.loyalty-card--sargento .loyalty-points-value { color: #f5e6c8; text-shadow: 0 0 20px rgba(152,128,83,0.2); }
.loyalty-card--sargento .loyalty-points-label { color: rgba(245,230,200,0.7); }
.loyalty-card--sargento .loyalty-medal-icon { filter: drop-shadow(0 0 4px rgba(152,128,83,0.35)); }

/* Barra de progreso */
.loyalty-progress-wrap { margin: 16px 0 4px; }
.loyalty-progress-bar {
  position: relative; height: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px; margin-bottom: 8px;
}
.loyalty-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wa-olive-light), var(--wa-cream));
  border-radius: 999px;
}
.loyalty-card--sargento .loyalty-progress-fill { background: linear-gradient(90deg, var(--wa-gold-dark), var(--wa-gold)); }
.loyalty-milestone {
  position: absolute; top: 50%; transform: translate(-50%,-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.25); border: 1.5px solid rgba(255,255,255,0.35); transition: all 0.3s;
}
.loyalty-milestone.reached { background: var(--wa-olive-light); border-color: var(--wa-olive-light); }
.loyalty-card--sargento .loyalty-milestone.reached { background: var(--wa-gold); border-color: var(--wa-gold); box-shadow: 0 0 6px rgba(152,128,83,0.5); }
.loyalty-progress-labels {
  display: flex; justify-content: space-between;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.06em; color: rgba(228,223,213,0.6);
}
.loyalty-card--sargento .loyalty-progress-labels { color: rgba(245,230,200,0.6); }

/* Footer de la tarjeta */
.loyalty-card-footer {
  display: flex; gap: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 12px;
}
.loyalty-stat {
  display: flex; align-items: center; gap: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; letter-spacing: 0.04em; color: rgba(228,223,213,0.7);
}
.loyalty-card--sargento .loyalty-stat { color: rgba(245,230,200,0.7); }
.loyalty-total-medals { font-size: 0.7rem; }

/* ── Últimas visitas ── */
.card-recent-section {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
}
.card-recent-header {
  display: flex; align-items: center; gap: 8px;
  color: var(--wa-darker); margin-bottom: 14px;
}
.card-recent-title {
  font-size: 0.75rem; letter-spacing: 0.08em;
  font-weight: 700; color: var(--wa-darkest);
}
.card-recent-empty { text-align: center; padding: 12px 0; color: var(--color-text-muted); font-size: 0.875rem; }
.card-recent-list { display: flex; flex-direction: column; gap: 0; }
.card-recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
}
.card-recent-item:last-child { border-bottom: none; }
.card-recent-icon { color: var(--wa-olive-light); flex-shrink: 0; width: 24px; display: flex; align-items: center; justify-content: center; }
.card-recent-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-recent-desc { font-size: 0.875rem; color: var(--wa-darkest); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-recent-date { font-size: 0.75rem; color: var(--color-text-muted); }
.card-recent-medals { font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.card-recent-medals.earn   { color: var(--wa-dark); }
.card-recent-medals.redeem { color: var(--wa-gold); }

.card-footer-note { margin-bottom: 8px; text-align: center; }
.lookup-page {
  min-height: 100vh;
  background-color: var(--wa-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.lookup-card {
  background: var(--wa-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 28px;
}

.lookup-header { text-align: center; margin-bottom: 28px; }
.lookup-logo { width: 130px; margin: 0 auto 20px; display: block; }
.lookup-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wa-darkest);
  margin-bottom: 8px;
}
.lookup-subtitle { font-size: 0.875rem; line-height: 1.55; }

.lookup-form { display: flex; flex-direction: column; gap: 16px; }
.lookup-field { display: flex; flex-direction: column; }

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wa-olive-light);
  pointer-events: none;
}
.input-with-icon { padding-left: 40px; }

.lookup-input { font-size: 1.125rem; letter-spacing: 0.05em; }

.lookup-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #C0392B;
  font-size: 0.875rem;
}

.lookup-submit {
  width: 100%;
  justify-content: center;
}

.lookup-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
}
.lookup-divider .divider { width: 100%; margin: 0; }

.lookup-register-link {
  width: 100%;
  justify-content: center;
  display: flex;
}

.lookup-footer {
  text-align: center;
  margin-top: 24px;
}
.activity-page {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 0;
  gap: 16px;
}
.activity-header { text-align: center; }
.activity-title { font-size: 1.5rem; font-weight: 700; color: var(--wa-darkest); }

.activity-empty {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px; margin-top: 40px; text-align: center;
}
.activity-empty-icon { font-size: 3rem; }

.activity-list {
  width: 100%; max-width: 100%;
  display: flex; flex-direction: column; gap: 8px;
}

.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--wa-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.activity-item.earn  { border-left: 3px solid var(--wa-olive-light); }
.activity-item.redeem { border-left: 3px solid var(--wa-gold); }

.activity-item-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }

.activity-item-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.activity-item-note { color: var(--wa-darkest); }

.activity-item-medals {
  flex-shrink: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  align-self: center;
}
.activity-item-medals.earn   { color: var(--wa-dark); }
.activity-item-medals.redeem { color: var(--wa-gold); font-size: 0.75rem; }

.card-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.card-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--wa-olive-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.notif-client-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0;
  gap: 16px;
}
.notif-client-header { text-align: center; }
.notif-client-title { font-size: 1.5rem; font-weight: 700; color: var(--wa-darkest); }
.notif-client-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 160px;
}
.notif-client-empty {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  padding: 48px 24px;
  background: var(--wa-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 100%;
  text-align: center;
}
.notif-client-list {
  display: flex; flex-direction: column;
  gap: 0;
  width: 100%; max-width: 100%;
  background: var(--wa-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.notif-client-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.notif-client-item:last-child { border-bottom: none; }
.notif-client-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: rgba(43,45,33,0.06);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.notif-client-body { flex: 1; min-width: 0; }
.notif-client-item-title { font-size: 0.875rem; font-weight: 600; color: var(--wa-darkest); }
.notif-client-item-body  { margin-top: 2px; line-height: 1.45; }
.notif-client-item-time  { margin-top: 4px; }
