/* ═══════════════════════════════════════════════════════
   UP GRANDINE — Brand variables & global page components
═══════════════════════════════════════════════════════ */
:root {
    --up-topbar-bg: #019EDB; /* UpGrandine brand blue — navbar & table head   */
    --up-topbar-border: #017bb0; /* darker brand blue — border/divider            */
    --up-brand: #019EDB; /* UpGrandine brand blue — buttons & accents     */
    --up-brand-dark: #017bb0; /* darker brand blue — hover                    */
    --up-brand-light: #e8f6fd; /* very light blue — filterbar & backgrounds    */
    --up-text-on-dark: #d0eefa; /* light text on brand blue areas               */
    --up-accent-blue: #019EDB; /* interactive accent                           */
    --up-anagrafiche-border: rgba(1, 158, 219, .35);
    --up-anagrafiche-border-strong: rgba(1, 158, 219, .55);
    --up-anagrafiche-soft-bg: #f4fbff;
}

/* ── Global page topbar ─────────────────────────────── */
.page-topbar {
    background: #fff;
    min-height: 52px;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: .5rem .9rem;
    gap: .75rem;
    position: relative;
    border-bottom: 3px solid var(--up-brand);
    box-shadow: 0 2px 8px rgba(1,158,219,.1);
    overflow: visible;
}

.page-topbar-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--up-brand);
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
}

    .page-topbar-title i {
        color: var(--up-brand);
    }

.page-topbar-actions {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
    width: 100%;
}

    .page-topbar-actions > .btn-topbar-new {
        margin-left: auto;
    }

/* "Nuova …" primary button inside topbar — brand style */
.page-topbar .btn-topbar-new {
    background: var(--up-brand);
    color: #fff;
    border: none;
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem .8rem;
    border-radius: .375rem;
    white-space: nowrap;
    transition: background .15s;
}

/* ── Shared navbar responsiveness ─────────────────── */
.app-navbar .container-fluid {
    gap: .35rem .75rem;
}

.app-navbar-content {
    width: 100%;
}

.app-main-nav,
.app-user-nav {
    row-gap: .2rem;
}

    .app-main-nav .nav-link,
    .app-user-nav .nav-link,
    .app-user-nav .btn.btn-link.nav-link {
        border-radius: .4rem;
        padding: .45rem .65rem;
    }

/* ── Anagrafiche reusable styles ───────────────────── */
.area-anagrafiche .card.shadow-sm,
.area-anagrafiche .card.shadow-sm.mb-3,
.area-anagrafiche .card.shadow-sm.h-100 {
    border-color: var(--up-anagrafiche-border);
}

.area-anagrafiche .card .card-header {
    border-bottom-color: var(--up-anagrafiche-border);
}

.area-anagrafiche .table.table-hover.table-striped.align-middle.mb-0:not(.page-grid-table) {
    font-size: 13px;
}

    .area-anagrafiche .table.table-hover.table-striped.align-middle.mb-0:not(.page-grid-table) thead th {
        background: var(--up-topbar-bg);
        color: #fff;
        border-bottom: 2px solid var(--up-topbar-border);
        font-size: .73rem;
        font-weight: 600;
        white-space: nowrap;
        vertical-align: middle;
    }

    .area-anagrafiche .table.table-hover.table-striped.align-middle.mb-0:not(.page-grid-table) tbody tr:hover td {
        background: #f7f9fb;
    }

.area-anagrafiche .anagrafiche-accent-card {
    border-color: var(--up-anagrafiche-border);
}

.area-anagrafiche .nav-tabs {
    border-bottom-color: var(--up-anagrafiche-border);
}

    .area-anagrafiche .nav-tabs .nav-link.active {
        border-color: var(--up-anagrafiche-border) var(--up-anagrafiche-border) #fff;
    }

.anagrafiche-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.anagrafiche-menu-links,
.anagrafiche-menu-admin {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.anagrafiche-menu .btn {
    white-space: nowrap;
}

.anagrafiche-home-grid .card {
    border-color: var(--up-anagrafiche-border);
}

.anagrafiche-home-grid .anagrafiche-home-card {
    transition: transform .12s ease, box-shadow .12s ease;
}

    .anagrafiche-home-grid .anagrafiche-home-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 .4rem .95rem rgba(1, 158, 219, .15);
    }

