/* ─── TOKENS ─── */
:root {
  --green-900: #003D1F;
  --green-800: #005C2E;
  --green-700: #006C35;
  --green-600: #007A3D;
  --green-500: #1A9B52;
  --green-100: #D6F0E0;
  --green-50:  #EEF9F2;

  --gold-700:  #8C6219;
  --gold-500:  #C5973A;
  --gold-300:  #E8C87A;
  --gold-50:   #FDF6E8;

  --ink:       #0D1117;
  --ink-80:    #1E2530;
  --ink-60:    #374151;
  --ink-40:    #5B6472;
  --ink-20:    #9CA3AF;
  --ink-10:    #E5E7EB;
  --ink-05:    #F3F4F6;
  --white:     #FFFFFF;

  --danger:    #DC2626;
  --warning:   #D97706;
  --info:      #2563EB;

  --font: 'Tajawal', sans-serif;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 22px;

  --sidebar: 256px;
  --topbar: 60px;
  --transition: 0.18s ease;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--ink-05);
  color: var(--ink);
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ─── LAYOUT ─── */
.shell { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar);
  background: var(--ink);
  position: fixed; top: 0; right: 0;
  height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 200;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex; flex-direction: column;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-emblem {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
}
.brand-name { font-size: 15px; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.brand-tagline {
  font-size: 10px; font-weight: 500;
  color: var(--gold-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: rgba(197,151,58,0.12);
  border-radius: 4px;
  width: fit-content;
}

.nav { padding: 14px 10px; overflow-y: auto; }
.nav-section {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  padding: 10px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius-s);
  color: rgba(255,255,255,0.55);
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 1px;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.nav-item.active {
  background: var(--green-700);
  color: white;
}
.nav-item .ti { font-size: 18px; }
.nav-badge {
  margin-right: auto;
  background: var(--gold-500); color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
}

.sidebar-user {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-m);
  background: rgba(255,255,255,0.05);
  cursor: pointer; transition: background var(--transition);
}
.user-card:hover { background: rgba(255,255,255,0.08); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-700);
  color: white; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info .user-name { font-size: 13px; font-weight: 600; color: white; }
.user-info .user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.user-card .ti-dots { color: rgba(255,255,255,0.3); font-size: 16px; margin-right: auto; }

/* ─── MAIN ─── */
.main {
  flex: 1;
  margin-right: var(--sidebar);
  display: flex; flex-direction: column;
}

/* ─── TOPBAR ─── */
.topbar {
  height: var(--topbar);
  background: var(--white);
  border-bottom: 1px solid var(--ink-10);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-accent { width: 3px; height: 24px; background: var(--green-700); border-radius: 2px; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.topbar-sub { font-size: 12px; color: var(--ink-40); margin-top: 1px; }
.topbar-spacer { flex: 1; }

.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-05);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-m);
  padding: 7px 14px;
  width: 220px;
  transition: all var(--transition);
}
.topbar-search:focus-within {
  border-color: var(--green-600);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--green-50);
  width: 280px;
}
.topbar-search input {
  border: none; background: none;
  font-size: 13px; color: var(--ink);
  outline: none; width: 100%;
}
.topbar-search .ti { color: var(--ink-20); font-size: 15px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-60);
  transition: all var(--transition);
  position: relative;
  font-size: 18px;
}
.icon-btn:hover { background: var(--ink-05); color: var(--ink); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid white;
}

/* ─── PAGE BODY ─── */
.page { padding: 26px 28px; }

