/* ===================================================================
   LAMINAK — "Sombre" Theme
   Pure graphite. Clean, neutral, minimal dark.
   =================================================================== */

/* ── Theme Variables ── */
body.theme-dark {
  --bg:             #111111;
  --bg-card:        #1c1c1c;
  --bg-input:       #252525;
  --bg-hover:       rgba(255, 255, 255, 0.05);
  --border:         rgba(255, 255, 255, 0.09);
  --text:           #e8e8e8;
  --text-muted:     #888888;
  --accent:         #94a3b8;
  --accent-hover:   #b4c2d4;
  --accent-dim:     rgba(148, 163, 184, 0.1);
  --user-bg:        rgba(148, 163, 184, 0.08);
  --assistant-bg:   rgba(28, 28, 28, 0.6);
  --success:        #4ade80;
  --warning:        #fbbf24;
  --error:          #f87171;
  --thinking-bg:    rgba(28, 28, 28, 0.7);
  --thinking-border: rgba(148, 163, 184, 0.1);
  --tool-bg:        rgba(17, 17, 17, 0.5);
  --tool-border:    rgba(255, 255, 255, 0.07);
  --bg-secondary:   #1c1c1c;
  --glass:          rgba(17, 17, 17, 0.92);
  --glass-border:   rgba(255, 255, 255, 0.08);
  --orb-idle:       radial-gradient(circle, #cbd5e1 0%, #94a3b8 40%, #475569 100%);
  --orb-thinking:   radial-gradient(circle, #a78bfa 0%, #7c3aed 40%, #4c1d95 100%);
  --orb-speaking:   radial-gradient(circle, #6ee7b7 0%, #10b981 40%, #065f46 100%);
  --orb-listening:  radial-gradient(circle, #fde68a 0%, #f59e0b 40%, #92400e 100%);
  --orb-error:      radial-gradient(circle, #fca5a5 0%, #ef4444 40%, #991b1b 100%);
}

/* ── Background ── */
body.theme-dark {
  background: #111111;
}

body.theme-dark::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(148, 163, 184, 0.025) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(148, 163, 184, 0.02)  0%, transparent 60%),
    #111111;
}

/* ── Header ── */
body.theme-dark header {
  background: #1c1c1c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

body.theme-dark .logo-icon {
  background: #2e2e2e;
  color: #e8e8e8;
  border-radius: 8px;
}

/* ── Nav sidebar ── */
body.theme-dark #app-nav {
  background: #161616;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .nav-item.active {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

body.theme-dark .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.theme-dark .sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Messages ── */
body.theme-dark .msg.user .msg-body {
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

body.theme-dark .msg.assistant .msg-body {
  background: rgba(28, 28, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-dark .msg.assistant .msg-avatar {
  background: linear-gradient(135deg, #475569, #94a3b8);
}

/* ── Input area ── */
body.theme-dark .input-area {
  background: #1c1c1c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark #msg-input {
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

body.theme-dark #msg-input:focus {
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.05);
}

body.theme-dark .send-btn {
  background: #2e2e2e;
  color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.theme-dark .send-btn:hover {
  background: #3a3a3a;
  border-color: rgba(148, 163, 184, 0.3);
}

/* ── Model picker ── */
body.theme-dark .model-picker-btn {
  background: #252525;
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .model-picker-btn:hover {
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

body.theme-dark .model-picker-bubble {
  background: #1c1c1c;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

body.theme-dark .model-picker-bubble::after {
  background: #1c1c1c;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ── Suggestions ── */
body.theme-dark .suggestion {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

body.theme-dark .suggestion:hover {
  background: rgba(148, 163, 184, 0.07);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

/* ── Thinking / tool blocks ── */
body.theme-dark .thinking-block {
  background: rgba(28, 28, 28, 0.5);
  border-color: rgba(148, 163, 184, 0.07);
}

body.theme-dark .tool-block {
  background: rgba(17, 17, 17, 0.5);
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── Code blocks ── */
body.theme-dark pre, body.theme-dark code {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Auth & connect ── */
body.theme-dark .auth-card {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-dark #connect-screen {
  background: #111111;
}

body.theme-dark #connect-screen .big-spinner {
  border-color: rgba(148, 163, 184, 0.1);
  border-top-color: #94a3b8;
}

/* ── Scrollbars ── */
body.theme-dark ::-webkit-scrollbar { width: 4px; }
body.theme-dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}
body.theme-dark ::-webkit-scrollbar-track { background: transparent; }
