#salesCenterView .sales-center-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #17202a;
}

#salesCenterView .ml-account-status {
    display: flex; align-items: center; flex-wrap: wrap; gap: .6rem;
    padding: .8rem 1rem; border: 1px solid #b9d7c7; border-radius: .7rem;
    background: #effaf3; color: #17432e; font-size: .9rem;
}
#salesCenterView .ml-account-status[hidden] { display: none; }
#salesCenterView .ml-account-status select,
#salesCenterView .ml-account-status button,
#salesCenterView .ml-account-status a { min-height: 40px; border-radius: .5rem; }
#salesCenterView .ml-account-status select { max-width: 100%; padding: .4rem; border: 1px solid #86b89a; background: white; }
#salesCenterView .ml-account-status a { display: inline-flex; align-items: center; color: #0b6340; text-decoration: underline; }
#salesCenterView .ml-account-status button { padding: .3rem .7rem; background: white; border: 1px solid #86b89a; }
#salesCenterView .simulator-card input[type="search"],
#salesCenterView .simulator-card input#kit-title,
#salesCenterView .simulator-card input#kit-price {
    display: block; width: 100%; min-height: 44px; margin: .45rem 0 .7rem;
    padding: .6rem .75rem; border: 1px solid #b9c6d2; border-radius: .55rem; background: white;
}
#salesCenterView .ml-product-results { max-height: 17rem; overflow: auto; margin-bottom: .65rem; }
#salesCenterView .ml-product-result {
    display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; width: 100%; gap: .65rem;
    padding: .7rem; border: 1px solid #e2e8f0; background: white; text-align: left;
}
#salesCenterView .ml-product-result .ml-product-thumb { grid-row: 1 / span 2; width: 52px; height: 52px; object-fit: contain; border-radius: .45rem; background: #f3f4f6; }
#salesCenterView .ml-draft-preview { max-height: 18rem; overflow: auto; padding: .75rem; border-radius: .5rem; background: #111827; color: #f9fafb; font-size: .75rem; white-space: pre-wrap; }
#salesCenterView .ml-safe-draft { margin-top: 1rem; padding: 1rem; border: 1px solid #86b89a; border-radius: .65rem; background: #effaf3; }
#salesCenterView .ml-product-result:hover, #salesCenterView .ml-product-result:focus-visible { background: #effaf3; }
#salesCenterView .ml-product-result small { color: #64748b; }
#salesCenterView .ml-selected-thumb { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #f3f4f6; vertical-align: middle; margin-right: .5rem; }
#salesCenterView .ml-product-thumb-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 9px; color: #6b7280; text-align: center; }
#salesCenterView .ml-selected-thumb { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #f3f4f6; vertical-align: middle; margin-right: .5rem; }
#salesCenterView .ml-product-thumb-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 9px; color: #6b7280; text-align: center; }
#salesCenterView .ml-selected-product, #salesCenterView .ml-kit-summary { margin: .75rem 0; font-weight: 600; }
#salesCenterView .ml-kit-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: .7rem;
    padding: .65rem 0; border-bottom: 1px solid #e2e8f0;
}
#salesCenterView .ml-kit-row span { flex: 1 1 14rem; }
#salesCenterView .ml-kit-row small { display: block; color: #64748b; }
#salesCenterView .ml-kit-row input { width: 4rem; min-height: 42px; border: 1px solid #b9c6d2; border-radius: .4rem; padding: .3rem; }
#salesCenterView .ml-kit-row button { min-height: 42px; padding: .4rem .65rem; border: 1px solid #b9c6d2; border-radius: .4rem; }
#salesCenterView #kit-result { margin-top: 1rem; }
#salesCenterView #kit-result p { margin: .65rem 0; }
#salesCenterView .simulator-card .ml-search-hint { margin: -.3rem 0 .65rem; font-size: .8rem; color: #64748b; }
#salesCenterView .ml-action-row { display: flex; flex-wrap: wrap; gap: .5rem; }
#salesCenterView .btn-danger { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }
#salesCenterView .btn-danger:hover { background: #ffe4e6; }
#salesCenterView .ml-cost-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
#salesCenterView .ml-cost-inputs label { font-size: .85rem; font-weight: 600; }
#salesCenterView .ml-cost-inputs input { display: block; width: 100%; min-height: 42px; margin-top: .3rem; padding: .45rem; border: 1px solid #b9c6d2; border-radius: .45rem; }
#salesCenterView .ml-price-input { width: 100%; min-height: 44px; padding: .5rem .65rem; border: 1px solid #86b89a; border-radius: .5rem; font-size: 1.05rem; font-weight: 700; color: #17432e; background: #fff; }
#salesCenterView #ml-cost-total { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .8rem; padding: .8rem; border-radius: .6rem; background: #f8fafc; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
#salesCenterView #ml-cost-total strong, #salesCenterView #ml-cost-total small { grid-column: 1 / -1; }
#salesCenterView #ml-cost-total span { font-size: .84rem; color: #475569; }
#salesCenterView #ml-cost-total small { color: #64748b; }
#salesCenterView #ml-cost-total[data-margin-health="negative"] { background: #fff1f2; border: 2px solid #fb7185; box-shadow: 0 0 0 3px rgba(251,113,133,.08); }
#salesCenterView #ml-cost-total[data-margin-health="low"] { background: #fff7ed; border: 1px solid #fdba74; }
#salesCenterView #ml-cost-total[data-margin-health="attention"] { background: #fffbeb; border: 1px solid #fcd34d; }
#salesCenterView #ml-cost-total[data-margin-health="healthy"] { background: #ecfdf3; border: 2px solid #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.09); }
#salesCenterView #ml-cost-total[data-margin-health="healthy"] strong { color: #116530; }
#salesCenterView #ml-cost-total[data-margin-health="negative"] strong { color: #9f1239; }
#salesCenterView .ml-sim-product-card { grid-column: 1 / -1; display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #d7e5dc; border-radius: .8rem; background: linear-gradient(135deg, #f7fcf9, #fff); }
#salesCenterView .ml-fiscal-readiness { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; border: 1px solid #f59e0b; border-radius: .8rem; background: #fffbeb; }
#salesCenterView .ml-fiscal-readiness.is-ready { border-color: #16a34a; background: #f0fdf4; }
#salesCenterView .ml-fiscal-readiness > div { display: grid; gap: .2rem; }
#salesCenterView .ml-fiscal-readiness small { color: #475569; }
#salesCenterView .ml-fiscal-badge { flex: 0 0 auto; padding: .3rem .55rem; border-radius: 999px; color: #92400e; background: #fef3c7; font-weight: 700; font-size: .75rem; }
#salesCenterView .ml-fiscal-readiness.is-ready .ml-fiscal-badge { color: #166534; background: #dcfce7; }
#salesCenterView .ml-sim-product-card div { display: grid; gap: .35rem; }
#salesCenterView .ml-sim-product-card small { color: #64748b; }
#salesCenterView .ml-sim-product-image { width: 132px; height: 132px; object-fit: contain; border-radius: .7rem; background: #fff; border: 1px solid #e2e8f0; }
#salesCenterView .ml-photo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#salesCenterView .ml-market-comparison { grid-column: 1 / -1; margin-top: .75rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }
#salesCenterView .ml-market-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .7rem; }
#salesCenterView .ml-market-heading div { display: grid; gap: .25rem; }
#salesCenterView .ml-market-heading small { color: #64748b; }
#salesCenterView .ml-market-heading > span { white-space: nowrap; font-size: .75rem; color: #0b6340; background: #effaf3; padding: .3rem .55rem; border-radius: 999px; }
#salesCenterView .ml-similar-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
#salesCenterView .ml-similar-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .65rem; align-items: center; padding: .65rem; border: 1px solid #e2e8f0; border-radius: .6rem; color: inherit; text-decoration: none; background: #fff; }
#salesCenterView .ml-similar-card:hover { border-color: #86b89a; box-shadow: 0 5px 16px rgba(20, 116, 66, .08); }
#salesCenterView .ml-similar-card img, #salesCenterView .ml-similar-card > .ml-product-thumb-empty { width: 64px; height: 64px; object-fit: contain; border-radius: .45rem; background: #f8fafc; }
#salesCenterView .ml-similar-card span { min-width: 0; display: grid; gap: .25rem; }
#salesCenterView .ml-similar-card strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .82rem; }
#salesCenterView .ml-similar-card small { color: #0b6340; font-weight: 700; }
@media (max-width: 520px) { #salesCenterView .ml-cost-inputs { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
    #salesCenterView .ml-fiscal-readiness { align-items: flex-start; flex-direction: column; }
    #salesCenterView .ml-sim-product-card { grid-template-columns: 88px minmax(0, 1fr); }
    #salesCenterView .ml-sim-product-image { width: 88px; height: 88px; }
    #salesCenterView .ml-similar-list { grid-template-columns: 1fr; }
    #salesCenterView .ml-market-heading { align-items: stretch; flex-direction: column; }
    #salesCenterView .ml-market-heading > span { align-self: flex-start; }
}

