/* Responsive Design Foundation */
* {
    box-sizing: border-box;
}

/* Common Base Styles */
body {
    font: 16px 'Segoe UI', Helvetica, 'Droid Sans', Tahoma, Geneva, sans-serif;
    margin: 0;
    padding: 0;
}

/* Responsive Container */
.responsive-dashboard {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Header Section - Filter Controls */
.header-section {
    background: linear-gradient(135deg, #377dff 0%, #5a8dee 100%);
    color: white;
    padding: 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

    .header-section::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23f8f9fa'%3E%3C/path%3E%3C/svg%3E") no-repeat;
        background-size: cover;
    }

.header-container {
    position: relative;
    z-index: 1;
}

.filter-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Button Grid System */
.dashboard-grid {
    background: #f8f9fa;
    padding: 40px 20px;
    min-height: 100vh;
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
}

.grid-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

/* Responsive Grid Layout */
.grid-row {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 768px) {
    .grid-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .grid-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Enhanced Button Styling */
.btn-lms {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 25px 20px;
    color: #fff !important;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    gap: 15px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #377dff 0%, #5a8dee 100%);
}

    /* Button Hover Effects */
    .btn-lms::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.6s;
    }

    .btn-lms:hover::before {
        left: 100%;
    }

    .btn-lms:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 15px 40px rgba(55,125,255,0.3);
        filter: brightness(1.1);
    }

    .btn-lms:active {
        transform: translateY(-4px) scale(0.98);
        transition: all 0.1s;
    }

/* Icon Styling */
.btn-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-lms:hover .btn-icon {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Button Label */
.btn-label {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 1;
    position: relative;
}

/* Color Variations */
.btn-lms:nth-child(4n+1) {
    background: linear-gradient(135deg, #377dff 0%, #5a8dee 100%);
}

.btn-lms:nth-child(4n+2) {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-lms:nth-child(4n+3) {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.btn-lms:nth-child(4n+4) {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

/* Alternative color scheme for better variety */
.grid-item:nth-child(8n+5) .btn-lms {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}

.grid-item:nth-child(8n+6) .btn-lms {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

.grid-item:nth-child(8n+7) .btn-lms {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
}

.grid-item:nth-child(8n+8) .btn-lms {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* DevExpress Form Layout Responsive */
.dxflFormLayout {
    width: 100% !important;
}

.dxflItem {
    margin-bottom: 15px !important;
}

.dxeComboBox,
.dxeTextBox {
    width: 100% !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .header-section {
        padding: 15px;
    }

    .filter-form {
        padding: 15px;
        border-radius: 10px;
    }

    .dashboard-grid {
        padding: 20px 10px;
    }

    .grid-row {
        gap: 15px;
        grid-template-columns: 1fr;
    }

    .btn-lms {
        min-height: 140px;
        padding: 20px 15px;
        border-radius: 15px;
    }

    .btn-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .btn-label {
        font-size: 1rem;
    }

    /* Mobile form adjustments */
    .dxflFormLayout {
        font-size: 14px !important;
    }

    .dxflCaption {
        font-size: 13px !important;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-section {
        padding: 25px;
    }

    .dashboard-grid {
        padding: 35px 20px;
    }

    .btn-lms {
        min-height: 150px;
        padding: 22px 18px;
    }

    .btn-icon {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
}

/* Desktop Optimizations */
@media (min-width: 1025px) {
    .header-section {
        padding: 30px;
    }

    .dashboard-grid {
        padding: 50px 30px;
    }

    .btn-lms {
        min-height: 180px;
        padding: 30px 25px;
    }
}

/* Loading and Animation States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus and Accessibility */
.btn-lms:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

/* Print Styles */
@media print {
    .header-section,
    .dashboard-grid {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .btn-lms {
        background: #f8f9fa !important;
        color: black !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-lms {
        border: 2px solid white;
    }

    .btn-icon {
        border: 1px solid rgba(255,255,255,0.5);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .btn-lms,
    .btn-icon,
    .btn-lms::before {
        transition: none;
    }

        .btn-lms:hover {
            transform: none;
        }

    .fade-in {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dashboard-grid {
        background: #1a1a1a;
    }

    .filter-form {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Custom scrollbar for better UX */
.dashboard-grid::-webkit-scrollbar {
    width: 8px;
}

.dashboard-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dashboard-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    .dashboard-grid::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

