/* =============================================================================
   SITE-TECNOSUD.CSS - VERSIONE TECNOSUD
   TecnoSud - Laboratory Management System
   ============================================================================= */

/* =============================================================================
   1. CSS CUSTOM PROPERTIES - TEMA VERDE TECNOSUD
   ============================================================================= */
:root {
    /* Colori primari TecnoSud */
    --color-primary: #5a8f7d;
    --color-primary-dark: #3d5c52;
    --color-success: #28a745;
    --color-success-alt: #10b981;
    --color-edit: #5a8f7d;
    --color-copy: #0f5132;
    /* Grigi e neutri */
    --color-bg-light: #f5f7fa;
    --color-bg-card: #ffffff;
    --color-bg-hover: #e7f5f0;
    --color-bg-striped: #f8f9fa;
    --color-bg-table-header: #fafbfd;
    --color-text-primary: #111827;
    --color-text-secondary: #0f1720;
    --color-text-muted: #6c757d;
    --color-text-subtle: #6b7280;
    --color-text-dark: #111418;
    --color-border: #dee2e6;
    --color-border-light: #e9ecef;
    --color-border-input: #ced4da;
    --color-border-card: #eef2f6;
    --color-border-table: #e6e9ee;
    /* Sidebar / Dark theme */
    --color-sidebar-bg: #343a40;
    --color-scrollbar-track: #1a1e27;
    --color-scrollbar-thumb: #5a8f7d;
    --color-scrollbar-thumb-hover: #4a7c6f;
    /* Spaziature */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-pill: 999px;
    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 2px 14px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 6px 18px rgba(15, 23, 42, 0.04);
    /* Transizioni */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    /* Font */
    --font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =============================================================================
   2. RESET & BASE
   ============================================================================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 14px;
    background-color: var(--color-bg-light);
    font-family: var(--font-family);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.bg-primary {
    background-color: var(--color-primary) !important;

}

.btn-check:checked + .btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check) + .btn:active {
    background-color: var(--color-primary) !important;
    color:white !important;
}



.btn-outline-primary {
    color: var(--color-primary) !important;
    border-color: #5a8f7d !important;
}

    /* =============================================================================
   3. SCROLLBAR PERSONALIZZATA
   ============================================================================= */
    * {
    scrollbar-width: thin;
    scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
}

    *::-webkit-scrollbar {
        width: 10px;
        height: auto;
    }

    *::-webkit-scrollbar-track {
        background: var(--color-scrollbar-track);
    }

    *::-webkit-scrollbar-thumb {
        background: var(--color-scrollbar-thumb);
        border-radius: 5px;
        border: 2px solid var(--color-scrollbar-track);
    }

        *::-webkit-scrollbar-thumb:hover {
            background: var(--color-scrollbar-thumb-hover);
        }

    *::-webkit-scrollbar-corner {
        background: var(--color-scrollbar-track);
    }

/* =============================================================================
   4. TYPOGRAPHY
   ============================================================================= */
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.subtle {
    color: var(--color-text-subtle);
    font-size: 0.95rem;
}

.monospace {
    font-family: monospace;
}
.sidebar-nav {
    font-size: 0.85rem;
}
.text-muted {
    --cui-text-opacity: 1;
    color: var(--cui-secondary-color) !important;
}
/* =============================================================================
   5. BUTTONS
   ============================================================================= */
.btn-chiudi-test,
.btn-chiudi-test:hover,
.btn-warning,
.btn-warning:hover {
    color: white !important;
}

.btn-ghost {
    background-color: transparent !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    transition: all var(--transition-normal) !important;
}

    .btn-ghost:hover {
        background-color: #f5f5f5 !important;
        border-color: #ccc !important;
    }

.btn-primary-blue {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 20px !important;
}
.btn-primary {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 20px !important;
}

.btn:hover {
    color: white !important ;
    background: var(--color-primary) !important;
}

.btn-primary-blue:hover {
    background-color: var(--color-primary-dark) !important;
    color: #fff !important;
}

/* --- Action Buttons (Edit, Copy, etc.) --- */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid transparent;
    transition: transform 0.06s ease;
}

.btn-edit {
    background: var(--color-bg-card);
    color: var(--color-edit);
    border-color: #d1f2e8;
}

    .btn-edit:hover {
        background: #ecfff6;
    }

.btn-copy {
    background: var(--color-bg-card);
    color: var(--color-copy);
    border-color: #d1f2e8;
}

    .btn-copy:hover {
        background: #ecfff6;
    }

