:root {
    --bg: #edf2f6;
    --surface: #ffffff;
    --surface-soft: #f5f8fa;
    --line: #d5dee8;
    --line-strong: #bdc9d6;
    --ink: #172435;
    --muted: #5b6e84;
    --primary: #0e857d;
    --primary-dark: #086b66;
    --primary-soft: #e9f8f6;
    --sidebar: #12222d;
    --sidebar-line: #233844;
    --sidebar-text: #aebdc8;
    --danger: #c73942;
    --shadow: 0 8px 24px rgba(25, 46, 62, .07);
    --sidebar-width: 252px;
    --sidebar-collapsed: 72px;
    --topbar-height: 58px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: "Roboto", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    color: var(--sidebar-text);
    background: var(--sidebar);
    border-right: 1px solid var(--sidebar-line);
    transition: width .2s ease, transform .2s ease;
    font-family: "Nunito", "Segoe UI", Arial, sans-serif;
}

.brand-row {
    display: flex;
    min-height: var(--topbar-height);
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid var(--sidebar-line);
}

.brand {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 10px;
    color: #e5ffff;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand span { overflow: hidden; }

.sidebar-collapse, .icon-button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    flex: 0 0 auto;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.sidebar-collapse {
    width: 30px;
    height: 30px;
    color: #d9e6ec;
    background: #21343f;
    border-color: #39505d;
    font-size: 23px;
}

.nav-list { flex: 1; overflow-y: auto; padding: 12px 10px 18px; scrollbar-color: #38515e transparent; scrollbar-width: thin; }
.sidebar-footer { padding: 10px; background: #10212b; border-top: 1px solid var(--sidebar-line); flex-shrink: 0; }
.nav-section-title {
    display: block;
    padding: 2px 11px 8px;
    color: #6f8998;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    padding: 0 10px;
    color: var(--sidebar-text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.nav-item:hover { color: #fff; background: #1a303b; }
.nav-item.active { color: #fff; background: #1c514d; box-shadow: inset 3px 0 0 #54c8b7; }
.nav-trigger {
    min-height: 44px;
    margin: 2px 0;
    color: #c7d4dc;
    background: transparent;
    border: 0;
    border-radius: 6px;
    text-transform: none;
}
.nav-trigger.active {
    color: #fff;
    background: #1c514d;
    box-shadow: inset 3px 0 0 #54c8b7;
}
.nav-trigger:hover {
    color: #fff;
    background: #1a303b;
}

.nav-icon {
    position: relative;
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    flex: 0 0 30px;
    color: #bfe8e3;
    background: #1b3540;
    border: 0;
    border-radius: 6px;
    font-family: "Segoe UI Symbol", Arial, sans-serif;
    font-size: 17px;
    line-height: 1;
}
.nav-trigger.active .nav-icon,
.nav-item.active .nav-icon { color: #fff; background: var(--primary); }

.nav-icon.gear { font-size: 21px; }
.nav-icon-sales { font-family: inherit; font-size: 20px; }
.nav-icon-operations { font-size: 21px; }
.nav-icon-folder::before {
    width: 17px;
    height: 12px;
    margin-top: 4px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    content: "";
}
.nav-icon-folder::after {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 4px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    content: "";
}
.nav-icon-report::before {
    width: 16px;
    height: 12px;
    border: 1.5px solid currentColor;
    border-radius: 1px;
    content: "";
}
.nav-icon-report::after {
    position: absolute;
    top: 13px;
    left: 10px;
    width: 11px;
    height: 1px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
    content: "";
}
.nav-arrow { margin-left: auto; font-size: 14px; transition: transform .18s ease; }
.nav-group.open .nav-arrow { transform: rotate(180deg); }

.submenu {
    display: none;
    flex-direction: column;
    gap: 1px;
    margin: 1px 0 7px 25px;
    padding: 3px 0 3px 15px;
    border-left: 1px solid #36515f;
}

.nav-group.open .submenu { display: flex; }
.nav-group:not(.open) .nav-trigger.active + .submenu { display: flex; }
.nav-group:not(.open) .nav-trigger.active + .submenu .submenu-item:not(.active) { display: none; }

.submenu-item {
    position: relative;
    display: flex;
    min-height: 34px;
    align-items: center;
    margin: 0;
    padding: 0 10px;
    overflow: hidden;
    color: #c5d7e8;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.submenu-item::before {
    position: absolute;
    left: -19px;
    width: 7px;
    height: 7px;
    background: #36515f;
    border: 2px solid var(--sidebar);
    border-radius: 50%;
    content: "";
}

.submenu-item:hover { color: #fff; background: #1a303b; }
.submenu-item.active { color: #fff; background: var(--primary); font-weight: 900; }
.submenu-item.active::before { background: #65d5c5; }
.submenu-group { display: flex; flex-direction: column; gap: 1px; }
.submenu-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.submenu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform .18s ease;
}
.submenu-group.open .submenu-arrow { transform: rotate(180deg); }
.submenu-nested {
    display: none;
    flex-direction: column;
    gap: 1px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #36515f;
}
.submenu-group.open .submenu-nested { display: flex; }
.submenu-item.nested {
    min-height: 30px;
    padding-left: 12px;
    font-size: 12px;
    font-weight: 700;
}
.submenu-item.nested::before {
    left: -16px;
    width: 6px;
    height: 6px;
}

.app-area {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left .2s ease;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 22px;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(24, 43, 58, .04);
}

.topbar-context, .topbar-user, .topbar-user-name { display: flex; align-items: center; gap: 10px; }
.topbar-user { gap: 20px; }
.topbar-label, .topbar-user small { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.topbar-context strong, .topbar-user strong { display: block; font-size: 17px; letter-spacing: 0; white-space: nowrap; }
.user-avatar { display: grid; width: 36px; height: 36px; place-items: center; color: white; background: var(--primary); border-radius: 50%; font-size: 12px; font-weight: 800; }
.topbar-leading { display: none; align-items: center; gap: 8px; flex: 0 0 auto; }
.mobile-menu { display: none; }
.topbar-home-btn {
    display: none;
    text-decoration: none;
    color: var(--ink);
}

.main-content { width: 100%; padding: 20px; }

.page-heading {
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: -20px -20px 18px;
    padding: 14px 20px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.compact-heading { min-height: 62px; }
.eyebrow { color: var(--primary-dark); font-size: 11px; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 26px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 17px; }
h3 { margin: 0; font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 8px; }

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

.button:hover { border-color: var(--primary); }
.button-primary { color: white; background: var(--primary); border-color: var(--primary); }
.button-primary:hover { background: var(--primary-dark); }
.button-danger { color: var(--danger); border-color: #f0b9bd; }
.button-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-danger-small {
    min-height: 32px;
    padding: 0 10px;
    color: #b4232a;
    background: #fff;
    border-color: #f2b8bd;
    font-size: 12px;
}
.button-danger-small:hover { background: #fff4f5; border-color: #dc3545; }
.ai-model-install-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai-model-install-list .button { min-height: 36px; padding: 0 12px; font-size: 12px; }
.button-danger-confirm {
    color: #fff;
    background: #dc3545;
    border-color: #dc3545;
}
.button-danger-confirm:hover { background: #b4232a; border-color: #b4232a; }

.surface {
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
}

.tabs { display: flex; gap: 6px; padding: 8px 14px 0; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); }
.tab {
    position: relative;
    min-height: 40px;
    padding: 0 15px;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}
.tab.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.tab.active::after { display: none; }
.tab.tab-has-error {
    color: var(--danger);
    border-color: #f0b9bd;
    box-shadow: inset 0 -3px 0 var(--danger);
}
.tab.tab-has-error.active {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: none;
}
.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }
.tab-panel-title { margin-bottom: 14px; font-size: 16px; }
.product-form-validation { margin-bottom: 12px; }
.product-form-validation ul {
    margin: 8px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
}
.product-form-validation li { font-weight: 700; }
.field.field-has-error > span { color: var(--danger); }
.field.field-has-error input,
.field.field-has-error select,
.field.field-has-error textarea,
.field.field-has-error .field-inline-action input {
    border-color: #f0b9bd;
    background: #fff1f2;
    box-shadow: 0 0 0 2px rgba(199, 57, 66, 0.12);
}

.form-grid { display: grid; gap: 14px; align-items: end; }
.cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }

.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.field > span, .check-field > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.field-inline-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.field-inline-action .button { min-height: 42px; padding-inline: 16px; }
.cadastro-ia-editor-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.cadastro-ia-editor-tab { min-height: 38px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.cadastro-ia-editor-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.cadastro-ia-editor-panel { display: none; }
.cadastro-ia-editor-panel.active { display: block; }
.cadastro-ia-editor-field-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cadastro-ia-grade-toggle { display: inline-flex; grid-column: 1 / -1; align-items: center; gap: 7px; min-height: 26px; color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.cadastro-ia-grade-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
.cadastro-ia-grade-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
@media (max-width: 720px) { .cadastro-ia-grade-actions { align-items: flex-start; flex-direction: column; } }
input, select, textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    outline: none;
    letter-spacing: 0;
}

textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 133, 125, .11); }
input:disabled,
input[readonly],
textarea[readonly] { color: #6d7c8d; background: #eef2f5; cursor: default; }
input::placeholder, textarea::placeholder { color: #9aa7b4; }
.color-input { padding: 5px; }

.check-field { display: flex; min-height: 42px; align-items: center; gap: 10px; }
.check-field input { width: 18px; min-height: 18px; accent-color: var(--primary); }
.checkbox-field.product-status-checkbox { display: flex; min-height: 24px; align-items: center; }
.checkbox-field.product-status-checkbox input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    accent-color: var(--primary);
}
.product-stock-display input[readonly] { color: #1e5960; background: #edf8f6; border-color: #a8d5cf; font-weight: 800; }
.variation-edit-panel { padding: 20px; }.variation-edit-panel .section-title { margin-bottom: 18px; }.variation-edit-panel .section-title h2 { margin: 3px 0 0; font-size: 18px; }
.settings-check-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.settings-check-row .check-field { min-height: 42px; }
.form-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; background: var(--surface-soft); border-top: 1px solid var(--line); }
.cliente-tabs .tab { flex: 0 0 auto; }
.cliente-form-body { padding: 0; }
.cliente-tab-panel { min-height: 280px; padding: 20px; }
.product-variation-title { margin-top: 18px; }
.product-grade-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
    align-items: stretch;
}
.product-grade-check {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}
.product-grade-check input {
    flex: 0 0 auto;
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    accent-color: var(--primary);
}
.product-grade-check span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}
.product-ecommerce-publication { display: grid; gap: 16px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.product-ecommerce-publish, .product-ecommerce-field {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.product-ecommerce-publish {
    min-height: 58px;
    padding: 12px 14px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.product-ecommerce-publish input, .product-ecommerce-field input {
    flex: 0 0 auto;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    accent-color: var(--primary);
}
.product-ecommerce-publish span { display: grid; gap: 3px; }
.product-ecommerce-publish strong { color: var(--ink); font-size: 14px; }
.product-ecommerce-publish small, .product-ecommerce-fields p, .product-ecommerce-description small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.product-ecommerce-description { display: grid; gap: 6px; margin: 0; }
.product-ecommerce-description textarea { width: 100%; min-height: 96px; resize: vertical; }
.product-ecommerce-fields { display: grid; gap: 14px; }
.product-ecommerce-fields h3, .product-ecommerce-fields p { margin: 0; }
.product-ecommerce-fields h3 { font-size: 15px; }
.product-ecommerce-field-list { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 10px; }
.product-ecommerce-field { min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-weight: 800; }
@media (max-width: 720px) { .product-ecommerce-field-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    .product-grade-options { grid-template-columns: 1fr; }
}
.product-variation-wrap { overflow: visible; }
.product-variation-table th { position: static; }
.product-variation-table tbody tr { background: #fff; }
.form-group-section { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-group-section:last-child { margin-bottom: 0; border-bottom: 0; }
.form-group-title { display: flex; align-items: center; min-height: 32px; margin-bottom: 12px; color: var(--primary-dark); }

.search-surface { padding: 16px; }
.search-grid { grid-template-columns: minmax(120px, .65fr) minmax(240px, 2fr) minmax(180px, 1fr) auto; }
.cliente-search-grid { grid-template-columns: minmax(260px, 1fr) auto; }
.produtos-search-grid { grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(130px, 190px)) auto; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.pdv-cliente-search-actions { width: 100%; justify-content: space-between; }
.pdv-cliente-search-actions .button:last-child { margin-left: auto; }
.cadastro-ia-actions { justify-content: flex-end; }
.cadastro-ia-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cadastro-ia-thumb { display: grid; gap: 6px; width: 104px; color: var(--muted); font-size: 12px; overflow: hidden; }
.cadastro-ia-thumb img { width: 104px; height: 82px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.cadastro-ia-preview { margin-top: 16px; }
.cadastro-ia-product-image { width: 66px; height: 54px; display: block; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; vertical-align: middle; }
.cadastro-ia-product-image { cursor: zoom-in; }
.cadastro-ia-image-dialog { max-width: min(92vw, 860px); max-height: 92vh; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); }
.cadastro-ia-image-dialog::backdrop { background: rgba(10, 25, 37, .72); }
.cadastro-ia-image-dialog img { display: block; max-width: min(86vw, 800px); max-height: 78vh; margin-top: 12px; object-fit: contain; }
.cadastro-ia-choice-dialog { width: min(92vw, 900px); }
.cadastro-ia-choice-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cadastro-ia-choice-header h2 { margin: 0; font-size: 20px; }
.cadastro-ia-choice-header p { margin: 4px 0 0; color: var(--muted); }
.cadastro-ia-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; margin-top: 16px; }
.cadastro-ia-image-choice { display: grid; gap: 7px; min-width: 0; padding: 8px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font: inherit; font-weight: 700; text-align: left; }
.cadastro-ia-image-choice:hover { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.cadastro-ia-image-choice img { width: 100%; height: 112px; margin: 0; object-fit: contain; background: var(--surface-soft); }
.cadastro-ia-image-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.cadastro-ia-table input[type="text"], .cadastro-ia-table textarea { min-width: 130px; width: 100%; font: inherit; text-transform: none; }
.cadastro-ia-table textarea { min-width: 220px; resize: vertical; }
.form-error { color: var(--danger); font-weight: 700; }
.report-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; }

.section-title { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.count-pill { padding: 5px 9px; color: var(--muted); background: var(--surface-soft); border-radius: 20px; font-size: 10px; font-weight: 800; }
.product-type-badge {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 8px;
    color: #00645f;
    background: #dff4f1;
    border: 1px solid #b8ddd8;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}
.table-wrap { overflow-x: auto; }
.vale-credito-table thead th { position: static; }
.vale-credito-table tfoot td {
    height: 48px;
    padding: 9px 14px;
    border-top: 2px solid var(--line-strong);
    background: #f4f7f9;
    white-space: nowrap;
}
.vale-credito-filter-actions {
    align-items: flex-end;
    justify-content: flex-start;
}
.vale-credito-filter-actions .button {
    min-height: 42px;
    width: 100%;
}
.vale-credito-action-cell {
    width: 96px;
    padding-right: 8px;
}
.vale-credito-action-cell .button {
    min-width: 84px;
}
.table-top-scroll { height: 18px; margin-bottom: 4px; overflow-x: auto; overflow-y: hidden; }
.table-top-scroll > div { height: 1px; }
.table-top-scroll[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; }
th, td { height: 48px; padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { height: 40px; color: var(--muted); background: #f4f7f9; font-size: 11px; text-transform: uppercase; }
thead th { position: sticky; top: var(--topbar-height); z-index: 2; }
tfoot th { position: static; }
tbody tr:hover { background: #f8fbfc; }
.align-right { text-align: right; }
.empty-row td { height: 150px; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; color: var(--muted); font-size: 12px; }
.pagination .icon-button { width: 32px; height: 32px; }
.icon-button:disabled { opacity: .45; cursor: default; }
.table-action { min-height: 32px; padding-inline: 12px; font-size: 12px; }
.clientes-table th { position: static; }
.clientes-table tbody tr { background: #fff; }
.clientes-table tbody td { color: var(--ink); }
.products-table { width: 100%; table-layout: fixed; }
.products-table th, .products-table td { padding: 9px 7px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.products-table th:nth-child(1), .products-table td:nth-child(1) { width: 8%; }
.products-table th:nth-child(2), .products-table td:nth-child(2) { width: 7%; }
.products-table th:nth-child(3), .products-table td:nth-child(3) { width: 37%; }
.products-table th:nth-child(4), .products-table td:nth-child(4) { width: 9%; }
.products-table th:nth-child(5), .products-table td:nth-child(5) { width: 9%; }
.products-table th:nth-child(6), .products-table td:nth-child(6) { width: 8%; }
.products-table th:nth-child(7), .products-table td:nth-child(7) { width: 6%; }
.products-table th:nth-child(8), .products-table td:nth-child(8) { width: 8%; }
.products-table th:nth-child(9), .products-table td:nth-child(9) { width: 8%; }
.products-table .product-description-cell { display: -webkit-box; overflow: hidden; line-height: 1.28; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.products-table .table-action { min-width: 0; padding-inline: 8px; }
.sale-status-cell { width: 56px; text-align: center; }
.sale-status-icon { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font-family: Arial, sans-serif; font-size: 19px; font-weight: 800; line-height: 1; }
.sale-status-nfce { border-radius: 5px; color: #3e5d75; font-size: 23px; }
.sale-status-paid { color: #1a765c; }
.venda-surface { overflow: visible; }
.venda-layout { display: grid; gap: 16px; }
.venda-panel { overflow: hidden; }
.venda-form-grid { padding: 16px; }
.venda-items-table input { min-width: 120px; }
.venda-items-table td:first-child input { min-width: 280px; }
.entrada-form { overflow: visible; }
#lojaDestinoTransferencia[hidden] { display: none !important; }
.entrada-form-saved {
    background: #fff3f3;
    border-color: #e99a9a;
    box-shadow: inset 5px 0 0 #d96b6b, var(--shadow);
}
.entrada-form-saved .section-title {
    background: #ffe7e7;
    border-bottom-color: #efb8b8;
}
.entrada-form-saved .form-footer {
    background: #ffe7e7;
    border-top-color: #efb8b8;
}
.entrada-product-grid {
    display: grid;
    grid-template-columns: 160px 62px minmax(260px, 1fr) minmax(220px, .8fr) 120px 130px 130px 130px;
    grid-template-areas:
        "code codebtn description description grade grade search search"
        ". . . quantity cost sale include include";
    gap: 10px;
    align-items: end;
    padding: 16px;
}
.entrada-product-grid .button { min-height: 42px; }
.entrada-code { grid-area: code; }
.entrada-code-button { grid-area: codebtn; }
.entrada-description { grid-area: description; }
.entrada-grade { grid-area: grade; }
.entrada-search-button { grid-area: search; }
.entrada-quantity { grid-area: quantity; }
.entrada-cost { grid-area: cost; }
.entrada-sale-value { grid-area: sale; }
.entrada-include-button { grid-area: include; }
.entrada-product-grid:not(:has(.entrada-grade:not([hidden]))) {
    grid-template-areas:
        "code codebtn description description description description search search"
        ". . . quantity cost sale include include";
}
.entrada-code-button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 12px;
}
@media (max-width: 1180px) {
    .entrada-product-grid {
        grid-template-columns: 150px 62px minmax(220px, 1fr) minmax(180px, .7fr) 120px 130px;
        grid-template-areas:
            "code codebtn description description search search"
            "grade grade grade grade grade grade"
            "quantity cost sale include include include";
    }
}
@media (max-width: 760px) {
    .entrada-product-grid {
        grid-template-columns: 1fr 80px;
        grid-template-areas:
            "code codebtn"
            "description description"
            "grade grade"
            "search search"
            "quantity quantity"
            "cost cost"
            "sale sale"
            "include include";
    }
}
.entrada-variation-field[hidden] { display: none; }
.entrada-variation-field {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.entrada-variation-field .field { min-width: 0; }
.entrada-variation-field select {
    min-height: 42px;
    font-size: 14px;
    font-weight: 800;
}
.entrada-inline-message {
    min-height: 20px;
    padding: 0 16px 8px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 800;
}
.entrada-items-wrap { padding-inline: 16px; }
.entrada-items-table th { position: static; }
.entrada-totalizer {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    color: var(--muted);
    font-weight: 800;
}
.entrada-totalizer strong {
    min-width: 160px;
    color: var(--ink);
    font-size: 28px;
    text-align: right;
}
.success-panel { padding: 14px 18px; color: var(--primary-dark); border-color: #a8ded8; background: #effbf9; }
.danger-panel { padding: 14px 18px; color: #9f1239; border-color: #fecdd3; background: #fff1f2; }
.entry-saved-popup {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(8, 23, 31, .62);
}
.entry-saved-popup.open { display: flex; }
.entry-saved-dialog {
    display: grid;
    width: min(560px, 100%);
    gap: 12px;
    padding: 22px;
    color: #0b463f;
    background: #e8fbf4;
    border: 2px solid #6fd0ae;
    border-left: 8px solid #22a06b;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(18, 34, 45, .28);
}
.entry-saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.entry-saved-dialog span {
    color: #08745f;
    font-size: 12px;
    font-weight: 900;
}
.entry-saved-dialog strong {
    color: #083b35;
    font-size: 30px;
}
.entry-saved-dialog p {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}
.entry-saved-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.entry-saved-summary span {
    padding: 7px 10px;
    color: #0b463f;
    background: #fff;
    border: 1px solid #b9ead7;
    border-radius: 6px;
}
.recebimento-form { overflow: visible; }
.recebimento-search-grid .filter-actions {
    justify-content: flex-end;
}
.recebimento-search-grid .filter-actions .button {
    min-width: 74px;
    padding-inline: 12px;
}
.recebimento-search-grid .filter-actions .recebimento-load-client {
    min-width: 42px;
    padding-inline: 8px;
}
.recebimento-table input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    accent-color: var(--primary);
}
.recebimento-installments-summary {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}
.recebimento-payment { padding-bottom: 8px; }
.recebimento-payment-buttons { padding: 16px 16px 0; }
.recebimento-payment-list { margin: 0 16px 14px; }
.recebimento-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    align-items: end;
    padding: 14px 16px;
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
}
.recebimento-total {
    display: flex;
    min-width: 170px;
    flex-direction: column;
    gap: 4px;
}
.recebimento-total span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.recebimento-total strong {
    min-height: 42px;
    padding: 6px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-size: 28px;
    text-align: right;
}
.fechamento-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.fechamento-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
}
.fechamento-card span,
.fechamento-totals span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.fechamento-card strong {
    color: var(--ink);
    font-size: 26px;
    text-align: right;
}
.fechamento-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}
.fechamento-totals div {
    display: flex;
    min-width: 170px;
    flex-direction: column;
    gap: 4px;
}
.fechamento-totals strong {
    color: var(--ink);
    font-size: 22px;
    text-align: right;
}
.closing-heading p { margin: 8px 0 0; color: var(--muted); }
.closing-filter { padding: 18px; margin-bottom: 16px; }
.closing-filter-actions { width: 100%; grid-column: span 9; justify-content: space-between; }
.closing-filter-action-group { display: flex; flex-wrap: wrap; gap: 8px; }
.closing-filter-action-end { justify-content: flex-end; margin-left: auto; }
.closing-overview {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.closing-overview-card {
    display: grid;
    gap: 8px;
    padding: 16px;
}
.closing-overview-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.closing-overview-card strong { color: var(--ink); font-size: 24px; text-align: right; }
.closing-overview-highlight { border-top: 3px solid var(--primary); }
.closing-overview-negative { border-top: 3px solid var(--danger); }
.closing-matrix-surface { overflow: hidden; }
.closing-matrix-table { min-width: 900px; }
.closing-matrix-table th,
.closing-matrix-table td { padding: 14px 16px; }
.closing-matrix-table thead th { position: static; white-space: nowrap; }
.closing-matrix-table tbody tr:hover { background: var(--surface-soft); }
.closing-matrix-table tfoot th { padding-top: 16px; padding-bottom: 16px; background: var(--surface-soft); border-top: 2px solid var(--line-strong); font-size: inherit; font-weight: 800; }
.closing-value-negative { color: var(--danger); }
.closing-history { margin-bottom: 16px; overflow: hidden; }
.closing-history-list { display: grid; }
.closing-history-row {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
}
.closing-history-row.active { background: var(--surface-soft); }
.closing-history-row > div { display: grid; gap: 3px; }
.closing-history-row span { color: var(--muted); font-size: 12px; }
.closing-history-open { font-size: 23px; font-weight: 700; line-height: 1; }
.closing-history-current { display: flex; justify-content: flex-end; padding: 12px 16px; }
@media (max-width: 1100px) {
    .closing-overview { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}
@media (max-width: 620px) {
    .closing-filter-actions { align-items: stretch; flex-direction: column; }
    .closing-filter-action-end { justify-content: flex-start; margin-left: 0; }
    .closing-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .closing-overview-card strong { font-size: 20px; }
}
@media print {
    .sidebar, .page-actions, .closing-filter, .closing-history { display: none !important; }
    .app-main { margin: 0; }
    .closing-heading p { color: #000; }
    .surface { box-shadow: none; }
    @page { size: A4 landscape; margin: 8mm; }
    .closing-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 10px;
    }
    .closing-overview-card {
        gap: 4px;
        padding: 10px 12px;
    }
    .closing-overview-card strong { font-size: 19px; }
    .closing-matrix-surface,
    .closing-matrix-surface .table-wrap { overflow: visible; }
    .closing-matrix-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 9px;
    }
    .closing-matrix-table th,
    .closing-matrix-table td {
        height: auto;
        padding: 7px 6px;
        white-space: nowrap;
    }
    .closing-matrix-table th:first-child,
    .closing-matrix-table td:first-child { width: 25%; }
    .closing-matrix-table th:not(:first-child),
    .closing-matrix-table td:not(:first-child) { width: 12.5%; }
    .closing-matrix-table tfoot th { padding-top: 8px; padding-bottom: 8px; }
    .closing-matrix-surface .section-title { min-height: 46px; padding: 0 10px; }
    .closing-matrix-surface .section-title h2 { font-size: 16px; }
}
.caixa-launch-form {
    padding: 18px;
}
.caixa-launch-grid {
    display: grid;
    grid-template-columns: 274px minmax(420px, 1fr);
    gap: 18px;
    align-items: start;
}
.caixa-choice-group {
    min-width: 0;
    padding: 22px 16px 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
}
.caixa-choice-group legend {
    padding: 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.caixa-type-group {
    display: grid;
    gap: 12px;
}
.caixa-choice {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
    font-weight: 800;
}
.caixa-choice.active {
    background: #eafff5;
    border-color: var(--primary);
}
.caixa-choice input {
    width: 22px;
    min-height: 22px;
    accent-color: #1278ff;
}
.caixa-launch-fields {
    max-width: 660px;
}
.caixa-date-input {
    color: #e31b28;
    background: #f3f6f8;
    font-size: 24px;
    font-weight: 900;
    pointer-events: none;
}
.caixa-value-input {
    font-size: 22px;
    font-weight: 900;
    text-align: right;
}
.caixa-description-field input {
    min-height: 42px;
}
.caixa-payment-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 26px;
}
.caixa-payment-group .caixa-choice {
    min-height: 66px;
}
.section-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.caixa-launch-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.print-choice-dialog {
    width: min(460px, calc(100% - 32px));
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
}
.print-choice-dialog::backdrop {
    background: rgba(8, 23, 31, .54);
}
.print-choice-content {
    padding: 22px;
}
.print-choice-content h2 {
    margin: 0;
    font-size: 20px;
}
.print-choice-content p {
    margin: 8px 0 20px;
    color: var(--muted);
}
.print-choice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.product-search-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 20px 20px;
    background: rgba(8, 23, 31, .54);
}
.product-search-modal.open { display: flex; }
.commission-chart-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 5mm;
    background: rgba(8, 23, 31, .54);
}
.commission-chart-modal.open { display: flex; }
.commission-chart-dialog {
    width: min(980px, 100%);
    max-height: calc(100vh - 10mm);
    margin: 0;
    overflow-y: auto;
    border: 2px solid #168f83;
    box-shadow: 0 24px 60px rgba(8, 23, 31, .35);
}
.commission-chart-dialog .section-title {
    align-items: flex-start;
    padding-inline: 5mm;
}
.commission-chart-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.commission-chart-dialog .section-title p {
    margin: 4px 0 0;
    color: var(--muted);
}
.commission-chart-content {
    overflow-x: auto;
    padding: 5mm;
}
.commission-chart-content canvas {
    display: block;
    width: 100%;
    min-width: 520px;
}
.commission-chart-empty {
    margin: 14px 0 0;
    color: var(--muted);
}
.product-search-dialog {
    width: min(1280px, 100%);
    max-height: calc(100vh - 96px);
    overflow: auto;
}
.product-search-dialog .table-wrap { overflow-x: hidden; }
.product-search-table { width: 100%; table-layout: fixed; }
/* Sem cabecalho fixo: dentro do modal o sticky sobrepunha a primeira linha. */
.product-search-table thead th {
    position: static;
    top: auto;
    z-index: auto;
}
.product-search-table-historico th:nth-child(1), .product-search-table-historico td:nth-child(1) { width: 12%; }
.product-search-table-historico th:nth-child(2), .product-search-table-historico td:nth-child(2) { width: 48%; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.product-search-table-historico th:nth-child(3), .product-search-table-historico td:nth-child(3) { width: 18%; }
.product-search-table-historico th:nth-child(4), .product-search-table-historico td:nth-child(4) { width: 8%; }
.product-search-table-historico th:nth-child(5), .product-search-table-historico td:nth-child(5) { width: 14%; }
.product-search-table th, .product-search-table td { padding: 8px 6px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-search-table th:nth-child(1), .product-search-table td:nth-child(1) { width: 11%; }
.product-search-table th:nth-child(2), .product-search-table td:nth-child(2) { width: 42%; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.product-search-table th:nth-child(3), .product-search-table td:nth-child(3) { width: 15%; }
.product-search-table th:nth-child(4), .product-search-table td:nth-child(4) { width: 10%; }
.product-search-table th:nth-child(5), .product-search-table td:nth-child(5) { width: 11%; }
.product-search-table th:nth-child(6), .product-search-table td:nth-child(6) { width: 11%; }
.product-search-table.product-search-table-historico th:nth-child(1), .product-search-table.product-search-table-historico td:nth-child(1) { width: 12%; }
.product-search-table.product-search-table-historico th:nth-child(2), .product-search-table.product-search-table-historico td:nth-child(2) { width: 46%; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.product-search-table.product-search-table-historico th:nth-child(3), .product-search-table.product-search-table-historico td:nth-child(3) { width: 18%; }
.product-search-table.product-search-table-historico th:nth-child(4), .product-search-table.product-search-table-historico td:nth-child(4) { width: 8%; }
.product-search-table.product-search-table-historico th:nth-child(5), .product-search-table.product-search-table-historico td:nth-child(5) { width: 16%; }
.product-search-table-image th:nth-child(1), .product-search-table-image td:nth-child(1) { width: 7%; }
.product-search-table-image th:nth-child(2), .product-search-table-image td:nth-child(2) { width: 8%; }
.product-search-table-image th:nth-child(3), .product-search-table-image td:nth-child(3) { width: 38%; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.product-search-table-image th:nth-child(4), .product-search-table-image td:nth-child(4) { width: 15%; }
.product-search-table-image th:nth-child(5), .product-search-table-image td:nth-child(5) { width: 9%; }
.product-search-table-image th:nth-child(6), .product-search-table-image td:nth-child(6) { width: 11%; }
.product-search-table-image th:nth-child(7), .product-search-table-image td:nth-child(7) { width: 12%; }
.product-search-table-cost th:nth-child(1), .product-search-table-cost td:nth-child(1) { width: 8%; }
.product-search-table-cost th:nth-child(2), .product-search-table-cost td:nth-child(2) { width: 36%; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.product-search-table-cost th:nth-child(3), .product-search-table-cost td:nth-child(3) { width: 14%; }
.product-search-table-cost th:nth-child(4), .product-search-table-cost td:nth-child(4) { width: 10%; }
.product-search-table-cost th:nth-child(5), .product-search-table-cost td:nth-child(5) { width: 10%; }
.product-search-table-cost th:nth-child(6), .product-search-table-cost td:nth-child(6) { width: 11%; }
.product-search-table-cost th:nth-child(7), .product-search-table-cost td:nth-child(7) { width: 11%; }
.product-search-table .button { min-width: 0; padding-inline: 8px; font-size: 12px; }
.product-search-table .product-search-thumb { width: 38px; height: 38px; }
.product-search-thumb {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
}
.product-search-thumb-button {
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.product-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(8, 23, 31, .68);
}
.product-image-viewer.open { display: flex; }
.product-image-viewer-dialog {
    width: min(900px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
}
.product-image-viewer-body {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
}
.product-image-viewer-body img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}
.delete-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 98;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(8, 23, 31, .68);
}
.delete-confirm-backdrop.open { display: flex; }
.delete-confirm-dialog {
    display: grid;
    width: min(520px, 100%);
    gap: 12px;
    padding: 24px;
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(18, 34, 45, .28);
}
.delete-confirm-kicker {
    width: fit-content;
    padding: 5px 8px;
    color: #fff;
    background: #dc3545;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
}
.delete-confirm-dialog h2 { margin: 0; color: #b4232a; font-size: 26px; }
.delete-confirm-dialog p { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.45; }
.delete-confirm-warning {
    padding: 10px 12px;
    color: #7f1d1d !important;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 6px;
    font-weight: 800;
}
.delete-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}
.delete-confirm-actions form { margin: 0; }
.product-image-panel {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
    gap: 18px;
    align-items: start;
}
.product-image-gallery {
    display: grid;
    min-height: 240px;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    align-content: start;
    overflow: hidden;
    padding: 12px;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-weight: 800;
}
.product-image-thumb {
    display: grid;
    position: relative;
    min-height: 130px;
    place-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: grab;
}
.product-image-thumb.dragging { opacity: .45; cursor: grabbing; }
.product-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-image-remove {
    position: absolute;
    right: 7px;
    bottom: 7px;
    min-height: 30px;
    padding: 0 9px;
    color: #fff;
    background: var(--danger);
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}
.product-image-drag-label {
    position: absolute;
    left: 7px;
    top: 7px;
    min-height: 28px;
    padding: 0 7px;
    color: var(--ink);
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    line-height: 28px;
}
.product-image-empty { display: grid; min-height: 180px; place-items: center; grid-column: 1 / -1; }
.product-image-gallery.has-image .product-image-empty { display: none; }
.product-image-actions {
    display: grid;
    gap: 12px;
}
.product-image-actions .button { justify-self: start; }
.product-image-actions p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.product-image-bank-dialog {
    width: min(1000px, calc(100vw - 28px));
    max-height: min(820px, calc(100vh - 28px));
    padding: 20px;
    overflow: auto;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(18, 34, 45, .28);
}
.product-image-bank-dialog::backdrop { background: rgba(8, 23, 31, .68); }
.product-ncm-search-dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: min(720px, calc(100vh - 28px));
    padding: 20px;
    overflow: auto;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(18, 34, 45, .28);
}
.product-ncm-search-dialog::backdrop { background: rgba(8, 23, 31, .68); }
.product-ncm-search-list { display: grid; gap: 8px; }
.product-ncm-search-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}
.product-ncm-search-item:hover, .product-ncm-search-item:focus-visible { border-color: var(--primary); background: var(--surface-soft); }
.product-ncm-search-item strong { color: var(--primary-dark); }
.product-ncm-search-item span { line-height: 1.4; }
.product-variations-dialog {
    width: min(1120px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(18, 34, 45, .28);
}
.product-variations-dialog::backdrop { background: rgba(8, 23, 31, .68); }
.product-variations-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.product-variations-dialog-header h2 { margin: 3px 0 0; font-size: 21px; }
.product-variations-dialog .product-variation-wrap { max-height: calc(min(760px, 100vh - 28px) - 116px); }
.product-image-bank-header, .product-image-bank-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.product-image-bank-header h2 { margin: 3px 0 0; font-size: 21px; }
.product-image-bank-description { margin: 14px 0; color: var(--muted); line-height: 1.45; }
.product-image-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
    min-height: 180px;
}
.product-image-bank-item {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 8px;
    overflow: hidden;
    text-align: left;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
}
.product-image-bank-item:hover { border-color: var(--primary-light); }
.product-image-bank-item.selected { border-color: #dc3545; box-shadow: inset 0 0 0 1px #dc3545; }
.product-image-bank-item img { width: 100%; height: 130px; object-fit: contain; background: var(--surface-soft); }
.product-image-bank-item-details { display: grid; gap: 3px; min-width: 0; }
.product-image-bank-item strong, .product-image-bank-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-image-bank-item strong { font-size: 12px; }
.product-image-bank-item small { color: var(--muted); font-size: 11px; }
.product-image-bank-empty { display: grid; min-height: 160px; margin: 0; place-items: center; grid-column: 1 / -1; color: var(--muted); font-weight: 800; text-align: center; }
.product-image-bank-footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 800; }

.pdv-shell {
    margin: -20px;
    min-height: calc(100vh - var(--topbar-height));
    background: #eef1f4;
}
.pdv-shell form { display: flex; min-height: calc(100vh - var(--topbar-height)); flex-direction: column; }
.pdv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 6px 12px;
    color: #fff;
    background: var(--primary);
}
.pdv-header span { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.pdv-header strong { display: block; font-size: 18px; }
.pdv-sale-done {
    display: grid;
    grid-template-columns: auto minmax(0, 1.4fr) minmax(180px, 0.8fr) auto;
    gap: 16px 20px;
    align-items: center;
    margin: 0;
    padding: 16px 18px;
    color: #06362f;
    background:
        linear-gradient(135deg, rgba(255,255,255,.22), transparent 42%),
        linear-gradient(90deg, #b8f0df 0%, #d7f7ee 48%, #e8fbf6 100%);
    border-bottom: 1px solid #7dceb8;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.55);
    animation: pdvSaleDoneIn .35s ease-out;
}
.pdv-sale-done[hidden] { display: none !important; }
.pdv-sale-done.is-consult {
    color: #173247;
    background:
        linear-gradient(135deg, rgba(255,255,255,.18), transparent 42%),
        linear-gradient(90deg, #d7e7f5 0%, #e8f1f8 52%, #f2f7fb 100%);
    border-bottom-color: #9bb7cc;
}
.pdv-sale-done-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #12a288, #0b6f5f);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(8, 107, 102, .28);
}
.pdv-sale-done.is-consult .pdv-sale-done-mark {
    background: linear-gradient(145deg, #4f7f9c, #355f78);
    box-shadow: 0 10px 24px rgba(53, 95, 120, .24);
}
.pdv-sale-done-copy { min-width: 0; }
.pdv-sale-done-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 4px;
    padding: 3px 9px;
    color: #0b6f5f;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(14, 133, 125, .28);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pdv-sale-done.is-consult .pdv-sale-done-eyebrow {
    color: #355f78;
    border-color: rgba(53, 95, 120, .28);
}
.pdv-sale-done-copy strong {
    display: block;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.pdv-sale-done-copy p {
    margin: 6px 0 0;
    color: #24584f;
    font-size: 14px;
    line-height: 1.35;
}
.pdv-sale-done.is-consult .pdv-sale-done-copy p { color: #3d5a70; }
.pdv-sale-done-meta {
    justify-self: stretch;
    padding: 12px 14px;
    color: #0b463f;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(14, 133, 125, .18);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}
.pdv-sale-done.is-consult .pdv-sale-done-meta {
    color: #24384a;
    border-color: rgba(53, 95, 120, .18);
}
.pdv-sale-done-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.pdv-sale-done-actions .button {
    min-height: 48px;
    min-width: 132px;
    padding-inline: 18px;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(8, 107, 102, .12);
}
.pdv-sale-done-print {
    color: #0b6f5f;
    background: #fff;
    border-color: #7dceb8;
}
.pdv-sale-done-nfce {
    min-width: 150px;
}
@keyframes pdvSaleDoneIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 980px) {
    .pdv-sale-done {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .pdv-sale-done-meta,
    .pdv-sale-done-actions {
        grid-column: 1 / -1;
    }
    .pdv-sale-done-actions {
        justify-content: stretch;
    }
    .pdv-sale-done-actions .button {
        flex: 1 1 140px;
    }
}
.pdv-discount-approval-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 5px 10px;
    color: #173d2a;
    background: #d9f3e4;
    border: 1px solid #82caa2;
    border-radius: 5px;
}
.pdv-discount-approval-timer[hidden] { display: none !important; }
.pdv-discount-approval-timer span { font-size: 11px; font-weight: 800; text-transform: none; }
.pdv-discount-approval-timer strong { font-size: 16px; }
.pdv-header-action {
    min-height: 34px;
    padding: 0 14px;
    color: var(--primary-dark);
    background: #fff;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 900;
}
.pdv-message { margin: 10px; }
.pdv-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(360px, 47%) minmax(420px, 1fr);
    gap: 8px;
    padding: 8px;
}
.pdv-left,
.pdv-right {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
}
.pdv-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); background: #626a71; }
.pdv-tabs button[hidden] { display: none !important; }
.pdv-tabs button {
    min-height: 38px;
    color: #fff;
    background: transparent;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .18);
    font-weight: 800;
}
.pdv-tabs button.active { background: #fff; color: var(--ink); }
.pdv-tab-panel { display: none; }
.pdv-tab-panel.active { display: block; }
.pdv-card { padding: 10px; }
.pdv-line-actions { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: #5d7284; font-size: 12px; }
.pdv-link-button { padding: 0; color: var(--primary-dark); background: transparent; border: 0; cursor: pointer; font-weight: 800; }
.pdv-product-search { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-bottom: 14px; }
.pdv-product-search input { min-height: 38px; }
.pdv-product-search button {
    min-height: 38px;
    padding: 0 14px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 800;
}
.pdv-product-found { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.pdv-product-image {
    display: grid;
    min-height: 128px;
    place-items: center;
    background: #f7f9fb;
    border: 1px solid var(--line);
}
.pdv-product-image img { display: none; max-width: 100%; max-height: 128px; object-fit: contain; }
.pdv-product-image.has-image img { display: block; }
.pdv-product-image.has-product-image { cursor: zoom-in; }
.pdv-product-info { display: grid; gap: 12px; }
.topbar-auth-link {
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}
.stock-report-options { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 14px; padding: 16px; }
.stock-report-scope { display: flex; grid-column: span 6; align-items: center; gap: 22px; }
.stock-report-display { display: flex; grid-column: span 3; min-height: 42px; align-items: center; padding-left: 18px; border-left: 1px solid var(--line); }
.stock-report-filter { display: grid; grid-column: span 12; grid-template-columns: 210px minmax(260px, 1fr) auto; gap: 12px; align-items: end; }
.stock-report-actions { display: flex; grid-column: 10 / span 3; justify-content: flex-end; gap: 8px; }
.stock-report-heading { display: flex; align-items: center; gap: 14px; padding: 16px 16px 10px; }
.stock-report-heading img { width: 68px; height: 68px; object-fit: contain; }
.stock-report-heading h2 { font-size: 18px; }
.stock-report-heading p { margin: 3px 0 0; color: var(--muted); }
.stock-report-heading .count-pill { margin-left: auto; }
.stock-report-table td:last-child { font-variant-numeric: tabular-nums; font-weight: 800; }
.stock-report-total { background: var(--surface-soft); }
.stock-report-table tfoot th { background: var(--primary); border-color: var(--primary); color: #fff; font-variant-numeric: tabular-nums; font-weight: 800; }
.etiqueta-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.etiqueta-editor { padding: 20px; }
.etiqueta-editor h2, .etiqueta-fields h3 { margin: 0 0 16px; font-size: 17px; }
.etiqueta-product-row, .etiqueta-settings-row { display: grid; gap: 14px; margin-top: 14px; }
.etiqueta-product-row { grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); }
.etiqueta-settings-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.etiqueta-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.etiqueta-fields h3 { grid-column: 1 / -1; margin-bottom: 4px; }
.etiqueta-editor-actions { display: flex; gap: 10px; align-items: center; }
.etiqueta-field-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.etiqueta-field-option:has(.etiqueta-description-lines) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; }
.etiqueta-description-lines { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.etiqueta-description-lines select { min-height: 32px; padding: 4px 26px 4px 8px; font-size: 12px; }
.etiqueta-bold-option { white-space: nowrap; }
.etiqueta-preview-panel { min-height: 430px; padding: 0; overflow: hidden; }
.etiqueta-preview-panel .section-title { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.etiqueta-preview-panel .section-title h2 { font-size: 17px; }
.etiqueta-preview-wrap { display: grid; min-height: 360px; place-items: center; padding: 30px; background: var(--surface-soft); }
.etiqueta-preview-grid { display: grid; grid-template-columns: repeat(var(--labels-per-row), var(--label-width)); gap: 3mm; max-width: 100%; overflow: auto; }
.etiqueta-preview, .etiqueta-print-label { width: var(--label-width); height: var(--label-height); box-sizing: border-box; overflow: hidden; padding: 3mm; background: #fff; border: 1px dashed var(--primary); color: #12222d; }
.etiqueta-preview { box-shadow: var(--shadow); }
.etiqueta-preview { position: relative; padding: 0; touch-action: none; }
.etiqueta-designer-item { position: absolute; box-sizing: border-box; overflow: hidden; cursor: move; border: 1px dashed transparent; user-select: none; }
.etiqueta-designer-item:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, transparent); }
.etiqueta-designer-item .etiqueta-value { width: 100%; height: 100%; }
.etiqueta-designer-item.is-bold .etiqueta-value { font-weight: 800; }
.etiqueta-designer-item .etiqueta-barcode { width: 100%; height: 100%; margin: 0; }
.etiqueta-resize-handle { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: var(--primary); cursor: nwse-resize; opacity: 0; }
.etiqueta-designer-item:hover .etiqueta-resize-handle { opacity: 1; }
.etiqueta-value { overflow: hidden; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.etiqueta-descricao { display: block; overflow: hidden; font-size: 15px; font-weight: 900; line-height: 1.12; white-space: normal; }
.etiqueta-description-line { display: block; max-height: 1.12em; overflow: hidden; }
.etiqueta-codigo_barras { font-family: monospace; font-size: 12px; letter-spacing: 1px; }
.etiqueta-preco { margin-top: 2px; font-size: 17px; font-weight: 900; }
.etiqueta-barcode-option { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 10px; }
.etiqueta-barcode { width: min(100%, var(--barcode-width, 40mm)); height: var(--barcode-height, 18mm); margin-top: 1mm; }
.etiqueta-barcode svg { display: block; width: 100%; height: 100%; }
.etiqueta-print-copies { display: none; }
.etiqueta-model-actions { display: flex; gap: 8px; }
.etiqueta-model-actions form { margin: 0; }
@media (max-width: 760px) {
    .stock-report-options { grid-template-columns: 1fr; }
    .stock-report-scope,
    .stock-report-display,
    .stock-report-filter,
    .stock-report-actions { grid-column: span 1; }
    .stock-report-scope { flex-direction: column; align-items: flex-start; gap: 4px; }
    .stock-report-display { padding-left: 0; border-left: 0; }
    .stock-report-filter { grid-template-columns: 1fr; }
    .etiqueta-layout { grid-template-columns: 1fr; }
    .etiqueta-fields { grid-template-columns: 1fr; }
    .etiqueta-barcode-option { grid-template-columns: 1fr; }
    .etiqueta-product-row, .etiqueta-settings-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .etiqueta-field-option:has(.etiqueta-description-lines) { grid-template-columns: 1fr auto; }
    .etiqueta-field-option:has(.etiqueta-description-lines) .etiqueta-bold-option { grid-column: 1 / -1; }
}
@media print {
    .sidebar, .topbar, .sidebar-scrim, .page-heading, .no-print { display: none !important; }
    .app-area { margin: 0 !important; }
    .main-content { padding: 0 !important; }
    .stock-report-surface { border: 0; box-shadow: none; }
    .etiqueta-layout { display: block; }
    .etiqueta-preview-panel { border: 0; box-shadow: none; }
    .etiqueta-preview-wrap { display: none; }
    .etiqueta-print-copies { display: flex; flex-wrap: wrap; gap: 0; }
    .etiqueta-print-label { break-inside: avoid; border: 0; }
}
.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: #eef3f7;
}
.auth-surface {
    width: min(430px, 100%);
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
}
.auth-surface-wide { width: min(640px, 100%); }
.auth-logo {
    display: block;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    object-fit: contain;
}
.store-selection-brand {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}
.store-selection-brand .auth-logo { margin: 0; }
.store-selection-brand strong {
    color: var(--primary-dark);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}
.company-logo-setting { display: flex; gap: 14px; align-items: center; }
.company-logo-preview { width: 76px; height: 76px; object-fit: contain; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.company-logo-actions { display: grid; gap: 10px; min-width: 0; }
.company-logo-actions input[type="file"] { max-width: 100%; }
.store-company-logo { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.home-screen {
    display: grid;
    grid-template-rows: 1fr;
    min-height: calc(100vh - 92px);
    position: relative;
}
.home-screen.has-blocks {
    grid-template-rows: 1fr auto;
}
.home-top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px 0;
}
.home-remote-access {
    min-height: 40px;
    font-weight: 800;
}
.acesso-remoto-form,
.acesso-remoto-cliente {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}
.acesso-remoto-passos {
    margin: 0;
    padding-left: 18px;
    color: var(--ink);
    display: grid;
    gap: 6px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}
.acesso-remoto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}
.home-logo-stage {
    display: grid;
    min-height: 0;
    place-items: center;
    padding: 28px 16px 18px;
}
.home-screen:not(.has-blocks) .home-logo-stage {
    min-height: calc(100vh - 92px);
}
.home-logo-stage img {
    display: block;
    width: min(480px, 70vw);
    max-height: min(480px, 58vh);
    object-fit: contain;
}
.home-screen.has-blocks .home-logo-stage img {
    width: min(420px, 62vw);
    max-height: min(380px, 48vh);
}
.home-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding: 0 16px 18px;
}
.home-block {
    display: grid;
    gap: 4px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color .15s ease, background-color .15s ease;
}
a.home-block:hover,
a.home-block:focus-visible {
    border-color: var(--primary);
    background: var(--primary-soft);
    outline: none;
}
.home-block strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}
.home-block span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.home-block.is-static {
    opacity: .92;
}
@media (max-width: 760px) {
    .home-blocks { grid-template-columns: 1fr; }
    .home-screen.has-blocks .home-logo-stage img {
        width: min(280px, 72vw);
        max-height: min(240px, 36vh);
    }
}
.auth-surface h1 { margin: 4px 0 8px; font-size: 27px; }
.auth-surface > p { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.auth-form { display: grid; gap: 14px; }
.auth-facial-login {
    display: none;
    width: 100%;
    background: #173b58;
    border-color: #173b58;
}
.auth-facial-login:hover,
.auth-facial-login:focus-visible {
    background: #102a3f;
    border-color: #102a3f;
}
@media (max-width: 900px), (pointer: coarse) {
    .auth-facial-login { display: inline-flex; }
}
.auth-facial-dialog { width: min(460px, 100%); }
.auth-facial-content {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}
.auth-facial-content video {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0f2230;
}
.auth-facial-content .form-success {
    color: #0e857d;
    font-weight: 700;
}
.auth-remote-access {
    width: 100%;
    min-height: 44px;
    font-weight: 800;
}
.auth-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-form-grid .button { grid-column: 1 / -1; }
.auth-code { letter-spacing: 6px; font-size: 24px; font-weight: 800; text-align: center; }
.auth-error { margin-bottom: 16px; padding: 12px; color: var(--danger); background: #fff3f3; border: 1px solid #efb8b8; border-radius: 5px; font-weight: 700; }
.store-choice-list { display: grid; gap: 10px; }
.store-choice {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}
.store-choice input { width: 18px; min-height: 18px; accent-color: var(--primary); }
.store-choice span { display: grid; gap: 4px; }
.store-choice small { color: var(--muted); }
.loja-status-field { align-self: end; min-height: 42px; }
.ecommerce-url-box {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #b7e0d4;
    border-radius: 8px;
    background: #f2fbf8;
}
.ecommerce-url-box[hidden] { display: none !important; }
.ecommerce-url-box > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.ecommerce-url-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ecommerce-url-row a {
    flex: 1 1 240px;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #08765b;
    font-size: 13px;
    font-weight: 700;
}
.ecommerce-list-link { color: #08765b; font-weight: 700; text-decoration: none; }
.ecommerce-list-link:hover { text-decoration: underline; }
.lojas-list-surface { margin-top: 16px; }
.whatsapp-learning-actions { display: flex; align-items: center; gap: 8px; min-width: 300px; margin: 0; }
.whatsapp-learning-actions select { min-width: 210px; }
.store-access-field {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.store-access-field legend { padding: 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.store-access-options { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.pdv-product-selection-row {
    display: grid;
    grid-template-columns: minmax(110px, .38fr) minmax(190px, 1fr);
    gap: 14px;
    align-items: end;
}
.pdv-price span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.pdv-price strong { display: block; font-size: 34px; line-height: 1.05; }
.pdv-variation-field[hidden] { display: none; }
.pdv-variation-field > span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.pdv-variation-combos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pdv-variation-combos select {
    width: 100%;
    min-height: 48px;
    padding: 8px 36px 8px 12px;
    font-size: 16px;
    font-weight: 800;
}
.pdv-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pdv-insert-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.pdv-insert-row:has(#incluirTrocaTeste:not([hidden])) { justify-content: space-between; }
.pdv-insert-row #incluirTrocaTeste {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}
.pdv-insert-row #incluirTrocaTeste[hidden] {
    display: none !important;
}
.pdv-insert-row #incluirTrocaTeste:hover {
    background: #b4232a;
    border-color: #b4232a;
}
.pdv-item-row.is-exchange strong { color: var(--danger); }
.pdv-exchange-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #fde8ea;
    color: var(--danger);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}
.pdv-exchange-total { color: var(--danger) !important; }
.pdv-client-payment {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.pdv-client-payment-product {
    padding-top: 14px;
    margin-top: 14px;
    margin-bottom: 0;
    border-top: 1px solid var(--line);
}
.pdv-person-lines {
    display: grid;
    grid-template-columns: 120px minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.pdv-code-field,
.pdv-description-field { min-width: 0; }
.pdv-person-lines .button { min-height: 42px; }
.pdv-delivery-panel { display: grid; gap: 14px; }
.pdv-delivery-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: end;
}
.pdv-delivery-search .button { min-height: 42px; }
.pdv-delivery-results {
    display: none;
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.pdv-delivery-results.is-open { display: block; }
.pdv-delivery-results table { width: 100%; border-collapse: collapse; }
.pdv-delivery-results th,
.pdv-delivery-results td {
    height: auto;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}
.pdv-delivery-results th {
    position: static;
    top: auto;
    z-index: auto;
    background: #eef2f5;
    font-size: 11px;
    text-transform: uppercase;
}
.pdv-delivery-results .empty-row td {
    height: auto;
    padding: 14px 10px;
    text-align: center;
}
.pdv-delivery-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
}
.pdv-delivery-form .field { min-width: 0; }
.pdv-delivery-cep-field { display: grid; gap: 6px; }
.pdv-delivery-cep-field > span { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.pdv-delivery-cep-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.pdv-delivery-cep-row .button { min-height: 42px; white-space: nowrap; }
.pdv-delivery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}
.pdv-delivery-actions .button { min-height: 42px; }
.pdv-delivery-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.pdv-delivery-status.is-new {
    color: #8a5a00;
    background: #fff4d6;
    border: 1px solid #f0d48a;
}
.pdv-delivery-status.is-registered {
    color: #0f5c2e;
    background: #e6f6ec;
    border: 1px solid #9ed4b2;
}
.pwa-install-panel { display: grid; gap: 22px; max-width: 760px; }
.pwa-install-brand {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}
.pwa-install-brand img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background: #12222d;
}
.pwa-install-brand h2 { margin: 0 0 6px; font-size: 22px; }
.pwa-install-brand p { margin: 0; color: var(--muted); line-height: 1.5; }
.pwa-install-actions { display: grid; gap: 10px; justify-items: start; }
.pwa-install-actions .button { min-height: 46px; padding-inline: 18px; }
.pwa-install-steps h3 { margin: 0 0 10px; font-size: 16px; }
.pwa-install-steps ol { margin: 0; padding-left: 20px; color: var(--ink); line-height: 1.6; }
.pwa-install-steps li { margin-bottom: 6px; }
.pdv-discount-total { min-width: 0; }
.pdv-payment-title { display: grid; gap: 4px; margin-bottom: 16px; }
.pdv-payment-title h2 { font-size: 18px; }
.pdv-payment-title span { color: var(--muted); font-weight: 700; }
.pdv-sale-kind { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.pdv-payment-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 16px; }
.pdv-payment-form .button { min-height: 42px; }
.pdv-payment-list { display: grid; gap: 8px; margin-top: 14px; }
.pdv-payment-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 120px auto;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 7px 9px;
    background: #f7f9fb;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.pdv-payment-row button {
    min-height: 30px;
    padding: 0 9px;
    color: var(--danger);
    background: #fff;
    border: 1px solid #f0b9bd;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 800;
}
.pdv-payment-summary {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 800;
}
.pdv-payment-empty { min-height: 42px; padding: 11px; color: var(--muted); background: #f7f9fb; border-radius: 6px; }

.pdv-final-payment-dialog { width: min(720px, 100%); padding: 14px; }
.pdv-final-payment-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.pdv-final-payment-totals span {
    display: grid;
    gap: 4px;
    padding: 12px;
    color: var(--muted);
    font-weight: 700;
    background: #f7f9fb;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.pdv-final-payment-totals strong { color: var(--text); font-size: 20px; }
.pdv-final-payment-totals em { font-style: normal; }
.pdv-final-payment-totals .is-over { color: var(--danger); }
.pdv-final-payment-primary { display: grid; gap: 2px; }
.pdv-final-payment-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 200px;
    gap: 8px;
    align-items: center;
    min-height: 48px;
    padding: 2px 0;
    font-size: 22px;
    font-weight: 800;
}
.pdv-final-payment-row input { min-height: 46px; text-align: right; font-size: 22px; font-weight: 800; }
.pdv-final-payment-row.is-disabled { opacity: .55; }
.pdv-final-payment-other-toggle { margin-top: 14px; }
.pdv-final-payment-other { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pdv-final-payment-other[hidden],
.pdv-final-payment-credit[hidden] { display: none; }
.pdv-final-payment-other-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 160px auto;
    gap: 10px;
    align-items: end;
}
.pdv-final-payment-other-list { display: grid; gap: 8px; margin-top: 12px; }
.pdv-final-payment-credit {
    display: grid;
    gap: 6px;
    padding: 18px;
    background: #f7f9fb;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.pdv-final-payment-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.pdv-change-dialog { width: min(460px, 100%); padding: 18px; }

.nfce-customer-dialog { width: min(720px, calc(100% - 32px)); padding: 28px; }
.nfce-customer-dialog .section-title { margin-bottom: 20px; }
.nfce-customer-dialog .section-title h2 { margin: 4px 0 0; font-size: 28px; }
.nfce-customer-dialog .field span { font-weight: 700; }
.nfce-customer-dialog .field input { min-height: 42px; }
.nfce-customer-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.nfce-customer-actions .button { width: auto; min-width: 120px; }
.nfce-authorized-dialog { width: min(560px, calc(100% - 32px)); }
.nfce-authorized-message { margin: 0; color: var(--text); font-size: 16px; line-height: 1.5; }
.nfce-authorized-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.pdv-change-summary { display: grid; gap: 10px; }
.pdv-change-summary span {
    display: grid;
    gap: 5px;
    padding: 14px;
    color: var(--muted);
    font-weight: 800;
    background: #f7f9fb;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.pdv-change-summary strong { color: var(--text); font-size: 28px; }
.pdv-change-summary .pdv-change-value { color: var(--primary); background: #f1fbf7; border-color: #8ed9be; }
.pdv-change-summary .pdv-change-value strong { color: var(--danger); font-size: 40px; }

@media (max-width: 700px) {
    .pdv-product-selection-row { grid-template-columns: minmax(95px, .35fr) minmax(0, 1fr); gap: 10px; }
    .pdv-final-payment-totals { grid-template-columns: 1fr; }
    .pdv-installment-settings { grid-template-columns: 1fr; }
    .pdv-final-payment-other-form { grid-template-columns: 1fr; }
    .pdv-final-payment-row { grid-template-columns: minmax(120px, 1fr) minmax(120px, 44%); font-size: 20px; }
    .pdv-final-payment-row input { font-size: 20px; }
    .pdv-final-payment-actions { display: grid; grid-template-columns: 1fr; }
    .pdv-final-payment-actions .button { width: 100%; }
}
.pdv-installments {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.pdv-installments[hidden] { display: none; }
#pagamentoAVistaTeste[hidden] { display: none; }
.pdv-installment-settings {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .55fr);
    gap: 10px;
}
.pdv-entry-installment {
    padding: 10px 12px;
    color: #176548;
    background: #edf9f2;
    border: 1px solid #a8ddbd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
}
.pdv-entry-installment[hidden] { display: none; }
.pdv-installment-head,
.pdv-installment-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 10px;
    align-items: center;
}
.pdv-installment-head {
    min-height: 32px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.pdv-installment-list { display: grid; gap: 8px; }
.pdv-installment-row input[readonly] { text-align: center; }
.pdv-items-head,
.pdv-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 84px 100px 110px 120px;
    gap: 8px;
    align-items: center;
}
.pdv-items-head {
    min-height: 40px;
    padding: 0 12px;
    color: #fff;
    background: var(--primary);
    font-size: 11px;
    font-weight: 800;
}
.pdv-items-list { max-height: calc(100vh - 230px); overflow: auto; }
.pdv-item-row { min-height: 64px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pdv-item-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdv-item-row small { display: block; margin-top: 3px; color: var(--muted); }
.pdv-row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.pdv-row-actions button {
    min-height: 30px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}
.pdv-row-actions button:last-child { color: var(--danger); }
.pdv-empty { display: grid; min-height: 180px; place-items: center; color: var(--muted); }
.pdv-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px 190px 150px;
    gap: 8px;
    align-items: end;
    padding: 8px;
    background: #d5dade;
    border-top: 1px solid #bdc4ca;
    box-shadow: 0 -8px 18px rgba(21, 38, 52, .12);
}
.pdv-post-actions {
    display: flex;
    visibility: hidden;
    align-items: end;
    gap: 8px;
}
.pdv-post-actions.visible { visibility: visible; }
.pdv-footer-actions {
    display: flex;
    align-items: end;
    gap: 8px;
    min-height: 48px;
}
.pdv-footer-actions > .button { min-height: 48px; }
.pdv-discount-dialog { max-width: 620px; }
.pdv-discount-help { margin: 0 0 18px; color: var(--muted); }
.pdv-authorization-dialog { width: min(660px, 100%); padding: 24px; }
.pdv-authorization-dialog .section-title { align-items: flex-start; margin-bottom: 20px; }
.pdv-authorization-dialog .section-title h2 { margin-top: 4px; font-size: 28px; }
.pdv-authorization-dialog .pdv-discount-help { margin: 0 0 24px; font-size: 18px; line-height: 1.45; }
.pdv-authorization-dialog .form-grid { grid-template-columns: 1fr; gap: 18px; }
.pdv-authorization-dialog .form-grid .field { grid-column: 1 / -1; }
.pdv-authorization-dialog .field span { font-size: 15px; font-weight: 800; }
.pdv-authorization-dialog .field input { min-height: 60px; padding: 12px 14px; font-size: 22px; }
.pdv-authorization-dialog .form-footer { margin-top: 24px; padding-top: 18px; }
.pdv-authorization-dialog .form-footer .button { min-height: 52px; padding-inline: 24px; font-size: 17px; }
.pdv-discount-limit-dialog { max-width: 680px; }
.pdv-discount-limit-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 4px;
}
.pdv-discount-limit-box span {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 800;
}
.pdv-discount-limit-box strong { color: var(--text); font-size: 26px; }
.pdv-discount-response-rejected .section-title h2,
.pdv-discount-response-rejected .eyebrow {
    color: var(--danger);
}
.pdv-discount-wait {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #9ad8bd;
    border-radius: 6px;
    background: #eefaf4;
    color: #0b6840;
    font-weight: 900;
}
.pdv-discount-wait[hidden] { display: none !important; }
.pdv-discount-wait strong {
    min-width: 92px;
    text-align: center;
    font-size: 30px;
    color: #0b6840;
}
.whatsapp-request-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #18a765;
    border-color: #18a765;
}
.whatsapp-request-button:hover { background: #128653; border-color: #128653; }
.whatsapp-symbol {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #18a765;
    background: #fff;
    font-size: 14px;
    font-weight: 900;
}
@media (max-width: 700px) {
    .pdv-authorization-dialog { padding: 18px; }
    .pdv-authorization-dialog .section-title h2 { font-size: 24px; }
    .pdv-authorization-dialog .pdv-discount-help { font-size: 16px; }
    .pdv-authorization-dialog .field input { font-size: 20px; }
    .pdv-discount-limit-box { grid-template-columns: 1fr; }
}
.pdv-discount-summary {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    font-size: 16px;
}
.pdv-payment-buttons { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); gap: 6px; }
.pdv-sale-kind[hidden],
.pdv-payment-buttons[hidden],
.pdv-payment-form[hidden] { display: none !important; }
.payment-method-settings { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.payment-method-settings h3 { margin: 0 0 4px; font-size: 16px; }
.payment-method-settings p { margin: 0; color: var(--muted); font-weight: 600; }
.payment-method-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.payment-method-setting { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font-weight: 800; cursor: pointer; }
.payment-method-setting input { width: 18px; height: 18px; accent-color: var(--primary); }
.pdv-payment-buttons button {
    min-height: 48px;
    color: #5a6874;
    background: #fff;
    border: 1px solid #c5cbd2;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 800;
}
.pdv-payment-buttons button.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.pdv-footer-field { display: flex; flex-direction: column; gap: 4px; }
.pdv-money-box {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
}
.pdv-footer-field span,
.pdv-total-box span { color: #32414c; font-size: 12px; font-weight: 800; }
.pdv-footer-field input,
.pdv-footer-field select { min-height: 56px; background: #fff; }
.pdv-footer-field input {
    text-align: right;
    font-size: 32px;
    font-weight: 800;
}
.pdv-total-box { display: grid; gap: 4px; }
.pdv-total-box strong {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    font-size: 26px;
}
.pdv-total-box.total strong { font-size: 32px; }
.pdv-money-box input,
.pdv-money-box strong {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    height: 48px !important;
    min-height: 48px !important;
}
.pdv-finalize {
    min-height: 48px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 900;
}
.pdv-finalize.pdv-finalize-new {
    background: linear-gradient(135deg, #0b6f5f, #12a288);
    box-shadow: 0 8px 18px rgba(8, 107, 102, .22);
}
.pdv-finalized .pdv-header {
    background: linear-gradient(90deg, #0a6b54 0%, #0e857d 55%, #149684 100%);
}
.pdv-finalized .pdv-header strong {
    font-size: 20px;
    letter-spacing: -.01em;
}
.pdv-finalized .pdv-grid {
    opacity: .78;
    filter: saturate(.88);
}
.pdv-finalized .pdv-footer {
    background: #cfe8e1;
    border-top-color: #96cbbd;
}
.pdv-finalized input,
.pdv-finalized select,
.pdv-finalized textarea {
    color: #526273;
    background: #edf1f5;
}
.pdv-finalized button:disabled {
    opacity: .62;
    cursor: default;
}

.welcome-panel { display: flex; min-height: 230px; align-items: center; justify-content: center; gap: 34px; padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.welcome-panel img { width: 132px; height: 132px; object-fit: contain; }
.welcome-panel h2 { margin: 5px 0 8px; font-size: 28px; }
.welcome-panel p { margin-bottom: 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.metric-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 6px; box-shadow: var(--shadow); }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.metric-card strong { display: block; margin: 7px 0 3px; font-size: 28px; }
.whatsapp-report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.whatsapp-report-metrics .metric-card {
    min-height: 0;
    padding: 10px 12px;
    border-left-width: 3px;
}
.whatsapp-report-metrics .metric-card strong {
    margin: 4px 0 0;
    font-size: 22px;
}
.entrada-saida-filter {
    align-items: end;
}
.entrada-saida-group {
    display: grid;
    gap: 8px;
    align-content: end;
}
.entrada-saida-group > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.entrada-saida-group-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 22px;
    min-height: 42px;
    padding: 0 4px;
}
.entrada-saida-group-options .check-field {
    min-height: 0;
    white-space: nowrap;
}
.entrada-saida-filter-actions {
    justify-content: flex-end;
    align-self: end;
}
.entrada-saida-filter-actions .button {
    min-width: 120px;
}
.entrada-saida-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.entrada-saida-metrics .metric-card {
    min-height: 0;
    padding: 10px 12px;
    border-left-width: 3px;
}
.entrada-saida-metrics .metric-card strong {
    margin: 4px 0 0;
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.historico-produto-filter {
    align-items: end;
}
.historico-produto-filter .field-inline-action {
    grid-template-columns: minmax(0, 1fr) auto;
}
.historico-produto-filter .field-inline-action .button {
    white-space: nowrap;
}
.historico-produto-selected input[readonly] {
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.historico-produto-filter-actions {
    justify-content: stretch;
    align-self: end;
}
.historico-produto-filter-actions .button {
    width: 100%;
    min-height: 42px;
}
.historico-produto-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.historico-produto-summary {
    margin-bottom: 14px;
}
.historico-produto-summary .section-title p {
    margin: 4px 0 0;
    color: var(--muted);
}
.historico-produto-table th,
.historico-produto-table td {
    white-space: nowrap;
}
/* Sem cabecalho fixo: o sticky sobrepunha a primeira linha do relatorio. */
.historico-produto-table thead th {
    position: static;
    top: auto;
    z-index: auto;
}
.historico-produto-table td:last-child {
    white-space: normal;
    min-width: 160px;
}
.historico-produto-legend {
    margin: 10px 2px 0;
    font-size: 12px;
}
.historico-produto-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
}
.historico-produto-totals > span {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}
.historico-produto-totals small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.historico-produto-totals strong {
    font-size: 14px;
    font-weight: 800;
}
@media (max-width: 1180px) {
    .historico-produto-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .historico-produto-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .historico-produto-filter .span-2,
    .historico-produto-filter .span-3 {
        grid-column: span 1;
    }
    .historico-produto-filter-actions {
        grid-column: 1 / -1;
    }
}
@media (max-width: 560px) {
    .historico-produto-filter .span-2,
    .historico-produto-filter .span-3 {
        grid-column: 1 / -1;
    }
    .historico-produto-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.movement-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.movement-badge-in {
    color: #0f6b4f;
    background: #dcf5ea;
}
.movement-badge-out {
    color: #9a2c22;
    background: #fbe3e0;
}
@media (max-width: 760px) {
    .whatsapp-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entrada-saida-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.empty-state { display: grid; min-height: 300px; place-items: center; align-content: center; gap: 8px; padding: 30px; color: var(--muted); text-align: center; }
.empty-state h2, .empty-state p { margin: 0; }
.empty-icon { display: grid; width: 52px; height: 52px; place-items: center; color: var(--primary-dark); background: var(--primary-soft); border-radius: 50%; font-size: 26px; }
.sidebar-scrim { display: none; }

.app-shell.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); }
.app-shell.sidebar-collapsed .app-area { margin-left: var(--sidebar-collapsed); }
.app-shell.sidebar-collapsed .brand span,
.app-shell.sidebar-collapsed .nav-section-title,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-arrow,
.app-shell.sidebar-collapsed .submenu { display: none; }
.app-shell.sidebar-submenus-closed .submenu,
.app-shell.sidebar-submenus-closed .submenu-nested {
    display: none !important;
}
.app-shell.sidebar-collapsed .brand-row { padding: 0 10px; }
.app-shell.sidebar-collapsed .brand { justify-content: center; }
.app-shell.sidebar-collapsed .brand img { width: 32px; height: 32px; }
.app-shell.sidebar-collapsed .sidebar-collapse { position: absolute; left: 55px; top: 14px; width: 18px; height: 28px; border-radius: 4px; }
.app-shell.sidebar-collapsed .sidebar-collapse span { transform: rotate(180deg); }
.app-shell.sidebar-collapsed .nav-list,
.app-shell.sidebar-collapsed .sidebar-footer { padding-inline: 10px; }
.app-shell.sidebar-collapsed .nav-item { justify-content: center; padding-inline: 9px; }
.app-shell.sidebar-collapsed .nav-icon { width: 38px; height: 38px; flex-basis: 38px; }

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: min(82vw, 260px); }
    .app-area, .app-shell.sidebar-collapsed .app-area { margin-left: 0; }
    .app-shell.sidebar-open .sidebar { transform: translateX(0); }
    .app-shell.sidebar-open .sidebar-scrim { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(8, 23, 31, .5); border: 0; }
    .app-shell.sidebar-collapsed .sidebar { width: min(82vw, 260px); }
    .app-shell.sidebar-collapsed .brand span,
    .app-shell.sidebar-collapsed .nav-section-title,
    .app-shell.sidebar-collapsed .nav-label,
    .app-shell.sidebar-collapsed .nav-arrow { display: inline; }
    .app-shell.sidebar-collapsed .submenu { display: none; }
    .app-shell.sidebar-collapsed .nav-group.open .submenu { display: flex; }
    .app-shell.sidebar-collapsed .sidebar-collapse { position: static; width: 30px; height: 30px; }
    .app-shell.sidebar-collapsed .nav-item { justify-content: flex-start; padding-inline: 12px; }
    .app-shell.sidebar-collapsed .nav-icon { width: 32px; height: 32px; flex-basis: 32px; }
    .topbar-leading { display: inline-flex; }
    .mobile-menu,
    .topbar-home-btn { display: inline-grid; }
    .topbar-context { display: none; }
    .topbar { padding-inline: 12px; }
    .topbar-user { gap: 12px; }
    .main-content { padding: 12px; }
    .page-heading { margin: -12px -12px 12px; padding: 10px 12px; }
    .cols-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 1; }
    .span-9, .span-10, .span-11, .span-12 { grid-column: 1 / -1; }
    .search-grid, .cliente-search-grid, .produtos-search-grid, .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-actions { grid-column: 1 / -1; }
    .entrada-saida-group,
    .entrada-saida-filter-actions { grid-column: 1 / -1; }
    .entrada-saida-filter-actions { justify-content: stretch; }
    .entrada-saida-filter-actions .button { width: 100%; }
    .product-image-panel { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    h1 { font-size: 21px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .page-actions { width: 100%; overflow-x: auto; }
    .page-actions .button { flex: 1 0 auto; }
    .cols-12, .search-grid, .cliente-search-grid, .produtos-search-grid, .report-grid { grid-template-columns: 1fr; }
    .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: 1; }
    .filter-actions { grid-column: 1; }
    .filter-actions .button { flex: 1; }
    .tab-panel { padding: 14px; }
    .tabs { overflow-x: auto; padding-inline: 6px; }
    .tab { flex: 1 0 auto; }
    .welcome-panel { min-height: 280px; flex-direction: column; gap: 16px; text-align: center; }
    .welcome-panel img { width: 105px; height: 105px; }
    .welcome-panel h2 { font-size: 23px; }
    .metric-grid { grid-template-columns: 1fr; }
    .topbar-user strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .product-image-bank-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 14px; }
    .product-variations-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 14px; }
    .product-image-bank-header, .product-image-bank-footer { align-items: flex-start; flex-direction: column; }
    .product-variations-dialog-header { align-items: flex-start; flex-direction: column; }
    .product-variations-dialog-header .button { width: 100%; }
    .product-variations-dialog .product-variation-wrap { max-height: calc(100vh - 150px); }
    .product-image-bank-footer .button { width: 100%; }
    .product-image-bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .product-image-bank-item img { height: 112px; }
}

/* Detalhes da venda (modal) */
.sale-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.sale-detail-summary > div {
    background: #f4f6f8;
    border: 1px solid #e6eaee;
    border-radius: 8px;
    padding: 10px 12px;
}
.sale-detail-summary span {
    display: block;
    font-size: 12px;
    color: #6b7a86;
    margin-bottom: 2px;
}
.sale-detail-summary strong {
    font-size: 15px;
    color: #1a2b36;
    word-break: break-word;
}
.sale-detail-subtitle {
    margin: 18px 0 8px;
    font-size: 16px;
    color: #1a2b36;
}
.sale-detail-empty {
    color: #6b7a86;
}
#saleDetailContent {
    padding: 5mm;
}
.recebimento-pix-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    min-width: 0;
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}
.recebimento-pix-button:hover {
    background: #1ebe5d;
    border-color: #1ebe5d;
    color: #fff;
}
.pix-cobranca-content {
    padding: 5mm;
}
.pix-cobranca-actions {
    margin-top: 12px;
}
.os-cliente-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.os-cliente-codigo { flex: 0 0 130px; max-width: 130px; }
.os-cliente-nome { flex: 1 1 220px; }
#osClienteBusca { flex: 1 1 220px; }
.os-cliente-resultados { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 320px; overflow: auto; }
.os-cliente-result { text-align: left; padding: 10px 12px; background: #f4f6f8; border: 1px solid #e6eaee; border-radius: 6px; cursor: pointer; }
.os-cliente-result:hover { background: #eaf1f7; border-color: #47bd8a; }
.label-print-controls, .label-print-queue-panel { display: grid; gap: 16px; }
.label-print-product-title { margin: 2px -20px -16px; padding: 16px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.label-print-product-grid { display: grid; grid-template-columns: 160px 62px minmax(260px, 1fr) minmax(220px, .8fr) 140px 130px; grid-template-areas: "code codebtn description grade search search" ". . . quantity include include"; gap: 10px; align-items: end; }
.label-print-product-grid .button { min-height: 42px; }
.label-print-code { grid-area: code; }
.label-print-code-button { grid-area: codebtn; min-width: 0; padding-inline: 8px; font-size: 12px; }
.label-print-description { grid-area: description; }
.label-print-grade { grid-area: grade; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.label-print-grade[hidden] { display: none; }
.label-print-grade .field { min-width: 0; }
.label-print-grade select { min-height: 42px; font-size: 14px; font-weight: 800; }
.label-print-search-button { grid-area: search; }
.label-print-quantity { grid-area: quantity; }
.label-print-include { grid-area: include; }
.label-print-product-grid:not(:has(.label-print-grade:not([hidden]))) { grid-template-areas: "code codebtn description description search search" ". . . quantity include include"; }
.label-print-selected { min-height: 20px; color: #526476; font-size: 13px; font-weight: 700; }
.label-print-search-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.label-print-search-actions span { color: #526476; font-size: 14px; }
.label-print-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; max-height: 240px; overflow: auto; padding: 10px; border: 1px solid #d7e0e8; background: #f7fafc; }
.label-print-result { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; text-align: left; padding: 10px; border: 1px solid #c9d8e3; border-radius: 6px; background: #fff; color: #132a3a; cursor: pointer; }
.label-print-result:hover { border-color: #159b84; background: #edf9f4; }
.label-print-result strong { grid-row: span 2; color: #087d70; }
.label-print-result small { color: #66788a; }
.label-print-item-fields { align-items: end; }
.label-print-add-wrap { display: flex; flex-direction: column; }
.label-print-add-wrap .button { width: 100%; }
.label-print-queue td { vertical-align: middle; }
@media (max-width: 768px) {
    .label-print-item-fields .span-4, .label-print-item-fields .span-2 { grid-column: span 12; }
    .label-print-product-grid { grid-template-columns: 1fr 80px; grid-template-areas: "code codebtn" "description description" "grade grade" "search search" "quantity quantity" "include include"; }
    .label-print-product-grid:not(:has(.label-print-grade:not([hidden]))) { grid-template-areas: "code codebtn" "description description" "search search" "quantity quantity" "include include"; }
}
@media (max-width: 768px) {
    .sale-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.olist-catalog-progress {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfc;
    display: grid;
    gap: 8px;
}
.olist-catalog-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.olist-catalog-progress-head strong { font-size: 14px; color: var(--ink); }
.olist-catalog-progress-head span { font-size: 13px; font-weight: 800; color: var(--primary-dark); }
.olist-catalog-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce8eb;
}
.olist-catalog-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f8f86, #14b8a6);
    transition: width .2s ease;
}
.olist-catalog-progress-message,
.olist-catalog-progress-stats {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.olist-catalog-progress-stats { font-weight: 700; color: #3d5a66; }