#salesCenterView .sales-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#salesCenterView .header-title h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

#salesCenterView .header-title p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Tabs System */
#salesCenterView .sales-center-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

#salesCenterView .tab-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#salesCenterView .tab-btn i {
    font-size: 1rem;
}

#salesCenterView .tab-btn:hover {
    color: #111827;
    background-color: #f9fafb;
}

#salesCenterView .tab-btn.active {
    color: #147442;
    border-bottom-color: #147442;
}

/* Content Panes */
#salesCenterView .tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

#salesCenterView .tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Quotes Tab */
#salesCenterView .content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#salesCenterView .search-box {
    flex: 1;
    min-width: 250px;
}

#salesCenterView .search-box input, #salesCenterView .filter-box select {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

#salesCenterView .table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#salesCenterView .sales-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

#salesCenterView .sales-table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

#salesCenterView .sales-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

/* Simulator Tab */
#salesCenterView .simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

#salesCenterView .simulator-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

#salesCenterView .simulator-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #111827;
}

#salesCenterView .simulator-card p {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

#salesCenterView .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#salesCenterView .field-row {
    display: flex;
    gap: 0.5rem;
}

#salesCenterView .field-row input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
}

#salesCenterView .btn-action {
    padding: 0.75rem 1.5rem;
    background: #147442;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

