/* ============================================================
   CCASNJ – Ticket System styles
   ============================================================ */
:root {
  --navy: #0a1f44;
  --navy-2: #122c5e;
  --green: #0d7a3f;
  --red: #ce1126;
  --yellow: #fcd116;
  --cream: #faf7f0;
  --gray-100: #f3f4f6;
  --gray-600: #4b5563;
  --radius: 14px;
}
* { box-sizing: border-box; }
body.tk-page {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: #1f2937;
  line-height: 1.6;
}
.tk-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.tk-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tk-brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.tk-brand span { color: var(--yellow); font-weight: 600; }
.tk-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.tk-nav a {
  color: #dbe4ff;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.tk-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.tk-nav a.active { background: var(--yellow); color: var(--navy); font-weight: 700; }

.tk-main { max-width: 1080px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.tk-hero { text-align: center; margin-bottom: 2rem; }
.tk-hero h1 { color: var(--navy); margin: 0 0 0.4rem; font-size: 2rem; }
.tk-hero p { color: var(--gray-600); margin: 0; }
.tk-ref-banner {
  background: #e8f5e9;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin: 0 auto 1.8rem;
  max-width: 640px;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
}
.tk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.tk-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(10,31,68,0.08);
  padding: 1.5rem;
}
.tk-card h2 { color: var(--navy); margin-top: 0; font-size: 1.25rem; }
.tk-card h3 { color: var(--navy); margin: 0 0 0.5rem; }
.tk-event { cursor: pointer; border: 3px solid transparent; transition: border-color .15s; }
.tk-event:hover { border-color: #cdd8f5; }
.tk-event.selected { border-color: var(--green); }
.tk-event .tk-date { color: var(--gray-600); font-size: 0.9rem; }
.tk-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 2px solid var(--gray-100);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem;
}
.tk-tier.selected { border-color: var(--navy); background: #f0f4ff; }
.tk-tier .tk-tier-name { font-weight: 700; color: var(--navy); }
.tk-tier .tk-tier-price { color: var(--green); font-weight: 800; white-space: nowrap; }
.tk-qty { display: flex; align-items: center; gap: 0.5rem; }
.tk-qty button {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: #fff; color: var(--navy);
  font-size: 1.1rem; font-weight: 800;
  cursor: pointer; line-height: 1;
}
.tk-qty button:hover { background: var(--navy); color: #fff; }
.tk-qty span { min-width: 2ch; text-align: center; font-weight: 800; }
.tk-field { margin-bottom: 1rem; }
.tk-field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 0.3rem; font-size: 0.92rem; }
.tk-field input, .tk-field select, .tk-field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
}
.tk-field input:focus, .tk-field select:focus { outline: none; border-color: var(--navy); }
.tk-btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.tk-btn:hover { filter: brightness(1.08); }
.tk-btn.secondary { background: var(--navy); }
.tk-btn.whatsapp { background: #25d366; }
.tk-btn.block { display: block; width: 100%; }
.tk-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.3rem; font-weight: 800; color: var(--navy);
  border-top: 2px dashed #d1d5db;
  padding-top: 1rem; margin-top: 1rem;
}
.tk-ticket {
  border: 2px dashed var(--navy);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}
.tk-ticket .tk-ticket-id {
  font-family: ui-monospace, monospace;
  font-size: 1.25rem; font-weight: 800; color: var(--navy);
  letter-spacing: 1px;
}
.tk-ticket .tk-ticket-meta { color: var(--gray-600); font-size: 0.9rem; }
.tk-qr { text-align: center; }
.tk-qr img { border: 6px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.15); border-radius: 8px; }
.tk-alert {
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.tk-alert.success { background: #e8f5e9; border: 2px solid var(--green); color: #14532d; }
.tk-alert.error { background: #fdecec; border: 2px solid var(--red); color: #7f1d1d; }
.tk-alert.info { background: #e8f0fe; border: 2px solid var(--navy); color: var(--navy); }
.tk-share-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.tk-link-box {
  display: flex; gap: 0.5rem; margin-top: 0.8rem;
}
.tk-link-box input { flex: 1; }
.tk-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tk-table th, .tk-table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--gray-100); }
.tk-table th { color: var(--navy); background: var(--gray-100); }
.tk-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.tk-badge.ok { background: #e8f5e9; color: var(--green); }
.tk-badge.used { background: #fdecec; color: var(--red); }
.tk-footer { text-align: center; color: var(--gray-600); font-size: 0.85rem; padding: 2rem 1rem; }
.tk-steps { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.6rem; flex-wrap: wrap; }
.tk-step {
  padding: 0.4rem 0.9rem; border-radius: 999px;
  background: var(--gray-100); color: var(--gray-600);
  font-size: 0.85rem; font-weight: 700;
}
.tk-step.active { background: var(--navy); color: #fff; }
.tk-step.done { background: var(--green); color: #fff; }
@media (max-width: 640px) {
  .tk-ticket { grid-template-columns: 1fr; text-align: center; }
  .tk-hero h1 { font-size: 1.6rem; }
}
@media print {
  .tk-header, .tk-footer, .tk-no-print { display: none !important; }
  .tk-ticket { break-inside: avoid; }
}
