:root {
  --font-family: 'Inter', sans-serif;
  --font-primary: 'Tenor Sans', sans-serif;
  --font-editorial: 'Cormorant Garamond', serif;
  --font-headings: 'Cormorant Garamond', serif;

  /* 💎 Premium Palette: Champagne & Charcoal */
  --bg-color: #0A0A0B;
  --header-bg: rgba(10, 10, 11, 0.8);
  --container-bg: #0A0A0B;
  --user-message-bg: #141416;
  --model-message-bg: #0F0F11;
  --input-bg: rgba(255, 255, 255, 0.03);
  --modal-bg: #111113;
  --text-color: #F9F6EE;
  /* Bone White */
  --text-color-muted: #888888;

  --gold-accent: #D4AF37;
  /* Champagne Gold Metallic */
  --gold-accent-bright: #F9F6EE;
  --gold-accent-gradient: linear-gradient(180deg, #D4AF37 0%, #F9F6EE 50%, #C5A028 100%);
  --gold-accent-soft: rgba(212, 175, 55, 0.08);
  --magenta-accent: #e91e63;
  /* Magenta/Pink for Neurodiversity theme */
  --border-color: rgba(212, 175, 55, 0.2);

  --danger-color: #D64545;
  --info-color: #4A90E2;
  --shadow-color: rgba(0, 0, 0, 0.9);
  --glass-effect: blur(25px) saturate(180%);

  --poly-gold-glow: rgba(212, 175, 55, 0.15);

  /* 🛡️ Guardian Colors */
  --amber-alert: #FFBF00;
  --amber-alert-glow: rgba(255, 191, 0, 0.4);
}

body.light-mode {
  --bg-color: #FAF9F6;
  --header-bg: rgba(250, 249, 246, 0.85);
  --container-bg: #FFFFFF;
  --user-message-bg: #F5F5F7;
  --model-message-bg: #FFFFFF;
  --input-bg: rgba(245, 245, 247, 0.7);
  --modal-bg: #FFFFFF;
  --text-color: #1A1A1A;
  --text-color-muted: #666666;
  --gold-accent: #8B6B34;
  --border-color: rgba(139, 107, 52, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-accent) transparent;
}


html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

body.sandbox-active {
  overflow: hidden !important;
}

.chat-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1200px;
  /* Largura ampliada para acomodar a barra de input premium */
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.chat-header {
  height: 60px;
  padding: 0 2rem;
  background-color: var(--header-bg);
  backdrop-filter: var(--glass-effect);
  border-bottom: 0.5px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.0px;
}

.logo h1 {
  font-family: var(--font-editorial);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--gold-accent);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scroll-behavior: smooth;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 1rem 2rem;
  max-width: 1150px;
  /* Alinhado com a largura da barra de input */
  margin: 0 auto;
  overflow: hidden;
}

.logo-icon-large {
  width: 50px;
  height: 50px;
  stroke: var(--gold-accent);
  opacity: 0.15;
  margin-bottom: 2.5rem;
  filter: drop-shadow(0 0 15px var(--poly-gold-glow));
}

#premium-headline {
  font-family: var(--font-editorial);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 3rem;
  color: var(--text-color);
  letter-spacing: -0.01em;
  animation: premiumFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ariel-horizontal-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 4rem);
  /* Gap responsivo e mais flexível */
  margin-bottom: 2rem;
  /* Reduzido de 4rem */
  width: 100%;
}

.ariel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  opacity: 0;
  animation: premiumFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ariel-col:nth-child(1) {
  animation-delay: 0.1s;
}

.ariel-col:nth-child(2) {
  animation-delay: 0.2s;
}

.ariel-col:nth-child(3) {
  animation-delay: 0.3s;
}

.ariel-col:nth-child(4) {
  animation-delay: 0.4s;
}

.ariel-col:nth-child(5) {
  animation-delay: 0.5s;
}

