/* Dark theme overrides */

body.theme-dark {
  background: #050b13;
  color: #e5ecff;
}

body.theme-dark .wrap {
  background: #0d1324;
  border-color: #1e2a44;
  box-shadow: 0 4px 18px rgba(5, 17, 40, 0.65);
}

body.theme-dark .wrap.auth-wrap {
  background: transparent;
  border: none;
}

body.theme-dark h1,
body.theme-dark label,
body.theme-dark .muted {
  color: #dbe5ff;
}

body.theme-dark .card {
  background: #0f172a;
  border-color: #1e2a44;
  box-shadow: 0 6px 20px rgba(3, 13, 31, 0.45);
}

body.theme-dark input[type=text],
body.theme-dark input[type=password],
body.theme-dark input[type=url],
body.theme-dark input[type=file],
body.theme-dark textarea {
  background: #091021;
  border-color: #1f2b4d;
  color: #e5ecff;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #7b89a9;
}

body.theme-dark input:focus,
body.theme-dark textarea:focus {
  border-color: #5b8dff;
  box-shadow: 0 0 0 4px rgba(91, 141, 255, 0.25);
}

body.theme-dark .btn {
  background: rgba(67, 91, 151, 0.35);
  color: #f0f4ff;
  border-color: rgba(94, 128, 199, 0.5);
}

body.theme-dark .btn:hover {
  background: rgba(94, 128, 199, 0.6);
  border-color: rgba(104, 159, 255, 0.6);
}

body.theme-dark .btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #3b82f6;
}

body.theme-dark .btn.primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

body.theme-dark .chat-window,
body.theme-dark .composer {
  background: #0a1020;
  border-color: #1c2742;
  box-shadow: 0 10px 24px rgba(5, 16, 40, 0.45);
}

body.theme-dark .chat-header {
  color: #e5ecff;
}

body.theme-dark .message.assistant .bubble {
  background: rgba(56, 73, 122, 0.38);
  border: 1px solid rgba(99, 125, 200, 0.45);
  color: #d6def6;
  box-shadow: 0 6px 18px rgba(16, 26, 54, 0.4);
}

body.theme-dark .message.assistant.error .bubble {
  background: rgba(148, 0, 54, 0.55);
  border-color: rgba(244, 63, 94, 0.75);
  color: #ffe4ee;
}

body.theme-dark .message.user .bubble {
  background: linear-gradient(135deg, rgba(37, 104, 255, 0.95), rgba(65, 180, 255, 0.85));
  border-color: rgba(96, 165, 255, 0.9);
  color: white;
}

body.theme-dark .message-meta {
  color: #94a3c8;
}

body.theme-dark .message-meta a {
  color: #93c5fd;
}

body.theme-dark .composer textarea {
  background: #0b1224;
  border-color: #24304f;
}

body.theme-dark .composer-input .send-icon {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.45);
}

body.theme-dark .composer-input .send-icon:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

body.theme-dark .composer-input .send-icon img {
  filter: brightness(0) invert(1);
}

body.theme-dark .header-actions .chat-action {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  color: #f8fbff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.45);
}

body.theme-dark .header-actions .chat-action:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.5);
}

body.theme-dark .header-actions .chat-action:active {
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.38);
}

body.theme-dark .header-actions .chat-action img {
  filter: brightness(0) invert(1);
}

body.theme-dark .bubble.siri-loading {
  background: #ffffff;
  color: #000000;
  box-shadow:
    0 0 14px rgba(59, 130, 246, 0.35),
    0 0 24px rgba(45, 212, 191, 0.25);
}

body.theme-dark .bubble.siri-loading::after {
  background:
    linear-gradient(#ffffff, #ffffff) content-box,
    linear-gradient(120deg,
      rgba(255, 60, 172, 0.7),
      rgba(86, 43, 124, 0.65),
      rgba(43, 134, 197, 0.65),
      rgba(43, 217, 197, 0.65),
      rgba(43, 197, 98, 0.65),
      rgba(197, 177, 43, 0.65),
      rgba(255, 60, 172, 0.7)) border-box;
  background-size: 260% 260%;
  background-position: 0% 50%;
  background-origin: border-box;
  background-clip: content-box, border-box;
  opacity: 0.82;
  filter: saturate(1.35);
}

body.theme-dark .bubble.siri-loading .siri-loading-text {
  color: #000000;
}

body.theme-dark .message .bubble {
  backdrop-filter: blur(6px);
}

body.theme-dark .row,
body.theme-dark .rowi,
body.theme-dark .two-col,
body.theme-dark .preview {
  color: #dbe5ff;
}

body.theme-dark .preview {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(57, 74, 120, 0.45);
}

body.theme-dark .task-form-card {
  border-color: rgba(99, 125, 200, 0.45);
  background: rgba(56, 73, 122, 0.38);
  color: #d6def6;
  box-shadow: 0 6px 18px rgba(16, 26, 54, 0.4);
}

body.theme-dark .task-form-note {
  color: #b8c5e2;
}

body.theme-dark .task-form-requirement {
  color: #fb7185;
}

body.theme-dark .task-form-validation-summary {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(127, 29, 29, 0.28);
  color: #fecdd3;
}

body.theme-dark .task-form-control {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #111827;
  color-scheme: light;
}

body.theme-dark .task-form-field.is-invalid .task-form-control {
  border-color: #fb7185;
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.2);
}

body.theme-dark .task-form-error {
  color: #fda4af;
}

body.theme-dark .task-form-cancel {
  border-color: #52617f;
  background: #17223a;
  color: #e5edff;
}
