/* ===== CSS Variables & Theme ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbarMenu .nav-link {
    color: #fff;
}


#smartwizard .tab-content {
    min-height: 250px;
}
.sw> .tab-content {
    height: auto !important;
}

table.dataTable th, table.dataTable td {
    vertical-align: middle;
}


.sw-theme-square>.nav .nav-link.myNavLink.active{
    color:#105e3a !important;
    font-weight: bold;
}

.sw-theme-square>.nav .nav-link.myNavLink.active::before{
    background-color: #105e3a !important;
}

.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li {
    text-align: center;
    display: flex;
    align-items: center;
}


.select2-container .select2-selection--single {
    min-height: 28px;
    height: auto;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    white-space: normal;
    word-break: break-word;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    /*max-width: 100%;*/
    white-space: normal;
    word-break: break-word;
    /*margin-bottom: 5px;
    padding: 2px 5px;
    line-height: 1.4;*/
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{
    height: 100%
}



html.dark .dt-container .dt-search input,
html.dark .dt-container .dt-length select {
  border: 1px solid #aaa;
  background-color: transparent;
}

/**/
.btn-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

/* Spinner caché par défaut */
.btn-loading .btn-spinner {
  display: none;
}

/* Texte visible par défaut */
.btn-loading .btn-text {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* État loading */
.btn-loading.loading .btn-text {
  display: none;
}

.btn-loading.loading .btn-loading-text {
  display: inline;
}

.btn-loading.loading .btn-spinner {
  display: inline-block;
}


/*myToastsContainer*/
.toast-container .toast {
  transition: all 0.25s ease;
}

.toast-success {
  background-color: #198754; /* Bootstrap success */
  color: #fff;
}

.toast-error {
  background-color: #dc3545; /* Bootstrap danger */
  color: #fff;
}

.toast .btn-close {
  filter: invert(1);
}


/***PMF AI TRAINING DASHBOARD VERACITY***/
  .veracity-dashboard-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
    }

    .veracity-title-block h5 {
        color: #0f172a;
        letter-spacing: -0.02em;
    }

    .veracity-title-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 12px;
        border-radius: 999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 700;
    }

    .veracity-title-pill::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    }

    .veracity-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(180px, 1fr));
        gap: 14px;
    }

    .veracity-summary-card {
        position: relative;
        overflow: hidden;
        border-radius: 16px;
        padding: 16px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .veracity-summary-card::after {
        content: "";
        position: absolute;
        top: -30px;
        right: -30px;
        width: 90px;
        height: 90px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.05);
    }

    .veracity-summary-label {
        position: relative;
        z-index: 1;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 6px;
    }

    .veracity-summary-value {
        position: relative;
        z-index: 1;
        color: #0f172a;
        font-size: 26px;
        font-weight: 800;
        line-height: 1.1;
    }

    .veracity-summary-subtitle {
        position: relative;
        z-index: 1;
        margin-top: 6px;
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
    }

    .veracity-summary-card.v-summary-before {
        background: linear-gradient(135deg, #fff1f2 0%, #ffffff 80%);
        border-color: #fecdd3;
    }

    .veracity-summary-card.v-summary-after {
        background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 80%);
        border-color: #bbf7d0;
    }

    .veracity-summary-card.v-summary-gain {
        background: linear-gradient(135deg, #eff6ff 0%, #ffffff 80%);
        border-color: #bfdbfe;
    }

    .veracity-summary-card.v-summary-critical {
        background: linear-gradient(135deg, #fff7ed 0%, #ffffff 80%);
        border-color: #fed7aa;
    }

    .veracity-table-wrap {
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        overflow: auto;
        background: #ffffff;
    }

    #veracityMetricsTable {
        border-collapse: separate;
        border-spacing: 0;
        min-width: 1450px;
        margin-bottom: 0 !important;
        color: #1e293b;
    }

    #veracityMetricsTable thead th {
        padding: 14px 12px;
        font-size: 13px;
        font-weight: 800;
        color: #0f172a;
        border-color: #e2e8f0;
        background: #f8fafc;
        vertical-align: middle;
        white-space: nowrap;
    }

    #veracityMetricsTable thead th.group-before {
        background: #fff1f2;
        color: #991b1b;
        border-bottom: 3px solid #ef4444;
    }

    #veracityMetricsTable thead th.group-after {
        background: #f0fdf4;
        color: #166534;
        border-bottom: 3px solid #22c55e;
    }

    #veracityMetricsTable thead th.group-gain {
        background: #eff6ff;
        color: #1d4ed8;
        border-bottom: 3px solid #2563eb;
    }

    #veracityMetricsTable thead th.group-status {
        background: #f8fafc;
        color: #334155;
        border-bottom: 3px solid #64748b;
    }

    #veracityMetricsTable tbody td {
        padding: 12px;
        border-color: #e2e8f0;
        vertical-align: middle;
        background: #ffffff;
    }

    #veracityMetricsTable tbody tr:hover td {
        background: #f8fafc;
    }

    #veracityMetricsTable .field-sticky {
        position: sticky;
        left: 0;
        z-index: 3;
        background: #ffffff;
        box-shadow: 8px 0 12px rgba(15, 23, 42, 0.04);
    }

    #veracityMetricsTable thead .field-sticky {
        background: #f8fafc;
        z-index: 5;
    }

    #veracityMetricsTable tbody tr:hover .field-sticky {
        background: #f8fafc;
    }

    .v-field-name {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 800;
        color: #0f172a;
    }

    .v-field-icon {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 13px;
        font-weight: 900;
        flex-shrink: 0;
    }

    .v-cell-before {
        background: #fffafa !important;
    }

    .v-cell-after {
        background: #fbfffc !important;
    }

    #veracityMetricsTable tbody tr:hover .v-cell-before,
    #veracityMetricsTable tbody tr:hover .v-cell-after {
        background: #f8fafc !important;
    }

    .v-metric {
        min-width: 190px;
    }

    .v-metric-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 9px;
    }

    .v-rate-badge {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 11px;
        border-radius: 999px;
        font-size: 15px;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .v-state-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
    }

    .v-rate-label {
        font-size: 11px;
        font-weight: 800;
        color: #64748b;
        white-space: nowrap;
    }

    .v-progress {
        width: 100%;
        height: 8px;
        background: #e5e7eb;
        border-radius: 999px;
        overflow: hidden;
        margin-bottom: 9px;
    }

    .v-progress-bar {
        display: block;
        height: 100%;
        border-radius: 999px;
    }

    .v-details {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-size: 12px;
        color: #475569;
    }

    .v-details strong {
        color: #0f172a;
        font-weight: 800;
    }

    .v-rate-badge.v-empty {
        background: #f1f5f9;
        color: #64748b;
    }

    .v-rate-badge.v-excellent {
        background: #dcfce7;
        color: #166534;
    }

    .v-rate-badge.v-good {
        background: #ecfccb;
        color: #3f6212;
    }

    .v-rate-badge.v-warning {
        background: #fef3c7;
        color: #92400e;
    }

    .v-rate-badge.v-danger {
        background: #ffedd5;
        color: #9a3412;
    }

    .v-rate-badge.v-critical {
        background: #b91c1c;
        color: #ffffff;
    }

    .v-progress-bar.v-empty {
        background: #cbd5e1;
    }

    .v-progress-bar.v-excellent {
        background: #22c55e;
    }

    .v-progress-bar.v-good {
        background: #84cc16;
    }

    .v-progress-bar.v-warning {
        background: #f59e0b;
    }

    .v-progress-bar.v-danger {
        background: #f97316;
    }

    .v-progress-bar.v-critical {
        background: #b91c1c;
    }

    .v-gain-pill {
        display: inline-flex;
        flex-direction: column;
        gap: 3px;
        min-width: 140px;
        padding: 9px 12px;
        border-radius: 14px;
        border: 1px solid transparent;
        font-weight: 800;
    }

    .v-gain-value {
        font-size: 15px;
        line-height: 1.1;
    }

    .v-gain-label {
        font-size: 11px;
        line-height: 1.1;
        opacity: 0.85;
    }

    .v-gain-strong {
        background: #dcfce7;
        color: #166534;
        border-color: #bbf7d0;
    }

    .v-gain-medium {
        background: #dbeafe;
        color: #1d4ed8;
        border-color: #bfdbfe;
    }

    .v-gain-low {
        background: #fef3c7;
        color: #92400e;
        border-color: #fde68a;
    }

    .v-gain-none {
        background: #f1f5f9;
        color: #475569;
        border-color: #cbd5e1;
    }

    .v-gain-bad {
        background: #fee2e2;
        color: #991b1b;
        border-color: #fecaca;
    }

    .v-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
    }

    .v-status-pill .v-status-dot {
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: currentColor;
    }

    .v-status-pill.v-empty {
        background: #f1f5f9;
        color: #64748b;
    }

    .v-status-pill.v-excellent {
        background: #dcfce7;
        color: #166534;
    }

    .v-status-pill.v-good {
        background: #ecfccb;
        color: #3f6212;
    }

    .v-status-pill.v-warning {
        background: #fef3c7;
        color: #92400e;
    }

    .v-status-pill.v-danger {
        background: #ffedd5;
        color: #9a3412;
    }

    .v-status-pill.v-critical {
        background: #fee2e2;
        color: #991b1b;
    }

    @media (max-width: 991.98px) {
        .veracity-summary-grid {
            grid-template-columns: repeat(2, minmax(160px, 1fr));
        }
    }

    @media (max-width: 575.98px) {
        .veracity-summary-grid {
            grid-template-columns: 1fr;
        }

        .veracity-dashboard-card {
            padding: 1rem !important;
        }
    }
	
	
	/* V2*/
	
    .dv-section {
        padding: 18px;
        margin-bottom: 24px;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        background: #ffffff;
    }

    .dv-section-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    .dv-section-kicker {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 11px;
        border-radius: 999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

    .dv-section-title {
        margin: 0;
        color: #0f172a;
        font-size: 20px;
        font-weight: 900;
        letter-spacing: -0.02em;
    }

    .dv-section-subtitle {
        margin-top: 4px;
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
    }

    .dv-kpi-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(180px, 1fr));
        gap: 14px;
        margin-bottom: 18px;
    }

    .dv-kpi-grid.dv-kpi-grid-3 {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .dv-kpi-card {
        position: relative;
        overflow: hidden;
        border-radius: 16px;
        padding: 15px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .dv-kpi-card::after {
        content: "";
        position: absolute;
        top: -28px;
        right: -28px;
        width: 82px;
        height: 82px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.05);
    }

    .dv-kpi-before {
        background: linear-gradient(135deg, #fff1f2 0%, #ffffff 80%);
        border-color: #fecdd3;
    }

    .dv-kpi-after {
        background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 80%);
        border-color: #bbf7d0;
    }

    .dv-kpi-evolution {
        background: linear-gradient(135deg, #eff6ff 0%, #ffffff 80%);
        border-color: #bfdbfe;
    }

    .dv-kpi-label {
        position: relative;
        z-index: 1;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 7px;
    }

    .dv-kpi-value {
        position: relative;
        z-index: 1;
        color: #0f172a;
        font-size: 25px;
        font-weight: 900;
        line-height: 1.1;
    }

    .dv-kpi-subtitle {
        position: relative;
        z-index: 1;
        margin-top: 6px;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }

    .dv-summary-evolution {
        position: relative;
        z-index: 1;
        display: inline-flex;
        flex-direction: column;
        gap: 3px;
        padding: 8px 11px;
        border-radius: 14px;
        border: 1px solid transparent;
        font-weight: 900;
    }

    .dv-summary-evolution span {
        font-size: 18px;
        line-height: 1.1;
    }

    .dv-summary-evolution small {
        font-size: 11px;
        line-height: 1.1;
        opacity: .85;
    }

    .dv-table-wrap {
        border: 0px solid #94a3b8;
        border-radius: 0px;
        overflow: auto;
        background: #ffffff;
    }

    .dv-table {
        border-collapse: separate;
        border-spacing: 0;
        min-width: 1200px;
        margin-bottom: 0 !important;
        color: #1e293b;
        border: 1px solid #94a3b8;
    }

    .dv-table thead th {
        padding: 12px;
        font-size: 13px;
        font-weight: 900;
        color: #0f172a;
        border: 1px solid #cbd5e1 !important;
        background: #f8fafc;
        vertical-align: middle;
        white-space: nowrap;
    }

    .dv-table tbody td {
        padding: 10px;
        border: 1px solid #eaedf0 !important;
        vertical-align: middle;
        background: #ffffff;
    }

    .dv-table tbody tr + tr td {
        border-top-color: #94a3b8a8 !important;
    }

    .dv-table thead tr:last-child th {
        border-bottom-color: #94a3b8a8 !important;
    }

    .dv-table tbody tr:hover td {
        background: #f8fafc;
    }

    .dv-table .field-sticky {
        position: sticky;
        left: 0;
        z-index: 3;
        background: #ffffff;
        box-shadow: 8px 0 12px rgba(15, 23, 42, 0.04);
    }

    .dv-table thead .field-sticky {
        background: #f8fafc;
        z-index: 5;
    }

    .dv-table tbody tr:hover .field-sticky {
        background: #f8fafc;
    }

    .dv-table .group-before {
        background: #fff1f2 !important;
        color: #991b1b !important;
        border-bottom: 3px solid #ef4444d4 !important;
    }

    .dv-table .group-after {
        background: #f0fdf4 !important;
        color: #166534 !important;
        border-bottom: 3px solid #22c55e !important;
    }

    .dv-table .v-cell-before {
        background: #fffafa !important;
    }

    .dv-table .v-cell-after {
        background: #fbfffc !important;
    }

    .dv-table tbody tr:hover .v-cell-before,
    .dv-table tbody tr:hover .v-cell-after {
        background: #f8fafc !important;
    }

    .dv-field-name {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 900;
        color: #0f172a;
        white-space: nowrap;
    }

    .dv-field-icon {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 900;
        flex-shrink: 0;
    }

    .dv-rate-cell,
    .dv-count-cell {
        min-width: 138px;
        text-align: center;
    }

    .dv-rate-badge,
    .dv-count-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 82px;
        padding: 7px 10px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .dv-before-badge {
        background: #f1f5f9;
        color: #475569;
    }

    .dv-after-badge {
        background: #e0f2fe;
        color: #075985;
    }

    .dv-dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
    }

    .dv-cell-caption {
        margin-top: 6px;
        color: #475569;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

    .dv-rate-badge.v-empty {
        background: #f1f5f9;
        color: #64748b;
    }

    .dv-rate-badge.v-excellent {
        background: #dcfce7;
        color: #166534;
    }

    .dv-rate-badge.v-good {
        background: #ecfccb;
        color: #3f6212;
    }

    .dv-rate-badge.v-warning {
        background: #fef3c7;
        color: #92400e;
    }

    .dv-rate-badge.v-danger {
        background: #ffedd5;
        color: #9a3412;
    }

    .dv-rate-badge.v-critical {
        background: #b91c1c;
        color: #ffffff;
    }

    .dv-corrected-evolution-cell {
        min-width: 158px;
    }

    .dv-evolution-badge {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 11px;
        border-radius: 14px;
        border: 1px solid transparent;
        font-weight: 900;
    }

    .dv-evolution-primary {
        width: 100%;
        min-width: 132px;
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    }

    .dv-evolution-badge span {
        font-size: 16px;
        line-height: 1.05;
        letter-spacing: -0.01em;
    }

    .dv-evolution-badge small {
        font-size: 11px;
        line-height: 1.1;
        opacity: .9;
        text-align: center;
    }

    .dv-after-muted-value {
        margin-top: 7px;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

    .dv-after-muted-value strong {
        color: #334155;
        font-weight: 900;
    }

    .v-evo-strong {
        background: #dcfce7;
        color: #166534;
        border-color: #86efac;
    }

    .v-evo-clear {
        background: #dbeafe;
        color: #1d4ed8;
        border-color: #93c5fd;
    }

    .v-evo-minor {
        background: #fef3c7;
        color: #92400e;
        border-color: #fcd34d;
    }

    .v-evo-regression {
        background: #fee2e2;
        color: #991b1b;
        border-color: #fca5a5;
    }

    .v-evo-neutral {
        background: #f1f5f9;
        color: #475569;
        border-color: #cbd5e1;
    }

    .dv-table-note {
        margin-top: 10px;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
    }

    @media (max-width: 1199.98px) {
        .dv-kpi-grid,
        .dv-kpi-grid.dv-kpi-grid-3 {
            grid-template-columns: repeat(2, minmax(160px, 1fr));
        }
    }

    @media (max-width: 575.98px) {
        .dv-kpi-grid,
        .dv-kpi-grid.dv-kpi-grid-3 {
            grid-template-columns: 1fr;
        }

        .veracity-dashboard-card {
            padding: 1rem !important;
        }
    }
/***PMF AI TRAINING DASHBOARD VERACITY***/
/***PMF AI TRAINING DASHBOARD VALIDITY***/

    .invalidity-dashboard-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
    }

    .invalidity-title-block h5 {
        color: #0f172a;
        letter-spacing: -0.02em;
    }

    .invalidity-title-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 12px;
        border-radius: 999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 700;
    }

    .invalidity-title-pill::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    }

    .invalidity-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(160px, 1fr));
        gap: 14px;
    }

    .invalidity-summary-card {
        position: relative;
        overflow: hidden;
        border-radius: 16px;
        padding: 16px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .invalidity-summary-card::after {
        content: "";
        position: absolute;
        top: -32px;
        right: -32px;
        width: 92px;
        height: 92px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.05);
    }

    .invalidity-summary-label {
        position: relative;
        z-index: 1;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 6px;
    }

    .invalidity-summary-value {
        position: relative;
        z-index: 1;
        color: #0f172a;
        font-size: 25px;
        font-weight: 900;
        line-height: 1.1;
    }

    .invalidity-summary-subtitle {
        position: relative;
        z-index: 1;
        margin-top: 6px;
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
    }

    .invalidity-summary-before {
        background: linear-gradient(135deg, #fff1f2 0%, #ffffff 80%);
        border-color: #fecdd3;
    }

    .invalidity-summary-after {
        background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 80%);
        border-color: #bbf7d0;
    }

    .invalidity-summary-gain {
        background: linear-gradient(135deg, #eff6ff 0%, #ffffff 80%);
        border-color: #bfdbfe;
    }

    .invalidity-summary-usage {
        background: linear-gradient(135deg, #f8fafc 0%, #ffffff 80%);
        border-color: #cbd5e1;
    }

    .invalidity-table-wrap {
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        overflow: auto;
        background: #ffffff;
    }

    #fieldsMetricsTable {
        border-collapse: separate;
        border-spacing: 0;
        min-width: 1800px;
        margin-bottom: 0 !important;
        color: #1e293b;
    }

    #fieldsMetricsTable thead th {
        padding: 13px 12px;
        font-size: 13px;
        font-weight: 900;
        color: #0f172a;
        border-color: #e2e8f0;
        background: #f8fafc;
        vertical-align: middle;
        white-space: nowrap;
    }

    #fieldsMetricsTable tbody td {
        padding: 7px;
        border-color: #e2e8f0;
        vertical-align: middle;
        background: #ffffff;
    }

    #fieldsMetricsTable tbody tr:hover td {
        background: #f8fafc;
    }

    #fieldsMetricsTable .field-sticky {
        position: sticky;
        left: 0;
        z-index: 3;
        background: #ffffff;
        box-shadow: 8px 0 12px rgba(15, 23, 42, 0.04);
    }

    #fieldsMetricsTable thead .field-sticky {
        background: #f8fafc;
        z-index: 5;
    }

    #fieldsMetricsTable tbody tr:hover .field-sticky {
        background: #f8fafc;
    }

    .iv-group-na {
        background: #eff6ff !important;
        color: #1d4ed8 !important;
        border-bottom: 3px solid #2563eb !important;
        text-align: center;
    }

    .iv-group-overall {
        background: #fff1f2 !important;
        color: #991b1b !important;
        border-bottom: 3px solid #ef4444 !important;
        text-align: center;
    }

    .iv-group-required {
        background: #fefce8 !important;
        color: #854d0e !important;
        border-bottom: 3px solid #eab308 !important;
        text-align: center;
    }

    .iv-group-reference {
        background: #f0fdf4 !important;
        color: #166534 !important;
        border-bottom: 3px solid #22c55e !important;
        text-align: center;
    }

    .iv-group-format {
        background: #fff7ed !important;
        color: #9a3412 !important;
        border-bottom: 3px solid #f97316 !important;
        text-align: center;
    }

    .iv-group-gain {
        background: #eef2ff !important;
        color: #3730a3 !important;
        border-bottom: 3px solid #4f46e5 !important;
        text-align: center;
    }

    .iv-group-status {
        background: #f8fafc !important;
        color: #334155 !important;
        border-bottom: 3px solid #64748b !important;
        text-align: center;
    }

    .iv-group-usage {
        background: #f1f5f9 !important;
        color: #334155 !important;
        border-bottom: 3px solid #94a3b8 !important;
        text-align: center;
    }

    .iv-sub-before {
        background: #fffafa !important;
        color: #7f1d1d !important;
        font-size: 12px !important;
        text-align: center;
    }

    .iv-sub-after {
        background: #fbfffc !important;
        color: #14532d !important;
        font-size: 12px !important;
        text-align: center;
    }

    .iv-before-cell {
        background: #fffafa !important;
    }

    .iv-after-cell {
        background: #fbfffc !important;
    }

    .iv-pair-end {
        border-right: 2px solid #cbd5e1 !important;
    }

    #fieldsMetricsTable tbody tr:hover .iv-before-cell,
    #fieldsMetricsTable tbody tr:hover .iv-after-cell {
        background: #f8fafc !important;
    }

    .iv-field-name {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 900;
        color: #0f172a;
        white-space: nowrap;
    }

    .iv-field-icon {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 900;
        flex-shrink: 0;
    }

    .iv-rate-cell {
        min-width: 118px;
        text-align: center;
    }

    .iv-before-rate {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 76px;
        padding: 7px 10px;
        border-radius: 999px;
        background: #f1f5f9;
        color: #475569;
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
    }

    .iv-rate-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 76px;
        padding: 7px 10px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .iv-rate-dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
    }

    .iv-after-label {
        margin-top: 7px;
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }

    .iv-rate-count {
        margin-top: 5px;
        color: #475569;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

    .iv-rate-badge.iv-empty,
    .iv-status-pill.iv-empty {
        background: #f1f5f9;
        color: #64748b;
    }

    .iv-rate-badge.iv-excellent,
    .iv-status-pill.iv-excellent {
        background: #dcfce7;
        color: #166534;
    }

    .iv-rate-badge.iv-good,
    .iv-status-pill.iv-good {
        background: #ecfccb;
        color: #3f6212;
    }

    .iv-rate-badge.iv-warning,
    .iv-status-pill.iv-warning {
        background: #fef3c7;
        color: #92400e;
    }

    .iv-rate-badge.iv-danger,
    .iv-status-pill.iv-danger {
        background: #ffedd5;
        color: #9a3412;
    }

    .iv-rate-badge.iv-critical,
    .iv-status-pill.iv-critical {
        background: #fee2e2;
        color: #991b1b;
    }

    .iv-gain-pill {
        display: inline-flex;
        flex-direction: column;
        gap: 3px;
        min-width: 145px;
        padding: 9px 12px;
        border-radius: 14px;
        border: 1px solid transparent;
        font-weight: 900;
    }

    .iv-gain-pill.iv-gain-strong {
        background: #dcfce7;
        color: #166534;
        border-color: #bbf7d0;
    }

    .iv-gain-pill.iv-gain-medium {
        background: #dbeafe;
        color: #1d4ed8;
        border-color: #bfdbfe;
    }

    .iv-gain-pill.iv-gain-low {
        background: #fef3c7;
        color: #92400e;
        border-color: #fde68a;
    }

    .iv-gain-pill.iv-gain-none {
        background: #f1f5f9;
        color: #475569;
        border-color: #cbd5e1;
    }

    .iv-gain-pill.iv-gain-bad {
        background: #fee2e2;
        color: #991b1b;
        border-color: #fecaca;
    }

    .iv-gain-value {
        font-size: 14px;
        line-height: 1.1;
    }

    .iv-gain-label {
        font-size: 11px;
        line-height: 1.1;
        opacity: 0.85;
    }

    .iv-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
    }

    .iv-status-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: currentColor;
    }

    .iv-usage-pill {
        display: inline-flex;
        flex-direction: column;
        gap: 3px;
        min-width: 112px;
        padding: 9px 11px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #334155;
    }

    .iv-usage-pill strong {
        font-size: 13px;
        line-height: 1.1;
        font-weight: 900;
    }

    .iv-usage-pill span {
        font-size: 11px;
        color: #64748b;
        font-weight: 700;
    }

    @media (max-width: 1199.98px) {
        .invalidity-summary-grid {
            grid-template-columns: repeat(3, minmax(160px, 1fr));
        }
    }

    @media (max-width: 767.98px) {
        .invalidity-summary-grid {
            grid-template-columns: repeat(2, minmax(150px, 1fr));
        }
    }

    @media (max-width: 575.98px) {
        .invalidity-summary-grid {
            grid-template-columns: 1fr;
        }

        .invalidity-dashboard-card {
            padding: 1rem !important;
        }
    }
