/* ==========================================================================
   components.css — VERSION ÉLAGUÉE POUR LE PORTAIL CLIENT (audit design 22/07/2026)
   Copie du backoffice FACTUREX dont les composants jamais rendus par le
   portail ont été retirés : .dashboard-header/-title/-subtitle, .filters-card,
   .stat-card, .nav-tabs-type (+ .type-tab*), .rule-card (+ scope-*).
   NE PAS resynchroniser ce fichier tel quel depuis le backoffice sans
   ré-élaguer.
   ========================================================================== */

/* ==========================================
   6. PAGE HEADERS
   ========================================== */

.page-header {
    background: var(--ece-gray-light);
    color: var(--ece-purple-dark);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--ece-purple-dark);
}

.page-subtitle {
    opacity: 0.7;
    margin: 0 0 0 1rem;
    font-size: 0.85rem;
    color: var(--ece-purple-dark);
}

/* Client Filter Indicator */
.client-filter-indicator {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    color: white;
    padding: 10px 20px;
    margin: 15px 0;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(28, 19, 60, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-filter-indicator strong {
    font-size: 1.1rem;
}

.client-filter-indicator .btn-close {
    filter: brightness(0) invert(1);
}

/* ==========================================
   7. CARDS
   ========================================== */

.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Card Header Variants */
.card-header-primary {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    color: white;
}

.card-header-success {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    color: var(--ece-purple-dark);
}

.card-header-danger {
    background: linear-gradient(135deg, var(--ece-danger) 0%, var(--ece-danger-dark) 100%);
    color: white;
}

.card-header-light {
    background: white;
    color: var(--ece-purple-dark);
    border-bottom: 2px solid #f0f0f0;
}

/* Table in Card - keep purple header */
.card .table-modern thead th:first-child,
.card .table-modern thead th:last-child {
    border-radius: 0;
}

/* Modern Card */
.modern-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.modern-card .card-header {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: white;
}

.modern-card .card-header i {
    color: white !important;
}

/* Chart Card */
.chart-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    background-color: white;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.chart-card .card-header {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chart-card .card-header h2 {
    margin: 0;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.chart-card .card-header h2 i {
    color: white !important;
}

.chart-card .card-body {
    padding: 1.5rem;
}

/* Chart Containers */
.chart-container {
    height: 320px;
    width: 100%;
}

.chart-container-sm {
    height: 300px;
    width: 100%;
}

.chart-container-pie {
    height: 320px;
    width: 100%;
    max-width: 320px;
}

/* Form Elements */
.select-exercice {
    min-width: 280px;
}

/* ==========================================
   8. KPI CARDS
   ========================================== */

.kpi-card {
    border: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    /* Remplit la colonne : les tuiles d'une même rangée gardent la même
       hauteur même quand certaines portent la ligne N-1 (kpi-compare) et
       d'autres non (ex. « Dernière écriture »). */
    height: 100%;
}

.kpi-card:hover {
    box-shadow: var(--shadow-lg) !important;
}

.kpi-card .card-body {
    padding: 1.5rem;
    color: white;
    position: relative;
    z-index: 1;
}

.kpi-icon {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 0;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.kpi-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* ==========================================
   9. BUTTONS
   ========================================== */

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-dark) 100%);
}

/* ECE Primary Button */
.btn-ece-primary {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(28, 19, 60, 0.25);
}

.btn-ece-primary:hover {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-dark) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 19, 60, 0.35);
}

.btn-ece-primary:active {
    transform: translateY(0);
}

/* ECE Success Button */
.btn-ece-success {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    border: none;
    color: var(--ece-purple-dark);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(182, 165, 77, 0.25);
}

.btn-ece-success:hover {
    background: linear-gradient(135deg, var(--ece-gold-light) 0%, var(--ece-gold) 100%);
    color: var(--ece-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 165, 77, 0.35);
}