/* ─── STATS GRID ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-l);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.stat:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }

.stat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.stat-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--radius-m);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.stat-icon-wrap.g { background: var(--green-50); color: var(--green-700); }
.stat-icon-wrap.o { background: var(--gold-50); color: var(--gold-700); }
.stat-icon-wrap.b { background: #EFF6FF; color: var(--info); }
.stat-icon-wrap.r { background: #FEF2F2; color: var(--danger); }

.stat-trend {
  font-size: 11px; font-weight: 600;
  padding: 3px 7px; border-radius: 5px;
}
.stat-trend.up { background: var(--green-50); color: var(--green-700); }
.stat-trend.down { background: #FEF2F2; color: var(--danger); }

.stat-value { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-label { font-size: 12px; color: var(--ink-40); margin-top: 4px; }
.stat-bar {
  position: absolute; bottom: 0; right: 0; left: 0; height: 3px;
  background: var(--ink-10);
}
.stat-bar-fill { height: 100%; border-radius: 2px; background: var(--green-700); }

/* ─── GRID 2 COL ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }
.grid-2-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ─── CARD ─── */
.card {
  background: var(--white);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.card-head {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--ink-10);
}
.card-title { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.card-title .ti { color: var(--green-700); font-size: 18px; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--ink-10);
  background: var(--ink-05);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-m);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  white-space: nowrap; font-family: var(--font);
}
.btn-primary { background: var(--green-700); color: white; }
.btn-primary:hover { background: var(--green-800); }
.btn-gold { background: var(--gold-500); color: white; }
.btn-gold:hover { background: var(--gold-700); }
.btn-ghost { background: transparent; color: var(--ink-60); border: 1px solid var(--ink-10); }
.btn-ghost:hover { border-color: var(--ink-40); color: var(--ink); background: var(--ink-05); }
.btn-danger-ghost { background: transparent; color: var(--danger); border: 1px solid #FECACA; }
.btn-danger-ghost:hover { background: #FEF2F2; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; border-radius: var(--radius-s); }

/* ─── TABLE ─── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  padding: 11px 16px; text-align: right;
  font-size: 11px; font-weight: 600; color: var(--ink-40);
  letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--ink-05);
  border-bottom: 1px solid var(--ink-10);
}
.tbl tbody td { padding: 13px 16px; font-size: 13px; border-bottom: 1px solid var(--ink-10); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background var(--transition); }
.tbl tbody tr:hover { background: var(--ink-05); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.b-green  { background: var(--green-50); color: var(--green-700); }
.b-gold   { background: var(--gold-50); color: var(--gold-700); }
.b-blue   { background: #EFF6FF; color: #1D4ED8; }
.b-red    { background: #FEF2F2; color: var(--danger); }
.b-gray   { background: var(--ink-05); color: var(--ink-60); }

/* ─── FORM ─── */
.field { margin-bottom: 16px; }
.label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-60); margin-bottom: 6px;
}
.label .req { color: var(--danger); margin-right: 2px; }
.input, .select, .textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--ink-10);
  border-radius: var(--radius-m);
  font-size: 13.5px; font-family: var(--font);
  color: var(--ink); background: var(--white);
  transition: all var(--transition);
  direction: rtl;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-50);
}
.textarea { resize: vertical; min-height: 90px; }
.fg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ─── MODALS ─── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(13,17,23,0.6);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 600px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-head {
  padding: 20px 24px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--ink-10);
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-head h3 { font-size: 16px; font-weight: 700; }
.close-btn {
  width: 30px; height: 30px; border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-40); font-size: 18px;
  cursor: pointer; transition: all var(--transition);
}
.close-btn:hover { background: var(--ink-05); color: var(--ink); }
.modal-body { padding: 22px 24px; }
.modal-foot {
  padding: 14px 24px; border-top: 1px solid var(--ink-10);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--ink-05); border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ─── TIMELINE ─── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; position: relative; z-index: 1;
  margin-top: 2px;
}
.tl-dot.done { background: var(--green-700); color: white; }
.tl-dot.active { background: var(--gold-50); color: var(--gold-700); border: 2px solid var(--gold-300); }
.tl-dot.pending { background: var(--ink-05); color: var(--ink-20); border: 1.5px solid var(--ink-10); }
.tl-item:not(:last-child) .tl-dot::after {
  content: ''; position: absolute; top: 28px; right: 50%;
  transform: translateX(50%); width: 1.5px;
  height: calc(100% + 18px - 28px);
  background: var(--ink-10); z-index: 0;
}
.tl-content .tl-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.tl-content .tl-time { font-size: 11px; color: var(--ink-40); margin-top: 2px; }

/* ─── EMPTY ─── */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-40); }
.empty .ti { font-size: 40px; margin-bottom: 10px; display: block; }
.empty p { font-size: 14px; margin-bottom: 14px; }

/* ─── TABS ─── */
.tabs { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1.5px solid var(--ink-10); }
.tab {
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  color: var(--ink-40); border-bottom: 2px solid transparent;
  margin-bottom: -1.5px; cursor: pointer; transition: all var(--transition);
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--green-700); border-bottom-color: var(--green-700); }

