/* ============================================================
   Price Monitor — ElectroLight.ro
   Stylesheet Principal
   ============================================================ */

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

:root {
  --bg:       #09090e;
  --surface:  #0f0f17;
  --surface2: #14141e;
  --surface3: #1a1a26;
  --border:   #1e1e2e;
  --border2:  #28283c;
  --text:     #e2e2f0;
  --text2:    #7878a0;
  --text3:    #4a4a6a;
  --accent:   #f59e0b;
  --accent2:  #fbbf24;
  --green:    #10b981;
  --green2:   #059669;
  --red:      #ef4444;
  --red2:     #dc2626;
  --blue:     #3b82f6;
  --orange:   #f97316;
  --purple:   #8b5cf6;
  --radius:   10px;
  --radius-lg:16px;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.sidebar {
  width: 224px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.25s ease;
}

.main-area {
  margin-left: 224px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── SIDEBAR LOGO ──────────────────────────────────────────── */
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
.logo-bolt {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #d97706);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.logo-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo-sub {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--text3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding-left: 42px;
}

/* ── SIDEBAR NAV ───────────────────────────────────────────── */
.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }

.nav-section {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text3);
  text-transform: uppercase;
  padding: 0 10px;
  margin: 14px 0 6px;
}
.nav-section:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  transition: all 0.15s ease;
  margin-bottom: 2px;
  position: relative;
  user-select: none;
}
.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}
.nav-item.active {
  background: rgba(245,158,11,0.08);
  color: var(--accent);
  font-weight: 500;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── SIDEBAR FOOTER ────────────────────────────────────────── */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.scrape-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.green {
  background: var(--green);
  box-shadow: 0 0 8px rgba(16,185,129,0.6);
  animation: pulse 2s infinite;
}
.status-dot.red { background: var(--red); }
.status-dot.gray { background: var(--text3); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-text {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text2);
}
.status-detail {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  padding-left: 14px;
}

/* ── TOPBAR ────────────────────────────────────────────────── */
.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}
.topbar-left { display: flex; flex-direction: column; }
.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  line-height: 1.2;
}
.topbar-breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-date {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text3);
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }

.btn-accent { background: var(--accent); color: #000; font-weight: 600; }
.btn-accent:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }

.btn-ghost { background: var(--surface3); color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--border); }

.btn-danger { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.2); }

.btn-green { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.btn-green:hover:not(:disabled) { background: rgba(16,185,129,0.2); }

.btn-spinning .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ── STAT CARDS ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border2); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.c-yellow::after { background: var(--accent); }
.stat-card.c-green::after  { background: var(--green); }
.stat-card.c-red::after    { background: var(--red); }
.stat-card.c-blue::after   { background: var(--blue); }
.stat-card.c-purple::after { background: var(--purple); }

.stat-icon {
  font-size: 20px;
  margin-bottom: 12px;
  opacity: 0.8;
}
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}
.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-value.c-yellow { color: var(--accent); }
.stat-value.c-green  { color: var(--green); }
.stat-value.c-red    { color: var(--red); }
.stat-value.c-blue   { color: var(--blue); }
.stat-value.c-purple { color: var(--purple); }
.stat-sub { font-size: 11px; color: var(--text2); }

/* ── SECTION HEADER ────────────────────────────────────────── */
.section-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.section-hdr-left {}
.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.section-sub {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  margin-top: 3px;
}

/* ── TABLE ─────────────────────────────────────────────────── */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}
.table-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.table-toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-count {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
}

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 11px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  cursor: pointer;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
td {
  padding: 13px 20px;
  font-size: 13px;
  vertical-align: middle;
}

/* ── INPUTS ────────────────────────────────────────────────── */
.input {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text3); }
.input-search { width: 220px; }
.input-select { cursor: pointer; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.08); }
.form-input::placeholder { color: var(--text3); }
select.form-input { cursor: pointer; }

/* ── BADGES ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-green  { color: var(--green);  background: rgba(16,185,129,0.1);  border: 1px solid rgba(16,185,129,0.15); }
.badge-red    { color: var(--red);    background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.15); }
.badge-yellow { color: var(--accent); background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.15); }
.badge-orange { color: var(--orange); background: rgba(249,115,22,0.1);  border: 1px solid rgba(249,115,22,0.15); }
.badge-blue   { color: var(--blue);   background: rgba(59,130,246,0.1);  border: 1px solid rgba(59,130,246,0.15); }
.badge-gray   { color: var(--text2);  background: var(--surface3);       border: 1px solid var(--border2); }

/* ── TOGGLE SWITCH ─────────────────────────────────────────── */
.toggle-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}
.toggle {
  width: 36px; height: 20px;
  background: var(--border2);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle.on::after { left: 19px; }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 500px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.modal-close {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text); background: var(--border); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── RANKING BARS ──────────────────────────────────────────── */
.rank-list { display: flex; flex-direction: column; gap: 5px; min-width: 200px; }
.rank-row { display: flex; align-items: center; gap: 8px; }
.rank-num {
  width: 16px; height: 16px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #000;
}
.rank-name {
  font-size: 10px;
  color: var(--text2);
  width: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.rank-name.mine { color: var(--accent); font-weight: 500; }
.rank-bar-bg { flex: 1; height: 4px; background: var(--border2); border-radius: 2px; overflow: hidden; }
.rank-bar { height: 4px; border-radius: 2px; transition: width 0.4s ease; }
.rank-price {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text2);
  width: 58px;
  text-align: right;
  flex-shrink: 0;
}
.rank-price.mine { color: var(--accent); }

/* ── CHART ─────────────────────────────────────────────────── */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
}

