* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; width: 100%; }
body { font-family: 'Poppins', sans-serif; background: #F5F3FF; color: #2E1065; min-height: 100vh; }
button { font-family: inherit; cursor: pointer; }
svg { flex-shrink: 0; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 96px; }
.loading, .empty { text-align: center; padding: 40px 20px; color: #6D28D9; font-weight: 600; }
.empty { color: #5B4B86; font-weight: 500; font-size: 14px; }

/* --- Login --- */
.login-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #2E1065, #7C3AED, #EC4899); color: #fff; text-align: center; padding: 24px; margin: 0 auto; }
.login-logo { width: 96px; height: 96px; border-radius: 24px; margin-bottom: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.login-screen h1 { font-size: 32px; font-weight: 800; }
.login-screen p { opacity: .95; margin-bottom: 16px; max-width: 280px; }
.btn-google { background: #fff; color: #6D28D9; font-weight: 700; padding: 14px 28px; border-radius: 999px; text-decoration: none; box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* --- Encabezado --- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: #2E1065; }
.brand img { width: 36px; height: 36px; border-radius: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; color: #6D28D9; display: flex; align-items: center; justify-content: center; }
.icon-btn:disabled { opacity: .5; }
.spin svg { animation: giro 1s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* --- Tarjeta oscura (próximo pago / resumen) --- */
.hero { margin: 4px 20px 0; background: #2E1065; color: #fff; border-radius: 24px; padding: 20px; }
.hero small { display: block; font-size: 13px; font-weight: 500; color: #DDD6FE; }
.hero .big { font-size: 38px; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.hero .sub { font-size: 14px; margin-top: 2px; }
.hero-btn { margin-top: 14px; height: 44px; padding: 0 18px; border-radius: 14px; border: 0; background: #EC4899; color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.hero-btn:hover { background: #DB2777; }

/* --- Buscar y filtros --- */
.search-row { margin: 16px 20px 0; display: flex; gap: 10px; }
.search-box { flex: 1; min-width: 0; height: 48px; border-radius: 14px; background: #fff; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #5B4B86; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 15px; color: #2E1065; }
.search-box input::placeholder { color: #6B5B95; }
.search-box:focus-within { box-shadow: 0 0 0 3px rgba(124,58,237,.25); }
.icon-btn.on { background: #7C3AED; color: #fff; }
.date-row { margin: 10px 20px 0; display: none; gap: 8px; align-items: center; }
.date-row.open { display: flex; }
.date-row label { font-size: 13px; font-weight: 600; color: #4C1D95; }
.date-row input { flex: 1; min-width: 0; height: 44px; border: 2px solid #DDD6FE; border-radius: 12px; padding: 0 12px; font-family: inherit; font-size: 15px; background: #fff; color: #2E1065; }
.date-row button { height: 44px; padding: 0 14px; border-radius: 12px; border: 2px solid #DDD6FE; background: #fff; color: #4C1D95; font-weight: 600; }
.search-hint { margin: 8px 20px 0; font-size: 12px; font-weight: 600; color: #BE185D; min-height: 0; }
.chips { margin: 12px 20px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 40px; padding: 0 18px; border-radius: 999px; border: 2px solid #DDD6FE; background: transparent; color: #4C1D95; font-weight: 600; font-size: 14px; }
.chip.active { background: #7C3AED; border-color: #7C3AED; color: #fff; }

/* --- Eventos --- */
.pago-head { margin: 18px 20px 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #4C1D95; }
.events { margin: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.ev { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid transparent; border-radius: 20px; padding: 12px; }
.ev.sel { border-color: #7C3AED; }
.ev-date { width: 54px; height: 62px; border-radius: 14px; background: #EDE9FE; color: #4C1D95; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.ev-date b { font-size: 22px; font-weight: 700; line-height: 1; }
.ev-date span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ev-info { flex: 1; min-width: 0; }
.ev-artist { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.ev-meta { font-size: 13px; color: #5B4B86; margin-top: 1px; }
.ev-pay { font-size: 13px; font-weight: 600; color: #BE185D; margin-top: 2px; }
.btn-voy { width: 84px; height: 48px; border-radius: 14px; border: 2px solid #7C3AED; background: #fff; color: #6D28D9; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; }
.ev.sel .btn-voy { background: #7C3AED; color: #fff; }
.more { margin: 14px 20px 0; width: calc(100% - 40px); height: 48px; border-radius: 14px; border: 2px solid #DDD6FE; background: #fff; color: #4C1D95; font-weight: 600; font-size: 15px; }

/* --- Barra inferior --- */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; height: 76px; background: #fff; border-top: 1px solid #E9E3FF; display: flex; padding: 8px 20px 12px; z-index: 50; }
.nav button { flex: 1; border: 0; background: transparent; color: #5B4B86; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; }
.nav button.active { color: #6D28D9; font-weight: 700; }

/* --- Hojas inferiores --- */
.sheet-overlay { position: fixed; inset: 0; background: rgba(46,16,101,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 100; }
.sheet-overlay.hidden { display: none; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 28px 28px 0 0; padding: 12px 24px 28px; max-height: 92vh; overflow-y: auto; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: #DDD6FE; margin: 0 auto 18px; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h3 { font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.sheet-head p { font-size: 13px; color: #5B4B86; }
.sheet label.ask { display: block; margin-top: 22px; font-size: 15px; font-weight: 600; }
.amount-box { margin-top: 8px; height: 68px; border-radius: 18px; border: 2px solid #7C3AED; background: #F5F3FF; display: flex; align-items: center; padding: 0 18px; gap: 6px; }
.amount-box span { font-size: 28px; font-weight: 700; color: #6D28D9; }
.amount-box input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: inherit; font-size: 32px; font-weight: 700; color: #2E1065; outline: none; }
.quick { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.quick button { flex: 1; min-width: 80px; height: 44px; border-radius: 12px; border: 2px solid #DDD6FE; background: #fff; color: #4C1D95; font-weight: 600; font-size: 14px; }
.quick-note { font-size: 12px; color: #5B4B86; margin-top: 6px; }
.note-toggle { margin-top: 14px; background: none; border: 0; color: #6D28D9; font-weight: 600; font-size: 14px; padding: 6px 0; }
.sheet textarea { display: none; width: 100%; margin-top: 6px; border: 2px solid #DDD6FE; border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: 15px; min-height: 64px; resize: vertical; }
.sheet textarea.open { display: block; }
.btn-main { margin-top: 22px; width: 100%; height: 56px; border-radius: 16px; border: 0; background: #7C3AED; color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-main:disabled { opacity: .6; }
.btn-ghost { margin-top: 10px; width: 100%; height: 48px; border-radius: 14px; border: 0; background: transparent; color: #BE185D; font-weight: 600; font-size: 15px; }
.btn-ghost.neutral { color: #4C1D95; }
.detail-list { margin-top: 14px; }
.detail-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #F5F3FF; font-size: 15px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row small { display: block; color: #5B4B86; font-size: 12px; }
.detail-row b { white-space: nowrap; }

/* --- Mis pagos --- */
.page-title { padding: 20px 20px 0; }
.page-title h2 { font-size: 24px; font-weight: 700; }
.page-title p { font-size: 13px; color: #5B4B86; }
.years { margin: 12px 20px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 64px; margin-top: 14px; }
.bars div { flex: 1; border-radius: 6px; background: #8B5CF6; min-height: 6px; }
.bars div.next { background: #EC4899; }
.bars-cap { display: flex; justify-content: space-between; font-size: 11px; color: #DDD6FE; margin-top: 4px; }
.qlist { margin: 14px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.q { background: #fff; border-radius: 20px; overflow: hidden; }
.q-head { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; text-align: left; color: #2E1065; min-height: 64px; }
.q-main { flex: 1; min-width: 0; }
.q-title { font-size: 15px; font-weight: 600; }
.q-sub { font-size: 12px; color: #5B4B86; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #EDE9FE; color: #5B21B6; white-space: nowrap; }
.badge.paid { background: #DCFCE7; color: #166534; }
.q-total { font-size: 17px; font-weight: 700; white-space: nowrap; }
.q.pending .q-total { color: #BE185D; }
.chev { transition: transform .15s; }
.q.open .chev { transform: rotate(180deg); }
.q-events { display: none; margin: 0 16px; padding: 4px 0 12px; border-top: 1px solid #EDE9FE; }
.q.open .q-events { display: block; }

/* --- Cuenta --- */
.account { margin: 20px; background: #fff; border-radius: 24px; padding: 24px 20px; text-align: center; }
.account img { width: 72px; height: 72px; border-radius: 50%; }
.account h2 { font-size: 20px; margin-top: 10px; overflow-wrap: anywhere; }
.account p { font-size: 13px; color: #5B4B86; overflow-wrap: anywhere; }
.account a, .account button { display: flex; align-items: center; justify-content: center; margin-top: 14px; width: 100%; height: 52px; border-radius: 14px; font-weight: 600; font-size: 15px; text-decoration: none; }
.account a { border: 2px solid #DDD6FE; color: #4C1D95; background: #fff; }
.account button { border: 0; background: #FDF2F8; color: #BE185D; }