/* =============================================================================
   6. HEADER / NAV
   ============================================================================= */
.header-dark .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

    .header-dark .nav-link:hover {
        color: #fff;
    }

/* =============================================================================
   7. SIDEBAR & WRAPPER
   ============================================================================= */
.sidebar {
    min-height: 100vh;
    background-color: var(--color-sidebar-bg);
}

    .sidebar .sidebar-header,
    .sidebar .sidebar-brand {
        color: #fff;
    }

.sidebar-header > div {
    margin-left: 5%;
}

.wrapper {
    flex: 1;
    overflow: auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   8. SELECT2 BOOTSTRAP FIX
   ============================================================================= */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 46px;
    border-radius: var(--radius-md);
}

.select2-container--bootstrap-5 .select2-selection--single {
    border-color: var(--color-border-input);
}

    .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
        line-height: 1.95;
    }

/* =============================================================================
   9. FORM ELEMENTS
   ============================================================================= */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    height: 46px;
}

label.small-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-danger {
    font-size: 0.85rem;
}

/* =============================================================================
   10. PAGE LAYOUTS
   ============================================================================= */
.page-wrap {
    max-width: 1150px;
    margin: 36px auto;
}

/* Layout largo (tabelle, liste) */
.page-wrap-wide {
    max-width: 1150px;
    margin: 40px auto;
}

/* Layout stretto (form di edit) */
.page-wrap-edit {
    max-width: 900px;
    margin: 40px auto;
}

/* =============================================================================
   11. CARDS
   ============================================================================= */
.steps-card {
    padding: 28px;
    margin-bottom: 28px;
}

.form-card {
    padding: 36px;
    border-radius: var(--radius-lg);
}

/* Card per form di edit */
.form-card-edit {
    padding: 36px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-card);
    box-shadow: var(--shadow-md);
}

/* Card per sezioni (tabelle, liste) */
.card-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-card);
}

.card-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* =============================================================================
   12. FORM TITLES & SUBTITLES
   ============================================================================= */
