/* ================================================================
   VAMOS Admin Dashboard — Premium style.css  v2.0
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #76C82F;
  --primary-light: #8AD14D;
  --primary-dark: #5CA220;
  --navy: #0F1724;
  --navy-light: #1A2540;
  --navy-mid: #202D4A;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --purple: #8B5CF6;
  --bg: #F1F4FB;
  --surface: #FFFFFF;
  --surface-2: #F8FAFF;
  --border: #E5EAF5;
  --text-primary: #0F1724;
  --text-secondary: #64748B;
  --text-hint: #94A3B8;
  --sidebar-w: 252px;
  --topbar-h: 68px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(15,23,36,0.06);
  --shadow-md: 0 8px 32px rgba(15,23,36,0.10);
  --shadow-lg: 0 16px 48px rgba(15,23,36,0.14);
}

html { font-family: 'Cairo', sans-serif; direction: rtl; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text-primary); min-height: 100vh; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-hint); }

/* ── Layout ─────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  background-image: 
    radial-gradient(ellipse at 20% 20%, rgba(118,200,47,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(59,130,246,0.06) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.04);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: white;
  box-shadow: 0 4px 16px rgba(118,200,47,0.35);
}

.logo-text {
  font-size: 22px; font-weight: 900;
  color: white; letter-spacing: 2px;
}
.logo-text .orange { color: var(--primary); }

.sidebar-section-label {
  padding: 14px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
  padding-right: 18px;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(118,200,47,0.22), rgba(255,122,61,0.12));
  color: #FF7A3D;
  border: 1px solid rgba(118,200,47,0.2);
  box-shadow: 0 4px 12px rgba(118,200,47,0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-icon { font-size: 17px; min-width: 22px; text-align: center; }
.nav-label { flex: 1; }

.badge {
  background: linear-gradient(135deg, var(--danger), #F87171);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.1);
}

.admin-info {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}

.admin-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; font-size: 16px;
  box-shadow: 0 4px 10px rgba(118,200,47,0.3);
}

.admin-name { color: white; font-size: 13px; font-weight: 700; }
.admin-role { color: rgba(255,255,255,0.35); font-size: 11px; }

.logout-btn {
  width: 100%;
  padding: 9px;
  background: rgba(239,68,68,0.1);
  color: #FCA5A5;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.2); color: #FECACA; }

/* ── Main Content ─────────────────────────────────────────────── */
.main-content {
  margin-right: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding-bottom: 40px;
}

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 var(--border), var(--shadow);
}

.menu-toggle {
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--text-secondary);
  display: none; padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.menu-toggle:hover { background: var(--bg); }