.ariel-symbol {
  font-family: var(--font-editorial);
  font-size: 2.8rem;
  font-weight: 300;
  background: var(--gold-accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.2em;
  transition: filter 0.3s ease;
}

.ariel-symbol:hover {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.ariel-desc {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #999999;
  opacity: 0.8;
  white-space: nowrap;
}

.ariel-editorial-subtitle {
  font-size: 0.95rem;
  color: var(--text-color-muted);
  max-width: 540px;
  line-height: 1.8;
  font-weight: 300;
  opacity: 0;
  animation: premiumFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
  letter-spacing: 0.03em;
}

@keyframes premiumFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Premium Chat Input Refinement --- */
.chat-input {
  padding: 1.5rem 1rem 2.5rem;
  /* Reduzido padding lateral para permitir expansão */
  background: transparent;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.input-row {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 0.5px solid rgba(212, 175, 55, 0.2);
  border-radius: 24px;
  /* Ligeiramente menos arredondado para parecer mais largo */
  padding: 0.85rem 1.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  max-width: 900px;
  /* Alinhado visualmente com a extensão do acrônimo */
  margin: 0 auto;
}

.input-row textarea {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.5rem;
  resize: none;
  min-height: 24px;
  max-height: 200px;
  outline: none;
  flex: 1;
}

.input-row textarea::placeholder {
  color: var(--text-color-muted);
  font-style: italic;
  opacity: 0.5;
}

.input-row:focus-within {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.15);
  /* Glow solicitado */
}

.input-row .icon-btn {
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.input-row .icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: transparent;
  color: var(--gold-accent);
}

.icon-btn svg,
.send-btn svg,
.logo-icon {
  stroke-width: 1.0px !important;
}

.send-btn {
  background: transparent;
  border: none;
  color: var(--gold-accent);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.send-btn:hover {
  transform: translateX(3px) scale(1.1);
}

/* --- Limpeza de Animações Antigas --- */
@keyframes premiumFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ariel-line:nth-child(5) {
  animation-delay: 0.5s;
}

.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2rem 0 1rem;
}

.date-separator::before,
.date-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
  margin: 0 1rem;
}

.sticky-date-header {
  position: sticky;
  top: 10px;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: var(--glass-effect);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-accent);
  margin: 0 auto;
  width: fit-content;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px var(--shadow-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sticky-date-header.stuck {
  opacity: 1;
}

.message-wrapper {
  display: flex;
  gap: 1rem;
  max-width: 95%;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-wrapper {
  align-self: flex-end;
  flex-direction: row;
}

.model-wrapper {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--user-message-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0.5px solid var(--border-color);
  color: var(--gold-accent);
}

.model-avatar {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-accent-bright));
  color: var(--bg-color);
}

.message {
  padding: 1.25rem 1.5rem;
  border-radius: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 0.5px solid var(--border-color);
}

.user-message {
  background-color: var(--user-message-bg);
  color: var(--text-color);
  border-bottom-right-radius: 4px;
  border: 1px solid var(--border-color);
}

.model-message {
  background-color: var(--model-message-bg);
  color: var(--text-color);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

.message.error {
  background-color: rgba(229, 115, 115, 0.1);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.message h1,
.message h2,
.message h3 {
  font-family: var(--font-family-headings);
  margin: 1.5rem 0 0.75rem;
  color: var(--gold-accent);
}

.message h2 {
  font-size: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.message p {
  margin-bottom: 1rem;
}

.message p:last-child {
  margin-bottom: 0;
}

.message ul,
.message ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.message li {
  margin-bottom: 0.4rem;
}

.message code {
  background: rgba(200, 167, 90, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'Fira Code', monospace;
  color: var(--gold-accent);
}

.message pre {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.message pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.term-tooltip {
  border-bottom: 1px dashed var(--gold-accent);
  cursor: help;
  position: relative;
}

.term-tooltip::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--user-message-bg);
  color: var(--text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--gold-accent);
  font-size: 0.8rem;
  width: 220px;
  text-align: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.term-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.visible {
  display: flex;
}

.modal-content {
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90dvh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 50px var(--shadow-color);
  animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content h2 {
  font-family: var(--font-family-headings);
  color: var(--gold-accent);
  margin-bottom: 1rem;
}

.help-text {
  font-size: 0.85rem;
  color: var(--text-color-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

/* Coloring the native date picker icon to Gold */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(1) saturate(3) hue-rotate(15deg);
  cursor: pointer;
  border-radius: 4px;
  padding: 2px;
  transition: filter 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(0.9) sepia(1) saturate(3) hue-rotate(15deg) brightness(1.2);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold-accent);
}

/* --- Relationship Tools Styling --- */

.tools-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.25rem;
  margin-bottom: 2rem;
  gap: 0.25rem;
  border: 1px solid var(--border-color);
}

.tab {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-color-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-align: center;
}

.tab:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  background: var(--gold-accent);
  color: var(--bg-color);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Calendar Grid Fix */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.calendar-day {
  background: var(--modal-bg);
  min-height: 80px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.calendar-day.other-month {
  background: rgba(0, 0, 0, 0.2);
  opacity: 0.3;
}

.day-number {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.calendar-day.today .day-number {
  color: var(--gold-accent);
  background: var(--gold-accent-soft);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.connection-item-intention {
  font-size: 0.7rem;
  background: var(--gold-accent-soft);
  border-left: 2px solid var(--gold-accent);
  padding: 2px 4px;
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* Item Lists (Agreements, Diary, Needs) */
.agreement-item,
.diary-item,
.need-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.agreement-item:hover,
.diary-item:hover,
.need-item:hover {
  border-color: var(--gold-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.agreement-item-title,
.diary-item-title-text {
  font-family: var(--font-family-headings);
  font-size: 1.1rem;
  color: var(--gold-accent);
  margin-bottom: 0.5rem;
}

.agreement-item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.agreement-item-tag {
  font-size: 0.7rem;
  color: var(--gold-accent);
  background: var(--gold-accent-soft);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.agreement-item-date,
.diary-item-date,
.need-item-date {
  font-size: 0.75rem;
  color: var(--text-color-muted);
  margin-top: 0.5rem;
}

.diary-item-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.need-button {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.need-button:hover {
  border-color: var(--gold-accent);
  background: var(--gold-accent-soft);
}

.predefined-needs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* --- Agreement Templates Library (Surgical Fix) --- */
#agreement-templates-list {
  max-height: 50dvh;
  overflow-y: auto;
  overflow-x: hidden;
  /* CRITICAL: Prevent horizontal scrolling */
  padding-right: 0.75rem;
  /* Space for scrollbar */
  margin-top: 1rem;
  position: relative;
}

/* Scrollbar styling */
#agreement-templates-list::-webkit-scrollbar {
  width: 6px;
}

#agreement-templates-list::-webkit-scrollbar-thumb {
  background: var(--gold-accent);
  border-radius: 10px;
}

#agreement-templates-list::-webkit-scrollbar-track {
  background: transparent;
}

#agreement-templates-list::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: transparent !important;
  /* FIX: Remove visual artifact */
}

.template-category {
  margin-bottom: 2rem;
}

.template-category h3 {
  font-family: var(--font-family-headings);
  font-size: 0.9rem;
  color: var(--gold-accent);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.template-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  /* Ensure content doesn't leak */
}

.template-item:hover {
  border-color: var(--gold-accent);
  background: var(--gold-accent-soft);
  transform: translateX(4px);
  /* Reduced to prevent edge bumping */
}

.template-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold-accent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.template-item:hover::before {
  transform: translateX(0);
}

.template-title {
  font-family: var(--font-family-headings);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-accent);
  margin-bottom: 0.4rem;
}

.template-desc {
  font-size: 0.85rem;
  color: var(--text-color-muted);
  line-height: 1.5;
}

/* Stats Styling */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
}

.stat-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-accent);
  font-family: var(--font-family-headings);
}

.stat-card h4 {
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.stat-card-desc {
  font-size: 0.75rem;
  color: var(--text-color-muted);
}

/* Custom Select (Dropdown) premium fix */
.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-color);
  user-select: none;
}

.custom-select-trigger:hover,
.custom-select-trigger.active {
  border-color: var(--gold-accent);
  background: rgba(200, 167, 90, 0.05);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: var(--modal-bg);
  border: 1px solid var(--gold-accent);
  border-radius: 12px;
  z-index: 2000;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 30px var(--shadow-color);
  backdrop-filter: var(--glass-effect);
  max-height: 250px;
  overflow-y: auto;
}

.custom-select-menu.open {
  display: flex;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-option {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background 0.2s;
}

.custom-select-option:last-child {
  border-bottom: none;
}

.custom-select-option:hover {
  background: var(--gold-accent-soft);
}

.custom-select-option.selected {
  background: rgba(200, 167, 90, 0.1);
  border-left: 3px solid var(--gold-accent);
}

.option-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold-accent);
}

.option-desc {
  font-size: 0.7rem;
  color: var(--text-color-muted);
  line-height: 1.3;
}

/* Partner Cards refined styles */
.partner-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.partner-card:hover {
  border-color: rgba(200, 167, 90, 0.4);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.partner-name-input {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid var(--border-color) !important;
  color: var(--gold-accent) !important;
  font-family: var(--font-family-headings) !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  width: 100%;
  padding: 0.2rem 0 !important;
  margin-bottom: 1rem !important;
  outline: none;
  border-radius: 0 !important;
  transition: border-color 0.2s;
}

.partner-name-input:focus {
  border-color: var(--gold-accent) !important;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-color-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--gold-accent);
  background: var(--gold-accent-soft);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-accent-bright));
  color: var(--bg-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(200, 167, 90, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--gold-accent);
  border: 1px solid var(--gold-accent);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--gold-accent-soft);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:hover {
  background: var(--danger-color-hover);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.chat-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--input-bg);
  padding: 0.5rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s;
}

