/* -----------------------------------
  1. Global Styles
----------------------------------- */

:root {
  /* Cores para o Modo Claro (padrão) */
  --background-color: #e8eaed;
  --text-color: #1d1d1f;
  --input-background: #f8f9fa;
  --input-border: #c0c4cc;
  --button-background: #0066cc;
  --button-text: #ffffff;
  --header-footer-background: #f8f9fa;
  --modal-background: #f8f9fa;
  --settings-menu-background: #f8f9fa;
  --feedback-background: #3F69FF;
  --feedback-text: #ffffff;
  --toggle-label-color: #1d1d1f;
  --search-input: #f8f9fa;
  --app-square: #f8f9fa;
  --app-square-icon: #3F69FF;
  --slider-activated: #0066cc;
  --slider-inactive: #c0c4cc;
  
  /* Cores adicionais para light mode */
  --card-background: #f8f9fa;
  --border-color: #d0d4db;
  --hover-background: #e1e4e8;
  --shadow-color: rgba(0, 0, 0, 0.12);
  --shadow-hover: rgba(0, 0, 0, 0.18);
}

html {
  scrollbar-gutter: stable;
}

body.dark-mode,
html.dark-mode {
  /* Cores para o Modo Escuro */
  --background-color: rgb(19, 20, 20);
  --text-color: #e2e2e2;
  --input-background: #212121;
  --input-border: #444444;
  --button-background: #01e6cd;
  --button-text: #1e1e1e;
  --header-footer-background: #2a2a2a;
  --modal-background: #2c2c2c;
  --settings-menu-background: #2a2a2a;
  --feedback-background: #01e6cd;
  --feedback-text: #1e1e1e;
  --toggle-label-color: #e2e2e2;
  --search-input: #212121;
  --app-square: #1e1e1e;
  --app-square-icon: #e2e2e2eb;
  --slider-activated: #01e6cd;
  --slider-inactive: #ccc;
  
  /* Cores adicionais para dark mode */
  --card-background: #2a2a2a;
  --border-color: rgba(255, 255, 255, 0.1);
  --hover-background: #333333;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(1, 230, 205, 0.2);
}


/* Global Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Body Styles */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden; /* Prevenir scroll horizontal */
  min-width: 264px;
  padding-top: 0; /* Inicialmente sem padding-top */
  transition: padding-top 0.3s ease; /* Adicione esta linha para a transição suave */
}

img {
  max-width: 100%;
  height: auto;
}

#logo {
  max-width: 42rem; /* 200px */
  padding-top: 1.5rem;
  height: auto;
  display: block;
  margin: auto;
}

/* Inputs e Selects dentro de .input-group */
.input-group input,
.input-group select,
.input-group textarea {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  width: 100%;
  padding: 0.75rem;
  background-color: var(--input-background);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  border-radius: 0.375rem;
  transition: border-color 0.3s ease;
  margin-bottom: 1rem;
  box-sizing: border-box; /* Garante que o padding esteja incluído na largura */
}

/* Estilos específicos para o select */
.input-group select {
  padding-left: 1rem; /* Espaço à esquerda */
  padding-right: 2rem; /* Espaço para a seta */
  appearance: none; /* Remove a seta padrão */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23e2e2e2" d="M7 10l5 5 5-5H7z"/></svg>'); /* Seta personalizada */
  background-repeat: no-repeat;
  background-position: right 0.75rem center; /* Posiciona a seta */
  background-size: 1rem; /* Tamanho da seta */
  cursor: pointer; /* Indica que é clicável */
}

/* Estilos para o seletor de data */
.date-input-container {
  position: relative; /* Necessário para posicionar o ícone dentro */
  width: 100%; /* Evita colapso em telas estreitas */
}

/* Estilos para o seletor de data */
.date-input-container input[type="date"] {
  padding-right: 2.5rem; /* Espaço para o ícone personalizado */
  appearance: none; /* Remove o ícone nativo em alguns navegadores */
  -webkit-appearance: none; /* Garante consistência no iOS */
  width: 100%; /* Mantém largura total em mobile */
  min-height: 3rem; /* Evita altura mínima muito pequena */
  display: block; /* Evita comportamento inline em navegadores móveis */
  flex: 1 1 auto; /* Respeita containers flexíveis */
  color: rgba(29, 29, 31, 0.6); /* Cor do texto no modo claro */
  border: 1px solid var(--input-border); /* Garante que a borda esteja alinhada */
  border-radius: 0.375rem; /* Bordas arredondadas */
}

/* Estilos para o seletor de data no modo escuro */
body.dark-mode .date-input-container input[type="date"] {
  color: rgba(226, 226, 226, 0.6); /* Cor do texto no modo escuro */
  border: 1px solid #444; /* Borda para modo escuro */
}

/* Estilos para o seletor de data */
.date-input-container input[type="date"]:active,
.date-input-container input[type="date"]:focus {
  color: var(--text-color); /* Cor do texto ao focar */

}

/* Ocultar o ícone de calendário nativo no Chrome, Safari, Edge */
.date-input-container input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

/* Ocultar o ícone de calendário nativo no Firefox */
.date-input-container input[type="date"]::-moz-calendar-picker-indicator {
  display: none;
}


/* Adicionar o ícone de calendário personalizado */
.calendar-icon {
  position: absolute;
  top: 50%;
  right: 0.75rem; /* Ajuste conforme necessário */
  transform: translateY(-92%);
  color: var(--text-color); /* Cor que se adapta ao modo */
  pointer-events: none; /* Faz com que o ícone não capture cliques */
  font-size: 1rem; /* Tamanho do ícone */
}

/* Opcional: Ajustes adicionais para labels */
.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e2e2e2;
  font-size: 1rem;
}

/* Classes específicas para ocultar elementos */
.hidden-ultrassom {
  display: none !important;
}

/* Estilos para foco nos inputs e selects */
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: #01e6cd;
  outline: none;
}

/* Estilos para foco nos inputs e selects */
.input-group input:hover,
.input-group select:hover,
.input-group textarea:hover {
  border-color: #01e6cd;
  outline: none;
}


/* Opcional: Ajustes para .flex-container dentro de .input-group */
.flex-container {
  display: flex;
  gap: 1rem;
}

.flex-container div {
  flex: 1;
}


/* Modais */
.modal-title {
  font-weight: bold;
  font-size: 1.5rem;
  padding-bottom: 1.5rem;
}

/* -----------------------------------
  2. Font Faces
----------------------------------- */
@font-face {
  font-family: "LEMONMILK";
  src: url("fonts/LEMONMILK-Regular.woff2") format("woff2"),
    url("fonts/LEMONMILK-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "LEMONMILK";
  src: url("fonts/LEMONMILK-Bold.woff2") format("woff2"),
    url("fonts/LEMONMILK-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "LEMONMILK";
  src: url("fonts/LEMONMILK-Light.woff2") format("woff2"),
    url("fonts/LEMONMILK-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "LEMONMILK";
  src: url("fonts/LEMONMILK-Medium.woff2") format("woff2"),
    url("fonts/LEMONMILK-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
}

/* -----------------------------------
  3. Header
----------------------------------- */
header {
  text-align: center;
  padding: 3.125rem 1.25rem;
  position: relative; /* Para posicionar o botão de configurações */
}
#header-buttons {
  position: fixed; /* Alterado de absolute para fixed */
  top: 1rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1003;
  transition: top 0.3s ease; /* Adicionada transição suave */
}

/* -----------------------------------
  4. Hamburger Menu Styles
----------------------------------- */
#settings-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem; /* Consolidated padding */
  margin: 0;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  top: 1rem;
  left: 1rem;
  transition: top 0.3s ease; /* Transição suave */
  z-index: 1003;
  transition: left 0.3s ease; /* Smooth movement */
}

#settings-button .bar {
  width: 30px; /* Consolidated width */
  height: 1.5px; /* Consolidated height */
  background-color: #1d1d1f;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}

body.dark-mode #settings-button .bar {
  background-color: #e2e2e2;
}

/* Animation for the 'change' class */
#settings-button.change .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#settings-button.change .bar:nth-child(2) {
  opacity: 0;
}

#settings-button.change .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

#settings-button.menu-open {
  left: 310px; 
}

/* -----------------------------------
  5. Settings Menu
----------------------------------- */
#settings-menu {
  position: fixed;
  top: 0;
  left: -300px; 
  width: 300px;
  height: 100%;
  background-color: var(--settings-menu-background);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
  transition: left 0.3s ease;
  z-index: 1005;
  display: flex;
  flex-direction: column;
  padding-top: 0px; 
}

#settings-menu.open {
  left: 0;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid #444;
}

.settings-header h2 {
  margin: 0;
  font-size: 1.25rem; /* 20px */
}

.settings-content {
  padding: 1.25rem;
  padding-bottom: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  scrollbar-gutter: stable;
}

.settings-content::-webkit-scrollbar {
  width: 6px;
}

.settings-content::-webkit-scrollbar-track {
  background: transparent;
}

.settings-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.settings-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.15rem;
}

.settings-section-header--collapsible {
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--toggle-label-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-collapsible {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-collapsible + .settings-collapsible {
  margin-top: 0.75rem;
}

.settings-collapsible:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.25rem;
}

.settings-collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1;
  padding: 0.35rem 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.settings-collapsible-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.settings-collapsible-icon {
  font-size: 1.25rem;
  color: var(--toggle-label-color);
  transition: transform 0.2s ease;
}

.settings-collapsible-trigger[aria-expanded="false"] .settings-collapsible-icon {
  transform: rotate(-90deg);
}

.settings-collapsible-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.settings-collapsible-content.is-collapsed {
  display: none !important;
}

.setting-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.setting-option:hover,
.setting-option:focus-within {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.setting-option--cta {
  padding: 0;
  background: none;
  border: none;
}

.setting-option--cta:hover,
.setting-option--cta:focus-within {
  background: none;
  border: none;
  box-shadow: none;
}

.setting-option--cta .subscription-button {
  width: 100%;
}

.setting-option--clickable {
  cursor: pointer;
}

.setting-option--clickable:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}


.setting-option__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.setting-option__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.35;
}

.setting-option__description {
  font-size: 0.75rem;
  color: var(--toggle-label-color);
  opacity: 0.85;
}

.setting-option__control {
  margin-left: auto;
  margin-right: 0;
}

.setting-option__control.switch {
  --switch-width: 48px;
  --switch-height: 26px;
  --switch-knob-size: 18px;
  --switch-knob-offset: 4px;
  width: var(--switch-width);
  height: var(--switch-height);
  margin-right: 0;
}

.setting-option__control .slider {
  border-radius: 26px;
}

.settings-preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem;
}

@media (max-width: 540px) {
  .settings-preferences-grid {
    grid-template-columns: 1fr;
  }
}

.chat-history-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat-history-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--toggle-label-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-history-new {
  display: none;
}

.chat-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.25rem;
}

.chat-history-item,
.chat-quick-actions-manager__item {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.chat-history-item:hover,
.chat-history-item:focus-visible,
.chat-quick-actions-manager__item:hover,
.chat-quick-actions-manager__item:focus-visible {
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
}

.chat-history-item.is-active,
.chat-quick-actions-manager__item.is-active {
  background-color: rgba(0, 0, 0, 0.08);
}

body.dark-mode .chat-history-item:hover,
body.dark-mode .chat-history-item:focus-visible,
body.dark-mode .chat-quick-actions-manager__item:hover,
body.dark-mode .chat-quick-actions-manager__item:focus-visible {
  background-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .chat-history-item.is-active,
body.dark-mode .chat-quick-actions-manager__item.is-active {
  background-color: rgba(255, 255, 255, 0.09);
}

.chat-history-item-info,
.chat-quick-actions-manager__item-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.chat-history-item-title,
.chat-quick-actions-manager__item-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

body.dark-mode .chat-history-item-title,
body.dark-mode .chat-quick-actions-manager__item-title {
  color: rgba(255, 255, 255, 0.92);
}

.chat-history-item-meta {
  display: none; /* ocultamos a data abaixo de Conversas */
}

.chat-history-item-menu-container,
.chat-quick-actions-manager__item-menu-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-history-item-menu,
.chat-quick-actions-manager__item-menu {
  background: none;
  border: none;
  color: #6b7280;
  padding: 0.2rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  opacity: 0;
  flex-shrink: 0;
}

body.dark-mode .chat-history-item-menu,
body.dark-mode .chat-quick-actions-manager__item-menu {
  color: rgba(255, 255, 255, 0.45);
}

.chat-history-item-menu .material-icons,
.chat-quick-actions-manager__item-menu .material-icons {
  font-size: 18px;
}

.chat-history-item-menu:hover,
.chat-history-item-menu:focus-visible,
.chat-quick-actions-manager__item-menu:hover,
.chat-quick-actions-manager__item-menu:focus-visible {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.05);
  outline: none;
  opacity: 1;
  pointer-events: auto;
}

body.dark-mode .chat-history-item-menu:hover,
body.dark-mode .chat-history-item-menu:focus-visible,
body.dark-mode .chat-quick-actions-manager__item-menu:hover,
body.dark-mode .chat-quick-actions-manager__item-menu:focus-visible {
  color: #ffffff;
  background: none;
}

.chat-history-item-menu[aria-expanded="true"],
.chat-quick-actions-manager__item-menu[aria-expanded="true"] {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.08);
  opacity: 1;
  pointer-events: auto;
}