/* ─── NOTIFICATION PANEL ─── */
.notif-panel {
  position: absolute; top: 52px; left: 10px;
  width: 340px; background: var(--white);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-l);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 300;
  overflow: hidden;
}
.notif-head { padding: 14px 16px; border-bottom: 1px solid var(--ink-10); display: flex; align-items: center; justify-content: space-between; }
.notif-head span { font-size: 13px; font-weight: 700; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--ink-10); display: flex; gap: 10px; cursor: pointer; transition: background var(--transition); }
.notif-item:hover { background: var(--ink-05); }
.notif-item.unread { background: var(--green-50); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.notif-text .nt { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.notif-text .ns { font-size: 11.5px; color: var(--ink-40); }

/* ─── PAGE VIEWS HIDDEN ─── */
.view { display: none; }
.view.active { display: block; }

/* ─── COMPARISON TABLE ─── */
.compare-winner { background: var(--green-50) !important; }
.price-cell { font-size: 15px; font-weight: 800; color: var(--ink); }
.price-best { color: var(--green-700); }

/* ─── AUTH PAGE ─── */
.auth-page {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: var(--ink);
  display: flex; flex-direction: column;
  justify-content: center; padding: 60px;
  position: relative; overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,108,53,0.3) 0%, transparent 70%);
  pointer-events: none;
}
.auth-visual::after {
  content: '';
  position: absolute; bottom: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(197,151,58,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.auth-form-side { background: var(--white); display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 380px; }

/* ─── SUPPLIER CARDS ─── */
.supplier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.supplier-card {
  background: var(--white); border: 1px solid var(--ink-10);
  border-radius: var(--radius-l); padding: 18px; position: relative;
  cursor: pointer; transition: all var(--transition);
}
.supplier-card:hover { border-color: var(--green-600); box-shadow: 0 4px 16px rgba(0,108,53,0.1); }
.supplier-logo {
  width: 44px; height: 44px; border-radius: var(--radius-m);
  background: var(--ink-05); display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.supplier-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.supplier-cat { font-size: 11.5px; color: var(--ink-40); margin-bottom: 10px; }
.stars { color: var(--gold-500); font-size: 13px; }

/* ─── PROGRESS STEPS ─── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-item:last-child { flex: none; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step-num.done { background: var(--green-700); color: white; }
.step-num.current { background: var(--gold-50); color: var(--gold-700); border: 2px solid var(--gold-300); }
.step-num.todo { background: var(--ink-05); color: var(--ink-20); }
.step-label { font-size: 11px; color: var(--ink-40); margin-right: 6px; white-space: nowrap; }
.step-line { flex: 1; height: 1.5px; background: var(--ink-10); margin: 0 8px; }
.step-line.done { background: var(--green-600); }

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

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.fade-up { animation: fadeUp 0.25s ease both; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* ─── UTILITY ─── */
.flex { display: flex; }
.fc { display: flex; align-items: center; }
.fb { display: flex; align-items: center; justify-content: space-between; }
.gap4 { gap: 4px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }
.text-muted { color: var(--ink-40); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw7 { font-weight: 700; }
.fw6 { font-weight: 600; }
.mono { font-family: monospace; }
.divider { height: 1px; background: var(--ink-10); margin: 16px 0; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: var(--green-50); color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }

/* ═══════════════════════════════════════ */
/*  LANDING PAGE                            */
/* ═══════════════════════════════════════ */
.landing { background: var(--white); }

.l-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.l-nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.l-brand { display: flex; align-items: center; gap: 10px; }
.l-brand-icon {
  width: 34px; height: 34px; border-radius: var(--radius-s);
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.l-brand-name { font-size: 16px; font-weight: 800; color: var(--white); }
.l-brand-tag {
  font-size: 10px; font-weight: 600; color: var(--gold-300);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; background: rgba(197,151,58,0.12); border-radius: 4px;
}
.l-links { display: flex; gap: 30px; }
.l-links a { font-size: 13.5px; color: rgba(255,255,255,0.6); transition: color .2s; }
.l-links a:hover { color: var(--gold-300); }
.l-nav-cta { display: flex; gap: 10px; }
.l-btn-ghost {
  padding: 9px 18px; border-radius: var(--radius-m); font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.2); color: var(--white); transition: all .2s;
}
.l-btn-ghost:hover { border-color: var(--gold-300); color: var(--gold-300); }
.l-btn-gold {
  padding: 9px 18px; border-radius: var(--radius-m); font-size: 13px; font-weight: 700;
  background: var(--gold-500); color: white; transition: background .2s;
}
.l-btn-gold:hover { background: var(--gold-700); }

.l-hero {
  background: var(--ink); position: relative; overflow: hidden;
  padding: 90px 28px 100px;
}
.l-hero::before {
  content:''; position:absolute; top:-120px; left:-100px; width:420px; height:420px;
  background: radial-gradient(circle, rgba(0,108,53,0.32) 0%, transparent 70%); pointer-events:none;
}
.l-hero::after {
  content:''; position:absolute; bottom:-100px; right:-80px; width:340px; height:340px;
  background: radial-gradient(circle, rgba(197,151,58,0.22) 0%, transparent 70%); pointer-events:none;
}
.l-hero-inner {
  max-width: 1180px; margin: 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 50px; align-items: center;
}
.l-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--gold-300); letter-spacing: 0.05em;
  border: 1px solid rgba(197,151,58,0.35); border-radius: 99px; padding: 6px 15px;
  margin-bottom: 22px;
}
.l-eyebrow::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--gold-500); }
.l-hero h1 {
  font-size: clamp(30px, 4vw, 48px); font-weight: 800; color: var(--white);
  line-height: 1.32; margin-bottom: 20px;
}
.l-hero h1 span { color: var(--gold-300); }
.l-hero p.l-lead { font-size: 15.5px; color: rgba(255,255,255,0.55); max-width: 480px; margin-bottom: 30px; }
.l-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.l-hero-actions .btn { padding: 11px 22px; font-size: 13.5px; }
.l-hero-note { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,0.45); }
.l-hero-note span { display: flex; align-items: center; gap: 7px; }
.l-hero-note i { color: var(--green-500); }

