/* ==========================================================================
   Eventok Enterprise SaaS Design System (TryBooking & Stripe Grade)
   Zero Emojis • Vector SVG Icons • 100% Mobile Responsive
   ========================================================================== */

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

:root {
  /* Enterprise SaaS Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;
  --primary-border: #bfdbfe;
  
  --secondary: #0f172a;
  --secondary-hover: #1e293b;
  
  --success: #059669;
  --success-subtle: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #d97706;
  --warning-subtle: #fffbeb;
  --warning-border: #fde68a;
  
  --danger: #dc2626;
  --danger-subtle: #fef2f2;
  --danger-border: #fecaca;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #2563eb;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 30px -10px rgba(15, 23, 42, 0.12);
  --shadow-sticky: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

/* ==========================================================================
   APP SHELL & 100% MOBILE RESPONSIVE WRAPPER
   ========================================================================== */
.app-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  position: relative;
}

.desktop-wide {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .desktop-wide {
    padding: 0 24px;
  }
}

/* ==========================================================================
   NAVIGATION BAR (Fully Responsive, Zero Horizontal Overflow)
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 20px;
  gap: 12px;
}

.desktop-wide .top-nav {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  min-width: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.brand-badge {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn-text {
  display: inline;
}

@media (max-width: 640px) {
  .top-nav {
    padding: 0 12px;
    height: 58px;
    margin-bottom: 14px;
  }
  .brand-logo {
    font-size: 1.05rem;
    gap: 8px;
  }
  .nav-btn-text {
    display: none;
  }
  .hide-on-mobile {
    display: none !important;
  }
}

/* Icon Buttons */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Universal SVG Icon Helpers (Zero Emojis System) */
.icon-svg {
  display: inline-block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  vertical-align: -2px;
  flex-shrink: 0;
}

.icon-svg-lg {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
}

.icon-svg-sm {
  width: 13px;
  height: 13px;
  vertical-align: -1px;
}

/* Universal Mobile Slide-over Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 310px;
  max-width: 85vw;
  background: #ffffff;
  z-index: 101;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.mobile-drawer-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-drawer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  padding: 0 4px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.mobile-drawer-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Bottom App Navigation for Mobile Handsets */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    z-index: 60;
    padding-bottom: env(safe-area-inset-bottom, 2px);
    box-shadow: var(--shadow-sticky);
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
  }

  .nav-item:hover, .nav-item.active {
    color: var(--primary);
  }

  .main-content {
    padding-bottom: 84px !important;
  }
}

/* ==========================================================================
   CARDS & SURFACES
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

@media (min-width: 640px) {
  .card {
    padding: 22px;
  }
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.45;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}

.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ==========================================================================
   TRYBOOKING CALENDAR DATE BADGE
   ========================================================================== */
.calendar-date-badge {
  width: 48px;
  height: 52px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.calendar-month {
  background: #2563eb;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 0;
  letter-spacing: 0.5px;
}

.calendar-day {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 2px;
}

/* Status Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.badge-pending {
  background: var(--warning-subtle);
  color: #b45309;
  border: 1px solid var(--warning-border);
}

.badge-slip {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-valid, .badge-confirmed {
  background: var(--success-subtle);
  color: #047857;
  border: 1px solid var(--success-border);
}

.badge-expired, .badge-cancelled {
  background: var(--danger-subtle);
  color: #b91c1c;
  border: 1px solid var(--danger-border);
}

.badge-used {
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

/* ==========================================================================
   EVENT CARD GRID
   ========================================================================== */
.event-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

.event-poster {
  width: 100%;
  height: 185px;
  object-fit: cover;
  background-color: var(--bg-subtle);
}

.event-category-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: white;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
}

.event-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.event-meta svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-tertiary);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.event-price {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

/* ==========================================================================
   CONCERT TICKET & DIGITAL WALLET PASS (Apple/Google Wallet Grade)
   ========================================================================== */
.wallet-pass {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: relative;
  margin-bottom: 24px;
  overflow: hidden;
}

.pass-header {
  padding: 18px 20px;
  background: #0f172a;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pass-header h3 {
  color: white;
}

.pass-body {
  padding: 20px;
  background: #ffffff;
}

.pass-perforation {
  position: relative;
  height: 24px;
  margin: 0 -1px;
  background: #ffffff;
  display: flex;
  align-items: center;
}

.pass-perforation::before, .pass-perforation::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background-color: var(--bg-page);
  border-radius: 50%;
  top: 1px;
}

.pass-perforation::before {
  left: -11px;
  box-shadow: inset -2px 0 3px rgba(0,0,0,0.06);
}

.pass-perforation::after {
  right: -11px;
  box-shadow: inset 2px 0 3px rgba(0,0,0,0.06);
}

.pass-dash-line {
  width: 100%;
  border-bottom: 2px dashed #cbd5e1;
}

.pass-qr-section {
  padding: 24px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
}

.pass-qr-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 8px;
  background: white;
  padding: 8px;
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.pass-code-text {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* ==========================================================================
   BOTTOM DRAWER MODALS
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@media (min-width: 641px) {
  .drawer-backdrop {
    align-items: center;
  }
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-drawer {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xl);
}

@media (min-width: 641px) {
  .bottom-drawer {
    border-radius: var(--radius-lg);
    transform: scale(0.96);
  }
}

.drawer-backdrop.active .bottom-drawer {
  transform: translateY(0);
}

@media (min-width: 641px) {
  .drawer-backdrop.active .bottom-drawer {
    transform: scale(1);
  }
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
}

@media (min-width: 641px) {
  .drawer-handle {
    display: none;
  }
}

/* Bank Transfer Copy Box */
.bank-copy-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 14px 0;
}

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.bank-row:last-child {
  border-bottom: none;
}

.copy-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.copy-pill:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Toast System */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.25s ease;
  pointer-events: auto;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--primary); }

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Sticky Booking Bottom Bar (Fixed for Mobile Screens) */
.sticky-seat-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 45;
  box-shadow: var(--shadow-sticky);
}

@media (min-width: 1024px) {
  .sticky-seat-bar {
    max-width: 1220px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}