/* Outline Buttons */
.btn-ece-outline-primary {
    background: transparent;
    border: 2px solid var(--ece-purple);
    color: var(--ece-purple);
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.btn-ece-outline-primary:hover {
    background: var(--ece-purple);
    color: white;
}

.btn-ece-outline-success {
    background: transparent;
    border: 2px solid var(--ece-gold);
    /* texte en or FONCÉ : l'or de marque est illisible sur blanc (2,5:1) */
    color: var(--ece-gold-dark);
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.btn-ece-outline-success:hover {
    background: var(--ece-gold);
    color: var(--ece-purple-dark);
}

/* ECE Danger Button */
.btn-ece-danger {
    background: linear-gradient(135deg, var(--ece-danger-dark) 0%, var(--ece-danger) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25);
}

.btn-ece-danger:hover {
    background: linear-gradient(135deg, var(--ece-danger) 0%, var(--ece-danger-dark) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.35);
}

.btn-ece-danger:active {
    transform: translateY(0);
}

.btn-ece-outline-danger {
    background: transparent;
    border: 2px solid var(--ece-danger);
    color: var(--ece-danger);
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.btn-ece-outline-danger:hover {
    background: var(--ece-danger);
    color: white;
}

/* ECE Warning Button */
.btn-ece-warning {
    background: linear-gradient(135deg, var(--ece-warning) 0%, var(--ece-warning-light) 100%);
    border: none;
    /* texte foncé : blanc sur orange ne fait que 2,8:1 */
    color: var(--ece-purple-dark);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.25);
}

.btn-ece-warning:hover {
    background: linear-gradient(135deg, var(--ece-warning-light) 0%, var(--ece-warning) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.35);
}

.btn-ece-warning:active {
    transform: translateY(0);
}

.btn-ece-outline-warning {
    background: transparent;
    border: 2px solid var(--ece-warning);
    color: var(--ece-warning-dark);
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.btn-ece-outline-warning:hover {
    background: var(--ece-warning);
    color: var(--ece-purple-dark);
}

/* Les alias .btn-gradient-* ont été SUPPRIMÉS le 22/07 —
   système unique .btn-ece-* (templates migrés). */

/* ==========================================
   9b. TAILLES DES BOUTONS — calibrées au pixel (planche 23/07)
   Deux hauteurs dans toute l'application :
     normale = 40 px (toolbars, formulaires, modals, en-têtes de page)
     sm      = 32 px (lignes de tableau, actions inline denses)
   btn-lg est INTERDIT hors écrans d'authentification (garde-fou
   test_design_tokens). Les paddings compensent la bordure 2 px des
   variantes outline pour une hauteur commune.
   NE PAS DÉPLACER : les règles .btn-sm doivent rester déclarées APRÈS
   les variantes ci-dessus (même spécificité, le dernier gagne).
   ========================================== */

.btn-secondary,
.btn-outline-secondary {
    padding-top: 0.4375rem;
    padding-bottom: 0.4375rem;
}

.btn-ece-primary.btn-sm,
.btn-ece-success.btn-sm,
.btn-ece-danger.btn-sm,
.btn-ece-warning.btn-sm {
    padding: 0.34375rem 0.65rem;
}

.btn-ece-outline-primary.btn-sm,
.btn-ece-outline-success.btn-sm,
.btn-ece-outline-danger.btn-sm,
.btn-ece-outline-warning.btn-sm,
.btn-ece-outline-info.btn-sm {
    padding: 0.21875rem 0.65rem;
}

.btn-secondary.btn-sm,
.btn-outline-secondary.btn-sm {
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
}

/* ==========================================
   10. TABLES
   ========================================== */

.table-hover tbody tr:hover {
    background-color: #f0f2ff;
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: var(--ece-gray-light);
    color: var(--ece-purple-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center !important;
}

.table-modern thead th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.table-modern thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    background: white;
}

.table-modern tbody tr:hover {
    background: #f8f9ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-modern tbody td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    text-align: center !important;
}

/* ==========================================
   11. BADGES
   ========================================== */

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

.badge-modern {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ECE Badges — noms uniques (anciens alias badge-ece-vente,
   badge-type-xxx et badge-scope-xxx supprimés le 22/07, aucun usage
   portail). NB : ne jamais écrire une étoile suivie d'un slash dans
   un commentaire CSS — cela le referme et fait sauter la règle. */
.badge-vente {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-light) 100%);
    color: white;
    font-weight: 600;
}

.badge-achat {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    color: var(--ece-purple-dark);
    font-weight: 600;
}

.badge-cabinet {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    color: white;
    font-weight: 600;
}

.badge-client {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    /* purple-dark et non blanc : contraste AA sur fond or (aligné backoffice 22/07) */
    color: var(--ece-purple-dark);
    font-weight: 600;
}

.badge-ece-success {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    color: var(--ece-purple-dark);
    font-weight: 600;
}

.badge-ece-warning {
    background: var(--ece-gold-lighter);
    color: var(--ece-purple-dark);
    font-weight: 600;
}

.badge-ece-info {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-light) 100%);
    color: white;
    font-weight: 600;
}

/* Badges plein purple ECE (variantes pour profil client) */
.badge-ece-purple {
    background: var(--ece-purple);
    color: white;
    font-weight: 600;
}

.badge-ece-purple-dark {
    background: var(--ece-purple-dark);
    color: white;
    font-weight: 600;
}