.l-stat-strip { display:flex; gap:24px; }
.l-stat-strip .l-stat b { display:block; font-size:20px; font-weight:800; color: var(--gold-300); }
.l-stat-strip .l-stat span { font-size:11px; color: rgba(255,255,255,0.4); }
.l-stat-divider { width:1px; background: rgba(255,255,255,0.08); }

.l-signature { position: relative; }
.l-signature svg { width: 100%; height: auto; }
@keyframes lDraw { to { stroke-dashoffset: 0; } }
@keyframes lPulse { 0%,100%{ opacity:.6; r:4.5; } 50%{ opacity:1; r:6.5; } }
.l-line { stroke-dasharray: 900; stroke-dashoffset: 900; animation: lDraw 2.2s ease forwards; }
.l-line.l2 { animation-delay: .25s; }
.l-line.l3 { animation-delay: .5s; }
.l-node { animation: lPulse 3s ease-in-out infinite; transform-origin: center; }
.l-node.n2 { animation-delay: .6s; }
.l-node.n3 { animation-delay: 1.2s; }

.l-section { padding: 84px 28px; }
.l-section.alt { background: var(--ink-05); }
.l-wrap { max-width: 1180px; margin: 0 auto; }
.l-section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.l-kicker { font-size: 12.5px; letter-spacing: 0.08em; color: var(--green-700); font-weight: 700; margin-bottom: 12px; text-transform: uppercase; }
.l-section-head h2 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; color: var(--ink); line-height: 1.4; }
.l-section-head p { font-size: 14.5px; color: var(--ink-40); margin-top: 14px; }

.l-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.l-track-title { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--ink-10); }
.l-step { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--ink-10); }
.l-step:last-child { border-bottom: none; }
.l-step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--green-700); color: white;
}
.l-track.buyer .l-step-num { background: var(--gold-500); }
.l-step h4 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.l-step p { font-size: 12.5px; color: var(--ink-40); }

.l-pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.l-pillar { text-align: center; padding: 8px; }
.l-pillar-icon {
  width: 52px; height: 52px; border-radius: var(--radius-l);
  background: var(--green-50); color: var(--green-700);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  margin: 0 auto 18px;
}
.l-pillar h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.l-pillar p { font-size: 13px; color: var(--ink-40); }

