/* Área do cliente helloisa (login e painel). Estrutura inspirada no app de referência,
   identidade Floresta e Menta. Copiado para site-tema/app/ por tools/theme.py. */

@font-face {
  font-family: "Onest";
  src: url("/_brand/fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  src: url("/_brand/fonts/onest-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Marca (Floresta e Menta) */
  --brand: #12705F;
  --brand-hover: #0E5C4E;
  --on-brand: #FFFFFF;
  --brand-solid: #12705F;        /* superfícies grandes na cor da marca (texto sempre branco) */
  --brand-solid-deep: #0E5C4E;
  --mint: #B5F5DC;
  --mint-soft: #E6FBF2;
  --mint-solid: #B5F5DC;         /* menta sobre fundos escuros (barra de ações, painel do login) */
  --mint-solid-hover: #9BEFCF;
  --on-mint: #16332E;
  --warm: #FFD3A6;
  --on-warm: #16332E;

  /* Texto */
  --ink: #16332E;
  --ink-2: #4C5D58;
  --ink-3: #5F6E68;

  /* Superfícies: fundo da página, cartões, preenchimentos */
  --bg: #F4F7F4;
  --surface: #FFFFFF;
  --canvas: #F6F9F6;
  --fill: #EEF3EF;
  --hover: rgba(22, 51, 46, .05);
  --line: #E4ECE6;
  --line-strong: #D5DFD8;
  --inverse: #16332E;
  --on-inverse: #FFFFFF;
  --scrim: rgba(22, 51, 46, .32);

  /* Estados */
  --ok-ink: #0B5546;
  --amber: #D9892E;
  --warn-bg: #FFF1E2;
  --warn-ink: #8A4D0E;
  --danger: #B42318;
  --danger-hover: #912018;
  --on-danger: #FFFFFF;
  --danger-bg: #FDF1EF;
  --danger-line: #F3C9C4;
  --danger-ink: #8C1D13;

  /* Forma, profundidade e movimento */
  --radius-field: 10px;
  --radius-btn: 12px;
  --radius-card: 16px;
  --ring: 0 0 0 3px rgba(18, 112, 95, .16);
  --shadow-card: 0 1px 2px rgba(22, 51, 46, .05), 0 1px 1px rgba(22, 51, 46, .03);
  --shadow-raise: 0 2px 4px rgba(22, 51, 46, .04), 0 10px 24px -12px rgba(22, 51, 46, .18);
  --shadow-pop: 0 4px 10px -4px rgba(22, 51, 46, .1), 0 20px 44px -18px rgba(22, 51, 46, .32);
  --shadow-modal: 0 12px 28px -12px rgba(22, 51, 46, .22), 0 44px 88px -32px rgba(22, 51, 46, .5);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: .14s;
  --t-med: .26s;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0;
  font-family: "Onest", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  accent-color: var(--brand);
  caret-color: var(--brand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--mint); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button { font: inherit; color: inherit; }
.tabular, .table td, .kv dd { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Barras de rolagem finas, na paleta */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: var(--line-strong) padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-3); }
::-webkit-scrollbar-track { background: transparent; }

/* Botões e campos */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-btn);
  border: 1px solid transparent; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(22, 51, 46, .18); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 12px -4px rgba(18, 112, 95, .5); }
.btn[aria-busy="true"] { cursor: progress; opacity: .88; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-card); }
.btn-outline:hover { background: var(--canvas); border-color: var(--ink-3); }
.btn svg { width: 16px; height: 16px; }

.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; line-height: 1; }
.field input {
  height: 40px; width: 100%; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-field);
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input::placeholder { color: var(--ink-3); }
.field input:hover { border-color: var(--ink-3); }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.form-error { margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--danger); }