body.dark-mode .chat-history-item-menu[aria-expanded="true"],
body.dark-mode .chat-quick-actions-manager__item-menu[aria-expanded="true"] {
  color: #ffffff;
  background: none;
}

.chat-history-item:hover .chat-history-item-menu,
.chat-history-item:focus-within .chat-history-item-menu,
.chat-quick-actions-manager__item:hover .chat-quick-actions-manager__item-menu,
.chat-quick-actions-manager__item:focus-within .chat-quick-actions-manager__item-menu {
  opacity: 1;
  pointer-events: auto;
}

.chat-history-item-menu-options,
.chat-quick-actions-manager__item-menu-options {
  position: absolute;
  top: calc(100% + 0.2rem);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  border-radius: 0.5rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  padding: 0.3rem 0;
  display: none;
  flex-direction: column;
  z-index: 20;
}

body.dark-mode .chat-history-item-menu-options,
body.dark-mode .chat-quick-actions-manager__item-menu-options {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.chat-history-item-menu-options.is-open,
.chat-quick-actions-manager__item-menu-options.is-open {
  display: flex;
}

.chat-history-item-menu-option,
.chat-quick-actions-manager__item-menu-option {
  background: none;
  border: none;
  color: #1d1d1f;
  font-size: 0.78rem;
  padding: 0.45rem 0.9rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

body.dark-mode .chat-history-item-menu-option,
body.dark-mode .chat-quick-actions-manager__item-menu-option {
  color: rgba(255, 255, 255, 0.85);
}

.chat-history-item-menu-option .material-icons,
.chat-quick-actions-manager__item-menu-option .material-icons {
  font-size: 16px;
  opacity: 0.6;
}

.chat-history-item-menu-option:hover,
.chat-history-item-menu-option:focus-visible,
.chat-quick-actions-manager__item-menu-option:hover,
.chat-quick-actions-manager__item-menu-option:focus-visible {
  background-color: #f5f5f7;
  color: #1d1d1f;
  outline: none;
}

body.dark-mode .chat-history-item-menu-option:hover,
body.dark-mode .chat-history-item-menu-option:focus-visible,
body.dark-mode .chat-quick-actions-manager__item-menu-option:hover,
body.dark-mode .chat-quick-actions-manager__item-menu-option:focus-visible {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 1);
}

.chat-history-item-menu-option--danger,
.chat-quick-actions-manager__item-menu-option--danger {
  color: #ff8a8a;
}

.chat-history-item-menu-option--danger .material-icons,
.chat-quick-actions-manager__item-menu-option--danger .material-icons {
  opacity: 0.75;
}

.chat-history-item-menu-option--danger:hover,
.chat-history-item-menu-option--danger:focus-visible,
.chat-quick-actions-manager__item-menu-option--danger:hover,
.chat-quick-actions-manager__item-menu-option--danger:focus-visible {
  color: #ffb0b0;
  background: rgba(255, 138, 138, 0.12);
}

.chat-history-empty {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 1rem 0;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: none;
}

.chat-quick-actions-manager {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-quick-actions-manager__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat-quick-actions-manager__title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--toggle-label-color);
}

.chat-quick-actions-manager__add {
  display: none;
}

.chat-quick-actions-manager__hint {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0;
}

body.dark-mode .chat-quick-actions-manager__hint {
  color: rgba(255, 255, 255, 0.55);
}

.chat-quick-actions-manager__empty {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.75rem;
  border: 1px dashed #d2d2d7;
  border-radius: 8px;
  display: none;
}

body.dark-mode .chat-quick-actions-manager__empty {
  color: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.chat-quick-actions-manager__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-quick-actions-manager__item-description {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .chat-quick-actions-manager__item-description {
  color: rgba(255, 255, 255, 0.58);
}


.chat-quick-actions-manager__form {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  background: #f5f5f7;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  padding: 1rem;
}

body.dark-mode .chat-quick-actions-manager__form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-quick-actions-manager__form.is-visible {
  display: flex;
}

.chat-quick-actions-manager__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-quick-actions-manager__field label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.chat-quick-actions-manager__field input,
.chat-quick-actions-manager__field textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
}

.chat-quick-actions-manager__field input:focus,
.chat-quick-actions-manager__field textarea:focus {
  outline: none;
  border-color: rgba(1, 230, 205, 0.65);
}

.chat-quick-actions-manager__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.chat-quick-actions-manager__cancel,
.chat-quick-actions-manager__submit {
  min-width: 96px;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-quick-actions-manager__cancel {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
}

.chat-quick-actions-manager__cancel:hover,
.chat-quick-actions-manager__cancel:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.chat-quick-actions-manager__submit {
  background: #01e6cd;
  border: 1px solid #01ccb7;
  color: #051515;
  font-weight: 600;
}

.chat-quick-actions-manager__submit:hover,
.chat-quick-actions-manager__submit:focus-visible {
  background: #00d1ba;
  border-color: #00b9a6;
  outline: none;
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  --switch-width: 60px;
  --switch-height: 34px;
  --switch-knob-size: 26px;
  --switch-knob-offset: 4px;
  width: var(--switch-width);
  height: var(--switch-height);
  margin-right: 1rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slider-inactive);
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: var(--switch-knob-size);
  width: var(--switch-knob-size);
  left: var(--switch-knob-offset);
  top: 50%;
  transform: translateY(-50%);
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--slider-activated); 
}

.switch input:focus + .slider {
  box-shadow: 0 0 1px var(--slider-activated);
}

.switch input:checked + .slider:before {
  left: calc(100% - var(--switch-knob-size) - var(--switch-knob-offset));
  transform: translateY(-50%);
}

/* -----------------------------------
  6. Overlay
----------------------------------- */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

#overlay.active {
  opacity: 1;
  visibility: visible;
}

/* -----------------------------------
  7. Search Container
----------------------------------- */
.search-container {
  position: relative;
  width: 90%;
  max-width: 50rem;
  margin: -1rem auto 3rem auto;
  text-align: center;
  border-radius: 20px; /* align container corners with neon and input */
}

.search-container::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  left: -1px;
  background: linear-gradient(45deg, #5df3d3 30%, #3beaff 40%, #6606cc 95%, #2b2a2a 100%);
  background-size: 300% 300%;
  z-index: -1;
  border-radius: 20px; /* fixed rounded corners ~20px */
  animation: glowing 12s linear infinite;
}

@keyframes glowing {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Animação de fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Classe para aplicar a animação */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Adicionar animação de Fade-Out */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.fade-out {
  animation: fadeOut 0.2s ease-out forwards;
}

#search-input {
  width: 100%;
  font-size: 1rem;
  padding: 0.875rem 6rem 0.875rem 1.25rem;
  background-color: var(--search-input);
  border: none;
  color: #1d1d1f;
  border-radius: 20px; /* fixed rounded corners ~20px */
  text-align: center;
}

body.dark-mode #search-input {
  color: #e0e0e0;
}

#search-input:hover,
#search-input:active,
#search-input:focus,
#search-input.active {
  outline: none;
}

/* 1) Defina a cor base do placeholder */
#search-input::placeholder {
  color: #6b7280;        /* tom discreto mas visível no light mode */
  opacity: 1;            /* garantir total controle via animação */
  animation: pulsePlaceholder 2.5s ease-in-out infinite;
}

body.dark-mode #search-input::placeholder {
  color: #7f7f7f;        /* tom mais discreto no dark mode */
}

/* 2) Keyframes para o pulso */
@keyframes pulsePlaceholder {
  0%, 100% {
    opacity: 0.6;        /* mais sutil */
  }
  50% {
    opacity: 1;          /* mais visível */
  }
}

/* 3) Na hora de digitar, até remove o pulso */
#search-input:focus::placeholder {
  animation: none;
  opacity: 0.4;          /* sumir mais rápido */
}

/* ===================== SUGESTÕES (Auto-complete) ===================== */
#suggestions {
  position: absolute;
  width: 100%;
  left: 0;
  top: calc(100% + 0.375rem);
  max-height: 20rem;
  z-index: 1001;
  border-radius: 0 0 1rem 1rem;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,245,247,0.98)) border-box;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04) inset;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  transition: opacity .28s cubic-bezier(.4,0,.2,1), transform .28s cubic-bezier(.4,0,.2,1), box-shadow .3s;
  pointer-events: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c5c5c5 transparent;
}

body.dark-mode #suggestions {
  background: linear-gradient(135deg, rgba(33,33,33,0.85), rgba(28,28,28,0.92)) border-box;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
  scrollbar-color: #3f3f3f transparent;
}

/* Container scrollável para os itens */
.suggestions-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* permite flex shrink */
}

#suggestions.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Scrollbar custom (WebKit) - aplicado ao container scrollável */
.suggestions-list::-webkit-scrollbar { width: 10px; }
.suggestions-list::-webkit-scrollbar-track { background: transparent; }
.suggestions-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg,#c5c5c5,#b0b0b0);
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.6);
}
body.dark-mode .suggestions-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg,#3b3b3b,#2a2a2a);
  border: 2px solid rgba(33,33,33,0.6);
}
.suggestions-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg,#a8a8a8,#909090); }
body.dark-mode .suggestions-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg,#4a4a4a,#333); }

.suggestion-item {
  position: relative;
  padding: .9rem 1rem .85rem 1rem;
  cursor: pointer;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  line-height: 1.15;
  color: var(--text-color);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 100%);
  transition: background .22s ease, color .2s ease, transform .25s ease;
  isolation: isolate;
}

.suggestion-item:not(.ai-suggestion-item) + .suggestion-item { border-top: 1px solid rgba(0,0,0,0.06); }
body.dark-mode .suggestion-item:not(.ai-suggestion-item) + .suggestion-item { border-top: 1px solid rgba(255,255,255,0.04); }

.suggestion-item:hover,
.suggestion-item:active,
.suggestion-item:focus,
.suggestion-item.active {
  background: linear-gradient(90deg, rgba(0,113,227,0.08) 0%, rgba(0,113,227,0.03) 100%);
  outline: none;
}

body.dark-mode .suggestion-item:hover,
body.dark-mode .suggestion-item:active,
body.dark-mode .suggestion-item:focus,
body.dark-mode .suggestion-item.active {
  background: linear-gradient(90deg, rgba(1,230,205,0.06) 0%, rgba(1,230,205,0.02) 100%);
}

