/* ============================================
   سفريتي — Safrieti Design System
   Clean • Bilingual • Light/Dark
   ============================================ */

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

/* ── Variables ── */
:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: rgba(14,165,233,.12);
  --indigo: #6366F1;
  --green: #22C55E;
  --red: #EF4444;
  --orange: #F97316;
  --gold: #F59E0B;
  --transition: all .2s ease;
  --sidebar-w: 240px;
}

/* ── Dark Theme (default) ── */
[data-theme="dark"] {
  --bg:        #0D1117;
  --bg2:       #161B22;
  --bg3:       #1C2128;
  --bg4:       #21262D;
  --border:    rgba(255,255,255,.08);
  --border2:   rgba(255,255,255,.14);
  --txt:       #F0F6FC;
  --txt2:      #8B949E;
  --txt3:      #484F58;
  --card-bg:   rgba(255,255,255,.04);
  --input-bg:  rgba(255,255,255,.05);
  --nav-bg:    rgba(13,17,23,.85);
  --sidebar-bg:#0D1117;
  --hover-bg:  rgba(255,255,255,.05);
  --tag-bg:    rgba(255,255,255,.06);
  --scrollbar: rgba(255,255,255,.1);
  color-scheme: dark;
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg:        #F6F8FA;
  --bg2:       #FFFFFF;
  --bg3:       #EAEEF2;
  --bg4:       #E4E8ED;
  --border:    rgba(0,0,0,.08);
  --border2:   rgba(0,0,0,.14);
  --txt:       #1C2128;
  --txt2:      #57606A;
  --txt3:      #8C959F;
  --card-bg:   #FFFFFF;
  --input-bg:  #FFFFFF;
  --nav-bg:    rgba(255,255,255,.92);
  --sidebar-bg:#FFFFFF;
  --hover-bg:  rgba(0,0,0,.03);
  --tag-bg:    rgba(0,0,0,.04);
  --scrollbar: rgba(0,0,0,.12);
  color-scheme: light;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}

[lang="ar"] body, [lang="ar"] * { font-family: 'Cairo', sans-serif; }
[lang="en"] body, [lang="en"] * { font-family: 'Inter', sans-serif; }
body { font-family: 'Cairo', sans-serif; }
img, svg, video, canvas, iframe { max-width: 100%; }
img { height: auto; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 10px; }

/* ── Typography ── */
h1 { font-size: clamp(28px, 4vw, 52px); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(20px, 2.5vw, 32px); font-weight: 700; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 600; }
p  { line-height: 1.7; color: var(--txt2); }

/* ── Layout ── */
.page-layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; min-width: 0; }
.with-sidebar .main-content { margin-right: var(--sidebar-w); }
[data-theme="light"] .with-sidebar .main-content { margin-right: var(--sidebar-w); }
@media(max-width:768px) { .with-sidebar .main-content { margin-right: 0 !important; } }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ── Rendering & Performance ── */
.card,
.stat-card,
.pkg-card,
.dest-card,
.agency-card,
.booking-card,
.feature-card,
.modal-box {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  height: 64px;
  display: flex; align-items: center;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
[data-theme="light"] .navbar.scrolled {
  box-shadow: 0 4px 24px rgba(14,165,233,.08);
}
.navbar-inner {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-text {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  padding: 8px 16px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--txt2);
  cursor: pointer; border: none; background: none;
  font-family: inherit; transition: all .25s ease; text-decoration: none;
  display: flex; align-items: center; gap: 7px;
  letter-spacing: .2px;
}
.nav-link svg { transition: transform .25s ease; opacity: .7; }
.nav-link:hover { color: var(--txt); background: var(--hover-bg); }
.nav-link:hover svg { transform: scale(1.15); opacity: 1; }
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}
.nav-link.active svg { opacity: 1; }
.nav-link::after {
  content: ''; position: absolute; bottom: 5px; left: 50%; right: 50%;
  height: 2px; background: var(--primary); border-radius: 2px;
  transition: left .3s ease, right .3s ease;
}
.nav-link.active::after { left: 16px; right: 16px; }
.nav-link-offers { overflow: visible; }
.nav-hot-badge {
  font-size: 9px; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg,#F97316,#EF4444);
  color: #fff; padding: 2px 6px; border-radius: 20px;
  letter-spacing: .5px; margin-right: 2px;
  animation: hotBadgePulse 2s ease infinite;
}
@keyframes hotBadgePulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.8; transform:scale(.93); }
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  position: fixed; right: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column; z-index: 90;
  transition: var(--transition);
  overflow-y: auto;
}
[data-theme="light"] .sidebar { box-shadow: var(--shadow-sm); }
.sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.sidebar-section { padding: 8px 12px; }
.sidebar-label {
  font-size: 10px; font-weight: 700; color: var(--txt3);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 8px 6px; display: block;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; color: var(--txt2);
  cursor: pointer; border: none; background: none;
  font-family: inherit; transition: var(--transition);
  text-decoration: none; margin-bottom: 2px; width: 100%;
}
.sidebar-link svg { flex-shrink: 0; opacity: .7; }
.sidebar-link:hover { color: var(--txt); background: var(--hover-bg); }
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active {
  color: var(--primary);
  background: var(--primary-light);
}
.sidebar-link.active svg { opacity: 1; }
.sidebar-badge {
  margin-right: auto; font-size: 11px; font-weight: 700;
  background: var(--red); color: #fff;
  padding: 2px 7px; border-radius: 100px;
}
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}
[data-theme="light"] .card { box-shadow: var(--shadow-sm); }
.card:hover { border-color: var(--border2); }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14,165,233,.3);
}

