/* 
===============================================
POS DARK THEME - CSS Personalizzato
Ottimizzato per Bootstrap 5.3+ Dark Mode
===============================================
*/

/* === VARIABILI COLORE POS === */
:root {
    --pos-primary: #c0af6e;
    --pos-primary-dark: #a89555;
    --pos-primary-light: #d4c583;
    --pos-white: #ffffff;
    --pos-success: #198754;
    --pos-warning: #ffc107;
    --pos-danger: #dc3545;
    --pos-info: #0dcaf0;
    --pos-secondary: #6c757d;
    
    /* Colori specifici POS */
    --pos-cash: #20c997;
    --pos-card: #c0af6e;
    --pos-discount: #fd7e14;
    --pos-void: #dc3545;
    
    /* Background gradients */
    --pos-bg-primary: #000000;;
    --pos-bg-card: rgba(255, 255, 255, 0.05);
    --pos-bg-hover: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --pos-font-size-xs: 0.7rem;
    --pos-font-size-sm: 0.8rem;
    --pos-font-size-base: 0.9rem;
    --pos-font-size-lg: 1.1rem;
    
    /* Spacing ottimizzato */
    --pos-spacing-xs: 0.25rem;
    --pos-spacing-sm: 0.5rem;
    --pos-spacing-md: 0.75rem;
    --pos-spacing-lg: 1rem;
}

/* === RESET E BASE === */
body {
    font-size: var(--pos-font-size-base) !important;
    line-height: 1.3 !important;
    background: var(--pos-bg-primary) !important;
    color: #e9ecef !important;
}
.bg-dark {
    --bs-bg-opacity: 1;
    background-color: rgb(26 26 26) !important;
}

/* === LAYOUT CONTAINER === */
.container-fluid {
    padding: var(--pos-spacing-xs) !important;
    max-width: 100vw;
    overflow-x: hidden;
}

/* === SISTEMA GRID OTTIMIZZATO === */
.row {
    margin: 0 !important;
}

.row > [class*="col-"] {
    padding: 5px !important;
}

/* Gap ridotto per layout compatto */
.g-1 > .col-1,
.g-1 > .col-2,
.g-1 > .col-3,
.g-1 > .col-4,
.g-1 > .col-5,
.g-1 > .col-6,
.g-1 > .col-7,
.g-1 > .col-8,
.g-1 > .col-9,
.g-1 > .col-10,
.g-1 > .col-11,
.g-1 > .col-12,
.g-1 > [class*="col-"] {
    padding: var(--pos-spacing-xs) !important;
}

/* === CARDS E CONTENITORI === */
.card {
    background: var(--pos-bg-card) !important;
    border: 1px solid var(--pos-primary) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin-bottom: var(--pos-spacing-sm);
}

.card:hover {
    background: var(--pos-bg-hover) !important;
    border-color: var(--pos-primary-light) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 175, 110, 0.2) !important;
}

/* .card-header {
    background: rgba(192, 175, 110, 0.15) !important;
    border-bottom: 1px solid var(--pos-primary) !important;
    padding: var(--pos-spacing-sm) var(--pos-spacing-md) !important;
    font-weight: 600;
    font-size: var(--pos-font-size-sm);
    color: var(--pos-white) !important;
} */

.card-title {
    color: var(--pos-primary) !important;
    font-weight: 700 !important;
    margin-bottom: var(--pos-spacing-xs) !important;
}

.card-subtitle {
    color: var(--pos-white) !important;
    opacity: 0.8;
}

.card-body {
    padding: var(--pos-spacing-md) !important;
}

.card-footer {
    background: rgba(192, 175, 110, 0.08) !important;
    border-top: 1px solid var(--pos-primary) !important;
    padding: var(--pos-spacing-sm) var(--pos-spacing-md) !important;
}

/* === TITOLI === */
h1, h2, h3, h4, h5, h6 {
    color: var(--pos-primary) !important;
    font-weight: 700 !important;
}

h1 { font-size: 1.4rem !important; }
h2 { font-size: 1.2rem !important; }
h3 { font-size: 1.1rem !important; }
h4 { font-size: 1rem !important; }
h5 { font-size: 0.9rem !important; }
h6 { font-size: 0.8rem !important; }

/* === BOTTONI POS === */
.btn {
    font-size: var(--pos-font-size-sm) !important;
    font-weight: 500 !important;
    padding: var(--pos-spacing-sm) var(--pos-spacing-md) !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-lg {
    font-size: var(--pos-font-size-base) !important;
    padding: var(--pos-spacing-md) var(--pos-spacing-lg) !important;
}

.btn-sm {
    font-size: var(--pos-font-size-xs) !important;
    padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
}

/* Bottoni specifici POS */
.btn-pos-cash {
    background: var(--pos-cash) !important;
    border-color: var(--pos-cash) !important;
    color: #000 !important;
}

.btn-pos-card {
    background: var(--pos-primary) !important;
    border-color: var(--pos-primary) !important;
    color: #000 !important;
}

.btn-pos-void {
    background: var(--pos-void) !important;
    border-color: var(--pos-void) !important;
}

.btn-pos-discount {
    background: var(--pos-discount) !important;
    border-color: var(--pos-discount) !important;
    color: #000 !important;
}

/* === TABELLE === */
.table {
    font-size: var(--pos-font-size-sm) !important;
    margin-bottom: 0 !important;
}

.table th {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    font-weight: 600 !important;
    padding: var(--pos-spacing-sm) !important;
    font-size: var(--pos-font-size-xs) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    padding: var(--pos-spacing-sm) !important;
    vertical-align: middle !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02) !important;
}

.table-hover > tbody > tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* === FORMS === */
.form-control {
    font-size: var(--pos-font-size-sm) !important;
    padding: var(--pos-spacing-sm) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e9ecef !important;
}

.form-control:focus {
    border-color: var(--pos-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(192, 175, 110, 0.25) !important;
}

.form-label {
    font-size: var(--pos-font-size-xs) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--pos-spacing-xs) !important;
    color: var(--pos-primary) !important;
}

