/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-family-base);
  background: var(--color-background);
  color: var(--color-on-background);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   App shell
   ========================================================================== */
.app {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   Sidebar (navbar vertical)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--gradient-primary-vertical);
  color: var(--neutral-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 10px;
  margin-bottom: 8px;
}

.sidebar__logo-img {
  width: 100%;
  height: auto;
  max-width: 100px;
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 10px;
}

.sidebar__footer {
  width: 100%;
  padding: 0 10px;
  border-top: 1px solid rgba(247, 245, 238, 0.14);
  padding-top: 14px;
}

.navbtn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: var(--radius-m);
  color: rgba(247, 245, 238, 0.68);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.navbtn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbtn__label {
  font-size: 15px;
  font-weight: var(--medium-m-weight);
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.01em;
}

.navbtn:hover {
  background: rgba(247, 245, 238, 0.10);
  color: var(--neutral-50);
  transform: translateY(-1px);
}

.navbtn.is-active {
  background: rgba(247, 245, 238, 0.14);
  color: var(--neutral-50);
  box-shadow: inset 0 0 0 1px rgba(247, 245, 238, 0.18);
}

.navbtn.is-active .navbtn__icon {
  color: var(--secondary-400);
}

.navbtn--ghost {
  color: rgba(247, 245, 238, 0.5);
}

.navbtn__badge {
  font-size: 8px;
  font-weight: var(--medium-m-weight);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(247, 245, 238, 0.16);
  color: rgba(247, 245, 238, 0.85);
}

.navbtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.navbtn:disabled:hover {
  background: none;
  color: rgba(247, 245, 238, 0.68);
  transform: none;
}

/* ==========================================================================
   Main / chat hero
   ========================================================================== */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.chat-hero {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.chat-hero__eyebrow {
  margin: 0 0 12px;
  font-size: var(--regular-s-size);
  line-height: var(--regular-s-lh);
  font-weight: var(--medium-m-weight);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.chat-hero__title {
  margin: 0 0 16px;
  font-size: var(--h1-size);
  line-height: var(--h1-lh);
  font-weight: var(--h1-weight);
  color: var(--color-on-background);
}

.chat-hero__subtitle {
  margin: 0 0 36px;
  max-width: 520px;
  font-size: var(--regular-l-size);
  line-height: var(--regular-l-lh);
  font-weight: var(--regular-l-weight);
  color: var(--color-muted);
}

/* ---- Chat bar (com "navbar" interna de presets + botão estilo IA) ---- */
.chat-thread-header {
  display: none;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 8px;
}

.chat-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--regular-s-size);
  font-weight: var(--medium-m-weight);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chat-reset:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.main--chat-active .chat-thread-header {
  display: flex;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  overflow-y: auto;
  padding: 4px 4px 20px;
}

.chat-thread:empty {
  display: none;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  font-size: var(--regular-l-size);
  line-height: var(--regular-l-lh);
  font-weight: var(--regular-l-weight);
}

.message p {
  margin: 0 0 10px;
}

.message p:last-child {
  margin-bottom: 0;
}

.message--user {
  align-self: flex-end;
  background: var(--gradient-primary-secondary-diag);
  color: var(--neutral-50);
  border-bottom-right-radius: 4px;
}

.message--assistant {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-on-surface);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-s1);
}

.message--typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-muted);
  animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Cursor piscando enquanto o texto é "gerado" token a token ---- */
.is-streaming::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--color-primary);
  animation: cursor-blink 0.8s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* ---- Contador de tokens gastos durante a "geração" (fica agrupado no final da mensagem) ---- */
.token-meter {
  display: block;
  margin-top: 6px;
  font-size: var(--regular-s-size);
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease;
}

.token-meter.is-fading {
  opacity: 0;
}

/* ---- Sugestões de copy (uma opção por linha, seleção única) ---- */
.copy-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.copy-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-size: var(--regular-l-size);
  line-height: var(--regular-l-lh);
  font-weight: var(--regular-l-weight);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.copy-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.copy-option.is-selected {
  border-color: var(--color-primary);
  background: var(--primary-50);
  color: var(--primary-700);
}

.copy-option__check {
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-option.is-selected .copy-option__check {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--neutral-50);
}

.copy-options.is-locked .copy-option:not(.is-selected) {
  opacity: 0.5;
  pointer-events: none;
}

.delivered-image__btn {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: var(--regular-s-size);
  font-weight: var(--medium-m-weight);
  color: var(--color-on-surface);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.delivered-image__btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.delivered-image__btn--primary {
  background: var(--gradient-primary-secondary-diag);
  border-color: transparent;
  color: var(--neutral-50);
}

.delivered-image__btn--primary:hover {
  color: var(--neutral-50);
  opacity: 0.9;
}

.delivered-image__btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* ---- Criativo entregue (imagem + legenda + aprovar/gerar outra) ---- */
.delivered-creative {
  width: 520px;
  max-width: 100%;
  margin-top: 4px;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-s1);
}

