:root {
  --bg: #edf4fb;
  --surface: rgba(255,255,255,0.86);
  --surface-strong: #ffffff;
  --primary: #1d4ed8;
  --primary-dark: #143a9d;
  --primary-soft: #dbeafe;
  --accent: #0f766e;
  --text: #0f172a;
  --muted: #5b6b84;
  --border: rgba(148, 163, 184, 0.25);
  --shadow: 0 30px 60px rgba(37, 99, 235, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --chat-bg: #f8fafc;
  --input-bg: rgba(255,255,255,0.94);
  --table-hover: rgba(148,163,184,0.08);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: rgba(30, 41, 59, 0.92);
  --surface-strong: #1e293b;
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.15);
  --accent: #14b8a6;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(71, 85, 105, 0.5);
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  --chat-bg: #1e293b;
  --input-bg: rgba(30, 41, 59, 0.95);
  --table-hover: rgba(71, 85, 105, 0.2);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96,165,250,0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(14,165,233,0.14), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 48%, #eef5fb 100%);
}

.svm-shell { min-height: 100vh; }
.svm-navbar {
  background: linear-gradient(135deg, rgba(16,36,94,0.96), rgba(29,78,216,0.88));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff !important;
}
.navbar-brand small { display: block; opacity: 0.8; font-size: 0.74rem; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; background: rgba(255,255,255,0.14);
}
.doctor-pill {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff; padding: 0.7rem 1rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 0.55rem;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 3rem 0;
}
.hero-panel {
  background: linear-gradient(135deg, rgba(9, 35, 92, 0.92), rgba(29, 78, 216, 0.82));
  color: #fff;
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-panel::after {
  content: '';
  position: absolute;
  inset: auto -60px -80px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 68%);
}
.hero-panel h1 { font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 800; line-height: 1.05; margin: 1rem 0 1.25rem; }
.hero-panel p { color: rgba(255,255,255,0.86); max-width: 62ch; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.95rem;
  border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.16);
  font-size: 0.92rem; font-weight: 600;
}
.hero-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.hero-grid article {
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  padding: 1.15rem;
}
.hero-grid i { font-size: 1.25rem; margin-bottom: 0.75rem; }
.hero-grid strong { display: block; margin-bottom: 0.35rem; }
.hero-grid span { font-size: 0.92rem; color: rgba(255,255,255,0.82); }

.auth-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.auth-card.large { padding: 2.3rem; }
.auth-card-head h2 { font-weight: 800; margin-bottom: 0.4rem; }
.auth-card-head p { color: var(--muted); margin-bottom: 1.4rem; }
.demo-box {
  margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 18px;
  background: linear-gradient(135deg, rgba(219,234,254,0.92), rgba(224,242,254,0.92));
  border: 1px solid rgba(37,99,235,0.12);
}
.demo-box span { display: block; color: var(--muted); margin-top: 0.35rem; font-size: 0.95rem; }

.form-control, .form-select {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.28);
  background: rgba(255,255,255,0.94);
  padding: 0.85rem 1rem;
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}
.form-label { font-weight: 600; color: var(--text); }
.btn {
  border-radius: 16px;
  font-weight: 600;
  padding: 0.85rem 1.2rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563eb 70%, #3b82f6);
  border: none;
  box-shadow: 0 18px 32px rgba(29,78,216,0.20);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.btn-outline-primary { border-color: rgba(29,78,216,0.35); color: var(--primary); }
.btn-outline-primary:hover { background: rgba(29,78,216,0.08); color: var(--primary); border-color: rgba(29,78,216,0.5); }
.btn-outline-light:hover { color: var(--primary-dark); }
.btn-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: var(--primary-dark); }

.dashboard-screen { padding-top: 1.5rem; }
.dashboard-hero {
  background: linear-gradient(135deg, rgba(22, 78, 216, 0.96), rgba(8, 145, 178, 0.92));
  color: white; border-radius: 30px; padding: 2rem 2.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.dashboard-hero h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; margin: 0.5rem 0; }