.suggestion-item:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
body.dark-mode .suggestion-item:focus-visible { outline: 2px solid #01e6cd; outline-offset: 2px; }

.suggestion-item .suggestion-name { flex: 1; font-weight: 500; }
.suggestion-item .suggestion-meta { display: flex; align-items: center; gap: .4rem; }

/* Tag PRO */
.tag-pro {
  --pro-bg: linear-gradient(135deg,#00ffe6,#01b4ff 55%,#5f67ff);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .25rem .4rem .2rem;
  border-radius: .4rem;
  background: var(--pro-bg);
  color: #081b1f;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 3px 8px -2px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.4);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.tag-pro::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%,rgba(255,255,255,0.55),transparent 65%);
  mix-blend-mode: overlay;
  opacity: .35;
  pointer-events: none;
}

/* Highlight mark */
mark.hl-match {
  background: rgba(0,113,227,0.15);
  color: #1d1d1f;
  padding: 0 .1rem;
  border-radius: .2rem;
  font-weight: 500;
  box-shadow: 0 0 0 1px rgba(0,113,227,0.1);
}

body.dark-mode mark.hl-match {
  background: rgba(1,230,205,0.12);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(1,230,205,0.08);
}

/* Highlight mais sutil quando item está ativo */
.suggestion-item.active mark.hl-match,
.suggestion-item:hover mark.hl-match {
  background: rgba(0,113,227,0.1);
  box-shadow: 0 0 0 1px rgba(0,113,227,0.05);
}

body.dark-mode .suggestion-item.active mark.hl-match,
body.dark-mode .suggestion-item:hover mark.hl-match {
  background: rgba(1,230,205,0.08);
  box-shadow: 0 0 0 1px rgba(1,230,205,0.05);
}

/* Estados especiais */
.suggestion-item.subscriber-only { color: #0071e3; }
body.dark-mode .suggestion-item.subscriber-only { color: #01e6cd; }
.suggestion-item.disabled { pointer-events: none; opacity: .4; }

/* Seções (Recentes, Todas) */
.suggestions-section-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem .4rem;
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: .75;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.03);
}
body.dark-mode .suggestions-section-header {
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(0,0,0,0.1);
}
.suggestions-section-header:first-child { border-top: none; }
.suggestions-section-header .material-icons { font-size: .9rem; opacity: .6; }

/* Item recente */
.suggestion-item.recent-item {
  background: linear-gradient(90deg, rgba(0,113,227,0.03) 0%, rgba(0,113,227,0.01) 100%);
}
body.dark-mode .suggestion-item.recent-item {
  background: linear-gradient(90deg, rgba(1,230,205,0.02) 0%, rgba(1,230,205,0.01) 100%);
}

/* Indicador de recente */
.recent-indicator {
  display: flex;
  align-items: center;
  opacity: .5;
  transition: opacity .2s ease;
}
.recent-indicator .material-icons {
  font-size: .8rem;
  color: var(--text-secondary);
}
.suggestion-item:hover .recent-indicator,
.suggestion-item.active .recent-indicator {
  opacity: .8;
}

/* Contador discreto no final - fixo sem sobreposição */
.suggestions-counter {
  flex-shrink: 0;
  padding: .6rem 1rem .7rem;
  font-size: .65rem;
  color: var(--text-secondary);
  opacity: .6;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: linear-gradient(135deg, rgba(33,33,33,0.98), rgba(28,28,28,0.98));
  letter-spacing: .02em;
  font-weight: 500;
}

/* Ajustes mobile */
@media (max-width: 480px) {
  #suggestions { max-height: 70vh; border-radius: 0 0 .85rem .85rem; }
  .suggestion-item { padding: .85rem .85rem .75rem; font-size: .9rem; }
  .tag-pro { font-size: .55rem; }
}


/* Estilos para sugestão de IA quando não há resultados */
.ai-suggestion-item {
  padding: 1rem 1rem .95rem;
  cursor: pointer;
  border-radius: .9rem;
  margin: .55rem .65rem .65rem;
  background: linear-gradient(135deg,rgba(1,230,205,0.06), rgba(1,230,205,0.02));
  border: 1px solid rgba(1,230,205,0.18);
  transition: background .35s ease, transform .28s ease, border-color .35s, box-shadow .4s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px -4px rgba(1,230,205,0.25), 0 0 0 1px rgba(1,230,205,0.15) inset;
}

.ai-suggestion-item:hover,
.ai-suggestion-item.active {
  background: linear-gradient(135deg,rgba(1,230,205,0.16), rgba(1,230,205,0.05));
  border-color: #01e6cd;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(1,230,205,0.35), 0 0 0 1px rgba(1,230,205,0.3) inset;
}
.ai-suggestion-item:focus-visible { outline:2px solid #01e6cd; outline-offset:2px; }

.ai-suggestion-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-suggestion-item .material-icons {
  font-size: 1.5rem;
  color: #01e6cd;
  flex-shrink: 0;
}

.ai-suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.ai-suggestion-text strong {
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 600;
}

.ai-suggestion-text span {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Efeito sutil de shimmer */
.ai-suggestion-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(115deg,rgba(255,255,255,0.0) 0%,rgba(255,255,255,0.55) 50%,rgba(255,255,255,0) 100%);
  filter: blur(4px);
  opacity: .45;
  transform: skewX(-18deg);
  transition: left .9s cubic-bezier(.35,.01,.22,1);
}

.ai-suggestion-item:hover::before {
  left: 130%;
}

/* Estilos para o botão de adicionar doença */
#add-disease-button {
  background: none;
  border: none;
  color: var(--button-background);
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#add-disease-button .material-icons {
  font-size: 1.5rem;
}

#add-disease-button:hover,
#add-disease-button:focus {
  color: #01e6cd;
  outline: none;
}

#add-disease-button:active {
  color: #00b8a3;
}

#ai-generate-button {
  background: none;
  border: none;
  color: var(--button-background);
  cursor: pointer;
  position: absolute;
  right: 3.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ai-generate-button .material-icons {
  font-size: 1.5rem;
}

/* Animated gradient highlight when user typing */
/* Estado animado “mágico” com gradiente contínuo solicitado */
.ai-generate-active #ai-generate-button .material-icons {
  /* Cores e stops: #f8de8b 20%, #3beaff 30%, #e287fe 60%, #6606cc 100% */
  /* Paleta reforçada para maior destaque (substitui verde apagado por ciano vívido e adiciona highlight claro) */
  background: linear-gradient(115deg,
    #ffe48c 0%,      /* amarelo mais luminoso */
    #ffe48c 14%,
    #52f7ff 26%,     /* ciano vívido em vez do verde menos chamativo */
    #ffffff 33%,     /* flash suave de luz para reforçar contraste */
    #ff8dff 52%,     /* rosa mais saturado */
    #7a34ff 74%,     /* violeta vibrante */
    #ffe48c 100%     /* loop de volta ao amarelo luminoso */
  );
  background-size: 400% 400%; /* Área maior para variação mais rica */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: aiIcoFlow 6s ease-in-out infinite; /* ligeiramente mais rápido para sensação energética */
}

@keyframes aiIcoFlow {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 50% 0%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 100%; }
  100% { background-position: 0% 50%; }
}


#ai-generate-button:hover,
#ai-generate-button:focus {
  color: #01e6cd;
  outline: none;
}

#ai-generate-button:active {
  color: #00b8a3;
}

.add-section-button,
#add-section-button-existing {
  background: none; 
  border: none; 
  color: var(--button-background);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem; 
  border-radius: 50%; 
  transition: color 0.3s ease, transform 0.2s ease; 
}

.add-section-button:hover,
#add-section-button-existing:hover {
  color: #01e6cd; 
}

.add-section-button:focus,
#add-section-button-existing:focus {
  outline: none; 
  box-shadow: 0 0 0 2px #01e6cd; 
}

.add-section-button:active,
#add-section-button-existing:active {
  transform: scale(0.95); 
  color: #00b8a3; 
}

.add-section-container {
  display: flex;
  justify-content: center; 
  margin-top: 1rem;
}

.copy-box .remove-section-button {
  background: none;
  border: none;
  color: #939393;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: color 0.3s ease, transform 0.3s ease;
}

.copy-box .remove-section-button:hover,
.copy-box .remove-section-button:focus {
  color: #ff6b6b; 
  transform: scale(1.1);
}

.copy-box .remove-section-button:active {
  color: #ff4c4c;
  transform: scale(1);
}

.copy-icon {
  color: #939393;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  margin-left: 8px; /* Espaçamento entre o texto e o ícone */
}

.copy-icon:hover {
  color: #01e6cd;
  transform: scale(1.1);
}

.copy-icon:active {
  transform: scale(1);
}


.ig,
.due-date {
  cursor: pointer;
}

.ig:hover,
.due-date:hover {
  color: #01e6cd;
}


/* Botão de Remover Seção */
.remove-section-button {
  background: none;
  border: none;
  color: #939393;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem; 
  border-radius: 50%;
  transition: color 0.3s ease, transform 0.3s ease;
}

.remove-section-button:hover,
.remove-section-button:focus {
  color: #ff6b6b;
  transform: scale(1.1);
}

.remove-section-button:active {
  color: #ff4c4c;
  transform: scale(1);
}

.remove-section-button .material-icons {
  font-size: 1.5rem;
}

/* -----------------------------------
  8. Disease Content
----------------------------------- */
#disease-content {
  width: 90%;
  max-width: 50rem; /* 800px */
  margin: 0rem auto 1rem auto; /* 20px auto */
  padding-top: 0rem;
}

#disease-content:empty {
  display: none;
}

#disease-content h2 {
  font-family: "LEMONMILK", sans-serif;
  font-size: 1.5rem; /* 24px */
  font-weight: bold;
  font-style: italic;
  text-align: center;
  padding: 1rem 0rem 1rem;
}

/* Disease header container */
.disease-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Editable disease title */
.disease-title {
  font-family: "LEMONMILK", sans-serif;
  font-size: 1.5rem; /* 24px */
  font-weight: bold;
  font-style: italic;
  text-align: center;
  padding: 0.75rem 1rem;
  margin: 0;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: text;
  position: relative;
  border: 1px solid transparent;
  outline: none;
}

.disease-title:focus {
  border: 1px solid rgba(120, 120, 140, 0.4);
  background-color: rgba(120, 120, 140, 0.05);
  box-shadow: 0 0 0 1px rgba(120, 120, 140, 0.15);
}

.disease-title:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.disease-title.editing {
  background-color: rgba(120, 120, 140, 0.08);
  border-color: rgba(120, 120, 140, 0.5);
}

/* Remove the pencil icon for cleaner look */
.disease-title[contenteditable="true"]::after {
  display: none;
}

/* Subtle edit indicator on hover */
.disease-title[contenteditable="true"]:hover::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background-color: rgba(120, 120, 140, 0.8);
  border-radius: 50%;
  opacity: 0.6;
}



.section {
  position: relative;
  margin-bottom: 1.25rem; /* 20px */
  transition: all 0.3s ease;
}

/* Section header with title and collapse button */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 1rem;
  padding: 0.5rem 0;
}

.section-title {
  font-family: "LEMONMILK", sans-serif;
  font-size: 1.125rem; /* 18px */
  font-weight: 300;
  font-style: italic;
  text-align: center;
  margin: 0;
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: text;
  border: 1px solid transparent;
  position: relative;
  outline: none;
}

.section-title:focus {
  border: 1px solid rgba(120, 120, 140, 0.4);
  background-color: rgba(120, 120, 140, 0.05);
  box-shadow: 0 0 0 1px rgba(120, 120, 140, 0.15);
}

.section-title:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.section-title.editing {
  background-color: rgba(120, 120, 140, 0.08);
  border-color: rgba(120, 120, 140, 0.5);
}

/* Subtle edit indicator on hover for section titles */
.section-title[contenteditable="true"]:hover::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background-color: rgba(120, 120, 140, 0.8);
  border-radius: 50%;
  opacity: 0.6;
}

/* Collapse toggle button */
.collapse-toggle {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  opacity: 0.7;
}

.collapse-toggle:hover {
  color: #01e6cd;
  background-color: rgba(1, 230, 205, 0.1);
  opacity: 1;
}

.collapse-toggle .material-icons {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

/* Section content container */
.section-content {
  overflow: hidden;
  transition: all 0.25s ease;
}

.section-content.expanded {
  max-height: none;
  opacity: 1;
}

.section-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
}

/* Drag and Drop Styles */
.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: #8e8e8e;
  padding: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

body.dark-mode .drag-handle {
  color: #666;
}

.drag-handle:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #1d1d1f;
  opacity: 1;
}

body.dark-mode .drag-handle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e2e2e2;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle.hidden {
  display: none;
}

.section.draggable:hover .drag-handle {
  opacity: 0.8;
}

.section.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  z-index: 1000;
}

.drag-placeholder {
  height: 60px;
  margin: 0.5rem 0;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

body.dark-mode .drag-placeholder {
  border: 2px dashed #666666;
  background-color: rgba(255, 255, 255, 0.02);
}

.section.draggable {
  /* não indicar "mover" na seção inteira para permitir seleção de texto */
  transition: all 0.3s ease;
}

.section.draggable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
}

