/* Enhanced Dashboard Styles for Rafik Fit Pro Admin Panel */

/* إزالة شرائط التمرير المزدوجة - CSS الأساسي */
html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* الحاوي الرئيسي */
.main-content,
.dashboard-container,
.content-wrapper {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
}

/* الحاويات الجانبية */
.sidebar {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: 100vh !important;
}

/* إزالة أي ارتفاع ثابت مسبب للمشكلة */
.dashboard-wrapper,
.app-wrapper,
.page-wrapper {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* إصلاح الرسوم البيانية والجداول */
.chart-container,
.table-container,
.stats-section {
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-width: 100% !important;
}

/* Chart Pie Container */
.chart-pie {
    position: relative;
    height: 280px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-pie canvas {
    max-width: 100%;
    max-height: 100%;
}

/* إصلاح خاص لـ fitnessLevelChart */
#fitnessLevelChart,
#genderChart,
#revenueChart {
    max-width: 100% !important;
    max-height: 300px !important;
    height: auto !important;
    width: 100% !important;
}

/* إصلاح حاوي الرسم البياني */
.chart-pie {
    max-height: 300px !important;
    min-height: 250px !important;
    height: 300px !important;
    overflow: hidden !important;
    position: relative !important;
}

/* إصلاح خاص للشاشات الصغيرة */
@media (max-width: 768px) {
    #fitnessLevelChart,
    .chart-pie canvas {
        max-height: 250px !important;
        height: 250px !important;
    }
    
    .chart-pie {
        max-height: 250px !important;
        height: 250px !important;
    }
}

@media (max-width: 576px) {
    #fitnessLevelChart,
    .chart-pie canvas {
        max-height: 200px !important;
        height: 200px !important;
    }
    
    .chart-pie {
        max-height: 200px !important;
        height: 200px !important;
    }
}

/* إصلاح البطاقات والمحتوى */
.stat-card,
.card,
.widget {
    overflow: visible !important;
    height: auto !important;
}

/* إصلاح خاص لـ chart-card */
.chart-card {
    min-height: 400px !important;
    max-height: 500px !important;
    height: auto !important;
    width: 100% !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: visible !important;
}

/* إصلاح محتوى chart-card */
.chart-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* إصلاح header في chart-card */
.chart-card .d-flex.flex-column.flex-sm-row {
    margin-bottom: 20px !important;
    flex-shrink: 0 !important;
}

/* إصلاح محتوى الرسم البياني في chart-card */
.chart-card .chart-pie,
.chart-card .chart-area {
    flex: 1 !important;
    min-height: 250px !important;
    max-height: 300px !important;
    height: auto !important;
    overflow: visible !important;
}

/* إصلاح الجداول في chart-card */
.chart-card .modern-table {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 300px !important;
}

/* إصلاح خاص للشاشات الصغيرة */
@media (max-width: 768px) {
    .chart-card {
        min-height: 350px !important;
        max-height: 450px !important;
        padding: 15px !important;
    }
    
    .chart-card .chart-pie,
    .chart-card .chart-area {
        min-height: 200px !important;
        max-height: 250px !important;
    }
    
    .chart-card .modern-table {
        max-height: 250px !important;
    }
}

@media (max-width: 576px) {
    .chart-card {
        min-height: 300px !important;
        max-height: 400px !important;
        padding: 10px !important;
    }
    
    .chart-card .chart-pie,
    .chart-card .chart-area {
        min-height: 180px !important;
        max-height: 220px !important;
    }
    
    .chart-card .modern-table {
        max-height: 200px !important;
    }
}

/* إصلاح النشاط والقوائم */
.activity-timeline,
.user-list,
.notification-list {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 400px !important;
}

/* تخصيص شريط التمرير الوحيد المطلوب */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* إخفاء شريط التمرير الأفقي نهائياً */
::-webkit-scrollbar:horizontal {
    display: none !important;
}

/* إصلاح متخصص للشاشات الكبيرة */
@media (min-width: 1025px) {
    .main-wrapper {
        display: flex !important;
        height: 100vh !important;
        overflow: hidden !important;
    }
    
    .sidebar {
        flex-shrink: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .main-content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: 100vh !important;
        padding: 20px !important;
    }
    
    .dashboard-container {
        overflow: visible !important;
        height: auto !important;
    }
}

/* حل خاص للإطارات (iframes) */
iframe {
    overflow: hidden !important;
}

/* للصفحة داخل iframe */
body.iframe-content {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
}

/* Avenir Next World Font Import */
@import url('https://fonts.googleapis.com/css2?family=Avenir+Next+World:wght@300;400;500;600;700;800;900&display=swap');

/* Modern Dashboard Container */
.dashboard-container {
    background: linear-gradient(135deg, #F3F2EC 0%, #DCDCDC 100%);
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
    position: relative;
    width: 100%;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box;
    font-family: 'Avenir Next World', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto !important;
}

.admin-content .p-4 .dashboard-container {
    min-height: 100% !important;
    overflow-y: visible !important;
}

/* Mobile responsiveness override */
@media (max-width: 576px) {
    .admin-content .p-4 .dashboard-container {
        min-height: calc(100vh - 50px) !important;
        flex: 1 !important;
    }

    .dashboard-container {
        min-height: calc(100vh - 50px) !important;
        overflow-y: visible;
        overflow-x: hidden;
    }

    /* Fix scroll issues on mobile */
    .admin-content .p-4 {
        min-height: calc(100vh - 50px);
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

@media (max-width: 768px) {
    .admin-content .p-4 .dashboard-container {
        min-height: calc(100vh - 60px) !important;
        flex: 1 !important;
    }

    /* Override chart heights in dashboard container for tablet screens in page content */

    .dashboard-container {
        min-height: calc(100vh - 60px) !important;
    }

    /* Override chart heights in dashboard container for tablet screens in page content */


    /* Override chart heights in dashboard container for tablet screens */
}

/* Global Typography with Avenir Next World */
.dashboard-container,
.dashboard-container h1,
.dashboard-container h2,
.dashboard-container h3,
.dashboard-container h4,
.dashboard-container h5,
.dashboard-container h6,
.dashboard-container p,
.dashboard-container span,
.dashboard-container div,
.dashboard-container button,
.dashboard-container input,
.dashboard-container select,
.dashboard-container textarea {
    font-family: 'Avenir Next World', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.025em;
    box-sizing: border-box;
    max-width: 100%;
}

/* Enhanced Font Weights */
.dashboard-container h1,
.dashboard-container h2,
.dashboard-container h3 {
    font-weight: 600;
}

.dashboard-container h4,
.dashboard-container h5,
.dashboard-container h6 {
    font-weight: 500;
}

.dashboard-container p,
.dashboard-container span {
    font-weight: 400;
}

/* Animated Background Elements */
.dashboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="80" fill="url(%23a)"/><circle cx="100" cy="700" r="120" fill="url(%23a)"/><circle cx="900" cy="800" r="90" fill="url(%23a)"/></svg>');
    background-size: 800px 800px;
    background-repeat: repeat;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-20px, -20px) rotate(1deg); }
    50% { transform: translate(20px, -10px) rotate(-1deg); }
    75% { transform: translate(-10px, 20px) rotate(0.5deg); }
}

/* Glass Morphism Effect */
.glass-card {
    background: rgba(243, 242, 236, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 220, 220, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(30, 147, 171, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 45px rgba(30, 147, 171, 0.3);
}

/* Enhanced Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(-45deg);
    transition: transform 0.6s;
    opacity: 0;
}

.stats-card:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translate(50%, 50%);
}

.stats-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(230, 39, 39, 0.4);
}

.stats-card.users {
    background: linear-gradient(135deg, #1E93AB 0%, #E62727 100%);
}

.stats-card.subscriptions {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
}

.stats-card.revenue {
    background: linear-gradient(135deg, #1E93AB 0%, #E62727 100%);
}

.stats-card h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stats-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-card .icon {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.stats-card:hover .icon {
    opacity: 0.6;
    transform: scale(1.1);
}

/* Enhanced Chart Cards */
.chart-card {
    background: rgba(243, 242, 236, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(220, 220, 220, 0.3);
    box-shadow: 0 8px 32px rgba(220, 220, 220, 0.2);
    padding: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(220, 220, 220, 0.3);
}

/* Modern Table Design */
.modern-table {
    background: rgba(243, 242, 236, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(220, 220, 220, 0.3);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(220, 220, 220, 0.2);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.modern-table .table {
    margin-bottom: 0;
    width: 100%;
    table-layout: fixed;
}

.modern-table .table th,
.modern-table .table td {
    padding: 0.75rem;
    word-wrap: break-word;
    vertical-align: middle;
}

.modern-table .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-table th {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background: rgba(30, 147, 171, 0.1);
    transform: scale(1.01);
}

/* Enhanced Timeline */
.modern-timeline {
    position: relative;
    padding-left: 2rem;
}

.modern-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #E62727 0%, #1E93AB 50%, #E62727 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
    animation: slideInFromLeft 0.6s ease-out;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 3px solid #F3F2EC;
    box-shadow: 0 0 0 3px #1E93AB, 0 4px 12px rgba(220, 220, 220, 0.2);
    z-index: 2;
}

.timeline-marker.success {
    background: linear-gradient(135deg, #1E93AB 0%, #E62727 100%);
}

.timeline-marker.info {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
}

.timeline-marker.warning {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
}

.timeline-content {
    background: rgba(243, 242, 236, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(220, 220, 220, 0.3);
    box-shadow: 0 4px 15px rgba(220, 220, 220, 0.2);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(220, 220, 220, 0.3);
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1E93AB;
}

.timeline-date {
    font-size: 0.85rem;
    color: #DCDCDC;
    font-weight: 500;
}

/* Modern Buttons */
.btn-modern {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 39, 39, 0.4);
    color: white;
}

.btn-modern-success {
    background: linear-gradient(135deg, #1E93AB 0%, #E62727 100%);
}

.btn-modern-danger {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
}

/* Enhanced Action Buttons */
.action-buttons .btn {
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.action-buttons .btn-success {
    background: linear-gradient(135deg, #1E93AB 0%, #E62727 100%);
    border: none;
}

.action-buttons .btn-danger {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    border: none;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 220, 220, 0.3);
}

/* Animation Classes */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 0.6s ease-out;
}

/* Enhanced Demographics Cards */
.demographics-card {
    background: rgba(243, 242, 236, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(220, 220, 220, 0.3);
    padding: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.demographics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(220, 220, 220, 0.3);
}

.demographics-card .chart-area,
.demographics-card .chart-pie {
    flex: 1;
    min-height: 220px;
    height: 220px;
    width: 100%;
    position: relative;
}

.demographics-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.demographics-item:hover {
    background: rgba(30, 147, 171, 0.1);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0 -1rem;
}

.demographics-label {
    font-weight: 500;
    color: #1E93AB;
}

.demographics-count {
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Emergency Card Layout Fixes - Phase 1: Diagnostic */
.stats-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

.stat-card, .glass-card {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    
    /* إزالة جميع القيود المسببة للتشويه */
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    
    /* إزالة أي عرض أو ارتفاع ثابت خاطئ */
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    
    /* نسبة عرض لارتفاع طبيعية */
    aspect-ratio: unset !important;
    
    /* إزالة أي تحويلات تسبب التشويه */
    transform: none !important;
    scale: none !important;
    
    /* تخطيط flexbox صحيح */
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    
    /* مساحات داخلية متوازنة */
    padding: 25px 20px !important;
    box-sizing: border-box !important;
    
    /* حد أدنى وأقصى للارتفاع */
    min-height: 140px !important;
    max-height: 200px !important;
}

/* إصلاح الحاوي الأساسي */
.stats-section .row,
.row.mb-5 {
    /* إزالة أي قيود خاطئة */
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    
    /* تأكيد الشبكة */
    grid-auto-rows: minmax(140px, auto) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 20px !important;
    margin: 20px 0 !important;
}

/* Enhanced Mobile Responsive Design - Force Show Cards */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px 10px;
        width: 100%;
        min-height: calc(100vh - 60px);
        height: auto;
        max-height: none;
        flex: 1;
        overflow-x: hidden;
    }

    .admin-content .p-4 .dashboard-container {
        height: auto !important;
        min-height: calc(100vh - 60px) !important;
        max-height: none !important;
        overflow-y: auto;
    }

    /* Force show stats grid on mobile */
    .stats-grid,
    .stats-section .row,
    .row.mb-5 {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        margin: 20px 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Force show stat cards on mobile */
    .stat-card, .glass-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 120px !important;
        max-height: 140px !important;
        width: 100% !important;
        height: auto !important;
        padding: 20px 15px !important;
        margin-bottom: 15px;
        border-radius: 12px;
        box-sizing: border-box;
        overflow: visible !important;
        color: white !important;
        text-align: center !important;
    }

    .stats-card .stat-number {
        font-size: 2.5rem !important;
        font-weight: bold;
        margin-bottom: 8px;
    }

    .stats-card h5, .stats-card .card-title {
        font-size: 1rem;
        text-align: center;
        opacity: 0.9;
        margin-bottom: 10px;
    }

    .stats-card .stats-icon {
        position: static;
        margin-top: 10px;
        text-align: center;
    }

    .stats-card .stats-icon i {
        font-size: 2rem;
        opacity: 0.7;
    }

    /* Action Buttons - Mobile */
    .action-buttons,
    .d-flex.mt-3.mt-sm-0 {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 25px;
        width: 100%;
    }

    .action-buttons .btn,
    .btn-modern {
        width: 100%;
        padding: 15px;
        border-radius: 25px;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    /* Chart Cards - Mobile */
    .chart-card, .demographics-card {
        margin-bottom: 20px;
        padding: 15px;
        min-height: 300px;
        width: 100%;
        box-sizing: border-box;
    }

    .demographics-card {
        min-height: 280px;
    }

    /* Timeline - Mobile */
    .modern-timeline {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .modern-timeline::before {
        left: 0.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }

    .timeline-content {
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Ensure no horizontal overflow */
    .row {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .col-xl-3, .col-xl-8, .col-xl-4, .col-lg-6, .col-lg-4, .col-md-6, .col-sm-12 {
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Table responsiveness */
    .modern-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modern-table .table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .modern-table .table th,
    .modern-table .table td {
        padding: 8px 4px;
        white-space: nowrap;
    }

    /* Page Header - Mobile */
    .d-sm-flex.align-items-center.justify-content-between {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
    }

    .d-sm-flex.align-items-center.justify-content-between h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .d-sm-flex.align-items-center.justify-content-between p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
}

/* Tablet Responsive Design */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-section .row,
    .row.mb-5 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    .stats-card, .glass-card {
        min-height: 150px !important;
        max-height: 180px !important;
        padding: 25px 20px !important;
    }

    .stats-card .stat-number {
        font-size: 2.2rem !important;
    }
}

/* Desktop Responsive Design - Enhanced */
@media (min-width: 1025px) {
    .stats-section .row,
    .row.mb-5 {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px !important;
        margin: 20px 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Full width layout for desktop - 100% Extension */
    .container-fluid {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Remove all padding and margins for 100% width */
    .row.mb-5 [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Make rows use full width with no margins */
    .row {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }
    
    /* Ensure dashboard container uses full width */
    .dashboard-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }
    
    /* Remove negative margins for 100% width */
    .row[style*="margin: 0 -15px"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* 100% width for all columns */
    .row[style*="margin: 0 -15px"] > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Force 100% width for all Bootstrap columns */
    .col-xl-3, .col-xl-4, .col-xl-6, .col-xl-12,
    .col-lg-3, .col-lg-4, .col-lg-6, .col-lg-12,
    .col-md-6, .col-md-12,
    .col-sm-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .stats-card, .glass-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 160px !important;
        max-height: 200px !important;
        padding: 30px 25px !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .stats-card .stat-number {
        font-size: 2.5rem !important;
    }
    
    /* Chart Responsive Design for Desktop */
    .chart-pie {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
    }
    
    .chart-card {
        min-height: 400px !important;
        width: 100% !important;
    }
    
    .demographics-card {
        min-height: 400px !important;
        width: 100% !important;
    }
    
    /* Better spacing for desktop layout */
    .row.mb-5 {
        margin-bottom: 3rem !important;
        width: 100% !important;
    }
    
    /* Ensure proper card spacing and 100% width */
    .col-xl-6, .col-xl-4, .col-lg-4, .col-lg-6 {
        margin-bottom: 2rem !important;
        width: 100% !important;
        flex: 1 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* 100% width for all Bootstrap columns */
    .col-xl-3, .col-xl-4, .col-xl-6, .col-xl-12,
    .col-lg-3, .col-lg-4, .col-lg-6, .col-lg-12,
    .col-md-6, .col-md-12,
    .col-sm-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Force 100% width for all cards */
    .chart-card, .demographics-card, .stats-card, .glass-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 2rem !important;
    }
    
    /* Force show all cards on desktop */
    .col-xl-3, .col-lg-6, .col-md-6, .col-sm-12 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }
}

/* Tablet Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .chart-card, .demographics-card {
        min-height: 350px !important;
    }
    
    .chart-pie {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }
    
    .col-lg-4, .col-lg-6 {
        margin-bottom: 1.5rem !important;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .chart-card, .demographics-card {
        min-height: 300px !important;
        margin-bottom: 1rem !important;
    }
    
    .chart-pie {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }
    
    .col-md-6, .col-md-12, .col-sm-12 {
        margin-bottom: 1rem !important;
    }
}

/* Very Small Screens (320px - 576px) */
@media (max-width: 576px) {
    .dashboard-container {
        padding: 10px 5px;
        min-height: calc(100vh - 50px);
        height: auto;
        max-height: none;
        flex: 1;
        overflow-x: hidden;
    }

    .admin-content .p-4 .dashboard-container {
        height: auto !important;
        min-height: calc(100vh - 50px) !important;
        max-height: none !important;
        overflow-y: auto;
    }

    /* Fix overflow issues on very small screens */
    .dashboard-container,
    .admin-content .p-4 {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    /* Statistics Cards - Very Small Screens */
    .stats-section .row,
    .row.mb-5 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stats-card, .glass-card {
        padding: 15px 10px !important;
        min-height: 100px !important;
        max-height: 120px !important;
        margin-bottom: 10px;
    }

    .stats-card .stat-number {
        font-size: 1.8rem !important;
        margin-bottom: 5px;
    }

    .stats-card h5, .stats-card .card-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .stats-card .stats-icon i {
        font-size: 1.5rem;
    }

    /* Chart Cards - Very Small Screens */
    .chart-card, .demographics-card {
        padding: 10px;
        min-height: 250px;
        margin-bottom: 15px;
    }

    .demographics-card {
        min-height: 230px;
    }

    /* Action Buttons - Very Small Screens */
    .btn-modern {
        padding: 12px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 8px;
    }

    /* Page Header - Very Small Screens */
    .d-sm-flex.align-items-center.justify-content-between h1 {
        font-size: 1.3rem;
    }

    .d-sm-flex.align-items-center.justify-content-between p {
        font-size: 0.8rem;
    }

    /* Fix sidebar overlay on mobile */
    .admin-sidebar.show {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 1050 !important;
    }

    .admin-sidebar-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        background: #374151 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        z-index: 1051 !important;
    }

    .admin-sidebar.show .admin-sidebar-content {
        transform: translateX(0) !important;
    }

/* Fix any potential horizontal overflow */
.dashboard-container * {
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
}

.dashboard-container .container-fluid {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

    /* Ensure timeline is properly contained */
    .modern-timeline {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }
}

@media (max-width: 576px) {
    .stats-card {
        padding: 1rem;
    }

    .stats-card .stat-number {
        font-size: 1.8rem;
    }

    .stats-card h5 {
        font-size: 1rem;
    }

    .btn-modern {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* CSS Override for Stubborn Cases - Phase 4 - Enhanced for All Screens */
@media screen and (max-width: 768px) {
    .stats-grid,
    .dashboard .stats-grid,
    .main-content .stats-grid,
    .container .stats-grid,
    .stats-section .row,
    .row.mb-5 {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        overflow: visible !important;
        height: auto !important;
        width: 100% !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        margin: 20px 0 !important;
        padding: 0 !important;
    }
    
    .stat-card, .glass-card,
    .dashboard .stat-card,
    .main-content .stat-card,
    .container .stat-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 120px !important;
        padding: 20px 15px !important;
        border-radius: 16px !important;
        color: white !important;
        text-align: center !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
}

/* Desktop Override for Stubborn Cases - Force Show Cards */
@media screen and (min-width: 1025px) {
    .stats-grid,
    .dashboard .stats-grid,
    .main-content .stats-grid,
    .container .stats-grid,
    .stats-section .row,
    .row.mb-5 {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        overflow: visible !important;
        height: auto !important;
        width: 100% !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px !important;
        margin: 20px 0 !important;
        padding: 0 !important;
    }
    
    .stat-card, .glass-card,
    .dashboard .stat-card,
    .main-content .stat-card,
    .container .stat-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 160px !important;
        padding: 30px 25px !important;
        border-radius: 20px !important;
        color: white !important;
        text-align: center !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Force show all Bootstrap columns on desktop */
    .col-xl-3, .col-lg-6, .col-md-6, .col-sm-12 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }
}

/* Additional Mobile Responsiveness Fixes */
@media (max-width: 576px) {
    /* Force no horizontal scroll */
    .row {
        margin: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .col-xl-3, .col-xl-4, .col-xl-8, .col-lg-6, .col-lg-4, .col-md-12 {
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Force show cards on very small screens */
    .stats-grid,
    .stats-section .row,
    .row.mb-5 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .stat-card, .glass-card {
        min-height: 100px !important;
        padding: 15px !important;
    }

    .stats-card .stat-number {
        font-size: 1.8rem !important;
    }

    /* Chart containers */
    .chart-area, .chart-pie {
        width: 100% !important;
        height: 200px !important;
        min-height: 180px !important;
    }

    /* Table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Button fixes */
    .btn-modern {
        width: 100%;
        margin-bottom: 8px;
        padding: 12px;
    }

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 8px;
        padding: 12px;
    }
}

/* Universal Card Display Fix - Works on All Screens */
.stats-section .row,
.row.mb-5,
.stats-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.stat-card, .glass-card {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Force show all Bootstrap columns universally */
.col-xl-3, .col-lg-6, .col-md-6, .col-sm-12 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Trainee Dashboard Styles */
.trainee-dashboard .card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(220, 220, 220, 0.3);
    transition: all 0.3s ease;
}

.trainee-dashboard .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 2rem 0 rgba(220, 220, 220, 0.4);
}

.trainee-dashboard .border-left-primary {
    border-left: 0.25rem solid #E62727 !important;
}

.trainee-dashboard .border-left-success {
    border-left: 0.25rem solid #1E93AB !important;
}

.trainee-dashboard .border-left-info {
    border-left: 0.25rem solid #1E93AB !important;
}

.trainee-dashboard .border-left-warning {
    border-left: 0.25rem solid #E62727 !important;
}

/* Progress Tracking Styles */
.progress-item {
    border-bottom: 1px solid #DCDCDC;
    padding: 1rem 0;
}

.progress-item:last-child {
    border-bottom: none;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #E62727;
}

.stat-label {
    font-size: 0.875rem;
    color: #1E93AB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Workout Plan Styles */
.workout-plan-info {
    padding: 1rem;
}

.nutrition-plan-info {
    padding: 1rem;
}

.nutrition-stat {
    text-align: center;
}

.nutrition-stat .stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #E62727;
}

.nutrition-stat .stat-label {
    font-size: 0.75rem;
    color: #1E93AB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Styles */
.profile-info {
    margin-bottom: 1rem;
}

.profile-photo img {
    border: 3px solid #DCDCDC;
    transition: all 0.3s ease;
}

.profile-photo img:hover {
    border-color: #E62727;
    transform: scale(1.05);
}

/* BMI Calculator Styles */
.bmi-calculator {
    padding: 1rem;
}

.bmi-result {
    padding: 1rem;
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    border-radius: 0.5rem;
    color: white;
}

.bmi-value {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.bmi-category {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bmi-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

.bmi-categories .category-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #DCDCDC;
}

.bmi-categories .category-item:last-child {
    border-bottom: none;
}

/* Calorie Calculator Styles */
.calorie-calculator {
    padding: 1rem;
}

.calorie-result {
    padding: 1rem;
    background: linear-gradient(135deg, #E62727 0%, #1E93AB 100%);
    border-radius: 0.5rem;
    color: white;
}

.macro-item {
    text-align: center;
    padding: 0.5rem;
}

.macro-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #E62727;
}

.macro-label {
    font-size: 0.75rem;
    color: #1E93AB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Styles */
.chart-area {
    position: relative;
    min-height: 350px;
    height: 350px;
}

.chart-pie {
    position: relative;
    min-height: 280px;
    height: 280px;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #DCDCDC;
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid white;
}

.timeline-content {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.75rem;
    color: #1E93AB;
}

/* Recommendation Cards */
.recommendation-card {
    transition: all 0.3s ease;
    height: 100%;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(220, 220, 220, 0.3);
}

/* Activity Factors */
.activity-factors .activity-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #DCDCDC;
}

.activity-factors .activity-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.25rem;
    }
    
    .bmi-value {
        font-size: 2rem;
    }
    
    .chart-area {
        height: 200px;
        min-height: 180px;
        max-height: 250px;
    }

    .demographics-card .chart-area {
        height: 160px;
        min-height: 140px;
        max-height: 200px;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline::before {
        left: 0.25rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom Badge Styles */
.badge-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.125rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner 0.75s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Form Enhancements */
.form-control:focus {
    border-color: #E62727;
    box-shadow: 0 0 0 0.2rem rgba(230, 39, 39, 0.25);
}

.btn-primary {
    background-color: #E62727;
    border-color: #E62727;
}

.btn-primary:hover {
    background-color: #1E93AB;
    border-color: #1E93AB;
}

.btn-success {
    background-color: #1E93AB;
    border-color: #1E93AB;
}

.btn-success:hover {
    background-color: #E62727;
    border-color: #E62727;
}

/* Table Enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    color: #1E93AB;
    background-color: #DCDCDC;
}

.table td {
    vertical-align: middle;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(220, 220, 220, 0.3);
}

.modal-header {
    border-bottom: 1px solid #DCDCDC;
    background-color: #F3F2EC;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-info {
    background-color: #F3F2EC;
    color: #1E93AB;
    border-left: 4px solid #1E93AB;
}

.alert-success {
    background-color: #DCDCDC;
    color: #E62727;
    border-left: 4px solid #E62727;
}

.alert-warning {
    background-color: #F3F2EC;
    color: #E62727;
    border-left: 4px solid #E62727;
}

.alert-danger {
    background-color: #F3F2EC;
    color: #E62727;
    border-left: 4px solid #E62727;
}

/* Responsive Pagination Styles */
.pagination-nav {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #F3F2EC;
    border-radius: 0.5rem;
    border: 1px solid #DCDCDC;
}

.pagination-custom {
    gap: 0.25rem;
}

.pagination-custom .page-link {
    border: 1px solid #DCDCDC;
    color: #1E93AB;
    background-color: #F3F2EC;
    border-radius: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    min-width: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.pagination-custom .page-link:hover {
    background-color: #DCDCDC;
    border-color: #E62727;
    color: #E62727;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(230, 39, 39, 0.3);
}

.pagination-custom .page-item.active .page-link {
    background-color: #E62727;
    border-color: #E62727;
    color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(230, 39, 39, 0.3);
}

.pagination-custom .page-item.disabled .page-link {
    color: #DCDCDC;
    background-color: #F3F2EC;
    border-color: #DCDCDC;
    opacity: 0.6;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-jump .form-control {
    border: 1px solid #DCDCDC;
    border-radius: 0.35rem;
    font-size: 0.875rem;
    text-align: center;
}

.pagination-jump .form-control:focus {
    border-color: #E62727;
    box-shadow: 0 0 0 0.2rem rgba(230, 39, 39, 0.25);
}

.pagination-jump .btn {
    border-radius: 0.35rem;
    padding: 0.375rem 0.5rem;
}

/* Mobile Responsive Pagination */
@media (max-width: 768px) {
    .pagination-nav {
        padding: 0.75rem;
    }
    
    .pagination-nav .d-flex {
        gap: 1rem !important;
    }
    
    .pagination-custom .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        min-width: 36px;
    }
    
    .pagination-info {
        font-size: 0.8rem;
        text-align: center;
        order: 2;
    }
    
    .pagination-custom {
        order: 1;
        justify-content: center;
    }
    
    .pagination-jump {
        order: 3;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .pagination-custom .page-link {
        padding: 0.25rem 0.375rem;
        font-size: 0.75rem;
        min-width: 32px;
    }
    
    .pagination-custom .page-link i {
        font-size: 0.7rem;
    }
    
    .pagination-info {
        font-size: 0.75rem;
    }
    
    .pagination-jump {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination-jump .form-control {
        width: 100% !important;
        max-width: 80px;
    }
}

/* RTL Support for Pagination */
[dir="rtl"] .pagination-custom .page-link {
    text-align: center;
}

[dir="rtl"] .pagination-jump .btn {
    order: -1;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .pagination-nav {
        background: #1E93AB;
        border-color: #DCDCDC;
    }

    .pagination-custom .page-link {
        background-color: #DCDCDC;
        border-color: #F3F2EC;
        color: #1E93AB;
    }

    .pagination-custom .page-link:hover {
        background-color: #F3F2EC;
        border-color: #E62727;
        color: #E62727;
    }

    .pagination-info {
        color: #F3F2EC;
    }

    .pagination-jump .form-control {
        background-color: #DCDCDC;
        border-color: #F3F2EC;
        color: #1E93AB;
    }
}



