:root {
  --emerald-950: #042f24;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --gold-600: #9f6f19;
  --gold-500: #c4932b;
  --gold-400: #dcb253;
  --gold-100: #fbf3df;
  --sand-50: #faf8f5;
  --sand-100: #f3efe7;
  --sand-200: #e7dfd1;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --white: #ffffff;
  --danger-600: #dc2626;
  --danger-50: #fef2f2;
  --amber-600: #d97706;
  --amber-50: #fffbeb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(6, 78, 59, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--sand-50);
  color: var(--slate-900);
  font-family: 'Plus Jakarta Sans', 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand-200);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  color: var(--gold-400);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  border: 1px solid rgba(220, 178, 83, 0.45);
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--emerald-950);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--slate-700);
}

.nav-links a:hover {
  color: var(--emerald-700);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-primary {
  background: var(--emerald-900);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--emerald-800);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--white);
}

.btn-gold:hover {
  filter: brightness(1.06);
}

.btn-outline {
  background: var(--white);
  border-color: var(--sand-200);
  color: var(--slate-700);
}

.btn-outline:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-900);
  background: var(--emerald-50);
}

.btn-danger {
  background: var(--danger-50);
  color: var(--danger-600);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-whatsapp {
  background: #16a34a;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #15803d;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(220, 178, 83, 0.16), transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(16, 185, 129, 0.15), transparent 50%),
    linear-gradient(135deg, var(--emerald-950) 0%, var(--emerald-900) 55%, #093b2d 100%);
  color: var(--white);
  padding: 72px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(220, 178, 83, 0.4);
  color: var(--gold-400);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.18;
  margin: 0 0 16px;
  font-weight: 800;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.06rem;
  margin: 0 0 26px;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.hero-card h3 {
  margin: 0 0 8px;
  color: var(--gold-400);
  font-size: 1.15rem;
}

.hero-card p {
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--sand-200);
  border-bottom: 1px solid var(--sand-200);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 42px;
}

.section-kicker {
  color: var(--gold-600);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: 1.95rem;
  color: var(--emerald-950);
}

.section-header p {
  margin: 0;
  color: var(--slate-600);
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.package-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.package-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.package-top {
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-800));
  color: var(--white);
  padding: 20px 22px;
  position: relative;
}

.package-season {
  display: inline-block;
  background: rgba(220, 178, 83, 0.2);
  border: 1px solid rgba(220, 178, 83, 0.45);
  color: var(--gold-400);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.package-top h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.package-dates {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.85);
}

.package-body {
  padding: 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hotel-box {
  background: var(--sand-50);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.86rem;
}

.hotel-box strong {
  display: block;
  color: var(--emerald-950);
}

.price-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.price-tier {
  background: var(--emerald-50);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 8px 6px;
}

.price-tier span {
  display: block;
  font-size: 0.74rem;
  color: var(--emerald-800);
  font-weight: 600;
}

.price-tier strong {
  font-size: 1rem;
  color: var(--emerald-950);
}

.package-footer {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--sand-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green { background: var(--emerald-100); color: var(--emerald-900); }
.badge-gold { background: var(--gold-100); color: var(--gold-600); }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--slate-700);
}

.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: var(--white);
  color: var(--slate-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  outline: none;
  border-color: var(--emerald-700);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.14);
}

.hero .input {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Admin Layout */
.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--emerald-950);
  color: rgba(255, 255, 255, 0.88);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-brand {
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.side-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: start;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.side-btn.active {
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-700));
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--gold-400);
}

html[dir="rtl"] .side-btn.active {
  box-shadow: inset -3px 0 0 var(--gold-400);
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  background: var(--white);
  border-bottom: 1px solid var(--sand-200);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-content {
  padding: 24px 26px 40px;
}

/* KPI Cards */
.kpi-card {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 600;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--emerald-950);
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 4px;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  background: var(--sand-50);
  color: var(--slate-600);
  font-weight: 700;
  text-align: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sand-200);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sand-100);
  vertical-align: middle;
}

tbody tr:hover {
  background: #fafcf9;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-md);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--sand-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.12rem;
  color: var(--emerald-950);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--sand-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--sand-50);
}

/* Alerts & Toast */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.alert-success { background: var(--emerald-50); border: 1px solid #a7f3d0; color: var(--emerald-900); }
.alert-error { background: var(--danger-50); border: 1px solid #fecaca; color: #991b1b; }
.alert-warn { background: var(--amber-50); border: 1px solid #fde68a; color: #92400e; }

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  background: var(--emerald-950);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
}

html[dir="rtl"] .toast {
  right: auto;
  left: 22px;
}

.toast.show { display: block; }

/* Receipt Print Styles */
.receipt-sheet {
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--white);
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }
  .sidebar-brand { display: none; }
  .sidebar-nav { flex-direction: row; }
  .side-btn { white-space: nowrap; }
}

@media print {
  .no-print, .sidebar, .admin-header, .modal-head, .modal-foot, #adminShell, #loginView, .toast {
    display: none !important;
  }
  body {
    background: #fff;
    margin: 0;
    padding: 0;
  }
  .modal-backdrop {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .modal {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
  }
  .modal-body {
    padding: 0 !important;
    overflow: visible !important;
  }
  .receipt-sheet {
    border: none !important;
    padding: 0 !important;
    page-break-inside: avoid;
  }
}