.input-row:focus-within {
  border-color: var(--gold-accent);
}

.input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-color);
  padding: 0.5rem 0;
  outline: none;
  font-size: 0.95rem;
}

.suggestion-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.suggestion-chip {
  background: var(--user-message-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.suggestion-chip:hover {
  border-color: var(--gold-accent);
  background: var(--gold-accent-soft);
}

/* Toast container */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-message {
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px var(--shadow-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
}

.toast-message.success {
  border-color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.toast-message.danger {
  border-color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.toast-message.info {
  border-color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Disclaimer Footer */
.chat-footer-disclaimer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.6;
  margin-top: 8px;
  padding-bottom: 4px;
  font-family: var(--font-primary);
  width: 100%;
}

/* Premium Thinking State */
.thinking-indicator-wrapper {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.thinking-indicator-wrapper .model-avatar svg {
  animation: thinkingPulse 2s infinite ease-in-out;
  filter: drop-shadow(0 0 8px var(--poly-gold-glow));
}

.thinking-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--model-message-bg);
  padding: 0.75rem 1.25rem;
  border-radius: 12px 24px 24px 12px;
  border: 1px solid var(--poly-gold-glow);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 0 20px var(--poly-purple-glow),
    0 0 15px var(--poly-blue-glow);
  position: relative;
  overflow: hidden;
}

.thinking-bubble::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(200, 167, 90, 0.05),
      transparent);
  animation: thinkingShimmer 2.5s infinite linear;
}

.thinking-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  font-family: var(--font-primary);
}

/* O indicador de digitação agora mostra apenas texto para melhor acessibilidade */
.typing-dots {
  display: none;
}

@keyframes thinkingPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px var(--poly-blue-glow)) drop-shadow(0 0 8px var(--poly-gold-glow));
  }

  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px var(--poly-magenta-glow)) drop-shadow(0 0 16px var(--poly-gold-glow));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px var(--poly-blue-glow)) drop-shadow(0 0 8px var(--poly-gold-glow));
  }
}

