body {
    padding-top: 50px;
    padding-bottom: 20px;
}

.invoice-col-last
{
    text-align:right;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Carousel */
.carousel-caption p {
    font-size: 20px;
    line-height: 1.4;
}

/* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] {
    width: 100%;
}

.mr-2{
    margin-right: 0.5rem;
}






.content-wrapper .box-footer:not(.no-padding),
.netcore-form-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--nc-line);
    background: var(--nc-surface);
}

.mobile-form-page .box-footer .form-group,
.mobile-form-page .netcore-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.mobile-form-page .box-footer .btn,
.mobile-form-page .netcore-form-actions .btn {
    min-width: 120px;
}

.content-wrapper .box,
.netcore-form-shell {
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    background: var(--nc-surface);
}

.mobile-form-page .box-body,
.mobile-form-page .netcore-form-body {
    padding: 24px;
}

.mobile-table-stack td::before {
    content: attr(data-label);
    display: none;
}

.mobile-form-inline .form-group {
    min-width: 180px;
}

/* I bottoni nel box-footer hanno già margine base */
.box-footer .btn {
    margin-right: 6px;
}

/* QR code generator */
#qrCode {
    margin: 15px;
}

/* Hover tabelle: tenue su desktop, disattivato su mobile */
@media screen and (min-width: 768px) {
    .table-hover > tbody > tr:hover > td,
    .table-hover > tbody > tr:hover > th {
        background-color: var(--nc-raised) !important;
    }
}

/* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) {
    /* Hide captions */
    .carousel-caption {
        display: none;
    }

    .content-wrapper {
        overflow-x: hidden;
    }

    .mobile-form-inline {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: stretch !important;
    }

    .mobile-form-inline .form-group,
    .mobile-form-inline .form-control {
        width: 100%;
        margin-right: 0;
    }

    .mobile-form-inline .btn {
        width: 100%;
        margin-right: 0;
        padding: 10px 14px;
        font-size: 15px;
    }

    .mobile-form-inline label {
        margin-bottom: 4px;
    }

    .mobile-form-inline #totalYearContainer {
        margin-left: 0 !important;
        justify-content: space-between;
        width: 100%;
    }

    .box-tools {
        float: none !important;
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-top: 8px;
    }

    .box-tools .has-feedback {
        width: 100%;
        position: relative;
    }

    .box-tools .has-feedback .form-control {
        width: 100%;
        padding-right: 34px; /* spazio per l'icona */
    }

    .box-tools .has-feedback .form-control-feedback {
        right: 0;
        position: absolute;
        top: 0;
        pointer-events: none;
    }

    .mobile-form-page .box-body,
    .mobile-form-page .netcore-form-body {
        padding: 16px;
    }

    .mobile-form-page .box-footer,
    .mobile-form-page .netcore-form-footer {
        padding: 14px 16px 16px;
    }

    .mobile-form-page .box-footer .form-group,
    .mobile-form-page .netcore-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mobile-form-page .box-footer .btn,
    .mobile-form-page .netcore-form-actions .btn {
        width: 100%;
        min-width: 0;
        margin-right: 0;
    }




    .table-responsive {
        border: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .table-hover > tbody > tr:hover > td,
    .table-hover > tbody > tr:hover > th {
        background-color: inherit !important;
    }

    .mobile-table-stack,
    .mobile-table-stack thead,
    .mobile-table-stack tbody,
    .mobile-table-stack th,
    .mobile-table-stack td,
    .mobile-table-stack tr {
        display: block;
        width: 100%;
    }

    .mobile-table-stack thead {
        display: none;
    }

    .mobile-table-stack tr {
        border: 1px solid #e6e6e6;
        border-radius: 6px;
        margin-bottom: 10px;
        --mobile-row-bg: #fff;
        background-color: var(--mobile-row-bg);
        padding: 0;
        overflow: hidden;
    }

    .table-striped.mobile-table-stack tr:nth-of-type(odd) {
        --mobile-row-bg: #fbfbfb;
    }

    .mobile-table-stack td {
        border: 0 !important;
        border-bottom: 1px dashed #efefef !important;
        padding: 8px 10px !important;
        text-align: right;
        min-height: 30px;
        background-color: var(--mobile-row-bg) !important;
        background-clip: padding-box;
    }

    .mobile-table-stack td:last-child {
        border-bottom: 0 !important;
    }

    .mobile-table-stack td::before {
        display: inline-block;
        float: left;
        font-weight: 600;
        color: #666;
        padding-right: 8px;
    }

    .mobile-actions {
        text-align: right !important;
    }

    .mobile-actions a {
        display: inline-block;
        padding: 6px 4px;
    }

    .mobile-form-page .row > [class*="col-md-"] {
        width: 100%;
        float: none;
    }

    /* Box footer: Salva, Indietro, Elimina, Create, Back to List → full-width su mobile */
    .box-footer .form-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .box-footer .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0;
        padding: 10px 14px;
        font-size: 15px;
        display: block;
    }

    /* Eccezione: i popup/modal mantengono i bottoni auto-width */
    .modal .box-footer .btn,
    .modal-dialog .box-footer .btn {
        width: auto;
        display: inline-block;
    }

    /* Apply button (ricalcola totali) full-width su mobile */
    .mobile-form-page .btn-apply-wrap {
        display: flex;
        justify-content: stretch;
    }

    .mobile-form-page .btn-apply-wrap .btn {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 10px;
        font-size: 15px;
    }

    /* Tabella righe fattura (AddOrEdit) */
    #the_table td,
    #the_table th {
        word-break: break-word;
        white-space: normal !important;
    }

    #the_table td:last-child,
    #the_table th:last-child {
        min-width: 80px;
        text-align: right;
    }

    /* Bottone "Aggiungi riga" full-width */
    .mobile-form-page .btn-add-line {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        margin-bottom: 12px;
    }

    /* Invoice show page – colonne info */
    .invoice .invoice-info > [class*="col-"] {
        width: 100% !important;
        float: none !important;
        text-align: left !important;
        padding-bottom: 12px;
        border-bottom: 1px solid #e8e8e8;
        margin-bottom: 10px;
    }

    .invoice .invoice-col-last {
        text-align: left !important;
        border-bottom: none !important;
    }

    /* Titolo fattura con data a capo */
    .invoice .page-header small.pull-right {
        display: block;
        float: none;
        margin-top: 6px;
        font-size: 14px;
        color: #777;
    }

    /* Bottoni azione ShowInvoice */
    .invoice-action-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 0;
    }

    .invoice-action-buttons .btn {
        width: 100%;
        padding: 11px 14px;
        font-size: 15px;
        text-align: left;
    }

    /* Sezione fatturazione elettronica */
    .invoice-xml-section {
        margin-top: 8px;
    }

    .invoice-xml-section h3 {
        font-size: 18px;
        margin-left: 0 !important;
    }

    /* Azioni nella tabella index (icone più grandi al touch) */
    .mobile-actions a,
    .mobile-actions a i {
        font-size: 17px;
    }

    .mobile-actions a {
        padding: 8px 6px;
        display: inline-block;
    }

    /* Padding contenuto */
    .content {
        padding: 8px !important;
    }

    /* Box header titolo non sovrapposto */
    .box-header.with-border {
        display: flex;
        flex-direction: column;
        gap: 6px;
        overflow: visible;
    }

    .box-header .box-title {
        flex: 1 1 auto;
    }

    .box-header .box-tools {
        width: 100%;
        flex-shrink: 0;
    }

    .dt-container .dt-layout-row {
        display: block;
    }

    .dt-container .dt-layout-cell {
        width: 100%;
        padding: 6px 0 !important;
        text-align: left !important;
    }

    .dt-container .dt-paging .dt-paging-button {
        margin: 2px;
    }

    /* Bottone "Nuovo" (btn-block) con padding coerente su mobile */
    .btn.btn-block {
        padding: 10px 14px;
        font-size: 15px;
        margin-bottom: 8px;
    }
}

/* ===== Stili base (non solo mobile) per i bottoni azione fattura ===== */
.invoice-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    align-items: center;
}

.invoice-xml-section {
    margin-top: 16px;
    padding: 0;
}

.invoice-xml-section h3 {
    margin-left: 0 !important;
}

/* Colonna azioni: icone allineate al bordo destro della tabella */
.table th.mobile-actions,
.table td.mobile-actions {
    text-align: right !important;
    white-space: nowrap;
}



/* ===== Tema: registro contabile =====
   Superfici grafite neutre, menu laterale grafite scuro, un solo accento (blu inchiostro) per selezione,
   azione principale e anno corrente. Cifre (importi, ore) in IBM Plex Mono tabulare: classe .num */
