:root {
    --bg: #f7f4f3;
    --surface: #ffffff;
    --surface-2: #fbf7f6;
    --line: #eadfdd;
    --line-strong: #dccbc8;
    --ink: #2a1715;
    --ink-2: #4d3835;
    --muted: #85716d;
    --primary: #c62828;
    --primary-dark: #8e1b1b;
    --primary-soft: #fdeaea;
    --accent: #f0b429;
    --danger: #c0392b;
    --danger-soft: #fdecea;
    --warning: #9a6200;
    --warning-soft: #fff4d6;
    --success: #0b7a4b;
    --success-soft: #e2f6eb;
    --info: #1d5fa8;
    --info-soft: #e7f0fb;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(42, 23, 21, .04), 0 10px 30px -18px rgba(42, 23, 21, .25);
    --shadow-lg: 0 24px 60px -24px rgba(42, 23, 21, .35);
    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.22; letter-spacing: -.015em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

.hp-field { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.only-mobile { display: none !important; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: linear-gradient(140deg, var(--primary) 0%, #7f1414 100%);
    color: #fff; font-weight: 800; font-size: .82rem; letter-spacing: .02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
    flex: 0 0 auto;
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .74rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-center { margin-bottom: 22px; }

/* Botões */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 10px 16px; font: inherit; font-weight: 600; font-size: .9rem;
    cursor: pointer; transition: .18s ease; white-space: nowrap;
    background: var(--surface); color: var(--ink);
    text-decoration: none; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { flex: 0 0 auto; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -12px rgba(198,40,40,.7); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(198,40,40,.08); color: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #08613d; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #7d5000; color: #fff; }
.btn-sm { padding: 7px 11px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid transparent; background: transparent; border-radius: 9px;
    color: var(--ink-2); cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: rgba(198,40,40,.08); color: var(--primary-dark); }

/* Formulários */
form { margin: 0; }
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field > label, .field-label { font-weight: 600; font-size: .84rem; color: var(--ink-2); }
.field .required { color: var(--danger); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], input[type="url"],
select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm); font: inherit; color: var(--ink);
    background: #fff; transition: .15s; min-height: 42px;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(198,40,40,.18); border-color: var(--primary);
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a4928e; }
.hint { font-size: .78rem; color: var(--muted); }
.error-text { font-size: .8rem; color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 8px; }
.checkline { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; cursor: pointer; }
.checkline input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }
.input-group .btn { flex: 0 0 auto; }
.input-prefix { position: relative; }
.input-prefix span {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: .85rem; font-weight: 600;
}
.input-prefix input { padding-left: 38px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; }
legend { padding: 0 8px; font-weight: 700; font-size: .88rem; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: .83rem; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-link { font-size: .83rem; font-weight: 600; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
    border-radius: 999px; font-size: .72rem; font-weight: 700;
    letter-spacing: .02em; white-space: nowrap; line-height: 1.5;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: #f3ecea; color: #5f4a46; }
.badge-dark { background: #3b2724; color: #fff; }

/* Flash */
.flash {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 14px;
    font-size: .88rem; background: var(--surface);
}
.flash-icon { flex: 0 0 auto; margin-top: 1px; }
.flash-success { background: var(--success-soft); border-color: #b9e6cc; color: #075c39; }
.flash-danger { background: var(--danger-soft); border-color: #f3c7c2; color: #8f2b21; }
.flash-warning { background: var(--warning-soft); border-color: #f2dfaa; color: #775000; }
.flash-info { background: var(--info-soft); border-color: #c3d9f2; color: #174b85; }
.flash-text { flex: 1; }
.flash-close { border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: .7; line-height: 1; padding: 0 2px; }

/* Tabelas */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.data-table th {
    text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); font-weight: 700; padding: 11px 16px;
    border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdf7f6; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .actions { text-align: right; white-space: nowrap; }
.data-table .actions form { display: inline; }
.table-product { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.thumb {
    width: 42px; height: 42px; border-radius: 8px; object-fit: cover;
    background: var(--surface-2); border: 1px solid var(--line); flex: 0 0 auto;
}
.thumb-placeholder { display: grid; place-items: center; color: var(--muted); }
.product-name { font-weight: 600; }
.product-meta { color: var(--muted); font-size: .76rem; }

/* Layout administrativo */
.app-body { background: var(--bg); }
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 252px; flex: 0 0 252px; background: #2a1715; color: #e9d9d6;
    padding: 20px 14px; display: flex; flex-direction: column; gap: 20px;
    position: sticky; top: 0; height: 100vh; z-index: 40;
}
.sidebar .brand { color: #fff; padding: 0 6px; }
.sidebar .brand-text small { color: #a4928e; }
.side-nav { display: grid; gap: 3px; }
.nav-label {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .14em;
    color: #8d7975; font-weight: 800; padding: 4px 12px 7px;
}
.nav-link {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-radius: 9px; color: #cdbbb7; font-size: .9rem; font-weight: 600;
    transition: .15s;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.is-active { background: rgba(246, 200, 95, .14); color: #f6c85f; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .btn-ghost { color: #cdbbb7; }
.sidebar-foot .btn-ghost:hover { background: rgba(255,255,255,.07); color: #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px; min-width: 0; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: .78rem;
    flex: 0 0 auto; letter-spacing: .02em;
}
.avatar-sm { width: 32px; height: 32px; font-size: .7rem; }
.user-meta { display: grid; line-height: 1.2; min-width: 0; }
.user-meta strong { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: .7rem; color: #a4928e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: 14px; padding: 15px 28px;
    background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px);
}
.topbar-title { font-weight: 700; font-size: 1.05rem; flex: 1; letter-spacing: -.01em; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.content { padding: 26px 28px 60px; width: 100%; max-width: 1420px; margin: 0 auto; }
.sidebar-backdrop { display: none; }

/* Cabeçalho de página */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; margin: 0 0 3px; }
.page-head p { margin: 0; color: var(--muted); font-size: .88rem; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }

/* Grids e estatísticas */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.split-reverse { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.65fr); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 13px; align-items: flex-start;
}
.stat-icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary-dark); flex: 0 0 auto;
}
.stat-icon.warn { background: var(--warning-soft); color: var(--warning); }
.stat-icon.info { background: var(--info-soft); color: var(--info); }
.stat-icon.dark { background: #efe5e2; color: #4d3835; }
.stat-value { font-size: 1.55rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { font-size: .76rem; color: var(--muted); font-weight: 600; }

/* Toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search-input { flex: 1; min-width: 220px; position: relative; }
.toolbar .search-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search-input input { padding-left: 36px; }
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #f1e7e4; padding: 4px; border-radius: 10px; }
.filter-tabs a { padding: 6px 11px; border-radius: 7px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.filter-tabs a:hover { color: var(--primary-dark); }
.filter-tabs a.is-active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Estados vazios */
.empty-state { text-align: center; padding: 46px 22px; color: var(--muted); }
.empty-state-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 14px; color: #96827e; }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }
.empty-state p { max-width: 420px; margin: 0 auto 16px; font-size: .88rem; }

/* Cotações */
.quote-list { display: grid; gap: 12px; }
.quote-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 16px; align-items: center;
    transition: .16s;
}
.quote-card:hover { border-color: #e0b9b5; box-shadow: 0 10px 26px -20px rgba(42,23,21,.5); }
.quote-card-main { flex: 1; min-width: 0; }
.quote-card h3 { margin: 0 0 4px; font-size: 1rem; }
.quote-card-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .78rem; }
.quote-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.quote-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.progress { height: 6px; border-radius: 999px; background: #f1e7e4; overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.progress-line { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); }

.quote-hero {
    background: linear-gradient(135deg, #2a1715, #8e1b1b 80%);
    color: #f7e3e2; border-radius: var(--radius); padding: 24px;
    margin-bottom: 18px; box-shadow: var(--shadow-lg);
}
.quote-hero h1 { color: #fff; font-size: 1.6rem; margin-bottom: 6px; }
.quote-hero p { color: #d2b5b2; margin: 0; }
.quote-hero-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.quote-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: .82rem; color: #dcc5c2; }
.quote-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.quote-hero .badge { background: rgba(255,255,255,.14); color: #fff; }
.quote-code { font-size: .74rem; letter-spacing: .08em; color: #b99a96; text-transform: uppercase; font-weight: 700; }

.quote-item {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) 120px 120px 140px;
    gap: 14px; align-items: start; padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.quote-item:last-child { border-bottom: 0; }
.quote-item-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quote-item-name { font-weight: 600; }
.quote-item-meta { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.quote-item-qty { font-size: .8rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 7px; white-space: nowrap; }
.quote-item .thumb { width: 52px; height: 52px; }
.quote-item .field { margin-bottom: 0; gap: 4px; }
.quote-item .field > label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.quote-item input[type="text"], .quote-item select { min-height: 38px; padding: 8px 10px; font-size: .88rem; }
.quote-item .unavailable-row { grid-column: 2 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.quote-item.is-unavailable { background: #fdf9f8; }
.quote-item.is-unavailable .price-field { opacity: .45; pointer-events: none; }

.quote-total-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    background: var(--surface); border: 1px solid var(--line); border-top: 0;
    padding: 16px 18px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 10;
    border-radius: 0 0 var(--radius) var(--radius);
}
.quote-total-bar .total { font-size: .85rem; color: var(--muted); }
.quote-total-bar .total strong { font-size: 1.3rem; color: var(--ink); display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Comparativo */
.compare-table { min-width: 760px; }
.compare-table th, .compare-table td { text-align: center; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table .best-price { background: var(--success-soft); }
.compare-table .best-price strong { color: var(--success); }
.compare-table .no-price { color: #a79793; }
.compare-table tfoot td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--line-strong); }
.price-cell strong { display: block; font-variant-numeric: tabular-nums; }
.price-cell small { color: var(--muted); font-size: .72rem; }
.winner-banner {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: var(--success-soft); border: 1px solid #b9e6cc; color: #075c39;
    border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem;
}
.winner-banner strong { font-weight: 800; }

/* Compartilhamento */
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.share-card {
    display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
    background: var(--surface); color: var(--ink); transition: .16s;
}
.share-card:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--ink); }
.share-card .share-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }
.share-card.wa .share-icon { background: #e4f8ec; color: #128c4a; }
.share-card.mail .share-icon { background: var(--info-soft); color: var(--info); }
.share-card.sms .share-icon { background: var(--warning-soft); color: var(--warning); }
.share-card strong { font-size: .9rem; }
.share-card small { color: var(--muted); font-size: .76rem; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, monospace; font-size: .8rem; background: var(--surface-2); }
.share-message {
    white-space: pre-wrap; background: var(--surface-2); border: 1px dashed var(--line-strong);
    padding: 13px 15px; border-radius: var(--radius-sm); font-size: .84rem; color: var(--ink-2);
    max-height: 220px; overflow: auto;
}

/* Fornecedores / convites */
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.invite-row:last-child { border-bottom: 0; }
.invite-main { display: flex; gap: 11px; align-items: center; min-width: 0; }
.invite-main strong { display: block; font-size: .9rem; }
.invite-main small { color: var(--muted); font-size: .76rem; display: block; }
.invite-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.check-supplier { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.check-supplier:hover { border-color: #e0b9b5; }
.check-supplier input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Scanner */
.scan-dialog { border: 0; border-radius: 16px; padding: 0; width: min(500px, calc(100% - 24px)); box-shadow: var(--shadow-lg); }
.scan-dialog::backdrop { background: rgba(7, 20, 15, .62); backdrop-filter: blur(2px); }
.scan-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.scan-header h3 { margin: 0; font-size: 1rem; }
.scan-body { padding: 18px; }
.scan-video-wrap { position: relative; background: #0a1512; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.scan-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 16% 10%; border: 2px solid rgba(246, 200, 95, .9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.scan-status { font-size: .84rem; color: var(--muted); text-align: center; margin: 12px 0 0; min-height: 20px; }
.scan-status.is-ok { color: var(--success); font-weight: 700; }
.scan-status.is-warn { color: #8f5b00; }
.scan-frame { border-color: rgba(229, 57, 53, .95); transition: border-color .2s, box-shadow .2s; }
.scan-laser { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff3b30; box-shadow: 0 0 10px 2px rgba(255,59,48,.75); opacity: 0; }
.scan-video-wrap.is-live .scan-laser { opacity: 1; animation: scan-laser 1.6s ease-in-out infinite; }
.scan-video-wrap.is-hit .scan-frame { border-color: #2ecc71; box-shadow: 0 0 0 999px rgba(0,0,0,.25), 0 0 24px rgba(46,204,113,.8) inset; }
.scan-video-wrap.is-hit .scan-laser { opacity: 0; animation: none; }
@keyframes scan-laser { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
.scan-engine { position: absolute; left: 10px; bottom: 10px; font-size: .68rem; color: rgba(255,255,255,.75); background: rgba(0,0,0,.4); padding: 2px 7px; border-radius: 99px; }
.scan-engine:empty { display: none; }
.scan-torch { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.scan-torch.is-on { background: #f6c85f; color: #3a2a00; }
.scan-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.scan-controls select { flex: 1 1 180px; font-size: .82rem; padding: 7px 10px; }
.scan-zoom { flex: 1 1 160px; display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.scan-zoom input { flex: 1; accent-color: var(--primary); }
.scan-product { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 10px; border: 1px solid #b9e6cc; background: var(--success-soft); border-radius: var(--radius-sm); font-size: .84rem; }
.scan-product img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; }
input.is-loading { background-image: linear-gradient(90deg, transparent, rgba(198,40,40,.12), transparent); background-size: 200% 100%; animation: input-loading 1s linear infinite; }
@keyframes input-loading { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.scan-manual { display: flex; gap: 8px; margin-top: 14px; }

/* Instalador */
.install-card { max-width: 760px; margin: 0 auto; }
.install-section + .install-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.install-section h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.step-num {
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark);
    display: inline-grid; place-items: center; font-size: .76rem; font-weight: 800;
}
.requirement { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-2); }
.requirement .ok { color: var(--success); }
.requirement .bad { color: var(--danger); }

.install-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.install-step { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.install-step-num { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .74rem; background: var(--surface-2); border: 1px solid var(--line); }
.install-step.is-current { color: var(--ink); font-weight: 700; border-color: var(--primary); }
.install-step.is-current .install-step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.install-step.is-done { color: var(--ink-2); border-color: var(--success); }
.install-step.is-done .install-step-num { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.install-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.install-actions-right { display: flex; gap: 10px; flex-wrap: wrap; }
.req-list { display: grid; gap: 8px; }
.req-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.req-item .req-icon { margin-top: 1px; }
.req-item.is-ok .req-icon { color: var(--success); }
.req-item.is-bad { border-color: #f3c7c2; background: var(--danger-soft); }
.req-item.is-bad .req-icon { color: var(--danger); }
.req-item.is-warn .req-icon { color: var(--warning, #b07a00); }
.req-text { display: grid; gap: 2px; font-size: .86rem; }
.req-text small { color: var(--muted); font-size: .76rem; font-weight: 400; }
.install-summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: .88rem; }
.install-summary dt { color: var(--muted); font-weight: 600; }
.install-summary dd { margin: 0; word-break: break-all; }
@media (max-width: 640px) {
    .install-step-label { display: none; }
    .install-step { justify-content: center; }
    .install-actions, .install-actions-right { flex-direction: column-reverse; align-items: stretch; }
    .install-actions .btn { width: 100%; }
}

/* Auth */
.blank-body {
    min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
    background:
        radial-gradient(1000px 520px at 15% -10%, #f5dfde 0%, transparent 60%),
        radial-gradient(800px 480px at 100% 10%, #fdf1e8 0%, transparent 55%),
        var(--bg);
}
.blank-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: stretch; }
.blank-wrap.wide { max-width: 780px; }
.blank-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    padding: 28px; box-shadow: var(--shadow-lg);
}
.blank-footer { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.blank-footer a { color: var(--muted); }
.blank-footer a:hover { color: var(--primary); }
.auth-head { margin-bottom: 20px; }
.auth-head h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-head p { color: var(--muted); font-size: .87rem; margin: 0; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .76rem; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; margin-top: 14px; }
.inline-note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .82rem; color: var(--ink-2); }

/* Portal fornecedor */
.supplier-body { background: #faf6f5; display: flex; flex-direction: column; min-height: 100vh; }
.supplier-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.supplier-header-inner { display: flex; align-items: center; gap: 20px; padding-block: 12px; }
.supplier-nav { display: flex; gap: 4px; flex: 1; margin-left: 18px; }
.supplier-nav .nav-link { color: var(--muted); padding: 7px 11px; font-size: .85rem; }
.supplier-nav .nav-link:hover { background: var(--surface-2); color: var(--primary-dark); }
.supplier-nav .nav-link.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.supplier-user { display: flex; align-items: center; gap: 10px; }
.supplier-user .user-meta strong { max-width: 170px; }
.supplier-user .user-meta small { max-width: 170px; color: var(--muted); }
.supplier-main { flex: 1; padding: 28px 0 56px; }
.supplier-footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .78rem; background: var(--surface); }
.portal-head { margin-bottom: 20px; }
.portal-head h1 { font-size: 1.5rem; margin: 0 0 3px; }
.portal-head p { color: var(--muted); margin: 0; font-size: .88rem; }
.status-strip {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px;
    border-radius: var(--radius-sm); background: var(--warning-soft); color: #775000;
    font-size: .84rem; border: 1px solid #f2dfaa; margin-bottom: 18px;
}
.status-strip.success { background: var(--success-soft); border-color: #b9e6cc; color: #075c39; }

/* Página pública */
.public-body { background: var(--surface); }
.public-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
.public-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.public-nav { display: flex; align-items: center; gap: 20px; font-size: .87rem; font-weight: 600; }
.public-nav > a { color: var(--ink-2); }
.public-nav > a:hover { color: var(--primary); }
.public-nav .btn { color: #fff; }
.public-nav .btn-ghost { color: var(--ink-2); }
.hero { padding: 74px 0 66px; background: radial-gradient(800px 400px at 82% 0%, #fbe3e1 0%, transparent 70%), radial-gradient(700px 380px at 0% 100%, #fdf1e8 0%, transparent 60%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; background: var(--primary-soft); color: var(--primary-dark); padding: 5px 11px; border-radius: 999px; font-size: .75rem; font-weight: 700; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero p.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 540px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; margin-top: 18px; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.hero-points span { display: inline-flex; align-items: center; gap: 6px; }
.hero-points svg { color: var(--primary); }

.portal-grid { display: grid; gap: 16px; }
.portal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.portal-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.portal-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); margin-bottom: 16px; }
.portal-label { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.portal-card h2 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -.01em; }
.portal-card p { color: var(--muted); font-size: .87rem; line-height: 1.55; margin-bottom: 18px; }
.portal-card .btn { margin-top: 2px; }
.portal-sub { display: block; margin-top: 13px; font-size: .78rem; color: var(--muted); text-align: center; }
.portal-card.is-admin { background: linear-gradient(150deg, #7f1414, #38100f); border-color: transparent; color: #fdf1ef; }
.portal-card.is-admin::before { background: linear-gradient(90deg, var(--accent), #f7e3e2); }
.portal-card.is-admin .portal-icon { background: rgba(255,255,255,.14); color: #fff; }
.portal-card.is-admin .portal-label { color: #e7c8c3; }
.portal-card.is-admin h2 { color: #fff; }
.portal-card.is-admin p { color: #e7c8c3; }
.portal-card.is-admin .portal-sub { color: #d9b5af; }
.portal-card.is-admin .btn-secondary { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.portal-card.is-admin .btn-secondary:hover { background: rgba(255,255,255,.2); color: #fff; }
.hero-art { position: relative; }
.hero-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow-lg); padding: 18px; transform: rotate(-1.2deg);
}
.hero-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: .8rem; color: var(--muted); }
.hero-card-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .82rem; }
.hero-card-row:last-child { border-bottom: 0; }
.hero-card-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.hero-card-row .pill { margin-left: auto; font-weight: 700; color: var(--success); font-size: .78rem; }
.hero-float {
    position: absolute; right: -10px; bottom: -24px; background: #2a1715; color: #f7e3e2;
    border-radius: 13px; padding: 12px 16px; font-size: .78rem; box-shadow: var(--shadow-lg);
    display: flex; gap: 9px; align-items: center;
}
.hero-float strong { color: #f6c85f; font-size: 1rem; display: block; line-height: 1.1; }
.section { padding: 68px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 620px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; margin-bottom: 14px; }
.feature h3 { font-size: .98rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .85rem; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.step::before {
    counter-increment: step; content: counter(step);
    width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
    display: grid; place-items: center; font-size: .78rem; font-weight: 800; margin-bottom: 12px;
}
.step h3 { font-size: .92rem; margin-bottom: 5px; }
.step p { color: var(--muted); font-size: .82rem; margin: 0; }
.cta-band { background: linear-gradient(135deg, #2a1715, #8e1b1b); color: #f7e3e2; border-radius: 20px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 4px; }
.cta-band p { color: #d2b5b2; margin: 0; }
.cta-band .btn-secondary { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }
.public-footer { border-top: 1px solid var(--line); padding: 28px 0; background: var(--surface); }
.public-footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.public-footer-inner p { margin: 3px 0 0; }
.public-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.public-footer-links a { color: var(--muted); }

/* Util */
.list-clean { list-style: none; margin: 0; padding: 0; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 7px; flex: 0 0 auto; }
.timeline-item strong { display: block; font-size: .82rem; }
.timeline-item small { color: var(--muted); }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: .86rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }
.notice { display: flex; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--radius-sm); font-size: .82rem; color: var(--ink-2); }
.notice svg { flex: 0 0 auto; margin-top: 1px; color: var(--muted); }
.barcode { font-family: ui-monospace, monospace; font-size: .76rem; color: var(--muted); }
.danger-zone { border-color: #f3c7c2; }
.danger-zone .card-head { border-color: #f3c7c2; background: #fffafa; }

/* Responsivo */
@media (max-width: 1100px) {
    .grid-4, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split, .split-reverse { grid-template-columns: 1fr; }
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-art { max-width: 480px; }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
        transition: transform .22s ease; box-shadow: var(--shadow-lg); height: 100dvh;
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(9,25,19,.45); z-index: 35; }
    .sidebar-backdrop.is-open { display: block; }
    .only-mobile { display: inline-grid !important; }
    .only-desktop { display: none !important; }
    .content { padding: 20px 18px 60px; }
    .topbar { padding: 12px 16px; }
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .grid-2, .grid-3, .grid-4, .stat-grid, .form-grid, .check-grid, .share-grid { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; }
    .page-head-actions { width: 100%; }
    .page-head-actions .btn { flex: 1; }
    .quote-item { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
    .quote-item > .price-field, .quote-item > .brand-field, .quote-item > .note-field { grid-column: 2 / -1; }
    .quote-item .thumb { width: 44px; height: 44px; }
    .quote-total-bar { position: static; }
    .quote-total-bar .btn { flex: 1; }
    .supplier-nav { display: none; }
    .supplier-user .user-meta.only-desktop { display: none; }
    .hero { padding: 48px 0 44px; }
    .hero-float { position: static; margin-top: 16px; width: max-content; }
    .section { padding: 46px 0; }
    .features, .steps { grid-template-columns: 1fr; }
    .cta-band { padding: 26px; }
    .container { width: min(100% - 28px, 1180px); }
    .public-nav > a:not(.btn) { display: none; }
    .blank-card { padding: 22px; }
    .dl { grid-template-columns: 1fr; gap: 3px; }
    .dl dt { margin-top: 7px; }
    .topbar-actions .btn-ghost { display: none; }
    .data-table { min-width: 560px; }
}

@media (max-width: 460px) {
    .public-nav .btn-ghost { display: none; }
    .brand-text small { max-width: 120px; }
    .quote-card { flex-direction: column; align-items: stretch; }
    .quote-card-side { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media print {
    .sidebar, .topbar, .supplier-header, .supplier-footer, .btn, .flash { display: none !important; }
    body { background: #fff; }
    .content, .supplier-main { padding: 0; }
    .card { box-shadow: none; }
}

summary::-webkit-details-marker { display: none; }
summary { outline-offset: 3px; }

.brand-mark.has-logo {
    background: #fff;
    padding: 4px;
    border: 1px solid var(--line);
    box-shadow: none;
}
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Gráficos do dashboard */
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .72rem; color: var(--muted); font-weight: 600; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; flex: 0 0 auto; }
.chart-dot.is-quotes { background: var(--primary); }
.chart-dot.is-responses { background: var(--accent); }
.chart-bars { display: flex; align-items: stretch; gap: 10px; height: 178px; padding-top: 8px; }
.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.chart-stack { display: flex; align-items: flex-end; justify-content: center; gap: 5px; width: 100%; height: 148px; }
.chart-bar { width: clamp(10px, 22%, 18px); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); min-height: 0; }
.chart-bar.is-response { background: linear-gradient(180deg, #f6c85f, var(--accent)); }
.chart-col small { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.status-chart { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.status-donut { width: 142px; height: 142px; border-radius: 50%; position: relative; flex: 0 0 auto; }
.status-donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--surface); }
.status-donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 1; line-height: 1.1; }
.status-donut-center strong { display: block; font-size: 1.35rem; font-weight: 800; }
.status-donut-center small { font-size: .66rem; color: var(--muted); }
.status-legend { display: grid; gap: 7px; flex: 1; min-width: 150px; font-size: .8rem; }
.status-legend-row { display: flex; align-items: center; gap: 8px; }
.status-legend-row span { color: var(--ink-2); flex: 1; }
.status-legend-row strong { font-variant-numeric: tabular-nums; }
.saving-box { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); }
.saving-box small { display: block; font-size: .72rem; font-weight: 600; }
.saving-box strong { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.hbar-list { display: grid; gap: 12px; }
.hbar-head { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; margin-bottom: 5px; }
.hbar-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* Negociação de preços */
.compare-negotiate { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: .69rem; font-weight: 700; color: var(--primary-dark); text-transform: none; letter-spacing: 0; }
.compare-negotiate:hover { color: var(--primary); text-decoration: underline; }
.negotiated-price { color: var(--success) !important; font-weight: 700; }
.gap-value { color: var(--danger); font-weight: 800; }
.target-input { max-width: 125px; text-align: right; }

/* Configurações em abas */
.settings-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.settings-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: .86rem; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.settings-tab:hover { color: var(--ink); }
.settings-tab.is-active { color: var(--primary-dark); border-color: var(--primary); }
.tabs-ready .settings-panel { display: none; }
.tabs-ready .settings-panel.is-active { display: block; }
.settings-panel .card { max-width: 860px; }
.settings-actions { max-width: 860px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); padding: 18px 0 12px; z-index: 5; }
.test-box { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.test-box input { flex: 1 1 220px; }
@media (max-width: 640px) { .settings-tab span { display: none; } .settings-tab { padding: 10px 12px; } }
.direct-send { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.direct-send-label { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-right: auto; }
.direct-send form { display: inline; }

/* ==================================================================
   Página inicial — modelos de entrada (abas e tela dividida)
   ================================================================== */
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #000; color: #fff; }
.entry-body { min-height: 100vh; background: var(--bg); }
.entry-brand { display: flex; align-items: center; gap: 12px; }
.entry-brand .brand-mark { width: 46px; height: 46px; }
.entry-brand strong { display: block; font-size: 1.08rem; line-height: 1.2; }
.entry-brand small { color: var(--muted); font-size: .8rem; }
.entry-welcome { color: var(--ink-2); margin: 12px 0 0; font-size: .92rem; }
.entry-sub { color: var(--muted); font-size: .88rem; margin: 0 0 16px; }
.entry-foot { text-align: center; font-size: .82rem; color: var(--muted); margin: 14px 0 0; }
.entry-legal { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: .76rem; margin-top: 22px; }
.entry-form .field { margin-bottom: 14px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.pass-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pass-toggle:hover, .pass-toggle.is-on { color: var(--ink); background: var(--surface-2); }
.entry-continue { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 14px; }
.entry-continue strong { display: block; }
.entry-continue small { color: var(--muted); }
.entry-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* Modelo 1 — abas */
.entry-tabs-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background:
    radial-gradient(1200px 500px at 50% -10%, var(--primary-soft), transparent 70%), var(--bg); }
.entry-tabs-wrap { width: 100%; max-width: 430px; }
.entry-tabs-wrap > .entry-brand { justify-content: center; margin-bottom: 18px; }
.entry-tabs-wrap > .entry-welcome { text-align: center; margin: -6px 0 16px; }
.entry-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; }
.entry-card h1 { font-size: 1.35rem; margin: 6px 0 4px; }
.entry-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.entry-switch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .86rem; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.entry-switch-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.entry-switch-btn[data-entry-tab="supplier"].is-active { color: var(--primary-dark); }
[data-entry-tabs].is-ready .entry-pane { display: none; }
[data-entry-tabs].is-ready .entry-pane.is-active { display: block; animation: entry-fade .2s ease; }
@keyframes entry-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Modelo 2 — tela dividida */
.entry-split { min-height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; max-width: 1080px; margin: 0 auto; }
.entry-split-top { text-align: center; margin-bottom: 18px; }
.entry-split-top .entry-brand { justify-content: center; }
.entry-split-flash:empty { display: none; }
.entry-split-flash { max-width: 760px; margin: 0 auto 12px; width: 100%; }
.entry-split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; flex: 1; align-items: stretch; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.entry-side { padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; }
.entry-side.is-supplier { background: var(--surface); }
.entry-side.is-admin { background: #241412; color: #f5ecea; }
.entry-side.is-admin .entry-sub, .entry-side.is-admin .entry-foot, .entry-side.is-admin label { color: #c9b5b1; }
.entry-side.is-admin input { background: #2f1c1a; border-color: #4a3330; color: #fff; }
.entry-side.is-admin input::placeholder { color: #8f7a76; }
.entry-side.is-admin .pass-toggle { color: #c9b5b1; }
.entry-side.is-admin .pass-toggle:hover { background: #3a2522; color: #fff; }
.entry-side.is-admin .btn-dark { background: var(--accent); border-color: var(--accent); color: #2a1715; }
.entry-side.is-admin .btn-dark:hover { filter: brightness(1.05); }
.entry-side.is-focus { box-shadow: inset 0 0 0 3px var(--primary); }
.entry-side-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.entry-side-head h2 { margin: 0; font-size: 1.3rem; }
.entry-side-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 50px; }
.entry-side.is-admin .entry-side-icon { background: rgba(240,180,41,.15); color: var(--accent); }
.entry-side-kicker { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--primary); }
.entry-side.is-admin .entry-side-kicker { color: var(--accent); }
@media (max-width: 760px) {
    .entry-split-grid { grid-template-columns: 1fr; border-radius: 16px; }
    .entry-side { padding: 26px 20px; }
}

/* Escolha do modelo nas configurações */
.layout-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.layout-option { position: relative; display: block; border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: var(--surface); }
.layout-option input { position: absolute; opacity: 0; }
.layout-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.layout-option strong { display: block; font-size: .86rem; margin-top: 8px; }
.layout-option small { color: var(--muted); font-size: .75rem; line-height: 1.35; display: block; }
.layout-thumb { height: 86px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.layout-thumb i { display: block; border-radius: 4px; }
.thumb-tabs i.card { width: 56%; height: 90%; background: #fff; border: 1px solid var(--line); position: relative; }
.thumb-tabs i.card::before { content: ""; position: absolute; left: 10%; right: 10%; top: 12%; height: 14%; border-radius: 3px; background: linear-gradient(90deg, var(--primary) 50%, var(--line) 50%); }
.thumb-tabs i.card::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 14%; height: 14%; border-radius: 3px; background: var(--primary); }
.thumb-split i.a { width: 46%; height: 90%; background: #fff; border: 1px solid var(--line); }
.thumb-split i.b { width: 46%; height: 90%; background: #241412; }
.thumb-inst i.h { width: 90%; height: 18%; background: var(--line); }
.thumb-inst { flex-direction: column; }
.thumb-inst i.c { width: 90%; height: 52%; background: linear-gradient(90deg, var(--primary-soft) 55%, #fff 55%); border: 1px solid var(--line); }

/* Código de acesso (OTP) */
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; cursor: text; }
.otp-boxes span { height: 56px; border: 2px solid var(--line-strong); border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; background: var(--surface); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.otp-boxes span.is-filled { border-color: var(--ink-2); }
.otp-boxes span.is-current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.otp-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
[data-otp-form] { position: relative; }
input.is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-soft); }
