:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4081;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --sidebar-width: 250px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a2980 0%, #26d0ce 100%); /* Deep blue to cyan */
    color: white;
    position: fixed;
    height: 100vh;
    padding-top: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.nav-links li {
    padding: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    font-size: 1.05rem;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.nav-icon {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
    transition: all 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

/* Loading Spinner */
.loader-container {
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    padding: 40px;
    flex-direction: column;
}

.loader {
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid var(--secondary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid Layout for Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.3s;
    border-bottom: 4px solid transparent;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--accent-color);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.stat-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.stat-desc {
    color: #666;
    font-size: 0.9rem;
}

/* Typography */
h1, h2, h3 {
    color: #2c3e50;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.markdown-content {
    line-height: 1.8;
    color: #444;
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

.markdown-content p {
    margin-bottom: 1em;
}

.markdown-content ul {
    padding-left: 20px;
}

.markdown-content li {
    margin-bottom: 0.5em;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.info-item strong {
    display: block;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
        overflow: hidden;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .sidebar.active {
        width: 250px;
        padding-top: 60px;
    }
}

.mobile-nav-toggle {
    display: none;
}

/* Flash Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}