.form-select {
    font-size: var(--pos-font-size-sm) !important;
    padding: var(--pos-spacing-sm) !important;

    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* === BADGES E INDICATORS === */
.badge {
    font-size: var(--pos-font-size-xs) !important;
    padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
    font-weight: 600 !important;
}

/* === ALERTS === */
.alert {
    font-size: var(--pos-font-size-sm) !important;
    padding: var(--pos-spacing-md) !important;
    margin-bottom: var(--pos-spacing-md) !important;
    border-radius: 6px !important;
}



/* === NAVIGAZIONE === */
.nav-link {
    font-size: var(--pos-font-size-sm) !important;
    padding: var(--pos-spacing-sm) var(--pos-spacing-md) !important;
    color: #adb5bd !important;
}

.nav-link.active {
    color: #000 !important;
    background: var(--pos-primary) !important;
}

/* === PROGRESS BARS === */
.progress {
    height: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* === UTILITIES CUSTOM === */
.text-pos-price {
    color: var(--pos-success) !important;
    font-weight: 700 !important;
    font-size: var(--pos-font-size-lg) !important;
}

.text-pos-total {
    color: var(--pos-warning) !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
}

.bg-pos-module {
    background: var(--pos-bg-card) !important;
    border-radius: 8px !important;
    padding: var(--pos-spacing-md) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* === RESPONSIVE POS === */
@media (max-width: 768px) {
    body.mobile-pos {
        font-size: var(--pos-font-size-xs) !important;
    }
    
    .btn {
        padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
        font-size: var(--pos-font-size-xs) !important;
    }
    
    .card-body {
        padding: var(--pos-spacing-sm) !important;
    }
    
    .table th,
    .table td {
        padding: var(--pos-spacing-xs) !important;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 2px !important;
    }
    
    .row > [class*="col-"] {
        padding: 2px !important;
    }
}

/* === ANIMAZIONI === */
.pos-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === FOCUS MANAGEMENT === */
.mouse-navigation *:focus {
    outline: none !important;
}

/* === SCROLLBARS === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* === PRINT STYLES === */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        background: white !important;
    }
}
/* 
===============================================
POS NAVIGATION CSS - top_header_stretto
Aggiungi questo al CSS personalizzato esistente
===============================================
*/

/* === NAVIGATION BLOCK === */
.pos-nav-block {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: var(--pos-spacing-xs) 0 !important;
}

.pos-nav-header {
    background: rgba(192, 175, 110, 0.15) !important;
    color: var(--pos-primary) !important;
    font-weight: 700 !important;
    font-size: var(--pos-font-size-sm) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: var(--pos-spacing-xs) var(--pos-spacing-md) !important;
    border-radius: 6px 6px 0 0 !important;
    border: 1px solid var(--pos-primary) !important;
    border-bottom: none !important;
    text-align: center !important;
}

.pos-nav-body {
    background: var(--pos-bg-card) !important;
    border: 1px solid var(--pos-primary) !important;
    border-top: none !important;
    border-radius: 0 0 6px 6px !important;
    padding: var(--pos-spacing-sm) !important;
    backdrop-filter: blur(10px);
}

.pos-custom-menu {
    margin: 0 !important;
}

/* === NAVIGATION PILLS === */
.pos-custom-menu .nav-pills {
    gap: var(--pos-spacing-xs) !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
}

.pos-custom-menu .nav-item {
    margin: 0 !important;
}

.pos-nav-link {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(192, 175, 110, 0.3) !important;
    color: var(--pos-white) !important;
    font-size: var(--pos-font-size-xs) !important;
    font-weight: 600 !important;
    padding: var(--pos-spacing-sm) var(--pos-spacing-md) !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    min-height: 36px !important;
}

.pos-nav-link:hover {
    background: rgba(192, 175, 110, 0.2) !important;
    border-color: var(--pos-primary) !important;
    color: var(--pos-white) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(192, 175, 110, 0.3) !important;
}

.pos-nav-link.active,
.pos-nav-link.current {
    background: var(--pos-primary) !important;
    border-color: var(--pos-primary) !important;
    color: #000 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(192, 175, 110, 0.4) !important;
}

.pos-nav-link.active:hover,
.pos-nav-link.current:hover {
    background: var(--pos-primary-dark) !important;
    border-color: var(--pos-primary-dark) !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
}

/* === ICONS E TEXT === */
.pos-nav-icon {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain !important;
    filter: brightness(0.9) !important;
}

.pos-nav-link.active .pos-nav-icon,
.pos-nav-link.current .pos-nav-icon {
    filter: brightness(0) !important;
}

.pos-nav-text {
    font-size: var(--pos-font-size-xs) !important;
    line-height: 1.2 !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .pos-nav-header {
        font-size: var(--pos-font-size-xs) !important;
        padding: var(--pos-spacing-xs) !important;
    }
    
    .pos-nav-body {
        padding: var(--pos-spacing-xs) !important;
    }
    
    .pos-nav-link {
        font-size: 0.65rem !important;
        padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
        min-height: 32px !important;
    }
    
    .pos-nav-icon {
        width: 14px !important;
        height: 14px !important;
    }
    
    .pos-custom-menu .nav-pills {
        gap: 2px !important;
    }
}

@media (max-width: 576px) {
    .pos-nav-link {
        padding: var(--pos-spacing-xs) !important;
        min-height: 28px !important;
    }
    
    .pos-nav-text {
        font-size: 0.6rem !important;
    }
    
    .pos-nav-icon {
        width: 12px !important;
        height: 12px !important;
    }
}

/* === SUBITEMS (se presenti) === */
.pos-nav-block .nav-item .nav-item {
    margin-top: var(--pos-spacing-xs) !important;
}

.pos-nav-block .nav-item .nav-item .pos-nav-link {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(192, 175, 110, 0.2) !important;
    font-size: 0.65rem !important;
    padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
}

/* === ANIMATION === */
.pos-nav-block {
    animation: posNavFadeIn 0.4s ease-out;
}

@keyframes posNavFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === BLOCK SIMPLE - Sistema CMS Originale === */
.block-simple {
    background-color: transparent !important;
    border: 0px none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.block-simple2 {
    border: 0px none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.block-simple2 .BlockTop,
.block-simple2 .pos-nav-header {
    border: 0px none !important;
}

.hidden-title .BlockTop, 
.block-simple .BlockTop,
.hidden-title .pos-nav-header, 
.block-simple .pos-nav-header {
    display: none !important;
}

.hidden-title .TopTitle, 
.hidden-title .TopTitleBgr {
    display: none !important;
}

/* === LAYOUT STYLES === */
.leftStyle .hidden-title .BlockTop, 
.leftStyle .block-simple .BlockTop,
.leftStyle .hidden-title .pos-nav-header, 
.leftStyle .block-simple .pos-nav-header {
    display: none !important;
}

.leftStyle .hidden-title .TopTitle, 
.leftStyle .hidden-title .TopTitleBgr {
    display: none !important;
}

.rightStyle .hidden-title .BlockTop, 
.rightStyle .block-simple .BlockTop,
.rightStyle .hidden-title .pos-nav-header, 
.rightStyle .block-simple .pos-nav-header {
    display: none !important;
}

/* === BLOCK SIMPLE per Navigation === */
.block-simple .pos-nav-body {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* === RESPONSIVE BLOCK SIMPLE === */
@media (max-width: 768px) {
    .block-simple .pos-nav-link {
        font-size: 0.65rem !important;
        padding: var(--pos-spacing-xs) !important;
        min-height: 28px !important;
    }
} === */
.block-simple.pos-nav-block {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.block-simple .pos-nav-header {
    display: none !important;
}

.block-simple .pos-nav-body {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    backdrop-filter: none !important;
}

.block-simple .pos-custom-menu {
    margin: 0 !important;
}

/* Navigation pills per block-simple - più minimale */
.block-simple .pos-nav-link {
    background: rgba(192, 175, 110, 0.1) !important;
    border: 1px solid rgba(192, 175, 110, 0.2) !important;
    color: var(--pos-white) !important;
    font-size: var(--pos-font-size-xs) !important;
    font-weight: 600 !important;
    padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    min-height: 32px !important;
}

.block-simple .pos-nav-link:hover {
    background: rgba(192, 175, 110, 0.25) !important;
    border-color: var(--pos-primary) !important;
    color: var(--pos-white) !important;
}

.block-simple .pos-nav-link.active,
.block-simple .pos-nav-link.current {
    background: var(--pos-primary) !important;
    border-color: var(--pos-primary) !important;
    color: #000 !important;
    font-weight: 700 !important;
}

/* === BLOCK SIMPLE GENERALE (per tutti i moduli) === */
.block-simple {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* 
===============================================
POS DASHBOARD STATS CARDS - CSS Dedicato
Solo per il modulo block_pos_dashboard_stats_cards
===============================================
*/

/* === DASHBOARD STATS CARDS === */
.pos-dashboard-stats {
    margin: 0;
    padding: 0;
}

.pos-stats-card {
    background: var(--pos-bg-card) !important;
    border: 1px solid var(--pos-primary) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
    min-height: 120px !important;
}

.pos-stats-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(192, 175, 110, 0.3) !important;
    border-color: var(--pos-primary-light) !important;
}

.pos-stats-card .card-body {
    padding: var(--pos-spacing-md) !important;
    position: relative !important;
}

.pos-stats-card .card-title {
    font-size: var(--pos-font-size-xs) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: var(--pos-spacing-xs) !important;
}

.pos-stats-main {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: var(--pos-primary) !important;
    line-height: 1 !important;
    margin-bottom: var(--pos-spacing-xs) !important;
}

.pos-stats-sub {
    font-size: var(--pos-font-size-xs) !important;
    color: var(--pos-white) !important;
    opacity: 0.8 !important;
    font-weight: 500 !important;
}

.pos-stats-icon {
    position: absolute !important;
    top: var(--pos-spacing-md) !important;
    right: var(--pos-spacing-md) !important;
    font-size: 2rem !important;
    color: var(--pos-primary) !important;
    opacity: 0.3 !important;
}

.pos-stats-trend {
    border-top: 1px solid rgba(192, 175, 110, 0.2) !important;
    padding-top: var(--pos-spacing-xs) !important;
    margin-top: var(--pos-spacing-sm) !important;
}

.pos-stats-trend small {
    font-size: var(--pos-font-size-xs) !important;
    font-weight: 600 !important;
}

/* === COLORI SPECIFICI CARDS === */
.pos-stats-vendite {
    border-left: 4px solid var(--pos-success) !important;
}

.pos-stats-prodotti {
    border-left: 4px solid var(--pos-info) !important;
}

.pos-stats-clienti {
    border-left: 4px solid var(--pos-primary) !important;
}

.pos-stats-esaurimento {
    border-left: 4px solid var(--pos-warning) !important;
}

/* === DASHBOARD FOOTER === */
.pos-dashboard-footer {
    background: rgba(192, 175, 110, 0.05) !important;
    border: 1px solid rgba(192, 175, 110, 0.2) !important;
    border-radius: 6px !important;
    padding: var(--pos-spacing-sm) var(--pos-spacing-md) !important;
    margin-top: var(--pos-spacing-sm) !important;
}

.pos-dashboard-footer small {
    color: var(--pos-white) !important;
    opacity: 0.8 !important;
}

.pos-dashboard-footer .btn {
    font-size: var(--pos-font-size-xs) !important;
    padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
}

/* === RESPONSIVE DASHBOARD === */
@media (max-width: 768px) {
    .pos-stats-card {
        min-height: 100px !important;
    }
    
    .pos-stats-main {
        font-size: 1.4rem !important;
    }
    
    .pos-stats-icon {
        font-size: 1.5rem !important;
    }
    
    .pos-stats-card .card-title {
        font-size: 0.65rem !important;
    }
    
    .pos-stats-sub,
    .pos-stats-trend small {
        font-size: 0.6rem !important;
    }
}

@media (max-width: 576px) {
    .pos-dashboard-stats .row {
        gap: var(--pos-spacing-xs) !important;
    }
    
    .pos-stats-card {
        min-height: 90px !important;
    }
    
    .pos-stats-main {
        font-size: 1.2rem !important;
    }
    
    .pos-stats-card .card-body {
        padding: var(--pos-spacing-sm) !important;
    }
}

/* === ANIMAZIONI === */
.pos-stats-card {
    animation: posStatsSlideIn 0.4s ease-out;
}

@keyframes posStatsSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 
===============================================
POS CASH STATUS WIDGET - CSS Dedicato
Per il modulo block_pos_cash_status
===============================================
*/

/* === CASH STATUS CONTAINER === */
.pos-cash-status {
    margin: 0;
    padding: 0;
}

.pos-cash-card {
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

/* === CASSA CHIUSA === */
.pos-cash-card-closed {
    background: var(--pos-bg-card) !important;
    border: 2px solid var(--pos-danger) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2) !important;
}

.pos-cash-card-closed:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3) !important;
    border-color: #ff6b6b !important;
}

.pos-cash-header-closed {
    background: rgba(220, 53, 69, 0.15) !important;
    border-bottom: 1px solid var(--pos-danger) !important;
    color: var(--pos-white) !important;
}

/* === CASSA APERTA === */
.pos-cash-card-opened {
    background: var(--pos-bg-card) !important;
    border: 2px solid var(--pos-success) !important;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.2) !important;
}

.pos-cash-header-opened {
    background: rgba(25, 135, 84, 0.15) !important;
    border-bottom: 1px solid var(--pos-success) !important;
    color: var(--pos-white) !important;
}

/* === ULTIMO TURNO INFO === */
.pos-ultimo-turno {
    margin: 0;
}

.pos-ultimo-info {
    display: flex;
    flex-direction: column;
    gap: var(--pos-spacing-xs);
}

.pos-ultimo-data,
.pos-ultimo-operatore {
    font-size: var(--pos-font-size-xs) !important;
    color: var(--pos-white) !important;
    opacity: 0.9 !important;
    font-weight: 500 !important;
}

.pos-ultimo-incasso {
    text-align: right;
}

.pos-cash-amount {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: var(--pos-primary) !important;
    line-height: 1 !important;
}

.pos-cash-scontrini {
    font-size: var(--pos-font-size-xs) !important;
    color: var(--pos-white) !important;
    opacity: 0.8 !important;
    margin-top: 2px !important;
}

/* === DETTAGLI CASSA === */
.pos-cash-detail {
    text-align: center;
    padding: var(--pos-spacing-xs) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pos-cash-detail-label {
    font-size: var(--pos-font-size-xs) !important;
    color: var(--pos-white) !important;
    opacity: 0.7 !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 2px !important;
}

.pos-cash-detail-value {
    font-size: var(--pos-font-size-sm) !important;
    font-weight: 700 !important;
    color: var(--pos-white) !important;
    line-height: 1 !important;
}

/* === TURNO CORRENTE === */
.pos-turno-corrente {
    margin: 0;
}

.pos-operatore-corrente {
    flex: 1;
}

.pos-operatore-nome {
    font-size: var(--pos-font-size-sm) !important;
    font-weight: 700 !important;
    color: var(--pos-success) !important;
    margin-bottom: var(--pos-spacing-xs) !important;
}

.pos-operatore-apertura {
    font-size: var(--pos-font-size-xs) !important;
    color: var(--pos-white) !important;
    opacity: 0.8 !important;
    font-weight: 500 !important;
}

.pos-cash-actions {
    display: flex;
    gap: var(--pos-spacing-xs);
}

.pos-cash-actions .btn {
    padding: var(--pos-spacing-xs) var(--pos-spacing-sm) !important;
    font-size: var(--pos-font-size-xs) !important;
    border-radius: 4px !important;
}

/* === BOTTONE APRI CASSA === */
.pos-apri-cassa .btn {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: var(--pos-spacing-sm) !important;
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* === BADGE PULSE === */
.badge.pulse {
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* === TIMESTAMP === */
.pos-cash-timestamp {
    text-align: center;
    padding: var(--pos-spacing-xs) 0;
}

.pos-cash-timestamp small {
    color: var(--pos-white) !important;
    opacity: 0.6 !important;
    font-size: var(--pos-font-size-xs) !important;
}

/* === HOVER EFFECTS === */
.pos-cash-card-closed .card-body:hover .pos-cash-amount {
    color: var(--pos-success) !important;
    transition: color 0.3s ease !important;
}

.pos-cash-detail:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(192, 175, 110, 0.3) !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .pos-cash-amount {
        font-size: 1.2rem !important;
    }
    
    .pos-cash-detail-label,
    .pos-ultimo-data,
    .pos-ultimo-operatore,
    .pos-operatore-apertura {
        font-size: 0.65rem !important;
    }
    
    .pos-cash-detail-value {
        font-size: 0.7rem !important;
    }
    
    .pos-operatore-nome {
        font-size: 0.8rem !important;
    }
    
    .pos-cash-actions .btn {
        padding: 4px 6px !important;
    }
}

@media (max-width: 576px) {
    .pos-cash-card .card-body {
        padding: var(--pos-spacing-sm) !important;
    }
    
    .pos-cash-amount {
        font-size: 1.1rem !important;
    }
    
    .pos-cash-detail {
        padding: 4px !important;
    }
    
    .pos-cash-detail-label {
        font-size: 0.6rem !important;
    }
    
    .pos-cash-detail-value {
        font-size: 0.65rem !important;
    }
}

/* === ANIMAZIONI === */
.pos-cash-status {
    animation: cashStatusSlideIn 0.5s ease-out;
}

@keyframes cashStatusSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === STATI COLORATI === */
.text-success {
    color: var(--pos-success) !important;
}

.text-danger {
    color: var(--pos-danger) !important;
}

.text-warning {
    color: var(--pos-warning) !important;
}

.text-muted {
    color: #6c757d !important;
}

/* === FOCUS E ACCESSIBILITÀ === */
.pos-cash-card:focus {
    outline: 2px solid var(--pos-primary) !important;
    outline-offset: 2px !important;
}

.pos-cash-actions .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(192, 175, 110, 0.25) !important;
}

/* === LOADING STATE === */
.pos-cash-loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.pos-cash-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--pos-primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.pos-cash-status {
    --pos-gold: #c0af6e;
    --pos-gold-dark: #a8975b;
    --pos-gold-light: #d4c586;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pos-cash-card {
    border-radius: 8px;
    border: 1px solid rgba(192, 175, 110, 0.2);
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.pos-cash-card-closed {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    cursor: pointer;
}

.pos-cash-card-closed:hover {
    border-color: rgba(220, 53, 69, 0.4);
    transform: translateY(-1px);
}

.pos-cash-card-opened {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1), rgba(25, 135, 84, 0.05));
    border-color: rgba(25, 135, 84, 0.3);
}

.pos-cash-header-closed {
    background: rgba(220, 53, 69, 0.1);
    border-bottom: 1px solid rgba(220, 53, 69, 0.2);
    padding: 0.5rem 0.75rem;
}

.pos-cash-header-opened {
    background: rgba(25, 135, 84, 0.1);
    border-bottom: 1px solid rgba(25, 135, 84, 0.2);
    padding: 0.5rem 0.75rem;
}

.pos-cash-card .card-body {
    padding: 0.75rem !important;
}

.pos-ultimo-info {
    font-size: 0.8rem;
    line-height: 1.3;
}

.pos-ultimo-data, .pos-ultimo-operatore {
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
}

.pos-ultimo-incasso {
    text-align: right;
}

.pos-cash-amount {
    font-weight: 600;
    font-size: 1rem;
    color: var(--pos-gold);
}

.pos-cash-scontrini {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.pos-cash-detail {
    text-align: center;
    padding: 0.25rem;
}

.pos-cash-detail-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.pos-cash-detail-value {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pos-gold-light);
}

.pos-apri-cassa .btn {
    min-height: 44px;
    font-weight: 500;
    border-radius: 6px;
}

.pos-turno-corrente {
    background: rgba(25, 135, 84, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
}

.pos-operatore-nome {
    font-weight: 600;
    color: var(--pos-gold);
    margin-bottom: 0.25rem;
}

.pos-operatore-apertura {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.pos-cash-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: 0.25rem;
    border-radius: 6px;
}

.pos-cash-timestamp {
    text-align: center;
    margin-top: 0.5rem;
}

.pulse {
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* Modal ottimizzazioni */
.modal-content {
    border-radius: 8px;
    border: 1px solid rgba(192, 175, 110, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, rgba(192, 175, 110, 0.1), rgba(192, 175, 110, 0.05));
    border-bottom: 1px solid rgba(192, 175, 110, 0.2);
    padding: 0.75rem 1rem;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(192, 175, 110, 0.2);
}

/* Form controls POS-friendly */
.form-control, .form-select {
    min-height: 44px;
    border-radius: 6px;
    border: 1px solid rgba(192, 175, 110, 0.3);
    background-color: rgba(192, 175, 110, 0.05);
}

.form-control:focus, .form-select:focus {
    border-color: var(--pos-gold);
    box-shadow: 0 0 0 0.2rem rgba(192, 175, 110, 0.25);
}

/* Tabella storico compatta */
.table-sm td, .table-sm th {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.btn-sm {
    min-height: 36px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Responsive per tablet POS */
@media (max-width: 768px) {
    .pos-cash-detail {
        padding: 0.15rem;
    }
    
    .pos-cash-detail-value {
        font-size: 0.7rem;
    }
    
    .pos-cash-amount {
        font-size: 0.9rem;
    }
}
/* ===== PANNELLO DESTRO - CARRELLO ===== */

.pos-right-panel {
  width: 350px;
  background: #252525;
  border-left: 1px solid #404040;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px - 80px);
}

/* Header carrello */
.pos-cart-header {
  background: #2d2d2d;
  border-bottom: 1px solid #404040;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c0af6e;
  font-weight: 600;
  font-size: 13px;
}

.cart-ticket-info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.ticket-label {
  color: #999999;
}

.ticket-number {
  color: #ffffff;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* Contenuto carrello */
.pos-cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.pos-cart-content::-webkit-scrollbar {
  width: 4px;
}

.pos-cart-content::-webkit-scrollbar-track {
  background: #333333;
}

.pos-cart-content::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 2px;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #999999;
  height: 200px;
}

.empty-icon {
  font-size: 32px;
  color: #555555;
  margin-bottom: 12px;
}

.cart-empty-state h3 {
  color: #cccccc;
  margin: 8px 0;
  font-size: 16px;
}

.cart-empty-state p {
  margin: 4px 0;
  font-size: 13px;
}

.empty-stats {
  margin-top: 10px;
  font-size: 11px;
}

/* Item carrello */
.cart-item {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 8px;
}

.cart-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cart-item-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  line-height: 1.3;
}

.cart-item-actions {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.btn-cart-edit, .btn-cart-remove {
  background: none;
  border: none;
  color: #999999;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
}

.btn-cart-edit:hover {
  background: #404040;
  color: #3498db;
}

.btn-cart-remove:hover {
  background: #404040;
  color: #e74c3c;
}

.cart-item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
}

.cart-item-price {
  color: #c0af6e;
  font-weight: 600;
}

.cart-item-stock {
  color: #999999;
}

.cart-quantity-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.qty-btn {
  background: #404040;
  border: 1px solid #555555;
  color: #cccccc;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.qty-btn:hover {
  background: #555555;
  border-color: #c0af6e;
  color: #c0af6e;
}

.qty-input {
  background: #2d2d2d;
  border: 1px solid #404040;
  color: #ffffff;
  text-align: center;
  width: 50px;
  height: 24px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.qty-input:focus {
  outline: none;
  border-color: #c0af6e;
}

.cart-item-total {
  text-align: right;
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 0;
  border-top: 1px solid #404040;
}

/* Footer carrello */
.pos-cart-footer {
  background: #2d2d2d;
  border-top: 1px solid #404040;
  padding: 10px 12px;
}

.cart-totals-section {
  margin-bottom: 10px;
}

.totals-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 2px 0;
}

.total-subtotal {
  color: #cccccc;
}

.total-sconto {
  color: #f39c12;
}

.total-iva {
  color: #999999;
  font-size: 11px;
}

.total-finale {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  border-top: 1px solid #404040;
  padding-top: 6px;
  margin-top: 4px;
}

/* ===== FOOTER POS ===== */

.pos-footer {
  background: #000000;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
  z-index: 90;
  flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

/* Informazioni vendita */
.pos-footer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-totale {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 8px 12px;
}

.totale-label {
  color: #c0af6e;
  font-weight: 600;
  font-size: 12px;
}

.totale-value {
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
}

.footer-sconto {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.sconto-label {
  color: #f39c12;
}

.sconto-value {
  color: #f39c12;
  font-weight: 600;
}

/* Sezione cliente */
.pos-footer-cliente {
  flex: 1;
  max-width: 300px;
}

.cliente-selected {
  background: #2d2d2d;
  border: 1px solid #27ae60;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cliente-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cliente-info i {
  color: #27ae60;
  font-size: 14px;
}

.cliente-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cliente-details strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cliente-details small {
  color: #999999;
  font-size: 10px;
}

.btn-remove-cliente {
  background: none;
  border: none;
  color: #999999;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-cliente:hover {
  background: #404040;
  color: #e74c3c;
}

.cliente-search {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.cliente-search:focus-within {
  border-color: #c0af6e;
}

.cliente-input-container {
  display: flex;
  align-items: center;
}

.input-icon {
  color: #999999;
  padding: 0 8px;
  font-size: 12px;
}

.cliente-input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  padding: 8px 0;
  font-size: 12px;
  outline: none;
}

.cliente-input::placeholder {
  color: #666666;
}

.btn-search-cliente {
  background: none;
  border: none;
  color: #999999;
  padding: 6px 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-search-cliente:hover {
  color: #c0af6e;
}

/* Sezione sconto */
.pos-footer-sconto {
  display: flex;
  align-items: center;
}

.sconto-input-container {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 6px 8px;
  transition: border-color 0.2s ease;
}

.sconto-input-container:focus-within {
  border-color: #c0af6e;
}

.sconto-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f39c12;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.sconto-input {
  background: none;
  border: none;
  color: #ffffff;
  width: 50px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.sconto-symbol {
  color: #f39c12;
  font-size: 11px;
  font-weight: 600;
}

/* Azioni principali */
.pos-footer-actions {
  display: flex;
  gap: 8px;
}

.footer-action-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  min-width: 90px;
  justify-content: center;
}

.footer-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-contanti {
  background: #27ae60;
  color: #ffffff;
}

.btn-contanti:hover:not(:disabled) {
  background: #2ecc71;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-carta {
  background: #3498db;
  color: #ffffff;
}

.btn-carta:hover:not(:disabled) {
  background: #5dade2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-svuota {
  background: #e74c3c;
  color: #ffffff;
}

.btn-svuota:hover {
  background: #ec7063;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* ===== MODALI SISTEMA ===== */

.modal-cliente, .modal-pagamento, .modal-azione, .modal-gestione, .modal-conferma {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-cliente-overlay, .modal-pagamento-overlay, .modal-gestione-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.modal-cliente-container, .modal-pagamento-container, .modal-azione-container, .modal-gestione-container {
  background: #252525;
  border: 1px solid #404040;
  border-radius: 8px;
  width: auto;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1001;
  min-width: 450px;
}

.modal-gestione-container.modal-lg {
  max-width: 800px;
}

.modal-loading {
  max-width: 300px;
  text-align: center;
}

/* Headers modali */
.modal-cliente-header, .modal-pagamento-header, .modal-azione-header, .modal-gestione-header {
  background: #2d2d2d;
  border-bottom: 1px solid #404040;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-cliente-header h3, .modal-pagamento-header h3, .modal-azione-header h3, .modal-gestione-header h3 {
  color: #ffffff;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #999999;
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 4px;
}

.modal-close-btn:hover {
  color: #e74c3c;
  background: #404040;
}

/* Body modali */
.modal-cliente-body, .modal-pagamento-body, .modal-azione-body, .modal-gestione-body {
  padding: 16px;
}

/* Footer modali */
.modal-cliente-actions, .modal-pagamento-footer, .modal-azione-footer, .modal-gestione-footer {
  background: #2d2d2d;
  border-top: 1px solid #404040;
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Pulsanti modali */
.btn-cliente, .btn-pagamento, .btn-azione, .btn-gestione {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-success {
  background: #27ae60;
  color: #ffffff;
}

.btn-success:hover {
  background: #2ecc71;
  transform: translateY(-1px);
}

.btn-primary {
  background: #3498db;
  color: #ffffff;
}

.btn-primary:hover {
  background: #5dade2;
  transform: translateY(-1px);
}

.btn-danger {
  background: #e74c3c;
  color: #ffffff;
}

.btn-danger:hover {
  background: #ec7063;
  transform: translateY(-1px);
}

.btn-light {
  background: #404040;
  color: #cccccc;
  border: 1px solid #555555;
}

.btn-light:hover {
  background: #555555;
  color: #ffffff;
}

.btn-secondary {
  background: #666666;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #777777;
}

/* Cards clienti */
.cliente-found-card, .frequent-customer-card, .new-customer-card {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.cliente-avatar, .frequent-icon, .new-customer-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.cliente-avatar { color: #27ae60; }
.frequent-icon { color: #f39c12; }
.new-customer-icon { color: #3498db; }

.cliente-details h4, .frequent-customer-card h4, .new-customer-card h4 {
  color: #ffffff;
  margin: 8px 0;
  font-size: 16px;
}

.cliente-info-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cccccc;
  font-size: 12px;
}

.info-item i {
  color: #c0af6e;
  width: 14px;
  text-align: center;
}

.cliente-stats {
  display: flex;
  justify-content: space-around;
  margin: 12px 0;
  gap: 8px;
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  color: #c0af6e;
  font-size: 14px;
  font-weight: 700;
}

.stat span {
  color: #999999;
  font-size: 10px;
  text-transform: uppercase;
}

.sconto-vip {
  background: #f39c12;
  color: #1a1a1a;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.frequent-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
}

.frequent-stat {
  color: #cccccc;
  font-size: 12px;
}

/* Form gruppi */
.form-group-cliente, .form-group {
  margin-bottom: 12px;
}

.form-label-cliente, .form-label {
  display: block;
  color: #cccccc;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-input-cliente, .form-input {
  width: 100%;
  background: #333333;
  border: 1px solid #404040;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  transition: border-color 0.2s ease;
}

.form-input-cliente:focus, .form-input:focus {
  outline: none;
  border-color: #c0af6e;
}

.form-input[readonly] {
  background: #2d2d2d;
  color: #999999;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-row .form-group {
  flex: 1;
}

.form-select {
  width: 100%;
  background: #333333;
  border: 1px solid #404040;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: #c0af6e;
}

/* Loading modali */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.loading-spinner {
  font-size: 24px;
  color: #c0af6e;
  margin-bottom: 10px;
}

.loading-content h4 {
  color: #ffffff;
  margin: 8px 0;
  font-size: 14px;
}

.loading-content p {
  color: #999999;
  margin: 4px 0;
  font-size: 12px;
}

/* Riepilogo vendita */
.riepilogo-vendita, .riepilogo-ordine {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
}

.riepilogo-header {
  border-bottom: 1px solid #404040;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.riepilogo-header h4 {
  color: #c0af6e;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.riepilogo-dettagli, .totali-carta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.riepilogo-row, .totale-riga {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #cccccc;
}

.riepilogo-totale {
  color: #c0af6e;
  font-weight: 700;
  font-size: 14px;
}

.totale-finale {
  border-top: 1px solid #404040;
  padding-top: 6px;
  margin-top: 4px;
  font-weight: 700;
  color: #ffffff;
}

/* Lista prodotti carta */
.prodotti-lista {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.prodotto-carta-item {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 6px;
}

.prodotto-nome {
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 2px;
}

.prodotto-dettagli {
  color: #999999;
  font-size: 11px;
}

/* Importi rapidi */
.importi-rapidi {
  margin-top: 12px;
}

.importi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.btn-importo-rapido {
  background: #333333;
  border: 1px solid #404040;
  color: #cccccc;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  font-weight: 600;
}

.btn-importo-rapido:hover {
  background: #404040;
  border-color: #c0af6e;
  color: #c0af6e;
}

.btn-importo-rapido[data-importo="esatto"] {
  background: #c0af6e;
  color: #1a1a1a;
  border-color: #c0af6e;
}

.btn-importo-rapido[data-importo="esatto"]:hover {
  background: #d4c78a;
}

/* Input importo con simbolo */
.importo-input-container {
  display: flex;
  align-items: center;
  background: #333333;
  border: 1px solid #404040;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.importo-input-container:focus-within {
  border-color: #c0af6e;
}

.currency-symbol {
  background: #404040;
  color: #c0af6e;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 12px;
}

.importo-input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  outline: none;
}

/* Resto display */
.resto-display {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 10px;
  margin: 12px 0;
  text-align: center;
}

.resto-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resto-label {
  color: #cccccc;
  font-size: 12px;
}

.resto-value {
  color: #27ae60;
  font-weight: 700;
  font-size: 16px;
}

/* Azione pagamento carta */
.azione-pagamento-carta {
  text-align: center;
  padding: 20px;
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  margin-bottom: 16px;
}

.carta-icon {
  font-size: 32px;
  color: #3498db;
  margin-bottom: 12px;
}

.azione-pagamento-carta h4 {
  color: #ffffff;
  margin: 8px 0;
  font-size: 14px;
}

.azione-pagamento-carta p {
  color: #999999;
  font-size: 12px;
  margin: 4px 0;
}

/* Warning content */
.warning-content {
  text-align: center;
  padding: 20px;
}

.warning-icon {
  font-size: 32px;
  color: #f39c12;
  margin-bottom: 12px;
}

.warning-content h4 {
  color: #ffffff;
  margin: 8px 0;
  font-size: 16px;
}

.warning-content p {
  color: #cccccc;
  font-size: 13px;
  margin: 8px 0;
}

/* Anteprima carrello */
.anteprima-carrello {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.anteprima-title {
  color: #c0af6e;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
}

.anteprima-lista {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anteprima-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #404040;
  font-size: 11px;
  color: #cccccc;
}

.anteprima-item:last-child {
  border-bottom: none;
}

/* Vendite sospese */
.vendite-sospese-content {
  max-height: 60vh;
  overflow-y: auto;
}

.vendite-sospese-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.vendita-sospesa-card {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
}

.vendita-sospesa-card:hover {
  border-color: #555555;
  transform: translateY(-1px);
}

.vendita-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vendita-numero {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f39c12;
  font-weight: 600;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.vendita-data {
  color: #999999;
  font-size: 10px;
}

.vendita-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #cccccc;
}

.detail-row .totale {
  color: #c0af6e;
  font-weight: 600;
}

.detail-row .sconto {
  color: #f39c12;
  font-weight: 600;
}

.vendita-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.btn-vendita {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vendite-sospese-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #999999;
}

.vendite-sospese-empty i {
  font-size: 32px;
  color: #555555;
  margin-bottom: 12px;
}

.vendite-sospese-empty h4 {
  color: #cccccc;
  margin: 8px 0;
}

/* Operatori */
.operatore-attuale {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}

.operatore-note {
  margin-top: 12px;
}

.note-box {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  gap: 8px;
}

.note-box i {
  color: #3498db;
  font-size: 14px;
  margin-top: 2px;
}

.note-box div {
  font-size: 11px;
  color: #cccccc;
  line-height: 1.4;
}

.note-box strong {
  color: #ffffff;
}

/* Modal conferma vendita */
.modal-conferma-container {
  background: #252525;
  border: 2px solid #27ae60;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.conferma-icon {
  font-size: 48px;
  color: #27ae60;
  margin-bottom: 15px;
}

.modal-conferma-container h2 {
  color: #ffffff;
  margin: 10px 0;
  font-size: 20px;
  font-weight: 600;
}

.conferma-dettagli {
  margin: 20px 0;
}

.conferma-info {
  color: #cccccc;
  font-size: 14px;
  margin-bottom: 8px;
}

.conferma-scontrino {
  color: #c0af6e;
  font-weight: 600;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.conferma-azioni {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.btn-conferma {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== OFFCANVAS CARRELLO ===== */

.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
  backdrop-filter: blur(2px);
}

.offcanvas-carrello {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: #252525;
  border-left: 2px solid #404040;
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0,0,0,0.3);
}

.offcanvas-carrello.offcanvas-open {
  right: 0;
}

.offcanvas-header {
  background: #2d2d2d;
  border-bottom: 2px solid #404040;
  padding: 12px 16px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.offcanvas-title {
  color: #c0af6e;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.offcanvas-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.items-count {
  background: #333333;
  color: #cccccc;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.offcanvas-close {
  background: none;
  border: none;
  color: #999999;
  font-size: 18px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.offcanvas-close:hover {
  color: #e74c3c;
  background: #404040;
}

.offcanvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.offcanvas-body::-webkit-scrollbar {
  width: 6px;
}

.offcanvas-body::-webkit-scrollbar-track {
  background: #333333;
}

.offcanvas-body::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 3px;
}

.offcanvas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #999999;
  height: 300px;
}

.offcanvas-empty i {
  font-size: 48px;
  color: #555555;
  margin-bottom: 16px;
}

.offcanvas-empty h3 {
  color: #cccccc;
  margin: 12px 0;
  font-size: 18px;
}

.offcanvas-empty p {
  margin: 8px 0;
  font-size: 14px;
}

.offcanvas-item {
  background: #333333;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.offcanvas-item:hover {
  border-color: #555555;
  transform: translateY(-1px);
}

.offcanvas-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.offcanvas-item-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  line-height: 1.3;
}

.offcanvas-item-remove {
  background: none;
  border: none;
  color: #999999;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  margin-left: 8px;
}

.offcanvas-item-remove:hover {
  background: #404040;
  color: #e74c3c;
}

.offcanvas-item-details {
margin-bottom: 20px;
}

.offcanvas-item-qty {
color: #cccccc;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.offcanvas-item-total {
  color: #c0af6e;
  font-weight: 600;
  font-size: 13px;
  float:right;
}

.offcanvas-footer {
  background: #2d2d2d;
  border-top: 2px solid #404040;
  padding: 12px 16px;
}

.offcanvas-totals {
  margin-bottom: 12px;
}

.offcanvas-totals .total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  color: #cccccc;
}

.offcanvas-totals .total-final {
  border-top: 1px solid #404040;
  padding-top: 8px;
  margin-top: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}

.offcanvas-actions {
  display: flex;
  gap: 8px;
}

.offcanvas-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.offcanvas-btn.btn-danger {
  background: #e74c3c;
  color: #ffffff;
}

.offcanvas-btn.btn-danger:hover {
  background: #ec7063;
  transform: translateY(-1px);
}

.offcanvas-btn.btn-success {
  background: #27ae60;
  color: #ffffff;
}

.offcanvas-btn.btn-success:hover {
  background: #2ecc71;
  transform: translateY(-1px);
}

/* ===== SISTEMA NOTIFICHE TOAST ===== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
}

.toast {
  background: #333333;
  border: 1px solid #404040;
  border-left: 4px solid;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: slideInRight 0.3s ease;
  max-width: 100%;
}

.toast-success {
  border-left-color: #27ae60;
  background: #1e3a2e;
}

.toast-error {
  border-left-color: #e74c3c;
  background: #3a1e1e;
}

.toast-warning {
  border-left-color: #f39c12;
  background: #3a2e1e;
}

.toast-info {
  border-left-color: #3498db;
  background: #1e2d3a;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.toast-content i {
  font-size: 14px;
  flex-shrink: 0;
}

.toast-success .toast-content i { color: #27ae60; }
.toast-error .toast-content i { color: #e74c3c; }
.toast-warning .toast-content i { color: #f39c12; }
.toast-info .toast-content i { color: #3498db; }

.toast-content span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: #999999;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 3px;
  margin-left: 8px;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #cccccc;
  background: rgba(255,255,255,0.1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1200px) {
  .pos-stats-section {
    max-width: 300px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pos-right-panel {
    width: 320px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 992px) {
  .pos-header-content {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .pos-operatore-section {
    order: 1;
  }
  
  .pos-stats-section {
    order: 2;
    max-width: 100%;
  }
  
  .pos-header-actions {
    order: 3;
    flex-wrap: wrap;
  }
  
  .pos-main-container {
    flex-direction: column;
  }
  
  .pos-left-panel {
    flex: 1;
    border-right: none;
    border-bottom: 1px solid #404040;
  }
  
  .pos-right-panel {
    width: 100%;
    max-height: 300px;
    border-left: none;
    border-top: 1px solid #404040;
  }
  
  .pos-footer {
    flex-wrap: wrap;
    gap: 8px;
    min-height: auto;
    padding: 10px;
  }
  
  .pos-footer-info {
    flex: 1;
    min-width: 200px;
  }
  
  .pos-footer-cliente {
    flex: 1;
    min-width: 250px;
  }
  
  .pos-footer-actions {
    flex: 1;
    min-width: 300px;
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .pos-header {
    padding: 6px 8px;
    min-height: 50px;
  }
  
  .pos-logo-section {
    flex: 1;
  }
  
  .pos-logo-text {
    font-size: 14px;
  }
  
  .pos-stats-section {
    display: none;
  }
  
  .pos-header-actions {
    gap: 4px;
  }
  
  .btn-text {
    display: none;
  }
  
  .categories-grid {
    gap: 4px;
  }
  
  .category-btn {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .category-btn span {
    font-size: 9px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }
  
  .product-image, .product-icon {
    height: 60px;
  }
  
  .product-info {
    padding: 6px;
  }
  
  .product-name {
    font-size: 12px;
  }
  
  .product-price {
    font-size: 13px;
  }
  
  .pos-footer {
    flex-direction: column;
    gap: 6px;
    padding: 8px;
  }
  
  .pos-footer-info {
    justify-content: center;
  }
  
  .pos-footer-actions {
    justify-content: center;
  }
  
  .footer-action-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
  }
  
  .offcanvas-carrello {
    width: 100%;
    right: -100%;
  }
  
  .modal-cliente-container, .modal-pagamento-container, .modal-azione-container, .modal-gestione-container {
    width: 95%;
    margin: 10px;
  }
  
  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .pos-header-content {
    gap: 4px;
  }
  
  .pos-logo-section {
    gap: 6px;
  }
  
  .pos-logo-text {
    font-size: 12px;
  }
  
  .turno-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .operatore-card {
    padding: 4px 6px;
  }
  
  .operatore-nome {
    font-size: 11px;
  }
  
  .operatore-dettagli {
    font-size: 9px;
  }
  
  .pos-header-btn {
    padding: 4px 6px;
    font-size: 10px;
  }
  
  .search-input-group {
    margin: 4px 0;
  }
  
  .pos-search-input {
    padding: 8px 0;
    font-size: 12px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 4px;
  }
  
  .product-image, .product-icon {
    height: 50px;
  }
  
  .product-info {
    padding: 4px;
    gap: 2px;
  }
  
  .product-name {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }
  
  .product-price {
    font-size: 12px;
  }
  
  .product-stock {
    font-size: 10px;
  }
  
  .btn-add-cart, .btn-out-stock {
    padding: 4px;
    font-size: 10px;
  }
  
  .footer-action-btn {
    padding: 8px 10px;
    font-size: 11px;
    min-width: 70px;
  }
  
  .cart-empty-state {
    padding: 20px 10px;
    height: 150px;
  }
  
  .empty-icon {
    font-size: 24px;
  }
  
  .cart-empty-state h3 {
    font-size: 14px;
  }
  
  .cart-empty-state p {
    font-size: 12px;
  }
}

/* ===== UTILITY CLASSES ===== */

.text-success { color: #27ae60 !important; }
.text-warning { color: #f39c12 !important; }
.text-danger { color: #e74c3c !important; }
.text-info { color: #3498db !important; }
.text-muted { color: #999999 !important; }
.text-primary { color: #c0af6e !important; }

.bg-success { background-color: #27ae60 !important; }
.bg-warning { background-color: #f39c12 !important; }
.bg-danger { background-color: #e74c3c !important; }
.bg-info { background-color: #3498db !important; }
.bg-primary { background-color: #c0af6e !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }

.flex-1 { flex: 1 !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.font-weight-bold { font-weight: 600 !important; }
.font-weight-normal { font-weight: 400 !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 12px !important; }

.border-0 { border: none !important; }
.border-radius-0 { border-radius: 0 !important; }

.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }

/* ===== PRINT STYLES ===== */

@media print {
  .pos-interface {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* ===== ANIMAZIONI AGGIUNTIVE ===== */

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-pulse { animation: pulse 2s infinite; }
.animate-shake { animation: shake 0.5s ease-in-out; }
.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-fade-out { animation: fadeOut 0.3s ease; }
.animate-slide-down { animation: slideDown 0.3s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }

/* ===== FOCUS E ACCESSIBILITÀ ===== */

.pos-search-input:focus,
.cliente-input:focus,
.sconto-input:focus,
.qty-input:focus,
.form-input:focus,
.form-input-cliente:focus,
.importo-input:focus {
  outline: 2px solid #c0af6e;
  outline-offset: 2px;
}

.pos-header-btn:focus,
.footer-action-btn:focus,
.btn-add-cart:focus,
.category-btn:focus,
.qty-btn:focus,
.btn-cliente:focus,
.btn-pagamento:focus,
.btn-azione:focus,
.btn-gestione:focus,
.btn-conferma:focus,
.offcanvas-btn:focus {
  outline: 2px solid #c0af6e;
  outline-offset: 2px;
}

/* Miglioramento contrasto per accessibilità */
.pos-search-input::placeholder,
.cliente-input::placeholder,
.form-input::placeholder {
  color: #888888;
}

/* Stati hover migliorati */
.cart-item:hover,
.product-card:hover,
.vendita-sospesa-card:hover,
.offcanvas-item:hover {
  box-shadow: 0 2px 8px rgba(192, 175, 110, 0.2);
}

/* Indicatori stato loading */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== FINE CSS POS ===== *//* ===== CSS POS COMPLETO - TEMA SCURO OTTIMIZZATO ===== */

/* ===== SCHERMATA TURNO RICHIESTO ===== */

.pos-turno-required {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.turno-required-container {
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.turno-required-content {
  background: #252525;
  border: 2px solid #c0af6e;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.turno-icon {
  font-size: 48px;
  color: #c0af6e;
  margin-bottom: 15px;
}

.turno-required-content h1 {
  color: #e74c3c;
  font-size: 24px;
  margin: 10px 0;
  font-weight: 600;
}

.turno-required-content h2 {
  color: #ffffff;
  font-size: 18px;
  margin: 10px 0;
  font-weight: 500;
}

.turno-required-content p {
  color: #cccccc;
  margin: 15px 0;
  line-height: 1.5;
}

.turno-stats {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  justify-content: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #333333;
  padding: 8px 12px;
  border-radius: 6px;
  min-width: 0;
}

.stat-item i {
  color: #c0af6e;
  font-size: 16px;
}

.stat-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-item strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.stat-item span {
  color: #cccccc;
  font-size: 11px;
}

.btn-apri-turno {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #c0af6e;
  color: #1a1a1a;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 20px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-apri-turno:hover {
  background: #d4c78a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192, 175, 110, 0.3);
}

/* ===== LAYOUT PRINCIPALE POS ===== */

.pos-interface {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #1a1a1a;
}

/* ===== HEADER POS ===== */

.pos-header {
  background: #252525;
  border-bottom: 1px solid #404040;
  padding: 8px 12px;
  min-height: 60px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 100;
}

.pos-header-content {
  display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    gap: 135px;
}

/* Logo e navigazione */
.pos-logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pos-logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c0af6e;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}

.pos-logo-link:hover {
  color: #d4c78a;
}

.pos-logo-text {
  white-space: nowrap;
}

.pos-turno-info .turno-badge {
  background: #333333;
  color: #c0af6e;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Sezione operatore */
.pos-operatore-section {
  display: flex;
  align-items: center;
}

.operatore-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #333333;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #404040;
}

.operatore-avatar {
  color: #c0af6e;
  font-size: 18px;
}

.operatore-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.operatore-nome {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.operatore-dettagli {
  color: #999999;
  font-size: 10px;margin-left: 20px;
}

.btn-cambio-operatore {
  background: none;
  border: none;
  color: #999999;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cambio-operatore:hover {
  background: #404040;
  color: #c0af6e;
}

/* Statistiche header */
.pos-stats-section {
  flex: 1;
  max-width: 777px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.stat-card {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stat-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.stat-vendite .stat-icon { color: #3498db; }
.stat-incasso .stat-icon { color: #27ae60; }
.stat-prodotti .stat-icon { color: #f39c12; }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.stat-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

.stat-label {
  color: #999999;
  font-size: 9px;
  text-transform: uppercase;
}

/* Azioni header */
.pos-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-header-btn {
  background: #333333;
  border: 1px solid #404040;
  color: #cccccc;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  position: relative;
}

.pos-header-btn:hover {
  background: #404040;
  border-color: #555555;
}

.btn-sospese:hover { border-color: #f39c12; color: #f39c12; }
.btn-sospendi:hover { border-color: #e74c3c; color: #e74c3c; }
.btn-carrello:hover { border-color: #c0af6e; color: #c0af6e; }

.btn-text {
  font-size: 11px;
  font-weight: 500;
}

.header-badge {
position: absolute;
    top: -7px;
    right: -8px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
    text-align: unset;
}

.pos-fondo-display, .pos-time-display {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}

.fondo-label, .time-value {
  color: #c0af6e;
  font-size: 23px;
  font-weight: 600;
}

.fondo-amount, .date-value {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.date-value {
  color: #999999;
  font-size: 12px;
}

/* Animazione carrello */
.cart-bounce {
  animation: cartBounce 0.6s ease;
}

@keyframes cartBounce {
  0%, 20%, 60%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  80% { transform: translateY(-1px); }
}

/* ===== CONTAINER PRINCIPALE ===== */

.pos-main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ===== PANNELLO SINISTRO - PRODOTTI ===== */

.pos-left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border-right: 1px solid #404040;
}

/* Ricerca prodotti */
.pos-search-section {
  background: #252525;
  border-bottom: 1px solid #404040;
  padding: 8px;
}

.search-container {
  max-width: 600px;
}

.search-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #404040;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.search-input-group:focus-within {
  border-color: #c0af6e;
}

.search-icon {
  color: #999999;
  padding: 0 10px;
  font-size: 14px;
}

.pos-search-input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  padding: 10px 0;
  font-size: 14px;
  outline: none;
}

.pos-search-input::placeholder {
  color: #666666;
}

.search-barcode-btn, .search-clear-btn {
  background: #373737;
  border: none;
  color: #999999;
  padding: 8px 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-barcode-btn:hover { color: #c0af6e; }
.search-clear-btn:hover { color: #e74c3c; }

/* Filtri categorie */
.pos-categories-section {
  background: #252525;
  border-bottom: 1px solid #404040;
  padding: 8px;
}

.categories-grid {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px;
}

.categories-grid::-webkit-scrollbar {
  height: 4px;
}

.categories-grid::-webkit-scrollbar-track {
  background: #333333;
}

.categories-grid::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 2px;
}

.category-btn {
    border: 1px solid #161616;
    padding: 3px 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    min-width: 0;
}

.category-btn:hover {
  background: #404040;
  border-color: #555555;
}

.category-btn-active {
  background: #c0af6e;
  border-color: #c0af6e;
  color: #1a1a1a;
}

.category-btn span {
  font-size: 10px;
}

/* Griglia prodotti */
.pos-products-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.products-container {
  flex: 1;
  overflow-y: auto;

}

.products-container::-webkit-scrollbar {
  width: 6px;
}

.products-container::-webkit-scrollbar-track {
  background: #333333;
}

.products-container::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 3px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.product-card {
  background: #252525;
  border: 1px solid #404040;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #c0af6e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.product-card.featured {
    border: 2px solid gold !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
    order: -1; /* Li mette in cima alla griglia */
}
.product-card.out-of-stock {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-card.out-of-stock:hover {
  transform: none;
  border-color: #404040;
}

.product-image {
  height: 185px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.product-icon {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  position: relative;
}

.featured-badge {
    background: linear-gradient(45deg, #c0af6e, #ffed4e);
    color: #000;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
}

.product-info {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  color: #c0af6e;
  font-weight: 700;
  font-size: 14px;
}

.product-stock {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-stock.stock-out { color: #e74c3c; }
.product-stock.stock-low { color: #f39c12; }
.product-stock:not(.stock-out):not(.stock-low) { color: #27ae60; }

.stock-count {
  color: #999999;
  font-size: 10px;
}

.product-code {
  color: #666666;
  font-size: 10px;
  font-family: 'Courier New', monospace;
}

.product-actions {
  padding: 6px 8px;
  border-top: 1px solid #404040;
}

.btn-add-cart {
  width: 100%;
  background: #5b5b5b;
  border: none;
  color: #ffffff;
  padding: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-add-cart:hover {
  background: #2ecc71;
  transform: translateY(-1px);
}

.btn-out-stock {
  width: 100%;
  background: #666666;
  border: none;
  color: #999999;
  padding: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Loading e stati */
.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999999;
  text-align: center;
}

.loading-spinner {
  font-size: 24px;
  color: #c0af6e;
  margin-bottom: 10px;
}

.no-products {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999999;
  text-align: center;
}

.no-products i {
  font-size: 48px;
  color: #555555;
  margin-bottom: 15px;
}

.no-products h3 {
  color: #cccccc;
  margin: 10px 0;
}

/* Pulsante carica altri */
.load-more-container {
  padding: 8px;
  text-align: center;
  border-top: 1px solid #404040;
}

.btn-load-more {
  background: #333333;
  border: 1px solid #404040;
  color: #cccccc;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.btn-load-more:hover {
  background: #404040;
  border-color: #c0af6e;
  color: #c0af6e;
}
/* ===== LAYOUT RESPONSIVE PER TOUCHSCREEN ===== */

/* Container principale */
.pos-main-container {
    display: flex;
    height: calc(100vh - 120px - 42px); /* 100vh - header - footer */
    overflow: hidden;
}

/* Panel sinistro prodotti */
.pos-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sezione ricerca - altezza fissa */
.pos-search-section {
    flex-shrink: 0;
    padding: 10px;

}

/* Sezione categorie - altezza fissa */
.pos-categories-section {
    flex-shrink: 0;
    max-height: 80px;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Sezione prodotti - SCROLL PRINCIPALE */
.pos-products-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.products-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    /* Scroll smooth per touch */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding-bottom: 20px;
}

/* Footer sempre fisso in basso */
.pos-footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Aggiusta il body per il footer fisso */
body {
    padding-bottom: 80px; /* Altezza del footer */
    /* overflow: hidden; /* Evita scroll del body */ */
}

/* RESPONSIVE PER TOUCHSCREEN */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 10px;
    }
    
    .pos-main-container {
        height: calc(100vh - 100px - 90px); /* Header + footer più piccoli */
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 8px;
    }
    
    .pos-categories-section {
        max-height: 60px;
    }
    
    body {
        padding-bottom: 90px; /* Footer più alto su mobile */
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 5px;
    }
    
    .pos-main-container {
        height: calc(100vh - 80px - 100px);
    }
}
.search-container-extended {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-left-buttons,
.search-right-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.search-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 25px;
    padding: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-size: 16px;
    z-index: 2;
}

.pos-search-input-center {
    flex: 1;
    border: none;
    outline: none;
    padding: 5px 10px 9px 15px;
    font-size: 18px;
    border-radius: 25px;
    background: #00000036;
    color: #b9b274;
	text-align:center;
}

.pos-search-input-center::placeholder {
    color: #999;
    font-style: italic;
}

.search-barcode-btn,
.search-clear-btn {
    border: 1px solid #393838;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 7px;
    margin-left: 7px;
}

.search-barcode-btn:hover,
.search-clear-btn:hover {
    background: #000000;
    transform: scale(1.05);
}

.search-custom-btn {
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    min-width: 80px;
    justify-content: center;
}

.search-custom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-custom-btn i {
    font-size: 16px;
}

.search-advanced-btn {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
}

.search-advanced-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .search-container-extended {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-left-buttons,
    .search-right-buttons {
        order: 2;
        justify-content: center;
    }
    
    .search-center {
        order: 1;
        width: 100%;
    }
    
    .search-custom-btn span {
        display: none;
    }
    
    .search-custom-btn {
        min-width: 50px;
        padding: 8px;
    }
}


.modal-carrello-salvato {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    animation: modalFadeIn 0.4s ease-out;
}

.modal-carrello-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-carrello-container {
position: relative;
    background: #292929;
    margin: 5vh auto;
    max-width: 550px;
    width: 90%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideUp 0.5s ease-out;
}

.modal-carrello-header {
    color: white;
    padding: 30px 25px 25px;
    text-align: center;
    position: relative;
}

.modal-icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.modal-icon-bg {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.modal-main-icon {
    font-size: 32px;
    color: white;
}

.modal-pulse-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: pulseRing 2s infinite;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

.modal-carrello-body {
    padding: 25px;
}

.carrello-info-card {
     background: #1c1c1c;
    border: 1px solid #000000;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    width: 35px;
    height: 35px;
    background: #b9b274;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 2px;
}

.info-value {
    display: block;
    font-size: 14px;
    color: #bbbbbb;
    font-weight: 600;
}

.totale-highlight {
    color: #059669;
    font-size: 16px;
}

.prodotti-preview {
    margin-bottom: 20px;
}

.preview-title {
    font-size: 16px;
    color: #374151;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prodotti-lista {
    background: #000000;
    border-radius: 8px;
    padding: 12px;
    max-height: 150px;
    overflow-y: auto;
}

.prodotto-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}

.prodotto-preview-item:last-child {
    border-bottom: none;
}

.prodotto-nome {
    flex: 1;
    color: #a1a1a1;
    font-weight: 500;
}

.prodotto-qta {
    color: #6b7280;
    margin: 0 8px;
}

.prodotto-prezzo {
    color: #059669;
    font-weight: 600;
}

.motivational-message {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.message-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.motivational-message p {
    margin: 0 0 5px;
    color: #92400e;
    font-weight: 600;
    font-size: 15px;
}

.motivational-message small {
    color: #b45309;
    font-size: 12px;
}

.modal-carrello-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px 25px;

}

.modal-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.modal-btn i {
    font-size: 18px;
    margin-bottom: 2px;
}

.modal-btn small {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
}

.btn-mare {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
}

.btn-mare:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-recupera {
    background: #ecfdf5;
    color: #059669;
    border: 2px solid #a7f3d0;
}

.btn-recupera:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

/* Animazioni */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Responsive */
@media (max-width: 600px) {
    .modal-carrello-container {
        margin: 2vh auto;
        width: 95%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-carrello-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        padding: 12px 15px;
    }
}

.pos-datatables-container {
    padding: 20px;
}
.bottoni-scuri{
	COLOR: #898989;
    BORDER: 1PX SOLID #181818;
    BACKGROUND: #373737;
}

/* Header */
.datatables-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.datatables-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.datatables-icon {
    font-size: 24px;
    color: #c0af6e;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.datatables-title h3 {
    color: #fff;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.datatables-subtitle {
    color: #c0af6e;
    font-size: 14px;
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
}

.datatables-actions {
    display: flex;
    gap: 10px;
}

.datatables-btn {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.datatables-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-create {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
}

.btn-create:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
}

.btn-export {
    background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
    border-color: #007bff;
}

.btn-export:hover {
    background: linear-gradient(135deg, #0056b3 0%, #5a2d91 100%);
}

.btn-close {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    border-color: #dc3545;
}

.btn-close:hover {
    background: linear-gradient(135deg, #c82333 0%, #e8590c 100%);
}

/* Filtri */
.datatables-filters {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.filters-row {
    display: flex;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    color: #c0af6e;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.filter-select,
.filter-input {
    background: #1a1a1a;
    border: 1px solid #555;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    width:300px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #c0af6e;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.filter-actions {
    display: flex;
    align-items: end;
}

.filter-btn {
    background: #444;
    border: 1px solid #666;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #555;
    border-color: #777;
}

/* Wrapper Tabella */
.datatables-wrapper {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

/* Tabella DataTables Dark */
.datatables-table {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border-collapse: collapse;
}

.datatables-table thead {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

.datatables-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #c0af6e;
    border-bottom: 2px solid #444;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.datatables-table tbody tr {
    border-bottom: 1px solid #333;
    transition: all 0.2s ease;
}

.datatables-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.05);
    transform: translateX(2px);
}

.datatables-table tbody td {
    padding: 12px;
    font-size: 14px;
    vertical-align: middle;
}

/* Celle speciali */
.cell-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #444;
}

.cell-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.status-inactive {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.cell-price {
    color: #28a745;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.cell-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: #444;
    border: 1px solid #666;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #555;
    transform: translateY(-1px);
}

.btn-edit {
    background: #007bff;
    border-color: #007bff;
}

.btn-delete {
    background: #dc3545;
    border-color: #dc3545;
}

/* Edit Inline */
.cell-editing {
    background: rgba(255, 215, 0, 0.1) !important;
    border: 2px solid #c0af6e !important;
}

.inline-input {
    background: #2d2d2d;
    border: 1px solid #c0af6e;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    width: 100%;
    font-size: 14px;
}

.inline-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

/* Loading States */
.datatables-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #c0af6e;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    font-size: 24px;
    margin-right: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .datatables-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .datatables-actions {
        justify-content: center;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .datatables-table {
        font-size: 12px;
    }
    
    .datatables-table thead th,
    .datatables-table tbody td {
        padding: 8px 6px;
    }
}

/* Scrollbar Dark */
.datatables-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.datatables-wrapper::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.datatables-wrapper::-webkit-scrollbar-thumb {
    background: #c0af6e;
    border-radius: 4px;
}

.datatables-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffed4e;
}
.datatable-top{display:none !important}

.datatables-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #4a5568;
    font-size: 11px;
    vertical-align: middle;
}
.table.dataTable>tbody>tr {
    background-color: #37363691;
	}
	
.datatables-table tr:hover {
    background: #4a5568;
}

.datatables-table tr:nth-child(even) {
    background: #121212;
}

/* Celle speciali */
.loading, .error, .empty {
    text-align: center;
    padding: 20px !important;
    font-size: 12px;
}

.loading { color: #c0af6e; }
.error { color: #ef4444; }
.empty { color: #9ca3af; }

/* Immagini prodotti */
.img-cell {
    width: 40px;
    text-align: center;
}

.prod-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.prod-icon {
    width: 32px;
    height: 32px;
    background: #4a5568;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Nomi prodotti */
.prod-name {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.badge-star {
    background: #c0af6e;
    color: #1a202c;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 9px;
    margin-left: 4px;
}

/* Codici */
code {
    background: #1a202c;
    color: #c0af6e;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 10px;
    font-family: 'Courier New', monospace;
}

/* Celle categorie e fornitori */
.cat-cell, .forn-cell {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #cbd5e0;
}

/* Prezzi */
.price-cell {
    font-weight: 600;
    color: #c0af6e;
    text-align: right;
}

/* Stock status */
.stock-cell {
    text-align: center;
}

.stock-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stock-num {
    font-weight: 600;
    margin-bottom: 1px;
}

.stock-num.ok { color: #68d391; }
.stock-num.warning { color: #f6e05e; }
.stock-num.danger { color: #fc8181; }

.stock-info small {
    color: #a0aec0;
    font-size: 9px;
}

/* Vendite */
.sales-cell {
    text-align: center;
}

.sales-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sales-info strong {
    color: #c0af6e;
    font-size: 12px;
}

.sales-info small {
    color: #a0aec0;
    font-size: 9px;
}

/* Fornitori specifici */
.forn-name {
    font-weight: 600;
    color: #e2e8f0;
}

.location-cell, .phone-cell, .email-cell {
    color: #cbd5e0;
    font-size: 10px;
}

.phone-cell i, .email-cell i {
    color: #c0af6e;
    margin-right: 3px;
}

.badge-count {
    background: #c0af6e;
    color: #1a202c;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.stock-count {
    color: #a0aec0;
    font-size: 10px;
}

/* Bottoni azioni mini */
.actions-cell {
    text-align: center;
    white-space: nowrap;
}

.btn-mini:hover {
    background: #c0af6e;
    color: #1a202c;
    transform: scale(1.05);
}

.btn-mini.edit:hover { background: #4299e1; }
.btn-mini.stock:hover { background: #68d391; }
.btn-mini.products:hover { background: #ed8936; }
.dt-paging{
	text-align: center !important;
    background: #0e0e0e !important;
}
table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, table.dataTable td.dt-type-numeric, table.dataTable td.dt-type-date {
    text-align: justify;
}
.datatable-bottom{margin-top:10px !important;}
.dt-info{display:none;}
/* MODAL BASE STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-container {
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-container.modal-large {
    max-width: 900px;
}

.modal-container.modal-small {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* MODAL HEADER */
.modal-header {
    background: #2a2a2a;
    padding: 20px;
    border-bottom: 2px solid #4CAF50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px 10px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header i {
    color: #4CAF50;
}

.modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* MODAL BODY */
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* MODAL FOOTER */
.modal-footer {
    background: #2a2a2a;
    padding: 15px 20px;
    border-top: 1px solid #444;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 10px 10px;
}

/* FORM STYLES */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
    flex: 1;
}

.form-group.col-6 {
    flex: 0 0 calc(50% - 7.5px);
}

.form-group.col-4 {
    flex: 0 0 calc(33.333% - 10px);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    background: #333;
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.required {
    color: #ff6b6b;
}

/* BUTTONS */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #777;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-info {
    background: #2196F3;
    color: white;
}

.btn-info:hover {
    background: #1976D2;
}

/* STORICO STYLES */
.storico-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #444;
    transition: all 0.3s;
}

.stat-box:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
}

.stat-label-modal {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-value-modal {
    color: #4CAF50;
    font-size: 24px;
    font-weight: bold;
}

.storico-table-container {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
}

.storico-table {
    width: 100%;
    border-collapse: collapse;
}

.storico-table thead {
    background: #333;
}

.storico-table th {
    padding: 12px;
    text-align: left;
    color: #4CAF50;
    font-weight: 600;
    border-bottom: 2px solid #4CAF50;
}

.storico-table td {
    padding: 12px;
    border-bottom: 1px solid #444;
    color: #e0e0e0;
}

.storico-table tbody tr:hover {
    background: #333;
}

.storico-table tbody tr:last-child td {
    border-bottom: none;
}

/* CLIENTE PREVIEW */
.cliente-preview {
    padding: 20px;
}

.cliente-preview i {
    color: #4CAF50;
}

.cliente-preview h3 {
    margin: 10px 0;
    color: #fff;
}

.cliente-preview p {
    color: #999;
    margin: 5px 0;
}

/* BADGES */
.badge-payment {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-payment.contanti {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.badge-payment.carta {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.badge-vip {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}


.btn-mini.view {
    background: #2196F3;
    color: white;
}

.btn-mini.view:hover {
    background: #1976D2;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group.col-6,
    .form-group.col-4 {
        flex: 1;
    }
    
    .storico-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* DARK SCROLLBAR */
.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #777;
}
/* ===== CSS MODAL POS - TEMA SCURO ===== */

/* Modal Base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    max-width: 600px;
    width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-large {
    max-width: 900px;
}

.modal-small {
    max-width: 400px;
}

/* Header Modal */
.modal-header {
    background: #2a2a2a;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #c0af6e;
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: #444;
    border: none;
    color: #fff;
    font-size: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    border-radius: 2px;
}

.modal-close:hover {
    background: #666;
}

/* Body Modal */
.modal-body {
    padding: 16px;
    color: #fff;
    max-height: 70vh;
    overflow-y: auto;
}

/* Footer Modal */
.modal-footer {
    background: #2a2a2a;
    padding: 12px 16px;
    border-top: 1px solid #333;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Bottoni */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-primary { background: #007bff; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-warning { background: #ffc107; color: #212529; }
.btn-danger { background: #dc3545; color: white; }
.btn-info { background: #17a2b8; color: white; }

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== DETTAGLIO VENDITA ===== */

.vendita-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.info-card {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 2px;
    border: 1px solid #333;
}

.info-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-value {
    color: #fff;
    font-weight: bold;
}

.totali-vendita-card {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 2px;
    border: 1px solid #333;
    margin-bottom: 16px;
}

.totali-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.totale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.totale-finale {
    border-top: 1px solid #444;
    padding-top: 8px;
    font-size: 16px;
}

.text-danger { color: #dc3545; }
.text-success { color: #28a745; }
.text-muted { color: #6c757d; }

/* Tabelle */
.prodotti-vendita-section h4,
.reso-prodotti-section h4 {
    color: #c0af6e;
    margin-bottom: 12px;
    font-size: 16px;
}

.prodotti-vendita-table,
.reso-prodotti-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
}

.prodotti-vendita-table th,
.prodotti-vendita-table td,
.reso-prodotti-table th,
.reso-prodotti-table td {
    padding: 8px;
    border: 1px solid #333;
    text-align: left;
}

.prodotti-vendita-table th,
.reso-prodotti-table th {
    background: #333;
    color: #c0af6e;
    font-size: 12px;
    text-transform: uppercase;
}

.prodotti-vendita-table td,
.reso-prodotti-table td {
    color: #fff;
    font-size: 13px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: bold;
}

.badge-primary { background: #007bff; color: white; }

/* ===== GESTIONE RESO ===== */

.reso-info-card {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 2px;
    border: 1px solid #333;
    margin-bottom: 16px;
}

.reso-info-card h4 {
    color: #c0af6e;
    margin-bottom: 8px;
    font-size: 14px;
}

.reso-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    font-size: 13px;
}

.reso-motivo-section,
.reso-rimborso-section {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    color: #c0af6e;
    font-size: 13px;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 6px;
    border: 1px solid #444;
    color: #fff;
    border-radius: 2px;
    font-size: 13px;
}

.form-control:focus {
    outline: none;
    border-color: #c0af6e;
}

.mt-2 { margin-top: 8px; }

.rimborso-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px;
    border-radius: 2px;
}

.radio-option:hover {
    background: #2a2a2a;
}

.radio-option input[type="radio"] {
    margin: 0;
}

.rimborso-riepilogo-card {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 2px;
    border: 1px solid #333;
    margin-top: 16px;
}

.rimborso-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

/* ===== STATISTICHE CLIENTE ===== */

.storico-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}



.storico-table-container {
    overflow-x: auto;
}

.storico-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
}

.storico-table th,
.storico-table td {
    padding: 8px;
    border: 1px solid #333;
    text-align: left;
    font-size: 12px;
}

.storico-table th {
    background: #333;
    color: #c0af6e;
    text-transform: uppercase;
}

.storico-table td {
    color: #fff;
}

/* Mini buttons */
.btn-mini {
    padding: 2px 5px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    margin: 0 1px;
	transition: all 0.3s;
}

.btn-mini.view { background: #9C27B0; color: white; }
.btn-mini.print { background: #FF9800; color: white; }
.btn-mini.return { background: #f44336; color: white; }

/* Scrollbar scuro */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #666;
}
/* 📷 STILI PER LOGHI BRANDS 120x50 */
.brand-logo {
    width: 90px !important;
    height: 50px !important;
    object-fit: contain;
    border-radius: 4px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

.brand-logo-placeholder {
    width: 90px;
    height: 50px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
    border-radius: 4px;
    border: 1px solid #555;
    margin: 0 auto;
}

/* 📊 MIGLIORAMENTI BADGE E CONTATORI */
.badge-count {
    background: #2196F3;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

/* 🎯 RESPONSIVE per DataTable brands */
#advanced-datatable.brands-table th:first-child,
#advanced-datatable.brands-table td:first-child {
    min-width: 130px;
    max-width: 130px;
}

/* 🏙️ STILE PER CITTÀ */
#advanced-datatable td:contains('N/A') {
    color: #999;
    font-style: italic;
}
/* 🌙 TEMA SCURO DATATABLE - Colore principale #c0af6e */

/* 📊 DataTable Base Scura */
#advanced-datatable {
    background: #1a1a1a !important;
    color: #c0af6e !important;
    border: 1px solid #333 !important;
}

#advanced-datatable thead th {
    background: #2a2a2a !important;
    color: #c0af6e !important;
    border-bottom: 2px solid #c0af6e !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    padding: 12px 8px;
}

#advanced-datatable tbody td {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-bottom: 1px solid #333 !important;
    padding: 10px 8px;
}

#advanced-datatable tbody tr:nth-child(even) td {
    background: #1e1e1e !important;
}

#advanced-datatable tbody tr:hover td {
    background: #2a2a2a !important;
    border-color: #c0af6e !important;
}

/* 🏷️ Logo Brand 70x30 */
.brand-logo-small {
    width: 70px !important;
    height: 30px !important;
    object-fit: contain;
    border-radius: 3px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

.brand-logo-small-placeholder {
    width: 70px;
    height: 30px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 8px;
    border-radius: 3px;
    border: 1px solid #555;
    margin: 0 auto;
}

/* 💰 Prezzi con colori distintivi */
.price-buy {
    color: #ff9800 !important;
    font-weight: bold;
    font-size: 12px;
}

.price-sell {
    color: #4caf50 !important;
    font-weight: bold;
    font-size: 13px;
}

/* 📝 Categoria editabile */
.categoria-editabile {
    background: #2a2a2a;
    color: #c0af6e !important;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-block;
    min-width: 60px;
    transition: all 0.2s;
}

.categoria-editabile:hover {
    border-color: #c0af6e;
    background: #333;
}

.categoria-editabile.editing {
    background: #1a1a1a;
    border-color: #c0af6e;
}

.categoria-select {
    width: 100% !important;
    background: #1a1a1a !important;
    color: #c0af6e !important;
    border: 1px solid #c0af6e !important;
    border-radius: 4px;
    padding: 4px;
    font-size: 12px;
}

.categoria-select option {
    background: #1a1a1a !important;
    color: #c0af6e !important;
}

/* 📦 Status giacenza migliorati */
.stock-ok {
    color: #4caf50 !important;
    font-weight: bold;
}

.stock-warning {
    color: #ff9800 !important;
    font-weight: bold;
}

.stock-danger {
    color: #f44336 !important;
    font-weight: bold;
}

/* 🎯 Badge e contatori */
.badge-star {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 5px;
}

.prod-name {
    color: #ffffff !important;
    font-weight: 500;
}

/* 📷 Immagini prodotto */
.prod-img {
    border-radius: 4px;
    border: 1px solid #333;
}

.prod-icon {
    border-radius: 4px;
    border: 1px solid #333;
}

/* 🎨 DataTable Wrapper Scuro */
.dataTables_wrapper {
    background: #1a1a1a !important;
    color: #c0af6e !important;
}
#btn-close-datatables {
    display: none; /* Nascosto di default */
}

.dataTables_info {
    color: #c0af6e !important;
}

.dataTables_paginate .paginate_button {
    background: #2a2a2a !important;
    color: #c0af6e !important;
    border: 1px solid #333 !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #333 !important;
    color: #ffffff !important;
    border-color: #c0af6e !important;
}

.dataTables_paginate .paginate_button.current {
    background: #c0af6e !important;
    color: #1a1a1a !important;
    border-color: #c0af6e !important;
}

/* === RESPONSIVE POS === */
@media (max-width: 1274px) {
   
   .stat-vendite{display:none}
   .pos-header-content{gap: 20px;}
   .pos-search-input-center{font-size: 16px;height: 45px !important; width: 100%;}
   .search-center{max-width:none !important;}
   .search-left-buttons,.search-right-buttons{display:none;}
   .footer-action-btn{font-size: 20px;}
   .stat-card{padding: 5px 5px;}
   .product-image {height: 105px;}
   .pos-footer{min-height: 65px;}
   .pos-main-container {height: calc(100vh - 120px - 10px);}
   .stats-grid {grid-template-columns: repeat(4, 1fr);}
}
.btn-reports{
    background: #252525;
    color: #ffffff;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #0e0e0e;
}
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: #8d8d8d !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Per Firefox */
input:-moz-autofill {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* ===== STYLING GENERALE INPUT TEMA SCURO ===== */
.dark-theme input[type="text"],
.dark-theme input[type="password"],
.dark-theme input[type="email"],
.dark-theme input[type="number"],
.dark-theme textarea,
.dark-theme select {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 2px solid #4a5568 !important;
    border-radius: 6px;
    padding: 10px 12px;
}

.dark-theme input:focus {
    border-color: #667eea !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}