/* ═══════════════════════════════════════════════════════════════
   MESSE Dashboard — light-mode.css
   Soft slate-blue light theme, selaras dengan dark mode palette
   Toggle via: body.light-mode
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variable Overrides ─────────────────────────────────────── */
body.light-mode {
  /* Background layers — soft slate-blue family */
  --bg-0:      #c8d4e6;   /* deepest */
  --bg-1:      #d0daea;   /* page bg */
  --bg-2:      #d8e2ee;   /* sidebar */
  --bg-3:      #dfe8f2;   /* card bg */
  --bg-4:      #e6eef6;   /* card hover */
  --bg-5:      #edf3f9;   /* input, selected */

  /* Glass effect */
  --glass-bg:     rgba(216, 226, 238, 0.85);
  --glass-border: rgba(56, 130, 200, 0.12);
  --glass-blur:   blur(20px);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* Borders */
  --border-1:  rgba(56, 130, 200, 0.08);
  --border-2:  rgba(56, 130, 200, 0.14);
  --border-3:  rgba(56, 130, 200, 0.22);

  /* Accent colors — tetap sama, hanya lebih saturated */
  --sky:       #0284c7;
  --sky-dim:   #0369a1;
  --sky-glow:  rgba(2, 132, 199, 0.12);
  --sky-deep:  rgba(2, 132, 199, 0.06);

  --green:     #059669;
  --green-dim: #047857;
  --green-glow:rgba(5, 150, 105, 0.12);

  --yellow:    #d97706;
  --red:       #dc2626;
  --purple:    #7c3aed;

  /* Text — navy gelap, bukan hitam */
  --text-1:    #0f1f3d;   /* primary */
  --text-2:    #1e3a5f;   /* secondary */
  --text-3:    #4a6080;   /* muted */
  --text-4:    #7a9ab8;   /* placeholder */

  /* Signal colors */
  --signal-strong-buy-bg:  rgba(5, 150, 105, 0.15);
  --signal-strong-buy-fg:  #047857;
  --signal-strong-buy-bd:  rgba(5, 150, 105, 0.3);
  --signal-buy-bg:         rgba(5, 150, 105, 0.1);
  --signal-buy-fg:         #059669;
  --signal-buy-bd:         rgba(5, 150, 105, 0.2);
  --signal-hold-bg:        rgba(217, 119, 6, 0.1);
  --signal-hold-fg:        #b45309;
  --signal-hold-bd:        rgba(217, 119, 6, 0.25);
  --signal-weak-bg:        rgba(234, 88, 12, 0.1);
  --signal-weak-fg:        #c2410c;
  --signal-weak-bd:        rgba(234, 88, 12, 0.22);
  --signal-avoid-bg:       rgba(220, 38, 38, 0.1);
  --signal-avoid-fg:       #b91c1c;
  --signal-avoid-bd:       rgba(220, 38, 38, 0.22);

  /* Scrollbar */
  --scroll-bg: var(--bg-2);
  --scroll-fg: #a0b8d0;
}

/* ── Body & Background ──────────────────────────────────────────── */
body.light-mode {
  background: var(--bg-1);
  color: var(--text-2);
}

/* Background mesh — softer untuk light */
body.light-mode::before {
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(2,132,199,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(5,150,105,.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(124,58,237,.03) 0%, transparent 60%);
}

/* ── Sidebar ────────────────────────────────────────────────────── */
body.light-mode .sidebar {
  background: var(--glass-bg);
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 24px rgba(0,0,0,.06);
}

body.light-mode .sidebar-logo .logo-text {
  color: var(--sky);
  text-shadow: 0 0 20px rgba(2,132,199,.2);
}

body.light-mode .sidebar-logo .logo-sub { color: var(--text-4); }

body.light-mode .sidebar-footer { border-top: 1px solid var(--border-2); }

/* ── Nav items ──────────────────────────────────────────────────── */
body.light-mode .nav-item { color: var(--text-3); }

body.light-mode .nav-item:hover {
  background: rgba(2,132,199,.08);
  color: var(--text-1);
  border-color: rgba(2,132,199,.15);
}

body.light-mode .nav-item.active {
  background: rgba(2,132,199,.12);
  color: var(--sky);
  border-color: rgba(2,132,199,.25);
}

body.light-mode .nav-item.active svg { color: var(--sky); }

/* ── Cards & Panels ─────────────────────────────────────────────── */
body.light-mode .card,
body.light-mode .panel,
body.light-mode [class*="card"],
body.light-mode [class*="panel"] {
  background: var(--bg-3);
  border-color: var(--border-2);
}

/* ── Tables ─────────────────────────────────────────────────────── */
body.light-mode table th {
  background: var(--bg-2);
  color: var(--text-3);
  border-color: var(--border-2);
}

body.light-mode table td {
  border-color: var(--border-1);
  color: var(--text-2);
}

body.light-mode table tr:hover td { background: var(--bg-4); }

/* ── Inputs ─────────────────────────────────────────────────────── */
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
  background: var(--bg-5);
  border-color: var(--border-3);
  color: var(--text-1);
}

body.light-mode input::placeholder,
body.light-mode select::placeholder,
body.light-mode textarea::placeholder { color: var(--text-4); }

body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 2px rgba(2,132,199,.12);
}

/* ── Buttons ────────────────────────────────────────────────────── */
body.light-mode button:not(#theme-toggle-btn):not(.nav-item):not([class*="mc-"]) {
  border-color: var(--border-3);
}

/* ── Modals & Overlays ──────────────────────────────────────────── */
body.light-mode .modal,
body.light-mode [class*="modal"] {
  background: var(--bg-3);
  border-color: var(--border-2);
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
body.light-mode ::-webkit-scrollbar-track { background: var(--bg-2); }
body.light-mode ::-webkit-scrollbar-thumb {
  background: #a0b8d0;
  border-radius: 3px;
}
body.light-mode ::-webkit-scrollbar-thumb:hover { background: #7a9ab8; }

/* ── Chart.js canvas area ───────────────────────────────────────── */
body.light-mode canvas { filter: none; }

/* ── Theme Toggle Button ────────────────────────────────────────── */
#theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: all var(--t-base);
  margin-bottom: 2px;
  white-space: nowrap;
}

#theme-toggle-btn:hover {
  background: var(--sky-glow);
  color: var(--sky);
  border-color: rgba(56,189,248,.15);
}

#theme-toggle-btn svg { flex-shrink: 0; }

/* ── Transition semua elemen saat switch theme ──────────────────── */
body,
body * {
  transition:
    background-color .25s ease,
    border-color .2s ease,
    color .2s ease,
    box-shadow .2s ease !important;
}

/* Kecualikan animasi yang sudah ada */
body *[class*="anim"],
body *[class*="spin"],
body canvas,
body svg {
  transition: none !important;
}
