:root{
    --bg:#eef2f5;
    --bg-2:#f7fafc;
    --card:#ffffff;
    --line:#e5eaf0;
    --line-2:#dbe4ea;
    --dark:#1d1c20;
    --muted:#6b7280;

    --brand:#003E8A;
    --brand-2:#0057B8;
    --brand-3:#00489B;
    --cbg-yellow:#FFD100;
    --cbg-green:#5DBB46;

    --success:#0f9f77;
    --danger:#dc2626;
    --info:#2563eb;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
    font-family:'Inter',sans-serif;
    background:radial-gradient(circle at top left,#ffffff 0%,var(--bg) 50%,var(--bg-2) 100%);
    color:var(--dark);
}

a{text-decoration:none}

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

.app-sidebar{
    width:250px;
    background:linear-gradient(180deg,#003E8A 0%,#002F6C 100%);
    color:#fff;
    padding:18px 14px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    position:sticky;
    top:0;
    height:100vh;
    border-right:1px solid rgba(255,255,255,.06);
}

.brand-box{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:18px;
}

.brand-logo-wrap{
    background:#fff;
    border-radius:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.12);
    padding:14px;
}

.brand-logo-large{
    width:190px !important;
    height:90px !important;
    padding:8px !important;
}

.brand-logo{
    width:100%;
    height:auto;
    max-width:165px;
    max-height:95px;
    object-fit:contain;
}

.brand-title,
.brand-subtitle{
    display:none;
}

.user-mini-card{
    display:flex;
    gap:10px;
    align-items:center;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.10);
    border-radius:18px;
    padding:8px 10px !important;
    margin-bottom:10px !important;

    backdrop-filter:blur(12px);
}


.user-mini-card strong{
    font-size:.95rem;
}

.user-mini-card small{
    color:rgba(255,255,255,.75);
    font-size:.82rem;
}

.user-mini-avatar{
    width:38px;
    height:38px;
    border-radius:13px;
    background:var(--cbg-yellow);
    color:#003E8A;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 12px 24px rgba(255,209,0,.22);
}

.menu-group{
    margin-bottom:6px !important;
}

.menu-label{
    text-transform:uppercase;
    font-size:.68rem;
    letter-spacing:.08em;
    color:rgba(255,255,255,.52);
    padding:0 10px 8px;
}

.menu-link{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border-radius:14px;
    color:rgba(255,255,255,.88);
    transition:.2s;
    margin-bottom:5px;
    border:1px solid transparent;
    font-size:.95rem;
}

.menu-link i{
    font-size:1rem;
    width:18px;
}

.menu-link:hover,
.menu-link.active{
    background:linear-gradient(135deg,rgba(0,87,184,.95),rgba(0,72,155,.85));
    border-color:rgba(255,255,255,.16);
    color:#fff;
    transform:translateX(2px);
}

.sidebar-footer{
    padding-top:12px;
    border-top:1px solid rgba(255,255,255,.08);
}

.sidebar-footer .small{
    font-size:.72rem;
}

.btn-logout{
    background:transparent;
    border:1px solid rgba(255,255,255,.16);
    color:#fff;
    border-radius:14px;
    padding:.7rem 1rem;
    font-weight:700;
}

.btn-logout:hover{
    background:rgba(255,255,255,.08);
    color:#fff;
}

.app-main{
    flex:1;
    min-width:0;
}

.app-topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    padding:18px 24px 12px;
    background:#fff;
    border-bottom:1px solid var(--line);
}

.topbar-title{
    font-size:1.28rem;
    font-weight:800;
}

.profile-pill{
    background:#EEF4FF;
    border:1px solid #DDE7F8;
    color:var(--brand-2);
    padding:10px 14px;
    border-radius:999px;
    box-shadow:0 8px 24px rgba(15,23,42,.05);
    font-weight:600;
}

.btn-mobile-menu{
    border:1px solid var(--line);
    background:#fff;
    color:var(--brand);
}

.app-content{
    padding:0 24px 24px;
}

.card-soft,
.receipt-box,
.login-card,
.stat-card,
.metric-card,
.summary-card{
    background:rgba(255,255,255,.98);
    border:1px solid rgba(229,234,240,.98);
    box-shadow:0 18px 50px rgba(15,23,42,.06);
    border-radius:28px;
}

