/* ===========================
   CRM — Admin Dashboard CSS
   =========================== */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DARK THEME (default) ── */
:root,
[data-theme="dark"] {
  --bg:          #0b1220;
  --bg2:         #0d1632;
  --sidebar:     #070e1c;
  --sidebar2:    #0d1632;
  --card:        #0f1d38;
  --card2:       #152240;
  --border:      rgba(56,189,248,.08);
  --border2:     rgba(56,189,248,.15);
  --blue:        #2563EB;
  --blue-light:  #60a5fa;
  --blue-dark:   #1d4ed8;
  --sky:         #38BDF8;
  --green:       #22c55e;
  --green-d:     #16a34a;
  --yellow:      #f59e0b;
  --orange:      #f97316;
  --red:         #ef4444;
  --purple:      #8b5cf6;
  --pink:        #ec4899;
  --text:        #e2eeff;
  --text2:       #b8cce8;
  --muted:       #5a7a9c;
  --muted2:      #3d5a7a;
  --white:       #ffffff;
  --sidebar-w:   260px;
  --topbar-h:    64px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,.5);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --transition:  .2s ease;
  --input-bg:    #0d1632;

  /* Aliasuri pentru compatibilitate pagini noi */
  --surface:     var(--card);
  --heading:     var(--white);
  --text-muted:  var(--muted);
  --primary:     var(--blue);
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg:          #eef2f7;
  --bg2:         #ffffff;
  --sidebar:     #0d1632;
  --sidebar2:    #112044;
  --card:        #ffffff;
  --card2:       #f4f7fb;
  --border:      rgba(37,99,235,.1);
  --border2:     rgba(37,99,235,.18);
  --blue:        #2563EB;
  --blue-light:  #2563EB;
  --blue-dark:   #1d4ed8;
  --sky:         #0284c7;
  --green:       #16a34a;
  --green-d:     #15803d;
  --yellow:      #d97706;
  --orange:      #ea580c;
  --red:         #dc2626;
  --purple:      #7c3aed;
  --pink:        #db2777;
  --text:        #1e293b;
  --text2:       #334155;
  --muted:       #64748b;
  --muted2:      #94a3b8;
  --white:       #1e293b;
  --sidebar-w:   260px;
  --topbar-h:    64px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 2px 16px rgba(37,99,235,.1);
  --shadow-sm:   0 1px 6px rgba(0,0,0,.08);
  --transition:  .2s ease;
  --input-bg:    #f8fafc;

  /* Aliasuri pentru compatibilitate pagini noi */
  --surface:     var(--card);
  --heading:     var(--text);
  --text-muted:  var(--muted);
  --primary:     var(--blue);
}

html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background .25s ease, color .25s ease;
}

/* ─── LAYOUT ─────────────────────────────── */
.crm-wrap { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.sidebar__brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.sidebar__brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sidebar__brand-text strong {
  display: block; font-size: .95rem; font-weight: 700; color: var(--white);
}
.sidebar__brand-text span {
  font-size: .72rem; color: var(--muted); font-weight: 400;
}

.sidebar__section { padding: 20px 12px 8px; }
.sidebar__label {
  font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase;
  padding: 0 8px; margin-bottom: 6px;
}

.sidebar__nav { list-style: none; }
.sidebar__nav li { margin-bottom: 2px; }
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: .925rem; font-weight: 500;
  text-decoration: none; transition: var(--transition);
  position: relative;
}
.sidebar__link i { width: 18px; text-align: center; font-size: .95rem; opacity: .8; }
.sidebar__link:hover { background: var(--card); color: var(--white); }
.sidebar__link:hover i { opacity: 1; }
.sidebar__link.active {
  background: rgba(59,130,246,.15);
  color: var(--blue-light);
  font-weight: 600;
}
.sidebar__link.active i { opacity: 1; color: var(--blue-light); }
.sidebar__link.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--blue);
  border-radius: 0 3px 3px 0;
}