.l-feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--ink-10); border: 1px solid var(--ink-10); border-radius: var(--radius-l); overflow: hidden; }
.l-feature { background: var(--white); padding: 26px 24px; }
.l-feature .ti { font-size: 22px; color: var(--green-700); margin-bottom: 12px; display:block; }
.l-feature h4 { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.l-feature p { font-size: 12.5px; color: var(--ink-40); }

.l-cta-band {
  max-width: 1120px; margin: 0 auto; border-radius: var(--radius-xl);
  padding: 56px 44px; text-align: center;
  background: linear-gradient(160deg, var(--ink), #17202c);
  border: 1px solid rgba(197,151,58,0.25); position: relative; overflow: hidden;
}
.l-cta-band::before { content:''; position:absolute; top:-80px; right:-60px; width:280px; height:280px; background: radial-gradient(circle, rgba(197,151,58,0.18) 0%, transparent 70%); }
.l-cta-band h2 { color: var(--white); font-size: clamp(20px,2.4vw,28px); font-weight: 800; margin-bottom: 14px; position:relative; }
.l-cta-band p { color: rgba(255,255,255,0.5); max-width: 440px; margin: 0 auto 28px; font-size: 14px; position:relative; }
.l-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position:relative; }

.l-footer { border-top: 1px solid var(--ink-10); padding: 40px 28px; }
.l-footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-40); }

