/* ==========================================================
   Catálogo Digital - Painel
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
    --pri-rgb: 225, 29, 46;
    --pri: #e11d2e;
    --pri-2: #a8101d;
    --pri-h: #c01624;
    --pri-l: #f08a93;
    --pri-soft: rgba(var(--pri-rgb), .09);
    --pri-ring: rgba(var(--pri-rgb), .22);
    --grad: linear-gradient(135deg, var(--pri) 0%, var(--pri-2) 100%);

    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #f8f9fc;
    --surface-3: #f1f3f8;
    --border: #e7e9f0;
    --border-2: #d9dce6;
    --txt: #0f172a;
    --txt-2: #334155;
    --mut: #64748b;
    --mut-2: #94a3b8;

    --ok: #10b981;   --ok-bg: #ecfdf5;   --ok-tx: #047857;
    --warn: #f59e0b; --warn-bg: #fffbeb; --warn-tx: #b45309;
    --dan: #ef4444;  --dan-bg: #fef2f2;  --dan-tx: #b91c1c;
    --info: #3b82f6; --info-bg: #eff6ff; --info-tx: #1d4ed8;
    --vio-bg: #f5f3ff; --vio-tx: #6d28d9;

    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --sh-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --sh-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --sh: 0 4px 14px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
    --sh-lg: 0 20px 40px -12px rgba(16, 24, 40, .18);
    --sb-w: 264px;
    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}
[data-theme="dark"] {
    --pri-soft: rgba(var(--pri-rgb), .16);
    --pri-ring: rgba(var(--pri-rgb), .34);
    --bg: #0b0b0d;
    --surface: #141417;
    --surface-2: #18181c;
    --surface-3: #202025;
    --border: #27272d;
    --border-2: #34343b;
    --txt: #ececef;
    --txt-2: #c9c9cf;
    --mut: #94949e;
    --mut-2: #6b6b75;
    --ok-bg: rgba(16, 185, 129, .12);  --ok-tx: #34d399;
    --warn-bg: rgba(245, 158, 11, .12); --warn-tx: #fbbf24;
    --dan-bg: rgba(239, 68, 68, .12);  --dan-tx: #f87171;
    --info-bg: rgba(59, 130, 246, .12); --info-tx: #60a5fa;
    --vio-bg: rgba(139, 92, 246, .14);  --vio-tx: #a78bfa;
    --sh-xs: none;
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --sh: 0 8px 24px -6px rgba(0, 0, 0, .45);
    --sh-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font: 14.5px/1.55 var(--font);
    background: var(--bg);
    color: var(--txt);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--pri); text-decoration: none; }
a:hover { color: var(--pri-h); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.015em; color: var(--txt); }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: .78rem; font-weight: 700; margin: 1.4em 0 .8em; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
code { background: var(--surface-3); color: var(--txt-2); padding: 3px 7px; border-radius: 6px; font-size: .88em; word-break: break-all; }
small { font-size: .85em; }
.icon { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--mut); }
.small { font-size: .85em; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; overflow: hidden; }
.pad { padding: 16px 20px; margin: 0; }
::selection { background: var(--pri-ring); }
[hidden] { display: none !important; }

[data-theme="dark"] .only-light, :root:not([data-theme="dark"]) .only-dark { display: none; }
.only-light, .only-dark { display: inline-flex; }

/* ---------- Layout ---------- */
body.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
    width: var(--sb-w);
    flex-shrink: 0;
    position: sticky; top: 0;
    height: 100vh; height: 100dvh;
    display: flex; flex-direction: column;
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 40;
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: var(--txt); }
.sb-brand:hover { color: var(--txt); }
.sb-logo {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; overflow: hidden;
    background: var(--grad); color: #fff;
    box-shadow: 0 6px 16px -4px rgba(var(--pri-rgb), .55);
}
.sb-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.sb-logo.light { background: rgba(255, 255, 255, .18); box-shadow: none; border: 1px solid rgba(255, 255, 255, .25); }
.sb-brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-brand-txt strong { font-weight: 800; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-brand-txt small { color: var(--mut); font-size: .78rem; }

.sb-nav { flex: 1 0 auto; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-group { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut-2); padding: 16px 12px 6px; }
.sb-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 10px;
    color: var(--txt-2); font-weight: 500;
    transition: background .15s, color .15s;
}
.sb-link .icon { color: var(--mut); transition: color .15s; }
.sb-link:hover { background: var(--surface-3); color: var(--txt); }
.sb-link:hover .icon { color: var(--txt); }
.sb-link.active { background: var(--pri-soft); color: var(--pri); font-weight: 600; }
.sb-link.active .icon { color: var(--pri); }
.sb-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
[data-theme="dark"] .sb-link.active { color: var(--pri-l); }
[data-theme="dark"] .sb-link.active .icon { color: var(--pri-l); }
.sb-badge { margin-left: auto; background: var(--dan); color: #fff; border-radius: 20px; min-width: 20px; height: 20px; padding: 0 6px; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

.sb-plan { margin: 0 14px 12px; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.sb-plan-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: .85rem; }
.sb-plan-top span { display: flex; align-items: center; gap: 6px; }
.sb-plan-top .icon { color: var(--pri); }
.sb-plan-top small { color: var(--mut); font-weight: 500; }
.sb-plan .btn { margin: 12px 0 0; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.sb-plan.is-warn .progress span { background: var(--warn); }
.sb-plan.is-danger .progress span { background: var(--dan); }

.sb-user { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.sb-user-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sb-user-txt strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-txt small { color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .76rem; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--grad); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .02em;
}
.avatar.sm { width: 34px; height: 34px; }
.sb-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 32px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.tb-title { flex: 1; min-width: 0; }
.tb-title h1 { margin: 0; font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { display: flex; align-items: center; gap: 4px; font-size: .76rem; color: var(--mut); font-weight: 500; }
.tb-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: inline-grid; place-items: center;
    border: 1px solid var(--border); background: var(--surface); color: var(--txt-2);
    cursor: pointer; transition: all .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--txt); }
.menu-toggle { display: none; }
.content { padding: 28px 32px 48px; width: 100%; }

.banners { display: flex; flex-direction: column; gap: 10px; padding: 24px 32px 0; width: 100%; }
.banners + .content { padding-top: 20px; }
.banner {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px 11px 12px; border-radius: 12px;
    font-size: .88rem; border: 1px solid transparent;
    animation: drop .25s ease;
}
.banner-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.banner-txt { flex: 1; min-width: 0; line-height: 1.45; }
.banner-txt strong { font-weight: 700; }
.banner-info { background: var(--vio-bg); color: var(--vio-tx); border-color: color-mix(in srgb, var(--vio-tx) 20%, transparent); }
.banner-info .banner-ico { background: color-mix(in srgb, var(--vio-tx) 15%, transparent); }
.banner-warning { background: var(--warn-bg); color: var(--warn-tx); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.banner-warning .banner-ico { background: var(--warn); color: #fff; }
.banner-danger { background: var(--dan-bg); color: var(--dan-tx); border-color: color-mix(in srgb, var(--dan) 30%, transparent); }
.banner-danger .banner-ico { background: var(--dan); color: #fff; }
.banner-btn { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: .84rem; color: #fff !important; text-decoration: none; white-space: nowrap; transition: transform .15s, filter .15s; }
.banner-danger .banner-btn { background: var(--dan); box-shadow: 0 6px 14px -6px var(--dan); }
.banner-warning .banner-btn { background: var(--warn); box-shadow: 0 6px 14px -6px var(--warn); }
.banner-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.banner-link {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
    padding: 6px 11px; border-radius: 8px; font-weight: 700; font-size: .8rem; white-space: nowrap;
    color: inherit; background: color-mix(in srgb, currentColor 10%, transparent);
}
.banner-link:hover { color: inherit; background: color-mix(in srgb, currentColor 18%, transparent); }

/* ---------- Cards & grids ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--sh-xs);
}
.card > h2:first-child { margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head.pad { margin: 0; border-bottom: 1px solid var(--border); }
.card.narrow { max-width: 480px; }
.card.p-0 > .table-wrap:first-child table thead th:first-child { border-top-left-radius: var(--r-lg); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2.wide-left { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.danger-zone { border-color: color-mix(in srgb, var(--dan) 30%, var(--border)); }
.danger-zone h2 { color: var(--dan-tx); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 18px 20px; box-shadow: var(--sh-xs);
    display: flex; flex-direction: column; gap: 2px;
}
.stat-ico {
    width: 40px; height: 40px; border-radius: 11px; margin-bottom: 12px;
    display: grid; place-items: center;
    background: var(--pri-soft); color: var(--pri);
}
.stat.ok .stat-ico { background: var(--ok-bg); color: var(--ok-tx); }
.stat.danger .stat-ico { background: var(--dan-bg); color: var(--dan-tx); }
.stat.warn .stat-ico { background: var(--warn-bg); color: var(--warn-tx); }
.stat.info .stat-ico { background: var(--info-bg); color: var(--info-tx); }
.stat > span:not(.stat-ico) { color: var(--mut); font-size: .82rem; font-weight: 500; }
.stat strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat strong.sm { font-size: 1.15rem; }
.stat small { color: var(--mut); font-size: .8rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input-group { flex: 1; max-width: 640px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border: 0; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }
.list .li-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list .li-txt a { font-weight: 600; color: var(--txt); }
.list .li-txt a:hover { color: var(--pri); }
.list .muted { font-size: .82em; }
.list-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--mut); flex-shrink: 0; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--mut); }
.empty-state .empty-ico { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--mut); }
.empty-state strong { display: block; color: var(--txt); font-size: 1rem; margin-bottom: 4px; }
.empty-state .btn { margin-top: 14px; }

/* ---------- Formulários ---------- */
label { display: block; margin-bottom: 16px; font-weight: 600; font-size: .85rem; color: var(--txt-2); }
label small { font-weight: 400; display: block; margin-top: 4px; color: var(--mut); }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; font-size: .85rem; color: var(--txt-2); margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    padding: 10px 13px;
    margin-top: 6px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    font: inherit; font-weight: 400; font-size: .92rem;
    background: var(--surface); color: var(--txt);
    transition: border-color .15s, box-shadow .15s;
    box-shadow: var(--sh-xs);
}
.field input, .field select, .field textarea { margin-top: 0; }
input::placeholder, textarea::placeholder { color: var(--mut-2); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--pri) 35%, var(--border-2)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 4px var(--pri-ring); }
textarea { resize: vertical; min-height: 44px; }
select {
    appearance: none; -webkit-appearance: none;
    padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; margin: 0; padding: 0; flex-shrink: 0;
    border: 1.5px solid var(--border-2); border-radius: 5px; cursor: pointer;
    display: inline-grid; place-items: center; background: var(--surface);
}
input[type=checkbox]:checked { background: var(--pri); border-color: var(--pri); }
input[type=checkbox]:checked::after {
    content: ""; width: 10px; height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
input[type=color] { height: 46px; padding: 4px; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 7px; }
input[type=date], input[type=time] { min-height: 42px; }
input[type=file] {
    padding: 14px; cursor: pointer;
    background: var(--surface-2); border: 1.5px dashed var(--border-2);
    color: var(--mut); font-size: .85rem; box-shadow: none;
}
input[type=file]:hover { border-color: var(--pri); background: var(--pri-soft); }
input[type=file]::file-selector-button {
    margin-right: 12px; padding: 7px 14px; border-radius: 8px; border: 0;
    background: var(--surface); color: var(--txt); font: inherit; font-weight: 600; font-size: .82rem;
    box-shadow: var(--sh-sm); cursor: pointer;
}
label.check {
    display: flex; align-items: center; gap: 10px;
    font-weight: 500; color: var(--txt-2); cursor: pointer; margin-bottom: 12px;
}
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group input, .input-group select { margin: 0; }
.input-group > input { flex: 1; min-width: 0; }
.input-group select { width: auto; }
.input-prefix { display: flex; margin-top: 6px; }
.input-prefix span {
    background: var(--surface-3); border: 1px solid var(--border-2); border-right: 0;
    border-radius: 10px 0 0 10px; padding: 10px 12px; color: var(--mut); font-weight: 500; font-size: .88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; flex-shrink: 0;
}
.input-prefix input { border-radius: 0 10px 10px 0; margin: 0; }
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--mut-2); pointer-events: none; }
.input-icon input { padding-left: 42px; }
.input-icon:focus-within > .icon { color: var(--pri); }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-input > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mut-2); pointer-events: none; }
.search-input input { padding-left: 38px; margin: 0; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--mut); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; }
.pass-toggle:hover { color: var(--txt); background: var(--surface-3); }
.pass-toggle .hide { display: none; }
.pass-toggle.on .hide { display: grid; }
.pass-toggle.on .show { display: none; }
.pass-toggle span { display: grid; }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; min-height: 40px;
    border-radius: 10px; border: 1px solid var(--border-2);
    background: var(--surface); color: var(--txt);
    font: inherit; font-weight: 600; font-size: .88rem; line-height: 1.2;
    cursor: pointer; white-space: nowrap; text-decoration: none !important;
    box-shadow: var(--sh-xs);
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s;
}
.btn:hover { background: var(--surface-3); color: var(--txt); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--pri-ring); }
.btn-primary {
    background: var(--grad); border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px -6px rgba(var(--pri-rgb), .65), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-primary:hover { color: #fff; filter: brightness(1.06); background: var(--grad); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-soft { background: var(--pri-soft); border-color: transparent; color: var(--pri); box-shadow: none; }
.btn-soft:hover { background: var(--pri-soft); color: var(--pri-h); filter: brightness(.97); }
[data-theme="dark"] .btn-soft { color: var(--pri-l); }
.btn-danger { background: var(--dan); border-color: var(--dan); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-danger-outline { color: var(--dan-tx); border-color: color-mix(in srgb, var(--dan) 30%, var(--border-2)); }
.btn-danger-outline:hover { background: var(--dan-bg); color: var(--dan-tx); }
.btn-whats { background: #25d366; border-color: #25d366; color: #fff; }
.btn-whats:hover { background: #1ebe5b; color: #fff; }
.btn-link { border-color: transparent; background: none; color: var(--mut); box-shadow: none; }
.btn-link:hover { background: none; color: var(--txt); }
.btn-sm { padding: 6px 11px; min-height: 32px; font-size: .8rem; border-radius: 8px; gap: 6px; }
.btn-lg { padding: 12px 20px; min-height: 48px; font-size: .95rem; border-radius: 12px; }
.btn-block { width: 100%; margin-bottom: 10px; }
.btn-icon { width: 32px; padding: 0; }
.btn.disabled, .btn:disabled { opacity: .5; pointer-events: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Alertas & tags ---------- */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: var(--r); margin-bottom: 18px;
    border: 1px solid transparent; font-size: .9rem; font-weight: 500;
    animation: drop .25s ease;
}
.alert .icon { margin-top: 2px; }
.alert span { flex: 1; }
.alert-success { background: var(--ok-bg); color: var(--ok-tx); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-danger { background: var(--dan-bg); color: var(--dan-tx); border-color: color-mix(in srgb, var(--dan) 25%, transparent); }
.alert-warning { background: var(--warn-bg); color: var(--warn-tx); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert a { color: inherit; text-decoration: underline; font-weight: 700; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

.tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 20px;
    font-size: .76rem; font-weight: 600; white-space: nowrap;
    background: var(--surface-3); color: var(--txt-2);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag-ok, .st-concluido { background: var(--ok-bg); color: var(--ok-tx); }
.tag-danger, .st-cancelado { background: var(--dan-bg); color: var(--dan-tx); }
.tag-warning, .st-novo { background: var(--warn-bg); color: var(--warn-tx); }
.st-confirmado, .st-preparando { background: var(--info-bg); color: var(--info-tx); }
.st-enviado { background: var(--vio-bg); color: var(--vio-tx); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th {
    background: var(--surface-2);
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut);
    white-space: nowrap;
}
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td strong { font-weight: 600; }
td a strong { color: var(--txt); }
td a:hover strong { color: var(--pri); }
tr.disabled td { opacity: .55; }
tr.clickable { cursor: pointer; }
tfoot td { border: 0; padding: 6px 18px; color: var(--mut); }
tfoot tr.total td { font-weight: 800; font-size: 1.1rem; color: var(--txt); border-top: 1px solid var(--border); padding-top: 14px; }
.thumb-cell { width: 72px; }
.thumb-cell img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--border); }
.noimg { width: 48px; height: 48px; display: grid; place-items: center; background: var(--surface-3); border-radius: 10px; color: var(--mut-2); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions form { display: inline; margin: 0; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.pagination a { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--txt-2); font-weight: 600; }
.pagination a:hover { border-color: var(--pri); color: var(--pri); }
.pagination a.active { background: var(--grad); color: #fff; border-color: transparent; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.dl dt { color: var(--mut); font-size: .85rem; }
.dl dd { margin: 0; font-weight: 500; }

/* ---------- Switch ---------- */
.switch {
    width: 40px; height: 22px; border-radius: 20px; border: 0; padding: 0;
    background: var(--border-2); position: relative; cursor: pointer;
    transition: background .2s;
}
.switch::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(18px); }
.switch:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--pri-ring); }

/* ---------- Produtos ---------- */
.var-row { display: grid; grid-template-columns: 1fr 1fr 120px auto; gap: 8px; margin-bottom: 8px; animation: drop .2s ease; }
.var-row input { margin: 0; }
.var-row .btn { min-height: 42px; width: 42px; padding: 0; }
.img-preview {
    aspect-ratio: 1; border-radius: var(--r); overflow: hidden; margin-bottom: 12px;
    display: grid; place-items: center; text-align: center;
    background: var(--surface-2); border: 1.5px dashed var(--border-2); color: var(--mut);
    font-size: .85rem;
}
.img-preview span { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview:has(img) { border-style: solid; border-color: var(--border); }
.img-preview.logo { width: 150px; border-radius: 50%; }
.img-preview.banner { aspect-ratio: 3 / 1; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.thumb { margin: 0; font-weight: 500; font-size: .78rem; color: var(--mut); }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--border); transition: opacity .15s; }
.thumb span { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.thumb:has(input:checked) img { opacity: .35; outline: 2px solid var(--dan); outline-offset: -2px; }
.sticky-actions { position: sticky; top: 90px; }

/* ---------- Categorias ---------- */
.sortable-list { list-style: none; margin: 0; padding: 0; }
.sortable-list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface); transition: background .15s; }
.sortable-list li:hover { background: var(--surface-2); }
.sortable-list li.dragging { opacity: .5; background: var(--pri-soft); }
.sortable-list .handle { cursor: grab; color: var(--mut-2); display: grid; padding: 4px; border-radius: 6px; }
.sortable-list .handle:hover { background: var(--surface-3); color: var(--txt); }
.inline-form { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; margin: 0; }
.inline-form input[name=nome] { flex: 1; min-width: 160px; margin: 0; }
.inline-form label.check { margin: 0; }
.count-pill { font-size: .76rem; color: var(--mut); background: var(--surface-3); padding: 3px 10px; border-radius: 20px; white-space: nowrap; font-weight: 600; }

/* ---------- Horários ---------- */
.horarios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.horario-row { display: grid; grid-template-columns: 130px 1fr auto 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.horario-row label { margin: 0; font-weight: 600; }
.horario-row input[type=time] { margin: 0; min-height: 38px; padding: 6px 10px; }
.horario-row span { color: var(--mut); font-size: .85rem; }
.horario-row:has(input[type=checkbox]:not(:checked)) input[type=time] { opacity: .45; }

/* ---------- Aparência ---------- */
.temas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tema { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-2); cursor: pointer; transition: transform .15s; }
.tema:hover { transform: scale(1.08); }
.preview-loja { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin: 6px 0 18px; box-shadow: var(--sh); background: #fff; color: #111; }
.pl-top { background: var(--c2); color: #fff; padding: 22px 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.pl-top::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.pl-body { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pl-card { display: flex; gap: 12px; align-items: center; font-size: .9rem; }
.pl-card b { color: var(--c1); }
.pl-img { width: 52px; height: 52px; background: #eef0f4; border-radius: 10px; }
.pl-btn { background: var(--c1); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: .82rem; font-weight: 700; }

/* ---------- Dashboard ---------- */
.hero-card {
    position: relative; overflow: hidden;
    background: var(--grad); color: #fff; border: 0;
    display: flex; justify-content: space-between; align-items: center; gap: 12px 18px; flex-wrap: wrap;
    padding: 14px 18px 14px 22px;
    box-shadow: 0 12px 28px -16px rgba(var(--pri-rgb), .7);
}
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.hero-card::before { width: 180px; height: 180px; right: -40px; top: -110px; }
.hero-card::after { width: 110px; height: 110px; right: 200px; bottom: -80px; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h2 { color: #fff; font-size: 1.02rem; margin: 0; display: inline; }
.hero-card p { margin: 0; opacity: .85; font-size: .8rem; }
.hero-card .hero-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-card > div:first-child { min-width: 0; flex: 1 1 260px; }
.hero-card .big-link { color: #fff; font-weight: 600; font-size: .86rem; display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; margin-top: 2px; }
.hero-card .big-link .icon { margin: -2px 4px 0 0; }
.hero-card .big-link:hover { color: #fff; text-decoration: underline; }
.hero-card .btn { min-height: 36px; padding: 7px 13px; font-size: .84rem; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); color: #fff; box-shadow: none; backdrop-filter: blur(6px); }
.hero-card .btn:hover { background: rgba(255, 255, 255, .26); }
.hero-card .btn-white { background: #fff; color: var(--pri-h); border-color: #fff; }
.hero-card .btn-white:hover { background: #fff; color: var(--pri-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.steps li a {
    display: flex; align-items: center; gap: 12px; height: 100%;
    padding: 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2);
    color: var(--txt); font-weight: 600; font-size: .88rem; transition: border-color .15s, transform .15s;
}
.steps li a:hover { border-color: var(--pri); transform: translateY(-1px); }
.step-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); flex-shrink: 0; }
.steps li.done a { color: var(--mut); text-decoration: line-through; }
.steps li.done .step-ico { background: var(--ok-bg); color: var(--ok-tx); }

/* ---------- Telas de autenticação ---------- */
body.auth { min-height: 100vh; background: var(--surface); }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(120% 120% at 0% 0%, rgba(var(--pri-rgb), .42) 0%, rgba(var(--pri-rgb), .1) 50%, transparent 80%), #0b0b0d;
    padding: 44px;
}
.auth-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.auth-glow.g1 { width: 420px; height: 420px; background: var(--pri); right: -140px; top: -120px; }
.auth-glow.g2 { width: 380px; height: 380px; background: var(--pri-2); left: -120px; bottom: -140px; opacity: .4; }
.auth-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
}
.auth-side-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; max-width: 520px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.1rem; }
.auth-copy h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; line-height: 1.12; letter-spacing: -.03em; margin-bottom: 16px; }
.auth-copy > p { font-size: 1.05rem; opacity: .82; margin: 0 0 32px; max-width: 440px; }
.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-features li {
    display: flex; gap: 14px; align-items: center;
    padding: 14px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.auth-features li > span { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); flex-shrink: 0; }
.auth-features strong { display: block; font-size: .95rem; }
.auth-features small { opacity: .75; font-size: .84rem; }
.auth-foot { opacity: .6; }

.auth-main { position: relative; display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.9rem; margin: 14px 0 6px; letter-spacing: -.03em; }
.auth-card > p.muted { margin: 0 0 26px; }
.auth-form { margin-top: 26px; }
.auth-form .btn { margin-top: 8px; }
.auth-help { text-align: center; margin-top: 18px; }
.auth-theme { position: absolute; top: 20px; right: 20px; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 26px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 20px;
    background: var(--pri-soft); color: var(--pri);
    font-size: .76rem; font-weight: 700; letter-spacing: .02em;
}
[data-theme="dark"] .eyebrow { color: var(--pri-l); }

/* Páginas simples (erro, início, instalador) */
body.simple {
    min-height: 100vh; display: grid; place-items: center; padding: 32px 18px;
    position: relative; overflow-x: hidden;
    background: radial-gradient(80% 60% at 50% 0%, var(--pri-soft), transparent), var(--bg);
}
body.simple .auth-glow { opacity: .18; position: fixed; }
.simple-box {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
    padding: 40px 34px; box-shadow: var(--sh-lg);
}
body.install .simple-box { max-width: 620px; text-align: left; }
body.install .simple-box > h1, body.install .simple-box > p, body.install .simple-icon { text-align: center; }
.simple-box h1 { font-size: 1.6rem; margin: 14px 0 8px; }
.simple-box > p { margin: 0 0 24px; }
.simple-icon {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto;
    display: grid; place-items: center; background: var(--grad); color: #fff;
    box-shadow: 0 12px 28px -10px rgba(var(--pri-rgb), .7);
}
.center-e { margin-top: 18px; }
.step { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.step:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.step strong { display: block; }
.step small { color: var(--mut); }
.install-form .btn { margin-top: 12px; }
.link-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 22px; text-align: left; }
.link-list div { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.link-list small { display: block; color: var(--mut); margin-bottom: 4px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 8px;
    background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 12px;
    z-index: 100; font-size: .88rem; font-weight: 500;
    box-shadow: var(--sh-lg); animation: toast .25s ease;
}
[data-theme="dark"] .toast { background: #fff; color: #0f172a; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Janela de confirmação ---------- */
body.dlg-open { overflow: hidden; }
.dlg-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: grid; place-items: center; padding: 20px;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .18s ease;
}
.dlg-overlay.show { opacity: 1; }
.dlg {
    width: 100%; max-width: 420px; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 28px 26px 22px; box-shadow: var(--sh-lg);
    transform: translateY(12px) scale(.96); transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}
.dlg-overlay.show .dlg { transform: none; }
.dlg-ico {
    width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 16px;
    display: grid; place-items: center; background: var(--pri-soft); color: var(--pri);
}
.dlg-danger .dlg-ico { background: var(--dan-bg); color: var(--dan-tx); box-shadow: 0 0 0 8px color-mix(in srgb, var(--dan-bg) 50%, transparent); }
.dlg-warning .dlg-ico { background: var(--warn-bg); color: var(--warn-tx); }
.dlg h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; color: var(--txt); text-transform: none; letter-spacing: -.01em; }
.dlg p { margin: 0; color: var(--mut); font-size: .92rem; line-height: 1.55; }
.dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.dlg-btns .btn { min-height: 46px; border-radius: 12px; }
@media (max-width: 480px) {
    .dlg-overlay { place-items: end center; padding: 0; }
    .dlg { max-width: none; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateY(100%); }
    .dlg-btns { grid-template-columns: 1fr; }
    .dlg-btns .btn[data-r="1"] { order: -1; }
}

/* ---------- Vencimento do plano ---------- */
.plan-pill {
    position: relative;
    display: inline-flex; align-items: center; gap: 10px;
    height: 42px; padding: 0 12px 0 6px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--txt);
    font: inherit; text-align: left; transition: background .15s, border-color .15s;
}
.plan-pill:hover { background: var(--surface-3); }
.plan-pill-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); flex-shrink: 0; }
.plan-pill-txt { display: flex; flex-direction: column; line-height: 1.15; }
.plan-pill-txt small { font-size: .68rem; color: var(--mut); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.plan-pill-txt strong { font-size: .84rem; font-weight: 700; white-space: nowrap; }
.plan-pill-days { font-size: .74rem; font-weight: 800; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.plan-pill.is-ok .plan-pill-ico { background: var(--ok-bg); color: var(--ok-tx); }
.plan-pill.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: var(--warn-bg); }
.plan-pill.is-warn .plan-pill-ico { background: var(--warn); color: #fff; }
.plan-pill.is-warn .plan-pill-days { background: var(--warn); color: #fff; }
.plan-pill.is-danger { border-color: color-mix(in srgb, var(--dan) 55%, transparent); background: var(--dan-bg); }
.plan-pill.is-danger .plan-pill-ico { background: var(--dan); color: #fff; }
.plan-pill.is-danger .plan-pill-days { background: var(--dan); color: #fff; }

/* Pulsação (5 dias ou menos / vencido) */
@keyframes plan-ring-warn { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .55); } 70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
@keyframes plan-ring-danger { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); } 70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes plan-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
.plan-pill.is-warn, .sb-plan.is-warn, .plan-stat.is-warn { animation: plan-ring-warn 1.8s ease-out infinite; }
.plan-pill.is-danger, .sb-plan.is-danger, .plan-stat.is-danger { animation: plan-ring-danger 1.4s ease-out infinite; }
.plan-pill.is-warn .plan-pill-ico, .plan-pill.is-danger .plan-pill-ico,
.plan-stat.is-warn .stat-ico, .plan-stat.is-danger .stat-ico { animation: plan-beat 1.8s ease-in-out infinite; }

.sb-plan.is-warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: var(--warn-bg); }
.sb-plan.is-danger { border-color: color-mix(in srgb, var(--dan) 50%, transparent); background: var(--dan-bg); }
.sb-plan.is-warn .plan-chip { background: var(--warn); color: #fff; }
.sb-plan.is-danger .plan-chip { background: var(--dan); color: #fff; }
.plan-chip { padding: 2px 8px; border-radius: 7px; font-weight: 700 !important; }
.sb-plan.is-ok .plan-chip { background: var(--ok-bg); color: var(--ok-tx); }
.sb-plan-date {
    display: flex; align-items: center; gap: 6px; width: 100%;
    margin-top: 10px; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: .78rem; font-weight: 600; color: var(--mut); text-align: left;
}
.sb-plan-date:hover { color: var(--txt); }
.sb-plan.is-warn .sb-plan-date { color: var(--warn-tx); }
.sb-plan.is-danger .sb-plan-date { color: var(--dan-tx); }

.plan-stat { cursor: pointer; transition: transform .15s; }
.plan-stat:hover { transform: translateY(-2px); }
.plan-stat.is-ok .stat-ico { background: var(--ok-bg); color: var(--ok-tx); }
.plan-stat.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.plan-stat.is-warn .stat-ico { background: var(--warn); color: #fff; }
.plan-stat.is-warn small { color: var(--warn-tx); font-weight: 700; }
.plan-stat.is-danger { border-color: color-mix(in srgb, var(--dan) 55%, transparent); }
.plan-stat.is-danger .stat-ico { background: var(--dan); color: #fff; }
.plan-stat.is-danger small { color: var(--dan-tx); font-weight: 700; }

/* Janela "Meu plano" */
.dlg-plan { position: relative; text-align: center; }
.dlg-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-3); color: var(--txt-2); cursor: pointer; display: grid; place-items: center; }
.dlg-plan.is-ok .dlg-ico { background: var(--ok-bg); color: var(--ok-tx); }
.dlg-plan.is-warn .dlg-ico { background: var(--warn-bg); color: var(--warn-tx); animation: plan-beat 1.8s ease-in-out infinite; }
.dlg-plan.is-danger .dlg-ico { background: var(--dan-bg); color: var(--dan-tx); animation: plan-beat 1.8s ease-in-out infinite; }
.plan-dl { margin: 18px 0 14px; padding: 4px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); text-align: left; }
.plan-dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.plan-dl div:last-child { border: 0; }
.plan-dl dt { color: var(--mut); font-size: .86rem; }
.plan-dl dd { margin: 0; font-weight: 700; font-size: .9rem; }
.dlg-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); margin-bottom: 6px; }
.dlg-plan.is-danger h3 { color: var(--dan-tx); }
.dlg-btns.one { grid-template-columns: 1fr; margin-top: 18px; }
.hide-md { }
@media (max-width: 1180px) { .hide-md { display: none !important; } }
@media (max-width: 600px) {
    .plan-pill { padding: 0 6px; gap: 6px; }
    .plan-pill-txt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .plan-pill, .sb-plan, .plan-stat, .plan-pill-ico, .stat-ico, .dlg-ico { animation: none !important; }
}

/* ---------- Avisos ---------- */
.grid-2.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.seg-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-choice label { margin: 0; cursor: pointer; }
.seg-choice input, .tipo-choice input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.seg-choice label, .tipo-choice label { position: relative; }
.seg-choice span {
    display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
    padding: 12px 14px; border: 1.5px solid var(--border-2); border-radius: 12px; transition: all .15s;
}
.seg-choice .icon { grid-row: span 2; color: var(--mut); }
.seg-choice b { font-size: .88rem; color: var(--txt); }
.seg-choice small { margin: 0; font-size: .76rem; }
.seg-choice input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.seg-choice input:checked + span .icon { color: var(--pri); }
.seg-choice input:focus-visible + span { box-shadow: 0 0 0 4px var(--pri-ring); }
.tipo-choice { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.tipo-choice label { margin: 0; cursor: pointer; }
.tipo-choice span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--border-2); font-size: .82rem; font-weight: 600; color: var(--txt-2); transition: all .15s; }
.tipo-choice input:checked + span { color: #fff; border-color: transparent; }
.tc-info input:checked + span { background: var(--pri); }
.tc-novidade input:checked + span { background: #8b5cf6; }
.tc-importante input:checked + span { background: var(--warn); }
.tc-urgente input:checked + span { background: var(--dan); }

.aviso-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.t-info { background: var(--info-bg); color: var(--info-tx); }
.t-novidade { background: var(--vio-bg); color: var(--vio-tx); }
.t-importante { background: var(--warn-bg); color: var(--warn-tx); }
.t-urgente { background: var(--dan-bg); color: var(--dan-tx); }
.aviso-list, .avisos-ul { list-style: none; margin: 0; padding: 0; }
.aviso-list li, .avisos-ul li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.aviso-list li:last-child, .avisos-ul li:last-child { border-bottom: 0; }
.aviso-body { flex: 1; min-width: 0; }
.aviso-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.aviso-top strong { font-size: .95rem; }
.aviso-body p { margin: 4px 0 8px; color: var(--txt-2); font-size: .88rem; line-height: 1.55; word-wrap: break-word; }
.aviso-dest { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: var(--mut); background: var(--surface-3); padding: 3px 9px; border-radius: 8px; }
.aviso-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .76rem; color: var(--mut); }
.aviso-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.mini-progress { width: 70px; height: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.mini-progress span { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.tipo-pill { padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.new-pill { font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--pri); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.avisos-ul li.unread { background: color-mix(in srgb, var(--pri-soft) 60%, transparent); }
.avisos-ul li.unread .aviso-top strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pri); margin-right: 8px; vertical-align: middle; }

/* Sino */
.bell { position: relative; }
.bell-badge {
    position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 10px; background: var(--dan); color: #fff; font-size: .68rem; font-weight: 800;
    display: grid; place-items: center; border: 2px solid var(--bg);
}
@keyframes bell-ring { 0%, 50%, 100% { transform: rotate(0); } 5%, 15%, 25% { transform: rotate(14deg); } 10%, 20% { transform: rotate(-14deg); } }
.bell.has-new .icon { transform-origin: 50% 4px; animation: bell-ring 2.6s ease-in-out infinite; }
.sb-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; }
.sb-dot.warn { background: var(--warn); animation: plan-ring-warn 1.8s ease-out infinite; }
.sb-dot.danger { background: var(--dan); animation: plan-ring-danger 1.4s ease-out infinite; }

/* Janela de avisos */
.dlg.dlg-avisos { max-width: 560px; padding: 0; text-align: left; display: flex; flex-direction: column; max-height: min(680px, 88vh); overflow: hidden; }
.avisos-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.avisos-head > div { flex: 1; }
.avisos-head h3 { margin: 0; font-size: 1.1rem; }
.avisos-head small { color: var(--mut); }
.avisos-head-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.dlg-x.static { position: static; }
.avisos-body { overflow-y: auto; flex: 1; }
.avisos-foot { padding: 8px 12px; border-top: 1px solid var(--border); text-align: center; }

/* ---------- Meu plano ---------- */
.plan-hero {
    position: relative; overflow: hidden;
    display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap;
    padding: 16px 18px 16px 24px; margin-bottom: 20px; border-radius: var(--r-lg); color: #fff;
    background: var(--grad); box-shadow: 0 18px 40px -18px rgba(var(--pri-rgb), .7);
}
.plan-hero::before { content: ""; position: absolute; width: 200px; height: 200px; right: -50px; top: -110px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.plan-hero-main { flex: 1 1 320px; min-width: 0; }
.plan-hero-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-hero.is-ok, .plan-hero.is-none { background: linear-gradient(135deg, #10b981, #0d9488); box-shadow: 0 18px 40px -18px rgba(16, 185, 129, .7); }
.plan-hero.is-warn { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 18px 40px -18px rgba(245, 158, 11, .7); }
.plan-hero.is-danger { background: linear-gradient(135deg, #ef4444, #be123c); box-shadow: 0 18px 40px -18px rgba(239, 68, 68, .7); }
.plan-hero > * { position: relative; }
.plan-hero h2 { color: #fff; font-size: 1.12rem; margin: 0; }
.plan-hero p { margin: 2px 0 0; opacity: .9; font-size: .84rem; }
.plan-hero-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; background: rgba(255, 255, 255, .2); font-size: .72rem; font-weight: 700; }
.plan-hero-dates { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.plan-hero-dates div { display: flex; align-items: baseline; gap: 6px; }
.plan-hero-dates small { font-size: .66rem; opacity: .8; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.plan-hero-dates strong { font-size: .9rem; }
.plan-countdown {
    width: 86px; height: 86px; border-radius: 50%; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
}
.plan-countdown strong { font-size: 1.8rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.plan-countdown strong .icon { width: 26px; height: 26px; }
.plan-countdown span { font-size: .64rem; opacity: .9; margin-top: 3px; font-weight: 600; line-height: 1.15; padding: 0 6px; }
.plan-hero.is-warn .plan-countdown { animation: plan-ring-light 1.8s ease-out infinite; }
.plan-hero.is-danger .plan-countdown { animation: plan-ring-light 1.4s ease-out infinite; }
@keyframes plan-ring-light { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.progress.lg { height: 12px; border-radius: 8px; }
.progress.lg span { border-radius: 8px; }
.progress.is-ok span, .progress.is-none span { background: linear-gradient(90deg, #10b981, #0d9488); }
.progress.is-warn span { background: linear-gradient(90deg, #f59e0b, #ea580c); }
.progress.is-danger span { background: var(--dan); }
.progress-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: .78rem; color: var(--mut); font-weight: 600; }
.usage-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: .9rem; }
.usage-top span { display: flex; align-items: center; gap: 8px; color: var(--txt-2); }
.usage .progress { margin-bottom: 8px; height: 10px; }
.plan-dl.flat { margin: 0; padding: 0; background: none; border: 0; }
@media (max-width: 960px) { .grid-2.wide-right { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .plan-hero { padding: 14px 14px 14px 18px; flex-wrap: nowrap; gap: 12px; }
    .plan-hero-main { flex: 1 1 auto; }
    .plan-hero-dates { gap: 4px 14px; margin-top: 8px; }
    .plan-hero p { font-size: .8rem; }
    .plan-countdown { width: 72px; height: 72px; }
    .plan-countdown strong { font-size: 1.5rem; }
    .seg-choice { grid-template-columns: 1fr; }
    .dlg.dlg-avisos { max-height: 90vh; }
}
@media (prefers-reduced-motion: reduce) { .bell .icon, .sb-dot, .plan-countdown { animation: none !important; } }

/* ---------- Grupos de opções (produto) ---------- */
.grupos { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.grupo { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.grupo-head { display: flex; gap: 8px; align-items: center; }
.grupo-head .g-nome { margin: 0; font-weight: 700; }
.grupo-tools { display: flex; gap: 4px; }
.grupo-tools .btn { width: 34px; min-height: 38px; }
.grupo-regras { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.presets { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.presets button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; font: inherit; font-size: .78rem; font-weight: 600; color: var(--mut); cursor: pointer; }
.presets button.on { background: var(--surface); color: var(--pri); box-shadow: var(--sh-sm); }
label.mini { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; }
label.mini input { width: 64px; margin: 0; padding: 6px 8px; }
.grupo-dica { margin: 8px 0 10px; font-size: .78rem; color: var(--pri); font-weight: 600; }
[data-theme="dark"] .grupo-dica { color: var(--pri-l); }
.opcoes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.opcao { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.opcao input { margin: 0; }
.opcao .btn { width: 34px; min-height: 40px; }
.preco-wrap { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); padding-left: 10px; }
.preco-wrap span { font-size: .8rem; color: var(--mut); white-space: nowrap; }
.preco-wrap input { border: 0; box-shadow: none; padding-left: 6px; }
.preco-wrap:focus-within { border-color: var(--pri); box-shadow: 0 0 0 4px var(--pri-ring); }
.preco-wrap input:focus { box-shadow: none; }
.grupos-vazio { padding: 14px; text-align: center; border: 1.5px dashed var(--border-2); border-radius: 12px; }
.estoque-box { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 600px) { .opcao { grid-template-columns: 1fr 110px auto; } .grupo-head { flex-wrap: wrap; } }

/* ---------- Bairros, cupons, bloqueio ---------- */
.bairros-head, .bairro-row { display: grid; grid-template-columns: 1fr 96px 96px 48px 36px; gap: 8px; align-items: center; }
.bairros-head { font-size: .72rem; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 6px; }
.bairro-row { margin-bottom: 8px; }
.bairro-row input { margin: 0; }
.bairro-row label.check { margin: 0; justify-content: center; }
.bairro-row .btn { width: 34px; min-height: 40px; }
.cupom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 16px 20px 20px; }
.cupom {
    position: relative; display: flex; justify-content: space-between; gap: 12px;
    border: 1.5px dashed color-mix(in srgb, var(--pri) 45%, var(--border)); border-radius: 14px; padding: 14px 16px;
    background: linear-gradient(135deg, var(--pri-soft), transparent 70%);
}
.cupom::before, .cupom::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transform: translateY(-50%); }
.cupom::before { left: -9px; border-right: 1.5px dashed color-mix(in srgb, var(--pri) 45%, var(--border)); }
.cupom::after { right: -9px; border-left: 1.5px dashed color-mix(in srgb, var(--pri) 45%, var(--border)); }
.cupom.off { opacity: .55; filter: grayscale(.6); }
.cupom-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cupom-code { align-self: flex-start; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .06em; background: var(--grad); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: .86rem; cursor: pointer; margin-bottom: 6px; }
.cupom-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }
.upsell { text-align: center; max-width: 560px; margin: 20px auto; padding: 36px 28px; }
.upsell-ico { position: relative; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--pri-soft); color: var(--pri); }
.upsell-ico .lock { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--warn); color: #fff; border: 3px solid var(--surface); }
.upsell-planos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 22px; }
.upsell-planos div { display: flex; flex-direction: column; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.upsell-planos span { font-size: .82rem; color: var(--mut); }
.sb-lock { margin-left: auto; color: var(--mut-2); display: grid; }
@media (max-width: 600px) { .bairros-head, .bairro-row { grid-template-columns: 1fr 78px 70px 36px 34px; } }

/* ---------- Relatórios ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.periodo { align-items: center; }
.seg-tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg-tabs a { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: .84rem; color: var(--mut); }
.seg-tabs a:hover { color: var(--txt); background: var(--surface-3); }
.seg-tabs a.on { background: var(--grad); color: #fff; }
.periodo .input-group { max-width: 420px; }
.periodo input[type=date] { min-height: 40px; }
.var { font-size: .7rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.var.up { background: var(--ok-bg); color: var(--ok-tx); }
.var.down { background: var(--dan-bg); color: var(--dan-tx); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--mut); font-size: 11px; font-family: var(--font); }
.chart .pt { fill: var(--surface); stroke: var(--pri); stroke-width: 2; }
.vbars { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 6px; }
.vb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.vb i { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--pri) 35%, transparent); transition: background .2s; }
.vb i.top { background: var(--grad); }
.vb:hover i { background: var(--pri); }
.vb span { font-size: .62rem; color: var(--mut); white-space: nowrap; }
.vbars:has(.vb:nth-child(20)) .vb:nth-child(even) span { visibility: hidden; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; overflow: hidden; font-size: .86rem; }
.rank li span { position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank li b { position: relative; z-index: 1; white-space: nowrap; font-weight: 700; color: var(--txt-2); font-size: .8rem; }
.rank li i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pri-soft); border-radius: 10px; }

/* ---------- Clientes ---------- */
.cli-cell { display: flex; align-items: center; gap: 10px; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.cliente-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ch-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.ch-txt h2 { margin: 0 0 2px; font-size: 1.3rem; }

/* ---------- Importar ---------- */
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    padding: 34px 20px; margin-bottom: 16px; border: 2px dashed var(--border-2); border-radius: 16px; cursor: pointer;
    background: var(--surface-2); color: var(--mut); transition: all .2s;
}
.dropzone strong { color: var(--txt); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--pri); background: var(--pri-soft); color: var(--pri); }
.dropzone.has { border-style: solid; border-color: var(--ok); background: var(--ok-bg); color: var(--ok-tx); }
.cols-table { width: 100%; margin: 14px 0; }
.cols-table td { padding: 8px 4px; font-size: .84rem; border-bottom: 1px solid var(--border); }
.cols-table tr:hover td { background: none; }
.import-res { display: flex; gap: 18px; align-items: flex-start; border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.ir-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-tx); flex-shrink: 0; }
.import-res .btn { margin-right: 6px; }

/* ---------- QR Code ---------- */
.qr-preview-card { display: grid; place-items: center; background: var(--surface-2); }
.qr-preview-card canvas { width: 100%; max-width: 420px; height: auto; border-radius: 14px; box-shadow: var(--sh-lg); background: #fff; }

/* ---------- Alerta de pedido novo ---------- */
.som-btn .som-off { display: none; }
.som-btn.off .som-on { display: none; }
.som-btn.off .som-off { display: grid; color: var(--mut-2); }
.som-btn span { display: grid; }
.pedido-alertas { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100% - 40px)); }
.pedido-alerta {
    display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-lg); color: var(--txt);
    animation: alertaIn .45s cubic-bezier(.22, 1, .36, 1); border-left: 4px solid var(--ok);
}
.pedido-alerta:hover { color: var(--txt); border-color: var(--ok); }
@keyframes alertaIn { from { transform: translateX(120%); opacity: 0; } }
.pa-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-bg); font-size: 1.3rem; animation: plan-beat 1.4s ease-in-out 3; }
.pa-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pa-txt small { color: var(--mut); }
.pa-x { color: var(--mut); padding: 4px 6px; border-radius: 6px; }
.pa-x:hover { background: var(--surface-3); }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } .vbars { height: 130px; } }

/* ---------- Renovação / Pix ---------- */
.renova-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.planos-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-content: start; }
.plano-opt { margin: 0; cursor: pointer; display: block; }
.plano-opt input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.po-card { position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 18px; border: 1.5px solid var(--border-2); border-radius: 16px; background: var(--surface-2); transition: border-color .15s, box-shadow .15s, background .15s, transform .15s; }
.plano-opt:hover .po-card { border-color: color-mix(in srgb, var(--pri) 45%, var(--border-2)); transform: translateY(-1px); }
.po-radio { position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-2); display: grid; place-items: center; color: transparent; transition: all .15s; }
.po-info { display: flex; flex-direction: column; gap: 3px; padding-right: 28px; }
.po-top { display: flex; align-items: center; gap: 8px; }
.po-top b { font-size: 1rem; color: var(--txt); }
.po-info small, .po-preco small { color: var(--mut); font-weight: 500; font-size: .8rem; }
.po-preco { display: flex; flex-direction: column; gap: 1px; margin-top: auto; }
.po-preco strong { font-size: 1.5rem; font-weight: 800; color: var(--txt); letter-spacing: -.02em; line-height: 1.1; }
.plano-opt .atual { font-style: normal; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; background: var(--pri-soft); color: var(--pri); }
.plano-opt input:checked + .po-card { border-color: var(--pri); background: var(--pri-soft); box-shadow: 0 0 0 3px var(--pri-ring); }
.plano-opt input:checked + .po-card .po-radio { background: var(--pri); border-color: var(--pri); color: #fff; }
.plano-opt input:focus-visible + .po-card { outline: 2px solid var(--pri); outline-offset: 2px; }
.renova-resumo { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); position: sticky; top: 20px; }
.rr-nota .icon { vertical-align: -2px; margin-right: 4px; }
.rr-linha { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--mut); }
.rr-linha b { color: var(--txt); font-weight: 600; text-align: right; }
.rr-destaque { color: var(--ok-tx) !important; }
.rr-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; margin-top: 2px; border-top: 1px dashed var(--border-2); font-weight: 600; }
.rr-total strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.renova-resumo .btn { margin: 0; }
.renova-resumo .btn-block { width: 100%; justify-content: center; }
.rr-nota { margin: 2px 0 0; font-size: .78rem; color: var(--mut); text-align: center; }
@media (max-width: 1100px) {
    .renova-wrap { grid-template-columns: 1fr; }
    .renova-resumo { position: static; }
}
@media (max-width: 640px) {
    .renovar .card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .planos-pick { grid-template-columns: 1fr; gap: 10px; }
    .po-card { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
    .po-radio { position: static; order: -1; flex-shrink: 0; }
    .po-info { flex: 1; min-width: 0; padding-right: 0; }
    .po-preco { margin: 0; text-align: right; align-items: flex-end; flex-shrink: 0; }
    .po-preco strong { font-size: 1.2rem; }
    .renova-resumo { padding: 16px; }
}
.dlg.dlg-pix { position: relative; max-width: 420px; }
.pix-qr { width: 220px; height: 220px; margin: 14px auto; border-radius: 16px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; overflow: hidden; }
.pix-qr img { width: 100%; height: 100%; object-fit: contain; }
.copy-line { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin: 10px 0; }
.copy-line code, .copy-line input { flex: 1; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; margin: 0; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pix-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--warn-tx); margin-top: 12px !important; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.ok-big { background: var(--ok-bg) !important; color: var(--ok-tx) !important; width: 72px; height: 72px; border-radius: 50%; }
.recursos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin: 8px 0 4px; }
.recursos-grid label.check { margin-bottom: 8px; font-size: .84rem; }
.recursos-grid .icon { color: var(--mut); }
.rec-icons { display: inline-flex; gap: 4px; }
.rec-icons span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--mut-2); background: var(--surface-3); opacity: .45; }
.rec-icons span.on { color: var(--pri); background: var(--pri-soft); opacity: 1; }
.passos { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; font-size: .86rem; }
.passos ol { padding-left: 18px; line-height: 1.7; }
@media (max-width: 600px) { .recursos-grid { grid-template-columns: 1fr; } }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
body.cadastro .simple-box { max-width: 560px; }