#salesCenterView .btn-action:hover {
    opacity: 0.9;
}

#salesCenterView .result-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#salesCenterView .empty-state {
    text-align: center;
    color: #9ca3af;
}

#salesCenterView .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Sim result data */
#salesCenterView .sim-result-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

#salesCenterView .sim-result-item:last-child {
    border-bottom: none;
}

#salesCenterView .sim-label {
    color: #6b7280;
    font-weight: 500;
}

#salesCenterView .sim-value {
    font-weight: 700;
    color: #111827;
}

#salesCenterView .sim-profit {
    color: #059669;
}

/* Opportunities/Drafts Grid */
#salesCenterView .opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: clamp(12px, 2vw, 20px);
    align-items: start;
}

#salesCenterView .ml-opportunity-worker { grid-column: 1 / -1; }
#salesCenterView .ml-opportunity-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
#salesCenterView .ml-opportunity-bulk label, #salesCenterView .opp-select { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; }
#salesCenterView .opp-select { align-self: start; font-size: .82rem; font-weight: 700; color: #38535b; }
#salesCenterView .ml-queue-status { display: block; margin-top: 6px; color: #116a46; font-weight: 700; }

#salesCenterView .opp-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s;
    min-width: 0;
    overflow: hidden;
}

#salesCenterView .opp-card:hover {
    transform: translateY(-4px);
}

#salesCenterView .opp-header {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

#salesCenterView .opp-name {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

#salesCenterView .opp-stock {
    background: #ecfdf5;
    color: #065f46;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

#salesCenterView .opp-details { overflow-wrap: anywhere; }

#salesCenterView .opp-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
}

#salesCenterView .opp-footer button { width: 100%; min-width: 0; min-height: 44px; white-space: normal; line-height: 1.2; }

@media (max-width: 1100px) {
    #salesCenterView .opportunities-grid { grid-template-columns: 1fr; }
}

#salesCenterView .ml-listings-toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(220px, auto) auto auto; gap: 10px; align-items: center; margin-bottom: 10px; }
#salesCenterView .ml-listings-toolbar :is(input, select) { min-height: 44px; border: 1px solid #cfdbdd; border-radius: 10px; padding: 9px 12px; }
#salesCenterView .ml-check-all { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#salesCenterView .ml-listings-help { margin: 0 0 14px; color: #536970; font-size: .84rem; }
#salesCenterView .ml-listings-primary-actions { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #b8ded0; border-radius: 12px; background: #eefaf4; color: #294b42; }
#salesCenterView .ml-listings-primary-actions span { font-size: .86rem; }
#salesCenterView .ml-listings-summary { margin-bottom: 12px; font-weight: 700; color: #26434b; }
#salesCenterView .ml-listings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
#salesCenterView .ml-listing-card { display: grid; grid-template-columns: auto 84px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid #dce7e5; border-radius: 14px; background: #fff; min-width: 0; }
#salesCenterView .ml-listing-card img { width: 84px; height: 84px; object-fit: contain; border: 1px solid #edf1f0; border-radius: 10px; }
#salesCenterView .ml-listing-group { display:flex; align-items:center; gap:14px; padding:16px; border:1px solid #b9ddd1; border-radius:14px; background:linear-gradient(135deg,#fff,#f0fbf6); }
#salesCenterView .ml-listing-group img { width:92px; height:92px; object-fit:contain; border-radius:12px; background:#fff; }
#salesCenterView .ml-listing-group p { margin:5px 0 12px; color:#52635f; }
.ml-group-modal { position:fixed; inset:0; z-index:10050; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(5,20,17,.68); }
.ml-group-modal.hidden { display:none; }
.ml-group-sheet { width:min(1100px,96vw); max-height:92vh; overflow:auto; border-radius:18px; background:#f4f7f6; box-shadow:0 24px 70px rgba(0,0,0,.3); }
.ml-group-sheet > header { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 18px; background:#fff; border-bottom:1px solid #dce7e5; }
.ml-group-sheet > header div { display:flex; flex-direction:column; }
.ml-group-sheet > header button { border:0; background:#e9f3ef; width:40px; height:40px; border-radius:50%; font-size:25px; cursor:pointer; }
.ml-group-variants { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr)); gap:12px; padding:14px; }
.ml-group-variants .ml-listing-card { display:grid; grid-template-columns:auto 70px minmax(0,1fr); background:#fff; }
.ml-group-variants .ml-listing-card img { width:70px; height:70px; }
#salesCenterView .ml-listing-main { min-width: 0; }
#salesCenterView .ml-listing-main strong { display: block; overflow-wrap: anywhere; line-height: 1.3; }
#salesCenterView .ml-listing-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0; font-size: .82rem; color: #52666c; }
#salesCenterView .ml-listing-actions { display: grid; grid-template-columns: minmax(110px, 1fr) auto; gap: 8px; }
#salesCenterView .ml-listing-actions input { width: 100%; min-height: 40px; border: 1px solid #cfdbdd; border-radius: 9px; padding: 8px 10px; }
#salesCenterView .ml-view-listing { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; background: #0b6f50; color: #fff; font-weight: 700; }
#salesCenterView .ml-product-picture-preview { display: grid; grid-template-columns: repeat(3, minmax(64px, 96px)); gap: 8px; align-items: center; }
#salesCenterView .ml-product-picture-preview .ml-sim-product-image { width: 100%; aspect-ratio: 1; height: auto; object-fit: contain; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #salesCenterView .simulator-grid {
        grid-template-columns: 1fr;
    }

    #salesCenterView .sales-center-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #salesCenterView .header-actions {
        width: 100%;
    }

    #salesCenterView .btn-primary {
        width: 100%;
        padding: 0.75rem;
        text-align: center;
    }

    #salesCenterView .content-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Central de Vendas: componentes visiveis e independentes dos estilos do dashboard. */
