/* Color Palette Variables */
:root {
    --primary-dark: #05386B;
    --primary-medium: #379683;
    --primary-light: #5CDB95;
    --accent-light: #8EE4AF;
    --background-light: #EDF5E1;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--accent-light) 100%);
    min-height: 100vh;
    padding-top: 76px;
}

/* Gradient Classes */
.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
}

.bg-success-gradient {
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-light) 100%);
}

.bg-warning-gradient {
    background: linear-gradient(135deg, var(--warning) 0%, #ffeb3b 100%);
}

.bg-danger-gradient {
    background: linear-gradient(135deg, var(--danger) 0%, #ff5722 100%);
}

.bg-info-gradient {
    background: linear-gradient(135deg, var(--info) 0%, #00bcd4 100%);
}

/* Navigation Styles */
.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas-body .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.offcanvas-body .nav-link:hover {
    background-color: var(--gray-100);
    transform: translateX(5px);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.page-title {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-medium), var(--primary-light));
    border-radius: 2px;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

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

.stats-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    opacity: 0.9;
}

.stats-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Student Cards */
.student-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
}

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

.student-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.student-instrument {
    color: var(--primary-medium);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.student-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.student-price {
    font-weight: 600;
    color: var(--primary-dark);
}

.payment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.payment-status.paid {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.payment-status.pending {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 0.2rem rgba(55, 150, 131, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 56, 107, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-medium) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(55, 150, 131, 0.3);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: white;
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: 600;
}

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

/* Calendar Styles */
.fc {
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.fc-header-toolbar {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: white;
}

.fc-button-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.fc-button-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.fc-event {
    border: none;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.fc-event-lesson {
    background-color: var(--primary-medium);
}

.fc-event-absence {
    background-color: var(--danger);
}

.fc-event-payment {
    background-color: var(--success);
}

/* Upcoming Lessons */
.upcoming-lessons {
    max-height: 400px;
    overflow-y: auto;
}

.lesson-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-left: 4px solid var(--primary-medium);
    background: var(--gray-100);
    border-radius: 0 10px 10px 0;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.lesson-item:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.lesson-time {
    font-weight: 600;
    color: var(--primary-dark);
    margin-right: 1rem;
    min-width: 80px;
}

.lesson-details {
    flex: 1;
}

.lesson-student {
    font-weight: 600;
    color: var(--primary-dark);
}

.lesson-instrument {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* AdSense Container */
.adsense-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.adsense-placeholder {
    width: 300px;
    height: 250px;
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    margin-top: auto;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .adsense-container {
        display: none;
    }
    
    .student-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .stats-card {
        padding: 1rem;
    }
    
    .stats-icon {
        font-size: 2rem;
    }
    
    .stats-content h3 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-dark) !important;
}

.text-secondary-custom {
    color: var(--primary-medium) !important;
}

.bg-light-custom {
    background-color: var(--background-light) !important;
}

.border-primary-custom {
    border-color: var(--primary-medium) !important;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .stats-card {
        border: 2px solid var(--gray-800);
    }
    
    .card {
        border: 1px solid var(--gray-600);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .offcanvas,
    .modal,
    .adsense-container,
    .footer {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-400);
    }
}
