/* CSS-only palettes; channel identities remain scoped by their own variables. */
html[data-palette=green] { --accent:#138264; --soft:#e6f4ee; --theme-detail:#d17932; --auth-brand-surface:#edf8f1; --auth-brand-glow:#d3eedf; }
html[data-palette=orange] { --accent:#b75b16; --soft:#fff2e6; --theme-detail:#b69c18; --auth-brand-surface:#fff6eb; --auth-brand-glow:#fce5c4; }
html[data-appearance=dark][data-palette=green] { --bg:#101714; --panel:#17221c; --input:#121c17; --text:#ecf4ef; --muted:#b1c2b6; --border:#304438; --accent:#6ac69d; --soft:#223b2d; --theme-detail:#e9a45e; --chat:#111c16; --incoming:#213027; --outgoing:#264a36; --auth-brand-surface:#14221a; --auth-brand-glow:#254633; }
html[data-appearance=dark][data-palette=orange] { --bg:#171310; --panel:#241d17; --input:#1c1712; --text:#f7efe7; --muted:#c8b8aa; --border:#493a2d; --accent:#f0a15f; --soft:#442f1e; --theme-detail:#ebd168; --chat:#1c1712; --incoming:#30271e; --outgoing:#51351e; --auth-brand-surface:#271c12; --auth-brand-glow:#513417; }
html[data-palette=green] .button.primary, html[data-palette=orange] .button.primary { background:var(--accent); color:var(--panel); border-color:var(--accent); }
html[data-palette=green] .eyebrow, html[data-palette=orange] .eyebrow { color:var(--accent); }
html[data-palette=green] .auth-feature-line, html[data-palette=orange] .auth-feature-line { background:linear-gradient(var(--accent),var(--theme-detail)); }
.theme-picker { display:grid; grid-template-columns:160px minmax(0,1fr); gap:22px; margin-top:16px; }
.theme-picker nav { display:flex; flex-direction:column; gap:8px; align-items:stretch; }
.theme-picker nav button { background:none; border:1px solid transparent; color:var(--muted); text-align:left; padding:12px; border-radius:8px; cursor:pointer; }
.theme-picker nav button[aria-pressed=true] { background:var(--soft); color:var(--text); border-color:var(--border); }
.theme-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.theme-tile { background:var(--panel); border:1px solid var(--border); color:var(--text); border-radius:10px; padding:10px; text-align:left; cursor:pointer; min-width:0; }
.theme-tile.selected { outline:2px solid var(--accent); outline-offset:2px; }
.theme-tile strong,.theme-tile small { display:block; margin-top:8px; }
.theme-tile small { font-size:10px; color:var(--muted); line-height:1.5; }
.theme-selected { display:block; font-size:10px; color:var(--accent); margin-top:6px; }
.theme-swatch { display:block; height:72px; border-radius:6px; position:relative; background:#f9eff0; border:1px solid #e0cccf; overflow:hidden; }
.theme-swatch.dark { background:#24191a; border-color:#4c393c; }
.theme-swatch i { position:absolute; left:0; top:0; bottom:0; width:22%; background:#d33c50; }
.theme-swatch.green i { background:#16835d; }.theme-swatch.orange i { background:#d2742d; }
.theme-swatch b { position:absolute; left:32%; right:12%; top:20%; height:14%; background:#cc9098; border-radius:3px; }
.theme-swatch em { position:absolute; left:32%; right:24%; top:55%; height:14%; background:#deb9be; border-radius:3px; }
.theme-swatch.green b { background:#d19050; }.theme-swatch.orange b { background:#d8bc44; }
.account-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; max-width:1200px; }
.account-settings-card { min-width:0; }.account-settings-card h2 { margin-bottom:16px; }
.settings-intro { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-bottom:20px; }.settings-intro>div { flex:1; min-width:200px; }
body[data-page=atendimento] .app-footer { display:none; }
@media(prefers-reduced-motion:no-preference) {
  .auth-card { animation:content-reveal 220ms ease-out both; }
  body:not([data-page=atendimento]) .page-heading,body:not([data-page=atendimento]) .account-settings-card { animation:content-reveal 180ms ease-out both; }
  .sidebar .nav-item,.theme-tile,.button,.account-link .avatar { transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease,box-shadow 140ms ease; }
  .theme-tile:hover,.account-link:hover .avatar { box-shadow:0 0 0 2px var(--soft); }
  .dialog-heading { animation:content-reveal 160ms ease-out; }
}
@keyframes content-reveal { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
@media(max-width:700px) {
  .theme-picker { grid-template-columns:1fr; gap:14px; }.theme-picker nav { flex-direction:row; }.theme-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .theme-picker nav button { flex:1; text-align:center; padding:10px 5px; }
  .account-settings-grid { grid-template-columns:1fr; gap:14px; }
  .account-settings-card { padding:18px; }.account-settings-card .button { min-height:42px; }
  .settings-intro { padding:18px; }.settings-intro .button { flex:1; }
  .dialog-heading h2 { font-size:20px; }
}
@media(min-width:2200px) { body:not([data-page=atendimento]) .main-content { max-width:2000px; margin:0 auto; width:100%; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:0.01ms!important; transition-duration:0.01ms!important; scroll-behavior:auto!important; } }
.help-center { max-width:1500px; margin:0 auto; }
.help-hero { padding:22px 0 28px; }.help-hero h1 { font-size:clamp(26px,3vw,42px); margin:12px 0; letter-spacing:-1px; }.help-hero>p { color:var(--muted); }
.help-availability { display:inline-flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); margin-top:10px; }.help-availability i { width:7px; height:7px; border-radius:50%; background:var(--green); }
.help-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }.help-action { color:var(--text); text-align:left; cursor:pointer; }.help-action strong,.help-action span { display:block; }.help-action strong { font-size:16px; margin-bottom:10px; }.help-action span { font-size:12px; color:var(--muted); line-height:1.6; }
.help-plan { margin:20px 0; font-size:12px; }.help-workspace { display:grid; grid-template-columns:300px minmax(0,1fr); gap:20px; align-items:start; }.help-list { padding:18px; }.help-list h2,.help-conversation h2,.help-faq h2 { font-size:20px; margin:0 0 18px; }
.support-ticket { width:100%; background:none; border:1px solid var(--border); color:var(--text); text-align:left; padding:12px; margin-bottom:10px; border-radius:8px; cursor:pointer; }.support-ticket strong { display:block; overflow-wrap:anywhere; }.support-ticket span { display:block; font-size:10px; color:var(--muted); margin-top:7px; }.support-ticket.selected { border-color:var(--accent); background:var(--soft); }
.support-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--accent); margin-right:5px; }.support-dot.waiting { background:#c28a25; }.support-dot.closed,.support-dot.scheduled { background:var(--green); }
.support-history { display:flex; flex-direction:column; gap:12px; max-height:500px; overflow-y:auto; margin:18px 0; padding:2px; }.support-message { border:1px solid var(--border); border-radius:10px; padding:14px; background:var(--bg); }.support-message.staff { border-left:3px solid var(--accent); }.support-message strong { font-size:12px; }.support-message p { white-space:normal; overflow-wrap:anywhere; font-size:13px; line-height:1.7; }.support-message small { color:var(--muted); font-size:10px; }.support-message audio { width:100%; max-width:340px; }
.support-audio-tools { border:1px dashed var(--border); padding:12px; border-radius:8px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; }.support-audio-tools label { flex:1; min-width:180px; }.support-audio-tools small { color:var(--muted); width:100%; }.support-schedule { background:var(--soft); padding:12px; border-radius:8px; }.help-faq { margin-top:22px; }.help-faq details { padding:14px 0; border-top:1px solid var(--border); }.help-faq summary { cursor:pointer; font-weight:600; }.help-faq details p { color:var(--muted); line-height:1.7; font-size:13px; }
@media(max-width:900px){.help-workspace{grid-template-columns:1fr;}.help-list #support-list{display:flex;gap:10px;overflow-x:auto;}.support-ticket{min-width:220px;max-width:280px;}.help-conversation{min-width:0;}}
@media(max-width:600px){.help-actions{grid-template-columns:1fr;gap:10px;}.help-action{padding:16px;}.help-action strong{font-size:15px;margin-bottom:6px;}.help-hero{padding-top:12px;}.help-availability{font-size:10px;line-height:1.6;}.help-conversation{padding:16px;}.support-history{max-height:420px;}}
.help-action { padding:22px; min-height:112px; }
.help-conversation,.help-faq { padding:24px; }
/* The commercial inbox occupies one viewport; only lists and message history scroll. */
body[data-page=atendimento] { height:var(--app-height,100dvh); min-height:0; overflow:hidden; }
body[data-page=atendimento] #app,body[data-page=atendimento] .app-shell { height:var(--app-height,100dvh); min-height:0; overflow:hidden; }
body[data-page=atendimento] .main-shell { margin:70px 0 0; height:calc(var(--app-height,100dvh) - 70px - var(--release-notice-height,0px)); min-height:0; display:flex; flex-direction:column; }
body[data-page=atendimento] .topbar { position:relative; top:auto; flex:0 0 62px; min-height:62px; height:62px; }
body[data-page=atendimento] .main-content { flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column; padding:12px 24px 16px; }
body[data-page=atendimento] .inbox-grid { flex:1; height:auto; min-height:0; max-height:none; }
body[data-page=atendimento] .chat-panel,body[data-page=atendimento] .contact-sidebar { min-height:0; overflow:hidden; }
body[data-page=atendimento] .chat-messages,body[data-page=atendimento] .contact-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
@media(max-width:760px) {
  .help-action { padding:16px; min-height:90px; }.help-conversation,.help-faq { padding:16px; }
  .sidebar .nav-label { max-width:100%; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:8px; }
  body[data-page=atendimento] .main-shell { margin:56px 0 0; height:calc(var(--app-height,100dvh) - 56px - 67px - env(safe-area-inset-bottom,0px) - var(--release-notice-height,0px)); min-height:0; }
  body[data-page=atendimento] .main-content { padding:8px 12px; }
}
@media(prefers-reduced-motion:reduce) { * { animation:none!important; transition:none!important; } }

.nav-compact{display:none;}
.support-export{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
@media(max-width:760px){.nav-full{display:none;}.nav-compact{display:inline;}}