.card-header-clean{
    background:transparent;
    border-bottom:1px solid var(--line);
    padding:1rem 1.4rem;
}

.page-title{
    font-size:1.8rem;
    font-weight:800;
    margin-bottom:.25rem;
}

.text-muted{
    color:var(--muted)!important;
}

.stat-card,
.metric-card,
.summary-card{
    padding:20px;
}

.metric-card{
    border-left:5px solid var(--cbg-yellow);
}

.stat-card .icon,
.metric-icon{
    width:56px;
    height:56px;
    border-radius:18px;
    background:linear-gradient(135deg,var(--brand-2),var(--brand-3));
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:1.2rem;
    box-shadow:0 12px 24px rgba(0,87,184,.20);
}

.metric-card h3,
.summary-card h4{
    font-weight:800;
    margin:6px 0 0;
}

.info-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border-radius:999px;
    background:#fff;
    border:1px solid #DDE7F8;
    box-shadow:0 10px 30px rgba(15,23,42,.05);
    font-weight:600;
}

.btn-brand{
    background:linear-gradient(135deg,var(--brand-2),var(--brand-3));
    border:none;
    color:#fff;
    border-radius:14px;
    padding:.8rem 1.2rem;
    font-weight:700;
    box-shadow:0 12px 24px rgba(0,87,184,.16);
}

