:root {
    --sidebar-width: 244px;
    --page-max: 1660px;
    --bg: #f3f5f7;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --ink: #171a20;
    --muted: #68707d;
    --muted-2: #9299a5;
    --line: #e2e6ea;
    --line-strong: #cfd5db;
    --sidebar: #171a20;
    --sidebar-soft: #242830;
    --accent: #d8ff3e;
    --accent-ink: #10130b;
    --green: #16875d;
    --green-soft: #e9f7f1;
    --blue: #2f6fdd;
    --blue-soft: #edf3ff;
    --amber: #b77700;
    --amber-soft: #fff5de;
    --purple: #7051c7;
    --purple-soft: #f2effc;
    --red: #bf3d48;
    --red-soft: #fff0f1;
    --teal: #177f86;
    --teal-soft: #eaf7f7;
    --shadow: 0 14px 44px rgba(22, 28, 36, .07);
    --shadow-soft: 0 8px 24px rgba(22, 28, 36, .06);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 13px;
    --radius-sm: 9px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:focus-visible {
    outline: 3px solid rgba(47, 111, 221, .28);
    outline-offset: 2px;
}

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 28px 18px 22px;
    color: #fff;
    background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(216, 255, 62, .55);
    border-radius: 13px;
    color: var(--accent);
    background: rgba(216, 255, 62, .08);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.04em;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 18px; letter-spacing: .11em; }
