/* Layout compartilhado do AuraX: sidebar à esquerda, fundo cinza claro e
   componentes de tabela/cartão no estilo CRM. Segue o tema do sistema
   (claro por padrão, escuro quando o sistema pede). */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap");

:root {
  --bg: #f1f3f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --sidebar: #ffffff;
  --line: #e2e5eb;
  --ink: #1c2230;
  --ink-dim: #596173;
  --ink-faint: #8a92a3;
  --accent: #3b6fe0;
  --accent-soft: #e8efff;
  --good: #1c8a54;
  --good-soft: #e3f4ea;
  --warn: #a86a00;
  --warn-soft: #fbf0da;
  --bad: #c63d3d;
  --bad-soft: #fbe6e6;
  --purple: #6b4fd0;
  --purple-soft: #eee9fb;
  --shadow: 0 1px 2px rgba(20, 28, 45, 0.05);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --overlay: rgba(20, 24, 34, 0.45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1217;
    --surface: #171b22;
    --surface-2: #1d222b;
    --sidebar: #13161c;
    --line: #272d38;
    --ink: #e9edf4;
    --ink-dim: #a1a9b8;
    --ink-faint: #6c7586;
    --accent: #6c97ff;
    --accent-soft: #1c2a4a;
    --good: #5fd08f;
    --good-soft: #17301f;
    --warn: #f0b755;
    --warn-soft: #3a2c12;
    --bad: #ff8585;
    --bad-soft: #3b1b1b;
    --purple: #b9a2ff;
    --purple-soft: #2a2347;
    --shadow: none;
    --overlay: rgba(4, 6, 10, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1217;
  --surface: #171b22;
  --surface-2: #1d222b;
  --sidebar: #13161c;
  --line: #272d38;
  --ink: #e9edf4;
  --ink-dim: #a1a9b8;
  --ink-faint: #6c7586;
  --accent: #6c97ff;
  --accent-soft: #1c2a4a;
  --good: #5fd08f;
  --good-soft: #17301f;
  --warn: #f0b755;
  --warn-soft: #3a2c12;
  --bad: #ff8585;
  --bad-soft: #3b1b1b;
  --purple: #b9a2ff;
  --purple-soft: #2a2347;
  --shadow: none;
  --overlay: rgba(4, 6, 10, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

#gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
#gate p { color: var(--ink-dim); font-size: 14px; }

/* ===== Estrutura ===== */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell-main { min-width: 0; }
.content { padding: 28px 32px 60px; max-width: 1240px; display: flex; flex-direction: column; gap: 20px; }

/* ===== Sidebar ===== */
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; text-decoration: none; color: var(--ink); }
.brand::before { content: ""; flex: none; background: url(assets/favicon.svg) center / contain no-repeat; width: 26px; height: 26px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.01em; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-faint); padding: 0 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-dim);
  text-align: left; width: 100%; font-weight: 500; text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-spacer { flex: 1; }
.plan-box {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 4px;
}
.plan-box b { font-size: 13px; }
.plan-box small { color: var(--ink-dim); font-size: 12px; }
.plan-box a { color: var(--accent); font-weight: 600; font-size: 12px; text-decoration: none; margin-top: 4px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.user-chip div { min-width: 0; line-height: 1.25; }
.user-chip strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip span { font-size: 12px; color: var(--ink-faint); }

/* ===== Cabeçalho de página ===== */
.page-head, .panel-head.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-head p { margin: 2px 0 0; color: var(--ink-dim); }
.panel-eyebrow { display: none; }

/* ===== Cartões, botões, campos ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.btn, .btn-primary {
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.btn:hover, .btn-primary:hover { filter: brightness(0.94); }
.btn.ghost {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; display: inline-block;
}
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

input[type="text"], input[type="email"], textarea {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; outline: none;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.empty-state { padding: 30px 18px; text-align: center; color: var(--ink-faint); font-size: 14px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--ink-dim); margin: 6px 0 0; }

/* ===== KPIs e destaques ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-card { padding: 16px 18px; text-align: left; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-family: var(--mono); }
.stat-label { font-size: 12px; color: var(--ink-dim); font-weight: 500; margin-top: 2px; }
.stat-rank { font-size: 12px; font-weight: 700; margin-top: 6px; }
.focus-card {
  padding: 18px 20px; background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
}
.focus-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--warn); font-weight: 700; margin-bottom: 6px; }
.focus-card h2, .focus-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--ink); }
.focus-card p { margin: 0; color: var(--ink-dim); font-size: 13px; }
.focus-suggestion { margin-top: 12px; padding-left: 12px; border-left: 3px solid var(--warn); font-size: 14px; color: var(--ink); }

/* ===== Pílulas e etiquetas ===== */
.oratoria-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; border: 1px solid; flex-shrink: 0; white-space: nowrap;
  background: var(--surface);
}
.badges, .session-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.badge, .session-badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.badge-focused { background: var(--good-soft); color: var(--good); }
.badge-motivated { background: var(--warn-soft); color: var(--warn); }
.badge-tired { background: var(--accent-soft); color: var(--accent); }

.insight-line { margin: 4px 0; padding-left: 10px; border-left: 2px solid var(--accent); font-size: 13px; color: var(--ink); }
.tip-positive, .tip-line.positive { border-left-color: var(--good); }
.tip-improve { border-left-color: var(--warn); }
.tip-line { font-size: 13px; margin: 8px 0 0; padding-left: 9px; border-left: 2px solid var(--warn); color: var(--ink); }

.keyword-tags { margin-top: 4px; }
.keyword-tag, .slang-tag {
  display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 9px; margin: 2px 4px 0 0;
}
.keyword-tag { background: var(--warn-soft); color: var(--warn); }
.slang-tag { background: var(--purple-soft); color: var(--purple); }

.session-secondary-stats { font-size: 12px; color: var(--ink-dim); margin-top: 8px; }
.session-transcript { margin-top: 8px; }
.session-transcript summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.transcript-line { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.transcript-flagged { border-left: 2px solid var(--warn); padding-left: 8px; background: var(--warn-soft); }
.transcript-slang { border-left: 2px solid var(--purple); padding-left: 8px; background: var(--purple-soft); }
.transcript-time { color: var(--ink-faint); margin-right: 8px; font-family: var(--mono); font-size: 12px; }
.transcript-expression { color: var(--ink-faint); font-size: 12px; margin-left: 6px; }
.expr-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.speaker-tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px;
  border-radius: 999px; margin-right: 6px; text-transform: uppercase; letter-spacing: 0.3px;
}
.speaker-you { background: var(--accent-soft); color: var(--accent); }
.speaker-other { background: var(--warn-soft); color: var(--warn); }

.client-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}

/* ===== Mobile: sidebar vira barra no topo ===== */
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static; height: auto; flex-direction: row; align-items: center;
    overflow-x: auto; padding: 10px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .nav-group { flex-direction: row; flex-shrink: 0; }
  .nav-label, .plan-box, .user-chip, .sidebar-spacer { display: none; }
  .nav-item { width: auto; white-space: nowrap; }
  .brand { flex-shrink: 0; }
  .content { padding: 20px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== Foco para a próxima reunião (focus.js) ===== */
.focus-next {
  padding: 18px 20px; border-radius: 12px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  margin: 14px 0;
}
.fn-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.focus-next h3 { margin: 0 0 4px; font-size: 17px; color: var(--ink); }
.fn-why { margin: 0; color: var(--ink-dim); font-size: 13px; }
.fn-example { margin-top: 12px; }
.fn-example > span { font-size: 11px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.fn-example blockquote {
  margin: 6px 0 0; padding: 9px 12px; border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 6px; font-size: 13px; color: var(--ink); line-height: 1.5; word-break: break-word;
}
.fn-example mark { background: var(--warn-soft); color: var(--ink); border-radius: 3px; padding: 0 3px; font-weight: 600; }
.fn-action { margin-top: 12px; font-size: 13px; color: var(--ink); line-height: 1.5; }
.fn-goal { margin-top: 6px; font-weight: 600; color: var(--accent); }
.fn-compare { margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); font-size: 12px; color: var(--ink-dim); }
.fn-compare .up { color: var(--good); font-weight: 700; }
.fn-compare .down { color: var(--bad); font-weight: 700; }
.fn-strength { margin-top: 8px; font-size: 12px; color: var(--good); font-weight: 600; }
details.tips-fold { margin-top: 14px; }
details.tips-fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-dim); margin-bottom: 8px; }