:root {
    --nc-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --nc-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --nc-bg: #f6f6f7;
    --nc-surface: #ffffff;
    --nc-raised: #f1f1f3;
    --nc-ink: #171717;
    --nc-ink-2: #4a4a50;
    --nc-muted: #6e6e75;
    --nc-line: #e4e4e7;
    --nc-line-strong: #d4d4d8;
    --nc-accent: #1e40af;
    --nc-accent-hover: #1a3794;
    --nc-accent-soft: #eef1fb;
    --nc-good: #15803d;
    --nc-warn: #b45309;
    --nc-bad: #dc2626;
    --nc-side: #161618;
    --nc-side-2: #1f1f22;
    --nc-side-ink: #a1a1a8;
    --nc-ease: cubic-bezier(.22, 1, .36, 1);
    /* compatibilità con le view che usano ancora i nomi vecchi */
    --nc-navy: var(--nc-side);
    --nc-navy-2: var(--nc-side-2);
    --nc-brand: var(--nc-accent);
    --nc-hero: var(--nc-surface);
}

body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.main-header .logo, .main-header .navbar, .sidebar, .content-wrapper, .modal-content,
.login-box, .register-box, .btn, .form-control, .select2-container, .dropdown-menu, .tooltip, .popover,
.sweet-alert, #toast-container {
    font-family: var(--nc-font);
}
body { color: var(--nc-ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; color: var(--nc-ink); }
b, strong { font-weight: 600; }
.num, .content-wrapper .num { font-family: var(--nc-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.content-wrapper .table td, .content-wrapper .table th { font-variant-numeric: tabular-nums; }

/* Controlli form: raggio solo sugli angoli esterni, un solo colore bordo */
.content-wrapper .form-control,
.modal-content .form-control,
.login-box .form-control,
.register-box .form-control,
.content-wrapper .input-group-addon,
.modal-content .input-group-addon,
.login-box .input-group-addon,
.register-box .input-group-addon,
.content-wrapper .select2-container--default .select2-selection--single,
.modal-content .select2-container--default .select2-selection--single,
.login-box .select2-container--default .select2-selection--single,
.register-box .select2-container--default .select2-selection--single,
.content-wrapper .select2-container--default .select2-selection--multiple,
.modal-content .select2-container--default .select2-selection--multiple,
.login-box .select2-container--default .select2-selection--multiple,
.register-box .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--nc-line-strong);
    border-radius: 8px;
    box-shadow: none;
    min-height: 36px;
    color: var(--nc-ink);
}
.content-wrapper .form-control:focus,
.modal-content .form-control:focus,
.login-box .form-control:focus,
.register-box .form-control:focus {
    border-color: var(--nc-accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, .12);
}
.content-wrapper .form-control[readonly],
.content-wrapper .form-control[disabled] { background: var(--nc-raised); color: var(--nc-ink-2); }
.content-wrapper .input-group-addon,
.modal-content .input-group-addon,
.login-box .input-group-addon,
.register-box .input-group-addon {
    background: var(--nc-raised);
    color: var(--nc-muted);
    min-width: 40px;
}
.content-wrapper .input-group .form-control:not(:first-child),
.modal-content .input-group .form-control:not(:first-child),
.login-box .input-group .form-control:not(:first-child),
.register-box .input-group .form-control:not(:first-child),
.content-wrapper .input-group-addon:not(:first-child),
.modal-content .input-group-addon:not(:first-child),
.login-box .input-group-addon:not(:first-child),
.register-box .input-group-addon:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.content-wrapper .input-group .form-control:not(:last-child),
.modal-content .input-group .form-control:not(:last-child),
.login-box .input-group .form-control:not(:last-child),
.register-box .input-group .form-control:not(:last-child),
.content-wrapper .input-group-addon:not(:last-child),
.modal-content .input-group-addon:not(:last-child),
.login-box .input-group-addon:not(:last-child),
.register-box .input-group-addon:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.content-wrapper .input-group-addon:first-child,
.modal-content .input-group-addon:first-child,
.login-box .input-group-addon:first-child,
.register-box .input-group-addon:first-child { border-right: 0; }
.content-wrapper .input-group-addon:last-child,
.modal-content .input-group-addon:last-child,
.login-box .input-group-addon:last-child,
.register-box .input-group-addon:last-child { border-left: 0; }
.content-wrapper label, .modal-content label { font-weight: 500; color: var(--nc-ink-2); font-size: 13px; }

/* ===== Struttura ===== */
body.skin-blue { padding-top: 0; padding-bottom: 0; }
body.skin-blue .wrapper,
body.skin-blue .content-wrapper,
body.skin-blue .right-side { background: var(--nc-bg); color: var(--nc-ink); }
.content-wrapper .content { padding: 24px; }
.content-wrapper .content-header { padding: 24px 24px 0; }
.content-wrapper .content-header > h1 { font-size: 24px; font-weight: 600; color: var(--nc-ink); letter-spacing: 0; }
.content-wrapper .content-header > h1 small { color: var(--nc-muted); font-size: 14px; }
.content-wrapper a:not(.btn) { color: var(--nc-accent); }
.content-wrapper a:not(.btn):hover { color: var(--nc-accent-hover); }
.main-footer { background: var(--nc-bg); border-top: 1px solid var(--nc-line); color: var(--nc-muted); font-size: 13px; }

/* barra in alto: chiara e quieta, logo sulla colonna scura del menu */
body.skin-blue .main-header .navbar {
    background: var(--nc-surface);
    border-bottom: 1px solid var(--nc-line);
}
body.skin-blue .main-header .navbar .sidebar-toggle,
body.skin-blue .main-header .navbar .nav > li > a { color: var(--nc-ink-2); }
body.skin-blue .main-header .navbar .sidebar-toggle:hover,
body.skin-blue .main-header .navbar .nav > li > a:hover,
body.skin-blue .main-header .navbar .nav .open > a { background: var(--nc-raised); color: var(--nc-ink); }
body.skin-blue .main-header .logo,
body.skin-blue .main-header .logo:hover,
body.skin-blue .main-header .logo:focus {
    background: var(--nc-side);
    color: #ededed;
    border-bottom: 0;
    border-right: 1px solid var(--nc-side-2);
    font-size: 17px;
    font-weight: 500;
    text-align: left;
    padding-left: 20px;
}
body.skin-blue .main-header .logo b { font-weight: 600; }
.main-header .user-menu .user-image { width: 28px; height: 28px; margin-top: -4px; }
.main-header .navbar .user-menu > a { font-size: 14px; }
.main-header .dropdown-menu { border: 1px solid var(--nc-line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .06); overflow: hidden; }
.navbar-nav > .user-menu > .dropdown-menu > li.user-header { background: var(--nc-side); height: auto; padding: 16px; }
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { color: #ededed; font-size: 14px; margin-top: 8px; }
.navbar-nav > .user-menu > .dropdown-menu > .user-footer { background: var(--nc-surface); padding: 12px; }

/* menu laterale */
body.skin-blue .main-sidebar,
body.skin-blue .left-side { background-color: var(--nc-side); }
body.skin-blue .sidebar-menu > li.header {
    background: transparent;
    color: #77777e;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    padding: 20px 20px 8px;
}
body.skin-blue .sidebar-menu > li > a {
    color: var(--nc-side-ink);
    border-left: 0;
    margin: 2px 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: background-color .15s var(--nc-ease), color .15s var(--nc-ease);
}
body.skin-blue .sidebar-menu > li > a > i,
body.skin-blue .sidebar-menu > li > a > .fa,
body.skin-blue .sidebar-menu > li > a > .fas { width: 18px; margin-right: 8px; text-align: center; color: #77777e; }
body.skin-blue .sidebar-menu > li:hover > a { color: #ededed; background: var(--nc-side-2); border-left: 0; }
body.skin-blue .sidebar-menu > li.active > a {
    color: #ffffff;
    background: #2a2a2e;
    border-left: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
body.skin-blue .sidebar-menu > li.active > a > i,
body.skin-blue .sidebar-menu > li.active > a > .fas { color: #8fa6f0; }
body.skin-blue .sidebar-menu > li > .treeview-menu { background: transparent; margin: 0 8px; padding-left: 0; }
body.skin-blue .sidebar-menu .treeview-menu > li > a { color: var(--nc-side-ink); padding: 6px 12px 6px 38px; border-radius: 8px; }
body.skin-blue .sidebar-menu .treeview-menu > li.active > a,
body.skin-blue .sidebar-menu .treeview-menu > li > a:hover { color: #fff; background: var(--nc-side-2); }
body.skin-blue .user-panel > .info,
body.skin-blue .user-panel > .info > a { color: #ededed; }

/* ===== Riquadri ===== */
.content-wrapper .box {
    border: 1px solid var(--nc-line);
    border-top: 1px solid var(--nc-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    background: var(--nc-surface);
    margin-bottom: 24px;
}
.content-wrapper .box.box-primary,
.content-wrapper .box.box-info,
.content-wrapper .box.box-warning,
.content-wrapper .box.box-success,
.content-wrapper .box.box-danger,
.content-wrapper .box.box-default { border-top-width: 1px; border-top-color: var(--nc-line); }
.content-wrapper .box-body:not(.no-padding) { padding: 20px 24px; }
.content-wrapper .box-header { padding: 16px 24px; }
.content-wrapper .box-header.with-border { border-bottom: 1px solid var(--nc-line); background: transparent; }
.content-wrapper .box-title, .content-wrapper .box-header .box-title { font-size: 16px; font-weight: 600; color: var(--nc-ink); }
.content-wrapper .box-header .box-tools .btn-box-tool { color: var(--nc-muted); }

/* ===== Pulsanti ===== */
.content-wrapper .btn,
.modal-content .btn,
.login-box .btn,
.register-box .btn {
    border-radius: 8px;
    font-weight: 500;
    box-shadow: none;
    transition: background-color .15s var(--nc-ease), border-color .15s var(--nc-ease), color .15s var(--nc-ease);
}
.content-wrapper .btn:active, .modal-content .btn:active { transform: scale(.98); box-shadow: none; }
.content-wrapper .btn-primary,
.modal-content .btn-primary,
.login-box .btn-primary,
.register-box .btn-primary {
    background: var(--nc-accent);
    border: 1px solid var(--nc-accent);
    color: #fff;
    font-weight: 500;
}
.content-wrapper .btn-primary:hover,
.content-wrapper .btn-primary:focus,
.modal-content .btn-primary:hover,
.login-box .btn-primary:hover {
    background: var(--nc-accent-hover);
    border-color: var(--nc-accent-hover);
    color: #fff;
}
.content-wrapper .btn-default,
.modal-content .btn-default {
    border-color: var(--nc-line-strong);
    background: var(--nc-surface);
    color: var(--nc-ink);
}
.content-wrapper .btn-default:hover,
.content-wrapper .btn-default:focus,
.modal-content .btn-default:hover {
    background: var(--nc-raised);
    border-color: var(--nc-line-strong);
    color: var(--nc-ink);
}
.content-wrapper .btn-success,
.modal-content .btn-success {
    background: var(--nc-surface);
    border: 1px solid var(--nc-line-strong);
    color: var(--nc-ink);
}
.content-wrapper .btn-success:hover,
.content-wrapper .btn-success:focus { background: var(--nc-raised); border-color: var(--nc-line-strong); color: var(--nc-ink); }
.content-wrapper .btn-danger { background: var(--nc-surface); border-color: var(--nc-line-strong); color: var(--nc-bad); }
.content-wrapper .btn-danger:hover { background: #fdf2f2; border-color: var(--nc-bad); color: var(--nc-bad); }

/* Pulsanti "Nuovo/Nuova ..." (btn-block) */
.content-wrapper .netcore-index-new-btn {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Pulsanti piccoli (azioni di riga): icone grigie, sfondo solo al passaggio */
.content-wrapper .btn-xs,
.modal-content .btn-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1;
    border-radius: 8px;
}
.content-wrapper .btn-sm,
.modal-content .btn-sm { border-radius: 8px; }
.content-wrapper .btn-xs.pull-right { margin-left: 4px !important; }

/* ===== Tabelle ===== */
.content-wrapper .table > thead > tr > th {
    background: transparent;
    color: var(--nc-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 1px solid var(--nc-line);
    padding-top: 12px;
    padding-bottom: 8px;
}
.content-wrapper .table > tbody > tr > td { border-top-color: var(--nc-line); vertical-align: middle; }
.content-wrapper .table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
.content-wrapper .table-bordered, .content-wrapper .table-bordered > tbody > tr > td, .content-wrapper .table-bordered > thead > tr > th { border-color: var(--nc-line); }

/* etichette di stato Bootstrap (.label-*): testo quieto, niente pillole piene. Le .label senza modificatore sono testo delle view */
.content-wrapper .label[class*="label-"] {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--nc-raised) !important;
    color: var(--nc-ink-2) !important;
}
.content-wrapper .label-success, .content-wrapper .bg-green { color: var(--nc-good) !important; }
.content-wrapper .label-danger, .content-wrapper .bg-red { color: var(--nc-bad) !important; }
.content-wrapper .label-warning, .content-wrapper .bg-yellow { color: var(--nc-warn) !important; }
.content-wrapper .label-primary, .content-wrapper .bg-light-blue { color: var(--nc-accent) !important; }
.content-wrapper .callout { border-radius: 12px; border: 1px solid var(--nc-line); border-left-width: 4px; background: var(--nc-surface) !important; color: var(--nc-ink) !important; }
.content-wrapper .callout.callout-info { border-left-color: var(--nc-accent); }
.content-wrapper .callout.callout-warning { border-left-color: var(--nc-warn); }
.content-wrapper .callout.callout-danger { border-left-color: var(--nc-bad); }
.content-wrapper .callout.callout-success { border-left-color: var(--nc-good); }
.content-wrapper .alert { border-radius: 12px; }

/* ===== Login / registrazione ===== */
body.login-page,
body.register-page { background: var(--nc-bg); }
.login-logo, .register-logo { font-size: 24px; margin-bottom: 24px; }
.login-logo a, .register-logo a { color: var(--nc-ink); font-weight: 500; }
.login-logo a b, .register-logo a b { font-weight: 600; }
.login-box-body,
.register-box-body {
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    padding: 24px;
}
.login-box-msg, .register-box-msg { color: var(--nc-muted); padding: 0 0 16px; }

/* ===== Modali e popup ===== */
.modal-content { border-radius: 14px; overflow: hidden; border: 1px solid var(--nc-line); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.modal .modal-header,
.modal.modal-primary .modal-header {
    background: var(--nc-surface) !important;
    color: var(--nc-ink) !important;
    border-bottom: 1px solid var(--nc-line);
    padding: 16px 20px;
}
.modal.modal-primary .modal-body, .modal.modal-primary .modal-footer { background: var(--nc-surface) !important; color: var(--nc-ink) !important; }
.modal .modal-header .modal-title { font-weight: 600; font-size: 16px; }
.modal .modal-header .close { color: var(--nc-muted); opacity: 1; text-shadow: none; }
.modal .modal-header .close:hover { color: var(--nc-ink); }
.modal-content .box-footer { background: var(--nc-surface); border-top: 1px solid var(--nc-line); }
.datepicker.dropdown-menu { border-radius: 12px; border: 1px solid var(--nc-line); box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }
.select2-dropdown { border-color: var(--nc-line-strong); border-radius: 8px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--nc-accent); }

/* caricamento pagina (Pace): solo la sottile barra, niente spinner che gira */
.pace .pace-activity { display: none; }
.pace .pace-progress { background: var(--nc-accent); height: 2px; }

/* ===== Visualizzazione fattura (ShowInvoice / ShowInvoiceGuest) ===== */
.invoice-show { margin: 0 auto; padding: 24px 16px; color: var(--nc-ink); }
.invoice-show .inv-hero {
    background: var(--nc-surface);
    color: var(--nc-ink);
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.invoice-show .inv-hero .eyebrow { font-size: 13px; color: var(--nc-muted); margin-bottom: 4px; }
.invoice-show .inv-hero .inv-title { font-size: 28px; font-weight: 500; line-height: 1.15; word-break: break-all; }
.invoice-show .inv-hero .inv-total { text-align: right; }
.invoice-show .inv-hero .inv-total .amount { font-family: var(--nc-mono); font-size: 28px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.invoice-show .inv-pills { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.invoice-show .inv-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--nc-ink-2); }
.invoice-show .inv-pill i { color: var(--nc-muted); }
.invoice-show .inv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.invoice-show .inv-card {
    background: var(--nc-surface);
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.invoice-show .inv-grid .inv-card { margin-bottom: 0; }
.invoice-show .inv-card h4 { margin: 0 0 12px; font-size: 13px; color: var(--nc-muted); font-weight: 500; }
.invoice-show .inv-card address { margin: 0; line-height: 1.6; }
.invoice-show .inv-card .inv-name { font-size: 16px; font-weight: 600; color: var(--nc-ink); }
.invoice-show .inv-table { width: 100%; border-collapse: collapse; }
.invoice-show .inv-table th { font-size: 12px; font-weight: 500; color: var(--nc-muted); padding: 8px 12px; border-bottom: 1px solid var(--nc-line); }
.invoice-show .inv-table td { padding: 12px; border-bottom: 1px solid var(--nc-line); vertical-align: top; }
.invoice-show .inv-table tr:last-child td { border-bottom: 0; }
.invoice-show .inv-table .num { text-align: right; white-space: nowrap; }
.invoice-show .inv-table .qty { width: 80px; }
.invoice-show .inv-summary { margin-left: auto; max-width: 420px; }
.invoice-show .inv-sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--nc-line); }
.invoice-show .inv-sum-row span:first-child { color: var(--nc-muted); }
.invoice-show .inv-sum-row span:last-child { font-family: var(--nc-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-show .inv-sum-total {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    margin-top: 12px; padding: 12px 0 0; border-top: 2px solid var(--nc-ink);
    color: var(--nc-ink);
}
.invoice-show .inv-sum-total span:first-child { font-size: 14px; font-weight: 500; }
.invoice-show .inv-sum-total span:last-child { font-family: var(--nc-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.invoice-show .inv-note { border-left: 3px solid var(--nc-accent); background: var(--nc-accent-soft); border-radius: 8px; padding: 12px 16px; }
.invoice-show .inv-note p.lead { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.invoice-show .callout { border-radius: 12px; border: 1px solid var(--nc-line); border-left: 3px solid var(--nc-accent); margin: 0 0 16px !important; background: var(--nc-surface) !important; color: var(--nc-ink) !important; }
.invoice-show .inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.invoice-show .inv-section-title { font-size: 15px; font-weight: 600; color: var(--nc-ink); margin: 8px 0 12px; }
@media screen and (max-width: 767px) {
    .invoice-show .inv-grid { grid-template-columns: 1fr; }
    .invoice-show .inv-hero { padding: 16px; align-items: flex-start; }
    .invoice-show .inv-hero .inv-total { text-align: left; }
    .invoice-show .inv-card { padding: 16px; }
    .invoice-show .inv-actions .btn { width: 100%; }
}

/* ===== Home ===== */
.home-hero {
    background: transparent;
    color: var(--nc-ink);
    padding: 0;
    margin-bottom: 24px;
}
.home-hero .eyebrow { font-size: 13px; color: var(--nc-muted); margin-bottom: 4px; }
.home-hero .home-title { font-size: 28px; font-weight: 500; line-height: 1.15; }
.home-hero .home-sub { margin-top: 4px; color: var(--nc-muted); }
.home-pills { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.home-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--nc-ink-2); }
.home-pill i { color: var(--nc-muted); }
.home-hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.home-year { margin-left: auto; text-align: right; min-width: 120px; }
.home-year label { display: block; font-size: 13px; color: var(--nc-muted); margin-bottom: 4px; font-weight: 400; }
.content-wrapper .home-hero select.home-year-select { font-weight: 500; cursor: pointer; }
.content-wrapper a.home-pill-link { color: var(--nc-accent); text-decoration: none; }
.content-wrapper a.home-pill-link:hover { color: var(--nc-accent-hover); text-decoration: underline; }

/* cifre dell'anno: numeri, etichetta, niente icone colorate */
.home-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.home-kpi {
    background: var(--nc-surface);
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.home-kpi .icon { display: none; }
.home-kpi .value { font-family: var(--nc-mono); font-size: 24px; font-weight: 500; color: var(--nc-ink); line-height: 1.15; font-variant-numeric: tabular-nums; word-break: break-word; order: 2; }
.home-kpi .label { font-size: 13px; color: var(--nc-muted); margin-top: 0; order: 1; }
.home-kpi .label a { color: var(--nc-accent); }
.home-kpi.is-blue .value { color: var(--nc-accent); }

/* Menu a tendina: freccia staccata dal bordo */
.content-wrapper select.form-control,
.modal-content select.form-control {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 36px;
    background: var(--nc-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e75' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px 8px;
}
.content-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow,
.modal-content .select2-container--default .select2-selection--single .select2-selection__arrow { right: 8px; height: 100%; }
.content-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered { padding-right: 32px; }

/* select compatte (input-sm) */
.content-wrapper select.form-control.input-sm {
    height: 36px;
    min-height: 36px;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 12px;
    font-size: 14px;
    line-height: 34px;
}

.home-progress { margin-bottom: 16px; }
.home-progress .head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 8px; color: var(--nc-ink-2); font-weight: 400; }
.home-progress .head .num, .home-progress .head span:last-child { font-family: var(--nc-mono); font-variant-numeric: tabular-nums; }
.home-progress .track { height: 6px; border-radius: 3px; background: var(--nc-raised); overflow: hidden; }
.home-progress .bar { height: 100%; border-radius: 3px; background: var(--nc-accent); }
.home-progress .bar.is-teal { background: var(--nc-ink-2); }
.home-progress .bar.is-slate { background: #a1a1a8; }

@media screen and (max-width: 991px) {
    .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 575px) {
    .home-kpis { grid-template-columns: 1fr; }
    .home-hero .home-title { font-size: 24px; }
    .content-wrapper .content { padding: 16px; }
}

/* riga totale in fondo a una lista */
.list-total { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 24px; margin: 0 12px 12px; padding: 12px 0 8px; border-top: 1px solid var(--nc-ink); font-weight: 500; color: var(--nc-ink); font-family: var(--nc-mono); font-variant-numeric: tabular-nums; }
.list-total span:first-child { margin-right: auto; font-family: var(--nc-font); }
.list-total small { font-family: var(--nc-font); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--nc-muted); margin-right: 4px; }

/* loader DataTables ("Elaborazione...") */
div.dt-container div.dt-processing {
    width: auto;
    min-width: 180px;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 12px 20px 8px;
    background: var(--nc-surface);
    border: 1px solid var(--nc-line);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    color: var(--nc-muted);
    font-size: 13px;
    font-weight: 400;
}
div.dt-container div.dt-processing > div:last-child { margin: 8px auto 0; height: 10px; width: 64px; }
div.dt-container div.dt-processing > div:last-child > div { width: 8px; height: 8px; top: 0; background: var(--nc-accent); }
div.dt-container div.dt-processing > div:last-child > div:nth-child(3) { left: 27px; }
div.dt-container div.dt-processing > div:last-child > div:nth-child(4) { left: 46px; }
div.dt-container .dt-search input, div.dt-container .dt-length select { border: 1px solid var(--nc-line-strong); border-radius: 8px; }
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover { background: var(--nc-raised) !important; border: 1px solid var(--nc-line-strong) !important; color: var(--nc-ink) !important; border-radius: 8px; }
div.dt-container .dt-paging .dt-paging-button:hover { background: var(--nc-raised) !important; border-color: transparent !important; color: var(--nc-ink) !important; }
div.dt-container .dt-info { color: var(--nc-muted); font-size: 13px; }

/* azioni di riga (icone link nelle tabelle): grigie, area di tocco 32px, sfondo al passaggio */
.content-wrapper .table td > a:has(> i:only-child) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--nc-ink-2);
    transition: background-color .15s var(--nc-ease), color .15s var(--nc-ease);
}
.content-wrapper .table td > a:has(> i:only-child):hover { background: var(--nc-raised); color: var(--nc-ink); }
/* righe alterne di DataTables: niente zebra, basta la riga sottile */
.content-wrapper table.dataTable.stripe > tbody > tr > *,
.content-wrapper table.dataTable.display > tbody > tr > * { box-shadow: none !important; }
/* paginazione Bootstrap 3 */
.content-wrapper .pagination > li > a,
.content-wrapper .pagination > li > span { color: var(--nc-ink-2); border-color: var(--nc-line); }
.content-wrapper .pagination > li > a:hover { background: var(--nc-raised); color: var(--nc-ink); }
.content-wrapper .pagination > .active > a,
.content-wrapper .pagination > .active > a:hover,
.content-wrapper .pagination > .active > span { background: var(--nc-raised); border-color: var(--nc-line-strong); color: var(--nc-ink); }
.content-wrapper .pagination > li:first-child > a { border-radius: 8px 0 0 8px; }
.content-wrapper .pagination > li:last-child > a { border-radius: 0 8px 8px 0; }
/* icone immagine nel menu (Agenzia Entrate) in scala di grigi come le altre */
body.skin-blue .sidebar-menu > li > a > img { filter: grayscale(1) brightness(1.6); opacity: .6; width: 16px; margin: 0 9px 0 1px; }
.home-kpi .label { display: block; background: none !important; padding: 0; text-align: left; font-size: 13px; font-weight: 400; color: var(--nc-muted) !important; white-space: normal; }
.content-wrapper .row-actions a { color: var(--nc-ink-2); }
.content-wrapper table.dataTable > tbody > tr > * { box-shadow: none !important; }
.login-box a, .register-box a { color: var(--nc-accent); }
.login-box a:hover, .register-box a:hover { color: var(--nc-accent-hover); }
/* mobile: il menu utente (float) della barra non deve restringere il contenuto */
@media screen and (max-width: 767px) { .content-wrapper { clear: both; } }

/* voci del menu con testo posizionato a mano (azienda, link): in flusso, allineate alle icone (non nel menu chiuso, dove AdminLTE mostra il testo al passaggio) */
body:not(.sidebar-collapse) .sidebar-menu a > span[style*="position: absolute"],
body:not(.sidebar-collapse) .sidebar-menu a > span[style*="position:absolute"] { position: static !important; }
body.skin-blue .sidebar-menu .treeview-menu > li > a > i { width: 18px; margin-right: 8px; text-align: center; color: #77777e; }
body.skin-blue .sidebar-menu .treeview-menu > li > a { padding-left: 20px; }
/* menu chiuso: sigla del logo centrata nella colonna da 50px */
.sidebar-mini.sidebar-collapse .main-header .logo { padding-left: 0; padding-right: 0; text-align: center; }
/* intestazione delle liste: "Nuovo …" e ricerca a destra, in riga */
.content-wrapper .box-header > .box-tools { display: flex; align-items: center; gap: 8px; top: 50%; transform: translateY(-50%); right: 16px; }
.content-wrapper .box-header > .box-tools .netcore-index-new-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; min-height: 36px; padding: 0 16px; }
.content-wrapper .box-header > .box-tools .has-feedback .form-control { height: 36px; }
@media screen and (max-width: 767px) {
    .content-wrapper .box-header > .box-tools { position: static; transform: none; margin-top: 12px; flex-wrap: wrap; }
}