.dashboard-hero p { max-width: 62ch; color: rgba(255,255,255,0.88); margin-bottom: 0; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.6rem 0;
}
.stat-card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 24px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 20px 40px rgba(15,23,42,0.07);
}
.stat-card span { color: var(--muted); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card strong { display: block; font-size: 2rem; margin: 0.35rem 0; }
.stat-card small { color: var(--muted); }

.glass-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: 0 24px 45px rgba(15,23,42,0.08);
  backdrop-filter: blur(18px);
}
.sticky-panel {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.3) transparent;
}
.sticky-panel::-webkit-scrollbar {
  width: 6px;
}
.sticky-panel::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.3);
  border-radius: 3px;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.2rem;
}
.section-head[role="button"]:hover .laudario-toggle {
  background: rgba(29,78,216,0.18);
  transform: scale(1.08);
}
.laudario-toggle {
  transition: transform 0.3s ease, background 0.2s ease;
}
.section-head[aria-expanded="true"] .laudario-toggle {
  transform: rotate(0deg);
}
.section-head[aria-expanded="false"] .laudario-toggle {
  transform: rotate(-12deg);
}
.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-head h3 { margin: 0.2rem 0 0; font-size: 1.3rem; font-weight: 750; }
.section-icon {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  color: var(--primary); background: rgba(219,234,254,0.8);
}
.toolbar-inline { display: flex; align-items: center; gap: 0.75rem; }