.badge-ece-neutral {
    background: var(--ece-gray-200);
    color: var(--ece-purple-dark);
    font-weight: 600;
    border: 1px solid var(--ece-gray-300);
}

/* ==========================================
   12. AVATARS
   ========================================== */

.avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.avatar-gold {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    color: var(--ece-purple-dark);
}

.avatar-purple {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    color: white;
}

.avatar-gray {
    background: linear-gradient(135deg, var(--ece-gray-600) 0%, #adb5bd 100%);
    color: white;
}

/* ==========================================
   13. MODALS
   ========================================== */

.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header-primary,
.modal-header-ece-primary {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    color: white;
}

.modal-header-success,
.modal-header-ece-success {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%);
    color: var(--ece-purple-dark);
}

.modal-header-danger {
    background: linear-gradient(135deg, var(--ece-danger) 0%, var(--ece-danger-dark) 100%);
    color: white;
}

.modal-header-info,
.modal-header-ece-info {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-light) 100%);
    color: white;
}

.modal-header-primary .btn-close,
.modal-header-ece-primary .btn-close,
.modal-header-danger .btn-close,
.modal-header-info .btn-close,
.modal-header-ece-info .btn-close {
    filter: brightness(0) invert(1);
}

/* ==========================================
   14. PAGINATION
   ========================================== */

.pagination-modern .page-link {
    border-radius: var(--radius-sm);
    margin: 0 4px;
    border: none;
    color: var(--ece-purple-dark);
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination-modern .page-link:hover {
    background: var(--ece-purple);
    color: white;
    transform: translateY(-2px);
}

.pagination-modern .page-item.active .page-link {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%);
    border: none;
}

/* ==========================================
   15. EMPTY STATES
   ========================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.empty-state-icon {
    font-size: 5rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.empty-state-icon i {
    color: #b0b8c4;
    font-size: 4rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-state h5 {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #718096;
    font-size: 1.05rem;
}

.empty-state p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.empty-state .btn {
    margin-top: 1.5rem;
}

/* Empty State Container (Full Page) */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 3rem;
}

.empty-state-container .empty-state-icon {
    font-size: 8rem;
    animation: pulse 2s ease-in-out infinite;
}

.empty-state-container .empty-state-title {
    font-size: 2rem;
    color: var(--ece-text-dark);
    margin-bottom: 1rem;
}

.empty-state-message {
    font-size: 1.25rem;
    color: #5a6577;
    max-width: 600px;
    margin-bottom: 2rem;
}

.empty-state-instruction {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--ece-gold);
    box-shadow: var(--shadow-md);
}

.empty-state-instruction i {
    font-size: 2rem;
    color: var(--ece-gold);
}

.empty-state-instruction-text {
    text-align: left;
    color: var(--ece-text-dark);
    font-size: 1.1rem;
}

.empty-state-instruction strong {
    color: var(--ece-purple-dark);
}

/* ==========================================
   16. SEARCH BOX
   ========================================== */

.search-box {
    position: relative;
}

.search-box input {
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: var(--ece-gold);
    box-shadow: 0 0 0 3px rgba(182, 165, 77, 0.2);
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

/* ==========================================
   18. TOAST NOTIFICATIONS
   ========================================== */

.toast-ece-success {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%) !important;
    color: var(--ece-purple-dark) !important;
}

.toast-ece-success .btn-close {
    filter: invert(0.2);
}

.toast-ece-error,
.toast-ece-danger {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%) !important;
    color: white !important;
}

.toast-ece-warning,
.toast-ece-info {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-light) 100%) !important;
    color: white !important;
}

/* ==========================================
   19. ALERTS
   ========================================== */

.alert-ece-success {
    background: linear-gradient(135deg, rgba(182, 165, 77, 0.15) 0%, rgba(212, 196, 112, 0.15) 100%);
    border: 1px solid var(--ece-gold);
    color: var(--ece-purple-dark);
    border-radius: var(--radius-md);
}

.alert-ece-warning {
    background: rgba(182, 165, 77, 0.1);
    border: 1px solid var(--ece-gold-lighter);
    color: var(--ece-purple-dark);
    border-radius: var(--radius-md);
}

.alert-ece-info {
    background: linear-gradient(135deg, rgba(45, 32, 86, 0.1) 0%, rgba(61, 48, 112, 0.1) 100%);
    border: 1px solid var(--ece-purple);
    color: var(--ece-purple-dark);
    border-radius: var(--radius-md);
}