/* ---------- Login do lojista em vermelho (diferente do admin) ---------- */
body.auth-lojista .auth-side { background: radial-gradient(120% 120% at 0% 0%, var(--pri) 0%, var(--pri-2) 50%, #12060a 100%); }
body.auth-lojista .auth-glow.g1 { background: var(--pri-l); }
body.auth-lojista .auth-glow.g2 { background: var(--pri-l); }
body.auth-lojista .btn-primary { box-shadow: 0 6px 16px -6px rgba(var(--pri-rgb), .65), inset 0 1px 0 rgba(255, 255, 255, .15); }
body.auth-lojista .sb-logo:not(.light) { box-shadow: 0 6px 16px -4px rgba(var(--pri-rgb), .55); }
[data-theme="dark"] body.auth-lojista .eyebrow { color: var(--pri-l); }
body.auth-lojista a:not(.btn) { color: var(--pri); }
body.auth-lojista .simple-icon { box-shadow: 0 12px 28px -10px rgba(var(--pri-rgb), .65); }
[data-theme="dark"] body.auth-lojista .eyebrow { color: var(--pri-l); }

/* ---------- Minha conta (admin) ---------- */
.conta-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.card.conta-perfil { margin: 0; padding: 0 0 18px; overflow: hidden; text-align: center; position: sticky; top: 20px; }
.conta-capa { height: 84px; background: var(--grad); opacity: .9; }
.conta-avatar { width: 82px; height: 82px; margin: -41px auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff; background: var(--grad); border: 4px solid var(--surface); position: relative; z-index: 1; box-shadow: 0 8px 22px -8px var(--pri); }
.conta-perfil h2 { font-size: 1.15rem; margin: 0 16px 2px; }
.conta-perfil > p { margin: 0 16px 10px; font-size: .88rem; word-break: break-all; }
.conta-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: .78rem; font-weight: 600; color: var(--pri); background: var(--pri-soft); }
.conta-info { list-style: none; margin: 18px 0 0; padding: 14px 18px 0; border-top: 1px solid var(--border); display: grid; gap: 12px; text-align: left; }
.conta-info li { display: flex; gap: 11px; align-items: center; }
.conta-info li > .icon { flex-shrink: 0; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--surface-3); color: var(--mut); }
.conta-info span { display: flex; flex-direction: column; font-size: .78rem; color: var(--mut); }
.conta-info strong { font-size: .9rem; color: var(--txt); font-weight: 600; }
.conta-avatar.img { background: var(--surface); overflow: hidden; }
.conta-avatar.img img { width: 100%; height: 100%; object-fit: cover; }
.conta-info li.st-ok > .icon { color: #10b981; background: rgba(16, 185, 129, .12); }
.conta-info li.st-warn > .icon { color: #f59e0b; background: rgba(245, 158, 11, .12); }
.conta-info li.st-danger > .icon { color: #ef4444; background: rgba(239, 68, 68, .12); }
.conta-form input:disabled { opacity: .65; cursor: not-allowed; }
.conta-form { display: grid; gap: 16px; margin: 0; }
.conta-form .card { margin: 0; }
.conta-form .row { gap: 16px; }
.conta-sec { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.conta-sec h2 { margin: 0 0 2px; }
.conta-sec p { margin: 0; font-size: .85rem; }
.conta-ic { flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--pri); background: var(--pri-soft); }
.conta-ic.warn { color: #f59e0b; background: rgba(245, 158, 11, .12); }
.conta-form label small { display: block; margin-top: 6px; font-weight: 400; font-size: .78rem; }
.conta-form .row label, .conta-acoes label { margin-bottom: 0; }
.conta-acoes { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.conta-acoes .btn { height: 46px; padding: 0 22px; }
@media (max-width: 900px) {
    .conta-grid { grid-template-columns: 1fr; }
    .conta-perfil { position: static; }
}
@media (max-width: 600px) {
    .conta-acoes { grid-template-columns: 1fr; }
    .conta-acoes .btn { width: 100%; }
}

/* ---------- Novos recursos (v4) ---------- */
.tag-info { background: var(--info-bg); color: var(--info-tx); }
.tag .icon { margin-right: -2px; }
.tag:has(.icon)::before { display: none; }
.money-bars { height: 200px; }
.money-bars .vb { position: relative; }
.vb-val { font-size: .62rem; font-weight: 700; color: var(--txt-2); white-space: nowrap; }
.renova-manual { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.renova-manual label { margin: 0; }
.reset-ok { text-align: center; padding: 8px 0 6px; }
.reset-ok .reset-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--ok-bg); color: var(--ok-tx); }
.reset-ok.erro .reset-ico { background: var(--dan-bg); color: var(--dan-tx); }
.reset-ok p { margin: 0 0 8px; }
.auth-card .btn-block + .auth-help { margin-top: 14px; }
.reset-ok + .btn { margin-top: 10px; }

/* Indique e ganhe */
.ref-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px 28px; margin-bottom: 20px; border-radius: var(--r-lg); color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--pri-l) 0%, var(--pri) 45%, var(--pri-2) 100%); box-shadow: 0 18px 40px -20px rgba(var(--pri-rgb), .7); }
.ref-hero::after { content: ''; position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.ref-hero-txt { position: relative; z-index: 1; min-width: 0; }
.ref-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-size: .76rem; font-weight: 700; }
.ref-hero h2 { color: #fff; font-size: 1.5rem; margin: 10px 0 6px; letter-spacing: -.02em; }
.ref-hero p { margin: 0 0 14px; opacity: .92; max-width: 560px; }
.ref-link { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); max-width: 560px; }
.ref-link code { color: #fff; }
.ref-hero .btns .btn:not(.btn-whats) { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .25); }
.ref-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, auto); gap: 10px; }
.ref-stats > div { min-width: 92px; padding: 14px 12px; border-radius: 16px; background: rgba(255, 255, 255, .14); text-align: center; backdrop-filter: blur(4px); }
.ref-stats > div.hl { background: #fff; color: var(--pri-h); }
.ref-stats strong { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.ref-stats span { font-size: .74rem; font-weight: 600; opacity: .9; }
.ref-passos { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 14px; }
.ref-passos li { display: flex; gap: 12px; align-items: flex-start; }
.ref-passos li > span { flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); font-weight: 800; }
.ref-passos b { display: block; }
.ref-passos div { font-size: .86rem; color: var(--mut); }
.ref-passos div b { color: var(--txt); font-size: .92rem; }

/* Atendentes */
.check-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list li.ok .icon { color: var(--ok-tx); }
.check-list li.no { color: var(--mut); }
.check-list li.no .icon { color: var(--dan-tx); }
.list li form { margin: 0; }

/* Banners na aparência */
.bn-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; background: var(--surface-2); }
.bn-item.off img { opacity: .45; filter: grayscale(1); }
.bn-item img { width: 100%; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 10px; display: block; }
.bn-campos select { margin: 0 0 8px; }
.bn-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.bn-linha label { margin: 0; }
.bn-ordem { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--mut); }
.bn-ordem input { width: 64px; margin: 0; padding: 6px 8px; min-height: 0; }
.check.danger { color: var(--dan-tx); }
.bn-add { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px; border: 1.5px dashed var(--border-2); border-radius: 14px; background: transparent; color: var(--txt); font: inherit; font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s; }
.bn-add:hover { border-color: var(--pri); background: var(--pri-soft); color: var(--pri); }
.bn-add-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); transition: transform .25s; }
.bn-add.aberto { border-style: solid; border-radius: 14px 14px 0 0; border-bottom: 0; }
.bn-add.aberto .bn-add-ico { transform: rotate(45deg); }
.bn-add.aberto + .bn-novo { border-top-left-radius: 0; border-top-right-radius: 0; border-style: solid; }
.bn-novo[hidden] { display: none; }
.bn-novo { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1.5px dashed var(--border-2); border-radius: 14px; align-items: start; }
.bn-novo label { margin: 0; }
.bn-novo-campos { display: grid; gap: 10px; min-width: 0; }
.bn-prev { aspect-ratio: 12 / 5; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--mut); font-size: .78rem; text-align: center; }
.bn-prev span { display: grid; justify-items: center; gap: 4px; }
.bn-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-rot { font-size: .8rem; font-weight: 600; margin: 0 0 4px !important; }

