/* ============================================================
   WASL 2.0 — "AURORA" DESIGN SYSTEM
   Modern SaaS · Mobile-first · RTL-first · A11y-ready
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand */
  --primary: #6053e8;
  --primary-600: #5246d6;
  --primary-700: #4438c2;
  --primary-soft: #edebfe;
  --primary-glow: rgba(96, 83, 232, .22);
  --accent: #12b5a5;
  --accent-soft: #dcf7f4;
  --gold: #f2b23e;
  --gold-soft: #fdf3df;

  /* Semantic */
  --success: #17a673;   --success-soft: #e2f7ee;
  --warning: #e8930c;   --warning-soft: #fdf1dc;
  --danger:  #e5484d;   --danger-soft:  #fde9ea;
  --info:    #2e90fa;   --info-soft:    #e5f1fe;

  /* Surfaces */
  --bg: #f6f7fb;
  --bg-grad: radial-gradient(1200px 500px at 85% -10%, #ece9ff 0%, transparent 60%),
             radial-gradient(900px 420px at -10% 0%, #ddf6f3 0%, transparent 55%),
             linear-gradient(#f6f7fb, #f6f7fb);
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --glass: rgba(255, 255, 255, .78);
  --glass-border: rgba(96, 83, 232, .10);

  /* Ink */
  --ink: #171526;
  --ink-2: #4c4a5e;
  --ink-3: #8a879e;
  --ink-inverse: #ffffff;

  /* Lines */
  --line: #e9e8f2;
  --line-strong: #d9d7e8;

  /* States */
  --hover: #f3f2fb;
  --active: #ebe9fa;
  --disabled-bg: #f0eff6;
  --disabled-ink: #b3b1c4;
  --focus-ring: 0 0 0 3px rgba(96, 83, 232, .35);

  /* Elevation */
  --sh-1: 0 1px 2px rgba(23, 21, 38, .05);
  --sh-2: 0 4px 14px -4px rgba(23, 21, 38, .08);
  --sh-3: 0 14px 34px -12px rgba(23, 21, 38, .14);
  --sh-pop: 0 18px 44px -10px rgba(23, 21, 38, .20);
  --sh-glow: 0 8px 26px -8px var(--primary-glow);

  /* Radius */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-full: 999px;

  /* Spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 72px;

  /* Type */
  --font: 'Tajawal', system-ui, -apple-system, sans-serif;
  --fs-xs: .78rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.15rem;
  --fs-xl: 1.45rem; --fs-2xl: 1.9rem; --fs-3xl: 2.5rem;

  /* Motion */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --t-fast: .16s var(--ease);
  --t-med: .28s var(--ease);

  /* Layout */
  --topbar-h: 64px;
  --bottomnav-h: 66px;
  --sidebar-w: 252px;
  --content-max: 1180px;
}

/* ---------- 2. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--bg-grad); background-attachment: fixed;
  font-size: var(--fs-md); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-block-start: var(--topbar-h);
}
body.has-bottomnav { padding-block-end: calc(var(--bottomnav-h) + 18px); }
img { max-inline-size: 100%; display: block; }
a { color: var(--primary-600); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-700); }
h1, h2, h3 { line-height: 1.25; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 4.5vw, var(--fs-2xl)); margin-block: var(--s-5) var(--s-4); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
code { background: var(--primary-soft); color: var(--primary-700); padding: 2px 7px; border-radius: 6px; font-size: .82em; }
::selection { background: var(--primary-soft); }

/* Accessibility */
.skip-link { position: fixed; inset-block-start: -60px; inset-inline-start: 12px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--r-sm); transition: inset-block-start var(--t-fast); }
.skip-link:focus { inset-block-start: 12px; color: #fff; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-xs); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.container { inline-size: min(100% - 32px, var(--content-max)); margin-inline: auto; }
.help { color: var(--ink-3); font-size: var(--fs-sm); }

/* ---------- 3. TOPBAR (glass) ---------- */
.topbar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 120;
  block-size: var(--topbar-h);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-block-end: 1px solid var(--glass-border);
}
.topbar-in { display: flex; align-items: center; gap: var(--s-4); block-size: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.14rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  inline-size: 38px; block-size: 38px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-size: 1.15rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 10%, #8b7bff 55%, var(--accent) 130%);
  box-shadow: var(--sh-glow);
}
.mainnav { display: none; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s-2); }

