/* ===================================================
   Cabinet Dr Boutaam Lahoucine — Feuille de style
   =================================================== */

:root {
  --g1:#0A3D2E; --g2:#0E5C44; --g3:#117A5C; --g4:#14996F;
  --g-l:#F0FAF6; --g-l2:#DCF5EB; --g-border:#B8DDD0;
  --blue:#1A4A7A; --blue-l:#EBF3FB;
  --amber:#B45309; --amber-l:#FEF3E2; --amber-m:#D97706;
  --red:#C04A35; --red-l:#FDEEEC; --red-m:#DC2626;
  --teal:#0E7C8A; --teal-l:#E6F6F8;
  --gray:#374151; --gray-l:#F9FAFB;
  --bg:#EDF6F2; --white:#ffffff; --text:#0A2018; --muted:#4A6E5E;
  --border:#C8DDD6; --border2:#DCF0E8; --border3:#E8F4EF;
  --font-d:'Cormorant Garamond',serif; --font-b:'Jost',sans-serif;
  --radius:6px; --radius-lg:10px;
  --shadow:0 2px 12px rgba(10,61,46,.08);
  --shadow-md:0 4px 24px rgba(10,61,46,.12);
  --sw:248px; --th:58px;
  --trans:.2s ease;
}

/* ===== RESET ===== */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; }
body { font-family:var(--font-b); background:var(--bg); color:var(--text); font-size:14px; overflow:hidden; -webkit-font-smoothing:antialiased; }
a { text-decoration:none; color:inherit; }
em { font-style:italic; }
button,input,select,textarea { font-family:var(--font-b); }
img { display:block; max-width:100%; }

