/* EduPlan - Custom Styles */

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--light-color);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    border-right: 1px solid #e5e7eb;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.show {
    transform: translateX(0);
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.sidebar-body {
    padding: 1.25rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.sidebar-toggle {
    border: none;
    background: none;
    color: #6b7280;
    padding: 0.25rem;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
}

/* User Info */
.user-info {
    padding: 0 1.25rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Navigation */
.sidebar-nav {
    padding: 0 1rem;
}

.nav-link {
    color: #6b7280;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    border: none;
}

.nav-link:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
}

/* Main Content */
.main-content {
    margin-left: 0;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (min-width: 992px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }
}

.main-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-body {
    padding: 1.5rem;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Cards */
.card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.card-header {
    padding: 1.25rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0.75rem 0.75rem 0 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

/* Login Page Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.form-control {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.input-group-text {
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
}

.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* Modal Styles */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem;
}

/* Calendar Styles */
.fc {
    font-size: 14px;
}

.fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.fc-button-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.fc-button-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.fc-event {
    border-radius: 0.375rem;
    border: none;
    padding: 0.25rem 0.5rem;
}

/* List Styles */
.list-group-item {
    border: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

.list-group-item:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.list-group-item:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Badge Styles */
.badge {
    font-size: 12px;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Offline Indicator */
.offline-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 0.375rem;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .main-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .main-body {
        padding: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .row.mb-4 .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .d-flex.justify-content-between .btn {
        align-self: flex-start;
    }
}

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

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

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

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

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

/* Print Styles */
@media print {
    .sidebar,
    .main-header,
    .btn,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}