.anagrafiche-home-grid .anagrafiche-home-card-clickable {
    cursor: pointer;
}

    .anagrafiche-home-grid .anagrafiche-home-card-clickable:focus-visible {
        outline: 2px solid var(--up-brand);
        outline-offset: 2px;
    }

.anagrafiche-home-grid .anagrafiche-home-icon {
    width: 2.3rem;
    height: 2.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .65rem;
    background: var(--up-anagrafiche-soft-bg);
    border: 1px solid var(--up-anagrafiche-border);
}

.anagrafiche-home-grid .btn {
    align-self: flex-start;
}

@media (min-width: 992px) {
    .page-topbar {
        padding: .55rem 1.2rem;
    }

    .page-topbar-actions {
        width: auto;
        max-width: 75%;
    }
}

@media (max-width: 991.98px) {
    .app-navbar-content {
        margin-top: .45rem;
        border-top: 1px solid rgba(1, 158, 219, .2);
        padding-top: .35rem;
    }

    .app-main-nav,
    .app-user-nav {
        width: 100%;
    }

    .app-user-nav {
        border-top: 1px dashed rgba(1, 158, 219, .25);
        margin-top: .4rem;
        padding-top: .4rem;
    }

    .page-topbar-title {
        white-space: normal;
    }

    .page-topbar-actions {
        justify-content: flex-start;
    }

        .page-topbar-actions > .btn-topbar-new {
            margin-left: 0;
        }

    .anagrafiche-menu {
        width: 100%;
    }

    .anagrafiche-menu-links,
    .anagrafiche-menu-admin {
        width: 100%;
    }

    .anagrafiche-menu .btn,
    .anagrafiche-menu .btn-group {
        flex: 1 1 auto;
    }

    .anagrafiche-home-grid .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .page-topbar {
        padding: .55rem .7rem;
    }

        .page-topbar .btn-topbar-new,
        .page-topbar .btn-topbar-back,
        .page-topbar .btn-topbar-settings {
            width: 100%;
            text-align: center;
        }
}

/* Fatturazione */
.area-fatturazione main {
    max-width: 1760px;
    margin-inline: auto;
}

.area-fatturazione .validation-summary-valid.alert {
    display: none;
}

.fatturazione-create-shell {
    max-width: 1760px;
}

.fatturazione-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .9rem 1rem;
    background: #fff;
    border: 1px solid rgba(1, 158, 219, .2);
    border-left: 4px solid var(--up-brand);
    box-shadow: 0 2px 10px rgba(20, 36, 61, .06);
}

.fatturazione-kicker {
    color: var(--up-brand);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fatturazione-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}

.fatturazione-section,
.fatturazione-summary-panel,
.fatturazione-table-panel,
.fatturazione-metric {
    background: #fff;
    border: 1px solid rgba(20, 36, 61, .1);
    box-shadow: 0 1px 6px rgba(20, 36, 61, .05);
}

.fatturazione-section {
    padding: 1rem;
}

.fatturazione-section-header,
.fatturazione-summary-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.fatturazione-section-header h2,
.fatturazione-summary-title h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.fatturazione-section-header p,
.fatturazione-summary-title span,
.fatturazione-action-list small {
    margin: .15rem 0 0;
    color: #64748b;
    font-size: .82rem;
}

.fatturazione-document-number {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    border-radius: 999px;
    background: var(--up-brand-light);
    color: var(--up-brand-dark);
    font-size: .82rem;
    font-weight: 700;
    padding: .25rem .75rem;
    white-space: nowrap;
}

.fatturazione-subsection {
    padding: .85rem;
    border: 1px dashed rgba(1, 158, 219, .35);
    background: #f8fbfd;
}

.fatturazione-check-card,
.fatturazione-send-check {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .8rem;
    border: 1px solid rgba(20, 36, 61, .1);
    background: #f8fafc;
}

.fatturazione-summary-panel {
    position: sticky;
    top: .75rem;
    padding: 1rem;
}

.fatturazione-total-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(150px, 190px);
    gap: .75rem;
    align-items: center;
    padding: .45rem 0;
    border-bottom: 1px solid #eef2f6;
}

.fatturazione-total-row:last-of-type {
    border-bottom: 0;
}

.fatturazione-total-row span {
    color: #475569;
    font-size: .9rem;
}

.fatturazione-total-row-strong {
    margin-top: .25rem;
    padding-top: .75rem;
    border-top: 2px solid rgba(1, 158, 219, .18);
}