#salesCenterView {
    background: #f4f7f8;
    color: #172b35;
}

#salesCenterView [hidden],
#salesCenterView .tab-pane[hidden] {
    display: none !important;
}

#salesCenterView .sales-center-wrapper {
    gap: 0;
    width: 100%;
    min-height: 0;
    padding: 0;
}

#salesCenterView .sales-center-header {
    padding: 24px clamp(16px, 3vw, 40px);
    background: #fff;
    border-bottom: 1px solid #e2e9e9;
}

#salesCenterView .header-title h2 {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    line-height: 1.25;
}

#salesCenterView .header-title p {
    margin-top: 5px;
}

#salesCenterView .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#salesCenterView .btn-primary,
#salesCenterView .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #116a46;
    background: #116a46;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

#salesCenterView .btn-primary:hover,
#salesCenterView .btn-action:hover { background: #0c5136; }
#salesCenterView .header-actions .btn-action { background: #fff; color: #116a46; }
#salesCenterView .header-actions .btn-action:hover { background: #eff8f3; }

#salesCenterView .sales-center-tabs {
    padding: 0 clamp(16px, 3vw, 40px);
    background: #fff;
    border-bottom: 1px solid #e2e9e9;
}

#salesCenterView .sales-center-tabs .tab-btn {
    min-height: 48px;
    border-radius: 0;
    color: #49616a;
    font-weight: 650;
}

#salesCenterView .sales-center-tabs .tab-btn.active {
    color: #116a46;
    border-bottom: 3px solid #116a46;
}

#salesCenterView .sales-center-content {
    flex: 1;
    min-height: 0;
    padding: 24px clamp(16px, 3vw, 40px) 40px;
}

/* O simulador ocupa a altura disponível da Central. No desktop, cada coluna
   rola internamente e o cabeçalho/abas permanecem visíveis. */
@media (min-width: 900px) {
    #salesCenterView #tab-simulator.active {
        height: auto;
        min-height: 0;
        overflow: visible;
        overscroll-behavior: contain;
        padding-right: 4px;
    }
    #salesCenterView #tab-simulator.active .simulator-grid {
        height: auto;
        min-height: 0;
        grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }
    #salesCenterView #tab-simulator.active .simulator-card {
        min-height: 0;
        overflow: visible;
        padding: 14px;
    }
    #salesCenterView #tab-simulator.active .result-card { min-height: 260px; max-height: none; justify-content: flex-start; }
    #salesCenterView #tab-simulator.active .sim-result-grid { gap: 7px; }
    #salesCenterView #tab-simulator.active .sim-result-item { padding: 8px 10px; }
    #salesCenterView #tab-simulator.active .ml-sim-product-card { grid-template-columns: 92px minmax(0, 1fr); padding: 10px; }
    #salesCenterView #tab-simulator.active .ml-sim-product-image { width: 92px; height: 92px; }
    #salesCenterView #tab-simulator.active .ml-cost-inputs { grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 7px; margin: 8px 0; }
    #salesCenterView #tab-simulator.active .ml-cost-inputs input { min-height: 36px; }
}