/* icon buttons */
.icobtn {
  position: relative; inline-size: 40px; block-size: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: transparent; color: var(--ink-2); font-size: 1.12rem;
  transition: background var(--t-fast), transform var(--t-fast);
}
.icobtn:hover { background: var(--hover); }
.icobtn:active { transform: scale(.92); }
.dotbadge {
  position: absolute; inset-block-start: 6px; inset-inline-end: 6px;
  min-inline-size: 17px; block-size: 17px; padding-inline: 4px; border-radius: var(--r-full);
  background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}

/* search pill (desktop) */
.searchpill {
  display: none; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-full); padding: 9px 16px; color: var(--ink-3); font-size: var(--fs-sm);
  min-inline-size: 230px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.searchpill:hover { border-color: var(--primary); box-shadow: var(--sh-glow); }
.searchpill kbd {
  margin-inline-start: auto; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 7px; font-size: .7rem; font-family: var(--font); color: var(--ink-3);
}

/* dropdown panels (user menu / notifications) */
.pop {
  position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0;
  inline-size: min(92vw, 360px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-pop); z-index: 200;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.pop.open { opacity: 1; transform: none; pointer-events: auto; }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-block-end: 1px solid var(--line); font-weight: 700; }
.pop-list { max-block-size: 340px; overflow: auto; }
.pop-item { display: flex; gap: 12px; padding: 12px 18px; border-block-end: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); transition: background var(--t-fast); }
.pop-item:hover { background: var(--hover); }
.pop-item.unread { background: var(--primary-soft); }
.pop-item:last-child { border-block-end: 0; }
.pop-foot { padding: 10px; text-align: center; border-block-start: 1px solid var(--line); }
.usermenu-head { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-block-end: 1px solid var(--line); }
.usermenu a.mrow { display: flex; align-items: center; gap: 10px; padding: 11px 18px; color: var(--ink-2); font-size: var(--fs-sm); }
.usermenu a.mrow:hover { background: var(--hover); color: var(--ink); }
.usermenu a.mrow.danger { color: var(--danger); }

.avatar {
  inline-size: 38px; block-size: 38px; border-radius: var(--r-full); flex: none;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .95rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.avatar.lg { inline-size: 46px; block-size: 46px; }

/* language switch */
.langsw { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-full); padding: 3px; }
.langsw a { padding: 4px 11px; border-radius: var(--r-full); font-size: .74rem; font-weight: 700; color: var(--ink-3); }
.langsw a.on { background: var(--surface); color: var(--primary-600); box-shadow: var(--sh-1); }

/* ---------- 4. APP SHELL (dashboard) ---------- */
.shell { display: block; }
.sidebar { display: none; }
.main { padding-block: var(--s-5) var(--s-8); min-block-size: calc(100vh - var(--topbar-h)); }

.snav-group { font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; padding: 18px 14px 6px; }
.snav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-block-end: 2px;
  border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: .95rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.snav a .ic { inline-size: 22px; text-align: center; font-size: 1.05rem; }
