/* ============================================================
   EventPass - Global Styles (Google Material 3 Inspired Theme)
   Aesthetic: Clean, Accessible, Premium Blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables (Google Palette Embedded) ────────────────── */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA; /* Google Surface */
  --bg-card: #FFFFFF;
  --bg-elevated: #F1F3F4;
  --border: #E0E2E0;
  --border-accent: #C4C7C5;

  --text-primary: #1F1F1F;
  --text-secondary: #444746;
  --text-muted: #747775;

  /* We kept the variable names 'gold' so HTML doesn't break, 
     but assigned them Google Blue values! */
  --gold: #0A56D1;       /* Primary Google Blue */
  --gold-light: #4C8DF6; /* Light Blue */
  --gold-dark: #0842A0;  /* Dark Blue */
  
  --platinum: #5F6368;
  --silver-color: #9AA0A6;

  --success: #146C2E;
  --error: #B3261E;
  --warning: #B36B00;
  --info: #0A56D1;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 12px;
  --radius-lg: 24px;
  --radius-pill: 100px;
  
  --shadow: 0 4px 20px rgba(0,0,0,0.04);
  --shadow-gold: 0 8px 30px rgba(10, 86, 209, 0.12); /* Blue shadow */

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --nav-height: 72px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before { display: none; }

main { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-primary); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-secondary); }

.gold-text { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  gap: 2rem;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  text-decoration: none;
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--gold);
  background: rgba(10,86,209,0.06);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Buttons (Google Pill Style) ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--gold-dark); box-shadow: var(--shadow-gold); color: #ffffff; }