/* ===== LOGIN ===== */
body.login-body { overflow:auto; display:flex; align-items:center; justify-content:center; min-height:100vh;
  background:linear-gradient(150deg,#062018 0%,#0A3D2E 40%,#0E5C44 100%); }
.login-wrap { width:100%; max-width:420px; padding:1.5rem; }
.login-card { background:var(--white); border-radius:var(--radius-lg); padding:2.8rem 2.5rem;
  box-shadow:0 30px 80px rgba(0,0,0,.4); }
.lc-top { text-align:center; margin-bottom:2rem; }
.lc-icon { font-size:3.2rem; display:block; margin-bottom:.6rem; }
.lc-title { font-family:var(--font-d); font-size:1.8rem; font-weight:300; color:var(--g1); line-height:1.1; }
.lc-title em { color:var(--g3); }
.lc-sub { font-size:.7rem; letter-spacing:.2em; text-transform:uppercase; color:var(--muted); margin-top:.4rem; }
.lc-line { width:40px; height:2.5px; background:linear-gradient(90deg,var(--g3),var(--g4)); margin:.9rem auto 0; border-radius:2px; }

.form-field { margin-bottom:1.1rem; }
.form-field label { display:block; font-size:.68rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-bottom:.4rem; font-weight:600; }
.form-field input,
.form-field select,
.form-field textarea { width:100%; background:var(--bg); border:1.5px solid var(--border); color:var(--text);
  padding:.72rem 1rem; font-size:.88rem; border-radius:var(--radius); outline:none; transition:border-color var(--trans),background var(--trans); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color:var(--g3); background:var(--white); }
.form-field input::placeholder,
.form-field textarea::placeholder { color:#9AB8AC; }
.form-field select option { background:var(--white); }
.form-field textarea { resize:vertical; min-height:80px; }

.pw-wrap { position:relative; }
.pw-wrap input { padding-right:2.5rem; }
.pw-eye { position:absolute; right:.8rem; top:50%; transform:translateY(-50%);
  cursor:pointer; color:var(--muted); font-size:.9rem; user-select:none; }
.pw-eye:hover { color:var(--g3); }

.btn-login { width:100%; background:linear-gradient(135deg,var(--g2),var(--g4));
  color:var(--white); border:none; padding:.88rem; font-size:.85rem; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase; border-radius:var(--radius);
  cursor:pointer; transition:opacity var(--trans); box-shadow:0 4px 16px rgba(14,92,68,.35); margin-top:.3rem; }
.btn-login:hover { opacity:.9; }
.btn-login:active { opacity:.8; }

.login-alert { display:none; background:var(--red-l); border:1px solid rgba(192,74,53,.25);
  color:var(--red); padding:.7rem 1rem; border-radius:var(--radius); font-size:.82rem; margin-top:.8rem; text-align:center; }
.login-hint { margin-top:1.2rem; padding:1rem; background:var(--g-l); border:1px solid var(--g-border);
  border-radius:var(--radius); font-size:.8rem; }
.lh-title { font-size:.65rem; letter-spacing:.15em; text-transform:uppercase; color:var(--g2); font-weight:600; margin-bottom:.5rem; }
.lh-row { display:flex; justify-content:space-between; align-items:center; padding:.2rem 0; color:var(--muted); }
.lh-row code { background:var(--white); border:1px solid var(--g-border); padding:.1rem .5rem; border-radius:3px; font-size:.72rem; color:var(--g1); }

/* ===== LAYOUT ===== */
.app-wrap { display:flex; height:100vh; overflow:hidden; }

/* ===== SIDEBAR ===== */
.sidebar { width:var(--sw); min-width:var(--sw); display:flex; flex-direction:column;
  height:100vh; position:fixed; left:0; top:0; z-index:100; transition:transform .3s ease; }
.theme-admin  { background:var(--g1); }
.theme-assist { background:#0E4A7A; }
.theme-infirm { background:#0A5C3A; }

.s-logo { padding:1.3rem 1.2rem; border-bottom:1px solid rgba(255,255,255,.08); }
.s-logo .t0 { font-size:.58rem; letter-spacing:.18em; text-transform:uppercase; color:rgba(255,255,255,.28); }
.s-logo .t1 { font-family:var(--font-d); font-size:1.3rem; font-weight:300; color:var(--white); line-height:1.2; }
.theme-admin  .s-logo .t1 em { color:#4EC994; }
.theme-assist .s-logo .t1 em { color:#7BC4FF; }
.theme-infirm .s-logo .t1 em { color:#5DDBB4; }
.s-logo .t2 { font-size:.6rem; letter-spacing:.1em; color:rgba(255,255,255,.28); margin-top:.2rem; }

.role-pill { display:inline-flex; align-items:center; gap:.3rem; margin-top:.6rem;
  padding:.24rem .7rem; border-radius:20px; font-size:.62rem; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.pill-admin  { background:rgba(245,158,11,.18); color:#F5A623; border:1px solid rgba(245,158,11,.28); }
.pill-assist { background:rgba(96,180,255,.18); color:#7BC4FF; border:1px solid rgba(96,180,255,.28); }
.pill-infirm { background:rgba(93,219,180,.18); color:#5DDBB4; border:1px solid rgba(93,219,180,.28); }

.s-nav { flex:1; padding:.6rem 0; overflow-y:auto; }
.s-nav::-webkit-scrollbar { width:3px; }
.s-nav::-webkit-scrollbar-thumb { background:rgba(255,255,255,.15); border-radius:2px; }
.nav-sep { font-size:.58rem; letter-spacing:.18em; text-transform:uppercase; color:rgba(255,255,255,.2); padding:.8rem 1.2rem .25rem; margin-top:.3rem; }
.nav-item { display:flex; align-items:center; gap:.7rem; padding:.7rem 1.2rem; color:rgba(255,255,255,.5);
  font-size:.82rem; transition:all var(--trans); border-left:3px solid transparent;
  border-top:none; border-right:none; border-bottom:none; background:none; width:100%; text-align:left; cursor:pointer; text-decoration:none; }
.nav-item:hover { color:rgba(255,255,255,.92); background:rgba(255,255,255,.07); }
.nav-item.active { color:var(--white); background:rgba(255,255,255,.1); font-weight:500; }
.theme-admin  .nav-item.active { border-left-color:#4EC994; }
.theme-assist .nav-item.active { border-left-color:#7BC4FF; }
.theme-infirm .nav-item.active { border-left-color:#5DDBB4; }
.nav-item.locked { opacity:.25; cursor:not-allowed; }
.nav-item.locked:hover { color:rgba(255,255,255,.25); background:none; }
.nav-icon { font-size:.95rem; width:18px; text-align:center; flex-shrink:0; }
.lock-ico { font-size:.7rem; }

.s-foot { border-top:1px solid rgba(255,255,255,.08); padding:.9rem 1.2rem; }
.s-user { display:flex; align-items:center; gap:.7rem; margin-bottom:.7rem; }
.s-av { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-d); color:var(--white); font-size:.95rem; flex-shrink:0; border:2px solid rgba(255,255,255,.2); font-weight:400; }
.theme-admin  .s-av { background:rgba(78,201,148,.22); }
.theme-assist .s-av { background:rgba(123,196,255,.22); }
.theme-infirm .s-av { background:rgba(93,219,180,.22); }
.s-user strong { font-size:.82rem; color:var(--white); display:block; line-height:1.3; }
.s-user span { font-size:.65rem; color:rgba(255,255,255,.38); }
.btn-logout { width:100%; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.5); padding:.44rem; font-size:.72rem; cursor:pointer;
  border-radius:var(--radius); letter-spacing:.06em; text-transform:uppercase; transition:all var(--trans); display:block; text-align:center; }
.btn-logout:hover { background:rgba(255,255,255,.13); color:var(--white); }

/* ===== MAIN ===== */
.main { margin-left:var(--sw); flex:1; display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.topbar { height:var(--th); min-height:var(--th); background:var(--white); border-bottom:1px solid var(--border2);
  display:flex; align-items:center; padding:0 1.6rem; gap:1rem; box-shadow:0 1px 6px rgba(10,61,46,.06); z-index:10; }
.burger-btn { display:none; background:none; border:none; color:var(--text); font-size:1.2rem; cursor:pointer; padding:4px 8px; border-radius:var(--radius); transition:background var(--trans); }
.burger-btn:hover { background:var(--bg); }
.topbar-left { flex:1; }
.topbar-title { font-family:var(--font-d); font-size:1.1rem; color:var(--text); line-height:1.2; }
.topbar-breadcrumb { font-size:.72rem; color:var(--muted); margin-top:.1rem; }
.topbar-right { display:flex; align-items:center; gap:1rem; }
.topbar-date { font-size:.72rem; color:var(--muted); white-space:nowrap; }
.user-menu { position:relative; }
.um-avatar { width:32px; height:32px; border-radius:50%; background:var(--g-l2); border:1.5px solid var(--g-border);
  display:flex; align-items:center; justify-content:center; font-family:var(--font-d); color:var(--g2); font-size:.9rem; cursor:pointer; }

.content { flex:1; overflow-y:auto; padding:2rem; background:var(--bg); }
.content::-webkit-scrollbar { width:5px; }
.content::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

/* ===== PAGE HEADER ===== */
.page-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:1.8rem; flex-wrap:wrap; gap:1rem; }
.ph-left h1 { font-family:var(--font-d); font-size:1.7rem; font-weight:300; color:var(--text); }
.ph-left h1 em { color:var(--g3); }
.ph-left p { color:var(--muted); font-size:.85rem; margin-top:.25rem; }
.ph-right { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }

/* ===== STAT CARDS ===== */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; margin-bottom:1.8rem; }
.stat-card { background:var(--white); border:1px solid var(--border2); border-radius:var(--radius-lg);
  padding:1.2rem 1.3rem; display:flex; align-items:center; gap:1rem; box-shadow:var(--shadow);
  transition:all var(--trans); cursor:default; }
.stat-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.stat-icon { width:44px; height:44px; border-radius:var(--radius); display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.si-g { background:var(--g-l2); color:var(--g2); }
.si-b { background:var(--blue-l); color:var(--blue); }
.si-t { background:var(--teal-l); color:var(--teal); }
.si-a { background:var(--amber-l); color:var(--amber-m); }
.si-r { background:var(--red-l); color:var(--red-m); }
.stat-val { font-family:var(--font-d); font-size:2.2rem; font-weight:300; line-height:1; display:block; color:var(--text); }
.stat-lbl { font-size:.65rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-top:.2rem; display:block; }
.stat-card.locked { opacity:.35; filter:grayscale(.8); cursor:not-allowed; }
.stat-card.locked:hover { transform:none; box-shadow:var(--shadow); }

/* ===== DASH WIDGETS ===== */
.dash-grid { display:grid; grid-template-columns:1.6fr 1fr; gap:1.2rem; margin-bottom:1.2rem; }
.dash-grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1.2rem; }
.card { background:var(--white); border:1px solid var(--border2); border-radius:var(--radius-lg); box-shadow:var(--shadow); overflow:hidden; }
.card-header { display:flex; justify-content:space-between; align-items:center; padding:.9rem 1.2rem; border-bottom:1px solid var(--border2); }
.card-header h3 { font-family:var(--font-d); font-size:1rem; font-weight:400; color:var(--text); }
.card-body { padding:0; }
.d-item { display:flex; justify-content:space-between; align-items:center; padding:.65rem 1.2rem; border-bottom:1px solid var(--border3); transition:background var(--trans); }
.d-item:last-child { border:none; }
.d-item:hover { background:var(--g-l); }
.d-name { font-weight:500; color:var(--text); font-size:.82rem; }
.d-meta { font-size:.7rem; color:var(--muted); margin-top:.1rem; }
.d-right { text-align:right; flex-shrink:0; margin-left:.8rem; }
.d-date { font-size:.72rem; color:var(--g3); }
.empty-state { padding:2.5rem; text-align:center; color:#9AB8AC; font-size:.82rem; }
.empty-state span { display:block; font-size:2rem; margin-bottom:.5rem; opacity:.3; }

/* ===== INFO BANNERS ===== */
.banner { border-radius:var(--radius); padding:.8rem 1.2rem; margin-bottom:1.2rem; display:flex; align-items:center; gap:.7rem; font-size:.85rem; }
.banner-green { background:var(--g-l2); border:1px solid var(--g-border); color:var(--g1); }
.banner-amber { background:var(--amber-l); border:1px solid rgba(180,83,9,.2); color:#92400E; }
.banner-blue  { background:var(--blue-l);  border:1px solid rgba(26,74,122,.2); color:var(--blue); }
.banner-red   { background:var(--red-l);   border:1px solid rgba(192,74,53,.2); color:var(--red); }
.banner strong { font-weight:600; }

/* ===== FILTERS ===== */
.filter-bar { display:flex; gap:.6rem; margin-bottom:1rem; flex-wrap:wrap; align-items:center; }
.filter-bar input,
.filter-bar select { background:var(--white); border:1px solid var(--border); color:var(--text);
  padding:.5rem .85rem; font-size:.8rem; border-radius:var(--radius); outline:none; flex:1; min-width:160px;
  transition:border-color var(--trans); }
.filter-bar input:focus,
.filter-bar select:focus { border-color:var(--g3); }
.filter-bar input::placeholder { color:#9AB8AC; }

/* ===== TABLE ===== */
.table-wrap { background:var(--white); border:1px solid var(--border2); border-radius:var(--radius-lg); overflow-x:auto; box-shadow:var(--shadow); }
.data-table { width:100%; border-collapse:collapse; font-size:.8rem; min-width:600px; }
.data-table th { background:var(--g-l); padding:.65rem 1rem; text-align:left; font-size:.65rem;
  letter-spacing:.08em; text-transform:uppercase; color:var(--muted); border-bottom:1px solid var(--border); white-space:nowrap; font-weight:600; }
.data-table td { padding:.78rem 1rem; border-bottom:1px solid var(--border2); vertical-align:middle; color:var(--text); }
.data-table tbody tr:last-child td { border:none; }
.data-table tbody tr:hover td { background:var(--g-l); }
.data-table .t-num { font-family:var(--font-d); color:var(--g3); font-size:.95rem; font-weight:400; }
.data-table .t-muted { color:var(--muted); font-size:.76rem; }
.data-table .t-name { font-weight:500; }
.data-table .t-amount { font-weight:600; color:var(--text); }
.empty-row td { text-align:center; padding:3rem; color:#9AB8AC; font-size:.85rem; }

/* ===== BADGES ===== */
.badge { display:inline-flex; align-items:center; padding:.2rem .7rem; border-radius:20px; font-size:.65rem; font-weight:600; text-transform:uppercase; letter-spacing:.03em; white-space:nowrap; }
.badge-green  { background:var(--g-l2);   color:var(--g2);   border:1px solid rgba(14,92,68,.25); }
.badge-yellow { background:var(--amber-l); color:var(--amber); border:1px solid rgba(180,83,9,.22); }
.badge-red    { background:var(--red-l);   color:var(--red);   border:1px solid rgba(192,74,53,.22); }
.badge-blue   { background:var(--blue-l);  color:var(--blue);  border:1px solid rgba(26,74,122,.22); }
.badge-gray   { background:var(--gray-l);  color:var(--gray);  border:1px solid rgba(55,65,81,.15); }

/* ===== BUTTONS ===== */
.btn { display:inline-flex; align-items:center; gap:.4rem; padding:.55rem 1.2rem; font-size:.78rem; font-weight:600; letter-spacing:.05em; text-transform:uppercase; cursor:pointer; border-radius:var(--radius); transition:all var(--trans); white-space:nowrap; border:none; }
.btn-primary   { background:var(--g2); color:var(--white); }
.btn-primary:hover { background:var(--g1); }
.btn-secondary { background:var(--white); color:var(--text); border:1px solid var(--border); }
.btn-secondary:hover { background:var(--bg); }
.btn-danger    { background:var(--red-l); color:var(--red); border:1px solid rgba(192,74,53,.25); }
.btn-danger:hover { background:#fce8e4; }
.btn-ghost     { background:transparent; color:var(--muted); border:1px solid var(--border); }
.btn-ghost:hover { background:var(--bg); color:var(--text); }
.btn-sm        { padding:.38rem .85rem; font-size:.7rem; }
.btn-xs        { padding:.22rem .65rem; font-size:.65rem; font-weight:500; }

.btn-icon { background:transparent; border:1px solid var(--border2); color:var(--muted); padding:.24rem .55rem;
  cursor:pointer; border-radius:4px; font-size:.8rem; transition:all var(--trans); white-space:nowrap; }
.btn-icon:hover       { border-color:var(--g3); color:var(--g3); background:var(--g-l); }
.btn-icon.btn-edit:hover { border-color:var(--blue); color:var(--blue); background:var(--blue-l); }
.btn-icon.btn-del:hover  { border-color:var(--red);  color:var(--red);  background:var(--red-l); }
.btn-icon.btn-print:hover { border-color:var(--amber-m); color:var(--amber-m); background:var(--amber-l); }

.btn-add { width:100%; background:transparent; border:1.5px dashed rgba(14,92,68,.3); color:var(--g3);
  padding:.5rem 1rem; font-size:.76rem; cursor:pointer; border-radius:var(--radius); transition:all var(--trans); display:flex; align-items:center; justify-content:center; gap:.4rem; margin-top:.5rem; }
.btn-add:hover { background:var(--g-l); border-style:solid; }

/* ===== FORMS ===== */
.form-section { margin-bottom:1.3rem; }
.form-section-title { font-size:.68rem; letter-spacing:.15em; text-transform:uppercase; color:var(--g3);
  padding:.4rem 0; margin-bottom:.7rem; border-bottom:1px solid var(--border); font-weight:600; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
.form-row-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:.9rem; }
.form-full { grid-column:1/-1; }
.fg { margin-bottom:.9rem; }
.fg label { display:block; font-size:.65rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:.38rem; font-weight:600; }
.fg input,.fg select,.fg textarea { width:100%; background:var(--g-l); border:1.5px solid var(--border); color:var(--text);
  padding:.65rem .9rem; font-size:.84rem; border-radius:var(--radius); outline:none; transition:all var(--trans); }
.fg input::placeholder,.fg textarea::placeholder { color:#9AB8AC; }
.fg input:focus,.fg select:focus,.fg textarea:focus { border-color:var(--g3); background:var(--white); box-shadow:0 0 0 3px rgba(14,92,68,.08); }
.fg select option { background:var(--white); }
.fg textarea { resize:vertical; min-height:80px; line-height:1.6; }
.fg-hint { font-size:.7rem; color:var(--muted); margin-top:.25rem; }
.fg-error { font-size:.72rem; color:var(--red); margin-top:.25rem; display:none; }

/* Dynamic rows (médicaments, lignes facture) */
.dyn-row { display:grid; gap:.5rem; align-items:center; margin-bottom:.5rem; }
.dyn-row-med { grid-template-columns:2fr 1.2fr 1fr auto; }
.dyn-row-lig { grid-template-columns:2.5fr .7fr 1fr auto; }
.dyn-row input { background:var(--g-l); border:1.5px solid var(--border); color:var(--text);
  padding:.55rem .75rem; font-size:.8rem; border-radius:var(--radius); outline:none; width:100%; transition:all var(--trans); }
.dyn-row input:focus { border-color:var(--g3); background:var(--white); }
.dyn-row input::placeholder { color:#9AB8AC; }
.total-row { background:var(--g-l); border:1px solid var(--g-border); border-radius:var(--radius);
  padding:.9rem 1.2rem; display:flex; justify-content:space-between; align-items:center; margin:.9rem 0; }
.total-row span { font-size:.82rem; color:var(--muted); }
.total-row strong { font-size:1.15rem; color:var(--g1); font-weight:600; }

/* ===== MODALS ===== */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(10,37,24,.55); z-index:500;
  align-items:center; justify-content:center; padding:1rem; backdrop-filter:blur(3px); }
.modal-overlay.open { display:flex; animation:fadeIn .15s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal { background:var(--white); border:1px solid var(--border); border-radius:var(--radius-lg);
  width:100%; max-width:580px; max-height:92vh; overflow-y:auto; box-shadow:0 24px 64px rgba(0,0,0,.28);
  animation:slideUp .2s ease; }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-lg  { max-width:720px; }
.modal-sm  { max-width:420px; }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:1.2rem 1.5rem;
  border-bottom:1px solid var(--border2); position:sticky; top:0; background:var(--white); z-index:1; }
.modal-header h2 { font-family:var(--font-d); font-size:1.3rem; font-weight:300; color:var(--text); }
.modal-close { background:none; border:none; color:var(--muted); font-size:1.1rem; cursor:pointer;
  padding:4px 8px; border-radius:4px; transition:all var(--trans); line-height:1; }
.modal-close:hover { background:var(--bg); color:var(--text); }
.modal-body { padding:1.5rem; }
.modal-footer { display:flex; gap:.7rem; justify-content:flex-end; padding-top:1rem; border-top:1px solid var(--border2); }

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container { position:fixed; bottom:1.5rem; right:1.5rem; z-index:1000; display:flex; flex-direction:column; gap:.5rem; }
.toast { background:var(--white); border:1px solid var(--border); border-radius:var(--radius);
  padding:.7rem 1.1rem; font-size:.8rem; box-shadow:var(--shadow-md); display:flex; align-items:center; gap:.7rem;
  animation:slideIn .25s ease; max-width:320px; border-left:3px solid; }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
.toast.toast-success { border-left-color:var(--g3); }
.toast.toast-error   { border-left-color:var(--red); }
.toast.toast-info    { border-left-color:var(--blue); }
.toast.toast-warning { border-left-color:var(--amber-m); }
.toast-icon { font-size:1rem; flex-shrink:0; }
.toast-msg  { flex:1; color:var(--text); }
.toast-close { color:var(--muted); cursor:pointer; font-size:.9rem; flex-shrink:0; }
.toast-close:hover { color:var(--text); }

/* ===== SETUP PAGE ===== */
.setup-wrap { max-width:640px; margin:0 auto; padding:2rem; }
.setup-card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius-lg); padding:2.2rem; box-shadow:var(--shadow); }
.setup-card h1 { font-family:var(--font-d); font-size:1.8rem; font-weight:300; color:var(--g1); margin-bottom:.4rem; }
.setup-card p { color:var(--muted); font-size:.88rem; margin-bottom:1.4rem; line-height:1.7; }
.setup-step { background:var(--g-l); border:1px solid var(--g-border); border-radius:var(--radius); padding:1rem 1.2rem; margin-bottom:.8rem; }
.setup-step h4 { font-size:.82rem; font-weight:600; color:var(--g2); margin-bottom:.4rem; }
.setup-step p { font-size:.8rem; color:var(--muted); margin:0; }
.setup-step code { background:var(--white); border:1px solid var(--g-border); padding:.12rem .5rem; border-radius:3px; font-size:.76rem; color:var(--g1); }

/* ===== ADMIN ===== */
.admin-table { width:100%; }
.admin-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1rem; }
.user-card { background:var(--white); border:1px solid var(--border2); border-radius:var(--radius-lg);
  padding:1.3rem; box-shadow:var(--shadow); transition:all var(--trans); }
.user-card:hover { box-shadow:var(--shadow-md); }
.uc-head { display:flex; align-items:center; gap:1rem; margin-bottom:.9rem; }
.uc-avatar { width:44px; height:44px; border-radius:50%; background:var(--g-l2); border:2px solid var(--g-border);
  display:flex; align-items:center; justify-content:center; font-family:var(--font-d); color:var(--g2); font-size:1.1rem; flex-shrink:0; }
.uc-name { font-weight:500; color:var(--text); font-size:.9rem; }
.uc-email { font-size:.75rem; color:var(--muted); margin-top:.1rem; }
.uc-actions { display:flex; gap:.4rem; margin-top:1rem; }

/* ===== PRINT BUTTON ===== */
@media print { .no-print { display:none!important; } }

/* ===== RESPONSIVE ===== */
@media (max-width:1024px) {
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .dash-grid { grid-template-columns:1fr; }
  .dash-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:4px 0 30px rgba(0,0,0,.3); }
  .main { margin-left:0; }
  .burger-btn { display:block; }
  .topbar-date { display:none; }
  .content { padding:1.2rem; }
  .form-row,.form-row-3,.dyn-row-med,.dyn-row-lig { grid-template-columns:1fr; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .dash-grid-3 { grid-template-columns:1fr; }
  .modal { margin:.5rem; max-width:calc(100% - 1rem); }
  .ph-right { width:100%; }
  .ph-right .btn { flex:1; justify-content:center; }
}
@media (max-width:480px) {
  .stats-grid { grid-template-columns:1fr; }
  .filter-bar { flex-direction:column; }
}