.snav a:hover { background: var(--hover); color: var(--ink); }
.snav a.active { background: var(--primary-soft); color: var(--primary-700); font-weight: 700; }
.snav a .cnt { margin-inline-start: auto; background: var(--danger); color: #fff; border-radius: var(--r-full); font-size: .68rem; padding: 1px 8px; font-weight: 700; }

/* ---------- 5. MOBILE BOTTOM NAV + FAB ---------- */
.bottomnav {
  position: fixed; inset-block-end: 10px; inset-inline: 10px; z-index: 110;
  block-size: var(--bottomnav-h); border-radius: var(--r-lg);
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--glass-border); box-shadow: var(--sh-3);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-inline: 4px;
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: .66rem; font-weight: 700; border-radius: var(--r-md);
  position: relative; transition: color var(--t-fast);
}
.bottomnav a .ic { font-size: 1.3rem; transition: transform var(--t-fast); }
.bottomnav a.active { color: var(--primary-600); }
.bottomnav a.active .ic { transform: translateY(-2px) scale(1.12); }
.bottomnav a.active::after { content: ''; position: absolute; inset-block-end: 6px; inline-size: 5px; block-size: 5px; border-radius: 50%; background: var(--primary); }
.bottomnav .cnt { position: absolute; inset-block-start: 8px; inset-inline-end: calc(50% - 22px); background: var(--danger); color: #fff; border-radius: var(--r-full); min-inline-size: 16px; block-size: 16px; font-size: .62rem; display: grid; place-items: center; padding-inline: 3px; }

.fab {
  position: fixed; inset-block-end: calc(var(--bottomnav-h) + 26px); inset-inline-end: 18px; z-index: 111;
  inline-size: 58px; block-size: 58px; border-radius: 20px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #8b7bff); color: #fff; font-size: 1.5rem;
  box-shadow: var(--sh-glow), var(--sh-3); display: grid; place-items: center;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.fab:active { transform: scale(.9); }

/* ---------- 6. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: .95rem;
  padding: 12px 22px; border-radius: var(--r-sm); min-block-size: 44px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  text-align: center;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { background: var(--disabled-bg) !important; color: var(--disabled-ink) !important; box-shadow: none; cursor: not-allowed; }
.btn-gold, .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; box-shadow: var(--sh-glow); }
.btn-gold:hover, .btn-primary:hover { box-shadow: 0 10px 30px -6px var(--primary-glow); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262438; color: #fff; }
.btn-line { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn-line:hover { border-color: var(--primary); color: var(--primary-600); background: var(--surface); }
.btn-ok { background: var(--success); color: #fff; }
.btn-ok:hover { background: #128a5f; color: #fff; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary-600); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-sm { padding: 7px 14px; min-block-size: 36px; font-size: .82rem; border-radius: 10px; }

/* ---------- 7. CARDS ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(18px, 3vw, 26px);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--t-med), transform var(--t-med), border-color var(--t-med);
}
.card.hoverable:hover, a.card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--primary-soft); }
.card h3 { margin-block-start: 0; }

.grid { display: grid; gap: var(--s-4); }
@media (min-width: 720px) { .grid { gap: var(--s-5); } }

/* ---------- 8. KPI / STAT CARDS ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); margin-block: var(--s-4) var(--s-6); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: var(--s-4); } }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; box-shadow: var(--sh-1); transition: transform var(--t-med), box-shadow var(--t-med);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.kpi::before { content: ''; position: absolute; inset-inline-start: 0; inset-block: 14px; inline-size: 4px; border-radius: var(--r-full); background: linear-gradient(var(--primary), var(--accent)); }
.kpi b { display: block; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; color: var(--ink); line-height: 1.1; }
.kpi span { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 500; }
.kpi .trend { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: var(--r-full); }
.trend.up { background: var(--success-soft); color: var(--success); }
.trend.down { background: var(--danger-soft); color: var(--danger); }

/* ---------- 9. BADGES / CHIPS / TAGS ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--r-full); font-size: .74rem; font-weight: 700; }
.badge::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.b-active   { background: var(--success-soft); color: var(--success); }
.b-pending  { background: var(--warning-soft); color: var(--warning); }
.b-rejected { background: var(--danger-soft);  color: var(--danger); }
.b-info     { background: var(--info-soft);    color: var(--info); }
.b-muted    { background: var(--disabled-bg);  color: var(--ink-3); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: var(--r-full); font-size: .76rem; font-weight: 700; border: 1px solid transparent; }
.chip-job        { background: var(--primary-soft); color: var(--primary-700); }
.chip-internship { background: var(--accent-soft);  color: #0c8a7d; }
.chip-training   { background: var(--gold-soft);    color: #b57d12; }

/* ---------- 10. FORMS ---------- */
label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-block: var(--s-4) 6px; color: var(--ink-2); }
input, select, textarea {
  inline-size: 100%; font-family: var(--font); font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 12px 16px; min-block-size: 48px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
input:disabled { background: var(--disabled-bg); color: var(--disabled-ink); }
textarea { min-block-size: 130px; resize: vertical; }
.form-row { display: grid; gap: 0 var(--s-4); }
@media (min-width: 680px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-card { max-inline-size: 460px; margin-inline: auto; }
.form-wide { max-inline-size: 760px; margin-inline: auto; }

/* ---------- 11. TABLES → responsive cards on mobile ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); overflow: hidden; }
table { inline-size: 100%; border-collapse: collapse; }
th { text-align: start; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 18px; background: var(--surface-2); border-block-end: 1px solid var(--line); }
td { padding: 15px 18px; border-block-end: 1px solid var(--line); font-size: var(--fs-sm); vertical-align: middle; }
tr:last-child td { border-block-end: 0; }
tbody tr, table tr { transition: background var(--t-fast); }
table tr:hover td { background: var(--surface-2); }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-block; }

@media (max-width: 719px) {
  .table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
    margin-block-end: var(--s-3); padding: 8px 4px; box-shadow: var(--sh-1);
  }
  .table-wrap td { border: 0; padding: 8px 16px; }
  .table-wrap td[data-th]::before { content: attr(data-th); display: block; font-size: .68rem; color: var(--ink-3); font-weight: 800; letter-spacing: .05em; margin-block-end: 2px; }
}

/* ---------- 12. FILTERS BAR ---------- */
.filters { display: grid; gap: var(--s-2); grid-template-columns: 1fr; background: var(--surface); padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.filters input, .filters select { min-block-size: 46px; }
@media (min-width: 720px) { .filters { grid-template-columns: 2fr 1fr 1fr auto; align-items: center; } }

/* ---------- 13. PAGINATION ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-block: var(--s-6); flex-wrap: wrap; }
.pagination a { min-inline-size: 42px; block-size: 42px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: var(--fs-sm); transition: all var(--t-fast); }
.pagination a:hover { border-color: var(--primary); color: var(--primary-600); }
.pagination a.cur { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--sh-glow); }

/* ---------- 14. FLASH → TOASTS ---------- */
.toasts { position: fixed; inset-block-start: calc(var(--topbar-h) + 10px); inset-inline: 12px; z-index: 260; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 720px) { .toasts { inset-inline: auto 24px; inline-size: 380px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 18px; box-shadow: var(--sh-pop); font-size: var(--fs-sm); font-weight: 600;
  animation: toastIn .35s var(--ease);
}
.toast::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; flex: none; }
.toast.ok::before { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.toast.error::before { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.toast.info::before { background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: all .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
/* legacy inline flashes fall back gracefully */
.flash { border-radius: var(--r-md); padding: 14px 18px; margin-block: var(--s-3); font-size: var(--fs-sm); font-weight: 600; border: 1px solid; }
.flash-ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.flash-info { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* ---------- 15. EMPTY / SKELETON / PROGRESS ---------- */
.empty {
  text-align: center; padding: var(--s-9) var(--s-5); color: var(--ink-3);
  background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
}
.empty::before { content: '◎'; display: block; font-size: 2.4rem; margin-block-end: 8px; opacity: .4; }
.skeleton { position: relative; overflow: hidden; background: var(--disabled-bg); border-radius: var(--r-sm); min-block-size: 14px; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress { block-size: 8px; background: var(--disabled-bg); border-radius: var(--r-full); overflow: hidden; }
.progress > i { display: block; block-size: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--primary), var(--accent)); transition: inline-size .6s var(--ease); }

/* timeline */
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 7px; inset-block: 6px; inline-size: 2px; background: var(--line-strong); border-radius: 2px; }
.tl-item { position: relative; padding-block-end: var(--s-5); }
.tl-item::before { content: ''; position: absolute; inset-inline-start: -21px; inset-block-start: 5px; inline-size: 12px; block-size: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }

/* ---------- 16. NOTIFICATION ROWS ---------- */
.notif { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 18px; margin-block-end: var(--s-2); transition: all var(--t-fast); }
.notif:hover { border-color: var(--primary-soft); box-shadow: var(--sh-2); }
.notif.unread { border-inline-start: 4px solid var(--primary); background: linear-gradient(to left, var(--surface), var(--primary-soft) 400%); }

/* ---------- 17. CHAT ---------- */
.chat-layout { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 900px) { .chat-layout { grid-template-columns: 300px 1fr; block-size: calc(100vh - 210px); } }
.chat-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: auto; box-shadow: var(--sh-1); }
.chat-list a { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-block-end: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); transition: background var(--t-fast); flex-wrap: wrap; }
.chat-list a:hover { background: var(--hover); }
.chat-list a.active { background: var(--primary-soft); border-inline-start: 3px solid var(--primary); }
.chat-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; box-shadow: var(--sh-1); min-block-size: 420px; }
.chat-msgs { flex: 1; overflow: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: 10px; }
.msg { max-inline-size: 78%; padding: 11px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.55; animation: msgIn .3s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg small { display: block; opacity: .65; font-size: .68rem; margin-block-start: 4px; }
.msg-me { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; border-end-end-radius: 6px; }
.msg-them { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-end-start-radius: 6px; }
.chat-send { display: flex; gap: 8px; padding: 12px; border-block-start: 1px solid var(--line); }
.chat-send input { min-block-size: 46px; }

/* ---------- 18. HERO (public home) ---------- */
.hero { position: relative; padding-block: clamp(40px, 8vw, 90px) clamp(46px, 7vw, 80px); overflow: hidden; }
.hero-grid { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.3rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; }
.hero h1 .hl { background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--ink-2); font-size: clamp(1rem, 2.4vw, 1.18rem); max-inline-size: 54ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-block-start: var(--s-6); }
.hero-search { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); padding: 8px; border-radius: var(--r-lg); box-shadow: var(--sh-2); margin-block-start: var(--s-6); }
.hero-search input { border: 0; min-block-size: 46px; box-shadow: none !important; }
.hero-art { position: relative; display: none; }
@media (min-width: 960px) { .hero-art { display: block; } }
.float-card { position: absolute; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--glass-border); border-radius: var(--r-md); padding: 14px 18px; box-shadow: var(--sh-3); font-size: var(--fs-sm); font-weight: 700; animation: floaty 5s ease-in-out infinite; }
.float-card small { display: block; color: var(--ink-3); font-weight: 500; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-blob { inline-size: 100%; aspect-ratio: 1; border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft) 70%); border: 1px solid var(--glass-border); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); margin-block: var(--s-6); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: var(--r-md); padding: 20px 10px; box-shadow: var(--sh-1); }
.stat b { display: block; font-size: clamp(1.4rem, 4vw, 1.9rem); background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--ink-3); font-size: var(--fs-sm); }