.delivered-creative__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--neutral-100);
  overflow: hidden;
}

.delivered-creative__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.delivered-creative__frame.is-loaded img {
  opacity: 1;
}

/* ---- Estado "gerando imagem": barra de progresso sobre o frame ---- */
.image-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  text-align: center;
}

.image-loading__label {
  font-size: var(--regular-s-size);
  color: var(--color-muted);
}

.image-loading__bar {
  width: 100%;
  max-width: 160px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
}

.image-loading__fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary-secondary-diag);
  border-radius: var(--radius-full);
}

.delivered-creative--stories {
  width: 520px;
}

.delivered-creative__frame--stories {
  aspect-ratio: 9 / 16;
}

.delivered-creative__caption {
  margin: 0;
  padding: 10px 12px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-on-surface);
}

.post-stats {
  margin: 6px 12px 0;
  font-size: 11px;
  color: var(--color-on-surface);
  opacity: 0.5;
  letter-spacing: 0.2px;
}

.delivered-creative__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
}

.delivered-creative__actions .delivered-image__btn {
  flex: 1 1 auto;
  min-width: 108px;
}

/* ---- Estado ativo: chat vira conversa (thread + input fixos) ---- */
.main--chat-active {
  align-items: stretch;
  padding: 24px;
}

.main--chat-active .chat-hero {
  height: 100%;
  max-width: 760px;
  align-items: stretch;
  text-align: left;
  justify-content: flex-start;
}

.main--chat-active .chat-hero__eyebrow,
.main--chat-active .chat-hero__title,
.main--chat-active .chat-hero__subtitle {
  display: none;
}

.main--chat-active .chat-thread {
  flex: 1;
  min-height: 0;
}

.chat-bar {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s4);
  padding: 12px;
  text-align: left;
}

.chat-bar__topbar {
  display: flex;
  align-items: center;
  padding: 2px 4px 10px;
}

.chat-bar__tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-size: var(--regular-s-size);
  font-weight: var(--medium-m-weight);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary-700);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  background: var(--primary-100);
}

.chip__badge {
  margin-left: 6px;
  font-size: 9px;
  font-weight: var(--medium-m-weight);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-muted);
  vertical-align: middle;
}

.chip:disabled {
  background: var(--neutral-100);
  color: var(--color-muted);
  cursor: not-allowed;
}

.chip:disabled:hover {
  background: var(--neutral-100);
}

.chat-bar__field {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 4px;
}

.chat-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.chat-ghost {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 8px;
  font-size: var(--regular-l-size);
  line-height: var(--regular-l-lh);
  font-weight: var(--regular-l-weight);
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.chat-ghost__typed {
  color: transparent;
}

.chat-ghost__completion {
  color: var(--color-muted);
  opacity: 0.55;
}

.chat-bar__textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  resize: none;
  border: none;
  background: transparent;
  color: var(--color-on-surface);
  font-size: var(--regular-l-size);
  line-height: var(--regular-l-lh);
  font-weight: var(--regular-l-weight);
  padding: 10px 8px;
  max-height: 160px;
}

.chat-bar__textarea:focus {
  outline: none;
}

.chat-bar__textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary-secondary-diag);
  color: var(--neutral-50);
  box-shadow: var(--shadow-s2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.chat-send:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: var(--shadow-s3);
}

.chat-send:active {
  transform: translateY(0) scale(0.97);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-s2);
}

.chat-send:disabled:hover {
  transform: none;
  box-shadow: var(--shadow-s2);
}

/* ==========================================================================
   Modal de configurações
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-width: 380px;
  background: var(--color-surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s5);
  overflow: hidden;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}

.modal__title {
  margin: 0;
  font-size: var(--h4-size);
  line-height: var(--h4-lh);
  font-weight: var(--h4-weight);
  color: var(--color-on-surface);
}

.modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  color: var(--color-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.modal__close:hover {
  background: var(--neutral-100);
  color: var(--color-on-surface);
}

.modal__body {
  padding: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-row__label {
  font-size: var(--regular-l-size);
  font-weight: var(--medium-m-weight);
  color: var(--color-on-surface);
}

.settings-row__hint {
  font-size: var(--regular-s-size);
  line-height: var(--regular-s-lh);
  color: var(--color-muted);
}

.theme-switch {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--neutral-200);
  padding: 3px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.theme-switch__thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-s2);
  transition: transform 0.2s ease;
}

.theme-switch[aria-checked="true"] {
  background: var(--color-primary);
}

.theme-switch[aria-checked="true"] .theme-switch__thumb {
  transform: translateX(18px);
}

.modal__footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--color-border);
}

.modal__footer .delivered-image__btn {
  width: 100%;
  text-align: center;
}

/* ---- Calendário do modal de agendamento ---- */
.calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar__label {
  font-size: var(--regular-l-size);
  font-weight: var(--medium-m-weight);
  color: var(--color-on-surface);
  text-transform: capitalize;
}