.fatturazione-total-row-strong span {
    font-weight: 700;
    color: #111827;
}

.fatturazione-lines-section {
    margin-top: .25rem;
}

.fatturazione-lines-table-wrap,
.fatturazione-table-panel {
    border-radius: .35rem;
    overflow: hidden;
}

.fatturazione-lines-table {
    min-width: 980px;
}

.fatturazione-lines-table thead th,
.fatturazione-invoice-table thead th {
    background: #edf6fb;
    color: #1f2937;
    border-bottom: 1px solid rgba(1, 158, 219, .25);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.fatturazione-lines-table tbody td,
.fatturazione-invoice-table tbody td {
    border-bottom: 1px solid #eef2f6;
}

.fatturazione-lines-table .form-control,
.fatturazione-lines-table .input-group-text {
    font-size: .88rem;
}

.fatturazione-line-number {
    width: 54px;
    color: #64748b;
    font-weight: 700;
}

.fatturazione-line-description {
    min-width: 360px;
}

.fatturazione-nav-strip {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.fatturazione-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .75rem;
    border: 1px solid rgba(1, 158, 219, .25);
    border-radius: .45rem;
    background: #fff;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.fatturazione-nav-link:hover,
.fatturazione-nav-link.active {
    background: var(--up-brand);
    border-color: var(--up-brand);
    color: #fff;
}

.fatturazione-metric {
    min-height: 96px;
    padding: .9rem 1rem;
    border-top: 3px solid var(--up-brand);
}

.fatturazione-metric span {
    display: block;
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fatturazione-metric strong {
    display: block;
    margin-top: .35rem;
    color: #1f2937;
    font-size: 1.65rem;
    line-height: 1.1;
}

.fatturazione-metric-danger {
    border-top-color: #dc3545;
}

.fatturazione-filter-check {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.fatturazione-invoice-table {
    font-size: .92rem;
}

.fatturazione-definition-grid {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: .55rem 1rem;
}

.fatturazione-definition-grid dt {
    color: #64748b;
    font-weight: 700;
}

.fatturazione-definition-grid dd {
    margin: 0;
    color: #1f2937;
}

.fatturazione-action-list {
    display: grid;
    gap: .6rem;
}

.fatturazione-action-list a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid rgba(20, 36, 61, .1);
    border-radius: .45rem;
    color: #1f2937;
    background: #f8fafc;
    text-decoration: none;
}

.fatturazione-action-list a:hover {
    border-color: rgba(1, 158, 219, .35);
    background: #f4fbff;
}

.fatturazione-action-list i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: .45rem;
    background: var(--up-brand-light);
    color: var(--up-brand);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

@media (max-width: 1199.98px) {
    .fatturazione-summary-panel {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .fatturazione-page-header,
    .fatturazione-section-header,
    .fatturazione-summary-title {
        align-items: stretch;
    }

    .fatturazione-header-actions,
    .fatturazione-header-actions .btn,
    .fatturazione-section-header > .btn,
    .fatturazione-section-header > form,
    .fatturazione-section-header > form .btn {
        width: 100%;
    }

    .fatturazione-total-row,
    .fatturazione-definition-grid {
        grid-template-columns: 1fr;
    }
}

.page-topbar .btn-topbar-new:hover {
    background: var(--up-brand-dark);
    color: #fff;
}

/* Settings button inside topbar */
.page-topbar .btn-topbar-settings {
    background: var(--up-brand-light);
    color: var(--up-brand);
    border: 1px solid rgba(1,158,219,.3);
    font-size: .78rem;
    padding: .28rem .7rem;
    border-radius: .375rem;
    white-space: nowrap;
    transition: background .15s;
}

    .page-topbar .btn-topbar-settings:hover {
        background: rgba(1,158,219,.2);
        color: var(--up-brand-dark);
    }

/* Back / neutral topbar button */
.page-topbar .btn-topbar-back {
    background: transparent;
    color: var(--up-brand);
    border: 1px solid rgba(1,158,219,.4);
    font-size: .78rem;
    padding: .28rem .65rem;
    border-radius: .375rem;
    white-space: nowrap;
    transition: background .15s;
}

    .page-topbar .btn-topbar-back:hover {
        background: var(--up-brand-light);
        color: var(--up-brand-dark);
    }

/* ── Font-size control (A− 14 A+) ─────────────────── */
.ep-fontctrl {
    background: var(--up-brand-light);
    border: 1px solid rgba(1,158,219,.25);
    border-radius: 2rem;
    padding: 2px;
    display: flex;
    align-items: center;
}

.ep-fontbtn {
    background: none;
    border: none;
    color: var(--up-brand);
    font-size: .78rem;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 2rem;
    transition: background .15s;
    line-height: 1;
}

    .ep-fontbtn:hover {
        background: rgba(1,158,219,.2);
        color: var(--up-brand-dark);
    }

.ep-fontsize-val {
    color: var(--up-brand);
    font-size: .8rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

.ep-fontsize-badge {
    background: rgba(0,0,0,.25);
    color: var(--up-accent-blue);
    font-weight: 700;
    font-size: .8rem;
    border-radius: .25rem;
    padding: 2px 6px;
    min-width: 28px;
    text-align: center;
}

/* ── Counter cards (page summary) ─────────────────── */
.page-counters {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.page-counter-card {
    background: #fff;
    border-radius: .5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 105px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border-top: 3px solid transparent;
}

    .page-counter-card .cnt-icon {
        font-size: 1.35rem;
        margin-bottom: .1rem;
    }

    .page-counter-card .cnt-num {
        font-size: 1.65rem;
        font-weight: 700;
        line-height: 1.1;
    }

    .page-counter-card .cnt-label {
        font-size: .62rem;
        letter-spacing: .06em;
        color: #888;
        margin-top: 2px;
        text-transform: uppercase;
    }
/* Brand-blue variant */
.cnt-brand {
    border-top-color: var(--up-brand);
}

    .cnt-brand .cnt-icon, .cnt-brand .cnt-num {
        color: var(--up-brand);
    }
/* Orange variant */
.cnt-orange {
    border-top-color: #f59e0b;
}

    .cnt-orange .cnt-icon, .cnt-orange .cnt-num {
        color: #f59e0b;
    }
/* Green variant */
.cnt-green {
    border-top-color: #10b981;
}

    .cnt-green .cnt-icon, .cnt-green .cnt-num {
        color: #10b981;
    }
/* Red variant */
.cnt-red {
    border-top-color: #ef4444;
}

    .cnt-red .cnt-icon, .cnt-red .cnt-num {
        color: #ef4444;
    }

/* ── Dense table shared ────────────────────────────── */
.page-grid-table {
    font-size: 13px;
    background: #fff;
    border-radius: 0 0 .5rem .5rem;
    overflow: hidden;
}

    .page-grid-table thead th {
        background: var(--up-topbar-bg) !important;
        color: #fff !important;
        font-size: .73rem;
        font-weight: 600;
        letter-spacing: .02em;
        padding: .3rem .75rem;
        border-bottom: 2px solid var(--up-topbar-border) !important;
        white-space: nowrap;
        vertical-align: middle;
        text-align: center;
        user-select: none;
        text-transform: none;
    }

        .page-grid-table thead th:hover {
            background: #0186bb !important;
        }

    .page-grid-table tbody td {
        padding: .55rem .75rem;
        border-bottom: 1px solid #f0f2f5;
        vertical-align: middle;
    }

    .page-grid-table tbody tr:last-child td {
        border-bottom: none;
    }

    .page-grid-table tbody tr:hover td {
        background: #f7f9fb;
    }

.page-grid-sort-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

    .page-grid-sort-link:hover .col-label {
        color: #fff;
    }

.col-label {
    display: block;
}

.col-sublabel {
    font-size: .62rem;
    color: #6a8499;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    margin-top: 1px;
}
/* Drag & drop */
.drag-col {
    cursor: grab;
    user-select: none;
}

    .drag-col:active {
        cursor: grabbing;
    }

    .drag-col.dragging {
        opacity: .4;
    }

    .drag-col.drag-over {
        background: #0186bb !important;
        outline: 2px dashed var(--up-accent-blue);
        outline-offset: -2px;
    }
/* Offcanvas col list */
.col-list-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    padding: .45rem .75rem;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: .5rem;
}

    .col-list-item:active {
        cursor: grabbing;
    }

    .col-list-item.drag-over-list {
        border: 2px dashed var(--up-accent-blue);
        background: #eff6ff;
    }

html {
    font-size: 14px;
}


@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    overflow-x: hidden;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

/* ── Navbar — white background, brand blue accents ─── */
header .navbar {
    background: #fff !important;
    border-bottom: 3px solid var(--up-brand) !important;
    box-shadow: 0 2px 8px rgba(1,158,219,.1) !important;
}

    header .navbar .navbar-brand,
    header .navbar .nav-link,
    header .navbar .navbar-text {
        color: #444 !important;
    }

        header .navbar .nav-link:hover,
        header .navbar .nav-link.active {
            color: var(--up-brand) !important;
        }
        /* Convert the white logo to brand blue on the white navbar */
        header .navbar .navbar-brand img {
            filter: brightness(0) invert(56%) sepia(85%) saturate(457%) hue-rotate(167deg) brightness(0.97) contrast(1.01);
        }

a {
    color: #0077cc;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}

/* Pratiche index polish */
.area-pratiche.ctrl-pratiche.act-index main {
    padding-bottom: 1.5rem;
}

.pratica-edit-shell {
    background: #fff;
    border: 1px solid rgba(1, 158, 219, .18);
    border-left: 4px solid var(--up-brand);
    box-shadow: 0 2px 10px rgba(20, 36, 61, .07);
}

.pratica-edit-actions,
.pratica-edit-action-group {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filterbar {
    padding: .35rem .5rem;
    margin: 0 0 .35rem;
    border: 1px solid rgba(1, 158, 219, .18);
    border-top: 2px solid var(--up-brand);
}

.area-pratiche.ctrl-pratiche.act-index #filterForm {
    align-items: end !important;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-field {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-field-sm {
    flex: 0 1 112px;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-field-md {
    flex: 0 1 154px;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-field-lg {
    flex: 1 1 190px;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-input {
    width: 100%;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-label {
    margin-bottom: 0;
    line-height: 1;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-command {
    white-space: nowrap;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-actions {
    display: flex;
    align-items: end;
    gap: .35rem;
    flex-wrap: nowrap;
}

.area-pratiche.ctrl-pratiche.act-index .ep-filter-count {
    align-self: center;
    margin-left: auto;
    white-space: nowrap;
    color: #64748b;
    font-size: .78rem;
    line-height: 1;
}

.area-pratiche.ctrl-pratiche.act-index .ep-kpi-grid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: .35rem;
    margin-bottom: .35rem;
}

.area-pratiche.ctrl-pratiche.act-index .ep-kpi-card {
    height: 54px;
    border-radius: .35rem;
}

.area-pratiche.ctrl-pratiche.act-index .ep-kpi-card-main {
    gap: .08rem;
    padding: .25rem .4rem;
}

.area-pratiche.ctrl-pratiche.act-index .ep-kpi-card .cnt-num {
    font-size: 1rem;
    line-height: 1;
}

.area-pratiche.ctrl-pratiche.act-index .ep-kpi-card .cnt-label {
    min-height: 0;
    font-size: .55rem;
    line-height: 1.05;
    letter-spacing: .03em;
}

.area-pratiche.ctrl-pratiche.act-index .ep-table-wrap {
    border: 1px solid rgba(20, 36, 61, .08);
    border-radius: .5rem;
    overflow: hidden;
    background: #fff;
}

.area-pratiche.ctrl-pratiche.act-index .pratiche-grid-scroll {
    max-height: calc(100vh - 165px);
    min-height: 420px;
    overflow: auto;
}

.area-pratiche.ctrl-pratiche.act-index .page-grid-table {
    border-radius: 0;
    min-width: 2600px;
    width: max-content;
    font-size: 12px;
}

    .area-pratiche.ctrl-pratiche.act-index .page-grid-table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: .28rem .38rem;
        line-height: 1.1;
    }

    .area-pratiche.ctrl-pratiche.act-index .page-grid-table tbody td {
        max-width: 190px;
        padding: .2rem .38rem;
        line-height: 1.12;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.area-pratiche.ctrl-pratiche.act-index .ep-cell-main,
.area-pratiche.ctrl-pratiche.act-index .ep-cell-sub {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
}

.area-pratiche.ctrl-pratiche.act-index .page-grid-table .btn,
.area-pratiche.ctrl-pratiche.act-index .page-grid-table .badge,
.area-pratiche.ctrl-pratiche.act-index .page-grid-table .ep-link,
.area-pratiche.ctrl-pratiche.act-index .page-grid-table .ep-targa,
.area-pratiche.ctrl-pratiche.act-index .page-grid-table .col-label,
.area-pratiche.ctrl-pratiche.act-index .page-grid-table .ep-sort-link {
    white-space: nowrap;
}

.area-pratiche.ctrl-pratiche.act-index .page-grid-table .ep-link,
.area-pratiche.ctrl-pratiche.act-index .page-grid-table .col-label {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.area-pratiche.ctrl-pratiche.act-index .page-grid-table .ep-sort-link {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

    .area-pratiche.ctrl-pratiche.act-index .page-grid-table .ep-sort-link .col-label {
        min-width: 0;
    }

.area-pratiche.ctrl-pratiche.act-index .ep-grid-actions {
    width: max-content;
}

.area-pratiche.ctrl-pratiche.act-index .js-grid-whatsapp {
    padding: .08rem .28rem;
    line-height: 1.1;
}

.area-pratiche.ctrl-pratiche.act-index .grid-whatsapp-preview,
.area-pratiche.ctrl-pratiche.act-edit .edit-whatsapp-preview {
    min-height: 180px;
    max-height: 320px;
    overflow: auto;
    padding: .75rem;
    border: 1px solid rgba(20, 36, 61, .12);
    border-radius: .4rem;
    background: #f8fafc;
    color: #1f2937;
    font-family: inherit;
    font-size: .92rem;
    white-space: pre-wrap;
}

.area-pratiche.ctrl-pratiche.act-index #offcanvasImpostazioni {
    width: 440px;
    max-width: 95vw;
}

.pratiche-grid-settings-header {
    background: #1e2a3a;
}

/* Pratiche edit polish */
.area-pratiche.ctrl-pratiche.act-edit main {
    max-width: 1680px;
    margin-inline: auto;
}

.pratica-edit-shell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .9rem 1rem;
}

.pratica-edit-title {
    min-width: 220px;
}

.pratica-edit-actions {
    justify-content: flex-end;
    margin-left: auto;
}

.pratica-edit-action-group {
    padding: .35rem;
    border: 1px solid rgba(20, 36, 61, .08);
    border-radius: .5rem;
    background: #f8fafc;
}

.pratica-edit-action-group-primary {
    background: #fff;
}

.pratica-edit-action-group .btn,
.pratica-edit-shell .btn {
    white-space: nowrap;
}

.area-pratiche.ctrl-pratiche.act-edit .card.shadow-sm {
    border-color: rgba(1, 158, 219, .22);
}

.area-pratiche.ctrl-pratiche.act-edit .card-header {
    gap: .75rem;
    flex-wrap: wrap;
}

.area-pratiche.ctrl-pratiche.act-edit .form-label {
    margin-bottom: .25rem;
}

.area-pratiche.ctrl-pratiche.act-edit .table-responsive {
    max-width: 100%;
}

@media (max-width: 991.98px) {
    .pratica-edit-shell {
        align-items: stretch;
    }

    .pratica-edit-actions,
    .pratica-edit-action-group {
        width: 100%;
        justify-content: stretch;
    }

        .pratica-edit-action-group .btn {
            flex: 1 1 auto;
        }

    .area-pratiche.ctrl-pratiche.act-index .pratiche-grid-scroll {
        max-height: none;
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    .area-pratiche.ctrl-pratiche.act-index .ep-filter-field,
    .area-pratiche.ctrl-pratiche.act-index .ep-filter-field-sm,
    .area-pratiche.ctrl-pratiche.act-index .ep-filter-field-md,
    .area-pratiche.ctrl-pratiche.act-index .ep-filter-field-lg,
    .area-pratiche.ctrl-pratiche.act-index #filterForm > .btn,
    .area-pratiche.ctrl-pratiche.act-index #filterForm > a.btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .area-pratiche.ctrl-pratiche.act-index .ep-filter-count {
        margin-left: 0;
        width: auto;
        text-align: left;
    }

    .area-pratiche.ctrl-pratiche.act-index .ep-filter-actions {
        width: 100%;
        margin-left: 0 !important;
    }

        .area-pratiche.ctrl-pratiche.act-index .ep-filter-actions .btn {
            flex: 1 1 0;
        }

    .pratica-edit-action-group {
        flex-direction: column;
        align-items: stretch;
    }

        .pratica-edit-action-group .btn,
        .pratica-edit-action-group a.btn {
            width: 100%;
        }
}