/***PMF AI TRAINING DASHBOARD VALIDITY***/


/***PMF AI ADMINISTRATION DASHBOARD VALIDITY***/
.admin-layout{display:flex;margin:0 auto;padding:1rem 1.5rem;gap:2rem;}
.admin-sidebar{width:350px;flex-shrink:0;}
.admin-sidebar nav{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-lg);overflow:hidden;position:sticky;top:6rem;}
.admin-sidebar nav a{display:flex;align-items:center;gap:.75rem;padding:.85rem 1.25rem;color:var(--gray-600);font-size:1rem;font-weight:500;border-bottom:1px solid var(--gray-100); transition:var(--transition);}
.admin-sidebar nav a:last-child{border-bottom:none;}
.admin-sidebar nav a:hover,.admin-sidebar nav a.active{background:var(--primary-bg);color:var(--primary);}
.admin-sidebar nav a.active{font-weight:600;}
.admin-content{flex:1;min-width:0;}
@media(max-width:768px){.admin-layout{flex-direction:column;}.admin-sidebar{width:100%;}}

.stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.75rem;margin-bottom:1.5rem;}
.stat-mini{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius);padding:1rem;text-align:center;}
.stat-mini .v{font-size:1.35rem;font-weight:800;color:var(--dark);}
.stat-mini .l{font-size:.75rem;color:var(--gray-500);}