/* sections */
.section { padding-block: clamp(30px, 6vw, 60px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: var(--s-5); flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* offer cards */
.offers-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 680px)  { .offers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .offers-grid { grid-template-columns: repeat(3, 1fr); } }
.offer-card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.offer-card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ink-3); font-size: var(--fs-sm); }
.offer-card h3 { margin: 0; font-size: 1.06rem; }
.offer-card h3 a { color: var(--ink); }
.offer-card h3 a:hover { color: var(--primary-600); }
.offer-card .foot { margin-block-start: auto; display: flex; justify-content: space-between; align-items: center; padding-block-start: 10px; border-block-start: 1px dashed var(--line); }
.favbtn { border: 0; background: transparent; cursor: pointer; font-size: 1.25rem; color: var(--ink-3); transition: transform var(--t-fast), color var(--t-fast); padding: 6px; border-radius: var(--r-xs); }
.favbtn:hover { transform: scale(1.15); }
.favbtn.on { color: var(--danger); animation: popfav .35s var(--ease); }
@keyframes popfav { 50% { transform: scale(1.45); } }

/* company logos strip */
.companies { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
@media (min-width: 760px) { .companies { grid-template-columns: repeat(4, 1fr); } }
.company-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.company-logo { inline-size: 58px; block-size: 58px; border-radius: 18px; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); color: var(--primary-700); font-weight: 800; font-size: 1.4rem; }