.brand-copy small { margin-top: 6px; color: #8f96a3; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.main-nav { display: grid; gap: 8px; margin-top: 56px; }
.nav-item {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-radius: 13px;
    color: #aeb4bf;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item.active { color: var(--accent); background: var(--sidebar-soft); }
.nav-item.disabled { cursor: default; opacity: .5; }
.nav-item.disabled small { margin-left: auto; color: #858c98; font-size: 8px; letter-spacing: .09em; }
.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 16px 12px 2px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer div { display: flex; min-width: 0; flex-direction: column; }
.sidebar-footer strong { overflow: hidden; color: #e6e8ec; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer small { margin-top: 3px; color: #777f8c; font-size: 9px; }
.connection-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #818996; box-shadow: 0 0 0 5px rgba(129,137,150,.12); }
.connection-dot.online { background: var(--accent); box-shadow: 0 0 0 5px rgba(216,255,62,.11); }
.connection-dot.error { background: #ff6874; box-shadow: 0 0 0 5px rgba(255,104,116,.12); }

.workspace {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: 38px clamp(20px, 3vw, 52px) 28px;
}
.workspace > * { width: min(100%, var(--page-max)); margin-inline: auto; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: #777f8b; font-size: 10px; font-weight: 850; letter-spacing: .17em; }
.topbar h1 { margin: 0; font-size: clamp(31px, 3vw, 44px); line-height: 1; letter-spacing: -.045em; }
.page-description { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.sync-chip {
    display: flex;
    min-width: 255px;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.74);
    box-shadow: 0 5px 16px rgba(20,25,32,.03);
}
.sync-chip > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.sync-chip small { color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.sync-chip strong { margin-top: 3px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pulse { position: relative; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.pulse::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(22,135,93,.35); border-radius: inherit; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.65); opacity: 1; } 75%,100% { transform: scale(1.45); opacity: 0; } }

.search-panel, .table-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.search-panel { padding: 28px; }
.search-heading, .section-heading, .table-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.search-heading h2, .section-heading h2, .table-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }

.search-statuses { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.live-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #d9e0e8;
    border-radius: 999px;
    color: #53606d;
    background: #f7f9fb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}
.live-status.success { border-color: #b9dfcf; color: #176b50; background: #effaf5; }
.live-status.loading { border-color: #c8d8f6; color: #315f9f; background: #f2f6fe; }
.live-status.warning { border-color: #f0d5a5; color: #885c13; background: #fff8e9; }

.demo-badge {
    padding: 7px 10px;
    border: 1px solid #d7e885;
    border-radius: 999px;
    color: #60720d;
    background: #f7ffd8;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .11em;
}
.search-form {
    display: grid;
    grid-template-columns: minmax(310px, 1.55fr) repeat(3, minmax(170px, .75fr)) auto;
    align-items: end;
    gap: 13px;
    margin-top: 24px;
}
.search-field, .filter-field { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.search-field > span:first-child, .filter-label { color: #555d68; font-size: 11px; font-weight: 760; }
.input-shell {
    display: flex;
    height: 48px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.input-shell:focus-within { border-color: #7da1e8; box-shadow: 0 0 0 4px rgba(47,111,221,.1); }
.input-shell svg { width: 18px; flex: 0 0 auto; color: #8c939e; }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.input-shell input::placeholder { color: #a4aab4; }

.multi-select { position: relative; }
.multi-select summary {
    display: flex;
    height: 48px;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 13px;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: #333943;
    background: #fff;
    font-size: 13px;
    font-weight: 680;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary svg { width: 16px; color: #7d8490; transition: transform .18s ease; }
.multi-select[open] summary { border-color: #7da1e8; box-shadow: 0 0 0 4px rgba(47,111,221,.1); }
.multi-select[open] summary svg { transform: rotate(180deg); }
.multi-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: min(390px, 88vw);
    max-height: 410px;
    overflow: auto;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(18,24,31,.19);
}
.compact-menu { width: min(270px, 88vw); }
.multi-menu-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 3px 3px 8px; border-bottom: 1px solid #edf0f2; }
.multi-menu-actions button { padding: 5px 7px; cursor: pointer; border: 0; border-radius: 7px; color: var(--blue); background: transparent; font-size: 10px; font-weight: 750; }
.multi-menu-actions button:hover { background: var(--blue-soft); }
.check-option { display: flex; align-items: center; gap: 10px; padding: 9px 8px; cursor: pointer; border-radius: 10px; }
.check-option:hover { background: #f5f7f9; }
.check-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check-mark { position: relative; display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid #cbd1d8; border-radius: 5px; background: #fff; }
.check-option input:checked + .check-mark { border-color: var(--accent-ink); background: var(--accent); }
.check-option input:checked + .check-mark::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg); }
.check-option input:focus-visible + .check-mark { outline: 3px solid rgba(47,111,221,.25); outline-offset: 2px; }
.check-option > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.check-option strong { font-size: 12px; }
.check-option small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.form-actions { display: flex; align-items: center; gap: 8px; }
.primary-button, .secondary-button, .ghost-button {
    min-height: 48px;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 780;
    transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease, background .14s ease;
}
.primary-button {
    display: flex;
    min-width: 132px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid var(--accent-ink);
    color: var(--accent-ink);
    background: var(--accent);
    box-shadow: 0 7px 20px rgba(125,148,19,.16);
}
.primary-button svg { width: 17px; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(125,148,19,.22); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.secondary-button { padding: 0 13px; border: 1px solid var(--line); color: #59616c; background: #fff; font-size: 11px; }
.secondary-button:hover, .ghost-button:hover { background: #f4f6f8; }

.metrics-section { margin-top: 24px; }
.section-heading { margin-bottom: 14px; padding-inline: 2px; }
.section-heading > small { color: var(--muted); font-size: 11px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; }
.metric-card {
    position: relative;
    min-height: 154px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.metric-card::after { content: ""; position: absolute; right: -30px; bottom: -44px; width: 110px; height: 110px; border: 20px solid currentColor; border-radius: 50%; opacity: .045; }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-card-top > span:first-child { color: #5e6671; font-size: 11px; font-weight: 760; }
.metric-icon { display: grid; min-width: 27px; height: 27px; place-items: center; border: 1px solid currentColor; border-radius: 8px; background: #fff; color: currentColor; font-size: 9px; font-weight: 900; }
.metric-card strong { display: block; margin-top: 23px; color: var(--ink); font-size: clamp(27px, 2.25vw, 38px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-card > small { display: block; margin-top: 8px; color: var(--muted-2); font-size: 9.5px; line-height: 1.35; }
.metric-card code { padding: 1px 3px; border-radius: 4px; color: #59616c; background: #f1f3f5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; }
.metric-stock { color: var(--blue); }
.metric-reserved { color: var(--amber); }
.metric-available { color: var(--green); }

.table-card { margin-top: 24px; overflow: hidden; }
.table-heading { padding: 25px 26px 20px; }
.table-heading-actions { display: flex; align-items: center; gap: 9px; }
.result-count { padding: 7px 10px; border-radius: 9px; color: #59616c; background: #f0f2f4; font-size: 11px; font-weight: 740; }
.ghost-button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); color: #626a76; background: #fff; font-size: 10px; }
.table-scroll { overflow: auto; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 1120px; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
th, td { padding: 12px 10px; text-align: left; }
thead { position: sticky; top: 0; z-index: 5; }
.column-headings th { border-bottom: 1px solid var(--line); color: #69717d; background: #f7f9fa; font-size: 10px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; cursor: pointer; border: 0; color: inherit; background: transparent; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort-button span { color: #a7adb6; font-size: 11px; }
.sort-button.active { color: var(--ink); }
.sort-button.active span { color: var(--blue); }
.column-filters th { padding: 8px 8px; border-bottom: 1px solid var(--line-strong); background: #fff; }
.column-filters input {
    width: 100%;
    min-width: 72px;
    height: 33px;
    padding: 0 9px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    outline: 0;
    color: #3a414b;
    background: #fbfcfd;
    font-size: 10px;
}
.column-filters input:focus { border-color: #85a7e8; background: #fff; box-shadow: 0 0 0 3px rgba(47,111,221,.09); }
.column-filters input::placeholder { color: #a5abb4; }
.range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; min-width: 102px; }
.range-inputs input { min-width: 0; }
td { border-bottom: 1px solid #edf0f2; color: #424953; background: #fff; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcf8; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.sku-cell { display: flex; min-width: 165px; flex-direction: column; }
.sku-cell code { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 800; }
.sku-cell small { max-width: 215px; margin-top: 4px; overflow: hidden; color: #8a919b; font-size: 9px; text-overflow: ellipsis; }
.color-name-cell { display: flex; align-items: center; gap: 8px; }
.color-swatch { display: grid; width: 12px; height: 12px; flex: 0 0 auto; place-items: center; }
.color-swatch svg { width: 12px; height: 12px; stroke: rgba(0,0,0,.18); stroke-width: 1; }

.product-name-cell {
    display: block;
    min-width: 230px;
    max-width: 360px;
    overflow: hidden;
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 650;
    text-overflow: ellipsis;
}

.code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 690; }
.pill { display: inline-grid; min-width: 31px; min-height: 25px; place-items: center; padding: 2px 8px; border: 1px solid #e0e4e8; border-radius: 8px; background: #f8fafb; font-size: 10px; font-weight: 760; }
.warehouse-cell { display: flex; min-width: 170px; flex-direction: column; }
.warehouse-cell strong { font-size: 11px; }
.warehouse-cell small { margin-top: 3px; color: #8a919c; font-size: 8.5px; }
.reserved-value { color: #9a6705; font-weight: 760; }
.available-value { color: var(--green); font-weight: 850; }
.negative-value { color: var(--red) !important; font-weight: 850; }
.row-status { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--green); vertical-align: middle; }
.row-status.inactive { background: #a8afb8; }
.state-message { margin: 0 26px 24px; padding: 30px; border: 1px dashed #d5dae0; border-radius: 14px; color: var(--muted); background: #fafbfc; text-align: center; font-size: 13px; }
.state-message.error { border-color: #efc4c8; color: #9b3340; background: #fff5f6; }
.loading-row td { height: 58px; }
.loading-bar { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #edf0f2 20%, #f8f9fa 50%, #edf0f2 80%); background-size: 220% 100%; animation: shimmer 1.35s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.loading-width-1 { width: 56%; }
.loading-width-2 { width: 66%; }
.loading-width-3 { width: 76%; }
.loading-width-4 { width: 86%; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 22px; border-top: 1px solid var(--line); color: var(--muted); background: #fbfcfd; font-size: 10px; }
.pagination-actions { display: flex; align-items: center; gap: 5px; }
.pagination-actions button { display: grid; width: 31px; height: 31px; cursor: pointer; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #4f5762; background: #fff; font-size: 15px; }
.pagination-actions button:hover:not(:disabled) { border-color: #bdc5cd; background: #f4f6f7; }
.pagination-actions button:disabled { cursor: not-allowed; opacity: .38; }
#page-label { min-width: 98px; text-align: center; font-weight: 720; }

.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 19px; color: #9aa1ab; font-size: 9px; font-weight: 780; letter-spacing: .1em; }
.noscript { position: fixed; inset: auto 12px 12px; z-index: 100; padding: 12px; border-radius: 10px; color: #fff; background: #a6323f; text-align: center; }

@media (max-width: 1450px) {
    .search-form { grid-template-columns: minmax(300px, 1.5fr) repeat(3, minmax(150px, .72fr)); }
    .form-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1040px) {
    :root { --sidebar-width: 82px; }
    .sidebar { align-items: center; padding-inline: 12px; }
    .brand { padding: 0; }
    .brand-copy, .nav-item span, .nav-item small, .sidebar-footer div { display: none; }
    .main-nav { width: 100%; }
    .nav-item { justify-content: center; padding: 0; }
    .sidebar-footer { justify-content: center; width: 100%; padding-inline: 0; }
    .search-form { grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: 1 / -1; }
    .form-actions { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    :root { --sidebar-width: 0px; --radius-xl: 18px; }
    .sidebar { position: static; width: 100%; height: 70px; flex-direction: row; justify-content: space-between; padding: 0 16px; }
    .brand-copy { display: flex; }
    .main-nav { width: auto; margin: 0; }
    .main-nav .nav-item.disabled { display: none; }
    .nav-item.active { width: 44px; min-height: 42px; }
    .sidebar-footer { display: none; }
    .workspace { margin-left: 0; padding: 24px 14px; }
    .topbar { align-items: flex-start; }
    .page-description { max-width: 210px; }
    .sync-chip { min-width: 0; padding: 10px; }
    .sync-chip small { display: none; }
    .sync-chip strong { max-width: 115px; }
    .search-panel { padding: 21px 16px; }
    .search-heading { align-items: flex-start; flex-direction: column; }
    .search-form { grid-template-columns: 1fr; }
    .search-field, .form-actions { grid-column: auto; }
    .form-actions { justify-content: stretch; }
    .form-actions > * { flex: 1; }
    .multi-menu { right: auto; left: 0; width: min(390px, calc(100vw - 46px)); }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .metric-card { min-height: 142px; padding: 17px; }
    .metric-card strong { margin-top: 19px; }
    .table-heading { align-items: flex-start; flex-direction: column; padding: 21px 17px 17px; }
    .table-heading-actions { width: 100%; flex-wrap: wrap; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .page-footer { flex-direction: column; }
}

@media (max-width: 440px) {
    .topbar { flex-direction: column; }
    .sync-chip { width: 100%; }
    .sync-chip strong { max-width: none; }
    .metrics-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 132px; }
    .primary-button, .secondary-button { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

.primary-button.is-loading { cursor: progress; opacity: .72; }
.primary-button.is-loading svg { animation: loading-arrow .8s ease-in-out infinite alternate; }
@keyframes loading-arrow { to { transform: translateX(4px); } }

/* v0.2.13 - disponibilidade opcional descontando reserva + expedição */
.form-actions { flex-wrap: wrap; }
.discount-toggle {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    user-select: none;
}
.discount-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.toggle-track {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #d7dce2;
    transition: background .18s ease;
}
.toggle-track > span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: transform .18s ease;
}
.discount-toggle input:checked + .toggle-track { background: var(--accent); }
.discount-toggle input:checked + .toggle-track > span { transform: translateX(16px); }
.discount-toggle input:focus-visible + .toggle-track { outline: 3px solid rgba(47,111,221,.25); outline-offset: 2px; }
.toggle-copy { display: flex; min-width: 0; flex-direction: column; }
.toggle-copy strong { color: #353c46; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.toggle-copy small { margin-top: 2px; color: var(--muted); font-size: 8.5px; line-height: 1.2; white-space: nowrap; }

@media (max-width: 720px) {
    .discount-toggle { width: 100%; flex: 1 0 100% !important; }
    .toggle-copy strong, .toggle-copy small { white-space: normal; }
}


/* v0.2.14 - filtros exatos e selecionáveis na listagem */
.no-column-filter { display: block; color: #b1b6bd; text-align: center; font-size: 11px; }
.column-multi-select { position: relative; min-width: 132px; }
.column-multi-select > summary { display: flex; height: 33px; align-items: center; justify-content: space-between; gap: 6px; padding: 0 9px; cursor: pointer; list-style: none; border: 1px solid #dfe3e7; border-radius: 8px; color: #3a414b; background: #fbfcfd; font-size: 10px; font-weight: 650; }
.column-multi-select > summary::-webkit-details-marker { display: none; }
.column-multi-select[open] > summary { border-color: #85a7e8; background: #fff; box-shadow: 0 0 0 3px rgba(47,111,221,.09); }
.column-multi-menu { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; width: max(100%, 220px); max-height: 290px; overflow: auto; padding: 7px; border: 1px solid #d9dee4; border-radius: 10px; background: #fff; box-shadow: 0 14px 38px rgba(23,29,37,.16); }
.column-multi-actions { display: flex; justify-content: space-between; gap: 6px; padding: 2px 2px 7px; border-bottom: 1px solid #edf0f2; }
.column-multi-actions button { border: 0; color: #58709b; background: transparent; cursor: pointer; font-size: 9px; font-weight: 750; }
.column-option { display: flex; align-items: center; gap: 7px; padding: 7px 5px; color: #4c5561; cursor: pointer; white-space: normal; font-size: 10px; }
.column-option:hover { background: #f6f8fa; border-radius: 7px; }
.column-option input { width: 14px; min-width: 14px; height: 14px; margin: 0; }

/* v0.2.18 - dashboard focado somente em estoque, reservado e disponivel */


/* v0.2.20 brunx light refinement - visual only */
:root {
    --sidebar-width: 228px;
    --page-max: 1660px;
    --bg: #f3f5f7;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --ink: #16202a;
    --muted: #65707c;
    --muted-2: #8b95a1;
    --line: #e1e6eb;
    --line-strong: #cfd7df;
    --sidebar: #113042;
    --sidebar-soft: #1c4258;
    --accent: #465ca7;
    --accent-ink: #ffffff;
    --green: #16875d;
    --green-soft: #eaf7f1;
    --blue: #465ca7;
    --blue-soft: #edf1ff;
    --amber: #b77700;
    --amber-soft: #fff5de;
    --purple: #465ca7;
    --purple-soft: #f0f3ff;
    --red: #bf3d48;
    --red-soft: #fff0f1;
    --teal: #177f86;
    --teal-soft: #eaf7f7;
    --shadow: 0 14px 40px rgba(17, 48, 66, .07);
    --shadow-soft: 0 9px 28px rgba(17, 48, 66, .06);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 13px;
    --radius-sm: 9px;
}

html { color-scheme: light; }
body {
    background:
        radial-gradient(circle at top right, rgba(70, 92, 167, .05), transparent 23%),
        linear-gradient(180deg, #f7f9fb 0%, #f3f5f7 100%);
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 18%),
        var(--sidebar);
    box-shadow: 12px 0 28px rgba(17, 48, 66, .08);
}
.brand-mark {
    border-color: rgba(255,255,255,.18);
    border-radius: 14px;
    color: #fff;
    background: rgba(255,255,255,.08);
}
.brand-copy strong { letter-spacing: .13em; }
.brand-copy small { color: rgba(255,255,255,.58); }
.nav-item {
    border: 1px solid transparent;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-item:hover:not(.disabled) {
    color: #fff;
    border-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    transform: translateX(1px);
}
.nav-item.active {
    color: #fff;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(70,92,167,.55), rgba(70,92,167,.38));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 20px rgba(10, 24, 39, .18);
}
.nav-item.disabled { opacity: .45; }
.connection-dot.online { background: #8db1ff; box-shadow: 0 0 0 5px rgba(141,177,255,.14); }

.workspace { padding-top: 34px; }
.eyebrow, .section-kicker { color: var(--blue); }
.sync-chip {
    border-color: #dce3ea;
    background: rgba(255,255,255,.88);
    box-shadow: 0 10px 24px rgba(17, 48, 66, .05);
}
.pulse { background: var(--blue); }
.pulse::after { border-color: rgba(70, 92, 167, .28); }

.search-panel, .table-card {
    overflow: visible;
    border-color: #dde5eb;
    box-shadow: var(--shadow);
}
.search-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}
.search-panel::before {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), #113042);
}
.search-field > span:first-child, .filter-label { color: #4f5965; }
.input-shell,
.multi-select summary,
.column-filters input,
.column-multi-select > summary {
    border-color: var(--line-strong);
    background: #fff;
}
.input-shell:focus-within,
.multi-select[open] summary,
.column-filters input:focus,
.column-multi-select[open] > summary {
    border-color: #7b91d1;
    box-shadow: 0 0 0 4px rgba(70, 92, 167, .10);
}
.primary-button {
    border-color: #3f54a0;
    background: linear-gradient(180deg, #5670bf, #465ca7);
    box-shadow: 0 9px 22px rgba(70, 92, 167, .20);
}
.primary-button:hover { box-shadow: 0 12px 28px rgba(70, 92, 167, .26); }
.secondary-button, .ghost-button { color: #4b5662; }

.multi-select { z-index: 40; }
.multi-select[open] { z-index: 120; }
.multi-menu {
    z-index: 140;
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b8c5d4 #ffffff;
    border-color: #d5dde6;
    background: #fff;
    box-shadow: 0 24px 52px rgba(17, 48, 66, .14);
}
.multi-menu::-webkit-scrollbar,
.column-multi-menu::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.multi-menu::-webkit-scrollbar-track,
.column-multi-menu::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track { background: #f3f6f8; }
.multi-menu::-webkit-scrollbar-thumb,
.column-multi-menu::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
    border: 2px solid #f3f6f8;
    border-radius: 999px;
    background: #bdc9d7;
}
.multi-menu::-webkit-scrollbar-thumb:hover,
.column-multi-menu::-webkit-scrollbar-thumb:hover,
.table-scroll::-webkit-scrollbar-thumb:hover { background: #8ea0bd; }
.check-option:hover { background: #f6f8fb; }
.check-mark { border-color: #cbd4de; }
.check-option input:checked + .check-mark {
    border-color: #465ca7;
    background: #465ca7;
}
.check-option input:checked + .check-mark::after {
    border-left-color: #fff;
    border-bottom-color: #fff;
}

.metrics-grid { gap: 14px; }
.metric-card {
    border-width: 1px;
    box-shadow: var(--shadow-soft);
}
.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 18px 0 0 18px;
    background: currentColor;
}
.metric-card-top > span:first-child { color: #50606b; }
.metric-icon { background: rgba(255,255,255,.88); }
.metric-stock {
    color: var(--blue);
    border-color: #dce5fb;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
}
.metric-reserved {
    color: var(--amber);
    border-color: #f0dfba;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}
.metric-available {
    color: var(--green);
    border-color: #d7ebdf;
    background: linear-gradient(180deg, #ffffff 0%, #f5fcf8 100%);
}

.table-heading {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}
.result-count {
    color: #45515d;
    background: #eef2f6;
}
.table-scroll { border-top: 0; }
tbody tr:hover td { background: #f8fbff; }
.sort-button.active span { color: var(--blue); }
.available-value { color: var(--green); font-weight: 850; }
.reserved-value { color: var(--amber); font-weight: 760; }
.column-multi-menu {
    z-index: 30;
    border-color: #d9dee4;
    background: #fff;
    box-shadow: 0 14px 38px rgba(23,29,37,.16);
    scrollbar-width: thin;
    scrollbar-color: #bcc7d4 #fff;
}

/* toggle removed from UI, but keep class harmless if markup exists in older cache */
.discount-toggle { display: none !important; }
.form-actions { justify-content: flex-end; }

@media (max-width: 1040px) {
    :root { --sidebar-width: 82px; }
    .workspace { padding-top: 30px; }
}

@media (max-width: 720px) {
    :root { --sidebar-width: 0px; --radius-xl: 18px; }
    .search-panel::before { margin-bottom: 16px; }
}


/* v0.2.27 - modo consultivo */
.consultation-chip {
    min-width: 330px;
    gap: 14px;
    padding: 15px 18px;
    border-radius: 16px;
}
.consultation-chip .pulse { width: 11px; height: 11px; }
.consultation-chip small {
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
}
.consultation-chip strong {
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.consultation-chip em {
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 10px;
    font-style: normal;
    line-height: 1.35;
}
.consultive-note {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.consultive-note strong { color: var(--ink); }
@media (max-width: 760px) {
    .consultation-chip { width: 100%; min-width: 0; }
    .consultation-chip strong { max-width: none; }
}
