:root {
    --app-bg: #f3f6fb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #667085;
    --primary: #321fdb;
    --primary-dark: #2819b3;
    --info: #0ea5e9;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --border: #e6eaf2;
    --sidebar: #111827;
    --sidebar-2: #0b1220;
    --shadow: 0 18px 48px rgba(16, 24, 40, .09);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.app-body,
body {
    margin: 0;
    min-height: 100vh;
    background: var(--app-bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { text-decoration: none; }
img { max-width: 100%; }

.btn {
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 10px 22px rgba(50, 31, 219, .18);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary { border-color: rgba(50,31,219,.35); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.form-control, .form-select, .input-group-text {
    border-radius: 12px;
    border-color: #d9e1ef;
}
.input-group .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn, .input-group .input-group-text { border-radius: 12px; }
.input-group > .btn:not(:first-child), .input-group > .input-group-text:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-control, .form-select { padding: .74rem .9rem; }
.form-control:focus, .form-select:focus {
    border-color: rgba(50,31,219,.45);
    box-shadow: 0 0 0 .22rem rgba(50,31,219,.10);
}
.form-label { color: #344054; font-weight: 800; font-size: .88rem; }
.text-muted { color: var(--muted) !important; }

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 16% 12%, rgba(50,31,219,.23), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(14,165,233,.18), transparent 28%),
        linear-gradient(135deg, #f9fbff, #edf3ff 52%, #f7fbff);
}
.login-card {
    width: min(460px, 100%);
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 28px;
    padding: 36px;
    box-shadow: 0 26px 70px rgba(16,24,40,.15);
    backdrop-filter: blur(12px);
}
.login-logo {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    margin-bottom: 20px;
    box-shadow: 0 18px 34px rgba(50,31,219,.25);
}
.login-card h1 { color: #111827; letter-spacing: -.03em; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 288px;
    background:
        linear-gradient(180deg, rgba(50,31,219,.14), transparent 22%),
        linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color: #e5e7eb;
    padding: 22px;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    box-shadow: 18px 0 50px rgba(15, 23, 42, .18);
}
.brand-box {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 4px 2px 22px;
    border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: #fff;
    font-size: 23px;
    box-shadow: 0 15px 30px rgba(50,31,219,.26);
}
.brand-name { font-weight: 900; font-size: 19px; line-height: 1; letter-spacing: -.02em; }
.brand-box small { color: #98a2b3; font-weight: 600; }
.menu { display: grid; gap: 8px; margin-top: 26px; }
.menu-link {
    color: #cbd5e1;
    padding: 13px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    transition: .18s ease;
    font-weight: 700;
}
.menu-link i { font-size: 18px; width: 24px; text-align: center; }
.menu-link:hover, .menu-link.active {
    color: #fff;
    background: rgba(255,255,255,.10);
}
.menu-link.active {
    background: linear-gradient(135deg, var(--primary), #5141e8);
    box-shadow: 0 14px 28px rgba(50,31,219,.32);
}
.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.09);
    padding-top: 18px;
}
.user-pill { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 900;
    flex: 0 0 auto;
}
.user-meta { min-width: 0; }
.user-pill strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill small { display: block; color: #98a2b3; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.logout { display: inline-flex; align-items: center; gap: 8px; color: #fecaca; margin-top: 14px; font-weight: 700; }
.logout:hover { color: #fff; }

.topbar {
    margin-left: 288px;
    min-height: 92px;
    background: rgba(243,246,251,.86);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 22px 34px;
    border-bottom: 1px solid rgba(230,234,242,.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.topbar small { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.topbar h1 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.035em; color: #111827; }
.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 12px;
    font-size: 22px;
    color: #111827;
}
.content-wrap { margin-left: 288px; padding: 30px 34px 52px; }
.sidebar-backdrop { display: none; }

/* Cards e tabelas */
.card-pro, .table-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.table-card { overflow: hidden; }
.table { --cui-table-bg: transparent; }
.table thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .045em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td, .table th { vertical-align: middle; padding: 1rem; }
.table-hover tbody tr:hover { background: #f9fbff; }
.badge-soft { border-radius: 999px; padding: 8px 11px; font-weight: 800; }
.section-title { font-size: 17px; font-weight: 900; margin-bottom: 14px; color: #111827; }

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 126px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.kpi-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--primary);
}
.kpi-card.success::before { background: var(--success); }
.kpi-card.warning::before { background: var(--warning); }
.kpi-card.danger::before { background: var(--danger); }
.kpi-card small { color: var(--muted); font-weight: 800; }
.kpi-card strong { display: block; font-size: 36px; line-height: 1.1; margin-top: 8px; letter-spacing: -.04em; }
.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: var(--primary);
    font-size: 25px;
}
.kpi-card.success .kpi-icon { background: #ecfdf3; color: var(--success); }
.kpi-card.warning .kpi-icon { background: #fffbeb; color: var(--warning); }
.kpi-card.danger .kpi-icon { background: #fef2f2; color: var(--danger); }
.product-row { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: #f8fafc; }
.copy-box { cursor: pointer; }
.best-price { background: #ecfdf3 !important; color: #166534 !important; font-weight: 900; }
.supplier-head { min-width: 190px; }

/* Área pública do fornecedor */
.public-wrap {
    min-height: 100vh;
    padding: 34px 16px;
    background:
        radial-gradient(circle at top right, rgba(50,31,219,.17), transparent 33%),
        radial-gradient(circle at top left, rgba(14,165,233,.13), transparent 28%),
        linear-gradient(135deg, #f8fafc, #eef4ff);
}
.public-card { max-width: 1160px; margin: 0 auto; }
.public-hero {
    background:
        linear-gradient(135deg, rgba(50,31,219,.92), rgba(14,20,44,.98)),
        #111827;
    color: #fff;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .18);
}
.public-hero small { color: #bfdbfe; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.public-hero h1 { font-weight: 900; margin: 6px 0 12px; letter-spacing: -.04em; }
.public-hero .badge { box-shadow: 0 12px 28px rgba(0,0,0,.12); }

@media (max-width: 1100px) {
    .sidebar { transform: translateX(-105%); transition: .2s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.48); z-index: 1030; }
    .topbar, .content-wrap { margin-left: 0; }
    .sidebar-toggle { display: inline-grid; place-items: center; }
}

@media (max-width: 768px) {
    .topbar { padding: 18px; min-height: auto; }
    .topbar h1 { font-size: 22px; }
    .content-wrap { padding: 20px 16px 42px; }
    .login-card { padding: 28px; border-radius: 22px; }
    .public-hero { padding: 22px; border-radius: 22px; }
    .kpi-card { min-height: auto; }
    .table td, .table th { padding: .82rem; }
}

@media (max-width: 576px) {
    .btn-group { display: grid; gap: 6px; width: 100%; }
    .btn-group .btn { border-radius: 10px !important; }
}


/* =========================================================
   V4.0 - Ajustes tela pública do fornecedor
   Colocar este arquivo em: /assets/css/style.css
   Atualize o link para ?v=4.0 no fornecedor.php
   ========================================================= */
html { scroll-behavior: smooth; }

.public-wrap {
    padding-top: 16px !important;
    padding-bottom: 28px !important;
}

.public-card {
    max-width: 930px !important;
}

.public-hero {
    padding: 16px 20px !important;
    border-radius: 18px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 12px 34px rgba(16, 24, 40, .16) !important;
}

.public-hero small {
    font-size: .66rem !important;
    letter-spacing: .08em !important;
}

.public-hero h1 {
    font-size: clamp(1.22rem, 2vw, 1.65rem) !important;
    line-height: 1.08 !important;
    margin: 4px 0 7px !important;
    letter-spacing: -.035em !important;
}

.public-hero p {
    font-size: .78rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0 !important;
}

.public-hero .badge {
    font-size: .75rem !important;
    padding: .4rem .65rem !important;
    border-radius: 999px !important;
}

.public-period-row {
    margin-top: 12px !important;
}

.public-period-box {
    padding: 8px 10px !important;
    border-radius: 11px !important;
    line-height: 1.18 !important;
}

.public-period-box small {
    font-size: .62rem !important;
}

.public-period-box strong {
    font-size: .84rem !important;
}

.supplier-form.card-pro {
    padding: 18px !important;
    border-radius: 16px !important;
}

.supplier-form h2 {
    font-size: 1rem !important;
}

.supplier-form .text-muted,
.supplier-form small {
    font-size: .78rem !important;
}

.supplier-form .form-label {
    font-size: .78rem !important;
    margin-bottom: 5px !important;
}

.supplier-form .form-control,
.supplier-form .form-select,
.supplier-form .input-group-text {
    min-height: 38px !important;
    padding: .52rem .72rem !important;
    font-size: .88rem !important;
    border-radius: 10px !important;
}

.supplier-form .input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.supplier-form .input-group-text {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.supplier-form hr {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}

.supplier-form .btn-lg {
    padding: .68rem 1rem !important;
    font-size: .95rem !important;
    border-radius: 12px !important;
}

.quote-product-table {
    margin-bottom: 0 !important;
}

.quote-product-table thead th {
    font-size: .66rem !important;
    padding: .7rem .75rem !important;
}

.quote-product-table td {
    padding: .62rem .75rem !important;
    font-size: .86rem !important;
}

.quote-product-table td strong {
    font-size: .86rem !important;
}

.quote-product-table .price-col {
    width: 150px !important;
    min-width: 150px !important;
}

.quote-product-table .ean-col {
    width: 145px !important;
    min-width: 120px !important;
}

.quote-product-table .obs-col {
    width: 210px !important;
    min-width: 180px !important;
}

.scroll-page-btn {
    position: fixed !important;
    right: 18px !important;
    bottom: 18px !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: linear-gradient(135deg, var(--primary), #5141e8) !important;
    color: #fff !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: grid !important;
    place-items: center !important;
    box-shadow: 0 14px 30px rgba(50, 31, 219, .35) !important;
    z-index: 99999 !important;
    cursor: pointer !important;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease !important;
}

.scroll-page-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 34px rgba(50, 31, 219, .45) !important;
}

@media (max-width: 768px) {
    .public-wrap {
        padding: 10px 8px 22px !important;
    }

    .public-card {
        max-width: 100% !important;
    }

    .public-hero {
        padding: 13px 14px !important;
        border-radius: 15px !important;
    }

    .public-hero h1 {
        font-size: 1.12rem !important;
        line-height: 1.13 !important;
    }

    .public-hero p {
        font-size: .72rem !important;
    }

    .public-hero .badge {
        font-size: .68rem !important;
        padding: .32rem .55rem !important;
    }

    .public-period-row {
        margin-top: 8px !important;
    }

    .public-period-box {
        padding: 7px 9px !important;
    }

    .public-period-box strong {
        font-size: .78rem !important;
    }

    .supplier-form.card-pro {
        padding: 13px !important;
        border-radius: 14px !important;
    }

    .supplier-form .row.g-3 {
        --bs-gutter-y: .75rem;
    }

    .supplier-form .form-control,
    .supplier-form .form-select,
    .supplier-form .input-group-text {
        min-height: 36px !important;
        padding: .46rem .62rem !important;
        font-size: .82rem !important;
    }

    .quote-product-table thead th,
    .quote-product-table td {
        padding: .52rem .58rem !important;
        font-size: .78rem !important;
    }

    .quote-product-table td strong {
        font-size: .78rem !important;
    }

    .quote-product-table .price-col {
        width: 132px !important;
        min-width: 132px !important;
    }

    .quote-product-table .ean-col {
        width: 112px !important;
        min-width: 112px !important;
    }

    .quote-product-table .obs-col {
        width: 170px !important;
        min-width: 170px !important;
    }

    .scroll-page-btn {
        right: 12px !important;
        bottom: 12px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 20px !important;
    }
}

/* =========================================================
   V31.0 - Correções painel fornecedores e produtos mobile
   ========================================================= */

/* Painel recolhido dos fornecedores na tela ver_cotacao.php */
.supplier-hidden-panel {
    padding: 18px 20px !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .07) !important;
}

.supplier-hidden-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.section-eyebrow {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: var(--muted) !important;
    font-size: .72rem !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important;
}

.supplier-hidden-header h3,
.compare-toolbar h3 {
    color: #111827 !important;
    font-size: 1.28rem !important;
    font-weight: 900 !important;
    letter-spacing: -.035em !important;
}

.supplier-hidden-header p,
.compare-toolbar p {
    font-size: .88rem !important;
}

.supplier-collapse[hidden] {
    display: none !important;
}

.supplier-collapse {
    display: block !important;
    padding-top: 16px !important;
    margin-top: 16px !important;
    border-top: 1px solid var(--border) !important;
}

.supplier-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)) !important;
    gap: 12px !important;
}

.supplier-compact-card {
    background: linear-gradient(180deg, #fff, #f9fbff) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .05) !important;
}

.supplier-compact-top {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid var(--border) !important;
}

.supplier-compact-top strong {
    display: block !important;
    color: #111827 !important;
    font-size: .95rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 180px !important;
}

.supplier-compact-top small {
    display: block !important;
    color: var(--muted) !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
}

.supplier-delete-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
}

.supplier-compact-info {
    display: grid !important;
    gap: 9px !important;
}

.supplier-compact-info small {
    display: block !important;
    color: var(--muted) !important;
    font-size: .68rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    margin-bottom: 2px !important;
}

.supplier-compact-info span {
    display: block !important;
    color: #111827 !important;
    font-size: .85rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
}

.compare-toolbar {
    padding: 18px 20px !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.compare-toolbar-stats {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

.compare-toolbar-stats span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 10px !important;
    border-radius: 999px !important;
    background: #f1f5ff !important;
    color: #344054 !important;
    font-size: .78rem !important;
    font-weight: 800 !important;
    border: 1px solid #dbe5ff !important;
}

/* Tela pública do fornecedor: tabela desktop + sanfona mobile */
.supplier-form.card-pro {
    padding: 18px !important;
    border-radius: 16px !important;
}

.product-section-head {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

.product-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    background: #f1f5ff !important;
    color: var(--primary) !important;
    border: 1px solid rgba(50,31,219,.16) !important;
    border-radius: 999px !important;
    padding: 6px 10px !important;
    font-size: .76rem !important;
    font-weight: 900 !important;
}

.product-mobile-list {
    display: none !important;
}

.product-desktop-table {
    display: block !important;
}

.quote-product-table {
    margin-bottom: 0 !important;
}

.quote-product-table thead th {
    font-size: .68rem !important;
    padding: .7rem .75rem !important;
}

.quote-product-table td {
    padding: .62rem .75rem !important;
    font-size: .86rem !important;
}

.quote-product-table td strong {
    font-size: .86rem !important;
}

.quote-product-table .ean-col {
    width: 145px !important;
    min-width: 120px !important;
}

.quote-product-table .price-col {
    width: 160px !important;
    min-width: 150px !important;
}

.quote-product-table .obs-col {
    width: 230px !important;
    min-width: 190px !important;
}

.product-accordion-card {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .045) !important;
}

.product-accordion-toggle {
    width: 100% !important;
    border: 0 !important;
    background: #fff !important;
    padding: 13px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    text-align: left !important;
    color: #111827 !important;
}

.product-accordion-title {
    font-size: .92rem !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

.product-accordion-plus {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--primary), #5141e8) !important;
    color: #fff !important;
    display: grid !important;
    place-items: center !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    flex: 0 0 auto !important;
    box-shadow: 0 10px 22px rgba(50, 31, 219, .22) !important;
}

.product-accordion-card.is-open .product-accordion-toggle {
    background: #f8faff !important;
    border-bottom: 1px solid var(--border) !important;
}

.product-accordion-body {
    padding: 12px !important;
    background: #fff !important;
}

.product-accordion-body[hidden] {
    display: none !important;
}

.product-ean-box {
    background: #f8fafc !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 9px 10px !important;
    margin-bottom: 10px !important;
}

.product-ean-box small {
    display: block !important;
    color: var(--muted) !important;
    font-size: .68rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    margin-bottom: 2px !important;
}

.product-ean-box strong {
    display: block !important;
    color: #111827 !important;
    font-size: .9rem !important;
    word-break: break-all !important;
}

@media (max-width: 768px) {
    .supplier-hidden-panel,
    .compare-toolbar {
        padding: 14px !important;
        border-radius: 15px !important;
    }

    .supplier-hidden-header,
    .compare-toolbar {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .supplier-hidden-header .btn,
    .compare-toolbar .btn {
        width: 100% !important;
    }

    .supplier-hidden-header h3,
    .compare-toolbar h3 {
        font-size: 1.08rem !important;
    }

    .supplier-hidden-header p,
    .compare-toolbar p {
        font-size: .78rem !important;
    }

    .supplier-grid {
        grid-template-columns: 1fr !important;
    }

    .compare-toolbar-stats {
        justify-content: flex-start !important;
    }

    .product-desktop-table {
        display: none !important;
    }

    .product-mobile-list {
        display: grid !important;
        gap: 9px !important;
    }

    .product-section-head {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 7px !important;
    }

    .product-count-badge {
        font-size: .72rem !important;
        padding: 5px 9px !important;
    }
}


/* Edição manual dos valores dos fornecedores */
.edit-values-warning {
    border-left: 4px solid #f59e0b;
}

.edit-values-table-card {
    overflow: hidden;
}

.edit-values-table th {
    vertical-align: middle;
    white-space: nowrap;
}

.edit-values-table td {
    vertical-align: middle;
}

.edit-values-table .item-description-cell {
    min-width: 260px;
}

.edit-values-table .supplier-price-cell {
    min-width: 170px;
}

.edit-price-input {
    max-width: 145px;
    font-weight: 800;
}

.edit-values-table .supplier-head small {
    display: block;
    max-width: 190px;
    white-space: normal;
    line-height: 1.2;
}

.edit-values-footer {
    position: sticky;
    bottom: 0;
    z-index: 8;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .08);
}

@media (max-width: 768px) {
    .edit-values-footer {
        border-radius: 14px;
        padding: 12px;
    }

    .edit-values-footer .btn {
        width: 100%;
    }
}

/* Importação de produtos por Excel */
.import-modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .25);
}

.import-help-box {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #dbe4ff;
    border-radius: 14px;
    background: #eef2ff;
    color: #312e81;
    font-size: .88rem;
}

.product-row .form-label {
    font-size: .78rem;
    font-weight: 800;
    color: #1f2937;
}

.compare-table th:first-child,
.edit-values-table th:first-child {
    min-width: 80px;
}

.compare-table th:nth-child(2),
.edit-values-table th:nth-child(2) {
    min-width: 110px;
}

@media (max-width: 768px) {
    .import-modal-content {
        border-radius: 18px;
    }

    .product-row {
        padding: 14px;
    }
}

.compare-table th:nth-child(3),
.edit-values-table th:nth-child(3),
.compare-table td:nth-child(3),
.edit-values-table td:nth-child(3) {
    min-width: 240px;
}

/* Aba Fornecedores */
.fornecedores-mobile-list {
    display: none;
}

.fornecedores-table-card td,
.fornecedores-table-card th {
    vertical-align: middle;
}

.fornecedor-mobile-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    padding: 16px;
    margin-bottom: 14px;
}

.fornecedor-mobile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
    margin-bottom: 12px;
}

.fornecedor-mobile-header strong {
    display: block;
    font-size: 1rem;
    color: #111827;
    line-height: 1.25;
}

.fornecedor-mobile-header small {
    display: block;
    color: #64748b;
    margin-top: 3px;
}

.fornecedor-mobile-info {
    display: grid;
    gap: 10px;
}

.fornecedor-mobile-info small {
    display: block;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.fornecedor-mobile-info span {
    display: block;
    color: #111827;
    font-weight: 700;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .fornecedores-table-card {
        display: none;
    }

    .fornecedores-mobile-list {
        display: block;
    }
}


/* Colunas redimensionáveis no comparativo/edição */
.table-resize-help {
    font-size: .75rem;
    color: #64748b;
}

.is-resizable-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.resizable-th {
    position: relative;
    user-select: none;
}

.column-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
    touch-action: none;
}

.column-resizer::after {
    content: '';
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: 3px;
    width: 2px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .28);
    opacity: 0;
    transition: opacity .15s ease;
}

.resizable-th:hover .column-resizer::after,
.column-resizer:hover::after,
.resizing-table-column .column-resizer::after {
    opacity: 1;
}

.resizing-table-column {
    cursor: col-resize !important;
    user-select: none !important;
}

.compare-table td,
.compare-table th,
.edit-values-table td,
.edit-values-table th {
    overflow-wrap: anywhere;
}

/* Lista de produtos já cotados */
.product-list-modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .25);
}

.product-list-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.product-list-table th,
.product-list-table td {
    vertical-align: middle;
}

.product-list-table .product-list-desc {
    min-width: 280px;
}

.product-list-empty {
    border: 1px dashed rgba(148, 163, 184, .6);
    border-radius: 16px;
    padding: 18px;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
}

@media (max-width: 768px) {
    .product-list-modal-content {
        border-radius: 18px;
    }

    .product-list-toolbar .form-control {
        width: 100%;
    }
}

/* Rascunho automático do fornecedor */
.supplier-draft-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f766e;
    font-size: .78rem;
    font-weight: 800;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 5px 10px;
    margin-top: 10px;
}


/* Produto preenchido no link do fornecedor */
.product-filled-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    color: #087443 !important;
    background: #dcfce7 !important;
    border: 1px solid #86efac !important;
    border-radius: 999px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 2px 7px !important;
    font-size: .74rem !important;
    font-weight: 900 !important;
    vertical-align: middle !important;
}

.product-filled-badge[hidden] {
    display: none !important;
}

.quote-product-table tr.is-filled td {
    background: #f7fef9 !important;
}

.product-accordion-title-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.product-filled-badge-mobile {
    order: 0 !important;
    flex: 0 0 auto !important;
    min-width: 18px !important;
    min-height: 18px !important;
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    font-size: .82rem !important;
    line-height: 1 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.product-accordion-title {
    min-width: 0 !important;
}

.product-accordion-card.is-filled {
    border-color: #86efac !important;
    box-shadow: 0 10px 24px rgba(22, 163, 74, .10) !important;
}

.product-accordion-card.is-filled .product-accordion-toggle {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%) !important;
}


/* Comparativo com cabeçalho fixo e rolagem interna da tabela */
.compare-table-card {
    overflow: hidden;
}

.compare-table-scroll {
    max-height: calc(100vh - 185px);
    overflow: auto;
    position: relative;
    border-radius: var(--radius);
    scrollbar-gutter: stable;
}

.compare-table-scroll .compare-table {
    margin-bottom: 0 !important;
}

.compare-table-scroll .compare-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--border), 0 8px 16px rgba(15, 23, 42, .06);
}

