/* ==========================================================================
   RAKSASUK ARENA - Mobile Ergonomics & Visual Perfection Design System
   Precision-Tuned Layout Alignment & Touch Ergonomics for Smartphones
   ========================================================================== */

:root {
  /* Rich Executive Color Palette */
  --bg-main: #0b0f19;          /* Deep Midnight Slate */
  --bg-card: #111827;          /* Elevated Surface Card */
  --bg-card-alt: #1f2937;      /* Secondary Elevated Card */
  --bg-input: #1a2234;         /* Form Control Background */

  /* Authentic Football Brand Colors */
  --pitch-green: #10b981;      /* Grass Emerald Green */
  --pitch-green-dark: #059669; /* Deep Emerald Green */
  --stadium-gold: #f59e0b;     /* Warm Gold / Floodlight */
  --stadium-gold-dark: #d97706;/* Deep Amber */
  --accent-cyan: #38bdf8;      /* Sky Blue Accent */

  /* Text & Contrast Hierarchy */
  --text-bright: #ffffff;      /* High Emphasis Primary Text */
  --text-main: #e5e7eb;        /* Standard Body Text */
  --text-muted: #9ca3af;       /* Medium Emphasis Subtitle */
  --text-dim: #6b7280;         /* Low Emphasis Label/Footer */

  /* Subtle UI Borders & Glassmorphism */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.4);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  /* Dynamic Ambient Lighting & Shadows */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 20px 40px rgba(16, 185, 129, 0.15);
  --shadow-btn: 0 6px 20px rgba(16, 185, 129, 0.3);
  
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.55); }
}

@keyframes greenPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
}

@keyframes shineSheen {
  0% { left: -100%; }
  100% { left: 200%; }
}

@keyframes liveDotPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Kanit', -apple-system, BlinkMacSystemFont, sans-serif;
html, body {
  width: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(16, 185, 129, 0.12) 0%, transparent 65%),
    radial-gradient(circle at 100% 60%, rgba(245, 158, 11, 0.06) 0%, transparent 55%);
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

/* Flex Utilities */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   Navbar & Mobile Touch Navigation
   -------------------------------------------------------------------------- */
.navbar {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
}

.nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pitch-green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-bright);
  line-height: 1.1;
}

.subbrand {
  font-size: 10px;
  color: var(--stadium-gold);
  font-weight: 500;
}

/* Navigation Scroll Wrapper & Sleek Micro Scroll Indicator */
.nav-scroll-wrapper {
  position: relative;
  width: 100%;
}

.nav-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, rgba(17, 24, 39, 0.95));
  pointer-events: none;
  z-index: 10;
}

.nav-links {
  width: 100%;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 4px 38px 4px 2px; /* Right padding ensures no button is hidden behind edge fade */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-scroll-hint-badge {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: navPulseBounce 1.5s infinite ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes navPulseBounce {
  0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.85; }
  50% { transform: translateY(-50%) translateX(4px); opacity: 1; }
}

.nav-scroll-hint-badge.hidden-hint {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(-50%) translateX(8px) !important;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-bounce);
}

.nav-btn:hover, .nav-btn:focus {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  background: var(--pitch-green);
  color: var(--text-bright);
  font-weight: 600;
  box-shadow: var(--shadow-btn);
}

.admin-btn {
  border: 1px dashed rgba(245, 158, 11, 0.4);
  color: var(--stadium-gold);
}

.admin-btn.active {
  background: var(--stadium-gold);
  color: #000;
}

/* --------------------------------------------------------------------------
   Hero Section & Mobile Carousel
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 24px 0 16px 0;
  animation: fadeInUp 0.6s ease-out;
}

.hero-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--stadium-gold);
  animation: pulseGlow 3.5s infinite ease-in-out;
}

.arena-tag {
  display: inline-block;
  background: rgba(245, 158, 11, 0.12);
  color: var(--stadium-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
  line-height: 1.25;
}

.gradient-text {
  color: var(--pitch-green);
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 680px;
  margin: 0 auto 20px auto;
  line-height: 1.5;
}

/* Dynamic Slider Carousel */
.slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 880px;
  height: 250px; /* Ergonomic Mobile Height */
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

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

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(11, 15, 25, 0.95), transparent);
  color: var(--text-bright);
  padding: 20px 16px 12px 16px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17, 24, 39, 0.75);
  color: var(--text-bright);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* --------------------------------------------------------------------------
   Cards & Content Tabs
   -------------------------------------------------------------------------- */
.main-container {
  padding-bottom: 40px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 12px;
}

/* 4-Step Workflow Box */
.workflow-timeline-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
}