/* how it works */
.steps { display: grid; gap: var(--s-4); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: step; position: relative; }
.step::before { content: counter(step, arabic-indic); position: absolute; inset-block-start: -14px; inset-inline-start: 18px; inline-size: 34px; block-size: 34px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; box-shadow: var(--sh-glow); }
html[dir="ltr"] .step::before { content: counter(step); }

/* FAQ accordion */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-block-end: var(--s-2); overflow: hidden; transition: border-color var(--t-fast); }
details.faq[open] { border-color: var(--primary-soft); box-shadow: var(--sh-2); }
details.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '＋'; color: var(--primary); font-weight: 800; transition: transform var(--t-fast); }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .faq-body { padding: 0 20px 18px; color: var(--ink-2); font-size: var(--fs-sm); }

/* auth hero */
.auth-hero { text-align: center; padding-block: clamp(26px, 5vw, 46px) 6px; }
.auth-hero h1 { margin-block-end: 4px; }
.auth-wrap { padding-block: var(--s-5) var(--s-9); }

/* role pick */
.role-pick { display: grid; gap: var(--s-3); grid-template-columns: 1fr; max-inline-size: 720px; margin-inline: auto; }
@media (min-width: 720px) { .role-pick { grid-template-columns: repeat(3, 1fr); } }
.role-pick a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: var(--s-7) var(--s-4); font-weight: 800; color: var(--ink); transition: all var(--t-med); }
.role-pick a .ico { font-size: 2.2rem; }
.role-pick a:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--sh-glow); color: var(--primary-700); }