/* Drag mode - suavizar visual sem colapsar layout (evita "pulos" ao arrastar com scroll) */
.drag-mode .section .section-content {
  opacity: 0.35 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
}

.drag-mode .section .collapse-toggle {
  opacity: 0.3;
  pointer-events: none;
}

.drag-mode .section:not(.dragging) {
  opacity: 0.7;
}

.copy-box {
  position: relative; 
  background-color: #f5f5f7;
  padding: 1rem 2.5rem 1rem 1rem;
  border-radius: 0.75rem;
  overflow-wrap: break-word;
  min-height: 172px;
  user-select: text;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .copy-box {
  background-color: #212121;
  border: none;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; 
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.copy-box .edit-button {
  background: none;
  border: none;
  color: #939393;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: color 0.3s ease, transform 0.3s ease;
  margin-bottom: 0.25rem; 
}

/* Estilos para o botão de reset */
.copy-box .reset-button {
  position: relative; 
  background: none;
  border: none;
  color: #939393;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Hover e Active para ambos os botões */
.copy-box .edit-button:hover,
.copy-box .reset-button:hover,
.copy-box .copy-mode-toggle:hover {
  color: #01e6cd;
  transform: scale(1.1);
}

.copy-box .edit-button:active,
.copy-box .reset-button:active {
  transform: scale(1);
}

.copy-box .edit-button.disabled-edit-button {
  color: #939393;
  cursor: not-allowed;
  opacity: 0.6; 
}

.copy-box .edit-button.disabled-edit-button:hover {
  color: #939393;
  transform: none;
}

.copy-text {
  width: 100%;
  background-color: transparent;
  color: #1d1d1f;
  font-size: 0.9rem; 
  line-height: 1.5;
  white-space: pre-wrap;
  text-align: left;
  cursor: pointer;

  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none; /* For WebKit browsers */
  -ms-user-select: none; /* For IE and Edge */

  /* Improve touch interaction */
  touch-action: manipulation;
}

body.dark-mode .copy-text {
  color: #ffffffc9;
}

.copy-text:focus {
  outline: none;
}

.editable-token {
  color: #0071e3;
  cursor: pointer;
  border-bottom: 1px dashed #0071e3;
  padding: 0 2px;
  transition: background-color 0.2s ease;
}

body.dark-mode .editable-token {
  color: #01e6cd;
  border-bottom: 1px dashed #01e6cd;
}

.editable-token:hover {
  background-color: rgba(0, 113, 227, 0.15);
}

body.dark-mode .editable-token:hover {
  background-color: rgba(1, 230, 205, 0.15);
}
}

.editable-input {
  width: 8ch;
  font-size: inherit;
  padding: 2px 4px;
  margin: 0 2px;
  color: #01e6cd;
  background-color: #222;
  border: 1px solid #01e6cd;
  border-radius: 4px;
  text-align: center;
}

/* Estilo para o botão de alternância de modo de cópia */
.copy-mode-toggle {
  background: none;
  border: none;
  color: gray; /* Inativo por padrão */
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem; /* Espaço entre botões */
  transition: color 0.3s ease, transform 0.3s ease;
}

.copy-mode-toggle.active {
  color: var(--button-background);
}

.copy-mode-toggle .material-icons {
  font-size: 1.5rem;
}

/* Permitir seleção de texto quando o modo manual estiver ativo */
.copy-box.manual-copy-enabled .copy-text {
  user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
}

/* Caso queira também remover o cursor pointer (opcional) */
.copy-box.manual-copy-enabled .copy-text {
  cursor: text;
}


/* -----------------------------------
  9. Feedback Container
----------------------------------- */

/* Feedback Container - Desktop */
#feedback {
  position: fixed;
  display: flex;
  flex-direction: row; 
  align-items: center;
  flex-wrap: nowrap; 
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 10000;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: 90%; 
  box-sizing: border-box; 
  padding: 0.5rem;
}

/* Feedback Container - Mobile Devices */
@media (max-width: 600px) {
  /* 600px */
  #feedback {
    left: 50%; 
    right: auto;
    transform: translateX(-50%) translateY(20px); 
    padding: 0.5rem;
    align-items: center;
  }
}

/* Feedback Container Show State */
#feedback.show {
  opacity: 1;
  transform: translateY(0); 
  pointer-events: auto; 
}

/* Feedback Container Show State - Mobile */
@media (max-width: 37.5rem) {
  /* 600px */
  #feedback.show {
    transform: translateX(-50%) translateY(0);
  }
}

/* #snake-emoji removed */

#copiado-message {
  background-color: var(--feedback-background); 
  color: var(--feedback-text); 
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem; 
  font-size: 0.875rem;
  white-space: normal; 
  word-wrap: break-word;
  flex: 1 1 auto;
  max-width: 100%; 
  text-align: center; 
}

/* -----------------------------------
  12. Orientation Section
----------------------------------- */
.orientation-section {
  background-color: #2a2a2a;
  color: #e2e2e2;
  padding: 1.5rem 0rem 1.5rem 0rem;
  border-radius: 0.75rem;
  margin: 2rem 0rem 0rem 0rem;
  max-width: 50rem; /* 800px */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 1rem; /* 16px */
  position: relative;
}

.orientation-text {
  max-width: 50rem; /* 800px */
  text-align: left;
  padding: 2rem 3rem 1rem 3rem;
}

@media (max-width: 37.5rem) {
  /* 600px */
  .orientation-text {
    text-align: left;
    padding: 1rem 2rem 0rem 2rem;
    position: relative;
    text-wrap: pretty;
    margin: 0.25rem auto;
  }
}

.orientation-section .close-button {
  font-size: 1.5rem;
  right: 0.5rem;
}

.orientation-section strong {
  color: #01e6cd;
}

/* -----------------------------------
  13. Buttons
----------------------------------- */

.separator {
  text-align: center;
  margin: 1rem 0;
  color: #b0b0b0;
}

.separator::before,
.separator::after {
  content: "";
  display: inline-block;
  width: 40%;
  height: 1px;
  background-color: #b0b0b0;
  vertical-align: middle;
  margin: 0 0.5rem;
}

/* Botões de Login e Logout com Ícones */
#open-auth-modal-button,
#logout-button {
  background-color: transparent; 
  border: none;
  cursor: pointer;
  padding: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d1d1f; 
  transition: color 0.3s ease; 
}

body.dark-mode #open-auth-modal-button,
body.dark-mode #logout-button {
  color: #e2e2e2; 
}

#open-auth-modal-button:hover,
#open-auth-modal-button:focus,
#logout-button:hover,
#logout-button:focus {
  color: #0071e3; 
  outline: none; 
}

body.dark-mode #open-auth-modal-button:hover,
body.dark-mode #open-auth-modal-button:focus,
body.dark-mode #logout-button:hover,
body.dark-mode #logout-button:focus {
  color: #01e6cd; 
}

#open-auth-modal-button:active,
#logout-button:active {
  color: #005bb5; 
}

body.dark-mode #open-auth-modal-button:active,
body.dark-mode #logout-button:active {
  color: #00b8a3; 
}

#open-auth-modal-button .material-icons,
#logout-button .material-icons {
  font-size: 2rem;
}

/* Outros Botões (Exemplo: Settings) */

/* Google login button */
#google-login-button {
  width: 100%;
  padding: 0.75rem;
  background-color: #0071e3; 
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode #google-login-button {
  background-color: #01e6cd; 
  color: #1e1e1e;
}

#google-login-button img {
  width: 20px; 
  height: 20px;
  margin-right: 0.5rem;
}

#google-login-button:hover {
  background-color: #005bb5;
}

body.dark-mode #google-login-button:hover {
  background-color: #00ffe1;
}

#google-login-button:focus {
  outline: 2px solid #0071e3;
}

body.dark-mode #google-login-button:focus {
  outline: 2px solid #01e6cd;
}

.edit-note {
  font-size: 0.875rem; 
  color: #6b7280; 
  margin-top: 0.5rem; 
  text-align: center; 
  display: block;
}

body.dark-mode .edit-note {
  color: #b0b0b0; 
}

#open-subscribe-modal-button {
  font-family: Helvetica, sans-serif;
  font-weight: bold;
  position: relative;
  overflow: visible;
  width: 98%;
  padding: 0.75rem;
  background-color: #0071e3;
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-bottom: 0.6rem;
  margin-top: 0.5rem;
}

body.dark-mode #open-subscribe-modal-button {
  background-color: #3beaff;
  color: var(--button-text);
}

#open-subscribe-modal-button:hover {
  background-color: #01e6cb; 
  /* transform: scale(1.03);  */
}

#open-subscribe-modal-button:focus {
  background-color: #3beaff;
  /* transform: scale(1.03);  */
}

#open-subscribe-modal-button:active {
  background-color: #252525f6;
  color: #252525f6;
  outline: 2px solid #3beaff;
  transform: scale(0.98); 
}

@media (max-width: 600px) {
  #open-subscribe-modal-button {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }
}


#open-subscribe-modal-button::before {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  bottom: -3px;
  left: -3px;
  background: linear-gradient(45deg, #f8de8b 10%, #5df3d3 30%, #3beaff 40%, #e287fe 60%, #6606cc 95%, #2b2a2a 100%);
  background-size: 300% 300%;
  z-index: -1;
  border-radius: 0.5rem;
  animation: glowing 6s linear infinite;
}

@keyframes glowing {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
 
/* -----------------------------------
  14. Modals
----------------------------------- */

/* Estilos para o modal de autenticação */
.modal {
  display: none; /* Manter como none para ocultar os modais por padrão */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}


/* Estilos do Conteúdo do Modal */
.modal-content {
  background-color: #ffffff;
  margin: auto;
  padding: 2rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 500px; /* Largura máxima */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative; /* Para posicionar o botão de fechar */
  animation: fadeIn 0.3s ease-out; /* Animação de entrada */
  color: #1d1d1f;
  margin: 12% auto;
}

body.dark-mode .modal-content {
  background-color: #2c2c2c;
  color: #e2e2e2;
}

/* Estilos para o modal de auth */
#auth-modal .modal-content {
  max-width: 400px;
}

/* Estilos para o modal de adicionar doença */
#add-disease-modal .modal-content {
  width: 90%;
  max-width: 800px; 
  margin: 5% auto; 
}

.close-button {
  position: absolute;
  top: 0.3rem;
  right: 1rem;
  color: #1d1d1f;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  background: none;
  border: none;
}

body.dark-mode .close-button {
  color: #e2e2e2;
}

.close-button:hover {
  color: #0071e3;
}

body.dark-mode .close-button:hover {
  color: #01e6cd;
}


.close-button:focus {
  outline: none;
}

#auth-form input {
  font-size: 16px;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background-color: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  border-radius: 0.375rem;
}

body.dark-mode #auth-form input {
  background-color: #212121;
  border: none;
  color: #e2e2e2;
}

#add-disease-modal .close-button {
  right: 0.5rem;
  top: 0.5rem;
}

#close-add-section-modal {
  right: 0.5rem;
  top: 0.5rem;
}

#auth-form button {
  width: 100%;
  padding: 0.75rem;
  background-color: #0071e3;
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
}

body.dark-mode #auth-form button {
  background-color: #01e6cd;
  color: #1e1e1e;
}

#auth-form button:focus {
  outline: 2px solid #0071e3;
}

body.dark-mode #auth-form button:focus {
  outline: 2px solid #01e6cd;
}

#auth-toggle {
  text-align: center;
}

#auth-toggle a {
  color: #0071e3;
  text-decoration: none;
}

body.dark-mode #auth-toggle a {
  color: #01e6cd;
}

#auth-toggle a:hover {
  text-decoration: underline;
}

/* Estilos para o modal de edição */
.modal textarea {
  width: 100%;
  height: 100px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background-color: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  border-radius: 0.375rem;
  resize: vertical;
}

body.dark-mode .modal textarea {
  background-color: #212121;
  border: none;
  color: #e2e2e2;
}

.modal label {
  color: #1d1d1f;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: block;
}

body.dark-mode .modal label {
  color: #e2e2e2;
}

.modal form button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background-color: #0071e3;
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
}

body.dark-mode .modal form button[type="submit"] {
  background-color: #01e6cd;
  color: #1e1e1e;
}