/* ---------- Login ---------- */
.auth { display: grid; min-height: 100dvh; grid-template-columns: 1fr; }
.auth-main { position: relative; display: grid; place-items: center; padding: 96px 16px 48px; background: var(--surface); }
.auth-logo { position: absolute; top: 32px; left: 32px; display: block; }
.auth-logo img { display: block; height: 22px; width: auto; }
.auth-card { width: 100%; max-width: 356px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 28px; font-weight: 600; line-height: 34px; letter-spacing: -0.02em; text-wrap: balance; }
.auth-card .lede { margin: 6px 0 0; text-align: center; color: var(--ink-2); }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.auth-form .btn { width: 100%; height: 44px; margin-top: 4px; font-size: 15px; }
.auth-form .field input, .auth-form .phone-field { height: 44px; }
.auth-form .phone-field input { height: 42px; }
/* Entrar com o Google: botão claro com o "G" oficial, acima do formulário, separado por "ou" */
.auth-google { display: grid; gap: 20px; margin-top: 28px; }
.auth-google[hidden] { display: none; }
.auth-google + .auth-form { margin-top: 20px; }
.btn-google { width: 100%; height: 44px; gap: 10px; font-size: 15px; }
.btn-google svg { width: 18px; height: 18px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Cadastro vindo do Google: o e-mail já está confirmado, falta empresa e telefone */
.auth-google-account { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-field); background: var(--canvas); font-size: 14px; }
.auth-google-account[hidden] { display: none; }
.auth-google-account svg { width: 18px; height: 18px; flex: none; }
.auth-google-account div { min-width: 0; display: grid; gap: 2px; }
.auth-google-account strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-google-account span { font-size: 12px; color: var(--ink-2); }
.auth-google-account button { margin-left: auto; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.auth-card .lede.left { text-align: left; }
.auth-form .field[hidden], .auth-card .lede[hidden] { display: none; }
.auth-links { margin-top: 20px; display: grid; gap: 6px; text-align: center; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.auth-links a { font-weight: 500; color: var(--ink); text-decoration: none; text-underline-offset: 3px; }
.auth-links a:hover { text-decoration: underline; }

.auth-aside {
  display: none; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #17806D 0%, var(--brand-solid) 45%, var(--brand-solid-deep) 100%); color: #fff; padding: 48px 84px;
  align-content: center; justify-items: center; text-align: center;
}
.auth-aside::before, .auth-aside::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.auth-aside::before { width: 420px; height: 420px; left: -140px; bottom: -160px; background: rgba(181, 245, 220, .35); }
.auth-aside::after { width: 360px; height: 360px; right: -120px; top: -140px; background: rgba(255, 211, 166, .28); }
.auth-aside > * { position: relative; }
.auth-aside h2 { margin: 0; max-width: 16ch; font-size: clamp(30px, 3vw, 44px); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.auth-aside p { margin: 18px 0 0; max-width: 44ch; font-size: 18px; line-height: 27px; color: rgba(255, 255, 255, .9); text-wrap: pretty; }

.call-card {
  margin-top: 48px; width: 100%; max-width: 380px; text-align: left;
  background: rgba(8, 62, 52, .72); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-card); padding: 16px 18px;
  box-shadow: var(--shadow-pop);
}
.call-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.call-head strong { font-weight: 600; }
.call-head .time { margin-left: auto; color: rgba(255, 255, 255, .86); }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.wave i { display: block; width: 3px; border-radius: 3px; background: var(--mint-solid); animation: wave 1.1s var(--ease-out) infinite alternate; }
.wave i:nth-child(1) { height: 7px; }
.wave i:nth-child(2) { height: 14px; animation-delay: .15s; }
.wave i:nth-child(3) { height: 10px; animation-delay: .3s; background: var(--warm); }
.wave i:nth-child(4) { height: 16px; animation-delay: .45s; }
@keyframes wave { to { transform: scaleY(.45); } }
.call-lines { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.call-lines li { padding: 8px 12px; animation: line-in .6s var(--ease-out) backwards .5s; border-radius: 12px; background: rgba(255, 255, 255, .07); max-width: 92%; }
.call-lines li.ai { justify-self: end; background: rgba(181, 245, 220, .14); animation-delay: 1.5s; }
@keyframes line-in { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
.call-lines .who { display: block; font-size: 12px; color: rgba(255, 255, 255, .84); }
.call-note { margin-top: 10px; font-size: 12px; color: rgba(255, 255, 255, .84); }

@media (min-width: 1024px) {
  .auth { grid-template-columns: 1fr 1fr; }
  .auth-aside { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .wave i, .call-lines li { animation: none; } }

/* ---------- Painel ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; background: var(--bg); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 264px;
  display: flex; flex-direction: column; gap: 24px; padding: 20px 16px;
  background: var(--bg); border-right: 1px solid var(--line);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .3s var(--ease-out), visibility 0s linear .3s;
}
.shell[data-nav-open] .sidebar { transform: none; visibility: visible; transition: transform .3s var(--ease-out); box-shadow: var(--shadow-pop); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; }
.sidebar-top img { height: 22px; width: auto; display: block; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--canvas); border-color: var(--line-strong); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 14px; height: 14px; }
.nav { display: grid; gap: 2px; }
.nav a, .nav button.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; font-size: 14px; line-height: 20px; color: var(--ink-2); text-decoration: none; text-align: left; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.nav a:hover, .nav button.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-card), 0 0 0 1px var(--line); }
.nav a[aria-current="page"] svg { color: var(--brand); }
.nav svg { width: 16px; height: 16px; flex: none; }
.nav-sub { display: grid; gap: 2px; padding-left: 26px; }
.nav-sub[hidden] { display: none; }
.nav-sub a { font-size: 13px; }
.nav .soon { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 600; font-size: 13px; }
.sidebar-foot .who { min-width: 0; }
.sidebar-foot .who b { display: block; font-weight: 500; }
.sidebar-foot .who span { display: block; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .3s; }
.shell[data-nav-open] .scrim { opacity: 1; pointer-events: auto; }

.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
.topbar .icon-btn svg { width: 18px; height: 18px; }
.topbar img { height: 20px; width: auto; display: block; }
.content { padding: 24px 16px 48px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 600; line-height: 32px; letter-spacing: -0.022em; text-wrap: balance; }
.page-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.history-head { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); }
.history-title { padding: 20px 24px; }
.history-title h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 26px; }
.history-title p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.kpi { padding: 14px 24px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi span { display: block; font-size: 12px; color: var(--ink-3); }
.kpi b { display: block; font-size: 28px; font-weight: 600; line-height: 36px; letter-spacing: -0.02em; }
.chart { padding: 16px 12px 12px 8px; }
.chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--ink-3); font-size: 11px; font-family: inherit; }
.chart .area { fill: url(#areaFill); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.chart .guide { stroke: var(--line-strong); stroke-dasharray: 3 4; }
.chart .line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.chart.draw .line { animation: draw-line 1.1s var(--ease-out) backwards; }
.chart.draw .area { animation: fade-in .9s ease-out backwards .25s; }
@keyframes draw-line { from { stroke-dashoffset: 1; } }
@keyframes fade-in { from { opacity: 0; } }
#areaFill stop { stop-color: var(--brand); }
.chart-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 12px));
  padding: 6px 10px; border-radius: 8px; background: var(--inverse); color: var(--on-inverse); font-size: 12px; line-height: 16px; white-space: nowrap; font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .12s, left .12s var(--ease-out), top .12s var(--ease-out);
}
.chart-wrap { position: relative; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 64px 24px; text-align: center; }
.empty .glyph { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--mint-soft); color: var(--brand); }
.empty .glyph svg { width: 22px; height: 22px; }
.empty h2 { margin: 8px 0 0; font-size: 18px; font-weight: 600; }
.empty p { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: 14px; }
.empty .btn { margin-top: 12px; }
.demo-note { margin-top: 16px; font-size: 12px; color: var(--ink-3); }

@media (min-width: 768px) {
  .history-head { grid-template-columns: 1fr auto; }
  .kpis { border-top: 0; }
  .kpi { min-width: 112px; border-left: 1px solid var(--line); text-align: center; }
  .content { padding: 24px 32px 48px; }
}
@media (min-width: 1024px) {
  .shell { grid-template-columns: 264px 1fr; }
  .sidebar { position: sticky; top: 0; height: 100dvh; transform: none; visibility: visible; transition: none; }
  .shell[data-nav-open] .sidebar { box-shadow: none; }
  .topbar, .scrim, .nav-close { display: none; }
  .content { padding: 28px 32px 48px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .scrim { transition: none; } }

/* ---------- Componentes das telas de cadastro, planos e painel ---------- */
.auth-card .lede.left, .auth-card h1.left { text-align: left; }
.auth-note { margin-top: 16px; text-align: center; font-size: 12px; line-height: 18px; color: var(--ink-2); text-wrap: pretty; }
.auth-note a { color: var(--ink); text-underline-offset: 3px; }
.auth-success { display: grid; gap: 8px; margin-top: 24px; padding: 16px; border-radius: 12px; background: var(--mint-soft); font-size: 14px; color: var(--ink); }
.auth-success[hidden] { display: none; }
.field-hint { font-size: 12px; color: var(--ink-3); }
.phone-field { display: flex; align-items: center; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-field); transition: border-color .15s, box-shadow .15s; }
.phone-field:hover { border-color: var(--line-strong); }
.phone-field:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.phone-field .ddi { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 10px 0 12px; border-right: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.phone-field input { border: 0; height: 38px; box-shadow: none !important; }
.phone-field[aria-invalid="true"] { border-color: var(--danger); }

.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.segmented button { height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: none; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background-color .15s, color .15s; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-card); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 22px; background: var(--line-strong); transition: background-color .2s; position: relative; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(22, 51, 46, .25); transition: transform .2s var(--ease-out); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; }
.badge-save { background: var(--warm); color: var(--on-warm); }
.badge-ok { background: var(--mint-soft); color: var(--ok-ink); }
.badge-muted { background: var(--fill); color: var(--ink-2); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Planos */
.plans-page { min-height: 100dvh; background: var(--bg); padding: 24px 16px 64px; }
.plans-top { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; }
.plans-top img { height: 22px; width: auto; display: block; }
.plans-head { display: grid; justify-items: center; gap: 16px; max-width: 1080px; margin: 32px auto 0; text-align: center; }
.plans-head h1 { margin: 0; font-size: 28px; font-weight: 600; line-height: 36px; letter-spacing: -0.015em; }
.guarantee { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--mint-soft); text-align: left; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.guarantee b { display: block; font-size: 14px; color: var(--ink); }
.guarantee svg { width: 22px; height: 22px; flex: none; color: var(--brand); }
.billing { display: flex; align-items: center; gap: 10px; }
.plans { display: grid; gap: 16px; max-width: 1080px; margin: 28px auto 0; }
.plan { position: relative; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); transition: box-shadow var(--t-med), transform var(--t-med) var(--ease-out), border-color var(--t-med); }
.plan:hover { box-shadow: var(--shadow-raise); transform: translateY(-2px); }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-raise); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.plan h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 28px; }
.plan .for { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.plan .price { display: flex; align-items: baseline; gap: 6px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.plan .price b { font-size: 32px; font-weight: 600; line-height: 40px; letter-spacing: -0.02em; }
.plan .price span { font-size: 14px; color: var(--ink-3); }
.plan .price-note { min-height: 20px; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.plan .price { flex-wrap: wrap; }
.plan .price .offer-tag { flex-basis: 100%; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.plan .price s { font-size: 18px; color: var(--ink-3); text-decoration-thickness: 1.5px; }
.offer { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; padding: 8px 16px; border-radius: 999px; background: var(--mint); font-size: 14px; line-height: 20px; color: var(--ink); }
.offer b { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.plan .btn { width: 100%; margin-top: 16px; }
.plan h3 { margin: 24px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.feats { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.feats li { display: flex; gap: 8px; }
.feats svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand); }
.feats li.off { color: var(--ink-3); }
.feats li.off svg { color: var(--danger); }
.feats em { font-size: 12px; color: var(--ink-3); }
.plans-foot { max-width: 1080px; margin: 24px auto 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.plans-foot a { color: var(--ink); }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: start; } }

/* Listas do painel */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; flex: 1 1 220px; max-width: 320px; }
.search svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.search input { border: 0; outline: 0; font: inherit; font-size: 14px; color: var(--ink); width: 100%; background: none; }
.search input::placeholder { color: var(--ink-3); }
.search:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chips button[aria-pressed="true"] { border-color: var(--brand); background: var(--mint-soft); color: var(--ink); font-weight: 500; }

.list { margin: 0; padding: 0; list-style: none; }
.list > li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center; width: 100%; padding: 14px 20px; border: 0; background: none; text-align: left; font: inherit; color: inherit; text-decoration: none; }
button.row { cursor: pointer; }
button.row:hover, a.row:hover { background: var(--hover); }
.row[aria-current="true"] { background: var(--mint-soft); }
.row .title { font-size: 14px; font-weight: 500; line-height: 20px; }
.row .meta { font-size: 13px; color: var(--ink-3); line-height: 18px; }
.row .side { display: grid; justify-items: end; gap: 4px; font-size: 13px; color: var(--ink-3); }
.row .lead { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--mint-soft); color: var(--brand); }
.row .lead svg { width: 18px; height: 18px; }
.row .lead.out { background: var(--warn-bg); color: var(--warn-ink); }
.row .summary { grid-column: 2 / -1; font-size: 13px; color: var(--ink-2); line-height: 18px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.list-empty { padding: 32px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }

.agents { display: grid; gap: 12px; }
.agent { display: grid; gap: 14px; padding: 20px; }
.agent-top { display: flex; align-items: flex-start; gap: 14px; }
.agent-top .lead { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: var(--on-brand); flex: none; }
.agent-top .lead svg { width: 22px; height: 22px; }
.agent-top h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 22px; }
.agent-top p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.agent-top .badge { margin-left: auto; }
.agent dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.agent dt { font-size: 12px; color: var(--ink-3); }
.agent dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
@media (min-width: 768px) { .agent dl { grid-template-columns: repeat(4, minmax(0, 1fr)); } .agents { grid-template-columns: 1fr 1fr; } }

/* Conversas: lista + detalhe */
.inbox { display: grid; gap: 16px; }
.detail { padding: 20px; }
.detail[hidden] { display: none; }
.detail-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 24px; }
.detail-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.detail-head .icon-btn { margin-left: auto; }
.detail h3 { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.detail .sum { margin: 0; font-size: 14px; line-height: 22px; }
.player { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: var(--canvas); font-size: 13px; color: var(--ink-3); }
.player .play { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); cursor: not-allowed; }
.player .play svg { width: 14px; height: 14px; }
.player .bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line-strong); }
.transcript { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.transcript li { max-width: 88%; padding: 8px 12px; border-radius: 12px; background: var(--canvas); }
.transcript li.ai { justify-self: end; background: var(--mint-soft); }
.transcript .who { display: block; font-size: 12px; color: var(--ink-3); }
@media (min-width: 1100px) { .inbox { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } .detail { position: sticky; top: 24px; } }

/* Configuracoes */
.settings { display: grid; gap: 16px; }
.setting { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 20px 24px; }
.setting > div { flex: 1 1 260px; }
.setting h2 { margin: 0; font-size: 16px; font-weight: 600; }
.setting p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.usage { height: 6px; margin-top: 10px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.usage i { display: block; height: 100%; border-radius: 6px; background: var(--brand); }
.auth-form[hidden] { display: none; }
.segmented button { white-space: nowrap; }
@media (max-width: 480px) {
  .segmented button { padding: 0 10px; font-size: 13px; }
  .row .tel { display: none; }
}

/* ---------- Formulários do painel (nova assistente, nova fonte) ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }
.back svg { width: 14px; height: 14px; transform: rotate(90deg); }
.form-panel { display: grid; gap: 24px; padding: 24px; max-width: 720px; }
.form-panel fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-panel legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.form-panel .field textarea, .form-panel .field select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-field);
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); caret-color: var(--brand);
}
.form-panel .field select { height: 40px; appearance: none; padding-right: 36px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6E68' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.form-panel .field textarea { min-height: 96px; resize: vertical; line-height: 20px; }
.form-panel .field textarea:focus, .form-panel .field select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.form-panel [aria-invalid="true"] { border-color: var(--danger) !important; }
.choice-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 44px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice input { position: absolute; opacity: 0; }
.choice svg { position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; color: var(--ink-3); }
.choice b { font-size: 14px; font-weight: 500; }
.choice span { font-size: 12px; color: var(--ink-3); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--mint-soft); }
.choice:has(input:checked) svg { color: var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.checks { display: grid; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check small { display: block; font-size: 12px; color: var(--ink-3); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
.file-drop { display: grid; justify-items: center; gap: 6px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.file-drop:hover, .file-drop.drag { border-color: var(--brand); background: var(--mint-soft); }
.file-drop svg { width: 22px; height: 22px; color: var(--brand); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.file-name { font-size: 13px; font-weight: 500; color: var(--ink); }
[data-when][hidden] { display: none; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 16px) scale(.96); opacity: 0;
  display: flex; align-items: center; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--inverse); color: var(--on-inverse); font-size: 14px;
  box-shadow: var(--shadow-pop); transition: opacity .2s, transform .3s var(--ease-out); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.integrations { display: grid; gap: 12px; }
@media (min-width: 768px) { .integrations { grid-template-columns: 1fr 1fr; } }
.integration { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.integration .logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--canvas); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink); flex: none; }
.integration div { flex: 1; min-width: 0; }
.integration b { display: block; font-size: 14px; font-weight: 600; }
.integration span { display: block; font-size: 13px; color: var(--ink-3); }

/* página de planos aberta dentro da janela do painel */
.embed .plans-top { display: none; }
.embed .plans-page { padding-top: 24px; }

/* Janela de planos: chave anual por plano, Scale com simulador, dica de preço e demonstração */
.plan .billing.small { justify-content: center; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.plan .price.custom { margin-top: 20px; }
.plan .price.custom b { font-size: 20px; line-height: 28px; }
.plan .btn + .btn { margin-top: 8px; }
.feats em { font-style: normal; font-size: 12px; color: var(--ink-3); }
button.tip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: none; font: inherit; font-size: 10px; font-weight: 600; color: var(--ink-3); cursor: help; vertical-align: 1px; }
button.tip:hover::after, button.tip:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; box-shadow: var(--shadow-pop); transform: translateX(-50%); z-index: 5; padding: 6px 10px; border-radius: 8px; background: var(--inverse); color: var(--on-inverse); font-size: 12px; font-weight: 500; white-space: nowrap; }
.plans-demo { margin: 28px 0 0; text-align: center; }
.plans-demo .btn { display: inline-flex; gap: 8px; }
.cfg { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-modal); }
.cfg::backdrop { background: var(--scrim); }
.cfg form { display: grid; gap: 16px; padding: 20px 22px; }
.cfg-head { display: flex; align-items: center; justify-content: space-between; }
.cfg-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.cfg-lede { margin: -8px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.cfg .segmented { justify-self: start; }
.cfg .segmented.small button { height: 30px; font-size: 13px; }
.cfg .segmented [aria-checked="true"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-card); }
.cfg-row { display: grid; gap: 6px; font-size: 14px; }
.cfg-lab { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; }
.cfg-lab output { font-weight: 400; color: var(--ink-2); }
.cfg-row input[type="range"] { width: 100%; accent-color: var(--brand); }
.cfg-row small { font-size: 12px; color: var(--ink-3); }
.cfg-row select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-field); font: inherit; font-size: 14px; background: var(--surface); }
.cfg-est { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); font-size: 13px; }
.cfg-est-head { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); }
.cfg-total { margin: 6px 0 0; color: var(--ink-3); }
.cfg-total b { font-size: 24px; font-weight: 600; color: var(--ink); }
.cfg-unit { margin: 0 0 8px; color: var(--ink-3); }
.cfg-est dl { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.cfg-est dl div { display: flex; justify-content: space-between; gap: 12px; }
.cfg-est dt { color: var(--ink-2); }
.cfg-est dd { margin: 0; }
.cfg-msg { margin: 0; font-size: 13px; color: var(--brand); }
.cfg-foot { display: flex; justify-content: flex-end; gap: 8px; }
.tab-tag { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--mint); font-size: 11px; font-weight: 600; color: var(--ink); }
.bundle-save { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--mint-soft); font-size: 12px; color: var(--ok-ink); text-align: center; }