/* Mesas */
.mesas-form { display: grid; grid-template-columns: auto 180px auto; gap: 14px; align-items: end; margin-bottom: 8px; }
.mesas-form label { margin: 0; }
.mesas-form .check { align-self: center; }
.mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.mesas-grid canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; transition: transform .15s, box-shadow .15s; background: #fff; }
.mesas-grid canvas:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .4); }

/* Troca proporcional */
.rr-modo { display: grid; gap: 8px; margin-bottom: 4px; }
.rr-modo label { margin: 0; cursor: pointer; display: block; }
.rr-modo input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.rr-modo span { display: flex; flex-direction: column; padding: 10px 12px 10px 38px; border-radius: 12px; border: 1.5px solid var(--border-2); position: relative; transition: all .15s; }
.rr-modo span::before { content: ''; position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-2); }
.rr-modo b { font-size: .88rem; }
.rr-modo small { font-size: .76rem; color: var(--mut); }
.rr-modo input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.rr-modo input:checked + span::before { border-color: var(--pri); background: var(--pri); box-shadow: inset 0 0 0 3px var(--surface); }

@media (max-width: 760px) {
    .ref-hero { grid-template-columns: 1fr; padding: 22px 20px; }
    .ref-stats { grid-template-columns: repeat(3, 1fr); }
    .ref-stats > div { min-width: 0; }
    .bn-item { grid-template-columns: 1fr; }
    .bn-novo, .mesas-form { grid-template-columns: 1fr; }
    .renova-manual { grid-template-columns: 80px 1fr; }
    .renova-manual .btn { grid-column: span 2; }
}