.compare-table-scroll .compare-table thead th.resizable-th .column-resizer {
    z-index: 30;
}

.compare-table-scroll::after {
    content: '';
    position: sticky;
    left: 0;
    bottom: 0;
    display: block;
    height: 1px;
}

@media (max-width: 991.98px) {
    .compare-table-scroll {
        max-height: calc(100vh - 140px);
    }
}


/* =========================================================
   V40.0 - Modo compacto do painel administrativo
   Objetivo: deixar o sistema em 100% do navegador com aparência
   parecida com 75%/80% de zoom, sem diminuir o fornecedor mobile.
   ========================================================= */
@media (min-width: 1101px) {
    .sidebar {
        width: 232px !important;
        padding: 18px !important;
    }

    .brand-box {
        gap: 11px !important;
        padding: 2px 0 18px !important;
    }

    .brand-icon {
        width: 42px !important;
        height: 42px !important;
        border-radius: 14px !important;
        font-size: 20px !important;
    }

    .brand-name {
        font-size: 16px !important;
    }

    .brand-box small {
        font-size: 11px !important;
    }

    .menu {
        margin-top: 22px !important;
        gap: 6px !important;
    }

    .menu-link {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        gap: 9px !important;
        font-size: 13px !important;
    }

    .menu-link i {
        font-size: 16px !important;
        width: 20px !important;
    }

    .sidebar-footer {
        padding-top: 14px !important;
    }

    .avatar {
        width: 36px !important;
        height: 36px !important;
        border-radius: 12px !important;
        font-size: 13px !important;
    }

    .user-pill {
        gap: 9px !important;
    }

    .user-pill strong {
        font-size: 13px !important;
    }

    .user-pill small {
        font-size: 10px !important;
        max-width: 132px !important;
    }

    .logout {
        font-size: 13px !important;
        margin-top: 10px !important;
    }

    .topbar {
        margin-left: 232px !important;
        min-height: 74px !important;
        padding: 15px 26px !important;
        gap: 14px !important;
    }

    .topbar h1 {
        font-size: 22px !important;
    }

    .topbar small {
        font-size: .64rem !important;
    }

    .topbar .btn {
        font-size: .84rem !important;
        border-radius: 10px !important;
        padding: .45rem .72rem !important;
    }

    .content-wrap {
        margin-left: 232px !important;
        padding: 22px 26px 40px !important;
    }

    .content-wrap .row.g-3,
    .content-wrap .row.g-4 {
        --bs-gutter-x: .9rem !important;
        --bs-gutter-y: .9rem !important;
    }

    .card-pro,
    .table-card {
        border-radius: 16px !important;
    }

    .content-wrap .card-pro.p-4,
    .content-wrap .table-card.p-4,
    .content-wrap .p-4.card-pro,
    .content-wrap .p-4.table-card {
        padding: 1rem !important;
    }

    .kpi-card {
        min-height: 92px !important;
        padding: 15px 16px !important;
        border-radius: 16px !important;
    }

    .kpi-card small {
        font-size: .72rem !important;
    }

    .kpi-card strong {
        font-size: 29px !important;
        margin-top: 4px !important;
    }

    .kpi-icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 14px !important;
        font-size: 20px !important;
    }

    .content-wrap h2.h5,
    .content-wrap .h5 {
        font-size: 1.02rem !important;
    }

    .content-wrap p,
    .content-wrap .text-muted {
        font-size: .86rem !important;
    }

    .section-title {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }

    .content-wrap .btn {
        font-size: .82rem !important;
        border-radius: 10px !important;
        padding: .42rem .68rem !important;
        gap: 6px !important;
    }

    .content-wrap .btn-sm {
        font-size: .74rem !important;
        padding: .28rem .5rem !important;
    }

    .content-wrap .form-control,
    .content-wrap .form-select,
    .content-wrap .input-group-text {
        padding: .52rem .68rem !important;
        font-size: .86rem !important;
        border-radius: 10px !important;
    }

    .content-wrap .form-label {
        font-size: .76rem !important;
        margin-bottom: 4px !important;
    }

    .table td,
    .table th {
        padding: .64rem .72rem !important;
    }

    .table thead th {
        font-size: 10.5px !important;
    }

    .badge-soft {
        padding: 6px 9px !important;
        font-size: .72rem !important;
    }

    .supplier-hidden-panel,
    .compare-toolbar {
        padding: 14px 16px !important;
        border-radius: 16px !important;
    }

    .supplier-hidden-header h3,
    .compare-toolbar h3 {
        font-size: 1.06rem !important;
    }

    .supplier-hidden-header p,
    .compare-toolbar p {
        font-size: .78rem !important;
    }

    .compare-toolbar-stats span {
        padding: 5px 8px !important;
        font-size: .70rem !important;
    }

    .supplier-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }

    .supplier-compact-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .supplier-compact-top strong {
        font-size: .86rem !important;
        max-width: 150px !important;
    }

    .supplier-compact-info span {
        font-size: .78rem !important;
    }

    .compare-table-scroll {
        max-height: calc(100vh - 138px) !important;
    }

    .compare-table td,
    .compare-table th,
    .edit-values-table td,
    .edit-values-table th {
        padding: .54rem .62rem !important;
        font-size: .78rem !important;
    }

    .compare-table th:nth-child(3),
    .edit-values-table th:nth-child(3),
    .compare-table td:nth-child(3),
    .edit-values-table td:nth-child(3) {
        min-width: 210px !important;
    }

    .fornecedores-table-card td,
    .fornecedores-table-card th {
        padding: .62rem .72rem !important;
        font-size: .82rem !important;
    }
}


