/* ============================================================
   بيت الخبرة — Admin Panel CSS
   ============================================================ */

:root {
  --primary: #1a6b8a;
  --primary-dark: #0d4f6b;
  --primary-light: #e8f4f8;
  --gold: #d4a017;
  --gold-light: #fdf3dc;
  --dark: #0f1f2d;
  --dark-2: #1c2e3e;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --text: #2d3748;
  --text-muted: #718096;
  --border: #e2e8f0;
  --light-bg: #f7fafc;
  --white: #ffffff;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --warning: #e67e22;
  --warning-light: #fef3e2;
  --danger: #c62828;
  --danger-light: #ffebee;
  --info: #1565c0;
  --info-light: #e3f2fd;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
  --radius: 10px;
  --radius-lg: 14px;
  --transition: all .25s ease;
  --font: 'Cairo', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font); color: var(--text); background: var(--light-bg); direction: rtl; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
.hidden { display: none !important; }

/* ============================================================
   LOGIN GATE
   ============================================================ */
.login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--dark) 0%, var(--dark-2) 50%, #0a3550 100%);
  padding: 1rem;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp .5s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.logo-icon-lg {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.6rem;
  margin: 0 auto 1rem;
}
.login-logo h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.login-logo p { color: var(--text-muted); font-size: .9rem; }

.login-form .form-group { margin-bottom: 1.1rem; }
.login-form label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .4rem;
}
.login-form label i { color: var(--primary); }
.login-form input {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  transition: var(--transition);
  background: var(--light-bg);
}
.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,107,138,.1);
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 2.5rem; }
.pw-wrap button {
  position: absolute;
  left: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  font-size: .9rem;
}

.login-error {
  color: var(--danger);
  font-size: .82rem;
  font-weight: 600;
  min-height: 1.2rem;
  margin-bottom: .5rem;
  text-align: center;
}

.btn-login {
  width: 100%;
  padding: .85rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.btn-login:hover { box-shadow: 0 4px 15px rgba(26,107,138,.4); transform: translateY(-1px); }

.login-hint {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
}
.login-hint i { color: var(--gold); }

/* ============================================================
   ADMIN SHELL LAYOUT
   ============================================================ */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  z-index: 200;
  transition: transform .3s ease;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.logo-icon-sm {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.sidebar-brand { flex: 1; }
.brand-main { display: block; font-size: .95rem; font-weight: 800; }
.brand-sub { display: block; font-size: .7rem; color: rgba(255,255,255,.45); }

.sidebar-close {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1rem; display: none;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}
.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,.3);
  padding: .75rem 1.25rem .3rem;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  font-size: .88rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: var(--transition);
  position: relative;
  border-radius: 0;
  margin: .1rem .5rem;
  border-radius: 8px;
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; }
.nav-item span { flex: 1; }
.nav-item:hover { background: rgba(255,255,255,.07); color: var(--white); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}
.nav-badge {
  background: var(--danger);
  color: var(--white);
  font-size: .68rem;
  font-weight: 800;
  padding: .15rem .45rem;
  border-radius: 50px;
  min-width: 20px;
  text-align: center;
  display: none;
}
.nav-badge.show { display: block; }

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.admin-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  flex-shrink: 0;
}
.admin-name { display: block; font-size: .85rem; font-weight: 700; }
.admin-role { display: block; font-size: .7rem; color: rgba(255,255,255,.4); }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin .3s ease;
}

/* ── TOP BAR ── */
.admin-topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-left { display: flex; align-items: center; gap: .75rem; }

.sidebar-toggle {
  background: none; border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: .4rem;
  border-radius: 6px;
  display: none;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--dark);
}
.page-breadcrumb i { color: var(--primary); }