.btn-brand:hover{
    background:linear-gradient(135deg,#00489B,#003E8A);
    color:#fff;
}

.btn-soft{
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    padding:.8rem 1rem;
    font-weight:700;
    color:var(--dark);
}

.btn-soft:hover{
    background:#f8fafc;
}

.form-control,
.form-select,
.form-control:disabled{
    border-radius:16px;
    border:1px solid var(--line);
    padding:.9rem 1rem;
    background:#fff;
}

.form-control:focus,
.form-select:focus{
    border-color:rgba(0,87,184,.55);
    box-shadow:0 0 0 .25rem rgba(0,87,184,.12);
}

.form-label{
    font-weight:600;
    margin-bottom:.55rem;
}

.table thead th{
    font-size:.8rem;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:var(--muted);
    background:#f7fafb;
    border-bottom:1px solid var(--line);
}

.table>:not(caption)>*>*{
    padding:1rem;
    vertical-align:middle;
}

.badge-stock-low,
.badge-stock-ok,
.badge-role,
.badge-soft{
    padding:.58rem .85rem;
    border-radius:999px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.badge-stock-low{
    background:#fff3cd;
    color:#8a6d1d;
}

.badge-stock-ok{
    background:#e8f7e6;
    color:#2f7d24;
}

.badge-role.admin{
    background:#e0f2fe;
    color:#0369a1;
}

.badge-role.vendedor{
    background:#ecfdf5;
    color:#166534;
}

.badge-soft{
    background:#f8fafc;
    color:#334155;
    border:1px solid var(--line);
}

.filter-bar{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    align-items:center;
    margin-bottom:18px;
}

.toolbar-card{
    padding:18px;
}

.toolbar-card .form-control,
.toolbar-card .form-select{
    background:#fbfcff;
}

.login-wrap{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:radial-gradient(circle at top left,#0057B8 0%,#003E8A 55%,#002F6C 100%);
}

.login-card{
    width:100%;
    max-width:500px;
    overflow:hidden;
}

.login-hero{
    height:10px;
    background:linear-gradient(90deg,var(--brand-2),var(--cbg-yellow),var(--cbg-green));
}

.login-brand-logo img{
    max-width:220px;
    height:auto;
}

.receipt-box{
    padding:28px;
}

.item-row{
    border:1px solid var(--line)!important;
    background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important;
}

.item-meta{
    font-size:.84rem;
    color:var(--muted);
}

.sale-summary-sticky{
    position:sticky;
    top:20px;
}

.kpi-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px;
}

.empty-state{
    padding:40px 24px;
    text-align:center;
    color:var(--muted);
}

.hero-banner{
    padding:24px;
    border-radius:28px;
    background:linear-gradient(135deg,#EEF4FF,#ffffff 55%,#F8FAFC);
    border:1px solid var(--line);
    box-shadow:0 16px 40px rgba(15,23,42,.04);
}

.hero-banner h2{
    font-weight:800;
}

.hero-banner .mini-note{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:#fff;
    border:1px solid #DDE7F8;
    color:var(--brand-2);
    padding:10px 14px;
    border-radius:999px;
    font-weight:700;
}

.list-clean{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.list-clean-item{
    display:flex;
    justify-content:space-between;
    gap:14px;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
}

.border-dashed{
    border:1px dashed var(--line-2)!important;
}

.quick-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.pdv-shell{
    padding-bottom:12px;
}

.pdv-customer-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    gap:16px;
}

.pdv-item{
    border:1px solid var(--line);
    background:linear-gradient(180deg,#ffffff 0%, #f9fcfd 100%);
    box-shadow:0 16px 40px rgba(15,23,42,.04);
}

.pdv-meta-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.pdv-stock-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border-radius:999px;
    background:rgba(0,87,184,.10);
    color:var(--brand-3);
    font-weight:700;
}

.pdv-summary{
    background:linear-gradient(180deg,#ffffff 0%, #F5F9FF 100%);
}

.total-highlight{
    background:linear-gradient(135deg,var(--brand-2),var(--brand-3));
    color:#fff;
    border:none;
}

.total-highlight span,
.total-highlight strong{
    color:#fff;
}

.pdv-mini-kpis{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.mini-kpi{
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:16px;
}

.mini-kpi small{
    color:var(--muted);
    display:block;
    margin-bottom:6px;
}

.mini-kpi strong{
    font-size:1.15rem;
    font-weight:800;
}

.btn-pix{
    background:var(--cbg-green)!important;
    color:#fff!important;
}

.btn-card{
    background:var(--brand-2)!important;
    color:#fff!important;
}

.btn-money{
    background:var(--cbg-yellow)!important;
    color:#003E8A!important;
}

.text-success{
    color:var(--brand-2)!important;
}

.venda-total,
.produto-valor{
    color:var(--brand-2)!important;
}

@media print{
    .app-sidebar,
    .app-topbar,
    .no-print,
    .offcanvas{
        display:none!important;
    }

    .app-main,
    .app-content{
        padding:0!important;
    }

    body{
        background:#fff;
    }

    .receipt-box{
        box-shadow:none;
        border:none;
    }
}

@media (max-width:1199.98px){
    .app-sidebar{
        display:none;
    }

    .app-topbar,
    .app-content{
        padding-left:18px;
        padding-right:18px;
    }
}

@media (max-width:991.98px){
    .pdv-customer-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width:767.98px){
    .page-title{
        font-size:1.45rem;
    }

    .kpi-grid{
        grid-template-columns:1fr;
    }

    .table>:not(caption)>*>*{
        padding:.8rem;
    }

    .brand-logo-wrap{
        width:170px;
        height:105px;
    }

    .brand-logo{
        max-width:145px;
        max-height:85px;
    }
}

/* ======================================================
   MENU LATERAL COMPACTO CBG STORE
====================================================== */

.app-sidebar{
    width:270px !important;
    padding:14px 12px !important;
    overflow-y:auto;
}

.brand-box{
    margin-bottom:12px !important;
}

.brand-logo-large{
    width:210px !important;
    height:118px !important;
    border-radius:22px !important;
    padding:12px !important;
}

.brand-logo{
    max-width:170px !important;
    max-height:82px !important;
    object-fit:contain !important;
}

.user-mini-card{
    padding:12px !important;
    border-radius:18px !important;
    margin-bottom:16px !important;
    gap:10px !important;
}

.user-mini-avatar{
    border-radius:14px !important;
        width:36px !important;
    height:36px !important;
    font-size:16px !important;
}

.user-mini-info strong{
    font-size:16px !important;
    line-height:1.2 !important;
}

.user-mini-info small{
    font-size:13px !important;
    line-height:1.25 !important;
}

.menu-group{
    margin-bottom:12px !important;
}

.menu-label{
    padding:0 10px 4px !important;
    margin-top:0 !important;
}

.menu-link{
    padding:8px 12px !important;
    margin-bottom:2px !important;
    border-radius:14px !important;
    gap:10px !important;
    font-size:15px !important;
}


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

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

.sidebar-system-info{
    display:none !important;
}

.btn-logout{
    padding:10px 12px !important;
    border-radius:14px !important;
    font-size:15px !important;
}