/* ============================================================
   JuanTicket Design System  —  2026
   Senior-level polish: consistent tokens, soft elevation,
   excellent focus states, mobile-first.
   ============================================================ */

:root {
  /* Brand */
  --navy:        #0A2647;
  --navy-deep:   #06192F;
  --navy-soft:   #0F3560;
  --gold:        #E8A33D;
  --gold-hover:  #F0B55A;
  --gold-soft:   #FDF6E9;
  --teal:        #3FB6A8;
  --teal-soft:   #E6F7F5;

  /* Neutrals */
  --ink:         #1B1E26;
  --ink-2:       #374151;
  --dim:         #6B7280;
  --muted:       #9CA3AF;
  --line:        #E5E7EB;
  --line-soft:   #F0F1F3;
  --bg:          #F8F9FB;
  --surface:     #FFFFFF;
  --surface-2:   #F9FAFB;

  /* Semantic */
  --success:     #059669;
  --success-bg:  #ECFDF5;
  --success-border: #A7F3D0;
  --danger:      #DC2626;
  --danger-bg:   #FEF2F2;
  --danger-border:#FECACA;
  --warning:     #D97706;
  --warning-bg:  #FFFBEB;

  /* Typography */
  --font-ui:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radius scale */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  18px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:  0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:  0 4px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg:  0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-gold: 0 4px 14px rgba(232, 163, 61, 0.28);

  /* Spacing helpers */
  --header-h: 58px;
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-soft); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap-sm { max-width: 480px; }
.wrap-md { max-width: 640px; }
.wrap-lg { max-width: 1280px; }

/* ---------- Site header ---------- */
header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}
header.site .bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
header.site .brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
header.site .brand:hover { color: var(--navy); }
header.site .brand .dot {
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(232,163,61,0.25);
}
header.site .spacer { flex: 1; }
header.site nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
header.site nav a:not(.btn) {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 7px 12px;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
header.site nav a:not(.btn):hover {
  background: var(--line-soft);
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--navy);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-soft); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 38, 71, 0.25);
}

.btn.gold {
  background: var(--gold);
  color: #1F1400;
  box-shadow: var(--shadow-gold);
}
.btn.gold:hover {
  background: var(--gold-hover);
  color: #1F1400;
  box-shadow: 0 6px 18px rgba(232, 163, 61, 0.35);
}
.btn.gold:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.4);
}

.btn.outline {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.btn.outline:hover {
  background: var(--surface-2);
  border-color: #D1D5DB;
  color: var(--navy);
}

.btn.ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}
.btn.ghost:hover {
  background: var(--line-soft);
  color: var(--ink);
}

.btn.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn.danger:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

.btn.sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--r-sm);
}
.btn.lg {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: var(--r-lg);
}
.btn.block { width: 100%; }
.btn:disabled, .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}
.card.hoverable {
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}
.card.hoverable:hover {
  box-shadow: var(--shadow-md);
  border-color: #D1D5DB;
  transform: translateY(-1px);
}

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field .hint {
  font-size: 12px;
  color: var(--dim);
  margin-top: 5px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #D1D5DB;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 38, 71, 0.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
}

/* ---------- Feedback ---------- */
.error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #B91C1C;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.success-box {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #065F46;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.01em;
}
.badge.published {
  background: var(--success-bg);
  color: #065F46;
}
.badge.draft {
  background: var(--line-soft);
  color: var(--dim);
}
.badge.cancelled {
  background: var(--danger-bg);
  color: #B91C1C;
}

/* ---------- Typography helpers ---------- */
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}
.page-sub {
  font-size: 14px;
  color: var(--dim);
  margin: 0 0 24px;
  line-height: 1.55;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--dim);
}
.empty-state .icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.7;
}
.empty-state p {
  margin: 0 0 18px;
  font-size: 14px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  text-align: center;
  color: var(--dim);
  font-size: 12.5px;
  background: var(--surface);
  margin-top: 60px;
}

/* ---------- Utilities ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.text-dim { color: var(--dim); }
.text-sm { font-size: 13px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
