/* Weblogos · editor visual, painel de sites e login */
:root {
    --bg: #15110d;
    --bg-deep: #0e0b08;
    --panel: #1c1814;
    --panel-2: #26211a;
    --line: #2e2921;
    --line-2: #40392d;
    --text: #f5f2ec;
    --muted: #a89f91;
    --gold: #f2bf49;
    --gold-d: #d9a32b;
    --danger: #f0705f;
    --ok: #86dc98;
    --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
h1 { font-size: 22px; margin: 0 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand .logo { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand .web { color: var(--gold); }
.brand .logos { color: var(--text); }
.brand .script { font-family: 'Pacifico', cursive; font-size: 16px; color: #fff; line-height: 1; }

/* ---------- botões e campos ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 34px; padding: 0 14px; border-radius: 8px;
    border: 1px solid transparent; font: 600 13px/1 'Inter', sans-serif;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, border-color .15s, transform .15s;
}
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-d); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; height: 40px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }

.ibtn {
    width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none;
    border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
    border-radius: 8px; cursor: pointer; padding: 0;
    transition: border-color .15s, color .15s, background-color .15s;
}
.ibtn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.ibtn:disabled { opacity: .3; cursor: not-allowed; }
.ibtn.on { background: var(--gold); border-color: var(--gold); color: #000; }
.ibtn.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.ibtn.sm { width: 28px; height: 28px; border-radius: 7px; }
.ibtn svg, .btn svg, .tab svg { display: block; }

.input, .ed select, .ed input[type="text"], .ed input[type="number"], .ed input[type="url"], .ed input[type="email"], .ed input[type="password"], .ed textarea {
    width: 100%; height: 34px; padding: 0 10px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--line-2); border-radius: 8px;
    font: 500 13px 'Inter', sans-serif;
}
.ed textarea { height: 70px; padding: 8px 10px; resize: vertical; }
.input:focus, .ed select:focus, .ed input:focus, .ed textarea:focus { border-color: var(--gold); outline: none; }
.ed select { appearance: none; padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a89f91' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; }

/* ---------- páginas simples (painel e login) ---------- */
.page-simple { min-height: 100%; }
.simple-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--line); }
.painel { max-width: 920px; margin: 0 auto; padding: 32px 20px 80px; }
.painel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.busca { max-width: 280px; }
.aviso { background: rgba(242,191,73,.08); border: 1px solid rgba(242,191,73,.35); color: #f7dc9c; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin: 0 0 16px; }
.lista-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.site-item:hover { border-color: var(--line-2); }
.site-item[hidden] { display: none; }
.site-info { display: grid; gap: 1px; min-width: 0; }
.site-info strong { font-size: 15px; }
.site-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-acoes { display: flex; gap: 8px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.pill.ok { background: rgba(134,220,152,.12); color: var(--ok); }
.pill.warn { background: rgba(240,112,95,.14); color: var(--danger); }
.vazio { color: var(--muted); padding: 30px 0; text-align: center; }
@media (max-width: 640px) { .site-item { grid-template-columns: 1fr; } }

.login { max-width: 360px; margin: 12vh auto 0; padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.login .brand { margin-bottom: 22px; }
.login label { display: block; margin: 18px 0 6px; font-size: 12px; color: var(--muted); }
.login .btn-block { margin-top: 16px; }
.form-erro { color: var(--danger); margin: 10px 0 0; font-size: 13px; }

/* ---------- editor: estrutura ---------- */
.editor-body { overflow: hidden; }
.ed { height: 100vh; display: grid; grid-template-rows: 56px minmax(0, 1fr); }
.topbar { display: flex; align-items: center; gap: 18px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-name { display: grid; gap: 0; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line-2); line-height: 1.25; }
.site-name strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 12px; color: var(--muted); }
.status.dirty { color: var(--gold); }
.status.ok { color: var(--ok); }
.devices { display: flex; gap: 4px; margin: 0 auto; }
.top-actions { display: flex; gap: 8px; align-items: center; }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 356px; min-height: 0; }
.stage { background: var(--bg-deep); padding: 14px; overflow: auto; display: flex; justify-content: center; min-height: 0; }
.frame-wrap { position: relative; width: 100%; height: 100%; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 12px 40px rgba(0,0,0,.5); transition: width .25s ease; }
.frame-wrap.tablet { width: 820px; }
.frame-wrap.mobile { width: 390px; }
#frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.loader { position: absolute; inset: 0; background: rgba(14,11,8,.94); color: var(--text); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; text-align: center; padding: 24px; z-index: 5; }
.loader[hidden] { display: none; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; animation: giro .8s linear infinite; }
.loader.erro .spinner { display: none; }
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } .frame-wrap { transition: none; } }

/* ---------- painel lateral ---------- */
.side { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
.tab { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 12.5px 'Inter', sans-serif; cursor: pointer; }
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.on { background: var(--panel-2); color: var(--gold); }
.panel { flex: 1; overflow: auto; padding: 4px 14px 40px; min-height: 0; }
.panel[hidden] { display: none; }

.grp { padding: 14px 0; border-top: 1px solid var(--line); }
.grp:first-child { border-top: 0; }
.grp > h4 { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field { margin-bottom: 10px; }
.field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field:last-child { margin-bottom: 0; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 4px; }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 15px; height: 15px; }

.el-head { padding: 14px 0 10px; }
.el-head .tipo { display: inline-block; font-size: 13px; font-weight: 700; color: #000; background: var(--gold); padding: 3px 9px; border-radius: 6px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.crumb { font: 500 11.5px 'Inter', sans-serif; padding: 3px 8px; border-radius: 6px; border: 0; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.crumb:hover { color: var(--text); }
.crumb.now { color: var(--gold); background: rgba(242,191,73,.1); cursor: default; }

.empty { padding: 26px 4px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 15px; margin: 0 0 8px; }
.empty ul { padding-left: 18px; margin: 10px 0 0; display: grid; gap: 6px; }

.thumb { width: 100%; max-height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; display: block; margin-bottom: 10px; }

.colorf { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px 4px 5px; }
.colorf:focus-within { border-color: var(--gold); }
.colorf input[type="color"] { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: none; cursor: pointer; flex: none; }
.colorf input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.colorf input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.colorf input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.colorf .hex { flex: 1; height: 26px !important; border: 0 !important; background: transparent !important; padding: 0 !important; font-family: ui-monospace, Menlo, Consolas, monospace !important; font-size: 12.5px !important; }
.colorf .meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.paleta { display: grid; gap: 6px; }

.sec-add { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.sec-list { display: grid; gap: 6px; margin-top: 4px; }
.sec-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); cursor: pointer; }
.sec-row:hover { border-color: var(--line-2); }
.sec-row.sel { border-color: var(--gold); }
.sec-row.oculta .sec-txt { opacity: .45; }
.sec-txt { min-width: 0; display: grid; }
.sec-txt b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-txt span { font-size: 11.5px; color: var(--muted); }
.sec-ctl { display: flex; gap: 3px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, 92vw); background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-left: 3px solid var(--gold); padding: 11px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 50; }
.toast[hidden] { display: none; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }

@media (max-width: 980px) { .main { grid-template-columns: minmax(0, 1fr) 300px; } .site-name { display: none; } }

/* ---------- erro ao salvar (fica na tela até resolver) ---------- */
.save-error { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(620px, 94vw); background: #2a1a17; color: var(--text); border: 1px solid var(--danger); border-radius: 12px; padding: 16px 18px; z-index: 60; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.save-error strong { color: var(--danger); }
.save-error p { margin: 6px 0 14px; font-size: 13px; line-height: 1.5; word-break: break-word; }

/* ---------- diagnóstico ---------- */
.diag { max-width: 820px; margin: 0 auto; padding: 32px 20px 80px; }
.diag h2 { font-size: 15px; margin: 26px 0 10px; color: var(--muted); font-weight: 600; }
.diag-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.diag-row .ic { font-weight: 700; }
.diag-row.ok .ic { color: var(--ok); }
.diag-row.bad { border-color: var(--danger); }
.diag-row.bad .ic { color: var(--danger); }
.diag-row.warn .ic { color: var(--gold); }
.diag-row .t { font-weight: 600; }
.diag-row .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; word-break: break-word; }
.diag-row .fix { margin-top: 6px; font-size: 12.5px; color: #f7dc9c; }

/* ---------- contas ---------- */
.abas-login { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.abas-login a { text-align: center; padding: 9px 8px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
.abas-login a.on { background: var(--panel-2); color: var(--gold); }
.form-ok { color: var(--ok); margin: 10px 0 0; font-size: 13px; }
.top-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.top-links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 13px; }
.top-links a:not(.btn):hover { color: var(--gold); }
.login .aviso { margin: 0 0 14px; }

/* ---------- mensagens ---------- */
.msg-item { list-style: none; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.msg-topo { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msg-corpo { margin: 0; line-height: 1.55; word-break: break-word; }

/* ---------- adicionar elementos ---------- */
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.add-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 58px; padding: 8px 4px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 9px; cursor: pointer; font: 500 11.5px 'Inter', sans-serif; text-align: center; line-height: 1.2; }
.add-btn:hover { border-color: var(--gold); color: var(--gold); }
.add-btn svg { display: block; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 6px; border-radius: 7px; font: 600 12px 'Inter', sans-serif; cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--gold); }

/* ---------- editor no CELULAR: o painel vira uma gaveta embaixo ---------- */
.sheet-handle { display: none; }
@media (max-width: 900px) {
    .ed { height: 100vh; height: 100dvh; grid-template-rows: 52px minmax(0, 1fr); }
    .topbar { gap: 8px; padding: 0 10px; }
    .brand .script, .site-name, .devices, #btn-view { display: none; }
    .top-actions { margin-left: auto; gap: 6px; }
    .top-actions .btn { height: 40px; padding: 0 12px; }
    .main { display: block; position: relative; min-height: 0; }
    .stage { padding: 0; height: 100%; }
    .frame-wrap, .frame-wrap.tablet, .frame-wrap.mobile { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
    .side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: min(64vh, 560px); border-left: 0; border-top: 1px solid var(--line-2);
        border-radius: 16px 16px 0 0; box-shadow: 0 -12px 34px rgba(0,0,0,.55); transform: translateY(calc(100% - 92px)); transition: transform .25s ease; }
    .side.open { transform: none; }
    .sheet-handle { display: grid; place-items: center; width: 100%; height: 26px; border: 0; background: transparent; cursor: pointer; flex: none; }
    .sheet-handle span { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); }
    .tabs { padding: 4px 10px 10px; }
    .tab { height: 44px; }
    .panel { padding: 4px 14px 90px; }
    .ibtn { width: 40px; height: 40px; } .ibtn.sm { width: 36px; height: 36px; }
    .btn-sm { height: 38px; }
    .ed input[type="text"], .ed input[type="number"], .ed input[type="url"], .ed input[type="email"], .ed input[type="password"], .ed select, .ed textarea, .colorf .hex { font-size: 16px !important; }
    .ed input[type="text"], .ed input[type="number"], .ed input[type="url"], .ed input[type="email"], .ed input[type="password"], .ed select { height: 42px; }
    .add-grid { grid-template-columns: repeat(3, 1fr); }
    .toast { top: 62px; bottom: auto; }
    .save-error { top: 62px; bottom: auto; }
    .loader { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ---------- pendências e SMTP ---------- */
.pend { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-bottom: 6px; background: rgba(242,191,73,.07); border: 1px solid rgba(242,191,73,.28); border-radius: 9px; font-size: 12.5px; }
.pend span { flex: 1; }
.pend-aviso { color: var(--gold); }
.smtp-status.ok { color: var(--ok); }
.smtp-status.err { color: var(--danger); }
.empty .grp { text-align: left; padding-top: 0; }

/* ---------- uso da IA ---------- */
.resumo-uso { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.resumo-uso div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.resumo-uso strong { display: block; font-size: 22px; }
.resumo-uso span { color: var(--muted); font-size: 12px; }
.tabela-rolagem { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tab-uso { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.tab-uso th, .tab-uso td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tab-uso th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--panel); }
.tab-uso a { color: var(--text); }
.tab-uso tr.caro td { background: rgba(240,112,95,.10); }
.tab-uso tr.atencao td { background: rgba(242,191,73,.07); }

/* ---------- freio da IA ---------- */
.freio { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 16px 0; }
.freio h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.freio .estado { font-size: 11px; padding: 3px 10px; border-radius: 99px; font-weight: 700; }
.freio .estado.rodando { background: rgba(83,173,99,.15); color: var(--ok); }
.freio .estado.parado { background: rgba(240,112,95,.15); color: var(--danger); }
.freio-linhas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.freio-linhas span { display: block; color: var(--muted); font-size: 12px; }
.freio-linhas strong { font-size: 13.5px; }
.freio .barra { height: 6px; background: var(--line); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.freio .barra i { display: block; height: 100%; background: var(--gold); }
.freio-botoes { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-danger { background: var(--danger); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; }

/* ---------- prévia + janela de cadastro ---------- */
.page-previa { margin: 0; height: 100%; display: flex; flex-direction: column; background: #15110d; }
html:has(.page-previa) { height: 100%; }
.previa-barra { flex: none; display: flex; align-items: center; gap: 16px; padding: 10px 18px; padding-top: max(10px, env(safe-area-inset-top, 0px)); background: var(--panel); border-bottom: 1px solid var(--line); }
.previa-barra .brand { flex: none; }
.previa-texto { flex: 1; margin: 0; font-size: 14px; color: var(--muted); min-width: 0; }
.previa-texto strong { color: var(--text); }
.previa-acoes { display: flex; gap: 8px; flex: none; }
.previa-quadro { flex: 1; width: 100%; border: 0; background: #fff; min-height: 0; }
.previa-vazia { max-width: 460px; margin: 18vh auto 0; padding: 0 20px; text-align: center; }
.modal-fundo { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8,6,4,.72); backdrop-filter: blur(3px); overflow-y: auto; }
.modal-fundo[hidden] { display: none; }
.modal-caixa { position: relative; width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 26px 24px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); outline: none; }
.modal-caixa h2 { margin: 0 0 6px; font-size: 22px; padding-right: 30px; }
.modal-sub { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.modal-fechar { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.modal-fechar:hover { background: var(--panel-2); color: var(--text); }
.modal-abas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg); border-radius: 11px; margin-bottom: 14px; }
.modal-abas button { border: 0; background: transparent; color: var(--muted); padding: 9px 8px; border-radius: 8px; font-weight: 600; font-size: 13.5px; font-family: inherit; cursor: pointer; }
.modal-abas button.on { background: var(--panel-2); color: var(--text); }
.modal-form { display: grid; gap: 12px; }
.modal-form[hidden] { display: none; }
.modal-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.modal-form input { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 11px 12px; border-radius: 10px; font-size: 16px; font-family: inherit; min-height: 46px; }
.modal-form input:focus { border-color: var(--gold); outline: none; }
.modal-erro { margin: 0; padding: 9px 12px; border-radius: 9px; background: rgba(240,112,95,.12); border: 1px solid rgba(240,112,95,.4); color: #ffb3a8; font-size: 13px; }
.modal-erro[hidden] { display: none; }
.btn-grande { min-height: 48px; font-size: 15px; width: 100%; }
.modal-rodape { text-align: center; margin: 14px 0 0; }
body.modal-aberto { overflow: hidden; }
@media (max-width: 720px) {
    .previa-barra { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
    .previa-texto { order: 3; flex-basis: 100%; font-size: 12.5px; }
    .previa-texto span { display: none; }
    .previa-acoes { margin-left: auto; }
    .previa-acoes .btn { padding: 8px 12px; font-size: 13px; }
    .modal-caixa { padding: 22px 18px 16px; }
}

/* ---------- painel do cliente (abas, cartões, planos) ---------- */
.dash-abas { display: flex; gap: 6px; margin: 0 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-abas a { flex: none; padding: 11px 16px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dash-abas a:hover { color: var(--text); }
.dash-abas a.on { color: var(--gold); border-bottom-color: var(--gold); }
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pill.info { background: rgba(242,191,73,.12); color: var(--gold); }
.cartao { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cartao h2 { margin: 0; font-size: 15px; }
.cartao-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; margin: 0; }
.dados dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.dados dd { margin: 0; font-weight: 600; word-break: break-word; }
.secao-titulo { font-size: 15px; margin: 26px 0 12px; }
.planos-painel { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 10px; }
.plano-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.plano-card.destaque { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,191,73,.08); }
.plano-tag { position: absolute; top: -11px; left: 18px; background: var(--gold); color: #000; font-size: 11px; font-weight: 800; padding: 3px 11px; border-radius: 99px; }
.plano-card h3 { margin: 0 0 10px; font-size: 15px; }
.preco-linha { display: flex; align-items: baseline; gap: 6px; margin: 0 0 4px; }
.preco-linha strong { font-size: 32px; letter-spacing: -.02em; }
.preco-linha span { color: var(--muted); }
.lista-check { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.lista-check li::before { content: "✓"; color: var(--ok); margin-right: 9px; font-weight: 700; }
.btn-cheio { width: 100%; margin-top: auto; justify-content: center; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
@media (max-width: 720px) { .site-item { grid-template-columns: 1fr; } .site-acoes { flex-wrap: wrap; } }
.btn-cheio-form { margin-top: auto; }
.btn-cheio-form .btn { width: 100%; justify-content: center; }
.aviso.flash-ok { background: rgba(134,220,152,.10); border-color: rgba(134,220,152,.4); color: #b9ecc4; }
.aviso.flash-erro { background: rgba(240,112,95,.10); border-color: rgba(240,112,95,.4); color: #ffb3a8; }
#btn-publicar { background: var(--ok); color: #06210f; }
#btn-publicar:hover { filter: brightness(1.08); }

/* ---------- assistente "Publicar": formulário maior + passo do plano ---------- */
.publicar-largo { max-width: 780px; }
.input-grande { min-height: 52px; font-size: 17px; padding: 14px 16px; }
.passos-publicar { display: flex; gap: 8px; margin-bottom: 16px; }
.passo-num { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 5px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.passo-num.on { color: var(--gold); border-color: rgba(242,191,73,.4); background: rgba(242,191,73,.08); }
.plano-card.selecionavel { cursor: pointer; outline: none; }
.plano-card.selecionavel:hover, .plano-card.selecionavel:focus-visible { border-color: var(--gold); }
.plano-check { display: none; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--ok); }
.plano-card.selecionado { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,191,73,.12); }
.plano-card.selecionado .plano-check { display: block; }
.bloco-pix-grid:not([hidden]) { display: grid; gap: 12px; }

/* e-mails profissionais (painel do cliente) */
.emails-cartao { margin-bottom: 18px; }
.email-dominio { padding: 12px 0; border-top: 1px solid var(--line, #2e2921); }
.email-dominio:first-of-type { border-top: 0; }
.email-linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.email-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.email-campo { display: flex; align-items: center; flex: 1 1 220px; background: var(--bg, #15110d); border: 1px solid var(--line-2, #40392d); border-radius: 9px; padding-right: 10px; }
.email-campo .input { border: 0; background: transparent; flex: 1; min-width: 0; }
.email-campo span { color: var(--muted, #a89f91); font-size: 13px; white-space: nowrap; }

/* ajuda pelo WhatsApp (painel, publicar, e-mails) */
.ajuda-cartao { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; margin: 16px 0; padding: 14px 16px; border-radius: 12px;
    background: rgba(37,211,102,.07); border: 1px solid rgba(37,211,102,.28); }
.ajuda-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #25d366; color: #fff; }
.ajuda-txt { display: grid; gap: 2px; font-size: 13.5px; line-height: 1.45; }
.ajuda-txt span { color: var(--muted, #a89f91); }
.ajuda-sec { color: #86dc98; font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ajuda-btn { background: #25d366; color: #fff; border: 0; white-space: nowrap; }
.ajuda-btn:hover { background: #1ebe5b; color: #fff; }
.ajuda-flutuante { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 16px 11px 13px; border-radius: 99px; background: #25d366; color: #fff; font: 700 14px 'Inter', sans-serif; text-decoration: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform 160ms cubic-bezier(.23,1,.32,1); }
.ajuda-flutuante:hover { color: #fff; transform: translateY(-2px); }
.ajuda-flutuante:active { transform: scale(.97); }
@media (max-width: 640px) { .ajuda-cartao { grid-template-columns: 40px 1fr; } .ajuda-btn { grid-column: 1 / -1; } .ajuda-flutuante span { display: none; } .ajuda-flutuante { padding: 13px; } }

/* trilha do cliente: Criar -> Personalizar -> Publicar -> No ar */
.jornada { margin: 4px 0 18px; padding: 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(242,191,73,.09), rgba(242,191,73,.03)); border: 1px solid rgba(242,191,73,.28); }
.jornada-passos { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 0 0 16px; padding: 0; counter-reset: p; }
.jornada-passos li { position: relative; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted, #a89f91); }
.jornada-passos li::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--line-2, #40392d); margin-left: 4px; }
.jornada-passos li:last-child::after { display: none; }
.jp-n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; border: 2px solid var(--line-2, #40392d); color: var(--muted, #a89f91); }
.jornada-passos li.feito { color: var(--text, #f5f2ec); } .jornada-passos li.feito .jp-n { background: #86dc98; border-color: #86dc98; color: #0e2414; } .jornada-passos li.feito::after { background: #86dc98; }
.jornada-passos li.atual { color: var(--text, #f5f2ec); font-weight: 700; } .jornada-passos li.atual .jp-n { border-color: var(--gold, #f2bf49); color: var(--gold, #f2bf49); }
.jp-rot { white-space: nowrap; }
.jornada-agora { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.jornada-agora small { display: block; color: var(--muted, #a89f91); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.jornada-agora strong { display: block; font-size: 20px; margin: 2px 0; }
.jornada-agora span { color: var(--muted, #a89f91); font-size: 13.5px; }
.jornada-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-grande { height: 46px; padding: 0 22px; font-size: 15px; }
@media (max-width: 640px) { .jp-rot { display: none; } .jornada-passos li.atual .jp-rot { display: inline; } .jornada-acoes, .jornada-acoes .btn { width: 100%; } }
.jornada-acoes .btn { width: auto; flex: none; }
.jornada-acoes { align-items: center; }
@media (max-width: 640px) { .jornada-acoes .btn { width: 100%; } }

/* pedido (checkout) */
.pedido { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--panel, #1c1814); border: 1px solid var(--line-2, #40392d); }
.pedido-tit { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #a89f91); }
.pedido-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 15px; }
.pedido-linha small, .pedido-total small, .pedido-add small { color: var(--muted, #a89f91); font-size: 12px; font-weight: 500; }
.pedido-x { border: 0; background: transparent; color: var(--muted, #a89f91); text-decoration: underline; font-size: 12px; cursor: pointer; padding: 0 0 0 4px; }
.pedido-x:hover { color: #f0705f; }
.pedido-add { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin: 6px 0; padding: 10px 12px; border: 1px dashed rgba(242,191,73,.55);
    border-radius: 10px; background: rgba(242,191,73,.06); color: var(--gold, #f2bf49); font: 700 14px Inter, sans-serif; cursor: pointer; text-align: left; }
.pedido-add:hover { background: rgba(242,191,73,.12); }
.pedido-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-2, #40392d); font-size: 18px; font-weight: 800; }
.pedido-total strong { color: var(--gold, #f2bf49); font-size: 22px; }
.pedido-depois { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: 14px; }
.pedido-depois small { display: block; }
.pedido [hidden], .pedido-linha[hidden], .pedido-add[hidden] { display: none !important; }
/* checkout: cartão | Pix */
.metodos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.metodo { display: grid; gap: 1px; padding: 12px 14px; border: 1px solid var(--line-2, #40392d); border-radius: 12px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.metodo b { font-size: 14.5px; } .metodo small { color: var(--muted, #a89f91); font-size: 12px; }
.metodo.on { border-color: var(--gold, #f2bf49); background: rgba(242,191,73,.08); box-shadow: inset 0 0 0 1px var(--gold, #f2bf49); }
.metodo:disabled { opacity: .45; cursor: not-allowed; }
.pedido-linha strong, .pedido-total strong { white-space: nowrap; }
.email-passos { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 10px; padding: 0; }
.email-passos li { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2, #40392d); font-size: 13px; }
.email-passos li b { display: block; } .email-passos li small { color: var(--muted, #a89f91); font-size: 12px; }
.email-passos li.feito { border-color: rgba(134,220,152,.5); } .email-passos li.feito b::before { content: '✓ '; color: #86dc98; }
.email-passos li.atual { border-color: var(--gold, #f2bf49); background: rgba(242,191,73,.07); }
@media (max-width: 640px) { .email-passos { grid-template-columns: 1fr; } }
