/* ==========================================================
   NEXTGUARD - GESTAO COMERCIAL V6
   ========================================================== */

.ng6-hidden{
    display:none!important;
}

#ng6CommercialRoot{
    margin-top:4px;
}

.ng6-shell{
    border:1px solid #263747;
    background:#0f1722;
    border-radius:16px;
    padding:18px;
}

.ng6-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.ng6-head h2{
    margin:0;
    font-size:22px;
}

.ng6-head p{
    margin:4px 0 0;
    opacity:.62;
    font-size:13px;
}

.ng6-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.ng6-btn{
    background:#19d3dc;
    color:#032329;
    border:0;
    border-radius:9px;
    padding:9px 13px;
    cursor:pointer;
    font-weight:800;
}

.ng6-btn.secondary{
    background:#182535;
    color:#fff;
    border:1px solid #33475a;
}

.ng6-btn.success{
    background:#15803d;
    color:#fff;
}

.ng6-btn.warning{
    background:#c2410c;
    color:#fff;
}

.ng6-btn.danger{
    background:#991b1b;
    color:#fff;
}

.ng6-btn.small{
    padding:6px 8px;
    font-size:11px;
}

.ng6-grid{
    display:grid;
    gap:12px;
}

.ng6-grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.ng6-grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.ng6-grid-4{
    grid-template-columns:repeat(4,minmax(0,1fr));
}

.ng6-grid-5{
    grid-template-columns:repeat(5,minmax(0,1fr));
}

.ng6-field{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.ng6-field span{
    opacity:.7;
    font-size:11px;
    font-weight:800;
}

.ng6-field input,
.ng6-field select,
.ng6-field textarea{
    width:100%;
    box-sizing:border-box;
    padding:9px 10px;
    border-radius:9px;
    border:1px solid #33475a;
    background:#0a121c;
    color:#fff;
    outline:none;
}

.ng6-field input:focus,
.ng6-field select:focus,
.ng6-field textarea:focus{
    border-color:#19d3dc;
}

.ng6-card{
    border:1px solid #293b4d;
    background:#111d29;
    border-radius:13px;
    padding:13px;
}

.ng6-card h3{
    margin:0 0 11px;
    font-size:15px;
}

.ng6-kpis{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:10px;
    margin:14px 0;
}

.ng6-kpi{
    background:#111d29;
    border:1px solid #293b4d;
    border-radius:13px;
    padding:12px;
}

.ng6-kpi-label{
    opacity:.6;
    text-transform:uppercase;
    font-size:10px;
    font-weight:900;
}

.ng6-kpi-value{
    font-weight:900;
    font-size:20px;
    margin-top:6px;
}

.ng6-table-wrap{
    width:100%;
    overflow:auto;
    border:1px solid #293b4d;
    border-radius:11px;
}

.ng6-table{
    width:100%;
    min-width:900px;
    border-collapse:collapse;
}

.ng6-table th,
.ng6-table td{
    padding:9px;
    font-size:12px;
    text-align:left;
    border-bottom:1px solid #263747;
}

.ng6-table th{
    background:#111a24;
    position:sticky;
    top:0;
    font-size:11px;
}

.ng6-badge{
    display:inline-flex;
    padding:4px 7px;
    border-radius:999px;
    border:1px solid #33475a;
    background:#182535;
    font-size:10px;
    font-weight:800;
}

.ng6-badge.ok{
    background:#14532d;
}

.ng6-badge.low{
    background:#7f1d1d;
}

.ng6-badge.warn{
    background:#78350f;
}

.ng6-empty{
    padding:25px;
    opacity:.55;
    text-align:center;
}

.ng6-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    z-index:9999999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.ng6-modal.ng6-hidden{
    display:none!important;
}

.ng6-window{
    width:min(1000px,96vw);
    max-height:92vh;
    overflow:auto;
    border:1px solid #33475a;
    border-radius:16px;
    background:#0f1823;
}

.ng6-modal-head{
    position:sticky;
    top:0;
    z-index:3;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#111c28;
    border-bottom:1px solid #33475a;
    padding:14px 16px;
}

.ng6-modal-head h3{
    margin:0;
}

.ng6-modal-body{
    padding:16px;
}

.ng6-history{
    background:#111d29;
    border-left:3px solid #19d3dc;
    border-radius:0 8px 8px 0;
    padding:8px 10px;
    margin-bottom:8px;
}

.ng6-product-result{
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center;
    border:1px solid #293b4d;
    background:#111d29;
    border-radius:10px;
    padding:9px;
    margin-top:7px;
}

.ng6-cart-row{
    display:grid;
    grid-template-columns:2fr 80px 115px 45px;
    gap:8px;
    align-items:center;
    padding:8px 0;
    border-bottom:1px solid #263747;
}

.ng6-cart-row input{
    width:100%;
    box-sizing:border-box;
    background:#0a121c;
    color:#fff;
    border:1px solid #33475a;
    border-radius:8px;
    padding:7px;
}

.ng6-payment-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px;
    gap:7px;
    align-items:end;
    margin-bottom:8px;
}