#salesCenterView .ml-creation-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
#salesCenterView .ml-publish-dock { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 14px; border:2px solid #168258; border-radius:14px; background:#effcf5; box-shadow:0 8px 24px rgba(12,81,54,.12); }
#salesCenterView .ml-publish-dock > div { display:flex; min-width:0; flex-direction:column; gap:3px; }
#salesCenterView .ml-publish-dock strong { color:#0c5136; }
#salesCenterView .ml-publish-dock small { color:#365d4e; overflow-wrap:anywhere; }
#salesCenterView .ml-publish-dock .btn-action { min-height:48px; flex:0 0 auto; padding-inline:22px; font-size:.95rem; }
#salesCenterView .ml-publish-dock .btn-action:disabled { background:#9aa9a3; cursor:not-allowed; opacity:.8; }
#salesCenterView .ml-cost-details { margin:4px 0; border:1px solid #d9e5e1; border-radius:12px; background:#fbfdfc; }
#salesCenterView .ml-cost-details summary { min-height:44px; padding:12px 14px; color:#155c41; font-weight:800; cursor:pointer; }
#salesCenterView .ml-cost-details[open] summary { border-bottom:1px solid #e2ebe8; }
#salesCenterView .ml-cost-details .ml-cost-inputs, #salesCenterView .ml-cost-details .sim-hint { margin-inline:12px; }
#salesCenterView .ml-creation-extras .simulator-card { min-width: 0; }
#salesCenterView #tab-simulator::before {
    content: "1  Buscar produto   →   2  Conferir foto e concorrência   →   3  Ajustar preço e custos   →   4  Criar anúncio";
    display: block;
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid #cfe3da;
    border-radius: 12px;
    background: #f1faf5;
    color: #245744;
    font-size: .84rem;
    font-weight: 700;
}
#salesCenterView .ml-creation-extras .is-collapsible { transition: max-height .2s ease, box-shadow .2s ease; overflow: hidden; }
#salesCenterView .ml-creation-extras .is-collapsible > h3 { position: relative; margin: 0; padding-right: 30px; cursor: pointer; user-select: none; }
#salesCenterView .ml-creation-extras .is-collapsible > h3::after { content: "−"; position: absolute; right: 3px; top: -2px; font-size: 1.4rem; color: #116a46; }
#salesCenterView .ml-creation-extras .is-collapsible.is-collapsed { max-height: 58px; box-shadow: none; }
#salesCenterView .ml-creation-extras .is-collapsible.is-collapsed > h3::after { content: "+"; }
#salesCenterView .ml-skeleton { display: grid; gap: 10px; width: 100%; }
#salesCenterView .ml-skeleton span { height: 58px; border-radius: 10px; background: linear-gradient(90deg, #eef2f1 25%, #f9fbfa 50%, #eef2f1 75%); background-size: 200% 100%; animation: mlSkeleton 1.1s infinite linear; }
@keyframes mlSkeleton { to { background-position: -200% 0; } }

#salesCenterView .content-toolbar {
    justify-content: flex-start;
    margin-bottom: 16px;
}

#salesCenterView .content-toolbar input,
#salesCenterView .content-toolbar select {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #cfdbdd;
    border-radius: 10px;
    background: #fff;
    color: #172b35;
    font-size: .9rem;
}

#salesCenterView .content-toolbar input { width: min(100%, 340px); }
#salesCenterView .content-toolbar select { width: min(100%, 240px); }
#salesCenterView :is(button, input, select):focus-visible { outline: 3px solid #7dc9a3; outline-offset: 2px; }

#salesCenterView .table-responsive { border: 1px solid #e0e9e8; overflow: hidden; }
#salesCenterView .sales-table th { white-space: nowrap; }
#salesCenterView .sales-table td { color: #203942; }
#salesCenterView .sales-table tbody tr:hover { background: #f8fbf9; }
#salesCenterView .sales-empty-row td { padding: 30px 16px; text-align: center; color: #60737a; }

#salesCenterView .status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef3f5;
    color: #365362;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

#salesCenterView .status-badge[data-status="paid"] { background: #e5f8ed; color: #16643b; }
#salesCenterView .status-badge[data-status="payment_ready"] { background: #fff2d8; color: #805b13; }
#salesCenterView .status-badge[data-status="expired"] { background: #fce9e9; color: #994040; }

#salesCenterView .sales-row-actions { white-space: nowrap; }
#salesCenterView .sales-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 4px;
    border: 1px solid #d7e5e1;
    border-radius: 9px;
    background: #fff;
    color: #116a46;
    cursor: pointer;
}
#salesCenterView .sales-icon-button:hover { background: #eef8f3; }