.modal form button[type="submit"]:focus {
  outline: 2px solid #0071e3;
}

body.dark-mode .modal form button[type="submit"]:focus {
  outline: 2px solid #01e6cd;
}

/* Modal overlay para modais dinâmicos (account linking, etc.) */
.modal-overlay {
  display: flex;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay .modal-content {
  background-color: var(--modal-background);
  padding: 2rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease-out;
  color: var(--text-light);
}

.modal-overlay .modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.modal-overlay .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.modal-overlay .btn-primary {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.modal-overlay .btn-secondary {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.modal-overlay .btn-primary:hover {
  background-color: var(--primary-hover);
}

.modal-overlay .btn-secondary:hover {
  background-color: var(--border-color);
  color: var(--text-light);
}

.edit-textarea {
  width: 100%;
  padding: 1rem;
  background-color: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  border-radius: 0.375rem;
  /* font-size: 1rem; */
  line-height: 1.5;
  font-family: inherit;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  resize: none;
  margin-bottom: 0;
}

body.dark-mode .edit-textarea {
  background-color: #2b2b2b;
  border: 1px solid #444;
  color: #e2e2e2;
}

.section.editing .edit-textarea {
  opacity: 1;
  max-height: 500px; 
  margin-bottom: 1rem;
}



/* Garantir que o conteúdo das seções utilize a fonte correta */
.section-content {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

/* Animação de entrada suave */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Formulário */
#add-disease-form {
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-group input,
.form-group textarea {
  font-size: 16px;
  width: 100%;
  padding: 0.75rem;
  background-color: #212121;
  border: 1px solid #444;
  color: #e2e2e2;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  margin-bottom: 0rem;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #01e6cd;
  outline: none;
}

/* Botões de ação */
.form-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
  background-color: var(--button-background);
  color: var(--button-text);
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
  background-color: #0071e3;
  color: #ffffff;
}

body.dark-mode .btn-primary {
  background-color: #01e6cd;
  color: #1e1e1e;
}

.btn-primary:hover {
  background-color: #005bb5;
}

body.dark-mode .btn-primary:hover {
  background-color: #00ffe1;
}

.btn-primary:active {
  background-color: #004a94;
  transform: scale(0.98);
}

body.dark-mode .btn-primary:active {
  background-color: #00b8a3;
}

.btn-secondary {
  background: none;
  border: none;
  color: #b0b0b0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem; 
  border-radius: 50%;
  transition: color 0.3s ease, transform 0.2s ease;
  width: 100%;
  margin-bottom: 0.4rem;
}

.btn-secondary:hover,
.btn-secondary:focus {
  color: #ff6b6b; 
  transform: scale(1.1);
}

.btn-secondary:active {
  color: #ff4c4c;
  transform: scale(1);
}

/* Ícones nos botões */
.btn-primary .material-icons,
.btn-secondary .material-icons {
  margin-right: 0.5rem;
  font-size: 1.25rem;
}

/* Responsividade */
@media (max-width: 600px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .btn-secondary {
    margin-bottom: 1rem;
  }

  .btn-primary .material-icons,
  .btn-secondary .material-icons {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }
}

/* -----------------------------------
  15. Responsive Adjustments
----------------------------------- */

/* Tablets and Larger Devices */
@media (min-width: 37.5625rem) and (max-width: 64rem) {
  /* 601px - 1024px */
  header {
    padding: 3.125rem 1.25rem; /* 50px 20px */
  }

  #logo {
    max-width: 36rem; /* 150px */
  }

  #search-input {
    font-size: 1.125rem; /* 18px */
    padding: 0.875rem 6rem 0.875rem 1.25rem; /* 14px 20px */
  }

  .suggestion-item {
    font-size: 1.125rem; /* 18px */
    padding: 0.875rem 1.25rem; /* 14px 20px */
  }

  #disease-content h2 {
    font-size: 1.625rem; /* 26px */
  }

  .disease-title {
    font-size: 1.625rem; /* 26px */
    padding: 0.5rem 0.75rem;
  }

  #disease-content h3 {
    font-size: 1.25rem; /* 20px */
  }

  .section-title {
    font-size: 1.25rem; /* 20px */
    padding: 0.4rem 0.6rem;
  }

  .section-header {
    gap: 0.5rem;
  }

  .collapse-toggle {
    min-width: 1.8rem;
    min-height: 1.8rem;
    padding: 0.4rem;
  }

  .collapse-toggle .material-icons {
    font-size: 1.1rem;
  }

  .copy-text {
    font-size: 0.9rem; /* 18px */
  }
}

/* Small Mobile Devices */
@media (max-width: 37.5rem) {
  /* 600px */
  header {
    padding: 0rem;
  }

  #logo {
    max-width: 21rem; /* 150px */
    padding-top: 3.8rem;
    padding-bottom: 0.2rem;
  }

  #search-input {
    font-size: 1rem; /* 16px */
    padding: 0.625rem 6rem 0.625rem 0.875rem; /* 10px 14px */
  }

  #auth-form input {
    font-size: 16px;
  }

  .suggestion-item {
    font-size: 1rem; /* 16px */
    padding: 0.625rem 0.875rem; /* 10px 14px */
  }

  #disease-content h2 {
    font-size: 1.375rem; /* 22px */
    padding-top: 0px;
  }

  .disease-title {
    font-size: 1.375rem; /* 22px */
    padding: 0.4rem 0.6rem;
  }

  #disease-content h3 {
    font-size: 1rem; /* 16px */
  }

  .section-title {
    font-size: 1rem; /* 16px */
    padding: 0.3rem 0.5rem;
  }

  .section-header {
    gap: 0.25rem;
    padding: 0.25rem 0;
  }

  .collapse-toggle {
    min-width: 1.6rem;
    min-height: 1.6rem;
    padding: 0.3rem;
  }

  .collapse-toggle .material-icons {
    font-size: 1rem;
  }

  .section-title[contenteditable="true"]:hover::before {
    right: 0.4rem;
    width: 2px;
    height: 2px;
  }

  .copy-text {
    font-size: 0.9rem; /* 16px */
  }

  /* Ensure the search container does not exceed the viewport */
  .search-container {
    width: 90%;
    max-width: 50rem; /* Ou ajuste conforme necessário para telas menores */
    min-width: 255px;
    margin: 1.25rem auto 1.8rem auto;
  }

  /* Adjust suggestions width */
  #suggestions {
    width: 100%;
    left: 0;
  }

  .fluxograma-image {
    max-width: 100%;
  }

  .doenca-image {
    max-width: 100%;
  }
}

/* Landscape Orientation for Mobile Devices */
@media (orientation: landscape) and (max-width: 37.5rem) {
  /* Landscape and max 600px */
  .search-container,
  #disease-content {
    width: 95%;
    margin: 1.25rem auto 0 auto;
  }
}

/* -----------------------------------
  16. Subscribe Modal
----------------------------------- */

/* Estilos específicos para o modal de assinatura */

/* Estilos Gerais para .subscribe-modal-content */
.subscribe-modal-content {
  background-color: #ffffff;
  padding: 1rem 2rem 2rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 700px;
  border-radius: 0.75rem;
  position: relative;
  color: #1d1d1f;
  text-align: center;
}

body.dark-mode .subscribe-modal-content {
  background-color: #2a2a2a;
  border: 1px solid #444;
  color: #e2e2e2;
}

/* Estilos para o Estado de Sucesso */
.subscribe-modal.success .subscribe-modal-content h2 {
  color: #0071e3;
}

body.dark-mode .subscribe-modal.success .subscribe-modal-content h2 {
  color: #01e6cd;
}

.subscribe-modal.success .subscribe-modal-content p {
  color: #1d1d1f;
}

body.dark-mode .subscribe-modal.success .subscribe-modal-content p {
  color: #e2e2e2;
}

.subscribe-modal.success .subscribe-modal-content .btn-primary {
  background-color: #0071e3;
  color: #ffffff;
}

body.dark-mode .subscribe-modal.success .subscribe-modal-content .btn-primary {
  background-color: #01e6cd;
  color: #1e1e1e;
}

.subscribe-modal.success .subscribe-modal-content .btn-primary:hover {
  background-color: #005bb5;
}

body.dark-mode .subscribe-modal.success .subscribe-modal-content .btn-primary:hover {
  background-color: #00ffe1;
}

/* Estilos para o Estado de Cancelamento */
.subscribe-modal.cancel .subscribe-modal-content h2 {
  color: #ff6b6b;
}

.subscribe-modal.cancel .subscribe-modal-content p {
  color: #1d1d1f;
}

body.dark-mode .subscribe-modal.cancel .subscribe-modal-content p {
  color: #e2e2e2;
}

.subscribe-modal.cancel .subscribe-modal-content .btn-secondary {
  background-color: #ff6b6b;
  color: #1e1e1e;
}

.subscribe-modal.cancel .subscribe-modal-content .btn-secondary:hover {
  background-color: #ff4c4c;
}

.subscribe-modal-content h2 {
  font-family: 'LEMONMILK', system-ui, -apple-system;
  font-style: ITALIC;
  font-weight: 600;
  padding-top: 1rem;
}

/* Estilos para Botões dentro dos Modais */
.subscribe-modal-content button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.subscribe-modal-content .btn-primary,
.subscribe-modal-content .btn-secondary {
  display: inline-block;
  margin-top: 1rem;
}

.subscribe-modal-content .btn-primary:focus,
.subscribe-modal-content .btn-secondary:focus {
  outline: 2px solid #01e6cd;
  box-shadow: 0 0 10px #01e6cd;
}

.subscription-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 1rem;
}

.subscription-option {
  background-color: #212121;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.subscription-option h3 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.subscription-option p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.subscription-option ul {
  list-style: none;
  padding: 0;
  text-align: left;
  margin-bottom: 1rem;
}

.subscription-option ul li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.subscription-option ul li::before {
  content: "✔️"; /* Ícone de check */
  position: absolute;
  left: 0;
  top: 0;
  color: #01e6cd;
}

/* Estilos para os botões de opção de assinatura no modal */
.subscribe-option-button {
  font-family: Helvetica, sans-serif;
  font-weight: bold;
  position: relative;
  overflow: visible;
  width: 98%;
  background-color: #01e6cd;
  color: #252525;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  padding: 0.75rem 1.5rem;
  margin-top: 1rem;
}

.subscribe-option-button:hover {
  background-color: #00ffe1;
}

.subscribe-option-button:focus {
     outline: 2px solid #01e6cd;
  box-shadow: 0 0 10px #01e6cd;
}

.subscribe-option-button:active {
  background-color: #00b8a3;
  transform: scale(0.98);
}

/* Responsividade para telas menores */
@media (max-width: 600px) {
  .subscription-options {
    flex-direction: column;
  }

  .subscription-option {
    width: 100%;
  }
}

@media (min-width: 600px) {
  .subscription-options {
    flex-direction: row;
    justify-content: space-between;
  }

  .subscription-option {
    width: 45%;
  }
}

/* Estilos para o botão Assine Anual com efeito de glow */
#annual-subscribe-button {
  font-family: Helvetica, sans-serif;
  font-weight: bold;
  position: relative;
  overflow: visible;
  width: 98%;
  background-color: #00ffe1e1;
  color: #252525;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 1rem;
}

#annual-subscribe-button:hover {
  background-color: #01e6cb;
}

#annual-subscribe-button:focus {
  background-color: #3beaff;
}

#annual-subscribe-button:active {
  background-color: #252525f6;
  color: #252525f6;
}

/* Efeito de glow */
#annual-subscribe-button::before {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  bottom: -3px;
  left: -3px;
  background: linear-gradient(45deg, #f8de8b 10%, #5df3d3 30%, #3beaff 40%, #e287fe 60%, #6606cc 95%, #2b2a2a 100%);
  background-size: 300% 300%;
  z-index: -1;
  border-radius: 0.5rem;
  animation: glowing 6s linear infinite;
}

/* Animação do efeito de glow */
@keyframes glowing {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}



