@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/jakarta-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2f7fd;
  --panel: #ffffff;
  --ink: #0b1c2f;
  --muted: #5d7286;
  --line: #d6e4f5;
  --blue: #4a7ac9;
  --blue-2: #5d93dd;
  --blue-deep: #3560a8;
  --blue-soft: #dce9f9;
  --ok: #1f8a5f;
  --ok-soft: #e4f5ec;
  --danger: #b3403b;
  --radius: 20px;
  --display: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
  --accent-grad: linear-gradient(135deg, #5d93dd 0%, #4374c6 55%, #2f5aa0 100%);
  --shadow: 0 10px 28px rgba(36, 74, 128, .08);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -8%, #e2eefc 0%, transparent 60%),
    radial-gradient(700px 380px at 96% 0%, #e8f2fd 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(244, 248, 253, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }

.mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-grad, linear-gradient(135deg, #5d93dd 0%, #4374c6 55%, #2f5aa0 100%));
  box-shadow: 0 6px 16px rgba(52, 104, 180, .28);
}

.mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 13px; letter-spacing: .16em; }
.brand-text span { font-size: 11px; color: var(--muted); }
.link { font-size: 13px; color: var(--muted); text-decoration: none; }
.link:hover { color: var(--blue); }

.view {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.loading, .empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 14px; }

.hero { margin: 4px 0 16px; }
.hero h1 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.panel h2 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.01em; }
.panel .note { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.muted { color: var(--muted); }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
  vertical-align: 2px;
}

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #34495f;
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(93, 147, 221, .16);
}

.field textarea { min-height: 74px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field { margin-bottom: 0; }

button, .btn {
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button:disabled { opacity: .6; cursor: default; }

.primary {
  background: linear-gradient(160deg, #5d93dd, #2f5aa0);
  border-color: #2f5aa0;
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 90, 160, .24);
}

.ghost { background: #fff; color: #34495f; }
.wide { width: 100%; }
.small { padding: 8px 11px; font-size: 12.5px; }

.notice {
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  background: var(--blue-soft);
  color: #24486f;
  margin-top: 12px;
}

.notice.ok { background: var(--ok-soft); color: #14603f; }
.notice.bad { background: #fdeceb; color: #8f2b26; }

.error-text { color: var(--danger); font-size: 12.5px; margin: 8px 0 0; }

/* -------------------------------- boleto --------------------------------- */

.ticket {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 62%, var(--bg) 9px, transparent 10px),
    radial-gradient(circle at 100% 62%, var(--bg) 9px, transparent 10px),
    #fff;
  box-shadow: var(--shadow);
}

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-kind {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-code {
  font-family: "Sora", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 8px 0 2px;
}

.ticket-title { font-size: 17px; font-weight: 800; margin: 2px 0 0; line-height: 1.3; }

.ticket-sep {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 16px -18px;
}

.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ticket-grid small {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticket-grid b { display: block; font-size: 13px; margin-top: 3px; line-height: 1.35; }

.pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: #14603f; }
.pill.bad { background: #fdeceb; color: #8f2b26; }

.steps { display: grid; gap: 8px; margin-top: 14px; }
.step-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #34495f; }
.step-row .dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--blue-2);
  background: #fff;
}
.step-row.done .dot { background: var(--blue); }
.step-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }

.ticket-actions { display: grid; gap: 8px; margin-top: 12px; }

.lookup { display: flex; gap: 8px; }
.lookup input { flex: 1; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.lookup button { flex: 0 0 auto; }

.list { display: grid; gap: 8px; }
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: inherit;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.list-row b { font-family: "Sora", ui-monospace, monospace; letter-spacing: .05em; }
.list-row small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 18px 16px 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.foot p { margin: 0 0 6px; }
.foot-links { display: flex; justify-content: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 12px; }
.foot-links a:hover { color: var(--blue); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 24px);
  max-width: 90vw;
  padding: 11px 16px;
  border-radius: 12px;
  background: #0e1c2c;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #8f2b26; }

@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 23px; }
  .view { padding: 12px 12px 34px; }
  .ticket-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  .topbar, .foot, .toast, .no-print { display: none !important; }
  body { background: #fff; }
  .ticket { box-shadow: none; }
}

/* Tipografía y detalles del monedero */
h1, h2, h3 { font-family: var(--display, "Sora", system-ui, sans-serif); letter-spacing: -0.02em; }

.material-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.material-links .btn { width: 100%; justify-content: center; text-align: center; }