.form-title {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-sub {
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.form-title-edit {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-sub-edit {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* =============================================================================
   13. FOOTER ACTIONS
   ============================================================================= */
.footer-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
}

/* Footer con bottoni a destra */
.footer-actions-end {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

/* Footer con bottoni ai lati */
.footer-actions-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

/* =============================================================================
   14. PROGRESS LINE
   ============================================================================= */
.progress-line {
    height: 6px;
    background: #e9edf2;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

    .progress-line > .bar {
        height: 100%;
        width: 17%;
        background: var(--color-primary);
    }

/* =============================================================================
   15. WIZARD
   ============================================================================= */
.wizard-nav {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-slow);
    min-width: 100px;
}

.wizard-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    color: var(--color-text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 2;
    transition: all var(--transition-slow);
}

.wizard-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-subtle);
    text-align: center;
    margin-top: 8px;
    max-width: 110px;
    line-height: 1.3;
}

.wizard-line {
    position: absolute;
    top: 18px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

/* --- Wizard Step: Completed --- */
.wizard-step.completed .wizard-circle {
    background: var(--color-success-alt);
    color: #fff;
    border-color: var(--color-success-alt);
}

.wizard-step.completed .wizard-label {
    color: var(--color-success-alt);
}

.wizard-step.completed .wizard-line,
.wizard-step.completed .line-to-next {
    background-color: var(--color-success-alt);
    transition: background-color 0.5s ease;
}

/* --- Wizard Step: Active --- */
.wizard-step.active .wizard-circle {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.wizard-step.active .wizard-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Wizard Progress Bar --- */
.wizard-progress {
    margin-top: 8px;
}

.wizard-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.wizard-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.wizard-progress-percentage {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

.wizard-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5a8f7d 0%, #6a9d8a 100%);
    border-radius: var(--radius-pill);
    transition: width 0.5s ease;
}

/* =============================================================================
   16. TS6 CONTAINER (Tests Container)
   ============================================================================= */
.ts6-container-tests {
    background-color: var(--color-bg-striped);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
}

.ts6-header-tests {
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
}

.ts6-title-tests,
.ts7-title {
    font-size: 1.9rem;
    font-weight: 600;
    color: #000;
}

.ts6-table-wrapper {
    background-color: var(--color-bg-card);
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-y: visible !important;
}

    /* Fix: Dropdown visibile quando aperto dentro ts6-table-wrapper */
    .ts6-table-wrapper.dropdown-open,
    .ts6-table-wrapper.dropdown-open .table-responsive {
        overflow: visible !important;
    }

@supports selector(:has(*)) {
    .ts6-table-wrapper:has(.dropdown.show),
    .ts6-table-wrapper:has(.dropdown-menu.show) {
        overflow: visible !important;
    }

        .ts6-table-wrapper:has(.dropdown.show) .table-responsive,
        .ts6-table-wrapper:has(.dropdown-menu.show) .table-responsive {
            overflow: visible !important;
        }
}

/* =============================================================================
   17. TS7 COMPONENTS (Card, Form, Table)
   ============================================================================= */
.ts7-card {
    background: var(--color-bg-card);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.ts7-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.ts7-input {
    border-radius: var(--radius-md);
}

.ts7-btn-success {
    background-color: var(--color-success);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition-normal);
    padding: 7px 14px;
}

    .ts7-btn-success:hover {
        opacity: 0.85;
    }

/* --- Table Wrapper --- */
.ts7-table-wrapper {
    background-color: var(--color-bg-card);
    overflow-x: auto;
    overflow-y: visible !important;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- Table Base --- */
table.ts7-table {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: var(--color-bg-striped);
    --bs-table-hover-bg: var(--color-bg-hover);
    --cui-table-bg-type: initial !important;
}

    table.ts7-table thead th {
        padding: 0.2rem 0.15rem;
        font-size: 0.6rem;
        font-weight: 600;
        text-align: center;
        vertical-align: middle;

        border-bottom: 2px solid var(--color-border);
        overflow: visible !important;
        text-overflow: ellipsis;
        letter-spacing: -0.3px;
        position: relative;
    }

    table.ts7-table tbody td {
        padding: 0.15rem 0.1rem;
        text-align: center;
        vertical-align: middle;
        border-bottom: 1px solid var(--color-border-light);
        overflow: hidden;
        text-overflow: ellipsis;
        background-image: none;
    }

.ts7-table th,
.ts7-table td {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

/* --- Striped Rows --- */
table.ts7-table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--color-bg-card) !important;
}

table.ts7-table.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: var(--color-bg-striped) !important;
}

/* --- Hover Rows --- */
table.ts7-table.table-hover > tbody > tr:hover > * {
    background-color: var(--color-bg-hover) !important;
    transition: background-color var(--transition-fast);
}

/* --- Sticky First Column --- */
table.ts7-table th:first-child,
table.ts7-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: inherit;
}

table.ts7-table thead th:first-child {
    z-index: 3;
}

table.ts7-table.table-hover > tbody > tr:hover > th:first-child,
table.ts7-table.table-hover > tbody > tr:hover > td:first-child {
    background-color: var(--color-bg-hover) !important;
}

/* --- Badge --- */
.ts7-badge {
    font-size: 0.8rem;
    border-radius: var(--radius-lg);
    padding: 0.35rem 0.7rem;
}

/* --- Button Group --- */
.ts7-btn-group .btn {
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
    transition: transform var(--transition-fast);
    position: relative;
    z-index: 1;
}

    .ts7-btn-group .btn:hover {
        transform: scale(1.05);
    }

.ts7-btn-group .work-dropdown.show {
    z-index: 10000;
}

/* =============================================================================
   18. TABLE SECTION (Tabella generica per sezioni)
   ============================================================================= */
.table-section {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-table);
}

    .table-section thead {
        background: var(--color-bg-table-header);
    }

        .table-section thead th {
            padding: 14px 16px;
            font-size: 0.80rem;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.03em;
            border-bottom: 1px solid var(--color-border-card);
        }

    .table-section tbody tr {
        background: var(--color-bg-card);
        transition: background var(--transition-fast), transform 0.05s ease;
    }

        .table-section tbody tr:hover {
            background: #f0f9f5;
        }

    .table-section td {
        padding: 12px 16px;
        vertical-align: middle;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.95rem;
        color: var(--color-text-primary);
    }

    .table-section tbody tr:last-child td {
        border-bottom: none;
    }

/* =============================================================================
   19. PRINT DROPDOWN
   ============================================================================= */
.ts-print-btn {
    cursor: pointer;
}

.ts-print-arrow {
    transition: transform var(--transition-normal);
}

    .ts-print-arrow.rotated {
        transform: rotate(180deg);
    }

.ts-print-menu a:hover {
    background: #f0f9f5;
}

.ts-print-dropdown .ts-print-btn {
    font-size: 0.7rem;
}

.ts-print-menu {
    font-size: 0.65rem;
    min-width: 120px !important;
}

    .ts-print-menu a {
        padding: 0.2rem 0.5rem !important;
    }

.ts7-table thead th .ts-print-dropdown {
    position: relative !important;
    display: inline-block;
    z-index: 20000;
    overflow: visible !important;
}

.ts7-table thead th .ts-print-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    z-index: 999999 !important;
}