.sidebar__badge {
  margin-left: auto;
  background: var(--red);
  color: white; font-size: .68rem; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
  min-width: 20px; text-align: center;
}
.sidebar__badge.yellow { background: var(--yellow); color: #000; }
.sidebar__badge.green  { background: var(--green); }

.sidebar__bottom {
  margin-top: auto; padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar__user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--card); margin-bottom: 8px;
}
.sidebar__avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: white; flex-shrink: 0;
}
.sidebar__user-info strong { display: block; font-size: .8rem; color: var(--white); }
.sidebar__user-info span   { font-size: .72rem; color: var(--muted); }
.sidebar__logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: .8rem; text-decoration: none;
  transition: var(--transition);
}
.sidebar__logout:hover { color: var(--red); background: rgba(239,68,68,.1); }

/* ─── MAIN ───────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

/* ─── TOPBAR ─────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
  gap: 16px;
}
.topbar__title { font-size: 1.1rem; font-weight: 700; color: var(--white); flex: 1; }
.topbar__sub { font-size: .85rem; color: var(--muted); font-weight: 400; margin-left: 8px; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.topbar__btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border2); background: var(--card);
  color: var(--text2); text-decoration: none; transition: var(--transition);
}
.topbar__btn:hover { background: var(--card2); color: var(--white); border-color: var(--border2); }
.topbar__btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.topbar__btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.topbar__date {
  font-size: .78rem; color: var(--muted);
  padding: 6px 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}

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

/* ─── STAT CARDS ─────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-card__glow {
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  opacity: .08; filter: blur(30px);
}
.stat-card__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 14px;
}
.stat-card__label { font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.stat-card__value { font-size: 1.9rem; font-weight: 800; color: var(--white); line-height: 1; }
.stat-card__sub { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.stat-card__trend { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; }
.stat-card__trend.up { color: var(--green); }
.stat-card__trend.down { color: var(--red); }
.stat-card__trend.warn { color: var(--yellow); }

/* Color variants */
.stat-card.blue  .stat-card__icon { background: rgba(59,130,246,.15); color: var(--blue-light); }
.stat-card.blue  .stat-card__glow { background: var(--blue); }
.stat-card.green .stat-card__icon { background: rgba(34,197,94,.12); color: var(--green); }
.stat-card.green .stat-card__glow { background: var(--green); }
.stat-card.yellow .stat-card__icon { background: rgba(245,158,11,.12); color: var(--yellow); }
.stat-card.yellow .stat-card__glow { background: var(--yellow); }
.stat-card.red   .stat-card__icon { background: rgba(239,68,68,.12); color: var(--red); }
.stat-card.red   .stat-card__glow { background: var(--red); }
.stat-card.purple .stat-card__icon { background: rgba(139,92,246,.12); color: var(--purple); }
.stat-card.purple .stat-card__glow { background: var(--purple); }
.stat-card.sky   .stat-card__icon { background: rgba(14,165,233,.12); color: var(--sky); }
.stat-card.sky   .stat-card__glow { background: var(--sky); }

/* ─── SECTIONS / PANELS ──────────────────── */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.panel__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.panel__title {
  font-size: .95rem; font-weight: 700; color: var(--white); flex: 1;
}
.panel__sub { font-size: .82rem; color: var(--muted); }
.panel__body { padding: 20px; }
.panel__actions { display: flex; gap: 8px; }

/* ─── GRID 2 / 3 ─────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px)  { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ─── TABLES ─────────────────────────────── */
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th {
  font-size: .74rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
  padding: 11px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.crm-table td {
  padding: 13px 16px; font-size: .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text2);
}
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tr:hover td { background: rgba(255,255,255,.025); color: var(--white); }
.crm-table .td-main { color: var(--white); font-weight: 600; }
.crm-table .td-muted { color: var(--muted); font-size: .78rem; }
.crm-table .td-actions { text-align: right; white-space: nowrap; }