@keyframes thinkingShimmer {
  0% {
    left: -100%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Hover do Botão Live - Garantindo Consistência Dourada */
#live-session-btn:hover {
  transform: scale(1.1);
  background: var(--gold-accent-soft) !important;
}

#live-session-btn:hover svg {
  color: var(--gold-accent) !important;
  stroke: var(--gold-accent) !important;
}

/* 🎤 Feedback de Voz Unificado (Ditado, Live e Leitura) */
#mic-btn.active,
#live-session-btn.active,
#tts-btn.speaking {
  animation: ttsSoundWaves 3s infinite ease-in-out;
  border-radius: 50%;
  color: white !important;
}

#mic-btn.active svg,
#live-session-btn.active svg,
#tts-btn.speaking svg {
  filter: drop-shadow(0 0 6px var(--poly-gold-glow));
  color: white !important;
  stroke: white !important;
}

@keyframes ttsSoundWaves {

  0%,
  100% {
    background-color: var(--poly-gold-glow);
    /* Ouro */
    box-shadow: 0 0 10px var(--poly-gold-glow);
  }

  33% {
    background-color: var(--poly-blue-glow);
    /* Azul Poliamor */
    box-shadow: 0 0 12px var(--poly-blue-glow);
  }

  66% {
    background-color: var(--poly-magenta-glow);
    /* Magenta Poliamor */
    box-shadow: 0 0 12px var(--poly-magenta-glow);
  }
}


/* Thinking Progress Bar */
.input-row {
  position: relative;
  overflow: hidden;
  /* Ensure progress bar stays within bounds */
}

.thinking-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--poly-gradient);
  background-size: 200% 200%;
  box-shadow: 0 0 20px var(--poly-magenta-glow), 0 0 30px var(--poly-blue-glow);
  transition: width 0.3s ease;
  z-index: 10;
  display: none;
}

.input-row.loading .thinking-progress-bar {
  display: block;
  animation: progressPulse 6s forwards cubic-bezier(0.1, 0.5, 0.5, 1), polyGradientMove 3s infinite linear;
}

@keyframes progressPulse {
  0% {
    width: 0%;
    background: var(--poly-blue);
  }

  30% {
    width: 40%;
    background: var(--poly-magenta);
  }

  60% {
    width: 75%;
    background: var(--poly-purple);
  }

  100% {
    width: 95%;
    background: var(--gold-accent);
  }
}

@keyframes polyGradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 🛡️ Guardião de Acordos (Guardian) Styles - Contextual Mode */
.guardian-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 191, 0, 0.05);
  border: 0.5px solid rgba(255, 191, 0, 0.2);
  margin-bottom: 0.75rem;
  animation: premiumFadeUp 0.5s ease-out;
}

.amber-light {
  width: 8px;
  height: 8px;
  background-color: var(--amber-alert);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--amber-alert-glow);
  animation: breathingLight 2.5s infinite ease-in-out;
}

.guardian-text {
  font-family: var(--font-primary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-alert);
  font-weight: 600;
}

@keyframes breathingLight {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
    box-shadow: 0 0 5px var(--amber-alert-glow);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--amber-alert-glow);
  }
}

/* --- Profiles Tabs & Custom Selects --- */
.profiles-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  border-bottom: 0.5px solid var(--border-color);
  padding-bottom: 0px;
}

.profile-tab {
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-color-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.75rem 1.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.profile-tab:hover {
  color: var(--text-color);
}

.profile-tab.active {
  color: var(--text-color);
  border-bottom-color: var(--gold-accent) !important;
}

.user-card {
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), transparent) !important;
  cursor: default !important;
}

.user-card:hover {
  border-color: var(--gold-accent) !important;
}

.user-card .remove-partner-btn {
  display: none !important;
}

.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
}

.custom-select-trigger:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.custom-select-trigger.active {
  border-color: var(--gold-accent);
  box-shadow: 0 0 15px var(--poly-gold-glow);
}

.custom-select-trigger svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.custom-select-trigger.active svg {
  transform: rotate(180deg);
  opacity: 1;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  z-index: 1100;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  animation: premiumFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
}

.custom-select-menu::-webkit-scrollbar {
  width: 6px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  background: var(--gold-accent);
  border-radius: 10px;
}

.custom-select-menu::-webkit-scrollbar-track {
  background: transparent;
}

/* Group Headers for Custom Select */
.custom-select-group-header {
  padding: 0.6rem 1rem 0.3rem !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: var(--gold-accent) !important;
  opacity: 0.4 !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 0.5px solid rgba(212, 175, 55, 0.1);
  margin-top: 0.5rem;
}

/* Premium Toggle Switch */
.premium-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.premium-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked+.switch-slider {
  background-color: var(--gold-accent);
}

input:checked+.switch-slider:before {
  transform: translateX(18px);
}

.custom-select-menu.open {
  display: block;
}

.custom-select-option {
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.03);
}