.workflow-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--stadium-gold);
  margin-bottom: 12px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.wf-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(11, 15, 25, 0.55);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.wf-num {
  background: var(--pitch-green);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.wf-text strong {
  display: block;
  font-size: 12px;
  color: var(--text-bright);
}

.wf-text small {
  color: var(--text-muted);
  font-size: 10px;
}

/* --------------------------------------------------------------------------
   Mobile-Optimized Schedule Matrix Table
   -------------------------------------------------------------------------- */
.matrix-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.filter-item {
  width: 100%;
}

.filter-item label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.legend-bar {
  margin: 14px 0 10px 0;
  padding: 10px 12px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.legend-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-tag.available .badge-dot { background: var(--pitch-green); }
.legend-tag.selected .badge-dot { background: var(--stadium-gold); }
.legend-tag.booked .badge-dot { background: var(--text-dim); }

.multi-slots-badge {
  font-size: 12px;
  color: var(--stadium-gold);
  font-weight: 500;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

.schedule-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.schedule-matrix-table th,
.schedule-matrix-table td {
  padding: 8px 6px;
  text-align: center;
  border: 1px solid var(--border-color);
  font-size: 11px;
}

.schedule-matrix-table th {
  background: var(--bg-card-alt);
  color: var(--text-bright);
  font-weight: 500;
  white-space: nowrap;
}

.sticky-col {
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 10;
  text-align: left !important;
  min-width: 120px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
}

.day-title-main {
  display: block;
  font-weight: 600;
  color: var(--text-bright);
  font-size: 11px;
}

.day-title-sub {
  font-size: 10px;
  color: var(--pitch-green);
}

.time-header-two-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  padding: 2px 0;
}

.time-top {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-bright);
}

.time-bot {
  font-size: 9px;
  color: var(--text-muted);
}

/* 5-Day Matrix Card & Full-Width Table Optimization */
.matrix-box {
  padding: 12px 6px !important;
  width: 100%;
}

.no-scroll-matrix-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

.compact-5days-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 8px;
}