/* ── COMPETITOR / CATEGORY ITEMS ───────────────────────────── */
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.item-row:hover { border-color: var(--border2); }
.item-name { font-weight: 500; font-size: 13px; }
.item-sub {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
}
.item-right { display: flex; align-items: center; gap: 10px; }

/* ── EXPORT ────────────────────────────────────────────────── */
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.export-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.export-card:hover { border-color: var(--accent); background: rgba(245,158,11,0.03); }
.export-icon { font-size: 40px; margin-bottom: 14px; }
.export-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}
.export-desc { font-size: 12px; color: var(--text2); line-height: 1.6; }

/* ── LOGIN PAGE ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(245,158,11,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 70%, rgba(59,130,246,0.03) 0%, transparent 70%);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 40px;
  width: 380px;
  max-width: 94vw;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-bolt {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), #d97706);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(245,158,11,0.3);
}
.login-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 4px;
}
.login-sub {
  font-size: 12px;
  color: var(--text2);
}
.login-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--red);
  margin-bottom: 16px;
  text-align: center;
}

/* ── TOAST ─────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: toastIn 0.25s ease;
}
.toast.success { border-color: rgba(16,185,129,0.3); color: var(--green); }
.toast.error   { border-color: rgba(239,68,68,0.3);  color: var(--red); }
.toast.info    { border-color: rgba(245,158,11,0.3);  color: var(--accent); }
@keyframes toastIn {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── LOADING ───────────────────────────────────────────────── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 14px;
  color: var(--text3);
}
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.empty-text { font-size: 13px; }

/* ── SCRAPE PROGRESS ───────────────────────────────────────── */
.scrape-modal .progress-wrap {
  background: var(--surface2);
  border-radius: var(--radius);
  overflow: hidden;
  height: 6px;
  margin: 16px 0;
}
.scrape-modal .progress-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: var(--radius);
  transition: width 0.3s ease;
}
.scrape-log {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  height: 160px;
  overflow-y: auto;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text2);
  line-height: 1.8;
}

/* ── UTILITIES ─────────────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.mt-1        { margin-top: 4px; }
.mt-2        { margin-top: 8px; }
.mb-4        { margin-bottom: 16px; }
.mb-6        { margin-bottom: 24px; }
.text-muted  { color: var(--text2); font-size: 12px; }
.text-mono   { font-family: 'DM Mono', monospace; }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.font-bold   { font-weight: 700; }
.w-full      { width: 100%; }
.divider     { height: 1px; background: var(--border); margin: 8px 0; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sidebar { transform: translateX(-100%); }
  .main-area { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}

/* ── LIGHT THEME ───────────────────────────────────────────── */
body.light {
  --bg:       #f4f4f8;
  --surface:  #ffffff;
  --surface2: #f0f0f5;
  --surface3: #e8e8f0;
  --border:   #e0e0ea;
  --border2:  #d0d0de;
  --text:     #1a1a2e;
  --text2:    #5a5a7a;
  --text3:    #9090b0;
  --accent:   #d97706;
  --accent2:  #f59e0b;
  --green:    #059669;
  --red:      #dc2626;
  --blue:     #2563eb;
  --orange:   #ea580c;
  --purple:   #7c3aed;
}
body.light .sidebar        { background: #ffffff; border-right: 1px solid var(--border); }
body.light .topbar         { background: #ffffff; border-bottom: 1px solid var(--border); }
body.light .nav-item:hover { background: var(--surface2); }
body.light .nav-item.active{ background: rgba(217,119,6,0.08); }
body.light thead th        { background: var(--surface2); }
body.light .modal          { background: #ffffff; }
body.light .login-card     { background: #ffffff; box-shadow: 0 24px 64px rgba(0,0,0,0.1); }
body.light .input          { background: #ffffff; }
body.light .form-input     { background: #ffffff; }
body.light .scrape-log     { background: var(--surface2); }
body.light .toast          { background: #ffffff; }
body.light .login-bg       { background: radial-gradient(ellipse 60% 50% at 20% 40%, rgba(217,119,6,0.06) 0%, transparent 70%), radial-gradient(ellipse 40% 60% at 80% 70%, rgba(37,99,235,0.04) 0%, transparent 70%); }
body.light ::-webkit-scrollbar-track { background: var(--surface2); }
body.light ::-webkit-scrollbar-thumb { background: var(--border2); }

/* ── THEME TOGGLE BUTTON ───────────────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--surface3); }
