/* Shared styles for casheteo.com — palette and type from the Ca$heteo World design */
:root {
  --verde-osc: #0E2A1D;
  --verde: #133A28;
  --menta: #75E0C1;
  --menta-clara: #DDF5EC;
  --oro: #FFCF0A;
  --rosa: #E8457A;
  --crema: #F4F1DE;
  --texto-suave: #3B5246;
  --exito: #1E7A34;
  --error: #B3261E;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--crema); font-family: Archivo, system-ui, sans-serif; color: var(--verde-osc); overflow-x: hidden; }
img { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
[hidden] { display: none !important; }

.oculto-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: wraps cleanly on phones */
header nav a[aria-current="page"] { color: var(--oro) !important; }
header nav a[href="/billete"][aria-current="page"] { color: var(--verde-osc) !important; box-shadow: 0 0 0 3px var(--menta); }
@media (max-width: 720px) {
  header nav { gap: 2px 16px !important; font-size: 15px !important; }
  header > div { padding: 10px 16px !important; }
}

/* Status messages */
.aviso { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; font-weight: 600; }
.aviso.ok { background: #DFF6E4; color: var(--exito); border: 2px solid var(--exito); }
.aviso.mal { background: #FCE4E2; color: var(--error); border: 2px solid var(--error); }
.aviso.info { background: var(--menta-clara); color: var(--verde); border: 2px solid var(--verde); }

button[disabled], a[aria-disabled="true"] { opacity: .55; cursor: not-allowed !important; }
button.cargando { position: relative; color: transparent !important; }
button.cargando::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--oro); border-right-color: transparent; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Empty / loading states for live lists */
.vacio { grid-column: 1 / -1; background: #FFFFFF; border: 2px dashed var(--verde); border-radius: 18px; padding: 28px; text-align: center; color: var(--texto-suave); font-size: 16px; line-height: 1.5; }
.esqueleto { grid-column: 1 / -1; height: 120px; border-radius: 18px; background: linear-gradient(90deg, #E9EFE9 0%, #F6F8F4 50%, #E9EFE9 100%); background-size: 200% 100%; animation: brillo 1.2s ease-in-out infinite; }
@keyframes brillo { to { background-position: -200% 0; } }

/* Account dialog */
.modal-fondo { position: fixed; inset: 0; background: rgba(14, 42, 29, .65); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 440px; margin: auto 0; background: #FFFFFF; border: 3px solid var(--verde); border-radius: 24px; padding: 26px; box-shadow: 8px 8px 0 var(--verde); display: flex; flex-direction: column; gap: 14px; position: relative; }
.modal h2 { margin: 0; font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 28px; color: var(--verde); padding-right: 36px; }
.modal p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--texto-suave); }
.modal .cerrar { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--verde); background: #FFFFFF; color: var(--verde); font-size: 22px; line-height: 1; cursor: pointer; }
.pestanas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--menta-clara); border-radius: 999px; padding: 4px; }
.pestanas button { font: inherit; font-weight: 800; font-size: 15px; border: 0; border-radius: 999px; padding: 10px; background: transparent; color: var(--verde); cursor: pointer; }
.pestanas button[aria-selected="true"] { background: var(--verde); color: var(--oro); }

/* Form controls shared by the dialog and the profile page */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label { font-weight: 700; font-size: 14px; }
.campo input, .campo select { font: inherit; font-size: 17px; padding: 13px 14px; border: 2px solid var(--texto-suave); border-radius: 12px; background: #FFFFFF; color: var(--verde-osc); width: 100%; }
.campo input:focus, .campo select:focus, input:focus, select:focus { outline: 3px solid var(--oro); outline-offset: 1px; }
.btn { font: inherit; font-weight: 800; font-size: 17px; background: var(--verde); color: var(--oro); border: 0; border-radius: 999px; padding: 15px 22px; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
.btn.oro { background: var(--oro); color: var(--verde-osc); border: 2px solid var(--verde-osc); }
.btn.borde { background: transparent; color: var(--verde); border: 2px solid var(--verde); padding: 11px 18px; font-size: 15px; }
.enlace { font: inherit; font-weight: 700; font-size: 15px; background: transparent; color: var(--verde); border: 0; text-decoration: underline; padding: 6px 0; cursor: pointer; align-self: flex-start; }

/* Profile page */
.perfil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.tarjeta { background: #FFFFFF; border: 3px solid var(--verde); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tarjeta h2 { margin: 0; font-size: 22px; font-weight: 800; }
.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lista li { border: 2px solid var(--menta-clara); border-radius: 14px; padding: 12px 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 15px; line-height: 1.4; }
.lista li strong { font-size: 16px; }
.chip { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--menta-clara); color: var(--verde); white-space: nowrap; }
.chip.oro { background: var(--oro); color: var(--verde-osc); }
.chip.rosa { background: var(--rosa); color: #FFFFFF; }
.codigo-grande { font-family: Ultra, Georgia, serif; letter-spacing: 2px; color: var(--verde); }

/* Scratch card page */
.raspa-carta { position: relative; width: 100%; aspect-ratio: 34 / 30; border-radius: 16px; overflow: hidden; background: #FFFFFF; border: 2px solid var(--verde); }
.raspa-carta canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