/* Stat card */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
[data-theme="light"] .stat-card { box-shadow: var(--shadow-sm); }
.stat-card-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-card-label { font-size: 13px; color: var(--txt2); margin-top: 4px; }
.stat-card-change { font-size: 12px; font-weight: 600; margin-top: 12px; display: flex; align-items: center; gap: 4px; }
.change-up { color: var(--green); }
.change-down { color: var(--red); }

/* Package card */
.pkg-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
[data-theme="light"] .pkg-card { box-shadow: var(--shadow-sm); }
.pkg-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14,165,233,.3);
}
.pkg-img { width: 100%; height: 190px; object-fit: cover; display: block; }
.pkg-body { padding: 16px; }
.pkg-dest { font-size: 13px; color: var(--txt2); display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.pkg-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.pkg-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pkg-rating { font-size: 12px; color: var(--txt2); display: flex; align-items: center; gap: 4px; }
.pkg-duration { font-size: 12px; color: var(--txt2); background: var(--tag-bg); padding: 3px 10px; border-radius: 100px; }
.pkg-footer { display: flex; align-items: center; justify-content: space-between; }
.pkg-price-label { font-size: 11px; color: var(--txt3); }
.pkg-price { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1; }
.pkg-price-currency { font-size: 12px; color: var(--txt2); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; font-family: inherit; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-full { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--indigo)); color: #fff; }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,165,233,.35); }

.btn-secondary { background: var(--primary-light); color: var(--primary); }
.btn-secondary:hover:not(:disabled) { background: rgba(14,165,233,.18); }

.btn-ghost {
  background: transparent; color: var(--txt2);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { color: var(--txt); border-color: var(--border2); background: var(--hover-bg); }

.btn-danger { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.2); }

.btn-success { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.btn-success:hover:not(:disabled) { background: rgba(34,197,94,.2); }

.btn-icon {
  width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm);
  background: var(--hover-bg); color: var(--txt2); border: 1px solid var(--border);
}
.btn-icon:hover { color: var(--txt); border-color: var(--border2); }

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--txt2); }
.form-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--txt);
  padding: 10px 14px;
  font-size: 14px; font-family: inherit;
  outline: none; width: 100%;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-input::placeholder { color: var(--txt3); }