.topbar-title h1 {
  font-size: 17px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.topbar-sub { font-size: 11px; color: var(--text-hint); }
.topbar-actions { margin-right: auto; display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 7px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(118,200,47,0.08);
}
.search-input {
  border: none; background: none;
  font-family: 'Cairo', sans-serif;
  font-size: 13px; outline: none;
  width: 170px; direction: rtl;
  color: var(--text-primary);
}

.notif-btn {
  position: relative;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 11px; padding: 7px 12px;
  cursor: pointer; font-size: 16px;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.notif-btn:hover { background: var(--surface); border-color: var(--primary); }
.notif-count {
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  font-family: 'Cairo', sans-serif;
}

.date-badge {
  background: var(--navy-light);
  color: rgba(255,255,255,0.9);
  border-radius: 11px;
  padding: 7px 14px;
  font-size: 12px; font-weight: 600;
}

/* ── Stats Grid ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 28px 0;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.success::before { background: linear-gradient(90deg, var(--success), #34D399); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.stat-card.info::before    { background: linear-gradient(90deg, var(--info), #60A5FA); }
.stat-card.danger::before  { background: linear-gradient(90deg, var(--danger), #F87171); }
.stat-card.purple::before  { background: linear-gradient(90deg, var(--purple), #A78BFA); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-top { display: flex; align-items: center; justify-content: space-between; }

.stat-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-card.primary .stat-icon-wrap { background: rgba(118,200,47,0.1); }
.stat-card.success .stat-icon-wrap { background: rgba(16,185,129,0.1); }
.stat-card.warning .stat-icon-wrap { background: rgba(245,158,11,0.1); }
.stat-card.info .stat-icon-wrap    { background: rgba(59,130,246,0.1); }
.stat-card.danger .stat-icon-wrap  { background: rgba(239,68,68,0.1); }
.stat-card.purple .stat-icon-wrap  { background: rgba(139,92,246,0.1); }

.stat-change-pill {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.stat-change-pill.positive { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-change-pill.negative { background: rgba(239,68,68,0.1); color: var(--danger); }
.stat-change-pill.neutral  { background: rgba(100,116,139,0.1); color: var(--text-secondary); }

.stat-value { font-size: 30px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }

/* ── Charts ──────────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 16px 28px 0;
}

.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.chart-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.chart-header h3 { font-size: 15px; font-weight: 800; }
.chart-header-actions { display: flex; gap: 8px; }
.chart-period-btn {
  padding: 4px 10px;
  border-radius: 8px; border: 1px solid var(--border);
  background: none; cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.chart-period-btn.active,
.chart-period-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

.chart-legend { display: flex; gap: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.orange { background: var(--primary); }
.dot.navy   { background: var(--info); }

.doughnut-legend { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.doughnut-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary); font-weight: 600;
}
.doughnut-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ── Table ───────────────────────────────────────────────────── */
.table-section {
  margin: 16px 28px 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.table-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.table-header h3 { font-size: 15px; font-weight: 800; }
.view-all-btn {
  color: var(--primary); font-size: 13px;
  font-weight: 700; text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 8px;
  background: rgba(118,200,47,0.06);
  transition: background 0.2s;
}
.view-all-btn:hover { background: rgba(118,200,47,0.12); }
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--surface-2);
  text-align: right;
  padding: 12px 18px;
  font-size: 11px; font-weight: 700;
  color: var(--text-hint);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover td { background: rgba(118,200,47,0.025); }

.order-id { font-weight: 800; color: var(--navy); font-size: 12px; }

.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center; gap: 5px;
}
.badge-status::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
}
.badge-status.delivering { background: rgba(59,130,246,0.1); color: var(--info); }
.badge-status.delivering::before { background: var(--info); }
.badge-status.delivered  { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-status.delivered::before  { background: var(--success); }
.badge-status.pending    { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-status.pending::before    { background: var(--warning); animation: pulse-dot 1.5s infinite; }
.badge-status.cancelled  { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-status.cancelled::before  { background: var(--danger); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.action-btn {
  padding: 5px 13px;
  border-radius: 8px;
  border: none; cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 12px; font-weight: 700;
  transition: all 0.2s;
}
.action-btn.view   { background: rgba(59,130,246,0.1); color: var(--info); }
.action-btn.assign { background: rgba(118,200,47,0.1); color: var(--primary); }
.action-btn.approve { background: rgba(16,185,129,0.1); color: var(--success); }
.action-btn.reject  { background: rgba(239,68,68,0.1); color: var(--danger); }
.action-btn:hover  { filter: brightness(0.9); transform: scale(0.97); }

/* ── Bottom Row ──────────────────────────────────────────────── */
.bottom-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px 28px 0;
}

.mini-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.mini-card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mini-card-header h3 { font-size: 14px; font-weight: 800; }
.mini-card-header a { font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 700; }
.orange-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  box-shadow: 0 2px 8px rgba(118,200,47,0.25);
}

/* Drivers */
.driver-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.driver-item:last-child { border-bottom: none; }
.driver-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  border-radius: 10px;
  display: flex; align-items: center;
  justify-content: center;
  color: white; font-weight: 800; font-size: 14px;
}
.driver-name { font-size: 13px; font-weight: 700; }
.driver-status { font-size: 11px; font-weight: 600; }
.driver-status.delivering { color: var(--info); }
.driver-status.online     { color: var(--success); }
.driver-status.offline    { color: var(--text-hint); }
.driver-rating {
  font-size: 12px; font-weight: 700; color: var(--warning);
  background: rgba(245,158,11,0.1);
  padding: 3px 7px; border-radius: 8px;
}
.driver-info { flex: 1; }

/* Stores */
.store-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.store-item:last-child { border-bottom: none; }
.store-rank {
  width: 30px; height: 30px;
  background: rgba(118,200,47,0.08);
  color: var(--primary);
  border-radius: 9px;
  display: flex; align-items: center;
  justify-content: center;
  font-size: 13px; font-weight: 900;
  flex-shrink: 0;
}
.store-rank.gold { background: rgba(245,158,11,0.12); color: var(--warning); }
.store-name { font-size: 13px; font-weight: 700; }
.store-orders { font-size: 11px; color: var(--text-hint); font-weight: 600; }
.store-rev { font-size: 13px; font-weight: 800; color: var(--success); }
.store-info { flex: 1; }

/* Notifications */
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
  border-radius: 8px; padding: 8px;
  margin: 0 -8px;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.urgent .notif-title { color: var(--danger); }
.notif-dot-wrap {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-dot-wrap.red    { background: rgba(239,68,68,0.1); }
.notif-dot-wrap.orange { background: rgba(118,200,47,0.1); }
.notif-dot-wrap.blue   { background: rgba(59,130,246,0.1); }
.notif-title { font-size: 13px; font-weight: 700; }
.notif-msg   { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.notif-time  { font-size: 10px; color: var(--text-hint); margin-top: 4px; font-weight: 600; }

/* ── Quick Actions ───────────────────────────────────────────── */
.quick-actions {
  display: flex; gap: 10px;
  padding: 16px 28px 0;
  flex-wrap: wrap;
}
.quick-action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 12px; border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-action-btn.primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(118,200,47,0.3); }
.quick-action-btn.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.quick-action-btn.secondary { background: var(--surface); color: var(--text-primary); border: 1.5px solid var(--border); }
.quick-action-btn.secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1400px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 0; border-left: none; }
  .sidebar.open { width: var(--sidebar-w); }
  .main-content { margin-right: 0; }
  .menu-toggle { display: block; }
  .stats-grid { padding: 16px 16px 0; grid-template-columns: repeat(2, 1fr); }
  .charts-row, .table-section, .bottom-row, .quick-actions { margin-left: 16px; margin-right: 16px; }
  .bottom-row { grid-template-columns: 1fr; }
  .search-box { display: none; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding-bottom: 20px; }
}