.filter-bar{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem;align-items:center;}
.filter-bar input,.filter-bar select{width:auto;min-width:150px;}

.table-wrap{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-lg);overflow-x:auto;}
table{width:100%;border-collapse:collapse;}
th{background:var(--gray-50);padding:.75rem 1rem;text-align:left;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--gray-500);border-bottom:1px solid var(--gray-200);white-space:nowrap;}
td{padding:.75rem 1rem;font-size:.9rem;color:var(--gray-700);border-bottom:1px solid var(--gray-100);vertical-align:middle;}
tr:last-child td{border-bottom:none;}
tr:hover td{background:var(--gray-50);}
.user-cell{display:flex;align-items:center;gap:.75rem;}
.avatar-sm{width:2.25rem;height:2.25rem;border-radius:50%;background:linear-gradient(135deg,var(--primary),var(--primary-light));color:#fff;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;flex-shrink:0;}

.badge{display:inline-flex;align-items:center;padding:.2rem .6rem;border-radius:var(--radius-full);font-size:.75rem;font-weight:600;}
.badge-active{background:#f0fdf4;color:#166534}
.badge-disabled{background:#f1f5f9;color:#475569}
.badge-suspended{background:#fffbeb;color:#92400e}
.badge-pending{background:#eef2ff;color:#4338ca}
.badge-locked{background:#fef2f2;color:#991b1b}
.badge-approved{background:#f0fdf4;color:#166534}
.badge-rejected{background:#fef2f2;color:#991b1b}

.pagination{display:flex;justify-content:center;gap:.5rem;padding:1.5rem;}
.pagination a,.pagination span{padding:.4rem .85rem;border:1px solid var(--gray-200);border-radius:var(--radius);font-size:.85rem;transition:var(--transition);}
.pagination a:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-bg);}
.pagination .active{background:var(--primary);color:#fff;border-color:var(--primary);}
.bulk-bar{display:flex;gap:.75rem;align-items:center;padding:.75rem 1rem;background:var(--gray-50);border-bottom:1px solid var(--gray-200);}
.bulk-bar select{width:auto;min-width:120px;}


.form-card{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-xl);overflow:hidden;}
.form-card .form-body{padding:2rem;}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem; padding:1rem}

.edit-cover{height:100px;background:linear-gradient(135deg,var(--primary),var(--primary-light));}
.edit-body{padding:0 2rem 2rem;margin-top:-2rem;}
.edit-avatar{width:4rem;height:4rem;border-radius:50%;background:linear-gradient(135deg,var(--primary),var(--primary-light));color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.5rem;font-weight:700;border:4px solid var(--white);box-shadow:var(--shadow-lg);margin-bottom:1rem;}

table{width:100%;border-collapse:collapse;}
th{background:var(--gray-50);padding:.75rem 1rem;text-align:left;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--gray-500);border-bottom:1px solid var(--gray-200);white-space:nowrap;}
td{padding:.75rem 1rem;font-size:.9rem;color:var(--gray-700);border-bottom:1px solid var(--gray-100);vertical-align:middle;}
tr:last-child td{border-bottom:none;}
tr:hover td{background:var(--gray-50);}
.action-tag{display:inline-flex;align-items:center;gap:.3rem;padding:.25rem .6rem;border-radius:var(--radius-full);font-size:.75rem;font-weight:600;}
.action-tag.create{background:#eef2ff;color:#4338ca}
.action-tag.suspend{background:#fffbeb;color:#92400e}
.action-tag.delete{background:#fef2f2;color:#991b1b}
.action-tag.activate{background:#f0fdf4;color:#166534}
.action-tag.lock{background:#fdf4ff;color:#9333ea}

.roles-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:1.5rem;}
.role-card{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-lg);overflow:hidden;transition:var(--transition);}
.role-card:hover{border-color:var(--primary-light);box-shadow:var(--shadow-md);}
.role-header{padding:1.25rem;border-bottom:1px solid var(--gray-200);display:flex;align-items:center;gap:1rem;}
.role-icon{width:2.5rem;height:2.5rem;border-radius:var(--radius);display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:800;}
.role-title{font-weight:700;color:var(--dark);}
.role-desc{font-size:.85rem;color:var(--gray-500);}
.role-body{padding:1.25rem;}
.perm-item{display:flex;align-items:center;gap:.5rem;padding:.35rem 0;font-size:.85rem;color:var(--gray-600);}
.perm-item svg{flex-shrink:0;}
.empty-perms{padding:.5rem 0;color:var(--gray-400);font-size:.85rem;font-style:italic;}
.role-footer{padding:.75rem 1.25rem;border-top:1px solid var(--gray-200);display:flex;flex-wrap:wrap;gap:.35rem;font-size:.85rem;}
.role-meta{display:flex;align-items:center;gap:1rem;padding:.5rem 1.25rem;font-size:.8rem;color:var(--gray-500);border-top:1px solid var(--gray-100);}
.role-meta span{display:flex;align-items:center;gap:.3rem;}

.perm-section{margin-top:1.5rem;}
.perm-section h3{font-size:1rem;font-weight:700;color:var(--dark);margin-bottom:.75rem;padding-bottom:.5rem;border-bottom:1px solid var(--gray-200);}
.perm-group{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.5rem;}
.perm-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border:1px solid var(--gray-100);border-radius:var(--radius);font-size:.85rem;color:var(--gray-700);transition:var(--transition);cursor:pointer;}
.perm-item:hover{border-color:var(--primary-light);background:var(--primary-bg);}
.perm-item input{accent-color:var(--primary);width:1rem;height:1rem;}

.perm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:.75rem;}
.perm-card{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius);padding:1rem;display:flex;align-items:center;gap:.75rem;transition:var(--transition);cursor:pointer;}
.perm-card:hover{border-color:var(--primary-light);box-shadow:var(--shadow-sm);}
.perm-card.checked{border-color:var(--primary);background:var(--primary-bg);}
.perm-card input{accent-color:var(--primary);width:1.1rem;height:1.1rem;}
.perm-card .perm-info strong{font-size:.9rem;color:var(--dark);display:block;}
.perm-card .perm-info small{color:var(--gray-400);font-size:.8rem;}


@media(max-width:768px){.admin-layout{flex-direction:column;}.admin-sidebar{width:100%;}.form-row{grid-template-columns:1fr;}}


/* ===== Toast Notifications ===== */
.fb-toast-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.fb-toast-top-right {
    top: 1.25rem;
    right: 1.25rem;
}

.fb-toast-top-left {
    top: 1.25rem;
    left: 1.25rem;
}

.fb-toast-bottom-right {
    bottom: 1.25rem;
    right: 1.25rem;
}

.fb-toast-bottom-left {
    bottom: 1.25rem;
    left: 1.25rem;
}

.fb-toast-top-center {
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(500px, calc(100vw - 2.5rem));
}

.fb-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--gray-300);
    pointer-events: auto;
    transition: box-shadow 0.2s ease;
    max-width: 100%;
}

.fb-toast:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fb-toast-success {
    border-left-color: var(--success);
}
.fb-toast-success .fb-toast-icon { color: var(--success); }

.fb-toast-error {
    border-left-color: var(--danger);
}
.fb-toast-error .fb-toast-icon { color: var(--danger); }

.fb-toast-warning {
    border-left-color: var(--warning);
}
.fb-toast-warning .fb-toast-icon { color: var(--warning); }

.fb-toast-info {
    border-left-color: var(--info);
}
.fb-toast-info .fb-toast-icon { color: var(--info); }

.fb-toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.fb-toast-body {
    flex: 1;
    min-width: 0;
}

.fb-toast-message {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--gray-800);
    word-break: break-word;
}

.fb-toast-action {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
    transition: var(--transition);
    display: inline-block;
    font-family: inherit;
}

.fb-toast-action:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.fb-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--gray-400);
    transition: var(--transition);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.fb-toast-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

