/* ── DESIGENO ERP THEMES ──────────────────────────────────────────────── */

/* === LIGHT THEME (default) === */
.theme-light {
  --p: #800080;   --p2: #6a006a;   --pd: #9b009b;
  --pxl: rgba(128,0,128,.04);
  --g: #51b73b;   --g2: #3d8f2c;
  --gxl: rgba(81,183,59,.06);
  --black: #1a1a2e;  --gd: #2d2d3f;
  --g800: #444458;   --g600: #6b6b88;  --g500: #8888a0;
  --g400: #aaaabc;   --g300: #ccccdd;  --g200: #e0e0ee;
  --g100: #f0f0f8;   --g50:  #f8f8fc;  --gxl: #f5f5fa;
  --bg: #f5f5fa;  --card: #ffffff;
  --sb-bg: #ffffff;  --sb-text: #2d2d3f;  --sb-muted: #8888a0;
  --topbar-bg: #fff; --topbar-shadow: 0 1px 12px rgba(0,0,0,.07);
  --r: 8px;  --r2: 12px;  --r3: 16px;
  --mono: 'Courier New', monospace;
  --display: 'Syne', sans-serif;
  --body: 'DM Sans', sans-serif;
}

/* === DARK THEME === */
.theme-dark {
  --p: #b84db8;   --p2: #9a309a;   --pd: #d070d0;
  --pxl: rgba(184,77,184,.08);
  --g: #6ad84e;   --g2: #51b73b;
  --gxl: rgba(106,216,78,.08);
  --black: #e8e8f0;  --gd: #d0d0e8;
  --g800: #c0c0d8;   --g600: #9090b0;  --g500: #7070a0;
  --g400: #505078;   --g300: #383860;  --g200: #282848;
  --g100: #1e1e38;   --g50:  #181830;  --gxl: #1a1a35;
  --bg: #12122a;  --card: #1e1e38;
  --sb-bg: #151530;  --sb-text: #d0d0e8;  --sb-muted: #7070a0;
  --topbar-bg: #1e1e38; --topbar-shadow: 0 1px 12px rgba(0,0,0,.4);
  --r: 8px;  --r2: 12px;  --r3: 16px;
  --mono: 'Courier New', monospace;
  --display: 'Syne', sans-serif;
  --body: 'DM Sans', sans-serif;
}

/* === CUSTOM THEME (uses CSS vars set dynamically) === */
.theme-custom {
  --r: 8px;  --r2: 12px;  --r3: 16px;
  --mono: 'Courier New', monospace;
  --display: 'Syne', sans-serif;
  --body: 'DM Sans', sans-serif;
}

/* ── Theme toggle button ─────────────────────────────────────── */
.btn-theme {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--g300);
  background: var(--card);
  color: var(--p);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-theme:hover { background: var(--p); color: #fff; border-color: var(--p); }

/* ── Reports overlay ─────────────────────────────────────────── */
#reports-ov {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 900;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.reports-panel {
  background: var(--card);
  border-radius: var(--r3);
  width: 100%; max-width: 960px;
  box-shadow: 0 8px 48px rgba(0,0,0,.25);
}
.reports-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--g200);
}
.reports-header h2 {
  margin: 0; font-size: 18px; color: var(--gd); font-family: var(--display);
}
#report-content { padding: 20px 24px; }
.report-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--r2);
  padding: 14px;
  text-align: center;
}
.stat-card .stat-val {
  font-size: 22px; font-weight: 700;
  color: var(--p); font-family: var(--display);
}
.stat-card .stat-lbl {
  font-size: 11px; color: var(--g500); margin-top: 4px;
}
.chart-wrap {
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--r2);
  padding: 16px;
  margin-bottom: 16px;
}
#report-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
#report-table th {
  background: var(--pxl); color: var(--p);
  font-weight: 600; padding: 8px 10px; text-align: left;
  border-bottom: 2px solid rgba(128,0,128,.2);
}
#report-table td { padding: 6px 10px; border-bottom: 1px solid var(--g100); }
#report-table tr:hover td { background: var(--pxl); }

/* ── Accessibility ───────────────────────────────────────────── */
.a11y-large-text { font-size: 115%; }
.a11y-high-contrast {
  --g500: #555; --g400: #444; --g300: #333;
  --g200: #222; --g100: #111;
}
.a11y-reduce-motion * { transition: none !important; animation: none !important; }

/* ── Auth links ──────────────────────────────────────────────── */
.auth-links {
  text-align: center; margin-top: 10px;
}
.auth-links a {
  color: rgba(255,255,255,.65); font-size: 12px;
  text-decoration: none;
}
.auth-links a:hover { color: #fff; }