.compact-5days-table th {
  background: var(--bg-card-alt);
  color: var(--text-bright);
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 1px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.compact-5days-table td {
  padding: 2px 1px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.sticky-col {
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 10;
  text-align: left !important;
  min-width: 68px;
  padding: 4px 2px !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
}

.matrix-slot-btn {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 2px 0;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

/* 🟢 Available: Solid Pitch Green Fill */
.matrix-slot-btn.available {
  background: var(--pitch-green);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.matrix-slot-btn.available:hover {
  background: #059669;
  transform: scale(1.02);
}

/* 🟥 Booked: Solid Vivid Crimson Red Fill */
.matrix-slot-btn.booked {
  background: #ef4444 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: not-allowed;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* 🟧 Selected: Solid Amber Gold Fill */
.matrix-slot-btn.selected {
  background: var(--stadium-gold);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  transform: scale(1.03);
}

.matrix-slot-btn.available {
  background: rgba(16, 185, 129, 0.12);
  color: var(--pitch-green);
  border-color: rgba(16, 185, 129, 0.3);
}

.matrix-slot-btn.selected {
  background: var(--stadium-gold);
  color: #000;
  font-weight: 600;
}

.matrix-slot-btn.booked {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-dim);
  border-color: transparent;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Rain Maintenance Banner
   -------------------------------------------------------------------------- */
.rain-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

.alert-icon { font-size: 24px; flex-shrink: 0; }
.alert-content strong { color: #ef4444; font-size: 13px; }
.alert-content p { color: var(--text-main); font-size: 11px; margin-top: 4px; line-height: 1.4; }
.badge-turf-only { display: inline-block; background: rgba(16, 185, 129, 0.2); color: var(--pitch-green); padding: 2px 6px; border-radius: 4px; font-weight: 600; margin-top: 4px; }

/* --------------------------------------------------------------------------
   Form & Input Controls (iOS Safari Auto-Zoom Fix)
   -------------------------------------------------------------------------- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  box-shadow: var(--shadow-card);
}

.form-logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 10px;
  border: 2px solid var(--stadium-gold);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group label span { color: #ef4444; }

/* Prevent iOS Safari 16px auto-zoom bug */
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-bright);
  font-size: 16px; /* Must be 16px to prevent iOS auto zoom */
  min-height: 44px;
  transition: var(--transition-fast);
}

.bright-date-picker {
  color-scheme: dark;
  font-size: 16px;
}

.form-input:focus {
  outline: none;
  border-color: var(--pitch-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr; /* 100% Single Column on Mobile */
  gap: 14px;
}

/* Time Slot Chips */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.time-slot-chip input { display: none; }
.time-slot-chip label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
}

.time-slot-chip input:checked + label {
  background: var(--pitch-green);
  color: #fff;
  border-color: var(--pitch-green);
}

/* Price Summary Box & Mobile Submit Button */
.price-summary-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin: 18px 0;
}

.price-label { font-size: 12px; color: var(--text-bright); font-weight: 500; }
.price-value { font-size: 20px; font-weight: 700; color: var(--pitch-green); }

.btn-submit {
  position: relative;
  width: 100%;
  min-height: 48px;
  background: var(--pitch-green);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   50 / 50 Equal Split Layout (Mobile Stack)
   -------------------------------------------------------------------------- */
.split-50-container {
  display: grid;
  grid-template-columns: 1fr; /* Stack on Mobile */
  gap: 16px;
  margin-top: 14px;
}

.split-column {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
}

.column-header-badge {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}

.red-gradient-badge { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.35); }
.green-gradient-badge { background: rgba(16, 185, 129, 0.15); color: var(--pitch-green); border: 1px solid rgba(16, 185, 129, 0.35); }

.announcement-subcard {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.badge-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; margin-bottom: 6px; }
.red-tag { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.blue-tag { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }

.poster-img-50 { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 8px; }
.poster-title-red { color: #ef4444; font-size: 13px; margin-bottom: 4px; }
.poster-desc-text { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.turf-active-banner { margin-top: 8px; background: rgba(16, 185, 129, 0.1); color: var(--pitch-green); padding: 6px; border-radius: 6px; font-size: 11px; text-align: center; }

.price-compare-flex { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; }
.old-price { text-decoration: line-through; color: var(--text-dim); font-size: 11px; }
.new-price { color: var(--accent-cyan); font-weight: 700; font-size: 14px; }

/* 10 Rules Grid */
.rules-list-50 { display: flex; flex-direction: column; gap: 8px; }
.rule-item-50 {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
/* Mobile-Native Responsive Cards for Tab 3 (📋 รายละเอียดการจอง) */
.mobile-booking-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-booking-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.mobile-card-id {
  font-size: 13px;
  font-weight: 700;
  color: #f09433;
}

.mobile-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* Mobile Card View Row Elements */

/* --------------------------------------------------------------------------
   Data Tables & Details Tab
   -------------------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--stadium-gold);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 14px;
  font-size: 13.5px;
  color: var(--text-bright);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* --------------------------------------------------------------------------
   Payment Instructions Tab
   -------------------------------------------------------------------------- */
.payment-steps-vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.p-step-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.p-step-badge { background: var(--pitch-green); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; display: inline-block; margin-bottom: 4px; }
.p-step-content strong { display: block; font-size: 12px; color: var(--text-bright); margin-bottom: 2px; }
.p-step-content p { font-size: 11px; color: var(--text-muted); }

.payment-grid {
  display: grid;
  grid-template-columns: 1fr; /* Stack on Mobile */
  gap: 16px;
  margin-top: 16px;
}

.qr-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
}

.kbank-theme { border-color: rgba(16, 185, 129, 0.4); }
.account-num-highlight { font-size: 17px; color: var(--pitch-green); font-family: 'Outfit', sans-serif; letter-spacing: 1px; }

.line-official-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #00c300;
  color: #fff;
  text-decoration: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  margin-top: 12px;
  box-shadow: 0 4px 15px rgba(0, 195, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Admin Dashboard Stats
   -------------------------------------------------------------------------- */
.admin-stats {
  display: grid;
  grid-template-columns: 1fr; /* Stack on Mobile */
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-lg);
}

.stat-icon { font-size: 26px; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--text-bright); }
.stat-desc { font-size: 11px; color: var(--text-muted); }

/* Toast & Footer */
.toast {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--bg-card-alt);
  color: var(--text-bright);
  border: 1px solid var(--pitch-green);
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 2000;
  text-align: center;
  font-size: 12px;
}

.toast.hidden { display: none; }

.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 11px;
}

.footer-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-bottom: 4px;
}

/* Live Form Sync Notice Banners */
.form-slots-notice-empty {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transition: var(--transition-fast);
}
.form-slots-notice-active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  transition: var(--transition-fast);
}

/* View Mode Toggle Buttons */
.view-toggle-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.view-toggle-btn.active {
  background: var(--pitch-green);
  color: #fff;
  border-color: var(--pitch-green);
  font-weight: 600;
}

/* Daily Cards View Container (100% Mobile Clarity) */
.daily-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.day-card-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: var(--transition-fast);
}