/* ─── BADGES / STATUS ────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-active   { background: rgba(34,197,94,.12);  color: #4ade80; }
.badge-expiring { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-expired  { background: rgba(239,68,68,.12);  color: #f87171; }
.badge-cancelled{ background: rgba(100,116,139,.15);color: #94a3b8; }
.badge-manual   { background: rgba(139,92,246,.12); color: #a78bfa; }
.badge-smartbill{ background: rgba(14,165,233,.12); color: #38bdf8; }

/* service type badges */
.badge-signature { background: rgba(59,130,246,.15);  color: #93c5fd; }
.badge-hosting   { background: rgba(245,158,11,.15);  color: #fcd34d; }
.badge-domain    { background: rgba(236,72,153,.15);  color: #f9a8d4; }
.badge-spv       { background: rgba(34,197,94,.12);   color: #86efac; }
.badge-efactura  { background: rgba(139,92,246,.15);  color: #c4b5fd; }
.badge-other     { background: rgba(100,116,139,.15); color: #94a3b8; }

/* ─── EXPIRY COUNTDOWN ───────────────────── */
.expiry-days {
  display: inline-flex; align-items: center;
  font-size: .8rem; font-weight: 700;
}
.expiry-days.urgent  { color: var(--red); }
.expiry-days.warning { color: var(--yellow); }
.expiry-days.ok      { color: var(--green); }
.expiry-days.past    { color: var(--muted); }

/* ─── PROGRESS BARS ──────────────────────── */
.progress { background: rgba(255,255,255,.06); border-radius: 99px; height: 6px; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px; transition: width .6s ease; }

/* ─── FORMS ──────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-label span { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--white);
  font-size: .925rem; font-family: inherit;
  transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.form-control::placeholder { color: var(--muted); }
select.form-control option { background: var(--bg2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.form-hint { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ─── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: var(--transition);
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn-primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-success { background: var(--green-d); color: white; border-color: var(--green-d); }
.btn-success:hover { background: #15803d; border-color: #15803d; }
.btn-warning { background: rgba(245,158,11,.15); color: var(--yellow); border-color: rgba(245,158,11,.3); }
.btn-warning:hover { background: rgba(245,158,11,.25); }
.btn-danger  { background: rgba(239,68,68,.12); color: var(--red); border-color: rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-ghost   { background: transparent; color: var(--text2); border-color: var(--border2); }
.btn-ghost:hover { background: var(--card2); color: var(--white); }
.btn-sm { padding: 5px 12px; font-size: .78rem; }
.btn-xs { padding: 3px 9px; font-size: .72rem; }

/* ─── SEARCH BAR ─────────────────────────── */
.search-bar {
  display: flex; align-items: center;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); overflow: hidden;
}
.search-bar i { padding: 0 12px; color: var(--muted); font-size: .9rem; flex-shrink: 0; }
.search-bar input {
  flex: 1; padding: 9px 0; background: transparent;
  border: none; outline: none; color: var(--white); font-size: .875rem; font-family: inherit;
}
.search-bar input::placeholder { color: var(--muted); }

/* ─── FILTER BAR ─────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-bar__label { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ─── PAGINATION ─────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 16px; }
.page-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border2); background: var(--card);
  color: var(--text2); text-decoration: none; transition: var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.page-btn.disabled { opacity: .35; pointer-events: none; }

/* ─── ALERTS ─────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; font-weight: 500; margin-bottom: 16px;
}
.alert-success { background: rgba(34,197,94,.1);  color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.alert-error   { background: rgba(239,68,68,.1);  color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.alert-warning { background: rgba(245,158,11,.1); color: #fbbf24; border: 1px solid rgba(245,158,11,.2); }
.alert-info    { background: rgba(59,130,246,.1); color: #93c5fd; border: 1px solid rgba(59,130,246,.2); }

/* ─── MINI CHART BARS ────────────────────── */
.sparkline { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.sparkline__bar { flex: 1; background: rgba(59,130,246,.4); border-radius: 3px 3px 0 0; min-height: 4px; transition: var(--transition); }
.sparkline__bar:hover { background: var(--blue-light); }

/* ─── EMPTY STATE ────────────────────────── */
.empty {
  text-align: center; padding: 60px 20px;
}
.empty__icon { font-size: 2.5rem; color: var(--muted2); margin-bottom: 12px; }
.empty__title { font-size: 1rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.empty__sub { font-size: .85rem; color: var(--muted); }

/* ─── MODAL ──────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: var(--radius); max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.modal__head {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal__title { font-size: 1rem; font-weight: 700; }
.modal__close {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--card); border: none; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .9rem; transition: var(--transition);
}
.modal__close:hover { background: var(--card2); color: var(--white); }
.modal__body { padding: 24px; }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── IMPORT ZONE ────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border2); border-radius: var(--radius);
  padding: 48px 32px; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--blue); background: rgba(59,130,246,.05); }
.drop-zone__icon { font-size: 2.5rem; color: var(--muted2); margin-bottom: 12px; }
.drop-zone__title { font-size: 1rem; font-weight: 600; color: var(--text2); }
.drop-zone__sub { font-size: .82rem; color: var(--muted); margin-top: 6px; }

/* ─── FINANCE SECTION ────────────────────── */
.finance-metric {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.finance-metric:last-child { border-bottom: none; }
.finance-metric__icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.finance-metric__label { font-size: .78rem; color: var(--muted); }
.finance-metric__value { font-size: 1.1rem; font-weight: 700; color: var(--white); }

/* ─── LOGIN PAGE ─────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 30% 40%, rgba(37,99,235,.15) 0%, transparent 60%),
                    radial-gradient(ellipse at 70% 70%, rgba(139,92,246,.1) 0%, transparent 50%);
  padding: 20px;
}
.login-card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 16px; padding: 40px; width: 100%; max-width: 380px;
  box-shadow: var(--shadow);
}
.login-card__brand {
  text-align: center; margin-bottom: 32px;
}
.login-card__icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 12px;
}
.login-card__title { font-size: 1.3rem; font-weight: 800; color: var(--white); }
.login-card__sub   { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* ─── THEME TOGGLE BUTTON ────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--card2); color: var(--blue-light); border-color: var(--blue); }

/* ─── LIGHT THEME SPECIFIC OVERRIDES ────── */
[data-theme="light"] body { background: var(--bg); }

[data-theme="light"] .sidebar { background: var(--sidebar); border-right-color: rgba(255,255,255,.08); }
[data-theme="light"] .sidebar__brand { border-bottom-color: rgba(255,255,255,.08); }
[data-theme="light"] .sidebar__label { color: rgba(255,255,255,.35); }
[data-theme="light"] .sidebar__link { color: rgba(255,255,255,.65); }
[data-theme="light"] .sidebar__link:hover { background: rgba(255,255,255,.08); color: white; }
[data-theme="light"] .sidebar__link.active { background: rgba(56,189,248,.18); color: #7dd3fc; }
[data-theme="light"] .sidebar__user { background: rgba(255,255,255,.08); }
[data-theme="light"] .sidebar__user-info strong { color: white; }
[data-theme="light"] .sidebar__user-info span { color: rgba(255,255,255,.45); }
[data-theme="light"] .sidebar__logout { color: rgba(255,255,255,.45); }
[data-theme="light"] .sidebar__logout:hover { color: #f87171; background: rgba(239,68,68,.15); }
[data-theme="light"] .sidebar__bottom { border-top-color: rgba(255,255,255,.08); }

[data-theme="light"] .topbar { background: #fff; border-bottom-color: rgba(37,99,235,.12); box-shadow: 0 1px 8px rgba(37,99,235,.07); }
[data-theme="light"] .topbar__title { color: #1e293b; }
[data-theme="light"] .topbar__sub { color: #64748b; }
[data-theme="light"] .topbar__btn { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
[data-theme="light"] .topbar__btn:hover { background: #e2e8f0; color: #1e293b; }
[data-theme="light"] .topbar__date { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }

[data-theme="light"] .panel { background: #fff; border-color: rgba(37,99,235,.1); box-shadow: 0 1px 6px rgba(37,99,235,.07); }
[data-theme="light"] .panel__head { border-bottom-color: rgba(37,99,235,.1); background: #f8fafc; }
[data-theme="light"] .panel__title { color: #1e293b; }

[data-theme="light"] .stat-card { background: #fff; border-color: rgba(37,99,235,.1); box-shadow: 0 1px 8px rgba(37,99,235,.08); }
[data-theme="light"] .stat-card__label { color: #64748b; }
[data-theme="light"] .stat-card__value { color: #1e293b; }
[data-theme="light"] .stat-card__sub   { color: #64748b; }

[data-theme="light"] .crm-table th { color: #475569; background: #f8fafc; border-bottom-color: #e2e8f0; }
[data-theme="light"] .crm-table td { color: #334155; border-bottom-color: #f1f5f9; }
[data-theme="light"] .crm-table tr:hover td { background: #f0f6ff; color: #1e293b; }
[data-theme="light"] .crm-table .td-main { color: #1e293b; }
[data-theme="light"] .crm-table .td-muted { color: #94a3b8; }

[data-theme="light"] .form-control {
  background: #f8fafc; border-color: #e2e8f0; color: #1e293b;
}
[data-theme="light"] .form-control:focus { border-color: var(--blue); background: #fff; }
[data-theme="light"] .form-control::placeholder { color: #94a3b8; }
[data-theme="light"] select.form-control option { background: #fff; color: #1e293b; }
[data-theme="light"] .form-label { color: #475569; }
[data-theme="light"] .form-hint { color: #94a3b8; }

[data-theme="light"] .search-bar { background: #f8fafc; border-color: #e2e8f0; }
[data-theme="light"] .search-bar input { color: #1e293b; }

[data-theme="light"] .btn-ghost { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
[data-theme="light"] .btn-ghost:hover { background: #e2e8f0; color: #1e293b; }
[data-theme="light"] .btn-warning { background: rgba(217,119,6,.1); color: #b45309; border-color: rgba(217,119,6,.25); }
[data-theme="light"] .btn-danger  { background: rgba(220,38,38,.08); color: #b91c1c; border-color: rgba(220,38,38,.2); }

[data-theme="light"] .modal { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .modal__head { border-bottom-color: #f1f5f9; }
[data-theme="light"] .modal__foot { border-top-color: #f1f5f9; }
[data-theme="light"] .modal__close { background: #f1f5f9; color: #64748b; border: none; }

[data-theme="light"] .alert-info    { background: rgba(37,99,235,.07);  border-color: rgba(37,99,235,.2);  color: #1d4ed8; }
[data-theme="light"] .alert-success { background: rgba(22,163,74,.07);  border-color: rgba(22,163,74,.2);  color: #15803d; }
[data-theme="light"] .alert-error   { background: rgba(220,38,38,.07);  border-color: rgba(220,38,38,.2);  color: #b91c1c; }
[data-theme="light"] .alert-warning { background: rgba(217,119,6,.07);  border-color: rgba(217,119,6,.2);  color: #b45309; }

[data-theme="light"] .drop-zone { border-color: #cbd5e1; }
[data-theme="light"] .drop-zone:hover { border-color: var(--blue); background: rgba(37,99,235,.04); }

[data-theme="light"] .sidebar__badge { background: #ef4444; }
[data-theme="light"] .sidebar__badge.yellow { background: #d97706; color: white; }

[data-theme="light"] .filter-bar { border-bottom-color: rgba(37,99,235,.1); background: #f8fafc; }

[data-theme="light"] .progress { background: rgba(37,99,235,.1); }

[data-theme="light"] .finance-metric { border-bottom-color: #f1f5f9; }
[data-theme="light"] .finance-metric__label { color: #64748b; }
[data-theme="light"] .finance-metric__value { color: #1e293b; }

[data-theme="light"] .login-card { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .login-wrap {
  background: #eef2f7;
  background-image: radial-gradient(ellipse at 30% 40%, rgba(37,99,235,.12) 0%, transparent 60%),
                    radial-gradient(ellipse at 70% 70%, rgba(139,92,246,.08) 0%, transparent 50%);
}

/* light text overrides */
[data-theme="light"] .text-white { color: #1e293b !important; }
[data-theme="light"] .text-muted  { color: #94a3b8 !important; }

/* ─── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ─── UTILITY ────────────────────────────── */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--muted); }
.text-white  { color: var(--white); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-blue   { color: var(--blue-light); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm  { font-size: .8rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.nowrap { white-space: nowrap; }

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); width: 260px; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
}