/* =========================================================
   V41.0 - Modo compacto leve adicional
   Reduz um pouco mais o painel administrativo sem afetar mobile
   nem a tela pública do fornecedor.
========================================================= */
@media (min-width: 992px) {
    .sidebar {
        width: 216px !important;
        padding: 18px 16px !important;
    }

    .brand-box {
        gap: 10px !important;
        padding-bottom: 16px !important;
        margin-bottom: 16px !important;
    }

    .brand-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-radius: 13px !important;
    }

    .brand-text strong {
        font-size: .90rem !important;
    }

    .brand-text span,
    .sidebar-user small {
        font-size: .67rem !important;
    }

    .sidebar-menu {
        gap: 7px !important;
    }

    .sidebar-menu a {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        font-size: .82rem !important;
        gap: 9px !important;
    }

    .sidebar-menu i {
        font-size: .93rem !important;
    }

    .sidebar-footer {
        padding-top: 14px !important;
    }

    .sidebar-user .avatar {
        width: 34px !important;
        height: 34px !important;
        font-size: .76rem !important;
    }

    .sidebar-user strong,
    .sidebar-user .logout-link {
        font-size: .80rem !important;
    }

    .content-wrap {
        margin-left: 216px !important;
        padding: 18px 22px 34px !important;
    }

    .topbar {
        min-height: 70px !important;
        padding: 0 22px !important;
    }

    .topbar h1 {
        font-size: 20px !important;
        margin-top: 1px !important;
    }

    .topbar small {
        font-size: .60rem !important;
        letter-spacing: .08em !important;
    }

    .topbar .btn,
    .content-wrap .btn {
        font-size: .78rem !important;
        padding: .38rem .62rem !important;
        border-radius: 9px !important;
    }

    .content-wrap .row.g-3,
    .content-wrap .row.g-4 {
        --bs-gutter-x: .75rem !important;
        --bs-gutter-y: .75rem !important;
    }

    .content-wrap .card-pro.p-4,
    .content-wrap .table-card.p-4,
    .content-wrap .p-4.card-pro,
    .content-wrap .p-4.table-card {
        padding: .86rem !important;
    }

    .card-pro,
    .table-card,
    .kpi-card,
    .supplier-hidden-panel,
    .compare-toolbar {
        border-radius: 14px !important;
    }

    .kpi-card {
        min-height: 82px !important;
        padding: 12px 14px !important;
    }

    .kpi-card small {
        font-size: .68rem !important;
    }

    .kpi-card strong {
        font-size: 26px !important;
        line-height: 1.05 !important;
    }

    .kpi-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 12px !important;
        font-size: 18px !important;
    }

    .content-wrap h2.h5,
    .content-wrap .h5 {
        font-size: .96rem !important;
    }

    .section-title {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .content-wrap p,
    .content-wrap .text-muted {
        font-size: .81rem !important;
    }

    .content-wrap .btn-sm {
        font-size: .70rem !important;
        padding: .23rem .44rem !important;
    }

    .content-wrap .form-control,
    .content-wrap .form-select,
    .content-wrap .input-group-text {
        padding: .46rem .60rem !important;
        font-size: .81rem !important;
        border-radius: 9px !important;
    }

    .content-wrap .form-label {
        font-size: .72rem !important;
    }

    .table td,
    .table th {
        padding: .52rem .58rem !important;
    }

    .table thead th {
        font-size: 9.8px !important;
        letter-spacing: .05em !important;
    }

    .badge-soft,
    .badge {
        font-size: .68rem !important;
        padding: 5px 8px !important;
    }

    .supplier-hidden-panel,
    .compare-toolbar {
        padding: 12px 14px !important;
    }

    .supplier-hidden-header h3,
    .compare-toolbar h3 {
        font-size: .98rem !important;
    }

    .supplier-hidden-header p,
    .compare-toolbar p {
        font-size: .74rem !important;
    }

    .compare-toolbar-stats span {
        padding: 4px 7px !important;
        font-size: .66rem !important;
    }

    .supplier-grid {
        grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)) !important;
        gap: 10px !important;
    }

    .supplier-compact-card {
        padding: 10px !important;
        border-radius: 12px !important;
    }

    .supplier-compact-top strong {
        font-size: .80rem !important;
    }

    .supplier-compact-info span,
    .supplier-compact-info small {
        font-size: .72rem !important;
    }

    .compare-table-scroll {
        max-height: calc(100vh - 118px) !important;
    }

    .compare-table td,
    .compare-table th,
    .edit-values-table td,
    .edit-values-table th {
        padding: .44rem .50rem !important;
        font-size: .73rem !important;
    }

    .compare-table th:nth-child(3),
    .edit-values-table th:nth-child(3),
    .compare-table td:nth-child(3),
    .edit-values-table td:nth-child(3) {
        min-width: 190px !important;
    }

    .fornecedores-table-card td,
    .fornecedores-table-card th {
        padding: .50rem .58rem !important;
        font-size: .76rem !important;
    }
}