.custom-select-option:last-child {
  border-bottom: none;
}

.custom-select-option:hover {
  background: var(--gold-accent-soft);
  padding-left: 1.25rem;
}

.custom-select-option.selected {
  background: rgba(212, 175, 55, 0.1);
  border-left: 3px solid var(--gold-accent);
}

.option-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-accent);
  margin-bottom: 0.2rem;
}

.option-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-color-muted);
  line-height: 1.3;
}

/* --- Admin Panel & Technical Settings --- */
.admin-warning {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--amber-alert);
  background: rgba(255, 191, 0, 0.05);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--amber-alert);
  line-height: 1.4;
}

.admin-warning-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-color-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-color);
  background: var(--gold-accent-soft);
}

.tab-btn.active {
  color: var(--text-color);
  border-bottom-color: var(--gold-accent);
}

/* --- Premium Live Dock --- */
#live-session-controls {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 450px;
  background: rgba(15, 15, 15, 0.4);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 30px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  transition: box-shadow 0.6s ease, border-color 0.6s ease;
  animation: dockEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#live-session-controls.active-listening {
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.4);
}

@keyframes dockEntrance {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* --- Live Video Monitor --- */
.live-monitor-container {
  display: none;
  position: relative;
  width: 140px;
  /* Changed from 180px */
  height: 90px;
  /* Changed from 120px */
  border-radius: 20px;
  /* Changed from 12px */
  overflow: hidden;
  border: 1.5px solid var(--gold-accent);
  box-shadow: 0 0 20px rgba(139, 107, 52, 0.3);
  /* Changed from 0 8px 24px rgba(0, 0, 0, 0.4) */
  background: #000;
  margin-bottom: 0;
  /* Changed from 0.5rem */
  animation: premiumFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-monitor-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  /* Mirror view */
}

.live-monitor-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--gold-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-monitor-badge::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: #ff4b4b;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff4b4b;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Privacy Overlay */
.live-monitor-privacy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-accent);
  z-index: 2;
  animation: premiumFadeIn 0.3s ease-out;
}

/* Monitor Action Button (Privacy Toggle) */
.monitor-action-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}

.monitor-action-btn:hover {
  background: var(--gold-accent);
  border-color: var(--gold-accent);
  transform: scale(1.1);
}

.monitor-action-btn.active {
  background: var(--gold-accent);
  color: var(--bg-color);
}

/* Audio Wave Visualizer */
.live-audio-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.wave-bar {
  width: 2px;
  height: 8px;
  background: var(--gold-accent);
  border-radius: 2px;
  animation: wavePulse 1.2s ease-in-out infinite;
}

@keyframes wavePulse {

  0%,
  100% {
    height: 8px;
  }

  50% {
    height: 18px;
  }
}

.wave-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
  animation-delay: 0.4s;
}

/* Redesigned End Session Button */
.btn-end-premium {
  background: transparent;
  border: 1px solid rgba(229, 115, 115, 0.4);
  color: #e57373;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-family: var(--font-headings);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-end-premium:hover {
  background: rgba(229, 115, 115, 0.1);
  border-color: #e57373;
  box-shadow: 0 0 15px rgba(229, 115, 115, 0.2);
  transform: translateY(-2px);
}

.btn-end-premium svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* --- ARIEL Sandbox: Laboratory Aesthetic --- */
#sandbox-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 7, 0.98);
  backdrop-filter: blur(30px);
  z-index: 5000;
  flex-direction: column;
  padding: 2rem;
  overflow: hidden;
  /* Prevent global scroll */
  animation: sandboxEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sandboxEntrance {
  from {
    opacity: 0;
    transform: scale(1.05);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sandbox-overlay {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  margin-bottom: 2rem;
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(10px);
  gap: 20px;
}

.sandbox-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sandbox-global-score {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}

.score-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--gold-accent);
  letter-spacing: 1px;
  font-weight: 700;
}

.score-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-headings);
}

.sandbox-tone-quick-switcher {
  flex: 1;
  max-width: 280px;
  display: flex;
  justify-content: center;
}

