:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --dark: #0f172a;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --muted: #64748b;
  --success: #10b981;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--dark); line-height: 1.5; }
.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.badge-med { font-size: 0.68rem; font-weight: 800; background: #e0f2fe; color: #0369a1; padding: 2px 8px; border-radius: 9999px; letter-spacing: 0.05em; }
.brand h1 { font-size: 1.15rem; font-weight: 800; margin-top: 4px; }
.header-status { font-size: 0.8rem; font-weight: 700; color: var(--success); display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.5s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.85); } }

/* Live Board */
.live-board { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 4px 16px -2px rgba(0,0,0,0.04); }
.card-label { font-size: 0.72rem; font-weight: 800; color: var(--muted); letter-spacing: 0.04em; }
.main-turn { text-align: center; border-top: 4px solid var(--primary); }
.turn-display { font-size: 3.5rem; font-weight: 800; color: var(--primary); line-height: 1; margin: 8px 0; }
.turn-sub { font-size: 0.75rem; color: var(--muted); }
.stats-turn { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.stat-item strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--dark); }

/* Booking Form */
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: 0 4px 20px -2px rgba(0,0,0,0.04); margin-bottom: 40px; }
.section-title { margin-bottom: 20px; }
.section-title h2 { font-size: 1.35rem; font-weight: 800; }
.section-title p { font-size: 0.85rem; color: var(--muted); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; font-family: inherit; outline: none; }
.form-group input:focus { border-color: var(--primary); }
.submit-btn { width: 100%; padding: 14px; background: var(--primary); color: #ffffff; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.15s ease; }
.submit-btn:hover { background: var(--primary-hover); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Modal Comprobante */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px); display: none; place-items: center; z-index: 100; padding: 16px; }
.modal-overlay.open { display: grid; }
.ticket-card { background: #ffffff; width: 100%; max-width: 440px; border-radius: 20px; padding: 28px; text-align: center; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3); }
.ticket-badge { background: #dcfce7; color: #15803d; font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: 9999px; }
.ticket-header h3 { font-size: 1.4rem; font-weight: 800; margin-top: 8px; }
.ticket-header p { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.ticket-number-box { background: #f0f9ff; border: 2px dashed #0284c7; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.t-label { font-size: 0.75rem; font-weight: 800; color: #0369a1; }
.t-num { font-size: 3.2rem; font-weight: 800; color: #0284c7; line-height: 1; }
.ticket-details { background: var(--bg); border-radius: 8px; padding: 12px; margin-bottom: 16px; text-align: left; }
.detail-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.detail-row:last-child { margin-bottom: 0; }
.req-notice { font-size: 0.78rem; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 10px; margin-bottom: 18px; text-align: left; line-height: 1.4; }
.wa-send-btn { width: 100%; padding: 14px; background: #25d366; color: #ffffff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 800; cursor: pointer; }

@media (max-width: 540px) { .live-board { grid-template-columns: 1fr; } }