/* V42.0 - Visual agrupado por fornecedor no comparativo */
.compare-view-switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.winner-summary-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.winner-summary-card h3 {
    font-size: 1.08rem;
    font-weight: 900;
}

.winner-summary-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.winner-summary-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #312e81;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: .75rem;
    font-weight: 800;
}

.winner-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.winner-supplier-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.winner-supplier-toggle {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 15px 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: var(--text);
}

.winner-supplier-toggle:hover {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.winner-toggle-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 10px 22px rgba(49, 46, 129, .20);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.winner-supplier-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.winner-supplier-main strong {
    font-size: .98rem;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-supplier-main small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.winner-supplier-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.winner-supplier-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 6px 9px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: .74rem;
    font-weight: 850;
}

.winner-supplier-items {
    border-top: 1px solid var(--border);
    background: #fff;
}

.winner-items-table thead th {
    background: #f8fafc;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .68rem;
    font-weight: 900;
    white-space: nowrap;
}

.winner-items-table td,
.winner-items-table th {
    border-color: var(--border) !important;
    padding: .72rem .82rem;
    vertical-align: middle;
}

.winner-items-table td:nth-child(3) {
    min-width: 260px;
}

.winner-price {
    color: #047857;
    font-weight: 950;
    background: #ecfdf5 !important;
    white-space: nowrap;
}

.winner-tie-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: .64rem;
    font-weight: 900;
    padding: 3px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

.winner-empty-note {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--muted);
    font-size: .84rem;
}