.calendar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  color: var(--color-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.calendar__nav:hover {
  background: var(--neutral-100);
  color: var(--color-on-surface);
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.calendar__weekdays span {
  display: block;
  text-align: center;
  font-size: var(--regular-s-size);
  color: var(--color-muted);
  font-weight: var(--medium-m-weight);
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: var(--regular-s-size);
  color: var(--color-on-surface);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.calendar__day:hover {
  background: var(--neutral-100);
}

.calendar__day.is-outside {
  color: var(--color-muted);
  opacity: 0.4;
}

.calendar__day.is-today {
  font-weight: var(--medium-m-weight);
  box-shadow: inset 0 0 0 1.5px var(--color-border);
}

.calendar__day.is-selected {
  background: var(--gradient-primary-secondary-diag);
  color: var(--neutral-50);
}

/* ==========================================================================
   Modal de agendamento
   ========================================================================== */
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px;
  border-top: 1px solid var(--color-outline, rgba(0,0,0,.1));
}

.schedule-cancel {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface);
  background: transparent;
  border: 1.5px solid var(--color-outline, rgba(0,0,0,.12));
  cursor: pointer;
  transition: background 0.15s;
}
.schedule-cancel:hover { background: var(--color-outline, rgba(0,0,0,.06)); }

.schedule-submit {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.schedule-submit:hover { opacity: .88; }

.schedule-form { display: flex; flex-direction: column; gap: 20px; }

.schedule-form__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-on-surface);
}

.schedule-form__platforms {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-opt { cursor: pointer; }

.platform-opt__radio { position: absolute; opacity: 0; width: 0; height: 0; }

.platform-opt__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1.5px solid var(--color-outline, rgba(0,0,0,.15));
  font-size: 13px;
  font-weight: 500;
  color: var(--color-on-surface);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}

.platform-opt__radio:checked + .platform-opt__pill {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  color: var(--color-primary);
}

.schedule-form__hidden-select { display: none; }

.schedule-form__row--inline {
  display: flex;
  gap: 16px;
}

.schedule-form__field { flex: 1; }

.schedule-form__input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--color-outline, rgba(0,0,0,.15));
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}
.schedule-form__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ==========================================================================
   Carrossel de criativos
   ========================================================================== */

/* Rail wrap: clipa verticalmente, deixa o "peek" do próximo slide visível na horizontal */
.carousel-rail-wrap {
  position: relative;
  overflow: hidden;
}

/* Rail: slides lado a lado com gap, animados por translateX */
.carousel-rail {
  display: flex;
  gap: 16px;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Cada item = 416px. Container = 520px → 88px do próximo fica visível (≈ 1/5) */
.carousel-rail__item {
  flex: 0 0 416px;
}

/* Preview escalado para caber em 416px (1080 × 0.3852 ≈ 416px) */
.carousel-preview-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 1080px;
  height: 1350px;
  transform: scale(0.3852);
  transform-origin: top left;
  pointer-events: none;
}

/* Botões prev / next — posicionados dentro dos 416px do slide ativo */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
  user-select: none;
}

.carousel-nav:hover:not(:disabled) { background: rgba(0, 0, 0, 0.75); }
.carousel-nav:disabled { opacity: 0.28; cursor: default; }
.carousel-nav--prev { left: 8px; }
.carousel-nav--next { left: 372px; } /* 416 - 8 - 36: dentro do slide ativo, não no peek */

/* Dots de navegação */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 2px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border, rgba(0,0,0,.15));
  transition: background 0.18s, transform 0.18s;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--color-primary);
  transform: scale(1.4);
}

/* Label "Capa · 1 / 5" */
.carousel-slide-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted, var(--color-on-surface));
  opacity: 0.55;
  padding: 2px 0 8px;
  letter-spacing: 0.4px;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 720px) {
  .app { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    padding: 12px 16px;
    z-index: 10;
  }

  .sidebar__logo { width: auto; padding: 0; margin: 0 12px 0 0; }
  .sidebar__logo-img { max-width: 96px; }

  .sidebar__nav {
    flex-direction: row;
    justify-content: flex-start;
    gap: 4px;
  }

  .navbtn { flex-direction: row; padding: 8px 12px; width: auto; }
  .navbtn__label { display: none; }
  .navbtn__badge { display: none; }

  .sidebar__footer { width: auto; border-top: none; padding: 0 0 0 8px; margin-left: auto; }

  .chat-hero__title { font-size: 28px; line-height: 34px; }
  .chat-hero__subtitle { font-size: var(--regular-m-size); line-height: var(--regular-m-lh); }

  .message { max-width: 92%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
