/* CorretoresAI — shell do aplicativo (dashboard, central, calendário, kanban) */

.app {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-deep);
}

.sidebar .brand { margin: 4px 6px 26px; font-size: 18px; }

.side-nav { display: grid; gap: 3px; }

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.side-nav a svg { width: 18px; height: 18px; flex: none; }
.side-nav a:hover { background: var(--surface); color: var(--text); }

.side-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.side-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}

/* Assistente IA: mesmo desenho dos itens de navegação, mas é um botão — abre a
   gaveta em vez de trocar de tela. O fio dourado separa navegar de conversar. */
.side-assistente {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.07);
  color: var(--gold-soft);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.side-assistente svg { width: 18px; height: 18px; flex: none; }

.side-assistente:hover {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.13);
}

body.assist-aberto .side-assistente {
  border-color: var(--gold-deep);
  background: rgba(201, 162, 39, 0.16);
}

.side-foot { margin-top: auto; display: grid; gap: 16px; }

.plan-box {
  padding: 15px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan-box strong { display: block; font-size: 13.5px; font-weight: 600; }

.plan-bar {
  height: 4px;
  margin: 11px 0 10px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.plan-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
}

.plan-box span { color: var(--text-dim); font-size: 12px; }

.side-links {
  display: grid;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.side-links a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.side-links a svg { width: 17px; height: 17px; flex: none; }
.side-links a:hover { color: var(--text); background: var(--surface); }

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.topbar-title strong { display: block; font-size: 15px; font-weight: 700; }
.topbar-title span { color: var(--text-dim); font-size: 12.5px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.user-chip:hover { border-color: var(--gold-deep); }
.user-chip b { display: block; font-size: 13px; font-weight: 600; }
.user-chip span { color: var(--gold-soft); font-size: 11.5px; }

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Área de conteúdo ---------- */

.view { padding: 34px 34px 60px; }

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}

.view-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.view-head p { margin: 0; color: var(--text-muted); font-size: 14.5px; }
.view-head .btn { margin-left: auto; }
.view-head .head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.view-head .head-actions .btn { margin-left: 0; }

/* Empilhado: o segundo botão desce sob o primeiro, ambos na mesma largura. */
.view-head .head-actions.is-empilhado { flex-direction: column; align-items: stretch; }

/* ---------- Filtros da biblioteca ---------- */

.filtros {
  padding: 20px 22px;
  margin-bottom: 24px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.busca { position: relative; margin-bottom: 16px; }

.busca svg {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-dim);
}

.busca input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.busca input::placeholder { color: var(--text-dim); }
.busca input:focus { outline: none; border-color: var(--gold-deep); }

.filtros-linha {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.filtros-linha select {
  width: 100%;
  padding: 11px 38px 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 18px center, right 13px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.filtros-linha select:focus { outline: none; border-color: var(--gold-deep); }

.filtros-rodape {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.filtros-rodape p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.filtros-rodape svg { width: 15px; height: 15px; color: var(--gold-soft); }
.filtros-rodape .link { margin-left: auto; font-size: 13px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Cartões de métrica */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px 24px 24px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stat-card .icon-tile { margin-bottom: 26px; }

.stat-card b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-card em { display: block; margin-top: 4px; font-size: 14px; font-style: normal; }
.stat-card span { color: var(--text-dim); font-size: 12.5px; }

/* Painéis */

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px 0;
}

.panel-head strong { display: block; font-size: 15px; font-weight: 700; }
.panel-head span { color: var(--text-dim); font-size: 12.5px; }

.panel-link {
  margin-left: auto;
  color: var(--gold-soft);
  font-size: 13px;
  white-space: nowrap;
}

.panel-body { padding: 20px 22px 22px; }

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 20px 60px;
  text-align: center;
}

.empty .icon-tile { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 10px; }
.empty .icon-tile svg { width: 24px; height: 24px; }
.empty strong { font-size: 15.5px; }
.empty p { margin: 0 0 18px; color: var(--text-dim); font-size: 13.5px; }

/* Calendário resumido */

.month-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.month-head strong { font-size: 14.5px; font-weight: 700; }
.month-nav { margin-left: auto; display: flex; gap: 6px; }

.nav-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-btn svg { width: 14px; height: 14px; }
.nav-btn:hover { color: var(--text); border-color: var(--gold-deep); }

.mini-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

.mini-month .wd {
  display: grid;
  place-items: center;
  height: 26px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
}

.mini-month .d {
  position: relative;
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.mini-month .d.is-out { color: var(--text-dim); opacity: 0.5; }
.mini-month .d.has-post::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.mini-month .d.is-week { background: var(--surface-2); }
.mini-month .d.is-today {
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
  font-weight: 700;
}
.mini-month .d.is-today::after { background: var(--on-gold); }

/* Atividades */

.activity { display: grid; gap: 18px; max-height: 320px; overflow-y: auto; }
.activity li { display: flex; gap: 13px; }

.activity.is-clickable { max-height: none; overflow: visible; gap: 6px; }

.activity.is-clickable li {
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.activity.is-clickable li:hover { background: var(--surface-2); }
.activity .icon-tile { width: 30px; height: 30px; border-radius: 9px; }
.activity .icon-tile svg { width: 15px; height: 15px; }
.activity p { margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.activity li > div { min-width: 0; }
.activity time { color: var(--text-dim); font-size: 12px; }

/* ---------- Formulário da central ---------- */

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.segmented button svg { width: 15px; height: 15px; }

.segmented button[aria-pressed="true"] {
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
}

.form-card {
  max-width: 820px;
  padding: 28px 30px 30px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.generate-btn {
  width: 100%;
  margin-top: 28px;
  padding: 17px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold) 45%, var(--gold-deep));
  color: var(--on-gold);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.generate-btn svg { width: 18px; height: 18px; }
.generate-btn:hover { filter: brightness(1.06); }

.generate-btn:disabled {
  filter: saturate(0.35) brightness(0.85);
  box-shadow: none;
  cursor: progress;
}

/* ---------- Calendário editorial ---------- */

.board-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
}

.board-bar .month-label { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.board-bar .spacer { margin-left: auto; }

.drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
}

.drag-hint .status-dot { color: var(--gold); }

.calendar-grid {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.calendar-head, .calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-head span {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.cal-day {
  min-height: 148px;
  padding: 10px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.cal-day:nth-child(7n) { border-right: 0; }
.calendar-week:last-child .cal-day { border-bottom: 0; }
.cal-day.is-out { background: var(--bg-deep); }
.cal-day.is-over { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--gold-deep); }

.cal-daynum {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
}

.cal-daynum:hover { border-color: var(--gold-deep); color: var(--gold-soft); }

.cal-day.is-today .cal-daynum {
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
  font-weight: 700;
}

/* ---------- Compromissos no calendário ----------
   Barra colorida à esquerda e ícone do tipo: o compromisso se distingue do
   card de conteúdo antes da leitura, só pela silhueta. */

.cal-day-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.cal-daynum { margin-bottom: 0; }

/* Só aparece ao passar o mouse no dia, para o mês não virar um mural de "+". */
.cal-day-mais {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.cal-day-mais svg { width: 13px; height: 13px; }
.cal-day:hover .cal-day-mais,
.cal-day-mais:focus-visible { opacity: 1; }
.cal-day-mais:hover { border-color: var(--gold-deep); color: var(--gold-soft); }

.cal-compromisso {
  margin-bottom: 8px;
  padding: 7px 9px 8px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--cor-tipo, var(--gold));
  border-radius: 9px;
  background: color-mix(in srgb, var(--cor-tipo, var(--gold)) 10%, var(--surface-2));
  cursor: grab;
}

.cal-compromisso:active { cursor: grabbing; }
.cal-compromisso.is-dragging { opacity: 0.45; }

.cal-compromisso-titulo {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 3px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.cal-compromisso-titulo svg {
  width: 12px;
  height: 12px;
  flex: none;
  margin-top: 2px;
  color: var(--cor-tipo, var(--gold));
}

.cal-compromisso-meta {
  margin: 0;
  padding-left: 18px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-card {
  margin-bottom: 8px;
  padding: 8px 9px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--surface-2);
  cursor: grab;
}

.cal-card:active { cursor: grabbing; }
.cal-card.is-dragging { opacity: 0.4; }

.cal-card-title {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.cal-card-title .status-dot { margin-top: 5px; }
.cal-card-meta { margin-top: 5px; color: var(--text-dim); font-size: 11px; }
.cal-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cal-card-tags .tag { font-size: 10px; padding: 2px 7px; }

/* ---------- Kanban ---------- */

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.kan-col { display: grid; gap: 14px; }

.kan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.kan-head .count { color: var(--text-dim); font-weight: 500; }
.kan-head .hint { margin-left: auto; color: var(--text-dim); font-size: 12px; font-weight: 400; }

.kan-drop {
  display: grid;
  gap: 14px;
  min-height: 140px;
  padding: 4px;
  border-radius: var(--radius-lg);
}

.kan-drop.is-over { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--gold-deep); }

.content-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.content-card:hover { border-color: var(--border); transform: translateY(-2px); }
.kan-drop .content-card { cursor: grab; }
.kan-drop .content-card:active { cursor: grabbing; }
.content-card.is-dragging { opacity: 0.4; }

.card-cover {
  position: relative;
  height: 104px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}

.card-cover.t-apartamentos { background: linear-gradient(135deg, #2b3138, #1d2228); }
.card-cover.t-casas { background: linear-gradient(135deg, #38312a, #241f1a); }
.card-cover.t-terrenos { background: linear-gradient(135deg, #2c3329, #1e231c); }
.card-cover.t-studios { background: linear-gradient(135deg, #2a303a, #1c2027); }
.card-cover.t-comercial { background: linear-gradient(135deg, #313138, #212126); }
.card-cover.t-lancamentos { background: linear-gradient(135deg, #34303c, #222028); }
.card-cover.t-condominios { background: linear-gradient(135deg, #2a3630, #1c2521); }
.card-cover.t-altopadrao { background: linear-gradient(135deg, #3a332c, #26211b); }
.card-cover.t-rural { background: linear-gradient(135deg, #2f3428, #20241b); }

.card-format {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 7px;
  background: rgba(10, 12, 13, 0.68);
  color: #f3f5f6;
  font-size: 11px;
  font-weight: 600;
}

.card-cover-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: rgba(243, 245, 246, 0.72);
  font-size: 11.5px;
}

.card-body { padding: 14px 15px 15px; }

.card-title { display: flex; align-items: flex-start; gap: 8px; }

.card-title h4 {
  flex: 1;
  margin: 0 0 10px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
}

.card-menu {
  flex: none;
  width: 26px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.card-menu:hover { background: var(--surface-2); color: var(--text); }

.card-when { margin: 0; color: var(--text-dim); font-size: 12.5px; }

.card-resumo {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 13px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-muted);
}

.card-foot .avatar { width: 24px; height: 24px; font-size: 10px; }

/* Menu flutuante dos cartões */

.pop-menu {
  position: absolute;
  z-index: 70;
  min-width: 226px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pop-menu button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.pop-menu button svg { width: 15px; height: 15px; flex: none; }
.pop-menu button:hover { background: var(--surface-2); color: var(--text); }
.pop-menu button.is-danger { color: #ff9b9b; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 600;
}

.badge.s-aprovado { color: var(--warn); }
.badge.s-agendado { color: var(--info); }
.badge.s-publicado { color: var(--ok); }

.is-hidden { display: none !important; }

/* ---------- Histórico ---------- */

.timeline { display: grid; gap: 22px; margin-top: 24px; }

.tl-grupo {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.tl-grupo > header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 13.5px;
  font-weight: 600;
}

.tl-grupo ul { display: grid; }

.tl-grupo li {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
}

.tl-grupo li:last-child { border-bottom: 0; }
.tl-grupo li .icon-tile { width: 32px; height: 32px; border-radius: 999px; }
.tl-grupo li .icon-tile svg { width: 15px; height: 15px; }
.tl-grupo li p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.tl-grupo li time { color: var(--text-dim); font-size: 12.5px; white-space: nowrap; }

/* ---------- Planos dentro do app ---------- */

.planos-app {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}

.plano-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.plano-card.is-popular { border-color: var(--gold-deep); }
.plano-card.is-ativo { border-color: var(--gold-deep); box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.2); }

.plano-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

.plano-topo h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}

.plano-atual { color: var(--gold-soft); font-size: 12px; font-weight: 600; }

.plano-resumo { margin: 0 0 22px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.plano-preco {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.plano-preco span { color: var(--text-dim); font-family: var(--font); font-size: 13.5px; font-weight: 500; }

.plano-lista { display: grid; gap: 13px; margin-bottom: 28px; }

.plano-lista li {
  display: flex;
  gap: 11px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.plano-lista svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--gold); }

.plano-card .btn { margin-top: auto; }
.plano-card .btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

.planos-nota { margin: 30px 0 0; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ---------- Configurações ---------- */

.config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.config-col { display: grid; gap: 20px; }

/* ---------- Perfil ---------- */

.perfil-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.perfil-col { display: grid; gap: 20px; }
.perfil-cartao .panel-body { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 30px 24px; }

.avatar-xl {
  width: 84px;
  height: 84px;
  margin-bottom: 14px;
  border-radius: 999px;
  font-size: 27px;
  letter-spacing: 0.02em;
}

.perfil-cartao h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}

.perfil-cartao p { margin: 0; color: var(--text-dim); font-size: 13px; }

.perfil-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.perfil-nums strong { display: block; font-size: 19px; font-weight: 700; }
.perfil-nums span { color: var(--text-dim); font-size: 12px; }

.aviso {
  display: flex;
  gap: 12px;
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.aviso svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--gold-soft); }

.plan-up {
  display: inline-block;
  margin-top: 10px;
  color: var(--gold-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.side-links button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.side-links button svg { width: 17px; height: 17px; flex: none; }
.side-links button:hover { color: var(--text); background: var(--surface); }

@media (max-width: 1100px) {
  .planos-app { grid-template-columns: 1fr; }
  .config-grid, .perfil-grid { grid-template-columns: 1fr; }
}

/* ---------- Assistente virtual ----------
   Vive no canto esquerdo, encostado na sidebar (270px) em vez de por cima
   dela: a navegação continua inteira e clicável com o painel aberto. */

.assist-botao {
  position: fixed;
  left: calc(270px + 26px);
  bottom: 26px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px 0 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold) 45%, var(--gold-deep));
  color: var(--on-gold);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(201, 162, 39, 0.55);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.assist-botao svg { width: 22px; height: 22px; flex: none; }
.assist-botao:hover { transform: translateY(-2px); filter: brightness(1.06); }
body.assist-aberto .assist-botao { transform: scale(0.92); opacity: 0.5; }

.assist-painel {
  position: fixed;
  left: 270px;
  top: 0;
  bottom: 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 290px));
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: 34px 0 80px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: assist-entra 0.2s ease;
}

/* Sem isto o display:flex acima vence o atributo hidden e o painel nasce aberto. */
.assist-painel[hidden] { display: none; }

/* Landing e login: o copiloto é da área logada e não aparece por lá. */
body.fora-do-app .assist-botao,
body.fora-do-app .assist-painel { display: none; }

@keyframes assist-entra {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

.assist-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.assist-topo .icon-tile { width: 34px; height: 34px; border-radius: 10px; }
.assist-topo .icon-tile svg { width: 17px; height: 17px; }
.assist-topo strong { display: block; font-size: 14px; font-weight: 700; }
.assist-topo > div > span { color: var(--text-dim); font-size: 11.5px; }

.assist-limpar, .assist-fechar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.assist-limpar { margin-left: auto; }
.assist-limpar svg, .assist-fechar svg { width: 15px; height: 15px; }
.assist-limpar:hover, .assist-fechar:hover { background: var(--surface-2); color: var(--text); }

.assist-corpo {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.assist-vazio { display: grid; justify-items: center; text-align: center; padding: 18px 6px; }
.assist-vazio .icon-tile { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px; }
.assist-vazio .icon-tile svg { width: 22px; height: 22px; }

.assist-vazio h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}

.assist-vazio p { margin: 0 0 20px; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }

.assist-sugestoes { display: grid; gap: 8px; width: 100%; }

.assist-sugestoes button {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.assist-sugestoes button:hover { border-color: var(--gold-deep); color: var(--text); }

.assist-msg { margin-bottom: 18px; }
.assist-msg.is-eu { display: flex; justify-content: flex-end; }

.assist-balao {
  max-width: 92%;
  padding: 12px 15px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.assist-msg.is-eu .assist-balao {
  max-width: 85%;
  border-color: transparent;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
}

.assist-balao p { margin: 0 0 10px; }
.assist-balao p:last-child { margin-bottom: 0; }
.assist-balao h4 { margin: 14px 0 8px; font-size: 13.5px; font-weight: 700; }
.assist-balao h4:first-child { margin-top: 0; }
.assist-balao ul, .assist-balao ol { margin: 0 0 10px; padding-left: 20px; }
.assist-balao ul { list-style: disc; }
.assist-balao ol { list-style: decimal; }
.assist-balao li { margin-bottom: 5px; }
.assist-balao strong { color: var(--text); font-weight: 700; }
.assist-msg.is-eu .assist-balao strong { color: inherit; }

.assist-balao code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

.assist-pensando { display: flex; align-items: center; gap: 4px; color: var(--text-dim); font-size: 13px; }
.assist-pensando span { margin-left: 6px; }

.assist-pensando i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold-soft);
  animation: assist-pulsa 1.2s infinite ease-in-out;
}

.assist-pensando i:nth-child(2) { animation-delay: 0.16s; }
.assist-pensando i:nth-child(3) { animation-delay: 0.32s; }

@keyframes assist-pulsa {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.assist-copiar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 5px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 11.5px;
  cursor: pointer;
}

.assist-copiar svg { width: 12px; height: 12px; }
.assist-copiar:hover { border-color: var(--gold-deep); color: var(--gold-soft); }

/* Cartão de ação executada: o conteúdo que o copiloto agendou. */
.assist-acao {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.09);
}

.assist-acao .icon-tile { width: 32px; height: 32px; flex: none; }
.assist-acao .icon-tile svg { width: 16px; height: 16px; }
.assist-acao > div { min-width: 0; flex: 1; }
.assist-acao strong { display: block; font-size: 12.5px; color: var(--gold-soft); }

.assist-acao span:not(.icon-tile) {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assist-acao button {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.assist-acao button:hover { border-color: var(--gold-deep); color: var(--gold-soft); }

.assist-acao.is-falha {
  display: flex;
  align-items: center;
  border-color: rgba(220, 90, 90, 0.4);
  background: rgba(220, 90, 90, 0.1);
  color: var(--text-muted);
  font-size: 12px;
}

.assist-acao.is-falha svg { width: 14px; height: 14px; flex: none; margin-right: 8px; }

/* O que a base de conhecimento entregou para esta resposta. */
.assist-fontes {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 0 0;
  padding-left: 2px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.4;
}

.assist-fontes svg { width: 12px; height: 12px; flex: none; color: var(--gold-deep); }

.assist-envio {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 13px 14px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.assist-envio textarea {
  flex: 1;
  min-height: 42px;
  max-height: 132px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
}

.assist-envio textarea:focus { outline: none; border-color: var(--gold-deep); }
.assist-envio textarea::placeholder { color: var(--text-dim); }

.assist-enviar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
  cursor: pointer;
}

.assist-enviar svg { width: 17px; height: 17px; }
.assist-enviar:hover { filter: brightness(1.07); }
.assist-painel.is-ocupado .assist-enviar { opacity: 0.45; pointer-events: none; }

/* Abaixo de 900px a sidebar deixa de ser coluna fixa: a gaveta encosta na
   borda da tela e o botão volta a ser redondo, para sobrar largura. */
@media (max-width: 900px) {
  .assist-painel {
    left: 0;
    width: min(400px, 100vw);
  }
  .assist-botao {
    left: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
    padding: 0;
    justify-content: center;
  }
  .assist-botao span { display: none; }
}

/* ---------- Login e cadastro ---------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
  max-width: 1120px;
  min-height: 100vh;
  margin-inline: auto;
  padding: 48px 24px;
}

.auth-tema { position: fixed; top: 22px; right: 24px; z-index: 10; }

.auth-card {
  padding: 34px 36px 36px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card .brand { margin-bottom: 26px; }

.auth-tabs { display: flex; width: 100%; margin-bottom: 28px; }
.auth-tabs button { flex: 1; justify-content: center; }

.auth-card h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.auth-sub { margin: 0 0 26px; color: var(--text-muted); font-size: 14.5px; }

.input-acao { position: relative; }
.input-acao input { padding-right: 46px; }

.input-acao button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.input-acao button svg { width: 17px; height: 17px; }
.input-acao button:hover { color: var(--text); }
.input-acao button.is-on { color: var(--gold-soft); }

.auth-erro {
  margin: 0 0 18px;
  padding: 11px 15px;
  border: 1px solid #7f2b2b;
  border-radius: 10px;
  background: rgba(127, 43, 43, 0.14);
  color: #ffb4b4;
  font-size: 13.5px;
}

.auth-alt { margin: 18px 0 0; text-align: center; color: var(--text-muted); font-size: 13.5px; }

.link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--gold-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-demo {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
}

.auth-demo p { margin: 0 0 12px; color: var(--text-dim); font-size: 13px; text-align: center; }

.auth-lado h2 {
  margin: 20px 0 26px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.auth-check { flex-direction: column; gap: 14px; align-items: flex-start; font-size: 14px; }
.auth-check li { align-items: flex-start; }
.auth-check li::before { margin-top: 7px; }

.auth-nota { margin: 30px 0 0; color: var(--text-dim); font-size: 12.5px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; gap: 36px; padding-top: 72px; }
  .auth-lado { order: -1; }
  .auth-lado h2 { font-size: 24px; }
}

/* ---------- Avisos ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translate(-50%, 20px);
  padding: 13px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="erro"] { border-color: #7f2b2b; color: #ffb4b4; }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(4, 6, 7, 0.72);
  backdrop-filter: blur(4px);
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: calc(100vh - 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.modal-head h2 {
  margin: 12px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.modal-head .theme-btn { margin-left: auto; flex: none; }

.modal-body { padding: 24px 26px; overflow-y: auto; }

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.modal-foot .btn-primary { margin-left: auto; }
.modal-foot .btn-outline.is-danger { margin-left: auto; }
.confirm-texto { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.modal:has(.confirm-texto) { width: min(460px, 100%); }

.btn-outline.is-danger { color: #ff9b9b; }
.btn-outline.is-danger:hover { border-color: #7f2b2b; }

.roteiro {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.roteiro summary {
  margin-bottom: 18px;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.roteiro textarea { min-height: 0; }

/* ---------- Cartões de ideia geradas ---------- */

.ideas { display: grid; gap: 18px; margin-top: 28px; }

.ideias-head { margin-bottom: 2px; }

.ideias-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}

.ideias-head p { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.ideias-head b { color: var(--gold-soft); font-weight: 600; }

/* De onde veio o texto: do modelo de verdade ou da engine local. */
.selo-origem {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  vertical-align: middle;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.selo-origem.is-ia {
  border-color: rgba(201, 162, 39, 0.42);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-soft);
}

/* Aviso de que a prévia não alcança a IA. */
.aviso-previa {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 820px;
  margin: 0 0 20px;
  padding: 13px 16px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.09);
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.aviso-previa svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--gold-soft); }
.aviso-previa a { color: var(--gold-soft); text-decoration: underline; }

/* ---------- Espera da geração ---------- */

.ideias-carregando { display: grid; gap: 14px; justify-items: center; }

.ideias-carregando p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.skeleton-idea {
  width: 100%;
  height: 96px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg,
    var(--surface) 30%, var(--surface-2, rgba(255, 255, 255, 0.05)) 50%, var(--surface) 70%);
  background-size: 300% 100%;
  animation: ideia-brilho 1.5s ease-in-out infinite;
}

.skeleton-idea:nth-child(4) { animation-delay: 0.18s; opacity: 0.75; }
.skeleton-idea:nth-child(5) { animation-delay: 0.36s; opacity: 0.5; }

@keyframes ideia-brilho {
  from { background-position: 130% 0; }
  to   { background-position: -30% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-idea { animation: none; }
}

.idea {
  padding: 24px 26px 26px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.idea-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }

.idea-rotulo {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.idea-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.idea-campos { display: grid; gap: 15px; margin: 0 0 16px; }

.idea-campos dt {
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.idea-campos dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.idea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.quota {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
}

.quota b { color: var(--gold-soft); }

@media (max-width: 640px) {
  .modal-foot { flex-direction: column; }
  .modal-foot .btn { width: 100%; margin-left: 0; }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .side-foot { margin-top: 24px; }
  .view { padding: 24px 20px 48px; }
  .topbar { padding: 14px 20px; }
  .stat-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .calendar-head, .calendar-week { grid-template-columns: 1fr; }
  .cal-day { min-height: auto; border-right: 0; }
  .calendar-head span { display: none; }
}

/* Recado bom usa a mesma faixa do erro, em dourado. */
.auth-erro.is-bom { border-color: rgba(201, 162, 39, 0.4); background: rgba(201, 162, 39, 0.1); color: var(--gold-soft); }

.auth-aceite {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}

.auth-aceite a { color: var(--text-muted); text-decoration: underline; }
.auth-aceite a:hover { color: var(--gold-soft); }

/* ---------- Celular (até 768px) ----------
   Complementa as faixas de 900px e 1100px que já existiam: aqui ficam só os
   ajustes que a tela de mão pede, e nada disso alcança o desktop. */

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }

  /* Campos em 16px pelo mesmo motivo do base.css: abaixo disso o iPhone
     amplia a página ao focar, e o corretor acha que o site quebrou. */
  .busca input { font-size: 16px; padding: 14px 16px 14px 44px; }
  .filtros-linha select { font-size: 16px; padding: 13px 38px 13px 14px; }
  .assist-envio textarea { font-size: 16px; }

  /* Cinco filtros lado a lado não cabem em 390px de largura. */
  .filtros { padding: 16px 14px; }
  .filtros-linha { grid-template-columns: 1fr; gap: 10px; }
  .filtros-rodape { flex-wrap: wrap; gap: 12px; }
  .filtros-rodape .link { margin-left: 0; }

  .view { padding: 20px 16px 44px; }

  /* O título e os botões deixam de disputar a mesma linha. */
  .view-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 22px; }
  .view-head h1 { font-size: 25px; }
  .view-head .btn { margin-left: 0; }
  .view-head .head-actions { flex-direction: column; align-items: stretch; margin-left: 0; }
  .view-head .head-actions .btn { width: 100%; }

  /* Barra de cima: sobra o essencial, para o nome não empurrar o resto. */
  .topbar { gap: 12px; padding: 12px 16px; }
  .topbar-title strong { font-size: 14px; }
  .topbar-title span { display: none; }
  .topbar-actions { gap: 10px; }
  .user-chip { padding: 5px 6px 5px 12px; gap: 9px; }
  .user-chip span { display: none; }

  .cards-grid { grid-template-columns: 1fr; }

  /* O cartão de login já empilha a 900px; aqui ele só ganha respiro lateral,
     que é o que faz os campos aparecerem inteiros. */
  .auth { padding: 32px 16px; gap: 28px; }
  .auth-card { padding: 24px 20px 26px; }
  .auth-card h1 { font-size: 23px; }
  .auth-tema { top: 14px; right: 16px; }

  .modal-corpo { padding: 20px 18px; }
  .toast { left: 16px; right: 16px; bottom: 16px; transform: none; max-width: none; }
}