/* -----------------------------------
  17. Sucesso e Cancelamento
----------------------------------- */
.success-container,
.cancel-container {
  background-color: #2a2a2a;
  color: #e2e2e2;
  padding: 2rem;
  border-radius: 0.75rem;
  max-width: 600px;
  margin: 3rem auto;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.success-container h1,
.cancel-container h1 {
  font-size: 2rem; /* 32px */
  margin-bottom: 1rem;
}

.success-container p,
.cancel-container p {
  font-size: 1.125rem; /* 18px */
  margin-bottom: 2rem;
}

.success-container .fluxograma-image,
.cancel-container .fluxograma-image {
  width: 150px;
  height: auto;
  margin-bottom: 2rem;
}

.cancel-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.button {
  background-color: #01e6cd;
  color: #1e1e1e;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
  background-color: #00ffe1;
}

.button:focus {
  outline: 2px solid #01e6cd;
  box-shadow: 0 0 10px #01e6cd;
}

.button:active {
  background-color: #00b8a3;
  transform: scale(0.98);
}

@media (max-width: 600px) {
  .success-container,
  .cancel-container {
    padding: 1.5rem;
  }

  .success-container h1,
  .cancel-container h1 {
    font-size: 1.5rem; /* 24px */
  }

  .success-container p,
  .cancel-container p {
    font-size: 1rem; /* 16px */
  }

  .success-container .fluxograma-image,
  .cancel-container .fluxograma-image {
    width: 100px;
  }

  .cancel-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
    text-align: center;
  }
}

/* -----------------------------------
  18. Loading Overlay and Spinner
----------------------------------- */

/* Estilos para o overlay de carregamento */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(19, 20, 20, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Estado ativo do overlay */
.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Estilos para o spinner */
.spinner {
  border: 0.4rem solid #444;
  border-top: 0.4rem solid #01e6cd;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  animation: spin 1s linear infinite;
}

/* Inline minimal loading indicator dentro da search bar */
.search-input-wrapper {
  position: relative;
  flex: 1 1 auto;
  transition: all 0.25s ease;
}

/* Indicador de imagem anexada */
.image-attached-indicator {
  position: absolute;
  top: 50%;
  right: 5.5rem; /* Entre o ai-generate-button (3.5rem) e add-disease-button (0.75rem) */
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(1, 230, 205, 0.15);
  border: 1px solid rgba(1, 230, 205, 0.3);
  border-radius: 0.5rem;
  color: #01e6cd;
  font-size: 1rem;
  cursor: default;
  animation: pulseImage 2s ease-in-out infinite;
  z-index: 10;
  overflow: hidden;
}

.image-attached-indicator .material-icons {
  font-size: 1rem;
}

/* Miniatura da imagem */
.image-attached-indicator .image-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.3rem;
}

/* Overlay com ícone de IA */
.image-attached-indicator .image-overlay {
  position: absolute;
  bottom: -1px;
  right: -1px;
  background: rgba(1, 230, 205, 0.9);
  border-radius: 0.25rem 0 0.4rem 0;
  width: 0.8rem;
  height: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.image-attached-indicator .image-overlay .material-icons {
  font-size: 0.6rem;
  color: #1e1e1e;
}

@keyframes pulseImage {
  0%, 100% { 
    border-color: rgba(1, 230, 205, 0.3);
    box-shadow: 0 0 0 0 rgba(1, 230, 205, 0.2);
  }
  50% { 
    border-color: rgba(1, 230, 205, 0.6);
    box-shadow: 0 0 0 4px rgba(1, 230, 205, 0.1);
  }
}

.search-input-wrapper.has-image-attached #search-input {
  padding-right: 7.5rem; /* ajuste menor para não desconfigurar */
}

/* Barra de progresso global discreta */
#global-progress {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  overflow: hidden;
  z-index: 1200;
  opacity: 0;
  transition: opacity .4s ease;
}
#global-progress.active { opacity: 1; }
#global-progress .gp-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#01e6cd,#3beaff,#e287fe);
  background-size: 300% 100%;
  animation: gpFlow 6s linear infinite;
  transition: width .6s ease;
}
@keyframes gpFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#search-input.loading {
  padding-right: 4.5rem; /* espaço para indicador + botões */
  color: #a0a0a0;
  font-style: normal;
  text-align: center;
  cursor: default;
  font-weight: 400;
}

#search-input.loading::placeholder {
  color: #a0a0a0;
  opacity: 0.7;
}

/* Removida animação de pulse para ser mais discreto */

/* Esconder botões durante loading */
.search-input-wrapper.loading ~ #ai-generate-button,
.search-input-wrapper.loading ~ #add-disease-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.search-loading {
  position: absolute;
  top: 50%;
  right: 2.5rem; /* antes dos botões de ação */
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.search-loading.active { opacity: 1; }

.loader-dot {
  width: 6px;
  height: 6px;
  background: #01e6cd;
  border-radius: 50%;
  opacity: .35;
  animation: pulseDots 1.2s ease-in-out infinite;
}
.loader-dot.dot2 { animation-delay: .2s; }
.loader-dot.dot3 { animation-delay: .4s; }

@keyframes pulseDots {
  0%, 60%, 100% { opacity: .25; transform: scale(.75); }
  30% { opacity: 1; transform: scale(1); }
}

/* Adaptar posição em mobile se necessário */
@media (max-width: 600px) {
  .search-loading { right: 2.25rem; }
  #search-input.loading { padding-right: 4rem; }
}

/* Animação de rotação */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsividade para dispositivos móveis */
@media (max-width: 600px) {
  .spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
  }
}

/* -----------------------------------
  19. Enhanced Subscription Switch Styles
----------------------------------- */

/* Estilos adicionais para o switch habilitado */
#subscription-status-toggle:enabled + .slider {
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#subscription-status-toggle:enabled + .slider:hover {
  background-color: #555;
}

#subscription-status-toggle:checked + .slider {
  background: linear-gradient(45deg, #f8de8b 10%, #5df3d3 30%, #3beaff 40%, #e287fe 60%, #6606cc 95%, #2b2a2a 100%);
  background-size: 300% 300%;
  animation: glowing 6s linear infinite;
}


@keyframes glowing {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


/* Estilo para o cursor quando o switch está habilitado */
.switch input:enabled {
  cursor: pointer;
}


/* Opcional: Alterar a cor do label baseado no estado do switch */
#subscription-status-toggle:checked ~ #subscription-status-label {
  color: #01e6cd;
}

#subscription-status-toggle:not(:checked) ~ #subscription-status-label {
  color: #e2e2e2;
}

/* -----------------------------------
  20. Additional Mobile Enhancements
----------------------------------- */

@media (min-width: 600px) {
  .modal-content {
    margin: 8rem auto auto auto;
  }
  
  #auth-modal .modal-content {
    margin: 10rem auto auto auto;
  }

  #subscribe-modal .modal-content {
    margin: 2% auto;
  }
}

@media (max-width: 600px) {
  .modal-content {
    margin: 10% auto;
    padding: 1rem;
    width: 95%;
    max-width: 90%;
  }

  .subscribe-modal-content {
    padding: 1.5rem;
    width: 95%;
    max-width: 90%;
  }

  .subscription-option {
    padding: 1rem;
  }
}

/* Ajustar tamanhos de fonte e padding para melhorar a usabilidade em telas menores */
@media (max-width: 600px) {
  #disease-content h2 {
    font-size: 1.25rem; /* 20px */
  }

  .disease-title {
    font-size: 1.25rem; /* 20px */
    padding: 0.4rem 0.5rem;
  }

  .disease-title[contenteditable="true"]:hover::before {
    right: 0.5rem;
    width: 2px;
    height: 2px;
  }

  #disease-content h3 {
    font-size: 1rem; /* 16px */
  }

  .section-title {
    font-size: 1rem; /* 16px */
    padding: 0.25rem;
  }

  .section-header {
    gap: 0.25rem;
  }

  .collapse-toggle {
    min-width: 1.5rem;
    min-height: 1.5rem;
    padding: 0.25rem;
  }

  .copy-text {
    font-size: 0.85rem; /* 14px */
  }

  .button-container {
    gap: 0.4rem;
  }

  .switch {
    --switch-width: 50px;
    --switch-height: 28px;
    --switch-knob-size: 22px;
    --switch-knob-offset: 3px;
  }



  .subscribe-option-button,
  }

/* -----------------------------------
     20.1. Estilos para o Modal de Adicionar Seção
----------------------------------- */

/* Estilos para o modal de adicionar seção */
#add-section-modal .modal-content {
  background-color: #ffffff;
  padding: 2rem;
  border: none;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 800px; 
  margin: 5% auto; 
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #1d1d1f;
  animation: fadeIn 0.3s ease;
}

body.dark-mode #add-section-modal .modal-content {
  background-color: #2a2a2a;
  color: #e2e2e2;
}

/* Garantir que o conteúdo das seções utilize a fonte correta */
#add-section-modal .modal-content .form-group label,
#add-section-modal .modal-content .form-group input,
#add-section-modal .modal-content .form-group textarea {
  font-family: "Roboto", sans-serif; 
}

/* Estilos para os grupos de formulário */
#add-section-modal .form-group {
  margin-bottom: 1.5rem;
}

#add-section-modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

#add-section-modal .form-group input,
#add-section-modal .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

body.dark-mode #add-section-modal .form-group input,
body.dark-mode #add-section-modal .form-group textarea {
  background-color: #212121;
  border: 1px solid #444;
  color: #e2e2e2;
}

#add-section-modal .form-group input:focus,
#add-section-modal .form-group textarea:focus {
  border-color: #0071e3;
  outline: none;
}

body.dark-mode #add-section-modal .form-group input:focus,
body.dark-mode #add-section-modal .form-group textarea:focus {
  border-color: #01e6cd;
}

/* Estilos para ações de formulário */
#add-section-modal .form-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

#add-section-modal .btn-primary {
  background-color: #0071e3;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

body.dark-mode #add-section-modal .btn-primary {
  background-color: #01e6cd;
  color: #1e1e1e;
}

#add-section-modal .btn-primary:hover {
  background-color: #005bb5;
}

body.dark-mode #add-section-modal .btn-primary:hover {
  background-color: #00ffe1;
}

#add-section-modal .btn-primary:focus {
  outline: 2px solid #0071e3;
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.5);
}

body.dark-mode #add-section-modal .btn-primary:focus {
  outline: 2px solid #01e6cd;
  box-shadow: 0 0 10px #01e6cd;
}

#add-section-modal .btn-primary:active {
  background-color: #004a99;
  transform: scale(0.98);
}

body.dark-mode #add-section-modal .btn-primary:active {
  background-color: #00b8a3;
  transform: scale(0.98);
}

.last-update {
  font-size: 0.8rem;
  text-align: center;
  color: #a0a0a0;
  margin-top: 1rem;
}

/* ============================= */
/* ====== Grade de Apps ====== */
/* ============================= */

/* Container da Grade de Aplicativos */
#app-grid .grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.5rem;
  width: 90%; /* Igual ao search-container */
  max-width: 50rem; /* Igual ao search-container */
  margin: 0rem auto; /* Removemos a margem superior */
}

/* Quadrados da Grade de Aplicativos */
.app-square {
  background-color: var(--app-square);
  border-radius: 0.75rem; /* Igual ao border-radius do search input */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative; /* If needed for positioning */
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  color: var(--app-square-icon);
  text-align: center;
  font-size:0.7rem;
  padding: 0rem 0.7rem 0rem 0.7rem;
  gap: 0.5rem;
  line-height: 1;

  /* Manter forma quadrada */
  aspect-ratio: 1 / 1;
  width: 100%;
  
  /* Evitar que o conteúdo ultrapasse */
  overflow: hidden;
  
  /* Sombra inicial */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Efeitos de Hover e Focus */
.app-square:hover,
.app-square:focus {
  background-color: rgba(0, 113, 227, 0.1);
  transform: scale(1.05); /* Aumenta ligeiramente a escala */
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15); /* Aumenta a sombra */
  outline: none;
}

body.dark-mode .app-square:hover,
body.dark-mode .app-square:focus {
  background-color: #272727;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Efeitos de Clique (Active) */
.app-square:active {
  transform: scale(0.98); /* Reduz ligeiramente a escala */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Reduz a sombra */
}

/* Ícone Dentro dos Quadrados */
.app-square .app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}