/* ---------- Sistema visual (nov. 2026): profundidade, movimento e estados compartilhados ---------- */
:root { --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

/* Janelas e menus entram com um leve crescimento; a saída é imediata para não atrasar quem está trabalhando */
dialog { color: var(--ink); background: var(--surface); }
dialog[open] { animation: pop-in var(--t-med) var(--ease-out); }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in .2s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }

/* Campos: todos os controles nativos seguem a mesma borda e o mesmo foco */
select, textarea, input { color: var(--ink); }
select:not([class]):not([name]), .cfg-row select { background-color: var(--surface); }
input[type="range"] { accent-color: var(--brand); }
.chips button, .segmented button, .choice, .file-drop { transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.chips button:hover { border-color: var(--line-strong); color: var(--ink); }
.segmented button[aria-selected="true"], .cfg .segmented [aria-checked="true"] { box-shadow: var(--shadow-card), 0 0 0 1px var(--line); }
.badge-ok { background: var(--mint-soft); color: var(--ok-ink); }
.row { transition: background-color var(--t-fast); }
.panel { transition: box-shadow var(--t-med), border-color var(--t-med); }
.guarantee { border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.offer { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent); }

/* Toque: alvos maiores e texto de 16px nos campos (evita o zoom automático do iOS) */
@media (pointer: coarse) {
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .btn-sm { height: 40px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }
  .chips button, .cat-chips button { height: 40px; padding: 0 14px; }
  .segmented button { height: 40px; }
}

/* Menos movimento: mantém as mudanças de estado, tira os deslocamentos */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