.topbar-btn {
  background: var(--light-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  transition: var(--transition);
}
.topbar-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.topbar-btn.spinning i { animation: spin 1s linear infinite; }

.topbar-time {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--light-bg);
  padding: .3rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ============================================================
   PAGES
   ============================================================ */
.pages-wrap { flex: 1; padding: 1.5rem; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .3s ease; }

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.page-header p { color: var(--text-muted); font-size: .9rem; }

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px;
  height: 100%;
  background: var(--kpi-color);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.kpi-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--kpi-color) 12%, white);
  color: var(--kpi-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.kpi-body { flex: 1; }
.kpi-num { font-size: 1.75rem; font-weight: 900; color: var(--dark); line-height: 1; }
.kpi-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; margin-top: .2rem; }
.kpi-trend { font-size: .75rem; font-weight: 700; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ── Dashboard Bottom ── */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.25rem;
}
.dash-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark);
}
.panel-header h3 i { color: var(--primary); }
.panel-link { font-size: .8rem; color: var(--primary); font-weight: 600; cursor: pointer; }

/* Recent List */
.recent-list { display: flex; flex-direction: column; gap: .6rem; }
.recent-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem;
  border-radius: 8px;
  background: var(--light-bg);
  transition: var(--transition);
  cursor: pointer;
}
.recent-item:hover { background: var(--primary-light); }
.recent-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.recent-name { font-size: .85rem; font-weight: 700; color: var(--dark); }
.recent-service { font-size: .75rem; color: var(--text-muted); }
.recent-time { font-size: .72rem; color: var(--text-muted); margin-right: auto; white-space: nowrap; }

/* Service Distribution */
.service-dist-wrap { display: flex; flex-direction: column; gap: .6rem; }
.dist-bar-item { display: flex; flex-direction: column; gap: .25rem; }
.dist-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  font-weight: 600;
}
.dist-bar-label span:last-child { color: var(--text-muted); }
.dist-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.dist-bar-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width .8s ease;
}

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.toolbar-right { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: .75rem; }

.search-box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .5rem 1rem;
  min-width: 260px;
  transition: var(--transition);
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,138,.1); }
.search-box i { color: var(--text-muted); font-size: .85rem; }
.search-box input { border: none; background: none; outline: none; font-size: .88rem; color: var(--text); width: 100%; }

.filter-select {
  padding: .5rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

.records-count { font-size: .82rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }

/* ── Data Table ── */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table thead tr {
  background: var(--light-bg);
  border-bottom: 2px solid var(--border);
}
.data-table th {
  padding: .85rem 1rem;
  text-align: right;
  font-weight: 700;
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.data-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--light-bg); }
.data-table tbody tr:last-child td { border-bottom: none; }

.loading-cell { text-align: center; padding: 2.5rem; color: var(--text-muted); }
.loading-cell i { margin-left: .5rem; color: var(--primary); }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .75rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-new     { background: #e3f2fd; color: #1565c0; }
.status-review  { background: #fff3e0; color: #e65100; }
.status-accept  { background: var(--success-light); color: var(--success); }
.status-reject  { background: var(--danger-light); color: var(--danger); }
.status-done    { background: #f3e5f5; color: #6a1b9a; }

/* Actions */
.actions-cell { display: flex; gap: .4rem; align-items: center; }
.btn-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn-view  { background: var(--primary-light); color: var(--primary); }
.btn-edit  { background: var(--warning-light); color: var(--warning); }
.btn-del   { background: var(--danger-light); color: var(--danger); }
.btn-icon:hover { filter: brightness(.9); transform: scale(1.1); }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.page-btn {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.page-btn:disabled { opacity: .4; cursor: default; }

/* ── Experts Admin Grid ── */
.experts-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.expert-admin-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  position: relative;
}
.expert-admin-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.expert-admin-card.inactive { opacity: .6; }

.eac-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .85rem;
}
.eac-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: .85rem;
  font-weight: 800;
  flex-shrink: 0;
}
.eac-badges { display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; }
.badge-featured {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: var(--gold-light);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 50px;
}
.badge-active {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 50px;
}
.badge-active.on { background: var(--success-light); color: var(--success); }
.badge-active.off { background: var(--danger-light); color: var(--danger); }

.eac-name { font-size: .95rem; font-weight: 800; color: var(--dark); margin-bottom: .15rem; }
.eac-title { font-size: .78rem; color: var(--primary); font-weight: 600; margin-bottom: .2rem; }
.eac-org { font-size: .75rem; color: var(--text-muted); margin-bottom: .75rem; display: flex; align-items: center; gap: .3rem; }

.eac-stats {
  display: flex;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.eac-stat { font-size: .75rem; color: var(--text-muted); display: flex; align-items: center; gap: .3rem; }
.eac-stat i { color: var(--primary); font-size: .7rem; }

.eac-tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .85rem; }
.eac-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: .7rem;
  font-weight: 600;
  padding: .18rem .55rem;
  border-radius: 50px;
}