/* page content (CMS) */
.page-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 40px); box-shadow: var(--sh-1); line-height: 1.9; }
.page-body h2, .page-body h3 { margin-block-start: 1.6em; }

/* footer */
.site-footer { margin-block-start: var(--s-9); background: var(--ink); color: #cac8dd; padding-block: var(--s-8) calc(var(--s-6) + env(safe-area-inset-bottom)); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl); }
.site-footer a { color: #cac8dd; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.15rem; margin-block-end: 10px; }
.footer-bottom { border-block-start: 1px solid rgba(255,255,255,.12); margin-block-start: var(--s-6); padding-block-start: var(--s-4); font-size: var(--fs-xs); color: #8f8ca8; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- 19. COMMAND PALETTE ---------- */
.cmdk-back { position: fixed; inset: 0; z-index: 240; background: rgba(23, 21, 38, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity var(--t-fast); }
.cmdk-back.open { opacity: 1; pointer-events: auto; }
.cmdk { position: fixed; z-index: 250; inset-inline: 12px; inset-block-start: 12vh; margin-inline: auto; max-inline-size: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-pop); overflow: hidden; opacity: 0; transform: translateY(-14px) scale(.98); pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast); }
.cmdk.open { opacity: 1; transform: none; pointer-events: auto; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 6px 18px; border-block-end: 1px solid var(--line); }
.cmdk-input input { border: 0; box-shadow: none !important; font-size: 1.05rem; min-block-size: 54px; }
.cmdk-list { max-block-size: min(52vh, 420px); overflow: auto; padding: 8px; }
.cmdk-group { font-size: .66rem; font-weight: 800; letter-spacing: .08em; color: var(--ink-3); padding: 12px 12px 4px; text-transform: uppercase; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); color: var(--ink-2); font-size: .93rem; cursor: pointer; }
.cmdk-item .ic { inline-size: 24px; text-align: center; }
.cmdk-item small { margin-inline-start: auto; color: var(--ink-3); font-size: .7rem; }
.cmdk-item:hover, .cmdk-item.sel { background: var(--primary-soft); color: var(--primary-700); }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 18px; border-block-start: 1px solid var(--line); color: var(--ink-3); font-size: .7rem; }
.cmdk-foot kbd { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-family: var(--font); }