select.form-input option { background: var(--bg3); color: var(--txt); }
textarea.form-input { resize: vertical; min-height: 90px; }
[data-theme="light"] .form-input { box-shadow: var(--shadow-sm); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 12px; font-weight: 600;
}
.badge-blue   { background: rgba(14,165,233,.12);  color: #38BDF8; border: 1px solid rgba(14,165,233,.2); }
.badge-green  { background: rgba(34,197,94,.12);   color: #4ADE80; border: 1px solid rgba(34,197,94,.2); }
.badge-red    { background: rgba(239,68,68,.12);   color: #F87171; border: 1px solid rgba(239,68,68,.2); }
.badge-orange { background: rgba(249,115,22,.12);  color: #FB923C; border: 1px solid rgba(249,115,22,.2); }
.badge-gold   { background: rgba(245,158,11,.12);  color: #FCD34D; border: 1px solid rgba(245,158,11,.2); }
.badge-gray   { background: var(--tag-bg);          color: var(--txt2); border: 1px solid var(--border); }
.badge-purple { background: rgba(99,102,241,.12);  color: #A5B4FC; border: 1px solid rgba(99,102,241,.2); }

[data-theme="light"] .badge-blue   { color: #0284C7; }
[data-theme="light"] .badge-green  { color: #16A34A; }
[data-theme="light"] .badge-red    { color: #DC2626; }
[data-theme="light"] .badge-orange { color: #EA580C; }
[data-theme="light"] .badge-gold   { color: #D97706; }
[data-theme="light"] .badge-purple { color: #4F46E5; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: right; padding: 11px 16px;
  font-size: 12px; font-weight: 700; color: var(--txt3);
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border2); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--hover-bg); }
[lang="en"] .table th, [lang="en"] .table td { text-align: left; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease; padding: 16px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(.98);
  transition: transform .25s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg2); z-index: 1;
}
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); }

/* ── Avatar ── */
.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-pkg { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.grid-stat { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media(max-width:900px){ .grid-4,.grid-3 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px){ .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; } }

/* ── Topbar (dashboard pages) ── */
.topbar {
  position: sticky; top: 0; z-index: 80;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-title { font-size: 16px; font-weight: 700; }
.topbar-sub { font-size: 13px; color: var(--txt2); margin-top: 1px; }

/* ── Hero gradient ── */
.hero-gradient {
  background:
    radial-gradient(ellipse at 15% 55%, rgba(14,165,233,.1) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 15%, rgba(99,102,241,.1) 0%, transparent 50%),
    var(--bg);
}
[data-theme="light"] .hero-gradient {
  background:
    radial-gradient(ellipse at 15% 55%, rgba(14,165,233,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 15%, rgba(99,102,241,.07) 0%, transparent 50%),
    var(--bg);
}

/* ── Theme toggle ── */
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--hover-bg);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--txt2); transition: var(--transition);
}
.theme-toggle:hover { color: var(--txt); border-color: var(--border2); }

/* ── Lang toggle ── */
.lang-btn {
  padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--hover-bg);
  font-size: 13px; font-weight: 700; color: var(--txt2);
  cursor: pointer; font-family: inherit; transition: var(--transition);
}
.lang-btn:hover { color: var(--txt); border-color: var(--border2); }

/* ── Notification dot ── */
.notif-dot {
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  position: absolute; top: 6px; right: 6px;
}

/* ── Steps ── */
.step-circle {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.step-done    { background: linear-gradient(135deg, var(--primary), var(--indigo)); color: #fff; }
.step-active  { background: var(--primary-light); color: var(--primary); border: 2px solid var(--primary); }
.step-idle    { background: var(--tag-bg); color: var(--txt3); border: 1px solid var(--border); }

/* ── Empty state ── */
.empty-state { padding: 48px 24px; text-align: center; color: var(--txt2); }
.empty-state svg { opacity: .3; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Loader ── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border2);
  border-top-color: var(--primary);
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.anim-fade-up { animation: fadeUp .5s ease forwards; }
.anim-fade-in { animation: fadeIn .4s ease forwards; }
.delay-1 { animation-delay: .1s; opacity: 0; }
.delay-2 { animation-delay: .2s; opacity: 0; }
.delay-3 { animation-delay: .3s; opacity: 0; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 24px; left: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius-md);
  background: var(--bg3); border: 1px solid var(--border2);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  max-width: 360px; animation: fadeUp .3s ease;
}
.toast-icon { font-size: 17px; flex-shrink: 0; }
[data-theme="light"] .toast { background: #fff; }

/* ── Search tags ── */
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tag {
  padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--tag-bg); color: var(--txt2);
  cursor: pointer; transition: var(--transition);
}
.filter-tag:hover { border-color: var(--primary); color: var(--primary); }
.filter-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Page sections ── */
.page-header { padding: 28px; border-bottom: 1px solid var(--border); }
.page-body { padding: 28px; }

/* ── Progress bar ── */
.progress-bar { height: 6px; background: var(--tag-bg); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--indigo)); transition: width .6s ease; }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--txt2); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.rounded { border-radius: var(--radius-md); }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── RTL/LTR helpers ── */
[dir="rtl"] .ms-auto { margin-right: auto; }
[dir="ltr"] .ms-auto { margin-left: auto; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Package card entrance animation ── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pkg-card.animated { animation: cardIn .4s ease both; }

/* ── Search loading shimmer ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton-shimmer {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease infinite;
}

/* ── Results grid animate on reload ── */
@keyframes resultsIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.grid-results-in { animation: resultsIn .3s ease; }

/* ── Search field focus highlight ── */
.search-field { transition: background .2s ease; border-radius: var(--radius-md); }
.search-field:focus-within { background: rgba(14,165,233,.05); }
.search-field:focus-within .search-field-icon { color: var(--primary); transition: color .2s; }

/* ── Hover underline on nav-link ── */
.nav-link::after {
  content: ''; position: absolute;
  bottom: 5px; left: 50%; right: 50%;
  height: 2px; background: var(--primary);
  border-radius: 2px; transition: left .25s ease, right .25s ease;
}
.nav-link.active::after { left: 14px; right: 14px; }

/* ══ Search Widget ══════════════════════════════ */
.search-widget {
  max-width: 960px; margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-lg);
}
[data-theme="light"] .search-widget {
  box-shadow: 0 8px 40px rgba(14,165,233,.1), 0 2px 8px rgba(0,0,0,.06);
}

/* Tabs */
.search-tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border); padding-bottom: 14px;
}
.search-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: none; background: transparent;
  color: var(--txt3); cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.search-tab:hover { color: var(--txt); background: var(--hover-bg); }
.search-tab.active { background: var(--primary-light); color: var(--primary); }

/* Main row */
.search-row {
  display: flex; align-items: stretch; gap: 0;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: visible;
  margin-bottom: 18px;
}
.search-divider {
  width: 1px; background: var(--border); flex-shrink: 0;
  margin: 10px 0;
}
.search-field {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; flex: 1; min-width: 0;
}
.search-field-dest { flex: 1.4; }
.search-field-travelers { flex: 1.1; }
.search-field-icon {
  color: var(--txt3); flex-shrink: 0; margin-top: 2px;
}
.search-field-body { flex: 1; min-width: 0; }
.search-field-label {
  font-size: 11px; font-weight: 700; color: var(--txt3);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 3px;
}
.search-field-input {
  width: 100%; background: transparent; border: none; outline: none;
  font-size: 14px; font-weight: 500; color: var(--txt1);
  font-family: inherit; padding: 0;
}
.search-field-input option { background: var(--bg2); }
select.search-field-input { cursor: pointer; }
input[type="date"].search-field-input::-webkit-calendar-picker-indicator {
  filter: invert(60%); cursor: pointer; margin: 0;
}

/* Search button */
.search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 0 22px; margin: 6px 6px 6px 0;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  color: #fff; border: none; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: opacity .2s, transform .15s;
  flex-shrink: 0;
}
[dir="rtl"] .search-btn { margin: 6px 0 6px 6px; }
.search-btn:hover { opacity: .9; transform: scale(1.02); }

