/* Personalize — estilos base (loja + painel) */
:root {
  --plum-950: #170524;
  --plum-900: #1f0730;
  --plum: #2b0b3f;
  --plum-700: #44165f;
  --brand: #5b1385;
  --brand-500: #7b2fb0;
  --brand-100: #efe4f7;
  --brand-50: #f7f1fb;
  --coral: #ff6a3d;
  --coral-600: #ec5226;
  --coral-100: #ffe6dc;
  --mint: #0fa678;
  --mint-100: #d9f5ea;
  --sun: #f5a524;
  --sun-100: #fff1d6;
  --sky: #2f6fde;
  --sky-100: #e1ecfd;
  --red: #dc3545;
  --red-100: #fde3e5;

  --bg: #fbf7f2;
  --surface: #ffffff;
  --sand: #f4ede4;
  --line: #ece4da;
  --line-2: #e2d8cc;
  --ink: #1f1a24;
  --ink-2: #3c3543;
  --muted: #736b7b;
  --muted-2: #a39aa9;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(43, 11, 63, .06);
  --shadow: 0 6px 24px -8px rgba(43, 11, 63, .14), 0 2px 6px rgba(43, 11, 63, .05);
  --shadow-lg: 0 24px 60px -20px rgba(43, 11, 63, .30);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
svg { max-width: 100%; }
svg.lucide { display: inline-block; vertical-align: -0.2em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-500); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--plum); }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack > * + * { margin-top: 14px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-coral { color: var(--coral-600); } .text-mint { color: var(--mint); } .text-red { color: var(--red); } .text-plum { color: var(--plum); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-lucide], .lucide { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }

/* ------------------------------------------------ botões */
.btn { --b: var(--plum); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s, color .15s; white-space: nowrap; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px -8px rgba(255, 106, 61, .7); }
.btn-primary:hover { background: var(--coral-600); color: #fff; }
.btn-dark { background: var(--plum); color: #fff; }
.btn-dark:hover { background: var(--plum-700); color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-500); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--plum); color: var(--plum); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--sand); color: var(--plum); }
.btn-soft { background: var(--brand-50); color: var(--brand); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand); }
.btn-mint { background: var(--mint); color: #fff; }
.btn-mint:hover { background: #0b8e66; color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; color: #fff; }
.btn-danger { background: var(--red-100); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .86rem; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: var(--sand); color: var(--plum); }
.icon-btn .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; font-weight: 600; }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ formulários */
.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-weight: 700; font-size: .86rem; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 5px; font-weight: 500; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(123, 47, 176, .14); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.select { appearance: none; background-image: 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='%23736b7b' stroke-width='2.5' 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 12px center; padding-right: 38px; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-radius: 0 12px 12px 0; min-height: 46px; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-prefix .input { padding-left: 42px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 48px; }
.pass-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } .grid-4.keep-2, .grid-3.keep-2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; margin-bottom: 10px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + i { background: var(--mint); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px rgba(15, 166, 120, .2); }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 10px; }
.radio-card:hover { border-color: var(--brand-500); }
.radio-card input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; margin: 0; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(91, 19, 133, .08); }
.radio-card .rc-title { font-weight: 700; color: var(--ink); }
.radio-card .rc-sub { font-size: .84rem; color: var(--muted); }
.radio-card .rc-price { font-weight: 800; color: var(--plum); white-space: nowrap; }
.error-text { color: var(--red); font-size: .85rem; font-weight: 600; }

/* ------------------------------------------------ cartões */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad, .card > .pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.02rem; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: #fdfbf8; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 640px) { .card-body, .card-pad { padding: 16px; } .card-head { padding: 14px 16px; } }