/* ==========================================
   21. UTILITY CLASSES
   ========================================== */

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Text Truncate with Width */
.text-truncate-200 {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-250 {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-300 {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Opacity */
.opacity-90 {
    opacity: 0.9;
}

/* Width */
.w-50px {
    width: 50px;
}

/* Background Colors */
.bg-ece-primary {
    background: linear-gradient(135deg, var(--ece-purple-dark) 0%, var(--ece-purple) 100%) !important;
    color: white !important;
}

.bg-ece-success {
    background: linear-gradient(135deg, var(--ece-gold) 0%, var(--ece-gold-light) 100%) !important;
    color: var(--ece-purple-dark) !important;
}

.bg-ece-info {
    background: linear-gradient(135deg, var(--ece-purple) 0%, var(--ece-purple-light) 100%) !important;
    color: white !important;
}

.bg-ece-warning {
    background: linear-gradient(135deg, var(--ece-gold-lighter) 0%, var(--ece-gold-light) 100%) !important;
    color: var(--ece-purple-dark) !important;
}

/* Text Colors */
.text-ece-primary {
    color: var(--ece-purple) !important;
}

.text-ece-success,
.text-ece-gold {
    color: var(--ece-gold) !important;
}

.text-ece-warning {
    color: var(--ece-gold-lighter) !important;
}

.text-ece-info {
    color: var(--ece-purple-light) !important;
}

/* Border Colors */
.border-ece-primary {
    border-color: var(--ece-purple) !important;
}

.border-ece-success {
    border-color: var(--ece-gold) !important;
}

.border-ece-warning {
    border-color: var(--ece-gold-lighter) !important;
}

.border-ece-info {
    border-color: var(--ece-purple-light) !important;
}

/* PDF Viewer */
.pdf-viewer {
    width: 100%;
    height: 600px;
    border: none;
}

/* ==========================================
   22. SPINNER & LOADING
   ========================================== */

.spinner-modern {
    border: 3px solid rgba(45, 32, 86, 0.2);
    border-top-color: var(--ece-purple);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

/* ==========================================
   23. HTMX STYLES
   ========================================== */

.htmx-request #search-spinner {
    display: inline-block !important;
}

.badge[hx-post] {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.badge[hx-post]:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.badge[hx-post]:active {
    transform: scale(0.95);
}

.htmx-swapping {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

/* Page content transition */
#page-content {
    transition: opacity 0.15s ease-out;
}

/* New elements fade in */
.htmx-added {
    animation: fadeInUp 0.3s ease-out both;
}

/* Smooth settle */
.htmx-settling {
    transition: opacity 0.2s ease-in;
}

/* Block interaction during request */
.htmx-request {
    pointer-events: none;
}

/* Table row stagger animation */
.table-modern tbody tr.htmx-added {
    animation: slideInRow 0.3s ease-out both;
}

.table-modern tbody tr.htmx-added:nth-child(1) { animation-delay: 0.02s; }
.table-modern tbody tr.htmx-added:nth-child(2) { animation-delay: 0.04s; }
.table-modern tbody tr.htmx-added:nth-child(3) { animation-delay: 0.06s; }
.table-modern tbody tr.htmx-added:nth-child(4) { animation-delay: 0.08s; }
.table-modern tbody tr.htmx-added:nth-child(5) { animation-delay: 0.10s; }
.table-modern tbody tr.htmx-added:nth-child(6) { animation-delay: 0.12s; }
.table-modern tbody tr.htmx-added:nth-child(7) { animation-delay: 0.14s; }
.table-modern tbody tr.htmx-added:nth-child(8) { animation-delay: 0.16s; }
.table-modern tbody tr.htmx-added:nth-child(9) { animation-delay: 0.18s; }
.table-modern tbody tr.htmx-added:nth-child(10) { animation-delay: 0.20s; }

/* Toast slide-in */
.toast-container .toast {
    animation: slideInRight 0.35s ease-out both;
}

/* SVG Empty State Illustrations */
.empty-state-svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.empty-state-container .empty-state-svg {
    width: 120px;
    height: 120px;
}

.es-purple { fill: var(--ece-purple); }
.es-purple-dark { fill: var(--ece-purple-dark); }
.es-gold { fill: var(--ece-gold); }
.es-gold-light { fill: var(--ece-gold-light); }
.es-gray { fill: var(--ece-gray-light); }
.es-white { fill: #ffffff; }
.es-muted { fill: #cbd5e0; }
.es-stroke-purple { stroke: var(--ece-purple); fill: none; stroke-width: 2; stroke-linecap: round; }
.es-stroke-gold { stroke: var(--ece-gold); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ==========================================
   SORTABLE TABLE HEADERS
   ========================================== */

.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.sortable-header:hover {
    opacity: 0.8;
}

.sort-icon {
    margin-left: 0.25rem;
    font-size: 0.7rem;
}

