/* ============================================
   TACHES PRO - AdminLTE Custom Styles
   Version 3.0.0 - Bootstrap 5 + AdminLTE 3
   ============================================ */

/* Custom Brand Colors */
:root {
    --primary-gradient: linear-gradient(135deg, #0a1d70 0%, #3b0373 100%);
    --success-gradient: linear-gradient(135deg, #0cebeb 0%, #20e3b2 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Sidebar Customizations */
.main-sidebar {
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.brand-link {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0.5rem;
}

.brand-logo-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 0.8rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.35);
}

.brand-logo-shell .system-brand-image {
    margin-top: 0;
    margin-left: 0;
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
}

.brand-logo-shell .system-brand-fallback {
    font-size: 1.2rem;
    color: #1f2937;
}

.brand-logo-shell.has-image .system-brand-fallback {
    display: none;
}

.brand-logo-shell.logo-error .system-brand-fallback {
    display: inline-block;
}


    /* ============================================
       TABULATOR PRO TABLES
       ============================================ */

.brand-link .brand-image {
    margin-top: -3px;
}

/* User Panel Styling */
.user-panel .image .img-circle {
    font-size: 0.875rem;
}

.user-panel .info small {
    display: block;
    margin-top: 2px;
}

/* Small Boxes (Cards) */
.small-box {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.small-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.small-box .icon {
    font-size: 60px;
}

/* Info Boxes */
.info-box {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    min-height: 90px;
    transition: all 0.3s ease;
}

.info-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.info-box-icon {
    border-radius: 0.5rem 0 0 0.5rem;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border: none;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.25rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Content Wrapper */
.content-wrapper {
    background-color: #f4f6f9;
}

.content-header {
    padding: 15px 0.5rem;
}

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #343a40;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
    padding: 0;
}

/* ============================================
   TABULATOR PRO TABLES
   ============================================ */

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.table-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
}

.table-toolbar-select {
    height: 32px;
    min-width: 70px;
    padding: 0.2rem 1.6rem 0.2rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    font-size: 0.8125rem;
    background-color: #fff;
}

.table-toolbar-input {
    height: 32px;
    width: 220px;
    max-width: 100%;
    padding: 0.35rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    font-size: 0.8125rem;
}

.table-toolbar-select:focus,
.table-toolbar-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.18rem rgba(102, 126, 234, 0.15);
}

.tabulator {
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    overflow: hidden;
    font-size: 0.875rem;
}

.tabulator .tabulator-header {
    background: linear-gradient(to bottom, #f8fafc, #eef2f7);
    border-bottom: 1px solid #e5e7eb;
}

.tabulator .tabulator-col {
    border-right: 1px solid #edf2f7;
}

.tabulator .tabulator-col .tabulator-col-content {
    padding: 0.65rem 0.6rem;
}

.tabulator .tabulator-col-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.tabulator .tabulator-cell {
    padding: 0.55rem 0.6rem;
    border-right: 1px solid #f1f5f9;
}

.tabulator .tabulator-row:nth-child(even) {
    background: #fbfdff;
}

.tabulator .tabulator-row:hover {
    background: #f4f7ff;
}

.tab-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tab-actions .btn.btn-xs {
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.3rem 0.45rem;
    border-radius: 0.33rem;
}

.tabulator .tabulator-footer {
    border-top: 1px solid #e5e7eb;
    background: #fafcff;
    padding: 0.4rem 0.6rem;
}

.tabulator .tabulator-footer .tabulator-page-size,
.tabulator .tabulator-footer .tabulator-page {
    border: 1px solid #d1d5db;
    border-radius: 0.35rem;
    min-width: 30px;
    height: 28px;
    padding: 0.1rem 0.45rem;
    font-size: 0.76rem;
}

.tabulator .tabulator-footer .tabulator-page.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

@media (max-width: 768px) {
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-toolbar-input {
        width: 100%;
    }
}

.global-page-loader {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(1px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.global-page-loader.show {
    display: flex;
}

.global-loader-box {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: #fff;
    color: #334155;
    border-radius: 0.6rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    font-size: 0.86rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #5568d3 0%, #63398b 100%);
}

/* Tables */
.table {
    font-size: 0.9375rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
    color: #495057;
}

.table-responsive {
    border-radius: 0.5rem;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-primary {
    background-color: #007bff;
}

/* Alerts */
#alertBox {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
}

.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

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

/* Modals */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Spinners */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .small-box {
        margin-bottom: 1rem;
    }
    
    .info-box {
        margin-bottom: 1rem;
    }
    
    #alertBox {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Navbar notifications badge */
.navbar-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 4px;
    position: absolute;
    right: 5px;
    top: 8px;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Login page customizations */
body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 15%, rgba(255,255,255,0.55), transparent 35%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.2), transparent 40%),
        linear-gradient(140deg, color-mix(in srgb, var(--sys-primary) 75%, #0f172a 25%) 0%, #0f172a 100%);
}

.sys-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.sys-login-card {
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.25);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.sys-login-side {
    padding: 2.2rem;
    color: #e2e8f0;
    background:
        linear-gradient(165deg, color-mix(in srgb, var(--sys-primary) 80%, #111827 20%) 0%, #0b1220 72%);
}

.sys-login-side-inner {
    max-width: 420px;
}

.sys-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    margin-bottom: 1rem;
}

.sys-login-title {
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 0.65rem;
    color: #f8fafc;
}

.sys-login-subtitle {
    color: #cbd5e1;
    margin-bottom: 1.4rem;
}

.sys-login-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.1rem;
}

.sys-login-logo-shell {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(255,255,255,0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
}

.sys-login-logo-image {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.sys-login-logo-fallback {
    color: #111827;
    font-size: 1.4rem;
}

.sys-login-logo-shell.has-image .sys-login-logo-fallback {
    display: none;
}

.sys-login-logo-shell.logo-error .sys-login-logo-fallback {
    display: inline-block;
}

.sys-login-brand-name {
    color: #f8fafc;
    font-size: 1.2rem;
    font-weight: 700;
}

.sys-login-points {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.sys-login-points li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #dbeafe;
    font-size: 0.94rem;
}

.sys-login-points i {
    width: 20px;
    text-align: center;
}

.sys-login-form-pane {
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 1.6rem;
}

.sys-login-form-pane .card {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: none;
}

.sys-login-form-pane .card-body {
    padding: 1.6rem 1.45rem;
}

.sys-login-form-pane .btn-primary {
    background: linear-gradient(135deg, var(--sys-primary) 0%, #1f2937 100%);
}

.sys-login-form-pane .btn-primary:hover,
.sys-login-form-pane .btn-primary:focus {
    background: linear-gradient(135deg, color-mix(in srgb, var(--sys-primary) 85%, #000 15%) 0%, #111827 100%);
}

@media (max-width: 991.98px) {
    .sys-login-card {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .sys-login-side {
        padding: 1.4rem 1.25rem 1.2rem;
    }

    .sys-login-form-pane {
        padding: 1rem;
    }
}

/* Dashboard specific */
.small-box .inner h3 {
    font-weight: 700;
}

/* Podium styling for classement page */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin: 2rem 0;
}

.podium-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.podium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Custom utilities */
.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading states */
.content-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Dashboard Enhancements */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.info-box .progress {
    margin-top: 0.5rem;
}

.info-box-number {
    display: block;
    font-weight: 700;
}

/* Clock animation */
#dashClock {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Chart containers */
.card-body canvas {
    max-height: 300px;
}

/* Trend indicators */
.info-box-number small {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Hover effects for cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Elevation utilities */
.elevation-1 {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.elevation-2 {
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.elevation-3 {
    box-shadow: 0 10px 20px rgba(0,0,0,0.19);
}

/* Animated number counters */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-count {
    animation: countUp 0.5s ease-out;
}

/* Dashboard Agents List Compact */
#dashTopAgents .d-flex {
    border-left: 4px solid transparent;
}

#dashTopAgents .d-flex:nth-child(1) {
    border-left-color: #f59e0b;
}

#dashTopAgents .d-flex:nth-child(2) {
    border-left-color: #94a3b8;
}

#dashTopAgents .d-flex:nth-child(3) {
    border-left-color: #CD7F32;
}

#dashTopAgents .d-flex:nth-child(n+4) {
    border-left-color: #667eea;
}

/* DataTables Customizations */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin: 0 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
    font-size: 0.875rem;
}

/* Classement page responsive */
@media (max-width: 992px) {
    .podium-container {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place {
        max-width: 400px;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .podium-place.first,
    .podium-place.second,
    .podium-place.third {
        height: auto !important;
    }
    
    .podium-card {
        height: auto !important;
    }
}

/* ============================================
   CUSTOM TABLE MANAGER SYSTEM
   ============================================ */

/* Table Controls Wrapper */
.table-controls-wrapper {
    margin-bottom: 1.5rem;
}

.table-controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.table-controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
    flex-wrap: wrap;
}

/* Entries Control */
.table-entries-control label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: #495057;
    font-size: 1rem;
    margin: 0;
}

.table-entries-select {
    border: 2px solid #dee2e6;
    border-radius: 0.625rem;
    padding: 1rem 3rem 1rem 1.25rem;
    transition: all 0.3s ease;
    background-color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
}

.table-entries-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.2);
}

.table-entries-select:hover {
    border-color: #667eea;
}

/* Search Control */
.table-search-control label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: #495057;
    font-size: 1rem;
    margin: 0;
}

.table-search-input {
    border: 2px solid #dee2e6;
    border-radius: 0.625rem;
    padding: 1rem 1.5rem 1rem 3rem;
    min-width: 280px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1rem center;
    background-size: 18px;
}

.table-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.2);
}