.voice-avatar { position: relative; display: flex; justify-content: center; margin: 1.25rem 0 0.6rem; }
.pulse-ring {
  position: absolute; width: 116px; height: 116px; border-radius: 999px;
  background: radial-gradient(circle, rgba(59,130,246,0.20), transparent 70%);
  animation: ringPulse 2s ease-in-out infinite;
}
.voice-main-btn {
  width: 82px; height: 82px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: white; font-size: 1.6rem; box-shadow: 0 18px 35px rgba(29,78,216,0.30);
  position: relative; z-index: 2;
}
.voice-main-btn.is-recording, .voice-main-btn:hover { transform: translateY(-2px); }
.voice-status {
  display: flex; align-items: center; gap: 0.65rem; min-height: 56px;
  border-radius: 18px; padding: 0.85rem 1rem; font-weight: 600;
}
.voice-status.info { background: rgba(219,234,254,0.85); color: #1d4ed8; }
.voice-status.success { background: rgba(220,252,231,0.9); color: #15803d; }
.voice-status.warning { background: rgba(254,249,195,0.95); color: #a16207; }
.voice-status.danger { background: rgba(254,226,226,0.95); color: #b91c1c; }
.status-dot { width: 10px; height: 10px; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 5px rgba(255,255,255,0.42); }
.voice-preview, .live-transcript-box, .selected-patient-card, .template-preview-card, .import-note {
  background: rgba(248,250,252,0.92);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 18px;
  padding: 1rem;
}
.voice-preview { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.voice-preview span { font-size: 0.95rem; color: var(--muted); }
.live-transcript-box small { text-transform: uppercase; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.live-transcript-box p { margin: 0.45rem 0 0; min-height: 42px; color: var(--text); }
.command-list ul { padding-left: 1rem; margin-bottom: 0; }
.command-list li { color: var(--muted); margin-bottom: 0.45rem; }

.selected-patient-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.selected-patient-card h6 { margin-bottom: 0.25rem; }
.input-modern .btn { min-width: 52px; }
.template-row { display: flex; gap: 0.75rem; }
.template-preview-card pre {
  margin: 0.85rem 0 0;
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
  color: var(--muted);
  max-height: 180px;
  overflow: auto;
}
.report-textarea {
  min-height: 280px;
  border-radius: 20px;
  resize: vertical;
  font-family: 'IBM Plex Sans', 'Inter', sans-serif;
}
.phrase-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.phrase-bank { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.phrase-chip {
  border: 1px solid rgba(29,78,216,0.14);
  background: rgba(255,255,255,0.95);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: 0.18s ease;
}
.phrase-chip:hover { transform: translateY(-2px); border-color: rgba(29,78,216,0.36); box-shadow: 0 12px 22px rgba(37,99,235,0.10); }
.phrase-chip.conclusion { background: rgba(240,253,250,0.95); border-color: rgba(15,118,110,0.15); }

.import-log-item {
  display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.8rem; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid rgba(148,163,184,0.16);
}
.import-log-item strong { text-transform: uppercase; font-size: 0.82rem; }
.import-log-item small { grid-column: 1 / -1; color: var(--muted); }

.table.svm-table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}
.svm-table thead th {
  border-bottom: 1px solid rgba(148,163,184,0.24);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding-bottom: 0.9rem;
}
.svm-table tbody td { padding: 1rem 0.55rem; border-color: rgba(148,163,184,0.12); }
.status-badge, .priority {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 98px; padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700;
}
.status-badge.warning, .priority-urgente { background: rgba(254,249,195,0.95); color: #a16207; }
.status-badge.info, .priority-preferencial { background: rgba(224,242,254,0.95); color: #0369a1; }
.status-badge.primary { background: rgba(219,234,254,0.95); color: #1d4ed8; }
.status-badge.success { background: rgba(220,252,231,0.95); color: #15803d; }
.status-badge.muted, .priority-rotina { background: rgba(241,245,249,0.98); color: #475569; }
.report-preview-text {
  white-space: pre-wrap;
  background: rgba(248,250,252,0.9);
  border-radius: 18px;
  padding: 1rem;
  margin-bottom: 0;
  font-family: 'Inter', sans-serif;
}
.report-preview-meta { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.report-preview-meta > * {
  background: rgba(241,245,249,0.9);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}
.svm-floating-alert {
  top: 18px;
  right: 18px;
  z-index: 1089;
  max-width: 420px;
  border: none;
  border-radius: 18px;
  box-shadow: 0 18px 35px rgba(15,23,42,0.12);
}

@keyframes ringPulse {
  0%, 100% { transform: scale(0.98); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

@media (max-width: 1399px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .hero-grid, .phrase-groups { grid-template-columns: 1fr; }
  .dashboard-hero { flex-direction: column; align-items: flex-start; }
  .sticky-panel { position: static; }
}
@media (max-width: 767px) {
  .auth-screen { padding: 1.5rem 0; }
  .hero-panel, .auth-card, .glass-card, .dashboard-hero { padding: 1.3rem; border-radius: 22px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selected-patient-card, .voice-preview, .template-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 575px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-panel h1 { font-size: 2rem; }
}

/* Layout improvements */
.row.g-4 { --bs-gutter-y: 1.5rem; }

.glass-card .section-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148,163,184,0.15);
  margin-bottom: 1.2rem;
}

/* Voice panel compact */
.sticky-panel .voice-avatar {
  margin: 0.8rem 0 0.5rem;
}

.sticky-panel .voice-status {
  min-height: 48px;
  padding: 0.7rem 0.9rem;
}

.sticky-panel .command-list {
  margin-top: 0.8rem !important;
}

.sticky-panel .command-list ul {
  margin-bottom: 0;
  padding-left: 0.8rem;
}

/* Chat messages area */
#chatMessages {
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.3) transparent;
}

#chatMessages::-webkit-scrollbar {
  width: 6px;
}

#chatMessages::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.3);
  border-radius: 3px;
}

/* Phrase bank alignment */
.phrase-groups {
  gap: 1.5rem;
}

.phrase-groups > div {
  min-width: 0;
}

.phrase-bank {
  max-height: 150px;
  overflow-y: auto;
}

/* Worklist and integration cards alignment */
#worklistSection .glass-card {
  display: flex;
  flex-direction: column;
}

#worklistSection .table-responsive {
  flex: 1;
}

/* Report section */
.report-textarea {
  min-height: 180px;
  max-height: 250px;
}

/* Dashboard row spacing */
.dashboard-screen .row.g-4 {
  margin-top: 0.5rem !important;
}

/* Form compact */
#consultationForm .form-label {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

#consultationForm .form-control,
#consultationForm .form-select {
  min-height: 42px;
  padding: 0.5rem 0.8rem;
}

/* Template preview compact */
.template-preview-card {
  max-height: 100px;
  overflow-y: auto;
}

.template-preview-card pre {
  margin: 0;
  font-size: 0.78rem;
}

/* Responsive adjustments for medium screens */
@media (min-width: 992px) and (max-width: 1399px) {
  .col-xl-4 {
    flex: 0 0 auto;
    width: 35%;
  }
  .col-xl-8 {
    flex: 0 0 auto;
    width: 65%;
  }
}

@media (max-width: 991px) {
  .sticky-panel {
    position: static;
    max-height: none;
  }
}

/* ============================================
   MODO ESCURO
   ============================================ */
[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(20,184,166,0.06), transparent 26%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

[data-theme="dark"] .auth-card {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .glass-card {
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.4);
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .stat-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(71, 85, 105, 0.5);
  color: var(--text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--muted);
}

[data-theme="dark"] .voice-status.info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

[data-theme="dark"] .voice-status.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

[data-theme="dark"] .voice-status.warning {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

[data-theme="dark"] .voice-status.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

[data-theme="dark"] .live-transcript-box,
[data-theme="dark"] .selected-patient-card,
[data-theme="dark"] .template-preview-card,
[data-theme="dark"] .import-note {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] #chatMessages {
  background: rgba(15, 23, 42, 0.7) !important;
}

[data-theme="dark"] #chatMessages > div.bg-white {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(71, 85, 105, 0.4) !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] #chatMessages > div.bg-dark-subtle {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(71, 85, 105, 0.4) !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] #chatMessages > div.bg-dark-subtle .text-success {
  color: #5eead4 !important;
}

[data-theme="dark"] #chatMessages > div.bg-primary {
  background: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="dark"] #chatMessages > div.bg-primary .text-primary {
  color: #93c5fd !important;
}

[data-theme="dark"] .phrase-chip {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(71, 85, 105, 0.4);
  color: var(--text);
}

[data-theme="dark"] .phrase-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .phrase-chip.conclusion {
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.3);
}

[data-theme="dark"] .svm-table tbody td {
  border-color: rgba(71, 85, 105, 0.2);
}

[data-theme="dark"] .svm-table thead th {
  border-bottom-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .table-hover tbody tr:hover {
  background: rgba(71, 85, 105, 0.15);
}

[data-theme="dark"] .status-badge,
[data-theme="dark"] .priority {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .dashboard-hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(15, 118, 110, 0.9));
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .section-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

[data-theme="dark"] .btn-primary {
  box-shadow: 0 18px 32px rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .btn-outline-primary {
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

[data-theme="dark"] .btn-outline-primary:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.6);
}

[data-theme="dark"] .demo-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .report-textarea {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(71, 85, 105, 0.4);
  color: var(--text);
}

[data-theme="dark"] pre,
[data-theme="dark"] code {
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
}

[data-theme="dark"] .import-note {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .command-list li {
  color: #94a3b8;
}

[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.5);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.7);
}

/* ── Accordion – modo escuro global ────────────────── */
[data-theme="dark"] .accordion-item {
  background-color: rgba(30, 41, 59, 0.85);
  border-color: rgba(71, 85, 105, 0.4);
  color: var(--text);
}
[data-theme="dark"] .accordion-button {
  background-color: rgba(30, 41, 59, 0.92);
  color: var(--text);
  box-shadow: none;
  border-color: rgba(71, 85, 105, 0.35);
}
[data-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  box-shadow: none;
}
[data-theme="dark"] .accordion-button::after {
  filter: invert(1) brightness(1.6);
}
[data-theme="dark"] .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}
[data-theme="dark"] .accordion-body {
  background-color: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
}

/* ── File inputs – modo escuro global ──────────────── */
[data-theme="dark"] input[type="file"] {
  background-color: rgba(30, 41, 59, 0.7);
  border-color: rgba(71, 85, 105, 0.4);
  color: #94a3b8;
}
[data-theme="dark"] input[type="file"]::file-selector-button {
  background-color: rgba(51, 65, 85, 0.9);
  color: #e2e8f0;
  border-color: rgba(71, 85, 105, 0.5);
  border-right-color: rgba(71, 85, 105, 0.5);
}
[data-theme="dark"] input[type="file"]::file-selector-button:hover {
  background-color: rgba(71, 85, 105, 0.7);
}