/* ------------------------------------------------ badges e chips */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--sand); color: var(--ink-2); }
.badge-green { background: var(--mint-100); color: #087a58; }
.badge-red { background: var(--red-100); color: #b02a37; }
.badge-yellow { background: var(--sun-100); color: #9a5b00; }
.badge-orange { background: var(--coral-100); color: #c2410c; }
.badge-blue { background: var(--sky-100); color: #1d4ed8; }
.badge-purple { background: var(--brand-100); color: var(--brand); }
.badge-teal { background: #d7f3f1; color: #0f766e; }
.badge-gray { background: #eeeaf0; color: #5b5463; }
.badge-dark { background: var(--plum); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2); font-weight: 600; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.chip:hover, .chip.active { border-color: var(--plum); color: var(--plum); }
.chip.active { background: var(--plum); color: #fff; }

/* ------------------------------------------------ tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fdfbf8; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fdfaf6; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table a.row-link { color: inherit; font-weight: 700; }
.table a.row-link:hover { color: var(--brand); }

/* ------------------------------------------------ listas */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: inherit; }
.list li:last-child .list-item, .list > .list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: #fdfaf6; color: inherit; }
.list-item .title { font-weight: 700; color: var(--ink); }
.list-item .sub { color: var(--muted); font-size: .86rem; }
.ico-box { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-50); color: var(--brand); }
.ico-box.coral { background: var(--coral-100); color: var(--coral-600); }
.ico-box.mint { background: var(--mint-100); color: var(--mint); }
.ico-box.sun { background: var(--sun-100); color: #b26b00; }
.ico-box.sky { background: var(--sky-100); color: var(--sky); }
.ico-box.red { background: var(--red-100); color: var(--red); }
.ico-box.gray { background: #eeeaf0; color: var(--muted); }

/* ------------------------------------------------ estados vazios / erro */
.empty { text-align: center; padding: 48px 20px; }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.empty .ico [data-lucide] { width: 28px; height: 28px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 16px; }
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.error-mark { width: 64px; margin: 0 auto 20px; }
.error-page .code { font-size: 4.5rem; font-weight: 800; color: var(--coral); line-height: 1; margin-bottom: 8px; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--brand-50); color: var(--ink-2); border: 1px solid var(--brand-100); font-size: .92rem; }
.alert [data-lucide] { color: var(--brand); margin-top: 2px; }
.alert.warning { background: var(--sun-100); border-color: #ffe2a8; }
.alert.warning [data-lucide] { color: #b26b00; }
.alert.success { background: var(--mint-100); border-color: #b5ebd6; }
.alert.success [data-lucide] { color: var(--mint); }
.alert.danger { background: var(--red-100); border-color: #f8c2c7; }
.alert.danger [data-lucide] { color: var(--red); }

/* ------------------------------------------------ toasts */
.toasts { position: fixed; z-index: 1000; right: 16px; bottom: calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--plum); color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem; animation: toast-in .25s ease-out; }
.toast span { flex: 1; }
.toast button { background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; padding: 0; }
.toast.success [data-lucide]:first-child { color: #5eead4; }
.toast.error { background: #7f1d2b; }
.toast.warning [data-lucide]:first-child { color: #fcd34d; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@media (max-width: 640px) { .toasts { left: 16px; right: 16px; bottom: calc(80px + var(--safe-b)); max-width: none; } }

/* ------------------------------------------------ modais */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal.wide { width: min(920px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(23, 5, 36, .55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); background: #fdfbf8; position: sticky; bottom: 0; }
@media (max-width: 640px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .modal-foot { padding-bottom: calc(16px + var(--safe-b)); }
}

/* ------------------------------------------------ dropdown */
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .92rem; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--sand); color: var(--plum); }
.dropdown hr { margin: 6px 0; }

/* ------------------------------------------------ paginação */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 18px; flex-wrap: wrap; }
.pagination a, .pagination .dots { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-weight: 700; color: var(--ink-2); padding: 0 8px; }
.pagination a { border: 1.5px solid var(--line-2); background: #fff; }
.pagination a.active { background: var(--plum); border-color: var(--plum); color: #fff; }

/* ------------------------------------------------ estrelas */
.stars { display: inline-flex; gap: 2px; color: var(--sun); }
.stars [data-lucide] { width: 16px; height: 16px; fill: currentColor; }
.stars .off { color: #e4dcd2; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars-input input { position: absolute; opacity: 0; }
.stars-input label { cursor: pointer; color: #e4dcd2; }
.stars-input label [data-lucide] { width: 32px; height: 32px; fill: currentColor; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: var(--sun); }

/* ------------------------------------------------ banner de instalar / push */
.push-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: linear-gradient(120deg, var(--plum), var(--brand)); color: #fff; margin-bottom: 18px; }
.push-card .push-ico { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.15); display: grid; place-items: center; flex-shrink: 0; }
.push-card strong { display: block; }
.push-card span { font-size: .86rem; opacity: .85; }
.push-card .icon-btn { color: #fff; }
.push-card .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Arquivo enviado */
.file-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.file-chip .thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--sand) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.file-chip .name { font-weight: 700; font-size: .88rem; word-break: break-all; }
