/* FlexNeur — Visual da referência para o modal de Configurações (design-configuracoes.jpg)
   Preserva todos os IDs, classes, options, textos do catálogo e tema claro. */

html:not([data-theme="light"]) #settings-modal.dialog-overlay {
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(8px);
}

html:not([data-theme="light"]) #settings-modal .settings-container {
  background: #0B0D12;
  border: 1px solid rgba(142, 155, 149, 0.22);
  border-radius: 16px;
  color: #F3F5F4;
}

#settings-modal .settings-dialog {
  width: min(95vw, 1080px);
  max-width: calc(100vw - 32px);
  height: min(92vh, 840px);
  max-height: calc(100dvh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#settings-modal .settings-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#settings-modal .settings-content {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden;
  pointer-events: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.55) transparent;
}

/* Lateral esquerda */
#settings-modal .settings-nav,
html:not([data-theme="light"]) #settings-modal .settings-nav {
  width: 252px;
  min-width: 252px;
  flex-basis: 252px;
  flex-shrink: 0;
}

html:not([data-theme="light"]) #settings-modal .settings-nav {
  background: #11141C;
  border-right: 1px solid rgba(142, 155, 149, 0.16);
}

#settings-modal .settings-nav-btn {
  min-height: 46px;
  height: auto;
  padding: 11px 16px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 500;
  white-space: normal;
  line-height: 1.25;
  text-align: left;
}

#settings-modal .settings-nav-btn > svg,
#settings-modal .settings-nav-btn > span:first-child {
  flex-shrink: 0;
}

#settings-modal .settings-nav-btn[hidden],
#settings-tab-admin-usage[hidden] {
  display: none !important;
}

html:not([data-theme="light"]) #settings-modal .settings-nav-btn {
  color: #D5DDD9;
}

html:not([data-theme="light"]) #settings-modal .settings-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

html:not([data-theme="light"]) #settings-modal .settings-nav-btn[aria-selected="true"] {
  background: #172536;
  border: 1px solid #3D8B6E;
  color: #FFFFFF;
  font-weight: 600;
}

html[data-theme="light"] #settings-modal .settings-nav-btn[aria-selected="true"] {
  background: #DCF5EA;
  border: 1px solid #0891B2;
  color: #0B1F19;
  font-weight: 600;
}

html:not([data-theme="light"]) #settings-modal .settings-nav-section-label {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8E9B95;
}

html:not([data-theme="light"]) #settings-modal .settings-sign-out {
  color: #C86D51;
}

/* Cabeçalho da área direita */
html:not([data-theme="light"]) #settings-modal .settings-content-heading {
  border-bottom: 1px solid rgba(142, 155, 149, 0.16);
}

#settings-modal #settings-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

#settings-modal .settings-content-heading .dialog-text,
#settings-modal .settings-section-title,
#settings-modal .dialog-text {
  font-size: 14px;
}

html:not([data-theme="light"]) #settings-modal .settings-content-heading .dialog-text,
html:not([data-theme="light"]) #settings-modal .settings-tab-panel > .dialog-text {
  color: #8E9B95;
}

#settings-modal #btn-settings-close {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

html:not([data-theme="light"]) #settings-modal #btn-settings-close {
  background: #171F1C;
  border: 1px solid rgba(142, 155, 149, 0.22);
  color: #F3F5F4;
}

/* Cartões de configurações e selects >= 44px */
#settings-modal .settings-control-card {
  border-radius: 14px;
  padding: 18px;
}

html:not([data-theme="light"]) #settings-modal .settings-control-card {
  background: #171F1C;
  border: 1px solid rgba(142, 155, 149, 0.18);
}

#settings-modal .settings-control-copy strong {
  font-size: 16px;
}

#settings-modal .settings-control-copy p,
#settings-modal .memory-label,
#settings-modal .memory-status {
  font-size: 14px;
}

html:not([data-theme="light"]) #settings-modal .settings-control-copy p,
html:not([data-theme="light"]) #settings-modal .memory-status {
  color: #8E9B95;
}

#settings-modal select.dialog-input {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  font-size: 15px;
}

html:not([data-theme="light"]) #settings-modal select.dialog-input {
  background: #0B0D12;
  border: 1px solid rgba(142, 155, 149, 0.24);
  color: #F3F5F4;
}

/* Bloco de voz: select à esquerda e botão em pílula com ícone play via ::before à direita */
.settings-voice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.settings-voice-row select {
  flex: 1 1 auto;
  min-width: 0;
}

#btn-test-speech-voice {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

html:not([data-theme="light"]) #btn-test-speech-voice {
  background: rgba(27, 59, 49, 0.72);
  border: 1px solid #3D8B6E;
  color: #F3F5F4;
}

html:not([data-theme="light"]) #btn-test-speech-voice:hover:not(:disabled) {
  background: #172536;
  border-color: #22D3EE;
}

html[data-theme="light"] #btn-test-speech-voice {
  background: #EDF8F3;
  border: 1px solid #0891B2;
  color: #0B1F19;
}

#btn-test-speech-voice::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='6 3 20 12 6 21 6 3'/%3E%3C/svg%3E");
}

html[data-theme="light"] #btn-test-speech-voice::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23095C44' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='6 3 20 12 6 21 6 3'/%3E%3C/svg%3E");
}

@media (max-width: 640px) {
  #settings-modal .settings-nav {
    width: 100%;
    min-width: 0;
  }
  .settings-voice-row {
    flex-direction: column;
    align-items: stretch;
  }
}
