/* ════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; cursor: pointer; }
a      { text-decoration: none; }

/* ════════════════════════════════════════
   APP SHELL
════════════════════════════════════════ */
.app {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* ════════════════════════════════════════
   SCREENS
════════════════════════════════════════ */
.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 64px; /* clear fixed nav */
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: block; }


/* ════════════════════════════════════════
   SCREEN 1 · INICIO
════════════════════════════════════════ */

/* ── Dark hero ─────────────────────────── */
.hero-dark { background: #2d2d2d; }

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 22px 14px;
}

/* Logo */
.logo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1.5px;
  display: flex;
  align-items: baseline;
  line-height: 1;
}
.logo-dot-l { color: #f5a623; font-size: 30px; }
.logo-name  { color: #fff; }
.logo-dot-r { color: #e91e8c; font-size: 24px; }

/* User badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #888;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.chevron-icon { width: 13px; height: 8px; color: #bbb; }

/* Home body */
.home-body { padding: 4px 22px 28px; }

.account-no {
  font-size: 17px;
  color: #3ecfc4;
  font-weight: 600;
  margin-bottom: 22px;
}

.balance-label {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.balance-amount {
  font-size: 52px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.balance-status {
  font-size: 15px;
  color: #3ecfc4;
  font-weight: 600;
  margin-bottom: 28px;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-title { font-size: 18px; font-weight: 700; color: #fff; }
.section-link  { font-size: 14px; color: #ccc; }

/* VíX Banner */
.vix-banner {
  background: linear-gradient(115deg, #d95f08 0%, #f5a623 100%);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
}
.vix-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.fifa-mark {
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 2px 5px;
  border-radius: 3px;
}
.vix-logo {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}
.vix-tier {
  font-size: 9px;
  color: rgba(255,255,255,.85);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.vix-copy {
  flex: 1;
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
}
.vix-copy strong { font-weight: 800; }
.vix-arrow {
  font-size: 28px;
  font-weight: 300;
  color: rgba(255,255,255,.75);
  flex-shrink: 0;
}

/* ── Services section (white) ─────────── */
.services-section { background: #fff; padding: 24px 22px 24px; }

.services-title {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  margin-bottom: 18px;
}

.service-card {
  background: #f0f0f0;
  border-radius: 14px;
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.service-card__label {
  font-size: 14px;
  font-weight: 700;
  color: #444;
}
.service-card__name {
  font-size: 26px;
  font-weight: 800;
  color: #111;
  text-align: center;
}


/* ════════════════════════════════════════
   SCREEN 2 · FACTURACIÓN
════════════════════════════════════════ */
#screen-facturacion { background: #f2f2f2; }

/* ── Page header ──────────────────────── */
.factura-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 22px 16px;
  background: #fff;
}
.factura-title {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  letter-spacing: -1.5px;
}
.help-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #555;
  background: none;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Rainbow stripe ───────────────────── */
.izzi-stripe {
  height: 5px;
  background: linear-gradient(90deg,
    #26c6da  0%,
    #66bb6a 17%,
    #d4e157 34%,
    #ffb300 50%,
    #ef5350 66%,
    #ec407a 83%,
    #7e57c2 100%
  );
}

/* ── Body ─────────────────────────────── */
.factura-body { padding: 16px 14px 16px; }

/* Dark card */
.dark-card {
  background: #2d2d2d;
  border-radius: 18px;
  padding: 20px 20px 26px;
  margin-bottom: 14px;
}
.dark-card__label  { font-size: 16px; color: #bbb; margin-bottom: 4px; }
.dark-card__amount {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 8px;
}
.dark-card__status { font-size: 15px; color: #ddd; }

/* ── Action tiles ─────────────────────── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.tile {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  padding: 14px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: background 0.12s;
}
.tile:not(.tile--off) { cursor: pointer; }
.tile:not(.tile--off):hover  { background: #f5f5f5; }
.tile:not(.tile--off):active { background: #ebebeb; }
.tile--off { cursor: default; }

.tile-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
}
.tile-icon svg { width: 100%; height: 100%; }
.tile-icon--barcode { width: 40px; height: 28px; }
.tile-icon--barcode svg { width: 100%; height: 100%; }

.tile-label {
  font-size: 11px;
  color: #222;
  text-align: center;
  line-height: 1.35;
  font-weight: 500;
}

/* ── Payment history ──────────────────── */
.history-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 16px;
}
.history-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
}
.pay-row__left  { display: flex; flex-direction: column; gap: 4px; }
.pay-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.pay-row__name   { font-size: 15px; font-weight: 700; color: #111; }
.pay-row__method { font-size: 13px; color: #888; }
.pay-row__amount { font-size: 15px; font-weight: 700; color: #111; }
.pay-row__date   { font-size: 13px; color: #888; }

.pay-divider { border: none; border-top: 1px solid #eee; }


/* ════════════════════════════════════════
   BOTTOM NAV
════════════════════════════════════════ */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: stretch;
  z-index: 50;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: #aaa;
  padding: 6px 4px;
  position: relative;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab:not([disabled]):hover  { color: #666; }
.nav-tab:not([disabled]):active { color: #222; }
.nav-tab[disabled] { opacity: 0.45; cursor: default; }

.nav-tab.active { color: #1a1a1a; }
.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 3px;
  background: #1a1a1a;
  border-radius: 0 0 3px 3px;
}

.nav-tab__icon { width: 22px; height: 22px; }
.nav-tab__icon svg { width: 100%; height: 100%; display: block; }
.nav-tab__label { font-size: 10px; font-weight: 500; letter-spacing: -0.2px; }


/* ════════════════════════════════════════
   MODAL · DESCARGAR ESTADO DE CUENTA
════════════════════════════════════════ */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.modal-overlay.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

.modal-sheet {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 10px 22px 44px;
  animation: slideUp 0.28s cubic-bezier(.32,.72,0,1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0);    }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  margin: 0 auto 22px;
}

.modal-heading {
  font-size: 23px;
  font-weight: 800;
  color: #111;
  margin-bottom: 26px;
  line-height: 1.25;
}

/* Fields row */
.modal-fields {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}
.field-wrap--lg { flex: 2; }
.field-wrap--sm { flex: 1; }

/* Outlined (Material-style) field */
.outlined-field { position: relative; }

.outlined-field__label {
  position: absolute;
  top: -9px;
  left: 12px;
  background: #fff;
  padding: 0 4px;
  font-size: 12px;
  color: #666;
  z-index: 1;
  font-weight: 500;
}

.outlined-field__inner {
  border: 1.5px solid #aaa;
  border-radius: 8px;
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: relative;
  background: #fff;
}

.outlined-field__select {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  color: #111;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 18px;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  right: 11px;
  width: 12px;
  height: 8px;
  pointer-events: none;
  color: #444;
}

/* Download button */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #2d2d2d;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 17px;
  border-radius: 14px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-download:hover  { background: #444; }
.btn-download:active { background: #1a1a1a; }

/* ════════════════════════════════════════
   RESPONSIVE — wider phones / tablets
════════════════════════════════════════ */

/* Constrain content width on large screens while staying full-bleed on phones */
@media (min-width: 600px) {
  html, body { background: #9e9e9e; display: flex; justify-content: center; }
  .app { max-width: 480px; box-shadow: 0 0 40px rgba(0,0,0,.35); }
}

/* Scale tile icons and text up proportionally on wide/tall phones */
@media (min-width: 390px) {
  .balance-amount    { font-size: 58px; }
  .dark-card__amount { font-size: 48px; }
  .factura-title     { font-size: 36px; }
  .tile-label        { font-size: 12px; }
}

