/* assets/css/style.css — airbkk.in.th */
:root {
  --primary: #0066cc;
  --primary-dark: #0052a3;
  --accent: #ff5733;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --gray-900: #212529;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.09);
  --font: 'Sarabun', 'Noto Sans Thai', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 16px; color: var(--gray-900); background: #f5f6fa; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ===== NAVBAR ===== */
.navbar {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,102,204,.1);
}
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--accent); }
.navbar-nav { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.navbar-nav a { color: var(--gray-700); font-weight: 600; font-size: 0.95rem; transition: color .2s; }
.navbar-nav a:hover { color: var(--primary); }
.btn-admin-link {
  background: var(--primary);
  color: #fff !important;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem 3rem;
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: .5rem; }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 1.5rem; }
.search-box {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.search-box input {
  flex: 1;
  border: none;
  padding: 14px 20px;
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  color: var(--gray-900);
}
.search-box button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  transition: background .2s;
}
.search-box button:hover { background: #e04020; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin-left: .5rem;
}

/* ===== REGION TABS ===== */
.region-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.region-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 2px solid var(--gray-200);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray-700);
  transition: all .2s;
  font-family: var(--font);
}
.region-tab:hover, .region-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== ZONE GRID ===== */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.zone-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  border-left: 4px solid var(--primary);
  display: block;
  color: inherit;
}
.zone-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,102,204,.15);
  color: inherit;
}
.zone-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .3rem; }
.zone-card .zone-en { font-size: .82rem; color: var(--gray-500); margin-bottom: .6rem; }
.slot-bar { height: 6px; background: var(--gray-200); border-radius: 3px; margin-bottom: .5rem; overflow: hidden; }
.slot-bar-fill { height: 100%; background: var(--success); border-radius: 3px; transition: width .3s; }
.slot-bar-fill.full { background: var(--accent); }
.zone-slots-text { font-size: .8rem; color: var(--gray-700); }
.badge-available {
  display: inline-block;
  font-size: .75rem;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  margin-top: .4rem;
}
.badge-available.has-slot { background: #e8f5e9; color: #2e7d32; }
.badge-available.no-slot  { background: #fce4ec; color: #c62828; }

/* ===== ZONE DETAIL PAGE ===== */
.zone-hero {
  background: linear-gradient(135deg, #003d7a, #0066cc);
  color: #fff;
  padding: 2.5rem 1rem 2rem;
}
.zone-hero .breadcrumb { font-size: .85rem; opacity: .8; margin-bottom: .5rem; }
.zone-hero .breadcrumb a { color: rgba(255,255,255,.8); }
.zone-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: .3rem; }
.zone-hero p { opacity: .85; }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.slot-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s;
}
.slot-card:hover { transform: translateY(-3px); }
.slot-card-header {
  background: var(--primary);
  color: #fff;
  padding: .7rem 1.2rem;
  font-size: .82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.slot-card-header.empty { background: var(--gray-200); color: var(--gray-700); }
.slot-card-body { padding: 1.2rem; }
.slot-business { font-size: 1.1rem; font-weight: 700; margin-bottom: .7rem; color: var(--gray-900); }
.slot-contact { display: flex; flex-direction: column; gap: .4rem; }
.slot-contact a {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  color: var(--gray-700);
  transition: color .2s;
}
.slot-contact a:hover { color: var(--primary); }
.slot-contact .icon { font-size: 1.1rem; width: 24px; text-align: center; }
.slot-empty {
  text-align: center;
  padding: 2rem 1.2rem;
  color: var(--gray-500);
}
.slot-empty h4 { font-size: 1rem; margin-bottom: .5rem; color: var(--gray-700); }
.btn-contact {
  display: inline-block;
  margin-top: .8rem;
  background: var(--primary);
  color: #fff;
  padding: 8px 22px;
  border-radius: 20px;
  font-size: .88rem;
  font-weight: 700;
}

/* ===== STATS STRIP ===== */
.stats-strip {
  background: var(--primary);
  color: #fff;
  padding: 1.5rem;
}
.stats-strip .inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.stats-strip .stat-num { font-size: 2rem; font-weight: 800; display: block; }
.stats-strip .stat-label { font-size: .85rem; opacity: .85; }

/* ===== FOOTER ===== */
footer {
  background: #111;
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  font-size: .9rem;
}
footer a { color: rgba(255,255,255,.7); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #212529; }
.btn-sm { padding: 6px 14px; font-size: .82rem; }

/* ===== ADMIN BASE ===== */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: #1a1f36;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: 1.2rem;
  font-weight: 800;
}
.sidebar-brand span { color: #4d9fff; }
.sidebar-nav { padding: .5rem 0; flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1.5rem;
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  font-weight: 600;
  transition: all .2s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(77,159,255,.15);
  color: #fff;
  border-left: 3px solid #4d9fff;
}
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 20px; }
.sidebar-section {
  padding: .8rem 1.5rem .3rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
}
.admin-main { flex: 1; background: #f5f6fa; overflow-x: hidden; }
.admin-topbar {
  background: #fff;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-topbar h2 { font-size: 1.2rem; font-weight: 700; }
.admin-content { padding: 2rem; }

/* ===== ADMIN CARDS / TABLES ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: .88rem; color: var(--gray-700); margin-top: .2rem; }
.stat-card.green { border-color: var(--success); }
.stat-card.green .num { color: var(--success); }
.stat-card.orange { border-color: var(--warning); }
.stat-card.orange .num { color: #e67e00; }
.stat-card.red { border-color: var(--danger); }
.stat-card.red .num { color: var(--danger); }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.card-body { padding: 1.5rem; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  background: var(--gray-100);
  padding: .8rem 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--gray-200);
  color: var(--gray-700);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8f9ff; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger  { background: #fce4ec; color: #c62828; }
.badge-warning { background: #fff8e1; color: #e65100; }
.badge-info    { background: #e3f2fd; color: #1565c0; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-weight: 700; margin-bottom: .4rem; font-size: .9rem; color: var(--gray-700); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--gray-900);
  transition: border-color .2s;
  background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.alert {
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: .9rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.alert-danger  { background: #fce4ec; color: #c62828; border-left: 4px solid #f44336; }
.alert-warning { background: #fff8e1; color: #e65100; border-left: 4px solid #ff9800; }

/* ===== SLOT MATRIX ===== */
.slot-matrix { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.slot-box {
  border-radius: 6px;
  padding: .6rem;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: default;
}
.slot-box.used { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.slot-box.empty { background: #f1f8e9; color: #388e3c; border-color: #a5d6a7; }
.slot-box.expired { background: #fce4ec; color: #c62828; border-color: #ef9a9a; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .zone-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero h1 { font-size: 1.6rem; }
}




