/* ============================================================================
   EasyTicket B2B — Red & White Theme
   easyticket.com.pk
   ========================================================================== */
:root {
  --red-50: #fef2f2; --red-100: #fee2e2; --red-200: #fecaca; --red-300: #fca5a5;
  --red-400: #f87171; --red-500: #ef4444; --red-600: #dc2626; --red-700: #b91c1c;
  --red-800: #991b1b; --red-900: #7f1d1d; --red-950: #450a0a;
  --rose-600: #e11d48; --rose-700: #be123c;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1;
  --slate-400: #94a3b8; --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155;
  --slate-800: #1e293b; --slate-900: #0f172a; --slate-950: #020617;
  --emerald-500: #10b981; --emerald-600: #059669; --emerald-700: #047857;
  --amber-500: #f59e0b; --amber-600: #d97706;
  --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--slate-50); color: var(--slate-800);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--slate-500); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 12px; font-weight: 700; font-size: 13px;
  cursor: pointer; border: none; transition: all .15s ease; text-transform: uppercase; letter-spacing: .5px;
}
.btn-primary { background: var(--red-600); color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.25); }
.btn-primary:hover { background: var(--red-700); transform: translateY(-1px); }
.btn-dark { background: var(--slate-900); color: #fff; }
.btn-dark:hover { background: var(--slate-700); }
.btn-outline { background: #fff; color: var(--slate-700); border: 1px solid var(--slate-200); }
.btn-outline:hover { background: var(--slate-50); }
.btn-success { background: var(--emerald-600); color: #fff; }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 11px; border-radius: 8px; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 20px;
  padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.card-hover { transition: all .2s ease; }
.card-hover:hover { border-color: var(--red-300); box-shadow: 0 8px 24px rgba(0,0,0,.08); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.badge-available { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-low { background: #fffbeb; color: #78350f; border: 1px solid #fcd34d; }
.badge-last { background: var(--red-600); color: #fff; animation: pulse 1.5s infinite; }
.badge-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* ---------- Header ---------- */
.topbar {
  background: var(--slate-900); color: var(--slate-300); font-size: 12px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar .live-dot { width: 8px; height: 8px; background: var(--emerald-500); border-radius: 50%; display: inline-block; animation: pulse 1.5s infinite; }
.topbar a { color: var(--red-400); font-weight: 600; }

.main-header { background: #fff; border-bottom: 1px solid var(--slate-200); position: sticky; top: 0; z-index: 50; }
.main-header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--red-500), var(--red-600), var(--rose-600));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 4px 12px rgba(220,38,38,.3);
}
.brand-name { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; color: var(--slate-900); }
.brand-name span { color: var(--red-600); }
.brand-tag { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--slate-500); }

.main-nav { display: flex; gap: 22px; font-size: 14px; font-weight: 600; color: var(--slate-700); }
.main-nav a:hover { color: var(--red-600); }
.header-cta { display: flex; gap: 10px; align-items: center; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900) 60%, var(--red-950));
  color: #fff; padding: 60px 0 90px; position: relative; overflow: hidden;
}
.hero h1 { font-size: 46px; font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
.hero h1 .grad { background: linear-gradient(90deg, var(--red-400), var(--rose-600)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--slate-300); font-size: 16px; max-width: 640px; margin: 14px auto 0; }
.hero-center { text-align: center; max-width: 760px; margin: 0 auto; }
.hero-chip {
  display: inline-flex; gap: 8px; align-items: center; padding: 6px 16px; border-radius: 999px;
  background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.3); color: #fca5a5; font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.login-cta {
  background: rgba(15,23,42,.7); border: 1px solid rgba(51,65,85,.8); border-radius: 16px;
  padding: 14px 18px; margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  font-size: 13px; color: #fbbf24;
}

/* ---------- Search Box ---------- */
.search-panel {
  background: #fff; border-radius: 24px; padding: 24px; max-width: 920px; margin: 0 auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); border: 1px solid var(--slate-100);
}
.trip-switch { display: flex; gap: 4px; background: var(--slate-100); border-radius: 12px; padding: 4px; width: fit-content; font-size: 12px; font-weight: 600; }
.trip-switch button { padding: 6px 16px; border-radius: 9px; border: none; background: transparent; cursor: pointer; color: var(--slate-600); }
.trip-switch button.active { background: #fff; color: var(--red-700); font-weight: 700; }
.search-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 820px) { .search-grid { grid-template-columns: 1fr; } }
.field {
  position: relative; border: 2px solid var(--slate-200); border-radius: 16px; padding: 12px 14px;
  background: #fafafa; cursor: pointer; transition: border .15s; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between;
}
.field:hover { border-color: var(--red-400); }
.field .flabel { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--red-600); display: flex; align-items: center; gap: 5px; }
.field .fval { font-size: 20px; font-weight: 900; color: var(--slate-900); }
.field .fsub { font-size: 12px; color: var(--slate-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field input[type=date] { border: none; background: transparent; font-weight: 800; font-size: 15px; color: var(--slate-900); width: 100%; cursor: pointer; }
.autocomplete {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px; background: #fff;
  border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.18); border: 1px solid var(--slate-200);
  z-index: 100; overflow: hidden;
}
.autocomplete input { width: 100%; padding: 10px 14px; border: none; border-bottom: 1px solid var(--slate-200); font-size: 13px; outline: none; }
.autocomplete .ac-list { max-height: 260px; overflow-y: auto; }
.autocomplete .ac-item { padding: 10px 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.autocomplete .ac-item:hover { background: var(--red-50); }
.autocomplete .ac-item .city { font-weight: 700; color: var(--slate-900); }
.autocomplete .ac-item .sub { font-size: 11px; color: var(--slate-400); }
.search-submit { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; padding: 12px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--slate-400); border-bottom: 1px solid var(--slate-200); background: var(--slate-50); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
table.data tr:hover td { background: #fafafa; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--slate-700); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--slate-300); border-radius: 12px;
  font-size: 13px; font-family: inherit; transition: border .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--red-500); box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Flight card ---------- */
.flight-card { border: 1px solid var(--slate-200); border-radius: 20px; background: #fff; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.flight-card-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: var(--slate-50); border-bottom: 1px solid var(--slate-100); font-size: 12px; flex-wrap: wrap; gap: 8px; }
.flight-card-body { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; padding: 24px; align-items: center; }
@media (max-width: 800px) { .flight-card-body { grid-template-columns: 1fr; } }
.times { display: flex; align-items: center; justify-content: space-between; max-width: 460px; }
.time-block .t { font-size: 26px; font-weight: 900; }
.time-block .c { font-weight: 700; color: var(--red-700); font-size: 15px; }
.time-block .s { font-size: 11px; color: var(--slate-400); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flight-path { flex: 1; padding: 0 20px; text-align: center; }
.flight-path .dur { font-size: 11px; color: var(--slate-500); margin-bottom: 4px; }
.flight-path .line { border-top: 2px dashed var(--slate-300); position: relative; }
.flight-path .plane { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 6px; color: var(--red-600); }
.price-block { border-left: 1px solid var(--slate-100); padding-left: 24px; }
.price-net { font-size: 24px; font-weight: 900; color: var(--slate-900); }
.price-retail { font-size: 12px; color: var(--slate-400); text-decoration: line-through; }
.saving { font-size: 11px; color: var(--emerald-700); font-weight: 600; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--slate-600); }
.amenities span { background: var(--slate-100); padding: 4px 10px; border-radius: 6px; }

/* ---------- Layout grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section h2 { font-size: 32px; font-weight: 900; letter-spacing: -.5px; color: var(--slate-900); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--red-600); }

/* ---------- Stat cards (dashboards) ---------- */
.stat-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 18px; padding: 20px; }
.stat-card .s-icon { color: var(--slate-400); margin-bottom: 8px; }
.stat-card .s-val { font-size: 28px; font-weight: 900; color: var(--slate-900); }
.stat-card .s-label { font-size: 12px; font-weight: 700; color: var(--slate-500); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Dashboard layout ---------- */
.dash-layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--slate-950); color: #fff; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; }
.sidebar .sb-head { padding: 20px; border-bottom: 1px solid var(--slate-800); }
.sidebar nav { padding: 12px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--slate-400); margin-bottom: 2px;
}
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar nav a.active { background: var(--red-600); color: #fff; }
.sidebar .sb-foot { padding: 16px; border-top: 1px solid var(--slate-800); }
.dash-main { flex: 1; overflow: hidden; }
.dash-topbar { background: #fff; border-bottom: 1px solid var(--slate-200); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; }
.dash-content { padding: 28px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.tabs a, .tabs button {
  padding: 8px 16px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: #fff; border: 1px solid var(--slate-200); color: var(--slate-600); cursor: pointer;
}
.tabs a.active, .tabs button.active { background: var(--red-600); color: #fff; border-color: var(--red-600); }

/* ---------- Footer ---------- */
.footer { background: var(--slate-950); color: var(--slate-300); padding: 64px 0 40px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; font-size: 13px; color: var(--slate-400); }
.footer ul li a:hover { color: var(--red-400); }
.footer-bottom { border-top: 1px solid var(--slate-800); margin-top: 40px; padding-top: 24px; display: flex; justify-content: space-between; font-size: 12px; color: var(--slate-500); flex-wrap: wrap; gap: 12px; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 14px; font-size: 13px; font-weight: 600; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: #fffbeb; color: #78350f; border: 1px solid #fcd34d; }

/* ---------- Misc ---------- */
.divider { border-top: 1px solid var(--slate-100); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-red { color: var(--red-600); } .text-emerald { color: var(--emerald-600); }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fw-bold { font-weight: 700; } .fw-black { font-weight: 900; }

/* Floating WhatsApp */
.float-wa {
  position: fixed; bottom: 24px; right: 24px; z-index: 60; background: var(--emerald-500);
  color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 24px rgba(16,185,129,.4); display: flex; align-items: center; gap: 8px;
}
.float-wa:hover { background: var(--emerald-600); transform: translateY(-2px); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 24px; padding: 28px; max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; }

@media (max-width: 820px) {
  .main-nav { display: none; }
  .hero h1 { font-size: 34px; }
  .dash-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; }
  .float-wa span { display: none; }
}
