/* ============================================================
   GROUPE CECI — Application CSS
   Mode sombre (défaut) + Mode clair
   ============================================================ */

/* ── VARIABLES DARK ───────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:        #0b0f1a;
  --surface:   #111827;
  --surface2:  #1a2235;
  --surface3:  #243050;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --accent:    #f97316;
  --accent2:   #fbbf24;
  --accent-bg: rgba(249,115,22,0.12);
  --text:      #f1f5f9;
  --text2:     #cbd5e1;
  --muted:     #64748b;
  --success:   #22c55e;
  --danger:    #ef4444;
  --info:      #3b82f6;
  --purple:    #8b5cf6;
  --warning:   #fbbf24;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --sidebar-w: 260px;
  --topbar-h:  64px;
}

/* ── VARIABLES LIGHT ──────────────────────────────────────── */
[data-theme="light"] {
  --bg:        #f1f5f9;
  --surface:   #ffffff;
  --surface2:  #f8fafc;
  --surface3:  #e2e8f0;
  --border:    rgba(0,0,0,0.08);
  --border2:   rgba(0,0,0,0.15);
  --accent:    #ea6c10;
  --accent2:   #d97706;
  --accent-bg: rgba(234,108,16,0.10);
  --text:      #0f172a;
  --text2:     #334155;
  --muted:     #94a3b8;
  --success:   #16a34a;
  --danger:    #dc2626;
  --info:      #2563eb;
  --purple:    #7c3aed;
  --warning:   #d97706;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(175deg, #0f1b2d 0%, #0a1628 40%, #111827 100%);
  border-right: 1px solid rgba(249,115,22,0.15);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,0.3);
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.logo {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(249,115,22,0.2);
  flex-shrink: 0;
}
.logo-mark {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 20px;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.logo-mark > div > div:first-child span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  font-family: 'Syne', sans-serif; flex-shrink: 0;
}
.logo-sub { font-size: 10px; color: rgba(249,115,22,0.6); margin-top: 2px; letter-spacing: 0.5px; }

nav { flex: 1; padding: 12px 0; }

.nav-section {
  padding: 10px 18px 4px;
  font-size: 10px; color: rgba(255,255,255,0.3);
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  position: relative;
  margin: 1px 8px;
  border-radius: 8px;
  transition: all 0.18s;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active {
  background: rgba(249,115,22,0.18);
  color: var(--accent);
  border: 1px solid rgba(249,115,22,0.25);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: linear-gradient(var(--accent), var(--accent2));
  border-radius: 2px;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(249,115,22,0.15);
  flex-shrink: 0;
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.user-card:hover { background: rgba(255,255,255,0.1); }

/* ── AVATAR ───────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white;
  font-family: 'Syne', sans-serif; flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.blue { background: linear-gradient(135deg, var(--info), var(--purple)); }
.avatar.green { background: linear-gradient(135deg, var(--success), var(--info)); }
.avatar.purple { background: linear-gradient(135deg, var(--purple), var(--danger)); }

.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.user-role { font-size: 11px; color: rgba(249,115,22,0.7); }

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

/* ── TOPBAR ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky; top: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}
.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 17px;
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.menu-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 6px; border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.menu-toggle:hover { background: var(--surface2); }

/* ── SEARCH BAR ───────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0 12px;
  width: 260px; transition: border-color 0.2s, width 0.3s;
}
.search-bar:focus-within { border-color: var(--accent); width: 300px; }
.search-bar svg { opacity: 0.4; flex-shrink: 0; }
.search-bar input {
  background: none; border: none; padding: 9px 0;
  font-size: 13px; flex: 1; color: var(--text);
  outline: none; width: 0;
}
.search-bar input::placeholder { color: var(--muted); }

/* ── ICON BTN ─────────────────────────────────────────────── */
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--muted);
  position: relative; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface3); color: var(--text); }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

/* ── CONTENT ──────────────────────────────────────────────── */
.content { padding: 28px 32px; flex: 1; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-header h1 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 26px; }
.page-header p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 14px rgba(249,115,22,0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,0.38); }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface3); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-success { background: rgba(34,197,94,0.15); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.btn-success:hover { background: rgba(34,197,94,0.25); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 7px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── STATS GRID ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 28px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border2); }
.stat-card::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px; border-radius: 50%;
  opacity: 0.07; transform: translate(25px,-25px);
}
.stat-card.orange::after { background: var(--accent); }
.stat-card.green::after  { background: var(--success); }
.stat-card.blue::after   { background: var(--info); }
.stat-card.purple::after { background: var(--purple); }
.stat-card.red::after    { background: var(--danger); }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.stat-value { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 30px; margin: 8px 0 4px; line-height: 1; }
.stat-card.orange .stat-value { color: var(--accent); }
.stat-card.green .stat-value  { color: var(--success); }
.stat-card.blue .stat-value   { color: var(--info); }
.stat-card.purple .stat-value { color: var(--purple); }
.stat-card.red .stat-value    { color: var(--danger); }
.stat-change { font-size: 12px; color: var(--muted); }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-icon {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-card.orange .stat-icon { background: rgba(249,115,22,0.14); }
.stat-card.green .stat-icon  { background: rgba(34,197,94,0.14); }
.stat-card.blue .stat-icon   { background: rgba(59,130,246,0.14); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.14); }
.stat-card.red .stat-icon    { background: rgba(239,68,68,0.14); }