/* ===== Suporte (modal do menu lateral) ===== */
.sup-overlay { position: fixed; inset: 0; z-index: 1100; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.sup-card { position: relative; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 26px 26px 22px; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5); }
.sup-card h3 { margin: 0 0 4px; font-size: 20px; }
.sup-sub { margin: 0 0 16px; color: var(--ink-dim); font-size: 14px; }
.sup-x { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-dim); font-size: 22px; line-height: 1; }
.sup-x:hover { background: var(--surface-2); color: var(--ink); }
.sup-wa { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border-radius: 10px; background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); font-weight: 700; text-decoration: none; }
.sup-wa:hover { filter: brightness(0.97); }
.sup-wa svg { width: 20px; height: 20px; }
.sup-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--ink-faint); font-size: 12px; }
.sup-or::before, .sup-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sup-field { display: block; font-size: 12px; font-weight: 600; color: var(--ink-dim); margin-bottom: 12px; }
.sup-field select, .sup-field textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; outline: none; }
.sup-field textarea { resize: vertical; min-height: 110px; }
.sup-field select:focus, .sup-field textarea:focus { border-color: var(--accent); }
.sup-meta { font-size: 12px; color: var(--ink-faint); margin-bottom: 12px; }
.sup-msg { font-size: 13px; min-height: 0; margin-bottom: 10px; }
.sup-msg:empty { display: none; }
.sup-msg.error { color: var(--bad); }
#supSend { width: 100%; }
.sup-done { text-align: center; padding: 8px 0 2px; }
.sup-check { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 24px; font-weight: 700; }