@media (max-width: 700px) {
    #salesCenterView .sales-center-header { align-items: stretch; padding: 16px; }
    #salesCenterView .header-actions { width: 100%; }
    #salesCenterView .header-actions > button,
    #salesCenterView .header-actions > a { flex: 1 1 135px; }
    #salesCenterView .sales-center-tabs { padding: 0 12px; }
    #salesCenterView .sales-center-tabs { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
    #salesCenterView .sales-center-tabs .tab-btn { flex: 0 0 auto; scroll-snap-align: start; }
    #salesCenterView .sales-center-tabs .tab-btn { padding: 10px 12px; font-size: .83rem; }
    #salesCenterView .sales-center-content { padding: 16px 12px 28px; }
    #salesCenterView .simulator-grid { grid-template-columns: 1fr; gap: 12px; }
    #salesCenterView .simulator-card { padding: 14px; border-radius: 14px; }
    #salesCenterView .result-card { min-height: 150px; }
    #salesCenterView .content-toolbar { display: grid; grid-template-columns: 1fr; gap: 8px; }
    #salesCenterView .content-toolbar input,
    #salesCenterView .content-toolbar select { width: 100%; }
    #salesCenterView .table-responsive { border: 0; overflow: visible; background: transparent; box-shadow: none; }
    #salesCenterView .sales-table,
    #salesCenterView .sales-table tbody,
    #salesCenterView .sales-table tr,
    #salesCenterView .sales-table td { display: block; width: 100%; }
    #salesCenterView .sales-table thead { display: none; }
    #salesCenterView .sales-table tr {
        margin-bottom: 12px;
        padding: 8px 14px;
        border: 1px solid #e0e9e8;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(18, 55, 48, .05);
    }
    #salesCenterView .sales-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 0;
        overflow-wrap: anywhere;
    }
    #salesCenterView .sales-table td::before {
        content: attr(data-label);
        flex: 0 0 36%;
        color: #60737a;
        font-size: .75rem;
        font-weight: 700;
    }
    #salesCenterView .sales-table .sales-empty-row td { display: block; }
    #salesCenterView .sales-table .sales-empty-row td::before { content: none; }
    #salesCenterView .sales-row-actions { justify-content: flex-end; }
    #salesCenterView .ml-account-status { display: grid; grid-template-columns: 1fr; align-items: stretch; }
    #salesCenterView .ml-account-status :is(select, a, button) { width: 100%; min-height: 44px; }
    #salesCenterView .opp-card { padding: 14px; }
    #salesCenterView .opp-header { grid-template-columns: 76px minmax(0, 1fr); }
    #salesCenterView .opp-header .ml-product-thumb { width: 76px; height: 76px; grid-row: 1 / span 2; }
    #salesCenterView .opp-stock { grid-column: 2; justify-self: start; }
    #salesCenterView .opp-footer { grid-template-columns: 1fr; }
    #salesCenterView .ml-opportunity-bulk { display: grid; grid-template-columns: 1fr; }
    #salesCenterView .ml-opportunity-bulk .btn-action { width: 100%; white-space: normal; }
    #salesCenterView .ml-listings-toolbar { grid-template-columns: 1fr; }
    #salesCenterView .ml-listings-primary-actions { align-items: stretch; flex-direction: column; }
    #salesCenterView .ml-listings-primary-actions .btn-action { width: 100%; min-height: 46px; }
    #salesCenterView .ml-check-all { min-height: 44px; }
    #salesCenterView .ml-listing-card { grid-template-columns: auto 68px minmax(0, 1fr); padding: 12px; gap: 9px; }
    #salesCenterView .ml-listing-card img { width: 68px; height: 68px; }
    #salesCenterView .ml-listing-actions { grid-column: 1 / -1; grid-template-columns: 1fr; }
    #salesCenterView .ml-listing-actions .btn-action { width: 100%; min-height: 44px; white-space: normal; }
    #salesCenterView .ml-listing-card { overflow: hidden; }
    #salesCenterView .ml-listing-main { min-width: 0; overflow-wrap: anywhere; }
    #salesCenterView .ml-creation-extras { grid-template-columns: 1fr; }
    #salesCenterView #tab-simulator::before { content: "Buscar → Conferir → Ajustar → Criar"; font-size: .78rem; }
    #salesCenterView .ml-publish-dock { position:sticky; bottom:max(8px,env(safe-area-inset-bottom)); z-index:20; align-items:stretch; flex-direction:column; padding:12px; box-shadow:0 14px 36px rgba(4,37,26,.28); }
    #salesCenterView .ml-publish-dock .btn-action { width:100%; min-height:52px; font-size:1rem; }
    #salesCenterView .ml-cost-details:not([open]) + #ml-cost-total { margin-top:6px; }
}