/* ── CARD ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  margin-bottom: 20px;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.card-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; }
.card-body { padding: 20px 22px; }

/* ── GRID LAYOUTS ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 20px; }

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th {
  padding: 11px 14px;
  text-align: left; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--surface);
}
td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid rgba(128,128,128,0.06); vertical-align: middle; }
tr:hover td { background: var(--surface2); }
tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: rgba(34,197,94,0.14);   color: var(--success); }
.badge-warning { background: rgba(251,191,36,0.14);  color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,0.14);   color: var(--danger); }
.badge-info    { background: rgba(59,130,246,0.14);  color: var(--info); }
.badge-purple  { background: rgba(139,92,246,0.14);  color: var(--purple); }
.badge-orange  { background: rgba(249,115,22,0.14);  color: var(--accent); }
.badge-muted   { background: rgba(100,116,139,0.14); color: var(--muted); }

/* ── PROGRESS ─────────────────────────────────────────────── */
.progress { background: var(--surface2); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.progress-bar.orange { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.progress-bar.green  { background: var(--success); }
.progress-bar.blue   { background: var(--info); }
.progress-bar.red    { background: var(--danger); }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
label {
  display: block; font-size: 11px; color: var(--muted);
  margin-bottom: 6px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="password"], input[type="date"],
input[type="time"], input[type="search"], select, textarea {
  width: 100%;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text);
  padding: 10px 14px; font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
textarea { resize: vertical; min-height: 80px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
select option { background: var(--surface2); }
.input-group { position: relative; }
.input-addon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }

/* ── TABS ─────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface2); border-radius: 10px;
  padding: 4px; margin-bottom: 20px;
  overflow-x: auto; flex-wrap: nowrap;
}
.tab {
  padding: 8px 18px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  color: var(--muted); border: none;
  background: none; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: none; align-items: center; justify-content: center;
  z-index: 500; backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; width: 540px; max-width: 100%;
  max-height: 92vh; overflow-y: auto;
  animation: modalIn 0.28s cubic-bezier(.4,0,.2,1);
}
.modal.modal-lg { width: 760px; }
.modal.modal-xl { width: 1000px; }
@keyframes modalIn { from { opacity:0; transform:translateY(24px) scale(0.97); } to { opacity:1; transform:none; } }
.modal-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; }
.modal-body { padding: 22px 26px; }
.modal-footer { padding: 16px 26px 22px; display: flex; gap: 10px; justify-content: flex-end; }
.close-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 6px; border-radius: 7px;
  transition: all 0.2s; display: flex; align-items: center;
}
.close-btn:hover { color: var(--text); background: var(--surface2); }

/* ── FLASH MESSAGES ───────────────────────────────────────── */
.flash {
  padding: 13px 18px; border-radius: 10px;
  margin-bottom: 20px; font-size: 13px; font-weight: 500;
  animation: fadeIn 0.3s ease;
}
.flash-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25); color: var(--success); }
.flash-error   { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.25); color: var(--danger); }
.flash-warning { background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.25); color: var(--warning); }
.flash-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: var(--info); }
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ── TOAST ────────────────────────────────────────────────── */
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px;
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.3s ease; min-width: 260px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }

