/* ─── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Kufi Arabic', sans-serif;
  background: #030712;
  color: #f1f5f9;
  direction: rtl;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ─── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }

/* ─── Layout ──────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ─── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: 240px; min-width: 240px;
  background: #070d1a;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  position: fixed; top: 0; right: 0;
  height: 100vh; z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar-header { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg,#0d90e7,#025a9f);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: white;
}
.logo-name { font-weight: 700; font-size: 15px; }
.logo-sub { font-size: 11px; color: #64748b; }

.sidebar-business {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.business-name { font-weight: 600; font-size: 13px; color: #e2e8f0; }
.business-sub { font-size: 12px; color: #64748b; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: #94a3b8; font-size: 13px; font-weight: 500;
  transition: all 0.15s; border: 1px solid transparent;
  position: relative;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-link.active {
  background: rgba(13,144,231,0.12);
  color: #7cc8fb;
  border-color: rgba(13,144,231,0.2);
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge {
  margin-right: auto; margin-left: 0;
  background: #ef4444; color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 9999px;
}

.sidebar-footer { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.06); }
.logout-btn {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  color: #f87171; font-size: 13px; font-weight: 500;
  transition: all 0.15s;
}
.logout-btn:hover { background: rgba(239,68,68,0.15); }

/* ─── Main Content ────────────────────────────────── */
.main-content { flex: 1; margin-right: 240px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(7,13,26,0.8); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.menu-btn { display: none; background: none; border: none; color: #94a3b8; font-size: 20px; padding: 4px 8px; border-radius: 8px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.notif-btn { position: relative; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); font-size: 16px; }
.notif-badge {
  position: absolute; top: -4px; left: -4px;
  background: #ef4444; color: white; font-size: 9px;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.page-content { padding: 24px; flex: 1; }

/* ─── Cards ───────────────────────────────────────── */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
}
.card-title { font-size: 15px; font-weight: 600; color: #e2e8f0; margin-bottom: 16px; }

/* ─── Grid ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,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; } }

/* ─── KPI Cards ───────────────────────────────────── */
.kpi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 18px;
}
.kpi-label { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.kpi-value { font-size: 28px; font-weight: 800; color: #36aaf6; }
.kpi-sub   { font-size: 12px; color: #475569; margin-top: 4px; }

/* ─── Forms ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: white; font-size: 14px;
  outline: none; transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(13,144,231,0.5);
}
.form-input::placeholder, .form-textarea::placeholder { color: #4b5563; }
.form-select option { background: #1e293b; }
.form-textarea { resize: vertical; min-height: 100px; }

/* ─── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary  { background: #0d90e7; color: white; border-color: #0d90e7; }
.btn-primary:hover  { background: #36aaf6; }
.btn-secondary { background: rgba(255,255,255,0.06); color: #d1d5db; border-color: rgba(255,255,255,0.1); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: white; }
.btn-danger   { background: rgba(239,68,68,0.1); color: #f87171; border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-success  { background: rgba(34,197,94,0.1); color: #4ade80; border-color: rgba(34,197,94,0.3); }
.btn-success:hover { background: rgba(34,197,94,0.2); }
.btn-gold { background: rgba(232,176,10,0.15); color: #fbbf24; border-color: rgba(232,176,10,0.3); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── Badges ──────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; border: 1px solid; }
.badge-positive  { background: rgba(34,197,94,0.1);  color: #4ade80;  border-color: rgba(34,197,94,0.2); }
.badge-negative  { background: rgba(239,68,68,0.1);  color: #f87171;  border-color: rgba(239,68,68,0.2); }
.badge-neutral   { background: rgba(107,114,128,0.1);color: #9ca3af;  border-color: rgba(107,114,128,0.2); }
.badge-pending   { background: rgba(234,179,8,0.1);  color: #facc15;  border-color: rgba(234,179,8,0.2); }
.badge-published { background: rgba(34,197,94,0.1);  color: #4ade80;  border-color: rgba(34,197,94,0.2); }
.badge-failed    { background: rgba(239,68,68,0.1);  color: #f87171;  border-color: rgba(239,68,68,0.2); }
.badge-approved  { background: rgba(13,144,231,0.1); color: #36aaf6;  border-color: rgba(13,144,231,0.2); }
.badge-active    { background: rgba(34,197,94,0.1);  color: #4ade80;  border-color: rgba(34,197,94,0.2); }
.badge-trial     { background: rgba(234,179,8,0.1);  color: #facc15;  border-color: rgba(234,179,8,0.2); }

/* ─── Alerts ──────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.alert-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: #4ade80; }
.alert-info    { background: rgba(13,144,231,0.1); border: 1px solid rgba(13,144,231,0.3); color: #36aaf6; }

/* ─── Table ───────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); }
table { width: 100%; border-collapse: collapse; }
th { background: rgba(255,255,255,0.04); padding: 12px 16px; font-size: 12px; font-weight: 600; color: #64748b; text-align: right; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.06); }
td { padding: 13px 16px; font-size: 13px; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Stars ───────────────────────────────────────── */
.stars { color: #fbbf24; font-size: 13px; }

/* ─── Toggle switch ───────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.1);
  border-radius: 24px; cursor: pointer; transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: white;
  border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: #0d90e7; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Page Header ─────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 800; }
.page-header p  { color: #64748b; font-size: 14px; margin-top: 4px; }

/* ─── Tabs ────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 4px; width: fit-content; margin-bottom: 20px; }
.tab-btn { padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 500; border: none; background: none; color: #64748b; cursor: pointer; transition: all 0.15s; }
.tab-btn.active { background: #0d90e7; color: white; }
.tab-btn:hover:not(.active) { color: white; }

/* ─── Spinner ─────────────────────────────────────── */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.2); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty state ─────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: #475569; }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: #94a3b8; margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── Review card ─────────────────────────────────── */
.review-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 16px; margin-bottom: 12px;
  transition: border-color 0.2s;
}
.review-card:hover { border-color: rgba(255,255,255,0.12); }
.review-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.reviewer-info h4 { font-size: 14px; font-weight: 600; }
.reviewer-info small { font-size: 12px; color: #64748b; }
.review-body { font-size: 13px; color: #94a3b8; line-height: 1.7; margin-bottom: 12px; }
.review-reply { background: rgba(13,144,231,0.06); border: 1px solid rgba(13,144,231,0.15); border-radius: 10px; padding: 12px; margin-top: 10px; }
.review-reply-label { font-size: 11px; color: #36aaf6; font-weight: 600; margin-bottom: 6px; }
.review-reply-text { font-size: 13px; color: #94a3b8; line-height: 1.7; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ─── Rating bar ──────────────────────────────────── */
.rating-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.rating-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.rating-bar-fill  { height: 100%; background: #fbbf24; border-radius: 3px; transition: width 0.5s; }

/* ─── Health ring ─────────────────────────────────── */
.health-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.health-score { position: absolute; text-align: center; }
.health-score-value { font-size: 32px; font-weight: 800; color: #36aaf6; }
.health-score-label { font-size: 11px; color: #64748b; }

/* ─── Auth pages ──────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: #030712; }
.auth-card { width: 100%; max-width: 420px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 36px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon-lg { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg,#0d90e7,#025a9f); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: white; margin: 0 auto 12px; }
.auth-logo h1 { font-size: 20px; font-weight: 800; }
.auth-logo p  { font-size: 13px; color: #64748b; margin-top: 4px; }
.auth-footer  { text-align: center; margin-top: 20px; font-size: 13px; color: #64748b; }
.auth-footer a { color: #36aaf6; }

/* ─── Landing page ────────────────────────────────── */
.landing { background: #030712; }
.lnav { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; border-bottom: 1px solid rgba(255,255,255,0.06); position: sticky; top: 0; z-index: 50; background: rgba(3,7,18,0.9); backdrop-filter: blur(12px); }
.lnav-logo { display: flex; align-items: center; gap: 10px; }
.lnav-btns { display: flex; gap: 8px; }
.hero { text-align: center; padding: 80px 24px 60px; max-width: 800px; margin: 0 auto; }
.hero-tag { display: inline-block; background: rgba(13,144,231,0.1); border: 1px solid rgba(13,144,231,0.3); border-radius: 9999px; padding: 6px 16px; font-size: 13px; color: #36aaf6; margin-bottom: 24px; }
.hero h1 { font-size: clamp(30px,5vw,54px); font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-gradient { background: linear-gradient(to right,#36aaf6,#7cc8fb); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 17px; color: #94a3b8; margin-bottom: 36px; line-height: 1.8; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats-bar { display: flex; justify-content: center; gap: 48px; padding: 36px 32px; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-val { font-size: 26px; font-weight: 800; color: #36aaf6; }
.stat-lbl { font-size: 12px; color: #64748b; margin-top: 2px; }
.section { max-width: 1100px; margin: 0 auto; padding: 64px 32px; }
.section-title { text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.section-sub   { text-align: center; color: #64748b; margin-bottom: 44px; font-size: 14px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 18px; }
.feature-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 22px; }
.feature-icon { font-size: 30px; margin-bottom: 12px; }
.feature-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-desc  { font-size: 13px; color: #64748b; line-height: 1.7; }
.pricing-grid  { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.price-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 24px; position: relative; }
.price-card.featured { background: rgba(13,144,231,0.08); border-color: rgba(13,144,231,0.35); }
.price-popular { position: absolute; top: -12px; right: 50%; transform: translateX(50%); background: #0d90e7; color: white; font-size: 11px; padding: 3px 12px; border-radius: 9999px; font-weight: 600; white-space: nowrap; }
.price-plan { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.price-amount { font-size: 34px; font-weight: 800; color: #36aaf6; }
.price-period { font-size: 13px; color: #64748b; margin-top: 2px; margin-bottom: 18px; }
.price-features { list-style: none; margin-bottom: 20px; }
.price-features li { font-size: 13px; color: #94a3b8; padding: 4px 0; display: flex; align-items: center; gap: 6px; }
.price-features li::before { content: '✓'; color: #4ade80; font-weight: 700; }
.lfooter { border-top: 1px solid rgba(255,255,255,0.05); padding: 24px 32px; text-align: center; color: #475569; font-size: 13px; }

/* ─── Responsive ──────────────────────────────────── */
@media(max-width:768px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .menu-btn { display: block; }
  .topbar { padding: 12px 16px; }
  .page-content { padding: 16px; }
  .lnav { padding: 12px 16px; }
  .hero { padding: 48px 16px 40px; }
  .stats-bar { gap: 24px; }
}