.ts7-table thead th .ts-print-btn {
    position: relative;
    z-index: 20001;
    transform: none;
}

@supports selector(:has(*)) {
    .ts-print-dropdown:has(.ts-print-menu[style*="display: block"]) {
        z-index: 999998;
    }
}

/* =============================================================================
   20. TABLE RESPONSIVE & DROPDOWN FIXES
   ============================================================================= */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible !important;
}

    .table-responsive tbody,
    .table-responsive tr {
        overflow: visible !important;
    }

    .table-responsive .dropdown {
        position: relative;
    }
    .table-responsive .dropdown-menu {
        position: absolute !important;
        z-index: 9999;
    }

    .table-responsive td.td-actions,
    td.td-actions {
        position: relative;
        overflow: visible !important;
    }

        .table-responsive td.td-actions .dropdown {
            position: relative;
        }

        .table-responsive td.td-actions .dropdown-menu {
            z-index: 5000;
        }

        td.td-actions .btn {
            position: relative;
            z-index: 1;
        }

        td.td-actions .dropdown.show {
            position: relative;
            z-index: 10000;
        }

            td.td-actions .dropdown.show > .dropdown-toggle {
                position: relative;
                z-index: 10001;
            }

        td.td-actions .dropdown-menu {
            position: absolute;
            z-index: 99999 !important;
        }

            .dropdown-menu.show,
            td.td-actions .dropdown-menu.show {
                display: block;
            }

/* --- Work Dropdown --- */
.work-dropdown {
    position: relative;
}

    .work-dropdown > .dropdown-toggle {
        position: relative;
        z-index: 1;
    }

    .work-dropdown > .dropdown-menu {
        z-index: 9999;
    }

    .work-dropdown.show > .dropdown-menu {
        z-index: 10000;
        display: block;
    }

    .work-dropdown.show > .dropdown-toggle {
        transform: none !important;
    }

/* --- Row Z-Index on Dropdown Open --- */
@supports selector(tr:has(.dropdown.show)) {
    tbody tr:has(.dropdown.show),
    tbody tr:has(.dropdown-menu.show) {
        position: relative;
        z-index: 9999;
    }
}

tbody tr:focus-within {
    position: relative;
    z-index: 9999;
}

/* =============================================================================
   21. RESPONSIVE
   ============================================================================= */
@media (max-width: 1400px) {
    table.ts7-table {
        font-size: 0.6rem;
    }

        table.ts7-table thead th {
            font-size: 0.55rem;
            padding: 0.15rem 0.1rem;
        }

        table.ts7-table tbody td {
            padding: 0.1rem 0.08rem;
        }
}

@media (max-width: 768px) {
    table.ts7-table th:nth-child(1),
    table.ts7-table td:nth-child(1),
    table.ts7-table th:nth-child(4),
    table.ts7-table td:nth-child(4),
    table.ts7-table th:nth-child(5),
    table.ts7-table td:nth-child(5) {
        display: none;
    }

    .ts7-card {
        padding: 16px;
    }

    .wizard-label {
        font-size: 11px;
        max-width: 80px;
    }

    .wizard-circle {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .page-wrap,
    .page-wrap-wide,
    .page-wrap-edit {
        margin: 20px 15px;
    }

    .form-card-edit,
    .card-section {
        padding: 20px;
    }
}
/* =============================================================================
   22. ACTION BUTTON ACTIVE STATE
   ============================================================================= */
.action-btn:active {
    transform: translateY(1px);
}

/* =============================================================================
   23. TABLE SECTION - RESPONSIVE MOBILE
   ============================================================================= */
@media (max-width: 767.98px) {
    .table-section thead {
        display: none;
    }

    .table-section,
    .table-section tbody,
    .table-section tr,
    .table-section td {
        display: block;
        width: 100%;
    }

        .table-section tr {
            margin-bottom: 12px;
            border-radius: var(--radius-md);
            border: 1px solid var(--color-border-card);
            padding: 12px;
        }

        .table-section td {
            padding: 8px 12px;
            border: none;
        }

    .table-label {
        display: block;
        font-size: 0.75rem;
        color: var(--color-text-subtle);
        margin-bottom: 4px;
        text-transform: uppercase;
    }

    .actions-cell {
        display: flex;
        gap: 8px;
        margin-top: 8px;
    }
}

/* =============================================================================
   24. FOOTER ACTIONS - UNIFORM BUTTON HEIGHT
   ============================================================================= */
.footer-actions-between a.btn,
.footer-actions-between button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    line-height: 1;
}