/* ── ACTIVITY ─────────────────────────────────────────────── */
.activity-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.activity-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── CHART BARS ───────────────────────────────────────────── */
.chart-placeholder {
  height: 190px; background: var(--surface2);
  border-radius: 12px; display: flex; align-items: flex-end;
  justify-content: stretch; gap: 6px; padding: 16px; overflow: hidden;
}
.bar-group { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.bar-container { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { min-width: 10px; border-radius: 4px 4px 0 0; transition: height 0.6s ease; cursor: pointer; }
.bar:hover { filter: brightness(1.2); }
.bar-label { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 18px; color: var(--text2); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding-top: 20px; flex-wrap: wrap;
}
.page-link {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); transition: all 0.2s; cursor: pointer;
}
.page-link:hover, .page-link.active {
  background: var(--accent-bg); border-color: rgba(249,115,22,0.3); color: var(--accent);
}

/* ── ALERT CARD ───────────────────────────────────────────── */
.alert-card {
  padding: 14px 16px; border-radius: 10px; margin-bottom: 12px;
}
.alert-card.danger  { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.2); }
.alert-card.warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); }
.alert-card.info    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.alert-title { font-size: 13px; font-weight: 600; }
.alert-card.danger .alert-title  { color: var(--danger); }
.alert-card.warning .alert-title { color: var(--warning); }
.alert-card.info .alert-title    { color: var(--info); }
.alert-text { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── PROJECT CARD ─────────────────────────────────────────── */
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  transition: all 0.2s; cursor: pointer;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--border2); box-shadow: var(--shadow); }
.project-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.project-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; }

/* ── STOCK ITEM ───────────────────────────────────────────── */
.stock-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.stock-item:last-child { border-bottom: none; }
.stock-icon { font-size: 22px; flex-shrink: 0; }
.stock-name { font-size: 14px; font-weight: 600; }
.stock-cat  { font-size: 12px; color: var(--muted); }
.stock-qty  { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; text-align: right; margin-left: auto; }


/* ── LOGIN PAGE BODY OVERRIDE ─────────────────────────────── */
body.login-page {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
.login-panel-left {
  background: linear-gradient(135deg, #0b0f1a 0%, #1a1040 50%, #0b0f1a 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 48px; position: relative; overflow: hidden;
}
.login-panel-left::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(249,115,22,0.18) 0%, transparent 55%),
              radial-gradient(ellipse at 75% 20%, rgba(251,191,36,0.1) 0%, transparent 45%);
  pointer-events: none;
}
.login-panel-left::after {
  content: ''; position: absolute; width: 450px; height: 450px; border-radius: 50%;
  background: rgba(249,115,22,0.04); bottom: -120px; right: -120px;
  border: 1px solid rgba(249,115,22,0.1); pointer-events: none;
}
.login-deco-circle {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(249,115,22,0.07); top: -60px; left: -60px; pointer-events: none;
}
.login-brand { position: relative; z-index: 1; text-align: center; width: 100%; max-width: 340px; }
.login-brand-icon {
  width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 28px;
  background: linear-gradient(135deg,#f97316,#fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 34px; color: #fff;
  box-shadow: 0 20px 50px rgba(249,115,22,0.45);
}
.login-brand-name {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 32px;
  background: linear-gradient(135deg,#f97316,#fbbf24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 10px;
}
.login-brand-tagline { font-size: 14px; color: rgba(255,255,255,0.45); line-height: 1.7; max-width: 280px; margin: 0 auto 44px; }
.login-features { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.login-feature {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px 18px; transition: background 0.2s;
}
.login-feature:hover { background: rgba(255,255,255,0.07); }
.login-feature-icon { font-size: 20px; flex-shrink: 0; }
.login-feature-text { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.5; }
.login-feature-text strong { color: rgba(255,255,255,0.85); display: block; font-size: 13px; margin-bottom: 1px; }
.login-panel-right {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 48px; overflow-y: auto;
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px; text-align: center; color: var(--text); }
.login-sub { color: var(--muted); font-size: 13px; text-align: center; margin-top: 4px; margin-bottom: 28px; }
@media (max-width: 768px) {
  .login-wrapper { grid-template-columns: 1fr; }
  .login-panel-left { display: none; }
  .login-panel-right { min-height: 100vh; padding: 40px 24px; }
}

/* ── QUICK ACTIONS ────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin-bottom: 26px; }
.qa-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 18px 14px; text-align: center;
  cursor: pointer; transition: all 0.2s;
}
.qa-card:hover { border-color: var(--accent); background: var(--accent-bg); transform: translateY(-2px); }
.qa-icon  { font-size: 26px; margin-bottom: 8px; }
.qa-label { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ── DIVIDER ──────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── PRINT FACTURE ────────────────────────────────────────── */
.facture-print { max-width: 800px; margin: 0 auto; padding: 40px; }
.facture-print h1 { font-family: 'Syne',sans-serif; }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; display: inline-block;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .grid-3 { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,0.3); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0 !important; }
  .menu-toggle { display: flex; }
  .content { padding: 20px 16px; }
  .topbar { padding: 0 16px; gap: 8px; }
  .search-bar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(3,1fr); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 22px; }
  .modal { border-radius: 16px; }
  .card-header { flex-direction: column; align-items: flex-start; }
  .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
  .login-card { padding: 32px 24px; }
}