.table-search-input::placeholder {
    color: #adb5bd;
}

/* Table Info */
.table-info {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.table-info strong {
    color: #495057;
    font-weight: 700;
}

/* Pagination */
.table-pagination {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.page-btn {
    border: 2px solid #dee2e6;
    border-radius: 0.625rem;
    padding: 0.85rem 1.4rem;
    background: white;
    color: #495057;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.page-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.page-btn.active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63398b 100%);
    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-btn:disabled:hover {
    background: white;
    border-color: #dee2e6;
    color: #495057;
    box-shadow: none;
}

.page-dots {
    padding: 0 0.5rem;
    color: #6c757d;
    font-weight: 600;
}

/* Table Sortable Headers */
table thead th.sortable {
    position: relative;
    user-select: none;
    padding-right: 2.5rem !important;
}

table thead th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    opacity: 0.3;
    transition: all 0.3s ease;
}

table thead th.sortable:hover::after {
    opacity: 0.6;
    color: #667eea;
}

table thead th.sort-asc::after {
    content: '\f0de';
    opacity: 1;
    color: #667eea;
}

table thead th.sort-desc::after {
    content: '\f0dd';
    opacity: 1;
    color: #667eea;
}

/* Table Enhancements */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #667eea !important;
    padding: 1.5rem 2rem;
    vertical-align: middle;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
}

.table thead th:hover {
    background: linear-gradient(to bottom, #e9ecef 0%, #dee2e6 100%);
}

.table tbody td {
    padding: 1.25rem 2rem;
    vertical-align: middle;
    font-size: 0.95rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f0f3ff !important;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.15);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
    .table-controls-top,
    .table-controls-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search-input {
        min-width: 100%;
    }

    .table-pagination {
        justify-content: center;
    }

    .page-btn {
        padding: 0.65rem 1rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   END CUSTOM TABLE MANAGER SYSTEM
   ============================================ */

/* ============================================
   ACTION BUTTONS REFINEMENTS
   ============================================ */

/* Button groups in tables */
.table .btn {
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: all 0.3s ease;
    border: none;
    margin: 0 2px;
    position: relative;
    overflow: hidden;
}

.table .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.table .btn:hover::before {
    width: 300px;
    height: 300px;
}

.table .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Specific button colors */
.table .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.table .btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.table .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.table .btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #c69500 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.table .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.table .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.table .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.table .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.table .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table .btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63398b 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Icon button sizing */
.table .btn i {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ============================================
   BADGES & AVATARS IN TABLES
   ============================================ */

/* Badge refinements */
.table .badge {
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table .badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
}

.table .badge-secondary {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
}

.table .badge-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 1px solid #dee2e6;
}

.table .badge-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #b87333 100%);
    color: white;
}

/* Avatar circles in tables */
.table .avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    margin-right: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.table tr:hover .avatar-circle {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   PROGRESS BARS IN TABLES
   ============================================ */

.table .progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: visible;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.table .progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    transition: width 0.6s ease;
    position: relative;
    overflow: visible;
}

.table .progress-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    background: inherit;
    border-radius: 10px;
    filter: blur(4px);
    opacity: 0.3;
    z-index: -1;
}

/* Small text next to progress */
.table small {
    font-weight: 500;
    color: #6c757d;
}

/* ============================================
   PERIOD BUTTONS (CLASSEMENT)
   ============================================ */

.periode-btn {
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.periode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.periode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    transform: translateY(-2px);
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dataTables_wrapper table.dataTable tbody tr {
    animation: fadeIn 0.3s ease;
}

/* Empty state */
.dataTables_wrapper .dataTables_empty {
    padding: 2rem !important;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Loading overlay for DataTables */
.dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* Responsive table wrapper */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ============================================
   MOBILE RESPONSIVE REFINEMENTS
   ============================================ */

@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_length {
        margin-bottom: 1rem;
    }
    
    .table .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin: 1px;
    }
    
    .table .avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.375rem 0.625rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   MA PRESENCE PAGE - CLEAN DESIGN
   ============================================ */

/* Background opacity utilities (Bootstrap 5.1+ feature backport) */
.bg-success.bg-opacity-10 {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(23, 162, 184, 0.1) !important;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Card border left accent */
.border-left-primary {
    border-left: 4px solid #667eea !important;
}

/* Clean shadows */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Clean alerts without heavy colors */
.alert.border-0 {
    border: none;
}

.alert .flex-shrink-0 i {
    opacity: 0.8;
}

/* Ma Presence specific adjustments */
[data-page="ma-presence"] .card-body {
    background-color: #fff;
}

[data-page="ma-presence"] .btn-primary {
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

[data-page="ma-presence"] .card.shadow-sm {
    border: 1px solid #e9ecef;
}

[data-page="ma-presence"] .alert-heading {
    font-weight: 600;
    font-size: 1rem;
}

/* Subtle stat cards */
.card.h-100 {
    transition: all 0.3s ease;
}

.card.h-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1) !important;
}

/* Icon containers in stat cards */
.bg-success.bg-opacity-10,
.bg-info.bg-opacity-10,
.bg-primary.bg-opacity-10 {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments for ma-presence */
@media (max-width: 768px) {
    [data-page="ma-presence"] .btn-primary {
        padding: 0.65rem 2rem;
        font-size: 1rem;
    }
    
    .bg-success.bg-opacity-10,
    .bg-info.bg-opacity-10,
    .bg-primary.bg-opacity-10 {
        width: 50px;
        height: 50px;
    }
    
    .bg-success.bg-opacity-10 i,
    .bg-info.bg-opacity-10 i,
    .bg-primary.bg-opacity-10 i {
        font-size: 1.25rem !important;
    }
}
