/* ===== Root Variables ===== */
:root {
  --primary: #1D4ED8;
  --secondary: #0EA5E9;
  --accent: #F59E0B;
  --bg: #FFFFFF;
  --text: #1E293B;
  --light-bg: #F1F5F9;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn:hover { background: var(--secondary); transform: translateY(-3px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #d98c08; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-nav { background: var(--accent) !important; color: #fff !important; padding: 10px 22px !important; border-radius: 30px; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.logo { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--primary); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 26px; height: 3px; background: var(--primary); border-radius: 2px; transition: var(--transition); }

/* ===== Alerts ===== */
.alert {
  max-width: 1200px;
  margin: 16px auto;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 500;
}
.alert-success { background: #DCFCE7; color: #166534; border-left: 4px solid #22C55E; }
.alert-error { background: #FEE2E2; color: #991B1B; border-left: 4px solid #EF4444; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 100px 0 140px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -200px; right: -150px;
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 750px; margin: 0 auto; }
.hero h1 { font-size: 3rem; margin-bottom: 18px; }
.hero p { font-size: 1.15rem; opacity: 0.92; margin-bottom: 30px; }

/* ===== Search Box ===== */
.search-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: -70px auto 60px;
  max-width: 1000px;
  position: relative;
  z-index: 5;
}
.trip-toggle { display: flex; gap: 20px; margin-bottom: 18px; }
.trip-toggle label { display: flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.search-grid { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 16px; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.4px; }
.form-group input, .form-group select {
  padding: 12px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }

/* ===== Generic Sections ===== */
.section { padding: 80px 0; }
.section-light { background: var(--light-bg); }
.section-title { text-align: center; max-width: 650px; margin: 0 auto 50px; }
.section-title .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: 0.85rem; }
.section-title h2 { font-size: 2.2rem; margin: 10px 0 12px; color: var(--text); }
.section-title p { color: #64748B; }

/* ===== Cards ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(30,41,59,0.12); }
.card .icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 18px;
}
.card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card p { color: #64748B; font-size: 0.95rem; }

/* ===== Flight Result Card ===== */
.flight-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
  border-left: 5px solid var(--secondary);
  transition: var(--transition);
}
.flight-card:hover { transform: translateX(6px); box-shadow: 0 15px 35px rgba(30,41,59,0.1); }
.flight-route { display: flex; align-items: center; gap: 14px; }
.flight-route .time { font-size: 1.3rem; font-weight: 700; }
.flight-route .code { color: #64748B; font-size: 0.85rem; }
.flight-route .line { width: 90px; height: 2px; background: #CBD5E1; position: relative; }
.flight-route .line::after { content: '✈'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); color: var(--secondary); }
.flight-price { text-align: right; }
.flight-price .amount { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

/* ===== Auth Forms ===== */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: var(--light-bg);
}
.auth-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px;
  max-width: 460px;
  width: 100%;
}
.auth-box h2 { text-align: center; margin-bottom: 8px; }
.auth-box .sub { text-align: center; color: #64748B; margin-bottom: 28px; }
.auth-box .form-group { margin-bottom: 18px; }
.auth-box .btn { width: 100%; }
.auth-links { text-align: center; margin-top: 20px; font-size: 0.92rem; }
.auth-links a { color: var(--primary); font-weight: 600; }

/* ===== Seat Map ===== */
.seat-map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 420px; margin: 0 auto; }
.seat {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: #E2E8F0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.seat.available:hover { background: var(--secondary); color: #fff; transform: scale(1.1); }
.seat.selected { background: var(--accent); color: #fff; }
.seat.booked { background: #94A3B8; color: #fff; cursor: not-allowed; opacity: 0.6; }

/* ===== Testimonial Slider ===== */
.testimonial-slider { position: relative; max-width: 750px; margin: 0 auto; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.5s ease; }
.testimonial-slide { flex: 0 0 100%; padding: 10px; }
.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
}
.testimonial-card .stars { color: var(--accent); margin-bottom: 14px; font-size: 1.1rem; }
.testimonial-card p { font-style: italic; color: #475569; margin-bottom: 20px; font-size: 1.05rem; }
.testimonial-card .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 12px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #CBD5E1; cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--primary); width: 26px; border-radius: 6px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: #fff; border: none; box-shadow: var(--shadow);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  color: var(--primary); z-index: 5;
}
.slider-arrow.prev { left: -10px; }
.slider-arrow.next { right: -10px; }

/* ===== Footer ===== */
.site-footer { background: var(--text); color: #CBD5E1; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 40px; }
.footer-col h3 { color: #fff; }
.footer-col h4 { color: #fff; margin-bottom: 16px; }
.footer-col p { font-size: 0.9rem; margin-top: 12px; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--secondary); }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; transition: var(--transition); }
.socials a:hover { background: var(--accent); }
.footer-bottom { text-align: center; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }

/* ===== Admin ===== */
.admin-wrapper { display: flex; min-height: 100vh; position: relative; }
.admin-sidebar { width: 260px; background: var(--text); color: #fff; padding: 24px 0; flex-shrink: 0; }
.admin-sidebar .logo { color: #fff; padding: 0 24px 24px; display: block; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 16px; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 13px 24px; color: #CBD5E1; transition: var(--transition); }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; border-left: 3px solid var(--accent); }
.admin-main { flex: 1; background: var(--light-bg); padding: 30px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { color: #64748B; font-size: 0.9rem; }
.admin-table { width: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid #F1F5F9; }
.admin-table th { background: var(--light-bg); font-size: 0.82rem; text-transform: uppercase; color: #64748B; }
.badge { padding: 5px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

/* Admin mobile-menu controls (hidden on desktop) */
.admin-hamburger {
  display: flex; flex-direction: column; gap: 5px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow);
  cursor: pointer; border: none;
}
.admin-hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.admin-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1500;
}
.admin-overlay.show { display: block; }
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (min-width: 769px) {
  .admin-hamburger, .admin-overlay { display: none !important; }
}

/* ===== E-Ticket ===== */
.eticket { max-width: 700px; margin: 40px auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.eticket-header { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; }
.eticket-body { padding: 30px; }
.eticket-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed #E2E8F0; }
.eticket-row .label { color: #64748B; font-size: 0.85rem; }
.eticket-row .value { font-weight: 600; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .search-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: flex-start;
    padding: 24px; gap: 18px; box-shadow: var(--shadow);
    transform: translateY(-150%); opacity: 0; transition: var(--transition);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 2.1rem; }
  .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }

  .admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 2000;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { padding: 20px 16px 90px; width: 100%; }
  .admin-topbar { flex-wrap: wrap; gap: 12px; }
  .admin-topbar h2 { font-size: 1.3rem; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .admin-table { min-width: 700px; }
}