.footer-actions-between form {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

/* =============================================================================
   25. TS7 CONTAINER & TABS
   ============================================================================= */
.ts7-container {
    background-color: var(--color-bg-striped);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
}

.ts7-header {
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
}

/* --- Tabs --- */
.ts7-tabs {
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border);
}

    .ts7-tabs .nav-link {
        font-weight: 500;
        color: var(--color-primary);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: 0.6rem 1.2rem;
    }

        .ts7-tabs .nav-link.active {
            background: linear-gradient(90deg, #5a8f7d, #4a7c6f);
            color: white !important;
        }

        .ts7-tabs .nav-link:hover {
            background-color: var(--color-bg-hover);
        }

/* --- Table Header Gradient --- */
.ts7-table thead {
    background: white;
    color: white;
}

.ts7-table th,
.ts7-table td {
    vertical-align: middle;
    padding: 0.8rem 1rem;
    white-space: nowrap;
}

.ts7-table tbody tr:hover {
    background-color: #f0f9f5;
    transition: background-color var(--transition-normal);
}

/* --- Action Button --- */
.ts7-btn-action {
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    transition: transform var(--transition-fast);
}

    .ts7-btn-action:hover {
        transform: scale(1.05);
    }

/* --- Tab Active States --- */
.ts7-tab-active-ferri {
    background-color: #f1c40f !important;
    color: #000 !important;
    border-radius: var(--radius-md);
    padding: 6px 12px;
}

.ts7-tab-active-cubetti {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    border-radius: var(--radius-md);
    padding: 6px 12px;
}

/* --- TS7 Responsive --- */
@media (max-width: 992px) {
    .ts7-title {
        font-size: 1.6rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .ts7-table th:nth-child(1),
    .ts7-table td:nth-child(1),
    .ts7-table th:nth-child(5),
    .ts7-table td:nth-child(5) {
        display: none;
    }
}

/* =============================================================================
   26. SUMMARY
   ============================================================================= */
.page-card {
    border-radius: 10px;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

.header-row h1 {
    font-weight: 700;
    margin: 0;
}

.header-row p.lead {
    color: #6c757d;
    margin-top: .25rem;
    margin-bottom: 0;
}

.info-card {
    border: 1px solid #e6e9ee;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
    height: 100%;
}

    .info-card small {
        color: #6c757d;
        display: block;
        margin-bottom: .35rem;
    }

.info-edit {
    color: #5a8f7d;
}

    .info-edit:hover {
        text-decoration: none;
    }

.section-title {
    font-weight: 600;
    margin-bottom: .75rem;
}

.block {
    border: 1px solid #e6e9ee;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
}

.table-custom thead th {
    border-bottom: 1px solid #e9ecef;
    font-size: .85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.table-custom tbody td {
    vertical-align: middle;
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.card-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}


@media (max-width: 767.98px) {
    .info-card {
        margin-bottom: .9rem;
    }

    .card-actions {
        justify-content: flex-start;
    }
}

/* =============================================================================
   27. Modale
   ============================================================================= */
#modaleForm .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

#modaleForm .modal-header {
    background: transparent;
    border: none;
    justify-content: flex-end;
    padding: 0.5rem;
}

    #modaleForm .modal-header .btn-close {
        background-color: rgba(0,0,0,0.6);
        border-radius: 50%;
        padding: 0.75rem;
        opacity: 1;
        filter: invert(1);
    }

#modaleForm .modal-body {
    padding: 0;
}

#modaleForm #frameForm {
    border-radius: 8px;
}

/* =============================================================================
   28. PAGINATION - OVERRIDE BOOTSTRAP
   ============================================================================= */
.pagination .page-link {
    color: var(--color-primary);
    border-color: #dee2e6;
}

    .pagination .page-link:hover {
        color: var(--color-primary-dark);
        background-color: #e7f5f0;
        border-color: #dee2e6;
    }

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}
