/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #f0f2f5;
}

/* App Layout with Sidebar */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #1a2a3a;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.sidebar-logo {
    text-align: center;
    padding: 25px 15px;
    background: #3a4e9a;
    margin-bottom: 20px;
}

.sidebar-logo img {
    width: 70px;
    height: auto;
    background: white;
    border-radius: 50%;
    padding: 8px;
    margin-bottom: 10px;
}

.sidebar-logo span {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 0 15px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #ddd;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.sidebar-nav a i {
    width: 24px;
    font-size: 1.1rem;
}

.sidebar-nav a:hover {
    background: #2c3e50;
    color: white;
}

.sidebar-logout {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 1px solid #2c3e50;
}

.sidebar-logout a {
    background: #b00020;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 30px;
    text-decoration: none;
}

/* Main Area (right side) */
.main-area {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

/* User greeting bar */
.user-greeting-bar {
    background: #f8fafc;
    padding: 12px 25px;
    text-align: right;
    font-weight: 500;
    color: #1a5f4a;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

/* Page Content */
.page-content {
    padding: 25px;
    flex: 1;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 25px;
}

.dashboard-header h2 {
    font-size: 1.6rem;
    color: #2c3e2f;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #6c757d;
}

/* Stats Cards (3D style) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05), 0 6px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-bottom: 4px solid #3a4e9a;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3a4e9a;
}

/* General Card */
.card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h3, .card h4 {
    margin-bottom: 15px;
    color: #2c3e2f;
}

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

button, .btn-sm, .btn-primary {
    background: #3a4e9a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn-sm:hover, .btn-primary:hover {
    background: #2c3e6e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    background: #1a5f4a;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background: #f8f9fa;
    color: #3a4e9a;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Success / Error Messages */
.success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 30px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 30px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

/* Course Actions & Links */
.course-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.course-actions a {
    background: #eef2f5;
    color: #1a5f4a;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    text-decoration: none;
}

/* Charts */
.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.chart-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.menu-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #2c3e2f;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f2f5;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.menu-card i {
    font-size: 2rem;
    color: #3a4e9a;
    margin-bottom: 10px;
    display: block;
}

.menu-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.menu-card p {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Footer */
.main-footer {
    background: #0b3b2f;
    color: #ddd;
    padding: 25px 25px 15px;
    margin-top: 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin: 20px 0;
}

.footer-col h4 {
    color: white;
    margin-bottom: 12px;
}

.footer-col ul, .footer-col p {
    list-style: none;
    font-size: 0.8rem;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
}

.footer-col a:hover {
    color: #ffc107;
}

.social-links a {
    display: block;
    margin-bottom: 6px;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #2c5a4a;
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        overflow-x: hidden;
    }
    .sidebar-logo span, .sidebar-nav a span {
        display: none;
    }
    .sidebar-nav a {
        justify-content: center;
        padding: 12px 0;
    }
    .main-area {
        margin-left: 70px;
    }
    .chart-row {
        grid-template-columns: 1fr;
    }
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Container for admin edit pages (non-sidebar pages) */
.container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}