/* Toast animations */
@keyframes fbToastIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fbToastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
}

.fb-toast-enter {
    animation: fbToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fb-toast-leave {
    animation: fbToastOut 0.25s ease-in forwards;
}

/* Toast left-position animations */
.fb-toast-top-left .fb-toast-enter {
    animation-name: fbToastInLeft;
}
.fb-toast-top-left .fb-toast-leave {
    animation-name: fbToastOutLeft;
}

@keyframes fbToastInLeft {
    from { opacity: 0; transform: translateX(-100%) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes fbToastOutLeft {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(-100%) scale(0.95); }
}


/* ===== Modal / Dialog ===== */
.fb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fb-modal-open {
    opacity: 1;
    visibility: visible;
}

.fb-modal-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    max-width: 440px;
    width: 100%;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.fb-modal-open .fb-modal-box {
    transform: scale(1) translateY(0);
}

.fb-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem 1.5rem 0.5rem;
}

.fb-modal-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-modal-danger .fb-modal-icon {
    background: #fef2f2;
    color: var(--danger);
}
.fb-modal-warning .fb-modal-icon {
    background: #fffbeb;
    color: var(--warning);
}
.fb-modal-default .fb-modal-icon {
    background: var(--primary-bg);
    color: var(--primary);
}

.fb-modal-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 0.2rem;
}