.eac-actions { display: flex; gap: .5rem; }
.eac-actions .btn-icon { flex: 1; border-radius: 7px; height: 32px; }

/* ── Quotes Summary ── */
.quotes-summary {
  display: flex;
  gap: 1rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.quotes-summary span { display: flex; align-items: center; gap: .3rem; }
.quotes-summary i { color: var(--primary); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .3s ease;
  overflow: hidden;
}
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 680px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}
.modal-header h3 i { color: var(--primary); }

.modal-close {
  width: 32px; height: 32px;
  background: var(--light-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
  gap: .75rem;
}

/* ── Admin Form ── */
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-form .form-group { margin-bottom: 1rem; }
.admin-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .35rem;
}
.req { color: var(--danger); }
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  color: var(--text);
  background: var(--light-bg);
  transition: var(--transition);
  direction: rtl;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,107,138,.1);
}

/* Checkbox */
.checkbox-group { display: flex; align-items: center; padding-top: 1.4rem; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
  font-size: .88rem !important;
  font-weight: 600 !important;
  user-select: none;
}
.checkbox-label input[type="checkbox"] { width: auto; display: none; }
.checkmark {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.checkbox-label input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox-label input:checked ~ .checkmark::after {
  content: '✓';
  color: white;
  font-size: .75rem;
  font-weight: 800;
}

/* Request Detail */
.req-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.req-detail-item { background: var(--light-bg); border-radius: 8px; padding: .75rem; }
.req-detail-item .rdl { font-size: .72rem; color: var(--text-muted); font-weight: 600; margin-bottom: .2rem; }
.req-detail-item .rdv { font-size: .88rem; font-weight: 700; color: var(--dark); }
.req-message { background: var(--light-bg); border-radius: 8px; padding: 1rem; font-size: .9rem; line-height: 1.7; margin-bottom: 1rem; }
.req-status-update { margin-bottom: 1rem; }
.req-status-update label { font-size: .85rem; font-weight: 700; color: var(--dark); display: block; margin-bottom: .4rem; }
.req-notes textarea { width: 100%; }

/* Buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font);
}
.btn-primary-sm {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}
.btn-primary-sm:hover { box-shadow: 0 3px 12px rgba(26,107,138,.4); transform: translateY(-1px); }
.btn-ghost { background: var(--light-bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #9b1c1c; }
.btn-success { background: var(--success); color: var(--white); }

/* ── Toast ── */
.admin-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark);
  color: var(--white);
  padding: .75rem 1.5rem;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform .3s ease, opacity .3s ease;
  opacity: 0;
  z-index: 9999;
  white-space: nowrap;
}
.admin-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Loading ── */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.loading-spinner i { color: var(--primary); font-size: 1.1rem; }

/* ── Misc ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; color: var(--border); margin-bottom: .75rem; display: block; }
.empty-state p { font-size: .9rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px) } to { opacity:1; transform:none } }
@keyframes slideUp { from { opacity:0; transform:translateY(30px) } to { opacity:1; transform:none } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .experts-admin-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .main-content { margin-right: 0; }
  .sidebar-toggle { display: block; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .experts-admin-grid { grid-template-columns: 1fr; }
  .admin-form .form-row { grid-template-columns: 1fr; }
  .req-detail-grid { grid-template-columns: 1fr; }
  .search-box { min-width: 200px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .pages-wrap { padding: 1rem; }
  .data-table th, .data-table td { padding: .65rem .75rem; }
}