/* ---------- 20. BOTTOM SHEET (mobile) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 230; background: rgba(23,21,38,.45); opacity: 0; pointer-events: none; transition: opacity var(--t-fast); }
.sheet-back.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 231; inset-inline: 0; inset-block-end: 0; background: var(--surface); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl); box-shadow: var(--sh-pop); transform: translateY(105%); transition: transform var(--t-med); padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); max-block-size: 82vh; overflow: auto; }
.sheet.open { transform: none; }
.sheet::before { content: ''; display: block; inline-size: 44px; block-size: 5px; border-radius: 5px; background: var(--line-strong); margin: 6px auto 14px; }

/* ---------- 21. INSIGHTS / CHARTS ---------- */
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-block-end: var(--s-2); font-size: var(--fs-sm); }
.insight .ic { font-size: 1.2rem; }
.chart-card svg { inline-size: 100%; block-size: auto; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; }
.chart-area { fill: url(#gradA); opacity: .9; }
.chart-line.alt { stroke: var(--accent); }
.chart-axis { font-size: 9px; fill: var(--ink-3); font-family: var(--font); }
.legend { display: flex; gap: 16px; font-size: var(--fs-xs); color: var(--ink-3); flex-wrap: wrap; }
.legend i { inline-size: 10px; block-size: 10px; border-radius: 3px; display: inline-block; margin-inline-end: 5px; }
.donut-wrap { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }

/* ---------- 22. DESKTOP LAYOUT ---------- */
@media (min-width: 1024px) {
  .mainnav { display: flex; gap: 4px; margin-inline-start: var(--s-5); }
  .mainnav a { padding: 9px 16px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: .93rem; transition: all var(--t-fast); }
  .mainnav a:hover { background: var(--hover); color: var(--ink); }
  .mainnav a.active { color: var(--primary-700); background: var(--primary-soft); }
  .searchpill { display: flex; }
  .bottomnav, .fab { display: none; }
  body.has-bottomnav { padding-block-end: 0; }

  .shell.with-side { display: grid; grid-template-columns: var(--sidebar-w) 1fr; gap: var(--s-6); inline-size: min(100% - 48px, 1380px); margin-inline: auto; }
  .sidebar {
    display: block; position: sticky; inset-block-start: calc(var(--topbar-h) + 20px);
    align-self: start; max-block-size: calc(100vh - var(--topbar-h) - 40px); overflow: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 12px; box-shadow: var(--sh-1); margin-block-start: var(--s-5);
  }
  .shell.with-side > .main { inline-size: auto; }
  .shell.with-side .container { inline-size: 100%; }
}

/* page enter animation */
.main, .hero, .section { animation: pageIn .4s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }

/* print */
@media print { .topbar, .bottomnav, .fab, .sidebar, .site-footer, .toasts { display: none !important; } body { padding: 0; background: #fff; } }
