@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;900&display=swap');

:root {
  --primary: #0F6E56;
  --primary-dark: #085041;
  --primary-light: #1D9E75;
  --primary-50: #E1F5EE;
  --primary-100: #9FE1CB;

  --secondary: #534AB7;
  --accent: #EF9F27;
  --danger: #E24B4A;
  --success: #3B6D11;
  --warning: #BA7517;
  --info: #185FA5;

  --bg: #F4F6F9;
  --bg-card: #FFFFFF;
  --bg-sidebar: #0a2540;
  --bg-sidebar-hover: rgba(255,255,255,0.06);
  --bg-sidebar-active: rgba(15,110,86,0.3);

  --text: #1a2332;
  --text-muted: #6b7c93;
  --text-sidebar: rgba(255,255,255,0.65);
  --text-sidebar-active: #ffffff;

  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.14);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sidebar-w: 240px;
  --header-h: 56px;

  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

body.dark-mode {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-sidebar: #010409;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

[dir="rtl"] { font-family: 'Cairo', sans-serif; }

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

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  min-height: 100vh;
  position: fixed;
  top: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  overflow: hidden;
}
[dir="rtl"] .sidebar { right: 0; left: auto; }
[dir="ltr"] .sidebar { left: 0; right: auto; }

.sidebar-logo {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sidebar-logo-text {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.nav-section-title {
  padding: 10px 12px 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.28);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: #fff; }
.nav-item.active {
  background: var(--bg-sidebar-active);
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  width: 3px; height: 55%;
  background: var(--primary-100);
  border-radius: 2px;
}
[dir="rtl"] .nav-item.active::before { right: -2px; border-radius: 2px 0 0 2px; }
[dir="ltr"] .nav-item.active::before { left: -2px; border-radius: 0 2px 2px 0; }

.nav-icon { font-size: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
  margin-inline-start: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 13px; flex-shrink: 0;
}
.sidebar-user-name { font-size: 12px; font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ── Main ── */
.main-content {
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin 0.3s ease;
}
[dir="rtl"] .main-content { margin-right: var(--sidebar-w); }
[dir="ltr"] .main-content { margin-left: var(--sidebar-w); }

/* ── Header ── */
.header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 14px;
  position: sticky; top: 0; z-index: 50;
}
.header-title { font-size: 16px; font-weight: 700; flex: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  font-size: 0;
}
.icon-btn:hover { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
}

.theme-toggle {
  width: 42px; height: 22px;
  background: var(--border-strong);
  border-radius: 20px;
  position: relative; cursor: pointer;
  border: none; transition: background 0.3s;
  flex-shrink: 0;
}
.theme-toggle::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}
body.dark-mode .theme-toggle { background: var(--primary); }
body.dark-mode .theme-toggle::after { transform: translateX(20px); }
[dir="rtl"] .theme-toggle::after { left: auto; right: 2px; }
[dir="rtl"] body.dark-mode .theme-toggle::after { transform: translateX(-20px); }

.lang-switcher {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 11px; font-weight: 600;
}
.lang-btn {
  padding: 5px 9px;
  background: none; border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  font-family: inherit; font-size: 11px; font-weight: 600;
}
.lang-btn.active { background: var(--primary); color: #fff; }

.menu-toggle {
  display: none; background: none; border: none;
  cursor: pointer; color: var(--text); padding: 6px;
  border-radius: var(--radius-sm);
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ── Page Content ── */
.page-content { flex: 1; padding: 24px; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-strong); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 14px; font-weight: 700; }
.card-body { padding: 20px; }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 14px;
  transition: var(--transition);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.stat-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
}
.stat-card.primary::after { background: var(--primary); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger::after  { background: var(--danger); }
.stat-card.info::after    { background: var(--info); }
.stat-card.purple::after  { background: var(--secondary); }
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.primary { background: var(--primary-50); color: var(--primary); }
.stat-icon.success { background: #EAF3DE; color: var(--success); }
.stat-icon.warning { background: #FAEEDA; color: var(--warning); }
.stat-icon.danger  { background: #FCEBEB; color: var(--danger); }
.stat-icon.info    { background: #E6F1FB; color: var(--info); }
.stat-icon.purple  { background: #EEEDFE; color: var(--secondary); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 900; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.stat-change { font-size: 11px; font-weight: 600; margin-top: 5px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 10px; }
.stat-change.up   { background: #EAF3DE; color: var(--success); }
.stat-change.down { background: #FCEBEB; color: var(--danger); }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg);
  padding: 10px 14px;
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-primary { background: var(--primary-50); color: var(--primary-dark); }
.badge-success { background: #EAF3DE; color: var(--success); }
.badge-warning { background: #FAEEDA; color: #633806; }
.badge-danger  { background: #FCEBEB; color: #791F1F; }
.badge-info    { background: #E6F1FB; color: #0C447C; }
.badge-secondary { background: #EEEDFE; color: #3C3489; }
.badge-dark    { background: rgba(0,0,0,0.08); color: var(--text); }
body.dark-mode .badge-dark { background: rgba(255,255,255,0.1); color: var(--text); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-warning  { background: var(--warning); color: #fff; }
.btn-outline  { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-ghost    { background: transparent; color: var(--text-muted); border: none; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.form-label span { color: var(--danger); }
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px; font-family: inherit;
  background: var(--bg-card); color: var(--text);
  transition: var(--transition); outline: none;
  appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,110,86,0.1); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:600px){ .form-grid { grid-template-columns: 1fr; } }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 580px; max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.22s ease;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 6px; font-size: 18px; line-height: 1; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Toast ── */
.toast-container {
  position: fixed; z-index: 9999; top: 18px;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
[dir="rtl"] .toast-container { left: 18px; right: auto; }
[dir="ltr"] .toast-container { right: 18px; left: auto; }
.toast {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-strong);
  min-width: 280px; max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.28s ease forwards;
  border-inline-start: 3px solid var(--primary);
}
.toast.success { border-inline-start-color: var(--success); }
.toast.error   { border-inline-start-color: var(--danger); }
.toast.warning { border-inline-start-color: var(--warning); }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(20px); } }
.toast.hide { animation: toastOut 0.25s ease forwards; }
.toast-msg { font-size: 13px; font-weight: 500; flex: 1; }

/* ── Alert ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 18px; display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; font-weight: 500;
}
.alert-success { background: #EAF3DE; border: 1px solid #C0DD97; color: var(--success); }
.alert-danger  { background: #FCEBEB; border: 1px solid #F7C1C1; color: #791F1F; }
.alert-warning { background: #FAEEDA; border: 1px solid #FAC775; color: #633806; }
.alert-info    { background: #E6F1FB; border: 1px solid #B5D4F4; color: #0C447C; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; gap: 5px; justify-content: center; padding: 18px 0 6px; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--text);
  cursor: pointer; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: var(--transition);
}
.page-btn:hover    { border-color: var(--primary); color: var(--primary); }
.page-btn.active   { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn {
  padding: 9px 18px;
  background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover  { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Accordion ── */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; overflow: hidden; }
.accordion-header {
  padding: 13px 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 13px;
  background: var(--bg-card); transition: var(--transition);
}
.accordion-header:hover { background: var(--bg); }
.accordion-arrow { transition: transform 0.3s; font-size: 11px; color: var(--text-muted); }
.accordion-item.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body {
  padding: 0 16px; max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 13px; line-height: 1.8; color: var(--text-muted);
}
.accordion-item.open .accordion-body { padding: 13px 16px; max-height: 600px; }

/* ── Progress ── */
.progress { background: var(--bg); border-radius: 20px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }
.progress-bar.info    { background: var(--info); }

/* ── Signature Canvas ── */
.signature-wrapper { border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; position: relative; }
.signature-wrapper canvas { display: block; width: 100%; cursor: crosshair; }
.signature-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; pointer-events: none; }

/* ── Drop Zone ── */
.drop-zone { border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 28px; text-align: center; transition: var(--transition); cursor: pointer; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--primary); background: var(--primary-50); }
.drop-zone-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.35; }
.drop-zone-text { font-size: 12px; color: var(--text-muted); }

/* ── Messages ── */
.messages-wrap { display: flex; flex-direction: column; gap: 14px; padding: 18px; max-height: 420px; overflow-y: auto; }
.message-bubble { max-width: 72%; padding: 11px 14px; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.message-bubble.me    { background: var(--primary); color: #fff; align-self: flex-end; border-end-inline-end-radius: 3px; }
.message-bubble.other { background: var(--bg); border: 1px solid var(--border); align-self: flex-start; border-end-inline-start-radius: 3px; }
.message-meta { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.message-input-wrap { display: flex; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--border); }

/* ── Analysis Box ── */
.analysis-box { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.analysis-header { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.analysis-badge { background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: 0.5px; }
.analysis-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.analysis-flag { background: #FCEBEB; color: #791F1F; border: 1px solid #F7C1C1; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.analysis-suggestions { list-style: none; }
.analysis-suggestions li { padding: 5px 0; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.5); display: flex; align-items: flex-start; gap: 7px; }
.analysis-suggestions li::before { content: '→'; color: var(--primary); font-weight: 700; flex-shrink: 0; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 50px; opacity: 0.2; margin-bottom: 14px; }
.empty-state-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.empty-state-text  { font-size: 13px; }

/* ── Spinner ── */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 18px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.d-flex  { display: flex; }
.d-grid  { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-muted   { color: var(--text-muted); font-size: 12px; }
.text-center  { text-align: center; }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.w-100  { width: 100%; }

/* ── Responsive ── */
@media(max-width:768px) {
  .sidebar { transform: translateX(100%); }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  [dir="rtl"] .main-content { margin-right: 0; }
  [dir="ltr"] .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .header { padding: 0 14px; }
}
@media(max-width:480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid   { grid-template-columns: 1fr; }
}

/* ── Homepage specific ── */
.hp-nav { display:flex;align-items:center;justify-content:space-between;padding:0 32px;height:58px;border-bottom:1px solid var(--border);background:var(--bg-card);position:sticky;top:0;z-index:50; }
.hp-brand { display:flex;align-items:center;gap:10px; }
.hp-brand-icon { width:36px;height:36px;background:var(--primary);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0; }
.hp-brand-name { font-size:12px;font-weight:700;line-height:1.4;max-width:190px; }
.hp-nav-right { display:flex;align-items:center;gap:8px; }
.hp-hero { padding:60px 40px 52px;text-align:center;background:var(--bg-card);border-bottom:1px solid var(--border); }
.hp-hero-pill { display:inline-flex;align-items:center;gap:6px;background:var(--primary-50);border:1px solid var(--primary-100);border-radius:20px;padding:5px 14px;font-size:11px;color:var(--primary-dark);margin-bottom:20px;font-weight:600; }
.hp-hero h1 { font-size:32px;font-weight:900;line-height:1.3;margin-bottom:14px; }
.hp-hero h1 span { color:var(--primary); }
.hp-hero p  { font-size:14px;color:var(--text-muted);line-height:1.8;max-width:430px;margin:0 auto 28px; }
.hp-trust-bar { display:flex;align-items:center;justify-content:center;gap:24px;padding:14px 32px;border-bottom:1px solid var(--border);background:var(--bg);flex-wrap:wrap; }
.hp-trust-item { display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted); }
.hp-trust-item span { color:var(--primary);font-size:15px; }
.hp-section { padding:48px 32px; }
.hp-section-label { font-size:10px;font-weight:700;color:var(--primary);text-transform:uppercase;letter-spacing:1.2px;text-align:center;margin-bottom:6px; }
.hp-section-h2 { font-size:22px;font-weight:900;text-align:center;margin-bottom:8px; }
.hp-section-p  { font-size:13px;color:var(--text-muted);text-align:center;line-height:1.7;max-width:400px;margin:0 auto 32px; }
.hp-roles-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:14px; }
.hp-role-card { border:1px solid var(--border);border-radius:var(--radius);padding:22px;background:var(--bg-card);cursor:pointer;transition:var(--transition); }
.hp-role-card:hover { border-color:var(--primary);transform:translateY(-2px); }
.hp-role-card.featured { border:2px solid var(--primary); }
.hp-role-icon-wrap { width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:14px;font-size:22px; }
.hp-role-icon-wrap.teal   { background:var(--primary-50); }
.hp-role-icon-wrap.blue   { background:#E6F1FB; }
.hp-role-icon-wrap.purple { background:#EEEDFE; }
.hp-role-badge { display:inline-block;font-size:11px;font-weight:600;padding:3px 10px;border-radius:20px;margin-bottom:10px; }
.hp-role-badge.teal   { background:var(--primary-50);color:var(--primary-dark); }
.hp-role-badge.blue   { background:#E6F1FB;color:#0C447C; }
.hp-role-badge.purple { background:#EEEDFE;color:#3C3489; }
.hp-role-title { font-size:15px;font-weight:700;margin-bottom:7px; }
.hp-role-desc  { font-size:12px;color:var(--text-muted);line-height:1.65;margin-bottom:14px; }
.hp-role-features { list-style:none;display:flex;flex-direction:column;gap:5px;margin-bottom:16px; }
.hp-role-features li { font-size:12px;color:var(--text-muted);display:flex;align-items:center;gap:6px; }
.hp-role-features li::before { content:'✓';color:var(--primary);font-weight:700;flex-shrink:0; }
.hp-feat-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.hp-feat-card { background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:18px; }
.hp-feat-icon { width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:12px;font-size:18px; }
.hp-feat-title { font-size:13px;font-weight:700;margin-bottom:5px; }
.hp-feat-desc  { font-size:12px;color:var(--text-muted);line-height:1.6; }
.hp-stats-row { display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:0; }
.hp-stat-box { background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:20px;text-align:center; }
.hp-stat-num { font-size:28px;font-weight:900;color:var(--primary);line-height:1; }
.hp-stat-lbl { font-size:11px;color:var(--text-muted);margin-top:4px; }
.hp-timeline { display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:28px; }
.hp-tl-step { display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 10px; }
.hp-tl-icon { width:48px;height:48px;border-radius:50%;background:var(--primary-50);display:flex;align-items:center;justify-content:center;margin-bottom:14px;font-size:22px; }
.hp-tl-t { font-size:13px;font-weight:700;margin-bottom:6px; }
.hp-tl-d { font-size:12px;color:var(--text-muted);line-height:1.6; }
.hp-cta { padding:48px 32px;background:var(--primary-50);border-top:1px solid var(--primary-100);text-align:center; }
.hp-cta h2 { font-size:22px;font-weight:900;margin-bottom:10px;color:var(--primary-dark); }
.hp-cta p  { font-size:13px;color:var(--primary);line-height:1.7;margin-bottom:24px; }
.hp-footer { padding:28px 32px;border-top:1px solid var(--border);background:var(--bg-card); }
.hp-footer-top { display:flex;justify-content:space-between;flex-wrap:wrap;gap:20px;margin-bottom:20px; }
.hp-footer-col-title { font-size:12px;font-weight:700;margin-bottom:10px; }
.hp-footer-links { display:flex;flex-direction:column;gap:6px; }
.hp-footer-links a { font-size:12px;color:var(--text-muted);text-decoration:none;cursor:pointer; }
.hp-footer-links a:hover { color:var(--primary); }
.hp-footer-bottom { border-top:1px solid var(--border);padding-top:16px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px; }
.hp-footer-copy { font-size:11px;color:var(--text-muted); }