/* ── Pages Shared Styles ─────────────────────────────────────── */
.page-header {
  padding: 24px 28px 0;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 20px; font-weight: 900; }
.page-title-sub { font-size: 13px; color: var(--text-hint); margin-top: 2px; font-weight: 600; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  padding: 9px 18px;
  border-radius: 11px;
  border: none; cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 13px; font-weight: 700;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 3px 10px rgba(118,200,47,0.25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(0.9); }
.btn-danger  { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(0.9); }
.btn-sm { padding: 6px 13px; font-size: 12px; border-radius: 9px; }

.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 28px 0;
  flex-wrap: wrap;
}
.filter-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px; background: var(--surface);
  color: var(--text-primary); outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--primary); }

.content-card {
  margin: 16px 28px 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ── Loading State ───────────────────────────────────────────── */
.loading-placeholder {
  height: 20px;
  background: linear-gradient(90deg, var(--bg) 25%, #E8ECF5 50%, var(--bg) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,36,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  width: 480px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
  font-size: 18px; font-weight: 900;
  margin-bottom: 6px;
}
.modal-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-secondary); }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text-primary);
  background: var(--surface);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(118,200,47,0.08);
}

/* ── Avatar Initials ─────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: white;
  flex-shrink: 0;
}
.avatar.orange { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.avatar.navy   { background: linear-gradient(135deg, var(--navy-light), var(--navy-mid)); }
.avatar.green  { background: linear-gradient(135deg, var(--success), #34D399); }
.avatar.purple { background: linear-gradient(135deg, var(--purple), #A78BFA); }

/* ── Toast / Alerts ──────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 24px;
  background: var(--navy);
  color: white;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ── RTL Number‐only fields ──────────────────────────────────── */
.ltr-input { direction: ltr; text-align: left; }

/* ── Fade-in animation for page load ─────────────────────────── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in-up 0.4s cubic-bezier(0.4,0,0.2,1) both; }
.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.1s; }
.fade-in-3 { animation-delay: 0.15s; }
.fade-in-4 { animation-delay: 0.2s; }
.fade-in-5 { animation-delay: 0.25s; }