@media (prefers-reduced-motion: reduce) {
    #salesCenterView .tab-pane { animation: none; }
    #salesCenterView .ml-skeleton span { animation: none; }
}

/* Orcamento e detalhes em dialogs independentes da folha principal. */
#newQuoteModal > div,
#viewQuoteModal > div {
    border: 1px solid #dce8e5;
    color: #18313a;
}

#newQuoteModal h3,
#viewQuoteModal h3 { line-height: 1.25; }

#newQuoteModal label,
#newQuoteModal legend { color: #35535d; font-size: .85rem; font-weight: 700; }

#newQuoteModal #quote-customer-search,
#newQuoteModal #quote-prod-search {
    min-height: 44px;
    margin-top: 6px;
    border: 1px solid #cbdcda;
    border-radius: 10px;
}

#newQuoteModal fieldset {
    padding: 12px 14px;
    border: 1px solid #e1eae8;
    border-radius: 10px;
}

#newQuoteModal fieldset label { display: inline-flex; align-items: center; gap: 6px; margin: 8px 18px 0 0; font-weight: 500; }
#newQuoteModal table, #viewQuoteModal table { width: 100%; min-width: 330px; }
#newQuoteModal th, #viewQuoteModal th { padding: 10px 8px; border-bottom: 1px solid #dde7e5; text-align: left; }
#newQuoteModal td, #viewQuoteModal td { padding: 10px 8px; }

#newQuoteModal button,
#viewQuoteModal button {
    min-height: 40px;
    border-radius: 9px;
    cursor: pointer;
}

#newQuoteModal #btn-save-quote,
#viewQuoteModal #btn-resend-quote {
    padding: 10px 16px;
    border: 1px solid #116a46;
    background: #116a46;
    color: #fff;
    font-weight: 700;
}

#newQuoteModal #btn-save-quote:hover,
#viewQuoteModal #btn-resend-quote:hover { background: #0c5136; }
#newQuoteModal #btn-save-quote:disabled,
#viewQuoteModal #btn-resend-quote:disabled { opacity: .55; cursor: wait; }

#newQuoteModal button:not(#btn-save-quote),
#viewQuoteModal button:not(#btn-resend-quote) { padding: 8px 12px; color: #116a46; }

#salesCenterView .ml-scan-field { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; }
#salesCenterView .ml-scan-field input { min-width:0; width:100%; }
#salesCenterView .btn-barcode-camera { display:inline-flex; min-height:44px; align-items:center; justify-content:center; gap:7px; padding:0 14px; border:1px solid #087451; border-radius:10px; background:#087451; color:#fff; font-weight:800; white-space:nowrap; cursor:pointer; }
#salesCenterView .btn-barcode-camera:hover { background:#065c41; }

