:root {
  --ink: #10201b;
  --muted: #64736f;
  --paper: #ffffff;
  --soft: #f2f7f4;
  --mist: #e7f0ec;
  --line: #d9e6e0;
  --brand: #08745f;
  --brand-2: #0d8f72;
  --deep: #061b16;
  --deep-2: #0d2f27;
  --gold: #d7ad45;
  --gold-2: #f3d982;
  --danger: #b42318;
  --ok: #067647;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(6, 27, 22, .14);
}

* { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Cairo, Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.ltr, .ltr-input { direction: ltr; unicode-bidi: plaintext; text-align: left; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px clamp(16px, 4vw, 72px);
  background: var(--deep);
  color: rgba(255,255,255,.78);
  font-size: 13px;
}
.topbar a { color: #fff; font-weight: 800; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 72px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: max-content; font-weight: 900; }
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand small { display: block; margin-top: -6px; color: var(--muted); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 20px; color: var(--muted); font-weight: 900; }
.nav a:hover, .nav a.active { color: var(--brand); }
.actions { display: flex; align-items: center; gap: 10px; }

.btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn { padding: 0 18px; background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(8,116,95,.18); }
.btn:hover { transform: translateY(-1px); background: var(--brand-2); }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--line); box-shadow: none; }
.btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #201705; }
.btn.glass { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.26); box-shadow: none; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled], button[disabled] { opacity: .65; cursor: wait; transform: none; }
.icon-btn { width: 44px; background: var(--soft); color: var(--brand); }
.mobile-toggle { display: none; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero, .page-hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6,27,22,.96), rgba(6,27,22,.72), rgba(6,27,22,.32)),
    radial-gradient(circle at 18% 16%, rgba(215,173,69,.45), transparent 25%),
    linear-gradient(135deg, #0b765f, #061b16 70%);
}
.marketing-hero {
  min-height: calc(100vh - 118px);
  display: grid;
  align-items: center;
  padding: clamp(46px, 7vw, 98px) clamp(16px, 4vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(330px, .78fr);
  gap: clamp(26px, 5vw, 76px);
  align-items: center;
}
.kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--gold-2);
  font-weight: 900;
}
.eyebrow { color: var(--brand); font-size: 13px; }
h1, h2, h3 { letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 86px); line-height: 1.04; }
.hero-copy { max-width: 780px; color: rgba(255,255,255,.84); font-size: 18px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

.search-card {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr auto;
  gap: 10px;
  margin-top: 28px;
  padding: 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.54);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(8,116,95,.12); }
textarea.field { min-height: 136px; resize: vertical; }
.help { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.hero-showcase { display: grid; gap: 14px; }
.showcase-card, .panel, .card, .auth-card, .stat, .business-card, .feature-card, .plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(13,36,30,.08);
}
.showcase-card { padding: 24px; color: var(--ink); box-shadow: var(--shadow); }
.showcase-card h2 { font-size: clamp(28px, 4vw, 44px); margin: 16px 0 8px; }
.mini-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mini-metrics div {
  padding: 18px;
  min-height: 110px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.11);
  color: #fff;
  border-radius: var(--radius);
}
.mini-metrics strong { display: block; font-size: 20px; }
.mini-metrics span { color: rgba(255,255,255,.72); line-height: 1.7; }

.section { padding: clamp(44px, 6vw, 86px) clamp(16px, 4vw, 72px); }
.section.white { background: #fff; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}
.section h2 { margin: 0; font-size: clamp(28px, 4vw, 48px); }
.muted { color: var(--muted); line-height: 1.8; }
.grid { display: grid; gap: 16px; }
.feature-grid, .story-grid, .plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.category-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }

.feature-card, .category-card, .plan-card { padding: 20px; }
.feature-card i, .category-card i {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: var(--brand);
  background: var(--soft);
  border-radius: var(--radius);
  font-size: 20px;
}
.feature-card p, .plan-card p { color: var(--muted); line-height: 1.8; }
.category-card {
  min-height: 145px;
  display: grid;
  align-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card strong { font-size: 18px; }
.category-card span { color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e4f4ef;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.badge.gold { background: #fff2c7; color: #7a5806; }
.business-card { overflow: hidden; background: #fff; }
.business-media { height: 205px; background: var(--mist); position: relative; }
.business-media img { width: 100%; height: 100%; object-fit: cover; }
.business-media .badge { position: absolute; top: 12px; right: 12px; }
.business-body { padding: 18px; }
.business-title { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.business-body h3 { margin: 0 0 8px; font-size: 21px; }
.business-body p { color: var(--muted); min-height: 58px; line-height: 1.75; }
.rating { color: #a87907; font-weight: 900; }
.meta-row, .card-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta-row { color: var(--muted); font-size: 13px; margin: 12px 0; }
.link { color: var(--brand); font-weight: 900; }

.cta-band {
  margin: clamp(28px, 4vw, 52px) clamp(16px, 4vw, 72px);
  padding: clamp(26px, 5vw, 52px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cta-band h2 { margin: 0; font-size: clamp(28px, 4vw, 48px); }
.cta-band p { color: rgba(255,255,255,.75); max-width: 760px; line-height: 1.8; }

.page-hero { padding: clamp(48px, 7vw, 82px) clamp(16px, 4vw, 72px); }
.compact-hero h1, .brand-hero h1, .owner-hero h1 { font-size: clamp(38px, 6vw, 70px); }
.page { padding: 28px clamp(16px, 4vw, 72px) 70px; }
.layout, .admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sidebar a, .sidebar button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}
.sidebar a:hover, .sidebar a.active, .sidebar button:hover { background: var(--soft); color: var(--brand); }
.panel { padding: 20px; }
.rich { min-height: 210px; }

.dashboard-hero, .form-hero {
  margin-bottom: 18px;
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--brand));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dashboard-hero h1, .form-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 58px); }
.dashboard-hero p, .form-hero p { color: rgba(255,255,255,.76); line-height: 1.8; }
.dashboard-hero .eyebrow, .form-hero .eyebrow { color: var(--gold-2); }
.stats, .premium-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; background: #fff; }
.stat span { color: var(--muted); font-weight: 800; }
.stat strong { display: block; margin-top: 6px; font-size: 34px; }
.admin-panels { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
.admin-advice ul { margin: 0; padding-inline-start: 22px; line-height: 2; color: var(--muted); }

.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { color: var(--muted); font-size: 13px; }

.search-panel { display: grid; grid-template-columns: 1.2fr .8fr .8fr auto; gap: 10px; margin-bottom: 26px; }
.auth-wrap { min-height: 78vh; display: grid; place-items: center; padding: 38px 16px; }
.auth-card {
  width: min(100%, 540px);
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.95)),
    radial-gradient(circle at top right, rgba(8,116,95,.16), transparent 45%);
  box-shadow: var(--shadow);
}
.auth-logo { width: 74px; }
.auth-card h1 { color: var(--ink); font-size: 34px; margin: 0; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.premium-form { display: grid; gap: 16px; }
.form-section { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.form-section h2 { margin-top: 0; font-size: 22px; }
.form-submit { justify-self: start; }
.password-field { position: relative; display: grid; }
.password-field .field { padding-left: 54px; }
.password-toggle {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
}
.notice {
  padding: 13px 15px;
  border-radius: var(--radius);
  background: #fff8df;
  color: #775a00;
  line-height: 1.8;
}
.notice.success { background: #dcfae6; color: var(--ok); }
.notice.error { background: #fee4e2; color: var(--danger); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; align-items: start; }
.gallery-main { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--mist); margin-bottom: 18px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.contact-stack { display: grid; gap: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps div { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps strong { width: 42px; height: 42px; display: grid; place-items: center; background: var(--brand); color: #fff; border-radius: 50%; }

.site-footer { padding: 44px clamp(16px, 4vw, 72px); background: var(--deep); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-logo { width: 64px; margin-bottom: 12px; }
.site-footer a, .site-footer p { color: rgba(255,255,255,.68); display: block; margin: 8px 0; }
.copyright { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.55); }

@media (max-width: 1040px) {
  .hero-grid, .layout, .admin-layout, .detail-layout, .admin-panels, .footer-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .marketing-hero { min-height: auto; }
  .feature-grid, .story-grid, .plans-grid, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .nav.open { display: flex; }
  .mobile-toggle { display: inline-flex; }
  .search-card, .search-panel, .form-grid.two { grid-template-columns: 1fr; }
  .dashboard-hero, .form-hero, .cta-band { align-items: stretch; flex-direction: column; }
}

@media (max-width: 640px) {
  .topbar { display: none; }
  .site-header { padding: 10px 14px; }
  .brand img { width: 42px; height: 42px; }
  .actions .btn.secondary { display: none; }
  .actions .btn { min-height: 40px; padding: 0 12px; font-size: 13px; }
  h1 { font-size: 38px; }
  .hero-copy { font-size: 16px; }
  .marketing-hero, .section, .page, .page-hero { padding-left: 14px; padding-right: 14px; }
  .mini-metrics { grid-template-columns: 1fr; }
  .business-media { height: 180px; }
  th, td { padding: 10px; font-size: 13px; }
}