@media (max-width: 920px) {
  .l-links { display: none; }
  .l-hero-inner { grid-template-columns: 1fr; }
  .l-signature { order: -1; max-width: 320px; margin: 0 auto; }
  .l-tracks { grid-template-columns: 1fr; }
  .l-pillars { grid-template-columns: 1fr; }
  .l-feature-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
/* ═══════════════════════════════════════ */
/*  PRINT DOCUMENT (dedicated clean layout)  */
/* ═══════════════════════════════════════ */
#print-area { display: none; }
.pd-page { direction: rtl; font-family: 'Tajawal', sans-serif; color: #1a1a1a; max-width: 800px; margin: 0 auto; }
.pd-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--green-700); padding-bottom: 16px; margin-bottom: 24px; }
.pd-brand { display: flex; align-items: center; gap: 10px; }
.pd-brand-icon { width: 38px; height: 38px; border-radius: 8px; background: linear-gradient(135deg, var(--green-700), var(--green-500)); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pd-brand-name { font-size: 20px; font-weight: 800; color: var(--green-700); }
.pd-brand-tag { font-size: 11px; color: #777; }
.pd-doc-meta { text-align: left; font-size: 12px; color: #555; line-height: 1.9; }
.pd-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.pd-subtitle { font-size: 13px; color: #666; margin-bottom: 22px; }
.pd-section-title { font-size: 14px; font-weight: 700; color: var(--green-700); margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #ddd; }
.pd-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-bottom: 6px; }
.pd-info-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dotted #ddd; }
.pd-info-row span:first-child { color: #666; }
.pd-info-row span:last-child { font-weight: 700; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 10px; }
.pd-table th { background: var(--green-700); color: #fff; padding: 9px 10px; text-align: right; font-weight: 700; }
.pd-table td { padding: 8px 10px; border-bottom: 1px solid #e5e5e5; }
.pd-table tr:nth-child(even) td { background: #f8f8f8; }
.pd-total-box { margin-top: 6px; margin-inline-start: auto; width: 280px; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.pd-total-row { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 13px; border-bottom: 1px solid #eee; }
.pd-total-row.grand { background: var(--green-50); font-weight: 800; color: var(--green-700); font-size: 15px; }
.pd-footer { margin-top: 40px; padding-top: 12px; border-top: 1px solid #ddd; display: flex; justify-content: space-between; font-size: 10.5px; color: #999; }

/* ═══════════════════════════════════════ */
/*  MOBILE RESPONSIVE (dashboard app)       */
/* ═══════════════════════════════════════ */
@media (max-width: 860px) {
  #mobile-menu-btn { display: flex !important; }
  .sidebar {
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 300;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .main { margin-right: 0; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar-search { width: 130px; }
  .topbar-search:focus-within { width: 160px; }
  .page { padding: 16px 14px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-2-equal { grid-template-columns: 1fr; }
  .fg2, .fg3 { grid-template-columns: 1fr; }

  .card { overflow-x: auto; }
  .tbl { min-width: 560px; }

  .modal { max-width: 94vw !important; width: 94vw; margin: 0 3vw; }
  .overlay { padding: 12px; }

  #ai-fab { bottom: 16px; left: 16px; width: 48px; height: 48px; font-size: 20px; }
  #ai-panel { bottom: 76px; left: 12px; width: calc(100vw - 24px); }

  #notif-panel { width: calc(100vw - 28px); right: -8px; }

  .l-hero-inner, .l-tracks, .l-pillars, .l-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .topbar-title { font-size: 15px; }
}

/* ═══════════════════════════════════════ */
/*  PREMIUM POLISH LAYER                    */
/* ═══════════════════════════════════════ */

/* Refined scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

/* Cards: subtle elevation instead of flat borders */
.card {
  box-shadow: 0 1px 2px rgba(16,24,20,0.04), 0 1px 0 rgba(16,24,20,0.02);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.supplier-card, .stat {
  box-shadow: 0 1px 3px rgba(16,24,20,0.05);
}
.supplier-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,108,53,0.12); }

/* Stat cards: colored top accent matching their icon */
.stat { border-top: 3px solid transparent; }
.stat:has(.stat-icon-wrap.g) { border-top-color: var(--green-500); }
.stat:has(.stat-icon-wrap.o) { border-top-color: var(--gold-500); }
.stat:has(.stat-icon-wrap.b) { border-top-color: #3B82F6; }
.stat:hover { transform: translateY(-2px); }

/* Buttons: subtle depth + smoother interaction */
.btn-primary { box-shadow: 0 1px 2px rgba(0,108,53,0.15); }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(0,108,53,0.25); transform: translateY(-1px); }
.btn-gold { box-shadow: 0 1px 2px rgba(197,151,58,0.2); }
.btn-gold:hover { box-shadow: 0 4px 12px rgba(197,151,58,0.3); transform: translateY(-1px); }
.btn:active { transform: translateY(0) !important; }

/* Nav items: accent bar on active state */
.nav-item { position: relative; }
.nav-item.active::before {
  content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--gold-500); border-radius: 2px 0 0 2px;
}

/* Badges: crisper with subtle border */
.badge { border: 1px solid rgba(0,0,0,0.04); letter-spacing: 0.01em; }

/* Topbar: soft glass effect */
.topbar { backdrop-filter: saturate(1.1); }

/* Table rows: smoother hover */
.tbl tbody tr { transition: background 0.15s ease; }
.tbl tbody tr:hover { background: var(--ink-05); }

/* Inputs: refined focus ring */
.input:focus, .select:focus, .textarea:focus {
  box-shadow: 0 0 0 3px rgba(0,108,53,0.1);
}

/* Smooth view transitions already handled via .fade-up (JS-triggered) */
.skeleton {
  background: linear-gradient(90deg, var(--ink-05) 25%, var(--ink-10) 37%, var(--ink-05) 63%);
  background-size: 400% 100%;
  animation: skeletonShine 1.4s ease infinite;
  border-radius: var(--radius-s);
}
@keyframes skeletonShine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Star rating picker */
.star-picker { display: flex; gap: 4px; font-size: 26px; }
.star-picker span { color: var(--ink-10); cursor: pointer; transition: color 0.15s, transform 0.1s; }
.star-picker span:hover { transform: scale(1.15); }
.star-picker span.filled { color: var(--gold-500); }

/* Toast notifications */
.toast {
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  border: 1px solid rgba(255,255,255,0.1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; top: 0; right: 0; left: 0; padding: 24px; }
  @page { margin: 14mm; }
}

/* ═══════════════════════════════════════ */
/*  AI ASSISTANT                            */
/* ═══════════════════════════════════════ */
#ai-fab {
  position: fixed; bottom: 26px; left: 26px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white; font-size: 24px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,108,53,0.35);
  transition: transform 0.2s;
}
#ai-fab:hover { transform: scale(1.07); }
#ai-fab .pulse { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--gold-500); animation: aiPulse 2s ease-out infinite; }
@keyframes aiPulse { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }

#ai-panel {
  position: fixed; bottom: 96px; left: 26px; z-index: 200;
  width: 360px; max-width: calc(100vw - 52px); max-height: 70vh; overflow-y: auto;
  background: white; border-radius: var(--radius-l); box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  border: 1px solid var(--ink-10);
}
.ai-head {
  background: linear-gradient(135deg, var(--ink), #17202c); color: white;
  padding: 14px 16px; border-radius: var(--radius-l) var(--radius-l) 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ai-head-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ai-body { padding: 16px; font-size: 13px; line-height: 1.9; }
.ai-recommend-card { background: var(--green-50); border: 1px solid var(--green-500); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 12px; }
.ai-score-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--ink-10); font-size: 12.5px; }
.ai-score-bar { flex: 1; height: 6px; background: var(--ink-10); border-radius: 3px; margin: 0 10px; overflow: hidden; }
.ai-score-bar-fill { height: 100%; background: var(--green-600); border-radius: 3px; }