/* ---------- WhatsApp automático ---------- */
.alert-info { background: var(--info-bg); color: var(--info-tx); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.wa-hero { display: flex; gap: 16px; align-items: center; padding: 20px 22px; margin-bottom: 20px; border-radius: var(--r-lg); background: linear-gradient(135deg, #075e54 0%, #128c7e 60%, #25d366 140%); color: #fff; box-shadow: 0 18px 36px -22px rgba(7, 94, 84, .9); }
.wa-hero h2 { color: #fff; margin: 0 0 4px; font-size: 1.15rem; }
.wa-hero p { margin: 0; opacity: .9; font-size: .9rem; max-width: 780px; }
.wa-hero-ico { flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.wa-hero.on .wa-hero-ico { background: #25d366; box-shadow: 0 0 0 6px rgba(37, 211, 102, .25); }
.seg-tabs { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px; }
.seg-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 12px; border-radius: 9px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--mut); cursor: pointer; }
.seg-tabs button.on { background: var(--surface); color: var(--txt); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.wa-box { margin-bottom: 12px; }
.wa-on { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, #25d366 10%, var(--surface)); border: 1px solid color-mix(in srgb, #25d366 35%, transparent); }
.wa-on > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wa-on strong { color: #15803d; }
[data-theme="dark"] .wa-on strong { color: #4ade80; }
.wa-num { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.wa-avatar { position: relative; flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; }
.wa-avatar i { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 3px solid var(--surface); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, .25); } }
.wa-off { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: center; }
.wa-qr { position: relative; width: 240px; height: 240px; border-radius: 18px; border: 1.5px dashed var(--border-2); background: #fff; display: grid; place-items: center; overflow: hidden; }
.wa-qr img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.wa-qr-vazio { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #94a3b8; font-size: .8rem; text-align: center; padding: 12px; }
.wa-qr-load { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .75); color: #128c7e; }
.wa-qr-load .spinner { width: 28px; height: 28px; border-width: 3px; }
.wa-passos h3 { margin: 0 0 8px; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--txt); }
.wa-passos ol { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 6px; font-size: .88rem; color: var(--txt-2); }
.wa-msg { min-height: 1.2em; margin: 10px 0 0; }
.wa-dica { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; }
.wa-teste { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.wa-lemb { margin-top: 12px; }
.wa-opt { display: grid; gap: 10px; margin-bottom: 8px; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); cursor: pointer; margin: 0; }
.switch-row input { margin-top: 3px; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row small { color: var(--mut); font-weight: 400; font-size: .8rem; }
.switch-row:has(input:checked) { border-color: color-mix(in srgb, var(--pri) 45%, var(--border)); background: var(--pri-soft); }
.wa-copia { margin: 2px 0 0; }
.wa-sub { margin: 18px 0 10px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.wa-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin-bottom: 12px; }
.wa-status label { margin: 0; }
.wa-textos { margin: 6px 0 16px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.wa-textos summary { cursor: pointer; font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.wa-textos[open] summary { margin-bottom: 10px; }
.wa-textos code { font-size: .74rem; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); }
.wa-chat { padding: 18px 14px; border-radius: 16px; background: #efeae2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='4' cy='4' r='1.2' fill='%23d9d2c5'/%3E%3C/svg%3E"); }
[data-theme="dark"] .wa-chat { background-color: #0b141a; background-image: none; }
.wa-bolha { position: relative; max-width: 92%; margin-left: auto; padding: 9px 11px 20px; border-radius: 10px 0 10px 10px; background: #d9fdd3; color: #111b21; font-size: .86rem; line-height: 1.45; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); white-space: normal; }
[data-theme="dark"] .wa-bolha { background: #005c4b; color: #e9edef; }
.wa-hora { position: absolute; right: 8px; bottom: 4px; font-size: .68rem; color: #667781; }
[data-theme="dark"] .wa-hora { color: #9fc3bb; }
.list.wa-log li, .list.wa-log li:first-child, .list.wa-log li:last-child { padding: 12px 20px; gap: 10px; }
.wa-log li .tag { flex-shrink: 0; }
.wa-log .li-txt strong { font-size: .88rem; }
.wa-ajuda ol { padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 700px) {
    .wa-off { grid-template-columns: 1fr; justify-items: center; }
    .wa-passos { width: 100%; }
    .wa-on { flex-wrap: wrap; }
    .wa-status { grid-template-columns: 1fr; }
    .wa-hero { padding: 16px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
    .grid-2.wide-left { grid-template-columns: 1fr; }
    .sticky-actions { position: static; }
}
@media (max-width: 960px) {
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s cubic-bezier(.4, 0, .2, 1); box-shadow: none; }
    .sidebar.open { transform: none; box-shadow: var(--sh-lg); }
    .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
    .sb-backdrop.show { opacity: 1; pointer-events: auto; }
    .menu-toggle { display: inline-grid; }
    .content { padding: 20px 18px 40px; }
    .topbar { padding: 12px 18px; }
    .banners { padding: 16px 18px 0; }
    .banners + .content { padding-top: 16px; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-mobile-brand { display: flex; }
}
@media (max-width: 600px) {
    .banner { flex-wrap: wrap; align-items: flex-start; }
    .banner-txt { flex: 1 1 calc(100% - 44px); }
    .banner-link, .banner-btn { margin-left: 42px; }
    .hide-sm { display: none !important; }
    .row { grid-template-columns: 1fr; gap: 0; }
    .var-row { grid-template-columns: 1fr 1fr; }
    .var-row input[name="var_preco[]"] { grid-column: 1; }
    .horario-row { grid-template-columns: 1fr 1fr; }
    .horario-row label { grid-column: 1 / -1; }
    .horario-row span { display: none; }
    .toolbar .input-group { flex-wrap: wrap; }
    .dl { grid-template-columns: 1fr; gap: 2px; }
    .dl dt { margin-top: 10px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat { padding: 14px; }
    .stat strong { font-size: 1.35rem; }
    .card { padding: 18px; border-radius: 14px; }
    .tb-title h1 { font-size: 1.15rem; }
    .crumb { display: none; }
    th, td { padding: 11px 14px; white-space: nowrap; }
    .simple-box { padding: 30px 22px; }
    .hero-card { padding: 14px 16px; }
}

@media print {
    .sidebar, .topbar, .banner, .grid-2 > div:last-child, .alert, .sb-backdrop { display: none !important; }
    body.app { display: block; background: #fff; }
    .grid-2 { display: block; }
    .card { border: 0; box-shadow: none; }
}

/* ---------- Editor da página inicial (admin) ---------- */
.lp-adm-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.lp-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.lp-tabs::-webkit-scrollbar { display: none; }
.lp-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--mut); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lp-tabs button:hover { color: var(--txt); }
.lp-tabs button.on { background: var(--surface); color: var(--txt); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
.lp-tabs button.on .icon { color: var(--pri); }
.lp-adm .grid-2 > .card, .lp-adm .grid-2 > div > .card { margin-bottom: 20px; }
.lp-adm textarea { resize: vertical; }
.lp-mostrar { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.lp-cor { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.lp-cor input[type=color] { width: 48px; height: 40px; padding: 3px; margin: 0; border-radius: 9px; cursor: pointer; }
.lp-cor code { font-size: .82rem; }
.lp-img { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; font-size: .86rem; }
.lp-img > div:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.lp-img input[type=file] { margin: 6px 0 0; font-size: .82rem; }
.lp-img-prev { width: 76px; height: 76px; border-radius: 12px; border: 1px dashed var(--border-2); background: var(--surface-2) repeating-conic-gradient(rgba(0,0,0,.04) 0 25%, transparent 0 50%) 0 0 / 14px 14px; display: grid; place-items: center; color: var(--mut); overflow: hidden; flex-shrink: 0; }
.lp-img-prev img { width: 100%; height: 100%; object-fit: contain; }
.rep { margin-top: 4px; }
.rep-lista { display: grid; gap: 10px; margin-bottom: 12px; }
.rep-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.rep-campos { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rep-campos label { flex: 1 1 200px; min-width: 0; }
.rep-campos label { margin: 0; font-size: .78rem; }
.rep-campos input, .rep-campos select, .rep-campos textarea { margin-top: 4px; }
.rep-campos .rep-area { flex-basis: 100%; }
.rep-campos .rep-curto { flex: 0 0 130px; }
.rep-campos .rep-icone { flex: 0 0 160px; }
.rep-acoes { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; }
.rep-acoes .icon.rep-up { transform: rotate(90deg); }
.rep [data-rep-add]:disabled { opacity: .5; cursor: not-allowed; }
.lp-salvar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0; margin-top: 4px; background: linear-gradient(transparent, var(--bg) 35%); }
@media (max-width: 640px) {
    .rep-campos .rep-curto, .rep-campos .rep-icone { flex: 1 1 100%; }
    .lp-salvar .btn { flex: 1; }
}

/* ---------- Cadastro em 2 etapas ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.cad-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cad-prog { display: flex; align-items: center; gap: 12px; margin: 4px 0 22px; }
.cad-pi { display: flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 700; color: var(--mut); white-space: nowrap; transition: color .25s; }
.cad-pi > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-2); background: var(--surface); color: var(--mut); font-size: .85rem; transition: background .25s, border-color .25s, color .25s; }
.cad-pi > span .icon { display: none; }
.cad-linha { flex: 1; height: 3px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden; }
.cad-linha i { position: absolute; inset: 0; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.cad-form[data-etapa="1"] .cad-pi[data-pi="1"], .cad-form[data-etapa="2"] .cad-pi { color: var(--txt); }
.cad-form[data-etapa="1"] .cad-pi[data-pi="1"] > span, .cad-form[data-etapa="2"] .cad-pi > span { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 14px -6px var(--pri); }
.cad-form[data-etapa="2"] .cad-pi[data-pi="1"] > span b { display: none; }
.cad-form[data-etapa="2"] .cad-pi[data-pi="1"] > span .icon { display: block; }
.cad-form[data-etapa="2"] .cad-linha i { transform: scaleX(1); }
.cad-etapa:not([hidden]) { animation: cadIn .3s ease; }
@keyframes cadIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.cad-sub { margin: 0 0 16px; font-size: .9rem; color: var(--mut); }
.cad-sub b { color: var(--txt); }
.cad-erro { display: block; margin-top: 6px; color: var(--dan-tx); font-weight: 600; font-size: .8rem; }
.input-prefix input.invalid { border-color: var(--dan); }
.cad-btns { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .cad-etapa:not([hidden]) { animation: none; } }
@media (max-width: 420px) { .cad-pi { font-size: .8rem; gap: 7px; } .cad-btns .btn-lg span { font-size: .95rem; } }

/* Cadastro compacto: cabe na tela sem rolar */
body.cadastro { min-height: 100vh; min-height: 100dvh; padding: 16px 14px; }
body.cadastro .simple-box { max-width: 480px; padding: 26px 28px 20px; }
.cad-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cad-topo .cad-ico { width: 46px; height: 46px; border-radius: 13px; margin: 0; flex-shrink: 0; }
body.install .cad-topo h1, body.install .cad-topo p { text-align: left; }
.cad-topo h1 { font-size: 1.3rem; margin: 0 0 2px; line-height: 1.2; }
.cad-topo p { margin: 0; font-size: .86rem; }
.cad-form .cad-prog { margin: 0 0 16px; }
.cad-form .field { margin-bottom: 12px; }
.cad-form .field-label { margin-bottom: 5px; font-size: .82rem; }
.cad-form input:not([type=checkbox]) { padding: 9px 12px; }
.cad-form .input-prefix { margin-top: 0; }
.cad-form .input-prefix span { font-size: .82rem; padding: 9px 12px; }
.cad-form .check { margin: 4px 0 14px; font-size: .8rem; line-height: 1.4; }
.cad-form .btn-lg { min-height: 46px; }
.cad-form #cad-prox { margin-top: 4px; }
.cad-form .cad-sub { margin: -4px 0 12px; font-size: .84rem; }
.cad-form > .center { margin-top: 12px !important; }
body.cadastro .alert { margin-bottom: 12px; padding: 10px 12px; font-size: .84rem; }
@media (max-width: 480px) {
    body.cadastro { padding: 10px; }
    body.cadastro .simple-box { padding: 20px 18px 16px; border-radius: 18px; }
    .cad-topo { gap: 12px; margin-bottom: 16px; }
    .cad-topo .cad-ico { width: 42px; height: 42px; }
    .cad-topo h1 { font-size: 1.15rem; }
}
@media (max-height: 640px) {
    .cad-form .field { margin-bottom: 9px; }
    .cad-topo { margin-bottom: 12px; }
    .cad-form .cad-prog { margin-bottom: 12px; }
}

/* ---------- Pedidos: abas e fila ---------- */
.ped-abas { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.ped-abas::-webkit-scrollbar { display: none; }
.ped-abas a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 9px; color: var(--mut); font-size: .87rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.ped-abas a:hover { color: var(--txt); }
.ped-abas a b { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: .72rem; background: var(--surface-3); color: var(--mut); }
.ped-abas a.on { background: var(--surface); color: var(--txt); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
.ped-abas a.on .icon { color: var(--pri); }
.ped-abas a.tem b { background: var(--pri); color: #fff; }
.fila-dica { margin: -6px 0 12px; line-height: 1.5; }
.fila-dica .icon { vertical-align: -2px; margin-right: 2px; }
.fila { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fila-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 16px 14px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-2); border-radius: 12px; box-shadow: var(--sh-xs); transition: box-shadow .15s, border-color .15s; }
.fila-item:hover { box-shadow: var(--sh); }
.fila-item.st-borda-novo { border-left-color: var(--warn); }
.fila-item.st-borda-confirmado, .fila-item.st-borda-preparando { border-left-color: var(--info); }
.fila-item.st-borda-enviado { border-left-color: var(--vio-tx); }
.fila-pos { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--mut); font-weight: 800; font-size: .85rem; }
.fila-item:first-child .fila-pos { background: var(--pri); color: #fff; }
.fila-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: inherit; text-decoration: none; }
.fila-l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .95rem; }
.fila-l1 strong { color: var(--pri); }
.fila-l2 { font-size: .85rem; color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-l3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8rem; color: var(--mut); }
.fila-l3 .icon { vertical-align: -2px; }
.fila-l3 b { color: var(--txt); }
.fila-l3 .sep { opacity: .5; }
.espera { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-3); color: var(--mut); white-space: nowrap; }
.espera.alerta { background: var(--warn-bg); color: var(--warn-tx); }
.espera.atraso { background: var(--dan-bg); color: var(--dan-tx); animation: esperaPulse 2s infinite; }
.espera.agendado { background: var(--info-bg); color: var(--info-tx); }
@keyframes esperaPulse { 50% { opacity: .65; } }
.fila-acao { margin: 0; }
.fila-acao .btn { min-width: 150px; justify-content: center; }
@media (max-width: 720px) {
    .fila-item { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pos info tempo" "acao acao acao"; gap: 10px 12px; padding: 12px; }
    .fila-pos { grid-area: pos; width: 32px; height: 32px; align-self: start; }
    .fila-info { grid-area: info; }
    .fila-tempo { grid-area: tempo; align-self: start; }
    .fila-acao { grid-area: acao; }
    .fila-acao .btn { width: 100%; min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .espera.atraso { animation: none; } }

/* Indique e ganhe: compacto no celular */
@media (max-width: 640px) {
    .ref-hero { gap: 14px; padding: 18px 16px; border-radius: 16px; }
    .ref-hero::after { width: 200px; height: 200px; right: -70px; top: -90px; }
    .ref-badge { display: none; }
    .ref-hero h2 { font-size: 1.15rem; margin: 0 0 6px; line-height: 1.25; }
    .ref-hero p { font-size: .84rem; line-height: 1.5; margin-bottom: 12px; }
    .ref-link { padding: 4px 4px 4px 10px; }
    .ref-link code { font-size: .74rem; }
    .ref-hero .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
    .ref-hero .btns .btn { min-height: 40px; padding: 8px 10px; font-size: .84rem; justify-content: center; }
    .ref-longo { display: none; }
    .ref-stats { gap: 8px; }
    .ref-stats > div { padding: 9px 6px; border-radius: 12px; }
    .ref-stats strong { font-size: 1.2rem; }
    .ref-stats span { font-size: .7rem; }
}
.list.ref-lista li, .list.ref-lista li:first-child, .list.ref-lista li:last-child { padding: 12px 20px; }
@media (max-width: 640px) { .list.ref-lista li, .list.ref-lista li:first-child, .list.ref-lista li:last-child { padding: 12px 16px; } }
.rec-resumo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 160px; max-width: 230px; }
.rec-resumo .tag { white-space: nowrap; }
.rec-resumo small { color: var(--mut); font-size: .76rem; line-height: 1.4; white-space: normal; }
.grid-2.planos-grid { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1100px) { .grid-2.planos-grid { grid-template-columns: 1fr; } }
.planos-grid th, .planos-grid td { padding: 12px 14px; }
.planos-grid .rec-resumo { min-width: 0; max-width: 190px; }

/* Barra de busca/filtros no celular: busca em cima, filtro + botão embaixo */
@media (max-width: 640px) {
    .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .toolbar > .input-group:has(.search-input) { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .toolbar > .input-group:has(.search-input) .search-input { grid-column: 1 / -1; }
    .toolbar > .input-group:has(.search-input) select { width: 100%; min-width: 0; }
    .toolbar > .btn, .toolbar > a.btn { width: 100%; justify-content: center; order: -1; }
}

/* Produtos no celular: cada produto vira um card */
@media (max-width: 640px) {
    table.produtos thead { display: none; }
    table.produtos, table.produtos tbody { display: block; }
    table.produtos tr { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; gap: 8px 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
    table.produtos td { padding: 0; border: 0; min-width: 0; }
    table.produtos td[colspan] { grid-column: 1 / -1; }
    table.produtos .thumb-cell { grid-column: span 2; }
    table.produtos .thumb-cell img, table.produtos .thumb-cell .noimg { width: 48px; height: 48px; }
    table.produtos .nome-cell { grid-column: span 7; line-height: 1.3; }
    table.produtos .nome-cell strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    table.produtos .nome-cell br { display: none; }
    table.produtos .acoes-cell { grid-column: span 3; }
    table.produtos .acoes-cell .row-actions { justify-content: flex-end; gap: 4px; }
    table.produtos .dup-form { display: none !important; }
    table.produtos .preco-cell { grid-column: span 3; font-weight: 700; font-size: .9rem; line-height: 1.25; }
    table.produtos .sw-cell { grid-column: span 3; display: flex; flex-direction: column; align-items: center; gap: 4px; }
    table.produtos .sw-cell::before { content: attr(data-rot); font-size: .68rem; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .03em; }
    .card:has(> .table-wrap > table.produtos) .table-wrap { overflow: visible; }
}

/* Nova loja: duas colunas no PC */
.grid-2.nova-loja { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.grid-2.nova-loja > .card, .grid-2.nova-loja > div > .card { margin-bottom: 20px; }
.nova-dicas ol { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; color: var(--txt-2); }
.nova-dicas h2 { display: flex; align-items: center; gap: 8px; }
.nova-dicas h2 .icon { color: var(--pri); }
.nova-dicas .muted .icon { vertical-align: -2px; color: var(--pri); }
@media (max-width: 980px) { .grid-2.nova-loja { grid-template-columns: 1fr; } }

/* ---------- Atendentes ---------- */
.equipe-wrap { max-width: none; }
.equipe-wrap > .card { margin-bottom: 20px; }
.eq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eq-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.eq-head h2 .tag { font-size: .72rem; }
.eq-novo { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; border-bottom: 1px solid transparent; }
.eq-novo.aberto { grid-template-rows: 1fr; border-bottom-color: var(--border); }
.eq-novo > form { overflow: hidden; min-height: 0; }
.eq-novo-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; padding: 0 22px; background: var(--surface-2); transition: padding .28s ease; }
.eq-novo.aberto .eq-novo-in { padding: 18px 22px; }
.eq-novo-in label { margin: 0; }
.eq-novo-btns { display: flex; gap: 8px; }
.list.eq-lista li, .list.eq-lista li:first-child, .list.eq-lista li:last-child { padding: 16px 22px; gap: 14px; align-items: center; }
.eq-lista .avatar { width: 44px; height: 44px; font-size: .95rem; flex-shrink: 0; }
.eq-lista .li-txt { gap: 2px; }
.eq-acesso { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--mut); margin-top: 2px; }
.eq-acesso.on { color: var(--ok-tx); }
.eq-btns { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-shrink: 0; }
.eq-btns form { margin: 0; }
.eq-perms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
.eq-perms > div { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.eq-perms span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.eq-perms .ok span { background: var(--ok-bg); color: var(--ok-tx); }
.eq-perms .no span { background: var(--dan-bg); color: var(--dan-tx); }
.eq-perms b { display: block; font-size: .9rem; }
.eq-perms small { color: var(--mut); font-size: .8rem; }
.eq-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-2); }
.eq-link > div { min-width: 0; }
.eq-link small { display: block; color: var(--mut); font-size: .74rem; }
.eq-link code { font-size: .84rem; word-break: break-all; }
@media (max-width: 900px) {
    .eq-novo-in { grid-template-columns: 1fr 1fr; }
    .eq-novo-btns { grid-column: 1 / -1; justify-content: flex-end; }
    .eq-perms { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .eq-novo-in { grid-template-columns: 1fr; }
    .eq-novo.aberto .eq-novo-in { padding: 16px; }
    .eq-novo-btns .btn { flex: 1; justify-content: center; }
    .eq-perms { grid-template-columns: 1fr; }
    .list.eq-lista li, .list.eq-lista li:first-child, .list.eq-lista li:last-child { padding: 14px 16px; flex-wrap: wrap; }
    .eq-btns { width: 100%; justify-content: flex-end; }
}
#eq-toggle svg { transition: transform .25s ease; }
#eq-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }

/* Minha conta: cartão do perfil só fica fixo no PC */
@media (max-width: 900px) { .card.conta-perfil { position: static; } }

/* ---------- Bloco que abre/fecha (Avisos) ---------- */
.av-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.av-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.av-head h2 .icon { color: var(--pri); }
.cl-box { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; border-bottom: 1px solid transparent; }
.cl-box.aberto { grid-template-rows: 1fr; border-bottom-color: var(--border); }
.cl-box > .cl-in { overflow: hidden; min-height: 0; }
.av-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 28px; padding: 0 24px; background: var(--surface-2); transition: padding .3s ease; }
.cl-box.aberto .av-form { padding: 22px 24px; }
.av-col > .field:last-child { margin-bottom: 0; }
.av-form textarea { min-height: 120px; }
.av-dica { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.av-btns { display: flex; justify-content: flex-end; gap: 8px; }
#av-toggle svg { transition: transform .25s ease; }
#av-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.avisos-card .aviso-list li { padding-left: 24px; padding-right: 24px; }
@media (max-width: 860px) {
    .av-form { grid-template-columns: 1fr; }
    .cl-box.aberto .av-form { padding: 18px 16px; }
    .av-btns .btn { flex: 1; justify-content: center; }
}

/* ---------- Planos (bloco que abre/fecha) ---------- */
.pl-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 32px; padding: 0 24px; background: var(--surface-2); transition: padding .3s ease; }
.cl-box.aberto .pl-form { padding: 22px 24px; }
.pl-tit { margin: 0 0 14px; font-size: 1rem; }
.pl-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pl-rec-acoes { font-size: .8rem; color: var(--mut); }
.pl-rec-acoes .btn-link { padding: 0; font-size: .8rem; }
.recursos-grid.pl-rec { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }
.pl-btns { margin-top: 16px; }
#pl-toggle svg { transition: transform .25s ease; }
#pl-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.planos-card th:first-child, .planos-card td:first-child { padding-left: 24px; }
.planos-card th:last-child, .planos-card td:last-child { padding-right: 24px; }
.planos-card .rec-resumo { max-width: none; }
@media (max-width: 1100px) { .recursos-grid.pl-rec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
    .pl-form { grid-template-columns: 1fr; }
    .cl-box.aberto .pl-form { padding: 18px 16px; }
    .pl-btns .btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) { .recursos-grid.pl-rec { grid-template-columns: 1fr; } }

/* ---------- Planos em cards ---------- */
.planos-card { margin-bottom: 20px; }
.planos-card .cl-box.aberto { border-bottom-color: transparent; }
.planos-card:not(:has(.cl-box.aberto)) .av-head { border-bottom: 0; }
.plc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; align-items: start; }
.plc { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); transition: box-shadow .2s, transform .2s, border-color .2s; }
.plc:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.plc.inativo { opacity: .65; }
.plc.editando { border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-ring); }
.plc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 16px 16px 0 0; background: var(--grad); }
.plc header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plc header > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plc h3 { margin: 0; font-size: 1.15rem; }
.plc-preco { display: flex; align-items: baseline; gap: 6px; }
.plc-preco b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.plc-preco span { color: var(--mut); font-size: .86rem; }
.plc-nums { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.plc-nums > div { padding: 10px 12px; }
.plc-nums > div + div { border-left: 1px solid var(--border); }
.plc-nums small { display: block; font-size: .7rem; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.plc-nums b { font-size: .98rem; }
.plc-todos { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-tx); font-weight: 600; font-size: .88rem; }
.plc-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: .82rem; }
.plc-lista li { display: flex; align-items: center; gap: 6px; }
.plc-lista li.ok .icon { color: var(--ok-tx); }
.plc-lista li.no { color: var(--mut); text-decoration: line-through; text-decoration-color: rgba(127, 127, 127, .4); }
.plc-lista li.no .icon { color: var(--dan-tx); }
@media (max-width: 480px) { .plc-lista { grid-template-columns: 1fr; } }
.plc { overflow: hidden; }
.plc h3 { margin: 0; font-size: 1.2rem; font-weight: 800; text-transform: none; letter-spacing: -.01em; color: var(--txt); }
.plc::before { border-radius: 0; }

/* ---------- Lojas em cards ---------- */
.lj-total { margin: -4px 0 12px; }
.lj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.lj-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.lj-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--lj); }
.lj-card:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.lj-card.off { border-color: rgba(239, 68, 68, .35); }
.lj-card header { display: flex; align-items: center; gap: 12px; }
.lj-logo { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; background: var(--lj); color: #fff; font-weight: 800; }
.lj-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.lj-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lj-nome strong { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--txt); }
.lj-nome .small { color: var(--pri); display: inline-flex; align-items: center; gap: 4px; }
.lj-origem { align-self: flex-start; margin-top: -6px; }
.lj-nums { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.lj-nums > div { padding: 9px 12px; min-width: 0; }
.lj-nums > div + div { border-left: 1px solid var(--border); }
.lj-nums small { display: block; font-size: .68rem; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.lj-nums b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lj-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .86rem; color: var(--txt-2); }
.lj-info li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lj-info li .icon { color: var(--mut); flex-shrink: 0; }
.lj-info li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lj-info em { font-style: normal; font-size: .76rem; color: var(--mut); margin-left: 4px; }
.lj-info em.venc-alerta { color: var(--warn-tx); font-weight: 700; }
.lj-info em.venc-off { color: var(--dan-tx); font-weight: 700; }
.lj-card footer { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.lj-card footer form { margin: 0; }
.lj-card footer .btn-primary { flex: 1; justify-content: center; }
@media (max-width: 400px) { .lj-grid { grid-template-columns: 1fr; } }

/* Dados da loja: cards em 2 colunas equilibradas automaticamente */
.dl-cols { column-count: 2; column-gap: 20px; }
.dl-cols > .card { break-inside: avoid; -webkit-column-break-inside: avoid; display: inline-block; width: 100%; vertical-align: top; }
.dl-salvar { margin-bottom: 20px; }
@media (max-width: 960px) { .dl-cols { column-count: 1; } }
.dl-cols.js { column-count: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
@media (max-width: 960px) { .dl-cols.js { grid-template-columns: 1fr; } }

/* Prévia das fotos novas do produto */
.thumb.nova { position: relative; }
.thumb.nova img { outline: 2px solid var(--pri); outline-offset: -2px; }
.nova-tag { position: absolute; left: 6px; bottom: 6px; margin: 0 !important; padding: 2px 7px; border-radius: 999px; background: var(--pri); color: #fff; font-size: .68rem; font-weight: 700; }
.nova-x { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.nova-x:hover { background: var(--dan); }
.cat-ajuda { margin: 0; padding: 12px 20px; }

/* Categorias em duas colunas no PC */
.cat-grid .count-pill { min-width: 92px; text-align: center; }
@media (min-width: 1360px) {
    .sortable-list.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sortable-list.cat-grid li:nth-child(odd) { border-right: 1px solid var(--border); }
    .cat-grid .inline-form { flex-wrap: nowrap; }
    .cat-grid .inline-form input[name=nome] { min-width: 90px; }
    .cat-grid .inline-form { gap: 10px; }
    .cat-grid .count-pill { min-width: 0; }
    .cat-grid label.check { white-space: nowrap; }
}

/* Campos de data com rótulo (De / Até) */
.data-campo { position: relative; flex: 1 1 auto; min-width: 150px; display: block; margin: 0; }
.data-campo span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: .78rem; font-weight: 700; color: var(--mut); pointer-events: none; z-index: 1; }
.data-campo input { width: 100%; padding-left: 46px !important; }
.filtro-datas > .btn { order: 0 !important; }

/* Lançar pedido na mesa (modo atendente) */
.lancar-mesa { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.lancar-mesa .lm-ico { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--pri-rgb), .12); color: var(--pri); }
.lancar-mesa .lm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lancar-mesa .lm-txt small { color: var(--mut); font-size: .8rem; }
.lancar-mesa select { width: auto; min-width: 120px; margin: 0; }
.lancar-mesa .btn { margin: 0; white-space: nowrap; }
@media (max-width: 640px) {
    .lancar-mesa { flex-wrap: wrap; }
    .lancar-mesa .lm-txt { flex: 1 1 calc(100% - 52px); }
    .lancar-mesa select, .lancar-mesa .btn { flex: 1; }
}

/* Equipe: função (Atendente / Cozinha) */
.eq-funcao { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.eq-funcao-tit { grid-column: 1 / -1; font-weight: 600; font-size: .85rem; color: var(--txt-2); }
.eq-f { position: relative; margin: 0; cursor: pointer; }
.eq-f input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.eq-f > span { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; height: 100%; transition: border-color .15s, background .15s; }
.eq-f > span svg { color: var(--pri); }
.eq-f small { grid-column: 1 / -1; font-weight: 400; color: var(--mut); font-size: .78rem; line-height: 1.35; }
.eq-f input:checked + span { border-color: var(--pri); background: rgba(var(--pri-rgb), .07); }
.eq-f input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 2px; }
.eq-tag-cozinha { background: rgba(234, 88, 12, .12) !important; color: #ea580c !important; }
.eq-mudar { margin: 0; }
.eq-mudar select { width: auto; margin: 0; padding: 6px 30px 6px 10px; font-size: .82rem; height: 34px; }
.status-travado .status-atual { margin: 6px 0 8px; }
@media (max-width: 560px) { .eq-funcao { grid-template-columns: 1fr; } }

/* Aviso de pedido pronto (para o atendente levar) */
.pedido-alerta.pronto { border-left: 4px solid #16a34a; }
.pedido-alerta.pronto strong { color: #16a34a; }
.ped-itens + .ped-sec { margin-top: 22px; }
.grid-2 > * { min-width: 0; }
.dom-passos { margin: 4px 0 8px; padding-left: 18px; color: var(--txt-2); line-height: 1.55; } .dom-passos li { margin-bottom: 6px; } .dom-passos code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-size: .82rem; }

/* Situação do domínio próprio */
.dom-status { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 12px; margin: 8px 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.dom-status p { margin: 0; font-size: .82rem; color: var(--txt-2); line-height: 1.45; }
.dom-status .btn { margin: 0; }
.ds-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.ds-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ds-ativo .ds-pill { background: var(--ok-bg); color: var(--ok-tx); }
.ds-processo .ds-pill { background: var(--warn-bg); color: var(--warn-tx); }
.ds-processo .ds-dot { animation: dsPisca 1.4s infinite; }
.ds-inativo .ds-pill { background: var(--danger-bg, rgba(239,68,68,.12)); color: var(--danger-tx, #ef4444); }
@keyframes dsPisca { 50% { opacity: .3; } }
@media (max-width: 640px) { .dom-status { grid-template-columns: 1fr; } .dom-status .btn { justify-self: start; } }
.dom-status { grid-template-columns: auto 1fr; }
.dom-status .btn { grid-column: 2; grid-row: 1; justify-self: end; }
.dom-status p { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 640px) { .dom-status { grid-template-columns: auto 1fr; } .dom-status .btn { justify-self: end; } }

/* Minha conta (admin): logo do sistema */
.conta-logo { grid-column: 2; }
.cl-linha { display: flex; gap: 18px; align-items: flex-start; margin-top: 6px; }
.cl-prev { width: 96px; height: 96px; flex: none; border-radius: 18px; border: 1px dashed var(--border); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--mut); }
.cl-prev img { width: 100%; height: 100%; object-fit: contain; }
.cl-campos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-campos input[type=file] { margin: 0; }
.cl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .conta-logo { grid-column: auto; } }
@media (max-width: 520px) { .cl-linha { flex-direction: column; } }
.cl-prev.nova { border: 2px solid var(--pri); }

/* Logo do sistema nos lugares da marca */
.sb-logo.tem-img { background: #fff !important; padding: 4px; overflow: hidden; }
.sb-logo.tem-img img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

/* Fundo moderno da área de login: manchas de cor em movimento + pontilhado */
.auth-main { overflow: hidden; isolation: isolate; }
.auth-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.auth-bg .ab { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .22; animation: abFlutua 18s ease-in-out infinite alternate; }
.auth-bg .ab1 { width: 340px; height: 340px; background: var(--pri); top: -110px; right: -90px; }
.auth-bg .ab2 { width: 300px; height: 300px; background: var(--pri-2); bottom: -120px; left: -100px; animation-delay: -6s; }
.auth-bg .ab3 { width: 200px; height: 200px; background: var(--pri-l); top: 45%; left: 55%; opacity: .12; animation-delay: -12s; }
[data-theme="dark"] .auth-bg .ab { opacity: .28; }
[data-theme="dark"] .auth-bg .ab3 { opacity: .14; }
.auth-bg .ab-pontos { position: absolute; inset: 0; background-image: radial-gradient(rgba(var(--pri-rgb), .22) 1px, transparent 1.4px); background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%); }
@keyframes abFlutua { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 24px) scale(1.08); } 100% { transform: translate(-20px, 36px) scale(.95); } }
@media (prefers-reduced-motion: reduce) { .auth-bg .ab { animation: none; } }
/* No celular o formulário ganha um cartão de vidro sobre o fundo */
@media (max-width: 900px) {
    .auth-card { padding: 26px 22px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border);
        box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
/* Logo ocupa todo o quadrado, sem moldura branca */
.sb-logo.tem-img { background: transparent !important; padding: 0 !important; box-shadow: none; }
.sb-logo.tem-img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Inteligência artificial */
.btn-ia { background: linear-gradient(135deg, #7c3aed, #db2777) !important; color: #fff !important; border: 0 !important; }
.btn-ia:disabled { opacity: .7; }
.ia-desc-linha { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; flex-wrap: wrap; }
.ia-modelos { margin-top: 10px; }
.ia-modelos summary { cursor: pointer; font-size: .85rem; color: var(--txt-2); margin-bottom: 8px; }
.ia-dicas { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.ia-dicas li { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.ia-dicas svg { color: var(--ok-tx); flex: none; margin-top: 2px; }
.ia-conferir .iac-cat { border-top: 1px solid var(--border); }
.iac-cat-h { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--surface-2); }
.iac-cat-h svg { color: var(--pri); }
.iac-cat-h { flex-wrap: wrap; }
.iac-cat-sel { margin: 0 !important; width: auto !important; max-width: 260px; font-weight: 600; }
.iac-cat-nome { font-weight: 700; margin: 0 !important; max-width: 340px; flex: 1 1 180px; }
.iac-cat-nome[hidden] { display: none !important; }
.iac-cat-tag { white-space: nowrap; }
@media (max-width: 600px) { .iac-cat-sel, .iac-cat-nome { max-width: none; flex: 1 1 100%; } }
.iac-item { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px; gap: 12px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--border); }
.iac-usar { margin: 0; }
.iac-usar input { width: 18px; height: 18px; }
.iac-campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.iac-campos input, .iac-preco { margin: 0 !important; }
.iac-preco.falta { border-color: var(--warn-tx) !important; }
.iac-item:has(.iac-usar input:not(:checked)) { opacity: .45; }
.iac-pe { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); }
.iac-pe .muted { margin-right: auto; }
@media (max-width: 700px) {
    .iac-item { grid-template-columns: auto minmax(0, 1fr); }
    .iac-campos { grid-template-columns: 1fr; }
    .iac-preco { grid-column: 2; }
}

.mf-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.mf-barra[hidden] { display: none; }
#gal-melhorar { margin-top: 8px; }
#gal-melhorar[hidden] { display: none; }

.iac-item { grid-template-columns: auto 56px minmax(0, 1fr) 130px; }
.iac-foto { position: relative; width: 56px; height: 56px; margin: 0; border-radius: 10px; overflow: hidden; cursor: pointer; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--pri); }
.iac-foto img { width: 100%; height: 100%; object-fit: cover; }
.iac-foto input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.iac-foto span { position: absolute; right: 3px; bottom: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center; }
.iac-foto:has(input:not(:checked)) { border-color: var(--border); opacity: .4; }
.iac-foto:has(input:not(:checked)) span { display: none; }
.iac-foto.vazia { border: 1px dashed var(--border); color: var(--mut); cursor: default; }
@media (max-width: 700px) { .iac-item { grid-template-columns: auto 48px minmax(0, 1fr); } .iac-foto { width: 48px; height: 48px; } .iac-preco { grid-column: 3; } }

.iac-item { grid-template-columns: auto 70px minmax(0, 1fr) 130px; }
.iac-fotocol { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.iac-cortar { border: 0; background: none; color: var(--pri); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; padding: 0; }
.iac-foto.manual { border-color: var(--ok-tx); cursor: default; }
.iac-foto.manual > span { background: var(--ok-tx); font-size: 10px; }
.corte-dlg { max-width: 760px; width: calc(100% - 24px); }
.corte-abas { display: flex; gap: 6px; margin: 8px 0; }
.corte-area { position: relative; margin: 10px 0 14px; max-height: 62vh; overflow: auto; border-radius: 10px; background: #000; cursor: crosshair; touch-action: none; user-select: none; }
.corte-area img { display: block; width: 100%; height: auto; pointer-events: none; }
.corte-sel { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); border-radius: 4px; pointer-events: none; }
@media (max-width: 700px) { .iac-item { grid-template-columns: auto 56px minmax(0, 1fr); } }
.corte-dlg { text-align: left; } .corte-dlg .dlg-btns { display: flex; justify-content: flex-end; gap: 8px; } .dlg-overlay[hidden] { display: none; }
.ia-prev { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; align-items: center; }
.ia-prev:empty { display: none; }
.ia-prev img { width: 92px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.iac-fotobtns { display: flex; flex-direction: column; align-items: center; gap: 2px; } .iac-fotobtns label.iac-cortar { margin: 0; }
.iac-fotobtns { display: flex; flex-direction: column; align-items: center; gap: 2px; } .iac-fotobtns label.iac-cortar { margin: 0; }
.ia-conferir .card-head { flex-wrap: wrap; gap: 6px 16px; } .ia-conferir .card-head h2 { white-space: nowrap; }
.iac-cortar { white-space: nowrap; }

/* Variáveis das mensagens do WhatsApp */
.wa-vars { margin-bottom: 14px; }
.wa-vars-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--txt); font: inherit; font-size: .86rem; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer; transition: border-color .15s, color .15s; }
.wa-vars-btn:hover, .wa-vars-btn.aberto { border-color: var(--pri); color: var(--pri); }
.wa-vars-btn svg { transition: transform .2s; }
.wa-vars-btn.aberto svg { transform: rotate(180deg); }
.wa-vars-ico { font: 700 .8rem ui-monospace, Menlo, monospace; background: var(--pri-soft); color: var(--pri); padding: 2px 6px; border-radius: 6px; }
.wa-vars-box { margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--surface); }
.wa-vars-box[hidden], .wa-vars-g[hidden] { display: none; }
.wa-vars-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.wa-vars-tab { flex-shrink: 0; border: 0; background: transparent; color: var(--txt-2); font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.wa-vars-tab:hover { background: var(--surface-2); }
.wa-vars-tab.ativo { background: var(--pri-soft); color: var(--pri); }
.wa-vars-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.wa-var { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--border); background: var(--surface-2); color: var(--txt); font: inherit; padding: 7px 10px; border-radius: 9px; cursor: pointer; transition: border-color .15s, background .15s; }
.wa-var code { font-size: .78rem; font-weight: 700; background: none; padding: 0; color: inherit; }
.wa-var small { font-size: .72rem; color: var(--mut); line-height: 1.3; }
.wa-var:hover, .wa-var:focus-visible { border-color: var(--pri); background: var(--pri-soft); }
.wa-var:hover code { color: var(--pri); }
.wa-var.ok { border-color: var(--ok); }

/* Testar mensagem do WhatsApp */
.wa-rot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.wa-testar { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--txt-2); font: inherit; font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.wa-testar:hover { border-color: var(--pri); color: var(--pri); }
.wa-teste[hidden] { display: none; }
.wa-teste-box { position: relative; max-width: 440px; width: 100%; text-align: left; max-height: 92vh; overflow-y: auto; }
.wa-teste-box h3 { padding-right: 36px; }
.wa-teste-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--txt); display: grid; place-items: center; cursor: pointer; }
.wa-teste .wa-chat { margin-top: 12px; display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.wa-teste .wa-bolha { word-break: break-word; }
.wa-teste .wa-bolha a { color: #027eb5; }
[data-theme="dark"] .wa-teste .wa-bolha a { color: #53bdeb; }
.wa-teste .wa-bolha code { font-size: .8rem; }
.wa-teste-env { margin-top: 14px; }
.wa-teste-env label { margin: 0 0 4px; }
.wa-teste-linha { display: flex; gap: 8px; margin-top: 6px; }
.wa-teste-linha input { flex: 1; min-width: 0; margin: 0 !important; }
.wa-teste-linha .btn { flex-shrink: 0; }
.wa-teste-ok { color: var(--ok); font-weight: 600; }
.wa-teste-erro { color: var(--dan); font-weight: 600; }

/* Balões do WhatsApp: código Pix e links longos quebram dentro do balão */
.wa-bolha { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.wa-chat { overflow: hidden; }
/* Conexão do WhatsApp no celular: botão Desconectar vira ícone no canto superior direito */
@media (max-width: 700px) {
    .wa-on { position: relative; flex-wrap: nowrap; padding-right: 58px; }
    .wa-on > form { position: absolute; top: 10px; right: 10px; margin: 0; }
    .wa-on > form .btn { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; font-size: 0; gap: 0; }
    .wa-on > form .btn svg { width: 17px; height: 17px; }
    .wa-num { white-space: nowrap; }
    .wa-avatar { width: 48px; height: 48px; }
}

/* Selos do produto */
.selos-box { margin-top: 10px; }
.selos-op { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.selo-op { margin: 0; cursor: pointer; }
.selo-op input { position: absolute; opacity: 0; pointer-events: none; }
.selo-op span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-2); font-size: .8rem; font-weight: 600; transition: all .15s; }
.selo-op input:checked + span { border-color: var(--pri); background: var(--pri-soft); color: var(--pri); }
.selo-op input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 2px; }

.tag-fid { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
[data-theme="dark"] .tag-fid { background: rgba(245, 179, 1, .15); color: #fcd34d; border-color: rgba(245, 179, 1, .4); }

/* Foto da categoria */
.cat-foto { position: relative; flex-shrink: 0; width: 38px; height: 38px; margin: 0; border-radius: 10px; border: 1.5px dashed var(--border-2); display: grid; place-items: center; color: var(--mut); cursor: pointer; overflow: hidden; transition: border-color .15s, color .15s; }
.cat-foto:hover { border-color: var(--pri); color: var(--pri); }
.cat-foto.tem { border-style: solid; border-color: var(--border); }
.cat-foto img { width: 100%; height: 100%; object-fit: cover; }
.cat-foto input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cat-foto-w { position: relative; flex-shrink: 0; display: inline-flex; }
.cat-foto-x { position: absolute; top: -7px; right: -7px; z-index: 1; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); background: var(--dan); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }

.ped-aval-foto { display: flex; align-items: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.ped-aval-foto img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; display: block; }

.selos-aviso { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 8px 10px; border-radius: 9px; background: var(--warn-bg); color: var(--warn-tx); font-size: .8rem; font-weight: 600; }
.selos-aviso[hidden] { display: none; }
.selos-aviso.shake { animation: selosShake .4s; }
@keyframes selosShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Escolha da letra dos títulos */
.fontes-op { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.fonte-op { margin: 0; cursor: pointer; }
.fonte-op input { position: absolute; opacity: 0; pointer-events: none; }
.fonte-op span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.fonte-op b { font-size: 1.05rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.fonte-op small { font-family: var(--font, inherit); font-size: .72rem; color: var(--mut); }
.fonte-op input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.fonte-op input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 2px; }

/* Estilo dos cards do catálogo */
.cards-op { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
.card-op { margin: 0; cursor: pointer; }
.card-op input { position: absolute; opacity: 0; pointer-events: none; }
.card-op > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.card-op strong { font-size: .88rem; }
.card-op small { font-size: .72rem; color: var(--mut); line-height: 1.35; }
.card-op input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.co-prev { display: grid; gap: 4px; height: 58px; margin-bottom: 4px; }
.co-prev b { display: block; border-radius: 5px; background: color-mix(in srgb, var(--pri) 30%, var(--surface)); position: relative; }
.co-grade { grid-template-columns: repeat(3, 1fr); }
.co-grade b::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 8px; border-radius: 2px; background: var(--surface); }
.co-lista { grid-template-rows: 1fr 1fr; }
.co-lista b { background: var(--surface); border: 1px solid var(--border); }
.co-lista b::before { content: ''; position: absolute; left: 3px; top: 3px; bottom: 3px; width: 22px; border-radius: 3px; background: color-mix(in srgb, var(--pri) 30%, var(--surface)); }
.co-lista b::after { content: ''; position: absolute; left: 30px; right: 8px; top: 7px; height: 5px; border-radius: 2px; background: var(--border-2); }
.co-vitrine { grid-template-columns: repeat(3, 1fr); }
.co-vitrine b { background: linear-gradient(to bottom, color-mix(in srgb, var(--pri) 45%, var(--surface)) 50%, color-mix(in srgb, var(--pri) 80%, #000)); }
.co-vitrine b::after { content: ''; position: absolute; left: 4px; right: 10px; bottom: 5px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .8); }
@media (max-width: 600px) { .cards-op { grid-template-columns: 1fr; } .card-op > span { flex-direction: row; flex-wrap: wrap; align-items: center; } .co-prev { width: 90px; height: 46px; margin: 0; } .card-op small { flex-basis: 100%; } }
/* Prévia dos estilos do topo */
.co-topo { position: relative; display: block; }
.co-topo b { position: absolute; }
.co-topo b:nth-child(1) { left: 0; right: 0; top: 0; height: 26px; border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--pri) 45%, var(--surface)); }
.co-topo b:nth-child(2) { width: 20px; height: 20px; border-radius: 50%; top: 16px; left: calc(50% - 10px); background: var(--surface); border: 2px solid var(--pri); }
.co-topo b:nth-child(3) { height: 5px; width: 40%; top: 42px; left: 30%; border-radius: 2px; background: var(--border-2); }
.co-topo-lateral b:nth-child(2) { left: 8px; }
.co-topo-lateral b:nth-child(3) { left: 34px; top: 40px; width: 45%; }
.co-topo-cartao b:nth-child(1) { height: 32px; }
.co-topo-cartao b:nth-child(2) { top: 14px; z-index: 1; }
.co-topo-cartao b:nth-child(3) { left: 14%; width: 72%; top: 22px; height: 34px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.co-topo-cartao b:nth-child(3)::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 8px; height: 4px; border-radius: 2px; background: var(--border-2); }

/* Funcionamento: pausar pedidos / tirar do ar */
.func-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.func-item { border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.func-item.off { border-color: color-mix(in srgb, var(--warn-tx) 45%, var(--border)); background: color-mix(in srgb, var(--warn-bg) 55%, var(--surface)); }
.func-top { display: flex; align-items: center; gap: 12px; }
.func-top b { display: block; font-size: 1rem; }
.func-top small { color: var(--mut); font-size: .84rem; }
.func-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--pri-soft); color: var(--pri); }
.func-item.off .func-ico { background: var(--warn-bg); color: var(--warn-tx); }
.func-item.off .func-top small { color: var(--warn-tx); font-weight: 600; }
.func-desc { margin: 0; font-size: .84rem; color: var(--mut); line-height: 1.5; flex: 1; }
.func-form > summary { list-style: none; cursor: pointer; }
.func-form > summary::-webkit-details-marker { display: none; }
.func-form[open] > summary { display: none; }
.func-form form { display: flex; flex-direction: column; gap: 12px; animation: funcAbre .25s ease; }
@keyframes funcAbre { from { opacity: 0; transform: translateY(-4px); } }
.func-form .field { margin: 0; }
.func-dur { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.func-dur label { position: relative; cursor: pointer; }
.func-dur input { position: absolute; opacity: 0; pointer-events: none; }
.func-dur span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--border); font-size: .8rem; font-weight: 600; line-height: 1.2; transition: border-color .15s, background .15s, color .15s; }
.func-dur input:checked + span { border-color: var(--pri); background: var(--pri-soft); color: var(--pri); }
.func-dur input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 2px; }
@media (max-width: 480px) { .func-dur { grid-template-columns: repeat(2, 1fr); } }
.ped-aval-det { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: .8rem; color: var(--mut); }
.ped-aval-det b { color: #f59e0b; letter-spacing: -1px; margin-left: 2px; }
.ped-aval-det b i { color: var(--border-2); font-style: normal; }
.td-box { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--pri-soft); }
.td-frase { margin: 0 0 8px; line-height: 2.3; font-size: .9rem; }
.td-frase input { width: 64px; display: inline-block; height: 34px; padding: 0 8px; text-align: center; margin: 0 2px; }
.ped-mapa { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .82rem; font-weight: 600; }
/* Entrega por distância */
.fk-mapa { position: relative; isolation: isolate; height: 260px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: var(--surface-2); z-index: 0; }
.fk-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.fk-faixa { display: grid; grid-template-columns: auto 80px auto auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.fk-faixa > input { text-align: center; }
.fk-seta { color: var(--mut); }
.fk-faixa .input-prefix { margin: 0; }
.fk-fator { margin-top: 12px; }
@media (max-width: 480px) { .fk-faixa { grid-template-columns: auto 64px auto minmax(0, 1fr) auto; } .fk-seta { display: none; } }
/* Taxa de entrega: escolha do modo */
.frete-modos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.frete-modos label { position: relative; cursor: pointer; margin: 0; }
.frete-modos input { position: absolute; opacity: 0; pointer-events: none; }
.frete-modos span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; height: 100%; padding: 12px; border-radius: 12px; border: 1.5px solid var(--border); transition: border-color .15s, background .15s; }
.frete-modos span .icon { color: var(--mut); margin-bottom: 4px; }
.frete-modos b { font-size: .9rem; }
.frete-modos small { font-size: .76rem; color: var(--mut); line-height: 1.3; }
.frete-modos input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.frete-modos input:checked + span .icon { color: var(--pri); }
.frete-modos input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 2px; }
.frete-modos .trava { cursor: not-allowed; opacity: .55; }
.frete-painel { animation: funcAbre .2s ease; }
@media (max-width: 560px) { .frete-modos { grid-template-columns: 1fr; } .frete-modos span { flex-direction: row; align-items: center; gap: 10px; } .frete-modos span .icon { margin: 0; } .frete-modos small { margin-left: auto; text-align: right; } }
/* Cupons: formulário que abre pelo botão */
.cupons-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cupons-topo p { margin: 0; }
.cupons-wrap { display: grid; gap: 20px; }
.cupom-form { margin: 0; }
@media (min-width: 1100px) {
    .cupons-wrap.com-form { grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); align-items: start; }
    .cupons-wrap.com-form .cupom-form { position: sticky; top: 90px; }
}
.cupom-form .card-head { margin-bottom: 4px; }
.cupom-form.abrindo { animation: cupomAbre .28s ease; }
@keyframes cupomAbre { from { opacity: 0; transform: translateY(-8px); } }
.cupom-form[hidden] { display: none; }
.empty-state .btn { display: inline-flex; }

/* Assistente de primeiro acesso */
.onb-card { position: relative; border: 1px solid color-mix(in srgb, var(--pri) 30%, var(--border)); background: linear-gradient(160deg, var(--pri-soft), var(--surface) 55%); }
.onb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.onb-top h2 { margin: 0 0 4px; font-size: 1.15rem; }
.onb-top p { margin: 0; }
.onb-prog { --p: 0; flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--pri) calc(var(--p) * 1%), var(--border) 0); position: relative; }
.onb-prog::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.onb-prog b { position: relative; font-size: .9rem; }
.onb-barra { display: none; height: 6px; border-radius: 99px; background: var(--border); margin: 14px 0 4px; overflow: hidden; }
.onb-barra i { display: block; height: 100%; background: var(--pri); border-radius: inherit; transition: width .6s; }
.onb-passos { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.onb-passos li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.onb-passos li.ok { opacity: .7; }
.onb-passos li.ok .onb-txt b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--mut) 60%, transparent); }
.onb-passos li.atual { border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-soft); }
.onb-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--mut); }
.onb-passos li.ok .onb-ico { background: var(--pri); color: #fff; }
.onb-passos li.atual .onb-ico { background: var(--pri-soft); color: var(--pri); }
.onb-txt { flex: 1; min-width: 0; }
.onb-txt b { display: block; font-size: .92rem; }
.onb-txt b em { font-style: normal; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; background: var(--pri); color: #fff; margin-left: 6px; vertical-align: 2px; }
.onb-txt small { color: var(--mut); font-size: .8rem; }
.onb-passos .btn { flex-shrink: 0; }
.onb-ocultar { margin: 10px 0 0; text-align: right; }
.onb-pronto .onb-passos { display: none; }
@media (min-width: 1100px) { .onb-passos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .onb-prog { display: none; } .onb-barra { display: block; } .onb-passos li { flex-wrap: wrap; } .onb-passos .btn { width: 100%; justify-content: center; } }
@media (max-width: 560px) {
    .onb-passos li:not(.atual) .onb-txt small { display: none; }
    .onb-passos li:not(.atual) .btn { width: auto; padding: 6px 10px; }
    .onb-passos li:not(.atual) { flex-wrap: nowrap; }
}
.fk-gkm { display: inline-flex; align-items: center; gap: 6px; } .fk-gkm input { width: 90px; text-align: center; display: inline-block; }

/* Avaliação do cliente no pedido */
.pav { margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border)); background: color-mix(in srgb, #f59e0b 6%, var(--surface)); display: grid; gap: 12px; }
.pav-top { display: flex; align-items: center; gap: 14px; }
.pav-nota { display: flex; align-items: center; gap: 10px; padding-right: 14px; border-right: 1px solid var(--border); }
.pav-nota > b { font-size: 1.7rem; line-height: 1; font-weight: 800; }
.pav-est { color: #f59e0b; font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap; }
.pav-est i { color: var(--border-2); font-style: normal; }
.pav-tit b { display: block; font-size: .92rem; }
.pav-tit small { color: var(--mut); font-size: .8rem; }
.pav-txt { margin: 0; font-size: .95rem; line-height: 1.5; font-style: italic; }
.pav-crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 20px; padding-top: 12px; border-top: 1px dashed var(--border); }
.pav-crit > div { display: grid; grid-template-columns: minmax(0, 1fr) 90px 14px; align-items: center; gap: 10px; font-size: .84rem; }
.pav-crit span { color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pav-barra { height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.pav-barra em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.pav-crit b { text-align: right; }
.pav-foto { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.pav-foto img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; display: block; }
.pav-foto small { display: block; color: var(--mut); font-size: .78rem; margin-bottom: 6px; }
.pav-foto form { margin: 0; }
.pav-vazio { margin: 0; color: var(--mut); font-size: .84rem; }
@media (max-width: 480px) { .pav-top { flex-wrap: wrap; } .pav-nota { border: 0; padding: 0; } }
/* Campos de dinheiro com "R$" */
.money-wrap { position: relative; display: block; width: 100%; }
.money-wrap > .money-sim { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .86rem; font-weight: 600; color: var(--mut); pointer-events: none; }
.money-wrap > input { padding-left: 38px !important; width: 100%; margin-top: 0 !important; }
label > .money-wrap { margin-top: 6px; }
.field > .money-wrap, .bairro-row > .money-wrap, .input-group > .money-wrap { margin-top: 0; }
/* Admin: mapas em cadeia */
.mapa-agora { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 12px; padding: 6px 12px; border-radius: 99px; background: var(--pri-soft); color: var(--pri); font-size: .86rem; }
.mapa-prov { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.mapa-prov.ativo { border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-soft); }
.mapa-prov label:last-child { margin-bottom: 0; }
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.switch-mini { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; color: var(--txt); font-size: .95rem; }
.switch-mini input { width: 18px; height: 18px; margin: 0; accent-color: var(--pri); }
.mapa-prov.desligado { opacity: .6; }
.mapa-prov.desligado:focus-within { opacity: 1; }
/* Relatórios no celular: períodos numa linha, datas lado a lado, espaçamento igual entre os cards */
@media (max-width: 960px) { .rel-g { row-gap: 0; } }
@media (max-width: 760px) {
    .periodo { flex-direction: column; align-items: stretch; }
    .periodo .seg-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; flex-wrap: nowrap; }
    .periodo .seg-tabs a { padding: 8px 2px; text-align: center; font-size: .78rem; white-space: nowrap; }
    .periodo .input-group { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .periodo .data-campo { min-width: 0; }
    .periodo .data-campo span { left: 10px; font-size: .72rem; }
    .periodo .data-campo input { padding-left: 34px !important; padding-right: 6px !important; font-size: .84rem; }
    .periodo .input-group .btn { grid-column: 1 / -1; justify-content: center; }
}
/* ===== Avisos e suporte / Mensagens ===== */
.sup-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sup-top .seg-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.sup-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 800; }
#sup-novo { border: 0; }
#sup-novo.aberto { margin-bottom: 4px; }
.sup-form h2 { font-size: 1.1rem; margin-bottom: 2px; }
.sup-form > p { margin-bottom: 14px; }
.sup-assuntos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
.sup-assuntos input { position: absolute; opacity: 0; pointer-events: none; }
.sup-assuntos span { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: .15s; height: 100%; }
.sup-assuntos span svg { grid-row: span 2; color: var(--mut); }
.sup-assuntos b { font-size: .86rem; }
.sup-assuntos small { font-size: .74rem; color: var(--mut); }
.sup-assuntos input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.sup-assuntos input:checked + span svg { color: var(--pri); }
.sup-form-pe { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sup-btns { display: flex; gap: 8px; }
.sup-anexo { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; color: var(--mut); cursor: pointer; max-width: 260px; }
.sup-anexo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; }
.sup-anexo.tem { color: var(--pri); }
.sup-anexo input, .sup-anexo-b input { display: none; }
.sup-anexo-b.tem { border-color: var(--pri); color: var(--pri); }
.aviso-resp { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--pri); font-size: .78rem; text-decoration: none; }
.aviso-resp:hover { text-decoration: underline; }
.sup-aviso { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: rgba(59, 130, 246, .1); border-bottom: 1px solid var(--border); color: var(--txt); text-decoration: none; }
.sup-aviso > span { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(59, 130, 246, .16); color: #3b82f6; flex-shrink: 0; }
.sup-aviso div { flex: 1; } .sup-aviso b { display: block; font-size: .9rem; } .sup-aviso small { color: var(--mut); font-size: .78rem; }
.sb-badge.sup { background: #3b82f6; }

.sup-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.sup-wrap.com-conversa, .sup-wrap.adm { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
.sup-wrap > .card { margin-bottom: 0; }
.sup-lista { overflow: hidden; }
.sup-it { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--txt); text-decoration: none; position: relative; }
.sup-it:last-child { border-bottom: 0; }
.sup-it:hover { background: var(--surface-2); }
.sup-it.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--pri); }
.sup-it.novo .sup-l1 b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pri); margin-right: 7px; vertical-align: middle; }
.sup-av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--mut); }
.sup-tx { flex: 1; min-width: 0; }
.sup-l1 { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.sup-l1 b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-l1 time { margin-left: auto; font-size: .72rem; color: var(--mut); white-space: nowrap; }
.sup-tx p { font-size: .8rem; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.sup-tag { display: inline-block; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; background: var(--surface-3); color: var(--mut); vertical-align: 1px; white-space: nowrap; }
.c-r { background: rgba(239, 68, 68, .14) !important; color: #ef4444 !important; }
.c-b { background: rgba(59, 130, 246, .14) !important; color: #3b82f6 !important; }
.c-o { background: rgba(249, 115, 22, .14) !important; color: #f97316 !important; }
.c-y { background: rgba(234, 179, 8, .16) !important; color: #ca8a04 !important; }
.c-g, .st-resolvido { background: rgba(34, 197, 94, .14) !important; color: #16a34a !important; }
.st-respondido { background: rgba(59, 130, 246, .14) !important; color: #3b82f6 !important; }
.st-aberto { background: rgba(249, 115, 22, .14); color: #ea580c; }
.sup-conv { display: flex; flex-direction: column; min-height: 520px; max-height: calc(100vh - 140px); overflow: hidden; position: sticky; top: 84px; }
.sup-conv-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sup-conv-h > div:not(.sup-acts) { flex: 1; min-width: 180px; }
.sup-conv-h b { display: block; font-size: 1rem; }
.sup-conv-h small { color: var(--mut); font-size: .78rem; }
.sup-voltar { display: none; }
.sup-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sup-acts form { margin: 0; }
.sup-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.sup-info div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 8px 11px; min-width: 0; }
.sup-info span { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--mut); margin-bottom: 2px; }
.sup-info b { font-size: .82rem; display: block; overflow-wrap: anywhere; }
.sup-info b.perigo { color: #ef4444; }
.sup-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.sup-m { max-width: 78%; padding: 11px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.sup-m.ele { background: var(--surface-2); border: 1px solid var(--border); border-top-left-radius: 4px; align-self: flex-start; }
.sup-m.eu { background: var(--pri-soft); border: 1px solid color-mix(in srgb, var(--pri) 30%, transparent); border-top-right-radius: 4px; align-self: flex-end; }
.sup-m.nota { background: rgba(234, 179, 8, .1); border: 1px dashed rgba(234, 179, 8, .5); align-self: center; max-width: 90%; }
.sup-m small { display: block; font-size: .7rem; color: var(--mut); margin-top: 5px; }
.sup-img img { display: block; max-width: 240px; max-height: 220px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--border); }
.sup-sys { align-self: center; font-size: .74rem; color: var(--mut); }
.sup-resp { border-top: 1px solid var(--border); padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.sup-resp textarea { width: 100%; resize: vertical; min-height: 54px; }
.sup-resp-b { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.sup-para { display: flex; align-items: center; gap: 8px; margin: 0 auto 0 0; font-size: .8rem; font-weight: 700; color: var(--mut); }
.sup-para select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: .84rem; max-width: 330px; }
.sup-fechado { flex-direction: row; justify-content: space-between; align-items: center; }
.sup-fechado span { display: inline-flex; align-items: center; gap: 6px; }
.msg-filtros { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.msg-filtros .seg-tabs { display: flex; flex-wrap: wrap; }
.msg-filtros .seg-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; font-size: .78rem; }
.msg-busca { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 11px; padding: 0 12px; color: var(--mut); margin: 0; }
.msg-busca input { border: 0 !important; background: none !important; box-shadow: none !important; padding: 9px 0 !important; min-height: 0; flex: 1; font-size: .84rem; }
.sup-vazio { min-height: 300px; display: grid; place-items: center; }
@media (max-width: 1100px) { .sup-assuntos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
    .sup-wrap.com-conversa, .sup-wrap.adm { grid-template-columns: minmax(0, 1fr); }
    .sup-wrap.com-conversa .sup-lista, .sup-wrap.adm .sup-vazio { display: none; }
    .sup-voltar { display: grid; }
    .sup-conv { position: static; max-height: none; min-height: 0; }
    .sup-msgs { max-height: 60vh; }
    .sup-m { max-width: 90%; }
    .sup-para { width: 100%; } .sup-para select { flex: 1; max-width: none; }
}
@media (max-width: 520px) { .sup-assuntos { grid-template-columns: 1fr; } .sup-top .btn { width: 100%; justify-content: center; } .sup-top .seg-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; } .sup-top .seg-tabs a { justify-content: center; } }
.sup-assuntos label { position: relative; min-width: 0; } .sup-assuntos input { left: 0; top: 0; width: 1px; height: 1px; }
.toast.sup-toast { text-decoration: none; cursor: pointer; } [data-theme="dark"] .toast.sup-toast { color: #0f172a; } .toast.sup-toast:not([data-x]) { color: #fff; } [data-theme="dark"] .toast.sup-toast { color: #0f172a; }
/* Mensagens (admin): abas numa linha só, sem quebrar palavra */
.sup-wrap.adm { grid-template-columns: minmax(330px, 440px) minmax(0, 1fr); }
.msg-filtros .seg-tabs { display: grid; width: 100%; grid-template-columns: repeat(5, auto); justify-content: stretch; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.msg-filtros .seg-tabs::-webkit-scrollbar { display: none; }
.msg-filtros .seg-tabs a { white-space: nowrap; justify-content: center; padding: 6px 8px; font-size: .76rem; }
@media (max-width: 900px) { .sup-wrap.adm { grid-template-columns: minmax(0, 1fr); } }
.sup-wrap.adm.so-lista { grid-template-columns: minmax(0, 1fr); }
.sup-wrap.adm.so-lista .msg-filtros { flex-direction: row; align-items: center; flex-wrap: wrap; }
.sup-wrap.adm.so-lista .msg-filtros .seg-tabs { width: auto; }
.sup-wrap.adm.so-lista .msg-busca { flex: 1; min-width: 240px; }
@media (max-width: 520px) {
    .msg-filtros .seg-tabs { width: 100%; grid-template-columns: repeat(5, auto); justify-content: space-between; }
    .msg-filtros .seg-tabs a { padding: 7px 5px; font-size: .7rem; }
}
@media (max-width: 380px) { .msg-filtros .seg-tabs a { padding: 7px 3px; font-size: .66rem; } .msg-filtros { padding: 10px; } }
/* Menu lateral: cada ícone com a sua cor (só o ícone principal, não o cadeado) */
.sb-link > .icon, .sb-link:hover > .icon, .sb-link.active > .icon, [data-theme="dark"] .sb-link.active > .icon { color: var(--ic, var(--mut)); }
.sb-link > .icon { padding: 5px; width: 28px !important; height: 28px !important; border-radius: 8px; background: color-mix(in srgb, var(--ic, transparent) 13%, transparent); flex-shrink: 0; box-sizing: border-box; }
.sb-link.active > .icon { background: color-mix(in srgb, var(--ic, transparent) 22%, transparent); }
[data-theme="dark"] .sb-link > .icon { color: color-mix(in srgb, var(--ic, var(--mut)) 85%, #fff); }
.tag.tag-atend { background: rgba(99, 102, 241, .14); color: #6366f1; }
.ped-alerta.ped-atend { background: rgba(99, 102, 241, .1); color: var(--txt); align-items: center; flex-wrap: wrap; }
.ped-alerta.ped-atend > svg { color: #6366f1; }
.ped-alerta.ped-atend form { margin: 0 0 0 auto; }
.ped-alerta.ped-atend { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-size: .9rem; }