.day-card-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.day-card-date-title {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 14px;
}

.day-card-badge {
  font-size: 11px;
  color: var(--pitch-green);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.day-card-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.day-slot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  min-height: 44px;
  transition: var(--transition-bounce);
}

.day-slot-btn.available {
  background: rgba(16, 185, 129, 0.12);
  color: var(--pitch-green);
  border-color: rgba(16, 185, 129, 0.3);
}

.day-slot-btn.available:hover {
  background: var(--pitch-green);
  color: #fff;
}

.day-slot-btn.selected {
  background: var(--stadium-gold);
  color: #000;
  font-weight: 600;
}

.day-slot-btn.booked {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-dim);
  border-color: transparent;
  cursor: not-allowed;
}

/* Mobile Smartphone Layout Optimization for 5-Day Compact Table */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .logo {
    justify-content: center;
  }
  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }
  .nav-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  /* Smartphone Compact 5-Day Table Sizing */
  .time-header-two-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
  }
  .time-header-two-lines .time-top {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: var(--text-bright);
  }
  .time-header-two-lines .time-bot {
    font-size: 8.5px !important;
    font-weight: 600 !important;
    color: #94a3b8;
  }

  .compact-5days-table th {
    padding: 4px 1px !important;
    font-weight: 700;
    vertical-align: middle;
  }
  .compact-5days-table td {
    padding: 2px 1px !important;
    vertical-align: middle;
  }
  .day-title-box-2lines {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.25;
    padding-left: 2px;
  }
  .day-title-box-2lines .day-line-top {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: var(--text-bright);
    white-space: nowrap;
  }
  .day-title-box-2lines .badge-tag {
    color: var(--pitch-green);
    font-size: 8.5px !important;
    font-weight: 700 !important;
  }
  .day-title-box-2lines .day-line-bot {
    font-size: 8.5px !important;
    font-weight: 600 !important;
    color: #94a3b8;
  }

  .matrix-slot-btn {
    min-height: 30px !important;
    font-size: 9.5px !important;
    padding: 2px 0px !important;
    border-radius: 3px !important;
    font-weight: 700;
  }
  .matrix-filter-group-stacked {
    max-width: 100% !important;
  }
}

/* Default Display for 2-Line Date Cell */
.day-title-box-2lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.25;
  padding-left: 4px;
}
.day-title-box-2lines .day-line-top {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
}
.day-title-box-2lines .badge-tag {
  color: var(--pitch-green);
  font-size: 9.5px;
  font-weight: 700;
}
.day-title-box-2lines .day-line-bot {
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
}

/* Default Display for 2-Line Time Spans */
.time-header-two-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.time-header-two-lines .time-top {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-bright);
}
.time-header-two-lines .time-bot {
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
}

@media (min-width: 769px) {
  .matrix-filter-group { flex-direction: row; }
  .legend-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .split-50-container { grid-template-columns: 1fr 1fr; }
  .payment-grid { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .toast { left: auto; width: max-content; }
}

/* --------------------------------------------------------------------------
   Receipt Bill Card Component (Matching User Reference Image 1-to-1)
   -------------------------------------------------------------------------- */
.booking-bills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

@media (max-width: 480px) {
  .booking-bills-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.receipt-bill-card {
  background: #ffffff !important;
  border-radius: 18px !important;
  padding: 20px 22px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
  font-family: 'Kanit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.receipt-bill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
}

.bill-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bill-field-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 700;
  color: #c2185b !important; /* Magenta-Reddish Pink like user image */
}

.field-dot-icon {
  font-size: 14px;
  color: #e53e3e !important;
}

.bill-date-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #718096 !important;
}

.bill-divider {
  border: none !important;
  border-top: 1px solid #e2e8f0 !important;
  margin: 12px 0 16px 0 !important;
}

.bill-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bill-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  line-height: 1.4;
}

.bill-label {
  color: #4a5568 !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bill-value {
  color: #1a202c !important;
  font-weight: 600;
  text-align: right;
}

.text-bold {
  font-weight: 700;
  font-size: 14.5px;
  color: #1a202c !important;
}

/* Pill Badges in Bill Card */
.bill-value .time-pill {
  background: linear-gradient(135deg, #dd6b20, #e53e3e);
  color: #ffffff;
  padding: 5px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(229, 62, 62, 0.3);
}

.bill-value .pending-pill {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: #ffffff;
  padding: 5px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12.5px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(237, 137, 54, 0.3);
}

.bill-value .approved-pill {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: #ffffff;
  padding: 5px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12.5px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(72, 187, 120, 0.3);
}