.barcode-camera-modal { position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(2,10,18,.88); backdrop-filter:blur(5px); }
.barcode-camera-modal.hidden { display:none; }
.barcode-camera-sheet { width:min(100%,560px); overflow:hidden; border-radius:20px; background:#fff; box-shadow:0 24px 80px rgba(0,0,0,.45); }
.barcode-camera-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; background:#075f4a; color:#fff; }
.barcode-camera-head div { display:flex; min-width:0; flex-direction:column; }
.barcode-camera-head strong { font-size:1rem; }
.barcode-camera-head small { color:#c7f3e6; }
.barcode-camera-head button { display:grid; width:44px; height:44px; flex:0 0 44px; place-items:center; border:0; border-radius:50%; background:rgba(255,255,255,.14); color:#fff; cursor:pointer; }
.barcode-camera-viewport { position:relative; aspect-ratio:4/3; overflow:hidden; background:#02070a; }
.barcode-camera-viewport video { width:100%; height:100%; object-fit:cover; }
.barcode-camera-guide { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.barcode-camera-guide::before { content:""; width:min(82%,430px); height:34%; border:3px solid #53f3b1; border-radius:16px; box-shadow:0 0 0 999px rgba(0,0,0,.28),0 0 20px rgba(83,243,177,.7); }
.barcode-camera-guide span { position:absolute; width:min(76%,400px); height:2px; background:#ff4d67; box-shadow:0 0 10px #ff4d67; animation:barcode-scan 1.8s ease-in-out infinite alternate; }
.barcode-camera-status { margin:0; padding:13px 16px; color:#175243; font-weight:700; text-align:center; }
.barcode-camera-status.is-error { color:#a11928; background:#fff0f2; }
.barcode-camera-cancel { width:calc(100% - 32px); min-height:46px; margin:0 16px 16px; border:1px solid #cfdad7; border-radius:11px; background:#fff; color:#23433b; font-weight:800; cursor:pointer; }
@keyframes barcode-scan { from { transform:translateY(-55px); } to { transform:translateY(55px); } }

@media (max-width: 700px) {
    #newQuoteModal,
    #viewQuoteModal { align-items: flex-end; padding: 0; }
    #newQuoteModal > div,
    #viewQuoteModal > div {
        width: 100%;
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
        padding: 20px 16px max(20px, env(safe-area-inset-bottom));
    }
    #newQuoteModal #btn-save-quote { min-height: 44px; }
    #salesCenterView .ml-scan-field { grid-template-columns:1fr; }
    #salesCenterView .btn-barcode-camera { width:100%; }
    .barcode-camera-modal { align-items:flex-end; padding:0; }
    .barcode-camera-sheet { border-radius:20px 20px 0 0; padding-bottom:max(0px,env(safe-area-inset-bottom)); }
}

/* No celular/tablet a Central ocupa a viewport inteira: preserve o recorte
   seguro do aparelho e mantenha cabecalho/fechamento fora da area rolavel. */
@media (max-width: 1023px) {
    #salesCenterView {
        box-sizing: border-box;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        min-height: 0;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        overflow: hidden;
    }

    #salesCenterView .sales-center-wrapper {
        min-height: 0;
        overflow: hidden;
    }

    #salesCenterView .sales-center-header,
    #salesCenterView .sales-center-tabs,
    #salesCenterView .ml-account-status {
        flex: 0 0 auto;
    }

    #salesCenterView .sales-center-content {
        flex: 1 1 0%;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }
}

#salesCenterView .surprise-hero { display:grid; grid-template-columns:minmax(180px,320px) 1fr; gap:22px; align-items:center; padding:18px; margin-bottom:16px; border:1px solid #b7e2cf; border-radius:18px; background:linear-gradient(135deg,#f0fff8,#fffbea); }
#salesCenterView .surprise-hero img { width:100%; max-height:230px; object-fit:cover; border-radius:14px; }
#salesCenterView .surprise-hero h3 { margin:0 0 8px; font-size:clamp(1.25rem,2vw,1.8rem); }
#salesCenterView .surprise-summary { display:grid; grid-template-columns:repeat(6,minmax(130px,1fr)); gap:10px; margin-bottom:14px; }
#salesCenterView .surprise-summary > div { display:flex; flex-direction:column; gap:3px; min-height:76px; padding:12px; border:1px solid #d7e0e4; border-radius:12px; background:#fff; }
#salesCenterView .surprise-summary strong { font-size:1.2rem; color:#12332a; }
#salesCenterView .surprise-summary span { font-size:.78rem; color:#52636b; overflow-wrap:anywhere; }
#salesCenterView .surprise-summary .is-active { border-color:#62c596; background:#effcf5; }
#salesCenterView .surprise-summary .is-paused { border-color:#f3a6a6; background:#fff2f2; }
#salesCenterView .surprise-toolbar { display:flex; align-items:center; gap:10px; margin:10px 0 14px; }
#salesCenterView .surprise-toolbar select { min-width:190px; }
#salesCenterView .surprise-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(225px,1fr)); gap:12px; }
#salesCenterView .surprise-card { display:flex; flex-direction:column; gap:9px; min-width:0; padding:14px; border:1px solid #d9e1e5; border-left:5px solid #98a6ad; border-radius:13px; background:#fff; box-shadow:0 4px 14px rgba(22,48,40,.05); }
#salesCenterView .surprise-card.status-published { border-left-color:#139b61; }
#salesCenterView .surprise-card.status-queued { border-left-color:#e7b416; }
#salesCenterView .surprise-card.status-error { border-left-color:#d63636; }
#salesCenterView .surprise-card.status-manual_review { border-left-color:#6a70cc; }
#salesCenterView .surprise-card-head, #salesCenterView .surprise-card-meta { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; }
#salesCenterView .surprise-card-head strong { font-size:1.15rem; }
#salesCenterView .surprise-card-head span, #salesCenterView .surprise-card-meta { font-size:.76rem; color:#5e6c72; }
#salesCenterView .surprise-card p { margin:0; font-size:.8rem; color:#8a2828; overflow-wrap:anywhere; }

@media (max-width:900px) { #salesCenterView .surprise-summary { grid-template-columns:repeat(3,minmax(110px,1fr)); } }
@media (max-width:640px) {
    #salesCenterView .surprise-hero { grid-template-columns:1fr; padding:12px; }
    #salesCenterView .surprise-hero img { max-height:190px; }
    #salesCenterView .surprise-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #salesCenterView .surprise-grid { grid-template-columns:1fr; }
    #salesCenterView .surprise-toolbar { align-items:stretch; flex-direction:column; }
    #salesCenterView .surprise-toolbar select { width:100%; }
}