/* Travelers popup */
.traveler-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.counter { display: flex; align-items: center; gap: 10px; }
.counter-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border2); background: var(--hover-bg);
  color: var(--txt); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); line-height: 1;
}
.counter-btn:hover { border-color: var(--primary); color: var(--primary); }
.counter-val { font-size: 15px; font-weight: 700; min-width: 20px; text-align: center; }

/* Star filter buttons */
.star-btn {
  flex: 1; padding: 7px 0; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--tag-bg);
  color: var(--txt2); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: var(--transition);
}
.star-btn:hover, .star-btn.active {
  border-color: var(--gold); color: var(--gold);
  background: rgba(245,158,11,.1);
}

/* Include chips */
.inc-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--tag-bg);
  cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--txt2); transition: var(--transition);
}
.inc-chip:has(input:checked) {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.inc-chip input { display: none; }

/* ── Mobile ── */
@media(max-width:768px){
  .hide-mobile { display: none !important; }
  .navbar-inner { padding: 0 16px; }
  .navbar { height: auto; min-height: 64px; }
  .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(100%, 220px);
  }
  .nav-actions .btn-sm,
  .nav-actions .lang-btn {
    min-height: 38px;
  }
  .topbar { padding: 12px 16px; }
  .page-header, .page-body { padding: 20px 16px; }
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .with-sidebar .main-content { margin-right: 0 !important; }
  .search-widget { padding: 16px; border-radius: var(--radius-lg); }
  .search-tabs { flex-wrap: wrap; gap: 6px; }
  .search-row { flex-direction: column; border-radius: var(--radius-md); }
  .search-divider { width: 100%; height: 1px; margin: 0 10px; }
  .search-field { padding: 10px 14px; }
  .search-btn { margin: 6px; padding: 12px; border-radius: var(--radius-sm); justify-content: center; }
  [dir="rtl"] .search-btn { margin: 6px; }
  .modal-overlay { padding: 12px; }
  .modal-box { max-height: calc(100vh - 24px); }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer > * { flex: 1 1 100%; }
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}

@media (max-width:560px) {
  .container { padding: 0 14px; }
  .btn,
  .btn-sm,
  .btn-lg {
    width: 100%;
  }
  .nav-actions .btn-icon,
  .nav-actions .theme-toggle,
  .nav-actions .btn-sm,
  .nav-actions .lang-btn,
  .nav-actions .btn {
    width: auto;
  }
  .grid-pkg { grid-template-columns: 1fr; }
  .grid-stat { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