.fb-modal-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.fb-modal-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.fb-modal-body {
    padding: 0.75rem 1.5rem 1rem;
}

.fb-modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-600);
}

.fb-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
}

/* ===== Spinner ===== */
.fb-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: fbSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.25rem;
}

@keyframes fbSpin {
    to { transform: rotate(360deg); }
}

/* Button loading state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Countdown progress bar on toasts ===== */
.fb-toast-bar-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-100);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.fb-toast-bar {
    height: 100%;
    width: 100%;
    border-radius: 0 0 0 var(--radius-lg);
    transition: none; /* set by JS */
}

.fb-toast-bar-success { background: var(--success); }
.fb-toast-bar-error { background: var(--danger); }
.fb-toast-bar-warning { background: var(--warning); }
.fb-toast-bar-info { background: var(--info); }

.fb-toast-time {
    position: absolute;
    right: 0.5rem;
    bottom: 0.2rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.02em;
    line-height: 1;
}

/* ===== Undo button on toasts ===== */
.fb-toast-undo-row {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.5rem;
}

.fb-toast-undo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.fb-toast-undo-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--dark);
}

.fb-toast-undo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast with undo has extra bottom padding for the bar */
.fb-toast-undoable {
    padding-bottom: 1.5rem;
}

/* ===== Remove animation (for data-remove) ===== */
.fb-remove {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(20px);
}

/* ===== Form validation helpers ===== */
.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* ===== Flash data container (hidden) ===== */
#fb-flash-data {
    display: none;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/***PMF AI ADMINISTRATION DASHBOARD VALIDITY***/