.premium-mini-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-accent);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.premium-mini-select:hover {
  background-color: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.premium-mini-select:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.premium-mini-select optgroup {
  background: #111;
  color: #888;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.premium-mini-select option {
  background: #1a1a1a;
  color: #eee;
  font-weight: 400;
  text-transform: none;
  padding: 10px;
}

.sandbox-week {
  font-family: var(--font-headings);
  font-size: 0.9rem;
  color: var(--gold-accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.8;
}

.sandbox-persona-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(212, 175, 55, 0.05);
  padding: 4px 12px;
  border-radius: 30px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.persona-name {
  color: var(--gold-accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* --- Dashboard Styles --- */
.sandbox-dashboard {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 24px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sandbox-metric-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sandbox-metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-color-muted);
  font-weight: 700;
}

.sandbox-divider-v {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
}

.sandbox-cnv-pills {
  display: flex;
  gap: 6px;
}

.cnv-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  filter: grayscale(1);
  opacity: 0.3;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cnv-pill.active {
  filter: grayscale(0);
  opacity: 1;
  background: var(--gold-accent-soft);
  border-color: var(--gold-accent);
  box-shadow: 0 0 10px var(--poly-gold-glow);
  transform: scale(1.1);
}

.sandbox-attempts-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}

.sandbox-attempts-badge.warning {
  background: rgba(255, 82, 82, 0.1);
  color: #ff5252;
  border: 1px solid #ff5252;
}

.sandbox-stress-bar-container {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.sandbox-stress-bar {
  height: 100%;
  transition: width 0.5s ease, background 0.5s ease;
}

.sandbox-stress-bar.level-0 {
  background: #00ff88;
}

.sandbox-stress-bar.level-1 {
  background: #ffeb3b;
}

.sandbox-stress-bar.level-2 {
  background: #ff9800;
}

.sandbox-stress-bar.level-3 {
  background: #f44336;
}

.sandbox-stress-bar.level-4 {
  background: #ff00ff;
}

.sandbox-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sandbox-messages-area::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

.sandbox-overlay * {
  scrollbar-width: none !important;
}

.sandbox-overlay *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

.sandbox-message {
  max-width: 90%;
  width: 100%;
  min-width: 0;
  /* Crucial for flex wrapping */
  line-height: 1.6;
  font-size: 0.95rem;
  animation: slideUp 0.3s ease-out;
  position: relative;
  font-family: var(--font-family);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal !important;
}

.sandbox-message p {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: break-word;
}

.sandbox-message.user {
  align-self: flex-end;
  background-color: var(--user-message-bg);
  color: var(--text-color);
  padding: 1.25rem 1.5rem;
  border-radius: 20px 20px 4px 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sandbox-message.model {
  align-self: flex-start;
  width: 100%;
  max-width: 850px;
}

.coach-block {
  background-color: var(--gold-accent-soft);
  border-left: 3px solid var(--gold-accent);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 4px 20px 20px 4px;
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.7;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* Coach Premium Blocks */
.coach-block-premium {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 1.5rem;
  animation: slideDown 0.4s ease-out;
}

/* --- Maestria Suggestion Card --- */
.maestria-suggestion-card {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.maestria-suggestion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: 0.5s;
}

.maestria-suggestion-card:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
}

.maestria-suggestion-card:hover::before {
  left: 100%;
}

.maestria-suggestion-card.clicked {
  transform: scale(0.98);
  background: var(--gold-accent-soft);
}

.maestria-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--gold-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.maestria-content {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
  font-style: italic;
  opacity: 0.9;
}

.maestria-tip {
  margin-top: 10px;
  font-size: 0.65rem;
  color: var(--text-color-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.coach-sub-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.coach-sub-block:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.coach-sub-block.analysis {
  border-left: 4px solid var(--gold-accent);
}

.coach-sub-block.suggestion {
  border-left: 4px solid #4CAF50;
  background: rgba(76, 175, 80, 0.03);
}

.coach-sub-block .block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.coach-sub-block .block-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.coach-sub-block.analysis .block-icon svg,
.coach-sub-block.analysis .block-title {
  color: var(--gold-accent);
}

.coach-sub-block.suggestion .block-icon svg,
.coach-sub-block.suggestion .block-title {
  color: #4CAF50;
}

.coach-sub-block .block-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.coach-sub-block .block-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.coach-sub-block .block-content p {
  margin-bottom: 12px;
}

.coach-sub-block .block-content ul,
.coach-sub-block .block-content ol {
  margin-bottom: 12px;
  padding-left: 20px;
  list-style-position: outside;
}

.coach-sub-block .block-content li {
  margin-bottom: 6px;
}

.coach-block-premium strong {
  display: inline;
  color: inherit;
}

.persona-text-container {
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
  /* Prevent leakage */
}

.persona-text {
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 1.5rem 2.8rem 3.5rem 1.5rem;
  /* Large right padding for audio button */
  border-radius: 16px;
  color: var(--text-color);
  font-size: 1.05rem;
  line-height: 1.7;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  backdrop-filter: blur(5px);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal !important;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  animation: fadeInUp 0.4s ease-out;
}

.persona-text p {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-bottom: 1rem;
}

.persona-text p:last-child {
  margin-bottom: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Navigation & Controls --- */
.sandbox-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-trash-minimal {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--text-color-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-trash-minimal:hover {
  background: var(--gold-accent-soft);
  border-color: var(--gold-accent);
  color: var(--gold-accent);
}

.btn-trash-minimal svg {
  width: 16px;
  height: 16px;
}

.btn-close-minimal {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-minimal:hover {
  border-color: #ff5252;
  color: #ff5252;
}

/* --- Premium Sandbox Input Area --- */
.sandbox-input-shell {
  max-width: 850px;
  margin: 1.5rem auto 0;
  width: 100%;
}

.sandbox-input-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.sandbox-input-container:focus-within {
  border-color: var(--gold-accent);
  background: var(--gold-accent-soft);
  box-shadow: 0 8px 32px var(--poly-gold-glow);
}

#sandbox-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 0;
  resize: none;
  height: 44px;
  outline: none;
  line-height: 1.4;
}

.sandbox-input-actions {
  display: flex;
  gap: 8px;
}

.icon-btn-premium {
  background: transparent;
  border: none;
  color: var(--text-color-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn-premium:hover:not(.disabled) {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  transform: translateY(-2px);
}

.icon-btn-premium.active {
  background: var(--gold-accent-soft);
  color: var(--gold-accent);
  animation: ttsSoundWaves 3s infinite ease-in-out;
}

.icon-btn-premium.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.icon-btn-premium svg {
  display: block;
}

#send-sandbox:hover:not(.disabled) {
  color: var(--gold-accent);
  filter: drop-shadow(0 0 8px var(--poly-gold-glow));
}

.sandbox-msg-audio-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: var(--gold-accent-soft);
  border: 1px solid var(--border-color);
  color: var(--gold-accent);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  z-index: 5;
}

.sandbox-msg-audio-btn:hover {
  color: var(--gold-accent);
  background: var(--gold-accent-soft);
}

/* --- Conclusion Overlay (Gamificação) --- */
.sandbox-conclusion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(15px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease-out;
}

.conclusion-card {
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 24px;
  padding: 3rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.1);
  animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.conclusion-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.conclusion-title {
  font-family: var(--font-headings);
  font-size: 1.8rem;
  color: var(--gold-accent);
  margin-bottom: 0.5rem;
}

.conclusion-subtitle {
  color: var(--text-color-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.conclusion-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.stat-lab {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--gold-accent);
  letter-spacing: 2px;
}

.conclusion-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-conclusion {
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-conclusion.primary.glow {
  background: var(--gold-accent);
  color: #000;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  }

  50% {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
  }

  100% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  }
}

.text-gold {
  color: var(--gold-accent) !important;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.unlock-hint {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-color-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.success-unlock {
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.1), transparent 300px), var(--surface-2);
}

/* Emotion Trajectory */
.emotion-trajectory {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  text-align: center;
}

.trajectory-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-color-muted);
  margin-bottom: 1rem;
}

.trajectory-map {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.emotion-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.emotion-emoji {
  font-size: 1.4rem;
}

.emotion-dot-bar {
  width: 20px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.emotion-dot {
  width: 100%;
  height: 100%;
  border-radius: 2px;
}

.btn-conclusion.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-conclusion.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-conclusion.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
}

/* Premium Custom Modals */
.ariel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.ariel-modal-container {
  background: linear-gradient(135deg, var(--surface-2), #1a1a1a);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.1);
  animation: modalScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ariel-modal-header {
  margin-bottom: 1.5rem;
}

.ariel-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.ariel-modal-title {
  color: var(--gold-accent);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.ariel-modal-message {
  color: var(--text-color-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.ariel-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-ariel-modal {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.btn-ariel-modal.primary {
  background: var(--gold-accent);
  color: #000;
  border: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-ariel-modal.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-ariel-modal.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color-muted);
}

.btn-ariel-modal.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Feature 4: Alternative Suggestions - Final Polish */
.suggestions-wide-refined {
  max-width: 900px !important;
  width: 95% !important;
}

.ariel-modal-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-color-muted);
  margin-top: 0.5rem;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 25px;
  margin-top: 1.5rem;
}

.suggestion-card {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
}

.suggestion-card:hover {
  border-color: var(--gold-accent);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
  transform: translateY(-3px);
  background: rgba(212, 175, 55, 0.03);
}

.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.suggestion-label {
  font-weight: 700;
  font-size: 12px;
  color: var(--gold-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.suggestion-score {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.suggestion-text {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 15px;
  padding: 12px;
  background: rgba(212, 175, 55, 0.05);
  border-left: 3px solid var(--gold-accent);
  border-radius: 4px;
  color: #fff;
  font-style: italic;
  flex: 1;
}

.suggestion-explanation {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  color: var(--text-color-muted);
}

.ariel-modal-actions-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.suggestions-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-color-muted);
}

.btn-full-width {
  width: 100%;
}

@media (max-width: 768px) {
  .suggestions-wide-refined {
    width: 95% !important;
    max-height: 85vh;
    padding: 16px !important;
    overflow-y: auto;
  }

  .suggestions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .suggestions-header {
    margin-bottom: 18px;
  }

  .suggestions-header h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .suggestions-header p {
    font-size: 13px;
    line-height: 1.4;
  }

  .suggestion-card {
    padding: 16px;
  }

  .suggestion-text {
    font-size: 12px;
    line-height: 1.4;
    padding: 10px;
    margin-bottom: 10px;
  }

  .suggestion-explanation {
    font-size: 11px;
    line-height: 1.4;
    padding: 8px;
    margin-bottom: 12px;
  }

  .suggestion-label {
    font-size: 11px;
  }

  .suggestion-score {
    font-size: 10px;
    padding: 2px 8px;
  }
}

@media (max-width: 480px) {
  .suggestions-wide-refined {
    padding: 12px !important;
  }

  .suggestion-card {
    padding: 12px;
  }

  .suggestions-header h3 {
    font-size: 16px;
  }

  .suggestion-text {
    font-size: 11px;
    padding: 8px;
  }
}

/* Feature 3: Annotated Replay Timeline */
.replay-container {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

.replay-container::-webkit-scrollbar {
  width: 4px;
}

.replay-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 2px;
}

.replay-container h2 {
  font-size: 1.2rem;
  color: var(--gold-accent);
  margin-bottom: 1.5rem;
  text-align: center;
}

.replay-timeline {
  position: relative;
  padding-left: 2rem;
}

.replay-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-accent), transparent);
  opacity: 0.3;
}

.replay-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.replay-card::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-accent);
  box-shadow: 0 0 10px var(--gold-accent);
  border: 2px solid var(--surface-2);
}

.turn-number {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-color-muted);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.user-message-replay,
.persona-response-replay {
  margin-bottom: 1rem;
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.user-message-replay {
  background: rgba(212, 175, 55, 0.05);
  border-left: 3px solid var(--gold-accent);
}

.persona-response-replay {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.cnv-breakdown-replay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.breakdown-item-replay {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.breakdown-item-replay span {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-color-muted);
}

.progress-bar-replay {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-replay>div {
  height: 100%;
  background: var(--gold-accent);
  transition: width 0.5s ease-out;
}

.emotion-shift-replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin-bottom: 1rem;
}

.shift-pos {
  color: #4ade80;
}

.shift-neg {
  color: #f87171;
}

.suggestions-replay {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.suggestions-replay summary {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-accent);
  cursor: pointer;
  list-style: none;
}

.suggestions-replay summary::-webkit-details-marker {
  display: none;
}

.suggestions-replay ul {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
}

.suggestions-replay li {
  font-size: 0.8rem;
  color: var(--text-color-muted);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

/* Badge para "Versão Recomendada" */
.suggestion-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
  z-index: 10;
}

/* Card recomendado tem destaque visual */
.suggestion-card--recommended {
  position: relative;
  border: 2px solid #ffd700 !important;
  background: linear-gradient(135deg,
      rgba(255, 215, 0, 0.02) 0%,
      var(--modal-bg) 100%) !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15) !important;
}

.suggestion-card--recommended:hover {
  border-color: #ffed4e !important;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.25) !important;
  transform: translateY(-3px);
}

/* Ajuste padding-top pro badge não sobrepor */
.suggestion-card--recommended .suggestion-header {
  margin-top: 8px;
}

/* "Manter versão original" - Estilo Refinado */
.suggestions-keep-original {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 2px dashed var(--border-color) !important;
  color: var(--text-color-muted) !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  margin-bottom: 1rem;
}

.suggestions-keep-original:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--gold-accent) !important;
  color: var(--text-color) !important;
}

/* Dark mode: ajustar cores do badge */
[data-color-scheme="dark"] .suggestion-badge {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

[data-color-scheme="dark"] .suggestion-card--recommended {
  border-color: #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2) !important;
}

/* Phase 3: Live Training Overlay */
#live-training-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  transition: opacity 0.3s ease;
}

#live-training-overlay.hidden {
  display: none;
  opacity: 0;
}

.training-container {
  width: 90%;
  max-width: 600px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: 'Inter', sans-serif;
}

.training-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid #333;
  padding-bottom: 15px;
}

.training-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #d4b46e;
  /* Premium Gold */
  margin: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #bbb;
}

.form-group select {
  width: 100%;
  padding: 12px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.form-group select:focus {
  border-color: #d4b46e;
}

.action-buttons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, #d4b46e, #b8860b);
  color: #000;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s;
}

.primary-btn:hover {
  transform: scale(1.02);
}

.danger-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.active-session {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 40px 0;
}

.visualizer-container {
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.audio-blob {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #d4b46e 0%, transparent 70%);
  border-radius: 50%;
  transition: transform 0.1s ease-out;
  box-shadow: 0 0 20px rgba(212, 180, 110, 0.3);
}

.instruction {
  font-size: 1.1rem;
  color: #d4b46e;
  text-align: center;
}

/* FEEDBACK CHARTS */
.feedback-charts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  justify-content: center;
}

.chart-card {
  background: #2a2a2a;
  padding: 15px;
  border-radius: 10px;
  flex: 1;
  min-width: 140px;
  text-align: center;
  border: 1px solid #444;
}

.donut-chart {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  background: #2a2a2a;
  border-radius: 50%;
}

.donut-chart span {
  position: relative;
  z-index: 2;
  font-weight: bold;
  color: #fff;
  font-size: 1.2rem;
}

.metric-label {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 5px;
}

.big-score {
  width: 120px;
  height: 120px;
  font-size: 2rem;
}

.big-score::before {
  width: 100px;
  height: 100px;
}

/* Colors for metrics */
.chart-clarity {
  color: var(--gold-accent);
}

.chart-empathy {
  color: var(--magenta-accent);
}

.chart-confidence {
  color: #4facfe;
}

.chart-pace {
  color: #00f260;
}

/* PIE CHART DASHBOARD */
.pie-dashboard {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px;
}

.pie-chart-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.pie-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pie-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: #1a1a1a;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.pie-score {
  font-size: 2.5rem;
  font-weight: bold;
  color: #fff;
  line-height: 1;
}

.pie-label {
  font-size: 0.8rem;
  color: #999;
  margin-top: 5px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 200px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-size: 0.95rem;
  color: #ccc;
}

.legend-value {
  font-weight: bold;
  color: #fff;
  min-width: 35px;
  text-align: right;
}