.material-symbols-outlined {
  font-size:2.5rem;
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/* Texto Dentro dos Quadrados */
.app-square .app-label p {
  margin-top: 0.5rem; /* Reduzido para melhor alinhamento */
  font-size: 1rem;
  font-weight: 500;
  word-wrap: break-word;
}

/* Estilização do Ícone Personalizado */
.app-square .app-icon {
  width: 60px; /* Ajuste conforme necessário */
  height: 60px; /* Ajuste conforme necessário */
  object-fit: contain;
}

/* Ajuste Responsivo para Telas Menores */
@media (max-width: 600px) {
  .app-square .app-icon {
    width: 50px;
    height: 50px;
  }
}

/* Initial State: Show the icon and hide titles */
.app-icon {
  transition: opacity 0.3s ease;
  opacity: 1;
}

/* 1. Ajustes na Classe .app-icon */
.app-icon {
  position: relative; /* Necessário para posicionar o ícone de sobreposição */
  width: 60px; /* Já existente, pode ajustar conforme necessário */
  height: 60px; /* Já existente, pode ajustar conforme necessário */
}

/* 2. Estilos para o Ícone Base */
.base-icon {
  font-size: 2.5rem; /* Já existente */
  color: var(--app-square-icon); /* Utiliza a variável existente */
}

/* 3. Estilos para o Ícone de Sobreposição */
.overlay-icon {
  position: absolute;
  top: 5px; /* Ajuste conforme necessário */
  right: 5px; /* Ajuste conforme necessário */
  color: #FFFFFF; /* Cor branca para contraste */
  background-color: #2c2c2cc9;
  border-radius: 50%;
  padding: 2px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); /* Sombra para destacar o ícone */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#overlay-icon {
  font-size: 1.2rem;
}


/* 5. Ajustes Responsivos para Ícones */
@media (max-width: 600px) {
  .app-icon {
    width: 50px;
    height: 50px;
  }

  .base-icon {
    font-size: 2rem;
  }

  .overlay-icon {
    width: 20px;
    height: 20px;
    font-size: 1rem;
    top: 4px;
    right: 4px;
  }
}


.app-title,
.app-sub-title {
  display: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.app-title {
  font-family: "LEMONMILK", sans-serif;
  font-weight: 500;
  font-style: italic;
  line-height: 1.2;
}

#infusion-calculator .app-title {
  font-size:0.7rem;
}

.app-sub-title {
  font-size: 0.9rem;
  color: #4c4c4c;
  font-family: Helvetica, sans-serif;

}

/* Show titles and hide icon on hover, focus, or active */
.app-square:hover .app-title,
.app-square:hover .app-sub-title,
.app-square:hover .app-icon,
.app-square:focus .app-title,
.app-square:focus .app-sub-title,
.app-square:focus .app-icon,
.app-square.active .app-title,
.app-square.active .app-sub-title,
.app-square.active .app-icon {
  display: block; /* Ensures block display for titles */
  opacity: 1;     /* Makes titles visible */
}

.app-square:hover .app-icon,
.app-square:focus .app-icon,
.app-square.active .app-icon,
.app-square:hover .material-icons,
.app-square:focus .material-icons,
.app-square.active .material-icons {
  display: none;     /* Hides the icon */
}

/* Estilo para o botão Modo Pediátrico na search bar */
#pediatric-mode-button {
  background: none;
  border: none;
  color: gray; /* Estado Inativo: Cinza */
  cursor: pointer;
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  z-index: 1002; /* Acima do input */
}

/* Estado Ativo: Cor Definida por --button-background */
#pediatric-mode-button.active {
  color: var(--button-background);
}

/* Ícones dentro do botão */
#pediatric-mode-button .material-icons {
  font-size: 1.5rem;
}

/* Hover e Focus para o botão Ativo */
#pediatric-mode-button.active:hover {
  color: #01e6cd; /* Cor de Hover */
  outline: none;
}

/* Se não estiver ativo, hover não muda a cor */
#pediatric-mode-button:not(.active):hover {
  color: gray; /* Fica cinza mesmo com hover */
}

/* Active State para o botão Ativo */
#pediatric-mode-button.active:active {
  color: #00b8a3;
}

/* Hover e Focus para o botão Inativo */
#pediatric-mode-button:hover {
  color: #01e6cd; /* Cor de Hover quando inativo */
  outline: none;
}

#pediatric-mode-button:active {
  color: #00b8a3;
}

/* Responsividade para o botão */
@media (max-width: 600px) {
  #pediatric-mode-button {
    font-size: 1.2rem;
  }
}

/* Ajuste no padding do input para não sobrepor o botão pediátrico */
.search-container {
  position: relative;
}

#search-input {
  padding-left: 3rem; /* Espaço para o botão pediátrico */
  padding-right: 6rem; /* Espaço para os botões de adicionar doença e IA */
}

/* Estilos para o Seletor Circular de Peso Pediátrico */
.weight-selector {
  position: fixed; /* Posicionamento fixo no viewport */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #2b919d;
  /* Removido o gradiente anterior para aplicar cores sólidas */
  /* background: radial-gradient(circle, rgba(1, 230, 205, 0) 0%, rgba(1, 230, 205, 0.8) 70%, rgba(1, 230, 205, 0.8) 100%); */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease; /* Adiciona transição para a cor */
  opacity: 0;
  z-index: 1007;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Inicialmente não interativo */
}

.weight-selector.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto; /* Torna interativo quando ativo */
  animation: expandSelector 0.4s forwards;
  touch-action: none; /* Evita rolagem da página durante o gesto */
  overscroll-behavior: contain; /* Evita atualizar a página ao puxar */
}

/* Animação de expansão a partir do centro */
@keyframes expandSelector {
  from {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes collapseSelector {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

.weight-selector:not(.active) {
  animation: collapseSelector 0.4s forwards;
}

/* Container interno para exibir o peso */
.selector-container {
  position: relative;
  text-align: center;
  color: #ffffff;
}

.weight-display {
  font-size: 2rem;
  font-weight: bold;
  user-select: none;
}

/* Campo de entrada oculto para digitar o peso */
#weight-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Indicador de gesto para dispositivos móveis */
.swipe-indicator {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(55% + 0.5rem);
  transform: translateX(-50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  animation: swipe-up-down 1.5s infinite;
}

@keyframes swipe-up-down {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -13px); }
}

@media (hover: none) and (pointer: coarse) {
  .swipe-indicator {
    display: block;
  }
}

/* Estilização adicional para melhor aparência */
.weight-selector::before {
  content: '';
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  top: 10%;
  left: 10%;
}

.weight-selector:hover {
  cursor: pointer;
}

/* Tornar o seletor de peso focável para acessibilidade */
.weight-selector {
  outline: none;
}

.weight-selector:focus {
  box-shadow: 0 0 0 3px rgba(1, 230, 205, 0.5);
}

.discreet-note {
  color: #7f7f7f; /* Tom mais escuro e discreto */
  font-size: 80%; /* Reduz o tamanho para 20% menor */
  line-height: 1.4; /* Melhora a legibilidade com espaçamento ajustado */
}

.subscription-option strong {
    font-weight: 800;
    color: #01e6cd; /* Cor do texto forte */
}

/* -----------------------------------
  Estilos para Modal de Novidades
----------------------------------- */

/* Header das novidades */
.news-header h3 {
  color: #01e6cd;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.2rem;
}

/* Seções das novidades */
.news-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  border-left: 3px solid #01e6cd;
}

.news-section h4 {
  color: #3beaff;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.news-section p {
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

/* Step by step guide */
.step-by-step {
  margin-top: 1rem;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(1, 230, 205, 0.05);
  border-radius: 0.4rem;
}

.step-number {
  font-size: 1.1rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content strong {
  color: #01e6cd;
  display: block;
  margin-bottom: 0.25rem;
}

/* Highlight box */
.news-highlight {
  background: linear-gradient(135deg, rgba(59, 234, 255, 0.15), rgba(1, 230, 205, 0.15));
  border: 1px solid rgba(59, 234, 255, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  margin: 1.5rem 0;
  color: #3beaff;
  font-weight: 600;
}

/* Footer das novidades */
.news-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-footer p {
  margin-bottom: 0.5rem;
}

.news-footer small {
  color: #b0b0b0;
}

/* Step by step guide - mobile */
@media (max-width: 600px) {
  .step {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-number {
    margin-bottom: 0.5rem;
  }
}

/* -----------------------------------
  Setting Info Styles
----------------------------------- */

.setting-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.setting-title {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.setting-description {
  font-size: 0.85rem;
  color: #b0b0b0;
  line-height: 1.3;
}

/* -----------------------------------
  Auth Methods Modal
----------------------------------- */

.auth-methods-content {
  padding: 1rem 0;
}

.auth-methods-description {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.auth-method-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

body.dark-mode .auth-method-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-method-item:hover {
  background: rgba(0, 113, 227, 0.04);
  border-color: rgba(0, 113, 227, 0.15);
}

body.dark-mode .auth-method-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-method-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  padding-right: 1.5rem;
  min-width: 0;
}

.auth-method-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 113, 227, 0.08);
  border-radius: 8px;
  flex-shrink: 0;
}

body.dark-mode .auth-method-icon {
  background: rgba(255, 255, 255, 0.1);
}

.auth-method-icon .material-icons {
  color: var(--text-color);
  font-size: 24px;
}

.auth-method-details h4 {
  color: var(--text-color);
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.auth-method-details p {
  color: #b0b0b0;
  margin: 0;
  font-size: 0.85rem;
}

.auth-method-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-method-status {
  color: var(--button-background);
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-link {
  background: none;
  border: none;
  color: #0071e3;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}

body.dark-mode .btn-link {
  color: var(--button-background);
}

.btn-link:hover {
  color: #005bb5;
}

body.dark-mode .btn-link:hover {
  color: #00d4b8;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark-mode .btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.3);
}

body.dark-mode .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-methods-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  margin-top: 1.5rem;
}

.warning-icon .material-icons {
  color: #FFC107;
  font-size: 20px;
}

.auth-methods-warning p {
  color: var(--text-color);
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.auth-methods-warning strong {
  color: #FFC107;
}

/* -----------------------------------
  Modern Auth Methods Section in Header
----------------------------------- */

.user-profile-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

#user-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0;
}

.user-security-icon {
  font-size: 1.2rem;
  color: rgba(0, 113, 227, 0.9);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 0.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.08) 0%, rgba(0, 91, 181, 0.08) 100%);
  border: 1px solid rgba(0, 113, 227, 0.18);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.dark-mode .user-security-icon {
  color: rgba(1, 230, 205, 0.9);
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.08) 0%, rgba(99, 91, 255, 0.08) 100%);
  border: 1px solid rgba(1, 230, 205, 0.18);
}

.user-security-icon:hover {
  color: rgba(0, 113, 227, 1);
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.1) 0%, rgba(0, 91, 181, 0.1) 100%);
  border-color: rgba(0, 113, 227, 0.28);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .user-security-icon:hover {
  color: rgba(1, 230, 205, 1);
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.1) 0%, rgba(99, 91, 255, 0.1) 100%);
  border-color: rgba(1, 230, 205, 0.28);
}

.user-security-icon:active {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.12) 0%, rgba(0, 91, 181, 0.12) 100%);
}

body.dark-mode .user-security-icon:active {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.12) 0%, rgba(0, 91, 181, 0.12) 100%);
}

body.dark-mode .user-security-icon:active {
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.12) 0%, rgba(99, 91, 255, 0.12) 100%);
}

.user-security-icon:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.25);
  border-color: rgba(0, 113, 227, 0.4);
}

body.dark-mode .user-security-icon:focus {
  box-shadow: 0 0 0 2px rgba(1, 230, 205, 0.25);
  border-color: rgba(1, 230, 205, 0.4);
}

/* Rotate only the glyph, not the container */
.user-security-icon .icon-glyph {
  transition: transform 0.25s ease;
}

.user-security-icon:hover .icon-glyph,
.user-security-icon:focus .icon-glyph {
  transform: rotate(90deg);
}

.auth-methods-compact {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.1) 0%, rgba(0, 91, 181, 0.1) 100%);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 0.375rem;
  padding: 0.75rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  width: 100%;
  margin-bottom: 1rem;
}

body.dark-mode .auth-methods-compact {
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.08) 0%, rgba(99, 91, 255, 0.08) 100%);
  border: 1px solid rgba(1, 230, 205, 0.15);
}

.auth-methods-compact:hover {
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 113, 227, 0.1);
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.12) 0%, rgba(0, 91, 181, 0.12) 100%);
}