.btn-secondary { background: #fff; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text-primary); }

.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-outline:hover:not(:disabled) { background: rgba(10,86,209,0.05); }

.btn-danger { background: rgba(179,38,30,0.1); color: var(--error); border: none; }
.btn-danger:hover:not(:disabled) { background: rgba(179,38,30,0.2); }

.btn-sm { padding: 0.4rem 1.2rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2.5rem; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 0; border-radius: 50%; width: 40px; height: 40px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.card:hover { border-color: var(--border-accent); }

.card-body { padding: 1.5rem; }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* ── Forms (Google Style) ────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  background: transparent;
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  transition: all var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  border-width: 2px;
  padding: calc(0.75rem - 1px) calc(1rem - 1px);
}

.form-input::placeholder { color: var(--border-accent); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23747775' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  appearance: none;
}

.form-error { color: var(--error); font-size: 0.82rem; }
.form-hint { color: var(--text-muted); font-size: 0.82rem; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-platinum { background: #F1F3F4; color: var(--text-secondary); border: 1px solid var(--border); }
.badge-gold { background: rgba(10,86,209,0.1); color: var(--gold); border: 1px solid rgba(10,86,209,0.2); }
.badge-silver { background: #FFFFFF; color: var(--text-muted); border: 1px solid var(--border); }
.badge-success { background: #E6F4EA; color: var(--success); }
.badge-error { background: #FCE8E6; color: var(--error); }
.badge-warning { background: #FEF7E0; color: var(--warning); }
.badge-info { background: #E8F0FE; color: var(--info); }

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
td {
  padding: 1rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
tr:hover td { background: rgba(0,0,0,0.02); }

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(10,86,209,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.show { 
  opacity: 1; 
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition);
  box-shadow: 0 24px 48px rgba(0,0,0,0.1);
}

.modal-overlay.show .modal { transform: translateY(0); }

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
@media (max-width: 600px) {
  .toast-container { left: 1rem; right: 1rem; top: calc(var(--nav-height) + 0.75rem); }
  .toast { max-width: 100%; }
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 500;
  max-width: 360px;
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.toast.show { transform: translateX(0); }
.toast-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { background: rgba(20,108,46,0.1); color: var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-error .toast-icon { background: rgba(179,38,30,0.1); color: var(--error); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { background: rgba(179,107,0,0.1); color: var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info .toast-icon { background: rgba(10,86,209,0.1); color: var(--info); }

/* ── Global Loader ───────────────────────────────────────────── */
#global-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-elevated);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-text { color: var(--text-secondary); font-size: 1rem; font-weight: 500;}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page layouts ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.page-header { padding: 3rem 0 2rem; }
.page-title { margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-secondary); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 1.5rem; gap: 0.5rem; }
  .navbar-nav { display: none; }
  .navbar-user .btn-secondary { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile Nav Overlay ──────────────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  z-index: 1500;
  flex-direction: column;
  padding: 1rem;
  overflow-y: auto;
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.mobile-nav-overlay a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.mobile-nav-overlay a:hover,
.mobile-nav-overlay a.active {
  color: var(--gold);
  background: rgba(10,86,209,0.05);
}
.mobile-nav-overlay ul li:last-child a { border-bottom: none; }
@media (min-width: 769px) { .mobile-nav-overlay { display: none !important; } }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in { animation: fadeInUp 0.4s ease both; }
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* ── Skeleton Loading ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #E5E7EB 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.8; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 0.5rem; }

/* ── Ticket Visual ───────────────────────────────────────────── */
.ticket-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.ticket-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: var(--ticket-gradient, linear-gradient(135deg, #0A56D1, #4C8DF6, #0842A0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.ticket-platinum { --ticket-gradient: linear-gradient(135deg, #5F6368, #9AA0A6, #3C4043); }
.ticket-gold { --ticket-gradient: linear-gradient(135deg, #0A56D1, #4C8DF6, #0842A0); } /* Blue */
.ticket-silver { --ticket-gradient: linear-gradient(135deg, #D5D6D9, #F1F3F4, #9AA0A6); }

.ticket-header {
  padding: 1.25rem 1.5rem;
  background: var(--ticket-header-bg, rgba(10,86,209,0.05));
  border-bottom: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-body { padding: 1.25rem 1.5rem; }
.ticket-footer {
  padding: 1rem 1.5rem;
  background: rgba(0,0,0,0.03);
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Perforated ticket effect ────────────────────────────────── */
.ticket-tear {
  position: relative;
  display: flex;
  align-items: center;
  gap: -8px;
}
.ticket-tear::before, .ticket-tear::after {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--bg-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Seat Number Display ─────────────────────────────────────── */
.seat-display {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
}

/* ── QR Code ─────────────────────────────────────────────────── */
.qr-wrap {
  background: white;
  border-radius: var(--radius);
  padding: 0.75rem;
  display: inline-block;
  border: 1px solid var(--border);
}

/* ── Entry status ────────────────────────────────────────────── */
.scan-result {
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  animation: fadeInUp 0.4s ease both;
}

.scan-result.success {
  background: #E6F4EA;
  border: 1px solid #CEEAD6;
}

.scan-result.error {
  background: #FCE8E6;
  border: 1px solid #FAD2CF;
}

.scan-result .scan-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

/* ── Mobile hamburger ────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: left center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg); }
@media (max-width: 768px) { .hamburger { display: flex; margin-left: auto; } }

/* ── Utility ─────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Cart Controls */
.qty-controls { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius-pill); padding: 4px; border: 1px solid var(--border); }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg-secondary); color: var(--text-primary); font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all var(--transition);}
.qty-btn:hover:not(:disabled) { background: var(--bg-elevated); color: var(--gold); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-count { font-weight: 600; width: 24px; text-align: center; font-family: var(--font-body); }


/* ── Google Material Icons ───────────────────────────────────── */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}
.icon-sm { font-size: 16px; margin-right: 4px; }
.icon-md { font-size: 20px; margin-right: 4px; }
.icon-lg { font-size: 24px; }

.mtop{
  margin-top: 10px;
}


/* ============================================================
   MOBILE POLISH & RESPONSIVENESS FIXES (FINAL)
   ============================================================ */

@media (max-width: 768px) {
  /* 1. Global Padding & Overflow Fix */
  body { overflow-x: hidden !important; width: 100%; max-width: 100vw; }
  .container { padding: 0 1rem; overflow-x: hidden; max-width: 100%; width: 100%; }
  main { overflow-x: hidden; }
  main { padding: 1.5rem 0 !important; }

  /* 2. Event Page Fixes */
  .grid-2, .grid-3 { display: flex !important; flex-direction: column; gap: 1rem; }
  .card-body > div[style*="display:flex;gap:0.75rem"] { flex-direction: column; gap: 0.75rem; }
  .btn-lg { width: 100%; justify-content: center; }
  div[style*="padding:1.25rem; margin-bottom:1.5rem;"] { padding: 1rem !important; }

  /* 3. Dashboard - Stats Bar Stack */
  .dashboard-stats {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
  }
  .dash-stat { width: 100% !important; padding: 1.25rem; box-sizing: border-box; }

  /* 4. Dashboard - Order History Table */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0; 
    border-radius: var(--radius-lg);
    width: 100%;
  }
  .table-wrap table { min-width: 600px; } 

  /* 5. Dashboard - Ticket Card Fixes */
  .my-ticket { margin-bottom: 1.5rem; border-radius: 12px; }
  
  .my-ticket-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1.25rem; }
  .my-ticket-header > div:last-child { width: 100%; justify-content: flex-start; }

  .my-ticket-body {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.25rem !important;
    gap: 1.25rem !important;
  }

  /* Make details proper list */
  .my-ticket-body > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .ticket-details-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
  }
  .my-ticket-detail {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    word-break: break-word;
  }
  .my-ticket-detail:last-child { border-bottom: none; padding-bottom: 0; }
  
  /* Buttons proper spacing */
  .my-ticket-body > div:last-child {
    display: flex !important;
    flex-direction: column !important; /* Mobile par buttons ek ke neeche ek rahenge */
    gap: 0.75rem !important;
    width: 100%;
  }
  
  .my-ticket-body .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* 6. Modal Fixes */
  .modal { margin: 1rem; width: calc(100% - 2rem); max-height: calc(100vh - 2rem); }
}

@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  h3 { font-size: 1.2rem; }
  /* Step 1 total checkout bar */
  div[style*="display:flex; justify-content:space-between; align-items:center;"] {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch !important;
  }
}




/* ============================================================
   GLOBAL MOBILE OVERFLOW & ALIGNMENT FIXES
   ============================================================ */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Ensure images and canvases never overflow their containers */
img, canvas, video {
  max-width: 100%;
  height: auto;
}

/* Base button responsiveness on mobile */
@media (max-width: 480px) {
  .btn { width: 100%; justify-content: center; }
  .btn-icon { width: 40px; height: 40px; } /* Keep icon buttons square */
  
  /* Fix toast notifications on mobile */
  .toast-container { left: 1rem; right: 1rem; top: calc(var(--nav-height) + 0.5rem); }
  .toast { max-width: 100%; width: 100%; }
}