/* O PDV ocupa duas colunas dentro do painel. Cada coluna e cada campo
   precisam poder encolher sem invadir o card vizinho. */
#ng6CashView .ng6-pos-layout,
#ng6CashView .ng6-pos-layout > div,
#ng6CashView .ng6-card,
#ng6CashView .ng6-field,
#ng6CashView .ng6-cart-row > div,
#ng6CashView .ng6-product-result > div{
    min-width:0;
}

#ng6CashView .ng6-pos-layout > div{
    container:ng6PosColumn / inline-size;
}

#ng6CashView .ng6-product-result{
    flex-wrap:wrap;
}

#panelScreen #ng6CashView .ng6-cart-row{
    grid-template-columns:minmax(0,1fr) 72px 110px 40px !important;
}

#panelScreen #ng6CashView .ng6-payment-row{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px !important;
}

#ng6CashView .ng6-cart-row strong,
#ng6CashView .ng6-product-result strong{
    overflow-wrap:anywhere;
}

#ng6CashView .ng6-payment-row > :nth-child(4){
    grid-column:span 2;
}

#ng6CashView .ng6-payment-row > :nth-child(5){
    grid-column:3;
    grid-row:1 / span 2;
    align-self:center;
}

@container ng6PosColumn (max-width:460px){
    #panelScreen #ng6CashView .ng6-cart-row{
        grid-template-columns:minmax(0,1fr) auto !important;
    }

    #ng6CashView .ng6-cart-row > input{
        grid-column:1;
        grid-row:2;
        max-width:96px;
    }

    #ng6CashView .ng6-cart-row > strong{
        grid-column:2;
        grid-row:2;
    }

    #ng6CashView .ng6-cart-row > button{
        grid-column:2;
        grid-row:1;
    }
}

.ng6-payment-row input,
.ng6-payment-row select{
    width:100%;
    box-sizing:border-box;
    background:#0a121c;
    color:#fff;
    border:1px solid #33475a;
    border-radius:8px;
    padding:8px;
}

.ng6-total-line{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:5px 0;
}

.ng6-total-line.big{
    margin-top:8px;
    padding-top:10px;
    border-top:1px solid #33475a;
    font-size:20px;
    font-weight:900;
}

.ng6-permissions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
}

.ng6-permission{
    display:flex;
    gap:7px;
    align-items:center;
    border:1px solid #293b4d;
    background:#111d29;
    padding:8px;
    border-radius:9px;
    font-size:12px;
}

.ng6-report-block{
    max-height:360px;
    overflow:auto;
}

@media(max-width:1000px){

    .ng6-kpis{
        grid-template-columns:repeat(3,1fr);
    }

    .ng6-grid-4,
    .ng6-grid-5,
    .ng6-permissions{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:700px){

    .ng6-grid-2,
    .ng6-grid-3,
    .ng6-grid-4,
    .ng6-grid-5,
    .ng6-permissions,
    .ng6-kpis{
        grid-template-columns:1fr;
    }

    .ng6-cart-row,
    .ng6-payment-row{
        grid-template-columns:1fr;
    }

    #ng6CashView .ng6-payment-row{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px;
    }
}


/* NEXTGUARD CASH REPORT FILTERS */
.ng6-cash-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:12px 0 16px}.ng6-cash-toolbar .ng6-field{min-width:170px;margin:0;flex:1}.ng6-cash-toolbar button{min-height:42px}.ng6-cash-toolbar .ng6-btn.small{padding:6px 10px}
@media(max-width:700px){.ng6-cash-toolbar{align-items:stretch}.ng6-cash-toolbar .ng6-field{min-width:100%;}.ng6-cash-toolbar button{width:100%}}