body.dark-mode .auth-methods-compact:hover {
  border-color: rgba(1, 230, 205, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(1, 230, 205, 0.1);
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.12) 0%, rgba(99, 91, 255, 0.12) 100%);
}

.auth-status-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  font-size: 0.9rem;
}

/* Estilos para seção de edição de dados pessoais */
.auth-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.4), transparent);
  margin: 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.1);
}

body.dark-mode .auth-section-divider {
  background: linear-gradient(90deg, transparent, rgba(1, 230, 205, 0.3), transparent);
  box-shadow: 0 1px 3px rgba(1, 230, 205, 0.08);
}

/* Estilos para botões de acesso rápido no modo de edição */
.quick-access-buttons {
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.05) 0%, rgba(0, 91, 181, 0.05) 100%);
  border: 1px solid rgba(0, 113, 227, 0.15);
  border-radius: 8px;
}

body.dark-mode .quick-access-buttons {
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.05) 0%, rgba(99, 91, 255, 0.05) 100%);
  border: 1px solid rgba(1, 230, 205, 0.15);
}

.quick-access-info p {
  margin: 0 0 1rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.quick-access-actions {
  display: flex;
  justify-content: center;
}

.quick-access-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.quick-access-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-access-btn .material-icons {
  font-size: 1.1rem;
}

/* Notificação de sucesso para edições */
.edit-success-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.95) 0%, rgba(99, 91, 255, 0.95) 100%);
  color: var(--background-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: successSlideIn 0.4s ease-out;
}

.success-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.success-content .material-icons {
  font-size: 2.5rem;
  color: var(--background-color);
}

.success-text h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.success-text p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.auth-status-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.auth-method-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-grow: 1;
}



.auth-status-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.95;
  letter-spacing: 0.01em;
}

.auth-manage-btn {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.1) 0%, rgba(0, 91, 181, 0.1) 100%);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 10px;
  padding: 0.6rem;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 113, 227, 0.1);
  backdrop-filter: blur(12px);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

body.dark-mode .auth-manage-btn {
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.1) 0%, rgba(99, 91, 255, 0.1) 100%);
  border: 1px solid rgba(1, 230, 205, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(1, 230, 205, 0.1);
}

.auth-manage-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.auth-manage-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 113, 227, 0.15);
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.15) 0%, rgba(0, 91, 181, 0.15) 100%);
  border-color: rgba(0, 113, 227, 0.4);
}

body.dark-mode .auth-manage-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(1, 230, 205, 0.15);
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.15) 0%, rgba(99, 91, 255, 0.15) 100%);
  border-color: rgba(1, 230, 205, 0.4);
}

.auth-manage-btn:hover::before {
  left: 100%;
}

.auth-manage-btn:active {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.2) 0%, rgba(0, 91, 181, 0.2) 100%);
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

body.dark-mode .auth-manage-btn:active {
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.2) 0%, rgba(99, 91, 255, 0.2) 100%);
}

.auth-manage-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 113, 227, 0.6);
}

body.dark-mode .auth-manage-btn:focus {
  box-shadow: 0 0 0 3px rgba(1, 230, 205, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
  border-color: rgba(1, 230, 205, 0.6);
}

.auth-manage-btn .material-icons {
  font-size: 1.2rem;
  color: rgba(0, 113, 227, 0.9);
  transition: all 0.3s ease;
}

body.dark-mode .auth-manage-btn .material-icons {
  color: rgba(1, 230, 205, 0.9);
}

.auth-manage-btn:hover .material-icons {
  color: rgba(0, 113, 227, 1);
  transform: rotate(90deg);
}

body.dark-mode .auth-manage-btn:hover .material-icons {
  color: rgba(1, 230, 205, 1);
}

/* Dark mode specific adjustments */
body.dark-mode .auth-methods-compact {
  background: linear-gradient(135deg, rgba(1, 230, 205, 0.08) 0%, rgba(99, 91, 255, 0.08) 100%);
  border-color: rgba(1, 230, 205, 0.15);
}

body.dark-mode .auth-methods-compact:hover {
  border-color: rgba(1, 230, 205, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-methods-compact {
    padding: 0.6rem;
  }
  
  .auth-status-text {
    font-size: 1rem;
  }
  
  .auth-manage-btn {
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
  }
  
  .auth-manage-btn .material-icons {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .auth-method-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  
  .auth-method-icon .material-icons {
    font-size: 18px;
  }
}

/* Otimizações específicas para iPhone Pro Max (428px) - Modais */
@media (max-width: 428px) {
  .modal {
    padding: 0.5rem;
    /* Garantir altura completa em dispositivos móveis */
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para iPhone */
  }

  .modal-content {
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
    /* Limitar altura máxima para prevenir cortes */
    max-height: calc(100vh - 10%);
    max-height: calc(100dvh - 10%);
    overflow-y: auto;
    /* Melhorar scroll em iOS */
    -webkit-overflow-scrolling: touch;
    /* Pequeno ajuste para centralizar melhor */
    transform: translateY(0);
  }

  /* Modal específico de auth */
  #auth-modal .modal-content {
    max-width: calc(100% - 1rem);
    padding: 1.2rem;
  }

  /* Ajustar inputs dentro dos modais para iPhone */
  .modal input,
  .modal textarea,
  .modal select {
    font-size: 16px; /* Prevenir zoom no iOS */
    padding: 0.7rem;
  }

  /* Ajustar botões dos modais */
  .modal button {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }

  /* Ajustar modal-overlay para account linking */
  .modal-overlay {
    padding: 0.5rem;
    /* Garantir altura completa */
    height: 100vh;
    height: 100dvh;
  }

  .modal-overlay .modal-content {
    margin: 10% auto;
    max-height: calc(100vh - 20%);
    max-height: calc(100dvh - 20%);
  }

  /* Ajustar notificações para iPhone Pro Max */
  .notification,
  .existing-account-notification,
  .edit-success-notification {
    margin: 0.5rem;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    /* Garantir que não seja cortada */
    max-width: calc(100% - 1rem);
    right: 0.5rem;
    top: 1rem;
  }

  .notification .success-content,
  .existing-account-notification .notification-content {
    gap: 0.5rem;
  }

  .notification .material-icons {
    font-size: 1.2rem;
  }
}

/* Otimização adicional para iPhone Pro Max em landscape */
@media (max-width: 932px) and (orientation: landscape) and (max-height: 428px) {
  .modal-content {
    margin: 2% auto;
    max-height: calc(100vh - 4%);
    max-height: calc(100dvh - 4%);
    padding: 1rem;
  }

  #auth-modal .modal-content {
    padding: 1rem;
  }

  .modal-overlay .modal-content {
    margin: 5% auto;
    max-height: calc(100vh - 10%);
    max-height: calc(100dvh - 10%);
  }
}

/* -----------------------------------
  Banner de Perfil Incompleto
----------------------------------- */

.incomplete-profile-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: none;
  z-index: 1004;
  padding: 0.7rem 1rem;
  background: var(--banner-bg, #01e6cd);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--banner-text-color, #1e1e1e);
  --banner-bg: #01e6cd;
  --banner-text-color: #1e1e1e;
  --banner-icon-color: #1e1e1e;
  --banner-button-bg: #1e1e1e;
  --banner-button-color: #ffffff;
  --banner-button-hover-bg: rgba(30, 30, 30, 0.85);
  --banner-close-bg: rgba(0, 0, 0, 0.06);
  --banner-close-hover-bg: rgba(0, 0, 0, 0.12);
  --banner-outline-color: rgba(30, 30, 30, 0.3);
  transition: width 0.25s ease, right 0.25s ease;
}

.incomplete-profile-banner.is-safe {
  --banner-bg: #01e6cd;
  --banner-text-color: #1e1e1e;
  --banner-icon-color: #1e1e1e;
  --banner-button-bg: #1e1e1e;
  --banner-button-color: #ffffff;
  --banner-button-hover-bg: rgba(30, 30, 30, 0.85);
}

.incomplete-profile-banner.is-warning {
  --banner-bg: #ffd166;
  --banner-text-color: #1e1e1e;
  --banner-icon-color: #1e1e1e;
  --banner-button-bg: #1e1e1e;
  --banner-button-color: #ffffff;
  --banner-button-hover-bg: rgba(30, 30, 30, 0.85);
}

.incomplete-profile-banner.is-critical {
  --banner-bg: #ff4c4c;
  --banner-text-color: #ffffff;
  --banner-icon-color: #ffffff;
  --banner-button-bg: #ffffff;
  --banner-button-color: #ff4c4c;
  --banner-button-hover-bg: rgba(255, 255, 255, 0.9);
  --banner-close-bg: rgba(255, 255, 255, 0.12);
  --banner-close-hover-bg: rgba(255, 255, 255, 0.22);
  --banner-outline-color: rgba(255, 255, 255, 0.5);
}

.incomplete-profile-banner .banner-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  position: relative;
  padding-right: 0;
}

.banner-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  color: var(--banner-icon-color, currentColor);
  opacity: 0.85;
}

.banner-text {
  flex: 1;
  min-width: 200px;
}

body.chat-docked-active .incomplete-profile-banner {
  width: calc(100% - var(--chat-docked-width, 420px));
  right: var(--chat-docked-width, 420px);
}

/* Shift header buttons when chat is docked */
body.chat-docked-active #header-buttons {
  right: calc(var(--chat-docked-width, 420px) + 1.25rem);
  transition: right 0.3s ease;
}

@media (max-width: 768px) {
  body.chat-docked-active .incomplete-profile-banner {
    width: 100%;
    right: 0;
  }

  /* Reset header buttons position on mobile */
  body.chat-docked-active #header-buttons {
    right: 1.25rem;
  }
}

.banner-text strong {
  font-weight: 500;
  margin-right: 0.35rem;
}

.banner-text span {
  font-size: 0.925rem;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.complete-profile-btn {
  background-color: var(--banner-button-bg, #1e1e1e);
  color: var(--banner-button-color, #ffffff);
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1.1rem;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.complete-profile-btn:hover {
  background-color: var(--banner-button-hover-bg, rgba(30, 30, 30, 0.85));
  opacity: 0.95;
}

.complete-profile-btn:active {
  opacity: 0.85;
}

.complete-profile-btn:focus-visible {
  outline: 2px solid var(--banner-outline-color, rgba(30, 30, 30, 0.3));
  outline-offset: 2px;
}

.banner-close {
  position: fixed;
  top: 0.7rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--banner-close-bg, rgba(0, 0, 0, 0.06));
  border: none;
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease, opacity 0.15s ease;
  opacity: 0.7;
  z-index: 1005;
}

.banner-close:hover {
  background: var(--banner-close-hover-bg, rgba(0, 0, 0, 0.12));
  opacity: 1;
}

.banner-close:focus-visible {
  outline: 2px solid var(--banner-outline-color, rgba(30, 30, 30, 0.3));
  outline-offset: 2px;
}

.banner-close .material-icons {
  font-size: 1.15rem;
}

@media (max-width: 768px) {
  .incomplete-profile-banner {
    padding: 0.6rem 0.8rem;
  }

  .incomplete-profile-banner .banner-inner {
    gap: 0.65rem;
    padding-right: 0;
  }

  .banner-icon {
    font-size: 1.25rem;
  }

  .banner-text {
    font-size: 0.9rem;
  }

  .complete-profile-btn {
    font-size: 0.825rem;
    padding: 0.4rem 0.95rem;
  }

  .banner-close {
    top: 0.6rem;
    right: 0.75rem;
    width: 1.7rem;
    height: 1.7rem;
  }

  .banner-close .material-icons {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .incomplete-profile-banner {
    padding: 0.55rem 0.7rem;
  }

  .incomplete-profile-banner .banner-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding-right: 0;
  }

  .banner-icon {
    font-size: 1.15rem;
  }

  .banner-text {
    width: 100%;
    min-width: auto;
  }

  .banner-actions {
    width: 100%;
    justify-content: center;
  }

  .complete-profile-btn {
    width: auto;
    min-width: 160px;
  }

  .banner-close {
    top: 0.55rem;
    right: 0.6rem;
    width: 1.6rem;
    height: 1.6rem;
  }

  .banner-close .material-icons {
    font-size: 0.95rem;
  }
}
