/* =========================================================
   Identidade visual Zivy Petit (extraída de zivypetit.com.br)
   ========================================================= */
:root {
  /* marca */
  --gold: #cea85d;
  --gold-dark: #b08a40;
  --gold-soft: #f3e6c8;
  --brown: #4a2c22;
  --cream: #fff7e8;
  --cream-2: #fdf0d8;
  --ink: #1a1a1a;
  --pink: #fc5f76;
  --pink-soft: #ffe4e8;
  --blue: #79c5e6;
  --blue-soft: #e6f4fa;

  /* interface */
  --bg: #fffbf3;
  --surface: #ffffff;
  --border: #eee3cf;
  --border-strong: #e0cfae;
  --text: var(--ink);
  --muted: #8a7a6a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(74, 44, 34, .04), 0 6px 20px rgba(74, 44, 34, .06);
  --shadow-lg: 0 20px 50px rgba(74, 44, 34, .18);
  --font-title: "Sora", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font: 14px/1.55 var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 400px at 100% -10%, var(--cream-2), transparent 60%),
    radial-gradient(900px 380px at -10% 0%, #fdf6e9, transparent 60%),
    var(--bg);
  min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }
h2, h3 { font-family: var(--font-title); color: var(--brown); letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 4px; font-weight: 700; }
h3 { margin: 0 0 12px; font-weight: 600; }
a { color: var(--gold-dark); }
code { background: var(--cream); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
::selection { background: var(--gold-soft); }

/* ---------- botões e campos ---------- */
button {
  font: 500 13.5px var(--font-body); cursor: pointer; border-radius: 999px; padding: 9px 18px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--brown);
  transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s;
}
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--brown); font-weight: 600; box-shadow: 0 4px 14px rgba(206, 168, 93, .35); }
button.primary:hover:not(:disabled) { background: var(--brown); border-color: var(--brown); color: #fff; box-shadow: 0 4px 14px rgba(74, 44, 34, .3); }
button.ghost:hover:not(:disabled) { background: var(--cream); border-color: var(--gold); }
button.sm { padding: 5px 12px; font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

input, select, textarea {
  font: 13.5px var(--font-body); color: var(--text); width: 100%;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 11px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(206, 168, 93, .22); }
/* esconde o "olho" nativo do Edge (já temos o nosso botão de mostrar senha) */
input::-ms-reveal, input::-ms-clear { display: none; }
input[type="checkbox"] { accent-color: var(--gold-dark); width: 16px; height: 16px; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 10px 28px;
  background: rgba(255, 247, 232, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 42px; display: block; }
.brand .divider { width: 1px; height: 34px; background: var(--border-strong); }
.brand strong { font-family: var(--font-title); font-size: 14px; color: var(--brown); display: block; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.steps { display: flex; gap: 6px; flex: 1; justify-content: center; }
.steps button { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
.steps button b {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 7px;
  font: 600 11.5px var(--font-title); background: #fff; border: 1px solid var(--border-strong); color: var(--muted);
}
.steps button:hover:not(:disabled) { background: #fff; }
.steps button.active { background: #fff; border-color: var(--border); color: var(--brown); box-shadow: var(--shadow); }
.steps button.active b { background: var(--gold); border-color: var(--gold); color: var(--brown); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.badge { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); }
.badge::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.badge.on { background: #eef8f1; border-color: #c9e8d3; color: #2f7a4b; }
.badge.off { background: var(--pink-soft); border-color: #f9c4cd; color: #c23a52; }

/* ---------- layout ---------- */
main { padding: 26px 28px 40px; max-width: 1560px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } .topbar { padding: 10px 16px; } main { padding: 18px 16px; } }
.footer-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.footer-actions .primary:only-child { margin-left: auto; }
.footer-actions .primary { padding: 11px 26px; font-size: 14px; }

/* hero */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(120deg, var(--cream) 0%, #fdeccc 100%); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px 26px; margin-bottom: 18px;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(206, 168, 93, .28), transparent 70%); }
.hero h1 { font: 600 19px/1.3 var(--font-title); color: var(--brown); margin: 0 0 4px; letter-spacing: -.01em; }
.hero p { margin: 0; color: #6f5a4c; max-width: 600px; font-size: 12.5px; line-height: 1.5; }
.hero .flow { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; flex-shrink: 0; }
.hero .flow span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font: 500 12px var(--font-title); color: var(--brown); box-shadow: var(--shadow); }
.hero .flow i { color: var(--gold-dark); font-style: normal; font-size: 18px; }
@media (max-width: 900px) { .hero { flex-direction: column; align-items: flex-start; } }

.notice { display: flex; gap: 10px; align-items: center; background: var(--cream); border: 1px solid var(--border-strong); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; color: var(--brown); }
.notice span { flex: 1; }

/* upload */
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--brown); font: 700 13px var(--font-title); margin-right: 8px; vertical-align: 1px; }
.drop {
  display: grid; place-items: center; text-align: center; min-height: 130px; margin-top: 14px; gap: 6px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; color: var(--muted); padding: 16px;
  background: #fffdf9; transition: .15s;
}
.drop .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--gold-dark); font-size: 20px; }
.drop:hover, .drop.over { border-color: var(--gold); background: var(--cream); color: var(--brown); }
.drop.loaded { min-height: 0; border-style: solid; border-color: #c9e8d3; background: #f3fbf6; color: var(--text); }
.drop.loaded .ico { background: #dff3e6; color: #2f7a4b; }

.summary { margin-top: 14px; font-size: 13px; }
.summary .kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.kpi { background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; color: var(--muted); font-size: 12px; }
.kpi b { display: block; font: 700 20px var(--font-title); color: var(--brown); }
.summary .warnline { color: #c23a52; margin-top: 8px; }

/* formulários */
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.form label, .lbl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
.lbl { margin: 14px 0 5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label.check { flex-direction: row !important; align-items: flex-start; gap: 9px; color: var(--text) !important; font-size: 13px !important; font-weight: 400 !important; cursor: pointer; }
label.check input { width: 16px; margin-top: 3px; flex-shrink: 0; }
label.check.sm { font-size: 12px !important; align-items: center; white-space: nowrap; }
label.check.sm input { margin-top: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 18px; margin-top: 12px; }
.inline-num { width: 64px !important; padding: 2px 6px !important; display: inline-block; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.chip { font-size: 12px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--border); background: #fff; }
.chip.store { background: var(--cream); border-color: var(--border-strong); color: var(--brown); }

.map-table { width: 100%; border-collapse: collapse; }
.map-table th { text-align: left; font: 600 11.5px var(--font-title); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--cream); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.map-table th:first-child { border-top-left-radius: 10px; }
.map-table th:last-child { border-top-right-radius: 10px; }
.map-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.map-table tr:hover td { background: #fffcf6; }

/* ---------- editor ---------- */
.tabs { display: flex; gap: 6px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.tab { background: transparent; border-color: transparent; font-weight: 600; color: var(--muted); font-family: var(--font-title); }
.tab.active { background: var(--cream); border-color: var(--border-strong); color: var(--brown); }
.tabs #globalStats { padding: 0 6px; font-size: 12.5px; }
.spacer { flex: 1; }

.editor { display: grid; grid-template-columns: 350px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
.plist { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 170px); margin: 0; }
.plist-tools { padding: 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; background: #fffdf9; }
.plist-actions { display: flex; gap: 8px; align-items: center; }
.plist-items { overflow: auto; flex: 1; }
.pitem { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; transition: background .1s; }
.pitem:hover { background: #fffcf6; }
.pitem.active { background: var(--cream); box-shadow: inset 3px 0 0 var(--gold); }
.pitem input { margin-top: 3px; flex-shrink: 0; }
.pitem .pname { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pitem.active .pname { color: var(--brown); font-weight: 600; }
.pitem .pmeta { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #f4ede0; color: var(--muted); font-weight: 500; }
.tag.warn { background: var(--pink-soft); color: #c23a52; }
.tag.ai { background: var(--blue-soft); color: #2a7fa3; }
.tag.bad { background: var(--pink-soft); color: #b42318; }

.pdetail { margin: 0; min-height: 400px; padding: 22px 26px; }
.pdetail h3 { margin: 24px 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pdetail h3::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--gold); }
.pdetail .fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pdetail .fgrid .w2 { grid-column: span 2; }
.pdetail .fgrid .w4 { grid-column: 1 / -1; }
@media (max-width: 700px) { .pdetail .fgrid { grid-template-columns: 1fr 1fr; } }
.pdetail label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
.pdetail label.ai > span::after { content: " ✨ IA"; color: #2a7fa3; font-size: 11px; }
.pdetail label.ai input, .pdetail label.ai textarea { border-color: #b9e0f0; background: #fbfeff; }
.pdetail .head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.pdetail .warns { background: var(--pink-soft); border: 1px solid #f9c4cd; color: #8f2a3c; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-top: 14px; }
.pdetail .warns li { margin: 2px 0; }
.desc-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; max-height: 280px; overflow: auto; font-size: 13px; background: #fffdf9; color: var(--text); font-weight: 400; }
.vtable-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--border); border-radius: 12px; }
.vtable { border-collapse: collapse; width: 100%; font-size: 13px; }
.vtable th { position: sticky; top: 0; z-index: 1; background: var(--cream); text-align: left; padding: 8px 10px; font: 600 11.5px var(--font-title); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.vtable td { border-bottom: 1px solid var(--border); padding: 3px 5px; }
.vtable tr:hover td { background: #fffcf6; }
.vtable input { padding: 5px 8px; border-color: transparent; background: transparent; min-width: 70px; border-radius: 8px; }
.vtable input:hover { border-color: var(--border-strong); background: #fff; }
.vtable input:focus { background: #fff; }
.vtable tr.dup input[data-f="sku"] { background: var(--pink-soft); color: #b42318; }
.vbulk { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0; padding: 12px; background: var(--cream); border: 1px solid var(--border); border-radius: 12px; }
.vbulk label { min-width: 120px; }

.preview-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; background: #fffdf9; }
.grid-wrap { overflow: auto; max-height: calc(100vh - 230px); min-height: 300px; }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.grid th { position: sticky; top: 0; z-index: 2; background: var(--cream); text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-strong); border-right: 1px solid var(--border); white-space: nowrap; font: 600 11.5px var(--font-title); color: var(--brown); }
table.grid td.pv { padding: 6px 10px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 1px solid var(--border); border-right: 1px solid #f6efe2; }
table.grid tr.parent td.pv { background: #fdf6e6; font-weight: 600; color: var(--brown); border-top: 1px solid var(--border-strong); }

/* ---------- modais e avisos ---------- */
/* Popup nativo (<dialog>): fica na camada do topo do navegador, centralizado na tela.
   Nunca passa da altura da tela: o conteúdo rola por dentro e os botões ficam sempre visíveis. */
dialog.popup {
  position: fixed; inset: 0; margin: auto; padding: 0; border: 0; background: transparent; color: var(--text);
  width: fit-content; height: fit-content; max-width: calc(100vw - 32px); max-height: none; overflow: visible;
}
dialog.popup:not([open]) { display: none; }
dialog.popup::backdrop { background: rgba(74, 44, 34, .45); backdrop-filter: blur(3px); }
dialog.popup[open] .modal-box { animation: popIn .18s ease-out; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-box {
  --pad: 24px;
  background: #fff; border-radius: 18px; padding: var(--pad) var(--pad) 0; width: min(500px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border-top: 4px solid var(--gold);
}
.modal-box.wide { --pad: 26px; width: min(620px, calc(100vw - 32px)); }
#modalBody { overflow-y: auto; min-height: 0; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 8px; }
.modal-box .modal-actions { flex-shrink: 0; margin: 0 calc(-1 * var(--pad)); padding: 14px var(--pad) 16px; border-top: 1px solid var(--border); background: #fff; border-radius: 0 0 18px 18px; }
#progress .modal-box { padding-bottom: 0; }
#progress .modal-actions { border-top: 0; }

/* configuração da IA */
/* painel */
.nav-home { font-weight: 600 !important; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dash-head h1 { font: 600 22px var(--font-title); color: var(--brown); margin: 0 0 2px; letter-spacing: -.01em; }
.dash-head p { margin: 0; font-size: 13px; }
.dash-actions { display: flex; gap: 8px; align-items: center; }
.dash-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1100px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-card span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-card b { display: block; font: 700 28px/1.2 var(--font-title); color: var(--brown); margin: 4px 0 2px; }
.kpi-card small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-card.warn b { color: var(--gold-dark); }
.kpi-card.bad { border-color: #f6c3cc; background: #fff8f9; }
.kpi-card.bad b { color: #c23a52; }
.kpi-card.ok b { color: #2a8a52; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-card-head.pad { padding: 18px 22px 10px; }
.dash-meta { font-size: 12.5px; margin: 4px 0 12px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.mini-kpis div { background: var(--cream); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--muted); }
.mini-kpis b { display: block; font: 700 20px var(--font-title); color: var(--brown); }
.mini-kpis .ok b { color: #2a8a52; }
.mini-kpis .bad { background: var(--pink-soft); border-color: #f9c4cd; }
.mini-kpis .bad b { color: #c23a52; }
.ok-line { margin: 4px 0 0; font-size: 12.5px; color: #2a7a4a; }
.txt-bad { color: #c23a52 !important; }
.totals { display: grid; gap: 0; margin-top: 10px; }
.totals div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.totals div:last-child { border-bottom: 0; }
.totals span { color: var(--muted); }
.totals b { font: 600 16px var(--font-title); color: var(--brown); }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.ok { background: #e7f6ec; color: #2a7a4a; }
.pill.bad { background: var(--pink-soft); color: #b42318; }
.pill.warn { background: var(--gold-soft); color: #7a5a1c; }
.pill.muted { background: #f1ede5; color: var(--muted); }
.table-wrap { overflow: auto; }
.runs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.runs-table th { text-align: left; font: 600 11px var(--font-title); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--cream); padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.runs-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.runs-table tr:last-child td { border-bottom: 0; }
.runs-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.runs-table tr.click { cursor: pointer; }
.runs-table tr.click:hover td { background: #fffcf6; }
.runs-table.compact td, .runs-table.compact th { padding: 7px 10px; }
#dashRuns { margin-top: 16px; }

/* já está na loja */
.tag.store { background: #fff1d6; color: #8a5a0c; }
.notify-check { margin-top: 14px !important; font-size: 12.5px !important; }
.conf-bulk { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; margin: 0 0 10px; }
.conf-wrap { max-height: 46vh; border: 1px solid var(--border); border-radius: 10px; }
.conf-table td { font-size: 12.5px; }
.conf-table select { padding: 5px 8px; font-size: 12.5px; min-width: 150px; }
.match { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; }
.match small { width: 100%; }

/* envio para a loja */
.tag.ok { background: #e7f6ec; color: #2a7a4a; }
.push-notes { margin: 16px 0 0; padding: 12px 14px 12px 30px; background: #fffdf9; border: 1px solid var(--border); border-radius: 10px; font-size: 12.5px; color: #5d4b3f; display: grid; gap: 4px; }
.push-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 8px; }
.push-kpis div { background: var(--cream); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--muted); }
.push-kpis b { display: block; font: 700 18px var(--font-title); color: var(--brown); }
.push-kpis .bad { background: var(--pink-soft); border-color: #f9c4cd; }
.push-kpis .bad b { color: #a62c43; }
.push-list { margin: 0; padding-left: 18px; font-size: 12.5px; display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.seg input:disabled + span { opacity: .45; cursor: not-allowed; }

/* loja WooCommerce (passo 1) */
.woo-box { margin-top: 14px; }
.woo-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fffdf9; font-size: 13px; }
.woo-line small { color: var(--muted); }
.woo-line .primary { margin-left: auto; }
.woo-actions { margin-left: auto; display: flex; gap: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot.on { background: #34a865; }
.dot.off { background: #d4b98a; }
.dot.err { background: #d9485f; }
.dot.load { background: var(--gold); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.woo-err { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--pink-soft); color: #a62c43; font-size: 12.5px; }
.csv-fallback { margin-top: 14px; font-size: 12.5px; }
.csv-fallback summary { cursor: pointer; color: var(--muted); width: fit-content; }
.csv-fallback summary:hover { color: var(--gold-dark); }
.csv-fallback .drop { min-height: 80px; margin-top: 10px; }
input.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

#modalTitle { font-size: 16px; margin: 0 0 4px; }
.ai-sub { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.ai-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); padding: 8px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ai-line .dot { width: 7px; height: 7px; border-radius: 50%; }
.ai-line .dot.on { background: #34a865; }
.ai-line .dot.off { background: #d4b98a; }
button.link { background: none; border: 0; padding: 0; border-radius: 0; color: var(--gold-dark); font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; box-shadow: none; }
button.link:hover:not(:disabled) { color: var(--brown); background: none; }
.ai-line .link { margin-left: auto; }
.modal-box .ai-label { display: block; font-size: 12px; font-weight: 500; color: var(--brown); margin: 14px 0 6px; }
.key-field { position: relative; }
.key-field input { height: 40px; padding-right: 72px; border-radius: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.key-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); text-decoration: none !important; }
.ai-help { margin-top: 8px; font-size: 12px; color: var(--muted); }
.ai-help summary { cursor: pointer; color: var(--gold-dark); width: fit-content; }
.ai-help ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-box .seg label { position: relative; display: block; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 12px; color: var(--text); background: #fff; transition: .12s; }
.seg label:hover span { border-color: var(--gold); }
.seg input:checked + span { background: var(--brown); border-color: var(--brown); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
#cfgModelCustom { margin-top: 8px; height: 36px; font-size: 12.5px; }
.ai-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); min-height: 1em; }
.ai-msg { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; }
.ai-msg.ok { background: #f1faf4; color: #2a7a4a; }
.ai-msg.err { background: var(--pink-soft); color: #a62c43; }
.modal-box label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin: 12px 0 5px; }
.modal-box label.check { display: flex; margin: 8px 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.bar { height: 10px; background: var(--cream); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--blue)); transition: width .3s; border-radius: 99px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--brown); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 60; max-width: 90vw; box-shadow: var(--shadow-lg); font-size: 13.5px; }
.toast.error { background: #c23a52; }

/* ---------- login ---------- */
.login-page { background: var(--bg); }
main.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; padding: 0; max-width: none; margin: 0; }

.auth-brand {
  position: relative; overflow: hidden; display: flex; align-items: center; padding: 64px clamp(40px, 6vw, 96px);
  background:
    radial-gradient(700px 500px at 85% 15%, rgba(206, 168, 93, .22), transparent 60%),
    radial-gradient(600px 500px at 0% 100%, rgba(206, 168, 93, .14), transparent 60%),
    linear-gradient(160deg, #573529 0%, #4a2c22 45%, #2f1b14 100%);
  color: #f6ead6;
}
.auth-brand .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(206, 168, 93, .28); pointer-events: none; }
.auth-brand .r1 { width: 520px; height: 520px; right: -180px; top: -160px; }
.auth-brand .r2 { width: 360px; height: 360px; right: -100px; top: -80px; border-color: rgba(206, 168, 93, .18); }
.auth-brand .r3 { width: 300px; height: 300px; left: -120px; bottom: -120px; border-color: rgba(206, 168, 93, .2); }
.auth-brand-inner { position: relative; z-index: 1; max-width: 520px; }
.auth-logo { height: 120px; display: block; margin-bottom: 40px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25)); }
.auth-kicker { display: inline-block; font: 600 12px var(--font-title); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.auth-brand h2 { font: 600 clamp(24px, 2.4vw, 32px)/1.3 var(--font-title); color: #fff7e8; margin: 0 0 30px; letter-spacing: -.01em; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #ead9bd; font-size: 14.5px; }
.auth-points li::before {
  content: "✓"; flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(206, 168, 93, .18); border: 1px solid rgba(206, 168, 93, .45); color: var(--gold); font-size: 13px; font-weight: 700;
}

.auth-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 24px; position: relative; }
.auth-box { width: min(380px, 100%); margin-block: auto; }
.auth-logo-mobile { display: none; height: 64px; margin: 0 auto 28px; }
.auth-box h1 { font: 700 30px/1.2 var(--font-title); color: var(--brown); margin: 0 0 8px; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); margin: 0 0 32px; }
.auth-label { display: block; font-size: 13px; font-weight: 500; color: var(--brown); margin: 0 0 7px; }
.auth-field { position: relative; margin-bottom: 18px; }
.auth-field > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; fill: #c4ae8a; pointer-events: none; transition: fill .15s; }
.auth-field input { height: 52px; padding: 0 48px 0 46px; border-radius: 14px; font-size: 15px; background: #fff; border-color: var(--border-strong); }
.auth-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(206, 168, 93, .18); }
.auth-field:focus-within > svg { fill: var(--gold-dark); }
.auth-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; padding: 0; border: 0; background: transparent; border-radius: 10px; display: grid; place-items: center; box-shadow: none; }
.auth-eye svg { width: 20px; height: 20px; fill: #c4ae8a; }
.auth-eye:hover { background: var(--cream); }
.auth-eye.on svg { fill: var(--gold-dark); }
.auth-submit { width: 100%; height: 52px; font-size: 15px; border-radius: 14px; margin-top: 8px; }
.auth-submit span { display: inline-block; transition: transform .15s; }
.auth-submit:hover:not(:disabled) span { transform: translateX(4px); }
.auth-error { background: var(--pink-soft); color: #a62c43; border-radius: 12px; padding: 10px 14px; margin: 0 0 6px; font-size: 13px; }
.auth-help { color: var(--muted); font-size: 12.5px; margin: 26px 0 0; text-align: center; line-height: 1.6; }
.auth-note { background: var(--cream); border: 1px solid var(--border-strong); color: var(--brown); border-radius: 14px; padding: 18px 20px; font-size: 13.5px; line-height: 1.6; }
.auth-note strong { display: block; font-family: var(--font-title); font-size: 15px; margin-bottom: 4px; }
.auth-note code { display: inline-block; margin-top: 8px; font-size: 13px; background: #fff; border: 1px solid var(--border-strong); }
.auth-foot { color: #b9a58a; font-size: 12px; padding-top: 32px; }

@media (max-width: 860px) {
  main.auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 40px 16px 20px; }
  .auth-box h1 { font-size: 26px; }
  .auth-brand { display: none; }
  .auth-logo-mobile { display: block; }
  .auth-box h1, .auth-sub { text-align: center; }
}
.user-chip { font-size: 12.5px; color: var(--brown); display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px !important; max-width: 200px; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps button { white-space: nowrap; }
@media (min-width: 901px) {
  .topbar { flex-wrap: nowrap; gap: 16px; }
  .steps { min-width: 0; }
  .top-actions { flex-shrink: 0; }
}
@media (max-width: 1480px) {
  .brand .divider, .brand > div { display: none; }
  .user-chip { max-width: none; padding: 4px !important; }
  .user-chip span { display: none; }
}
@media (max-width: 1200px) {
  .steps button { padding: 8px 10px; font-size: 12.5px; }
  .badge { display: none; }
}
.user-chip b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--brown); font: 700 12px var(--font-title); text-transform: uppercase; }

/* rolagem */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e6d6b6; border-radius: 99px; border: 2px solid #fff; }
::-webkit-scrollbar-track { background: transparent; }