@media (min-width: 992px) {
    .compare-view-switch .btn {
        padding: .38rem .62rem !important;
        font-size: .78rem !important;
    }

    .winner-summary-card {
        padding: 12px 14px !important;
    }

    .winner-summary-card h3 {
        font-size: .98rem !important;
    }

    .winner-summary-card p,
    .winner-empty-note {
        font-size: .74rem !important;
    }

    .winner-summary-stats span,
    .winner-supplier-meta span {
        padding: 4px 7px !important;
        font-size: .66rem !important;
    }

    .winner-supplier-toggle {
        padding: 11px 12px !important;
    }

    .winner-toggle-icon {
        width: 29px !important;
        height: 29px !important;
        border-radius: 10px !important;
    }

    .winner-supplier-main strong {
        font-size: .84rem !important;
    }

    .winner-supplier-main small {
        font-size: .66rem !important;
    }

    .winner-items-table td,
    .winner-items-table th {
        padding: .48rem .55rem !important;
        font-size: .73rem !important;
    }
}

@media (max-width: 767.98px) {
    .compare-view-switch {
        justify-content: stretch;
    }

    .compare-view-switch .btn {
        flex: 1 1 100%;
    }

    .winner-summary-card,
    .winner-supplier-toggle {
        align-items: stretch;
    }

    .winner-supplier-toggle {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .winner-supplier-meta {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .winner-summary-stats {
        justify-content: flex-start;
    }
}

/* Portal do fornecedor + acesso por código */
.supplier-login-wrap,
.supplier-portal-wrap{
  min-height:100vh;
  background:linear-gradient(135deg,#eef2ff 0%,#ecfeff 100%);
  padding:32px 16px;
}
.supplier-login-wrap{display:flex;align-items:center;justify-content:center;}
.supplier-login-card{
  width:min(100%,460px);
  background:#fff;
  border:1px solid rgba(148,163,184,.25);
  border-radius:24px;
  padding:34px;
  box-shadow:0 24px 70px rgba(15,23,42,.12);
}
.supplier-login-card h1{font-size:1.7rem;font-weight:800;margin:0 0 8px;color:#111827;}
.supplier-code-input{font-size:2rem;font-weight:800;letter-spacing:10px;}
.supplier-portal-wrap{max-width:1120px;margin:0 auto;}
.supplier-portal-header{
  background:linear-gradient(135deg,#2d1ebd 0%,#111827 100%);
  color:#fff;
  border-radius:24px;
  padding:28px;
  margin-bottom:20px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  box-shadow:0 24px 60px rgba(45,30,189,.18);
}
.supplier-portal-header small{text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:#c7d2fe;}
.supplier-portal-header h1{font-weight:900;margin:4px 0 8px;font-size:1.7rem;}
.supplier-portal-kpi{
  background:#fff;
  border-left:4px solid #4f46e5;
  border-radius:18px;
  padding:18px 20px;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}
.supplier-portal-kpi span{display:block;color:#64748b;font-weight:700;font-size:.84rem;}
.supplier-portal-kpi strong{display:block;color:#0f172a;font-size:2rem;line-height:1;margin-top:8px;}
.supplier-portal-kpi.success{border-left-color:#16a34a;}
.supplier-portal-kpi.warning{border-left-color:#f59e0b;}
.supplier-portal-section{
  background:#fff;
  border:1px solid rgba(148,163,184,.25);
  border-radius:22px;
  padding:22px;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
}
.supplier-portal-section h2{font-size:1.15rem;font-weight:850;margin:0 0 2px;color:#111827;}
.supplier-portal-section p{color:#64748b;margin-bottom:0;}
.supplier-quote-list{display:grid;gap:12px;}
.supplier-quote-card{
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:16px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  background:#fff;
}
.supplier-quote-card h3{font-size:1rem;font-weight:850;margin:8px 0 4px;color:#111827;}
.supplier-quote-card p{margin:0 0 4px;color:#64748b;}
.supplier-quote-card small{color:#475569;font-weight:700;}
.supplier-quote-card.compact{padding:14px;}
.empty-state{padding:24px;text-align:center;color:#64748b;background:#f8fafc;border-radius:16px;border:1px dashed #cbd5e1;}
.supplier-identity-box{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:16px;
}
.supplier-identity-data{
  display:grid;
  gap:2px;
  text-align:right;
  color:#475569;
}
.supplier-identity-data strong{color:#111827;}
@media (max-width:768px){
  .supplier-login-card{padding:24px;border-radius:20px;}
  .supplier-portal-wrap{padding:16px 12px;}
  .supplier-portal-header{padding:22px;border-radius:20px;}
  .supplier-quote-card{align-items:stretch;flex-direction:column;}
  .supplier-identity-data{text-align:left;}
}


/* Identidade visual Melhor Preço */
.brand-logo-icon {
    background: #fff !important;
    padding: 4px;
    overflow: hidden;
}
.brand-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}
.login-brand-logo {
    width: 168px;
    max-width: 70%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-brand-logo img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 26px rgba(15, 23, 42, .10));
}
.supplier-login-logo {
    width: 150px;
    max-width: 72%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.supplier-login-logo img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 14px 24px rgba(15, 23, 42, .10));
}
.supplier-portal-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}
.supplier-portal-logo {
    width: 74px;
    height: 74px;
    object-fit: contain;
    background: #fff;
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .14);
    flex: 0 0 auto;
}
@media (max-width: 575.98px) {
    .login-brand-logo { width: 142px; }
    .supplier-login-logo { width: 132px; }
    .supplier-portal-title-wrap { align-items: flex-start; gap: 12px; }
    .supplier-portal-logo { width: 58px; height: 58px; border-radius: 14px; }
}
