/* ========================================
   LEARN ONLINE UGANDA - MAIN STYLESHEET
   Brand Colors: #3B9E9E (Primary)
                 #0F172A (Secondary)
   ======================================== */

/* ===== IMPORTS ===== */
@import url('dark-mode.css');
@import url('responsive.css');

/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #3B9E9E;
    --primary-dark: #2D7A7A;
    --primary-light: #5BB5B5;
    --secondary: #0F172A;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --light-bg: #F8FAFC;
    --dark-bg: #0F172A;
    --text-dark: #1E293B;
    --text-light: #F8FAFC;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.text-primary-custom { color: var(--primary); }
.text-secondary-custom { color: var(--secondary); }
.text-success-custom { color: var(--success); }
.text-warning-custom { color: var(--warning); }
.text-danger-custom { color: var(--danger); }

.bg-primary-custom { background-color: var(--primary); }
.bg-secondary-custom { background-color: var(--secondary); }

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-custom {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.btn-secondary-custom:hover {
    background-color: #1E293B;
    border-color: #1E293B;
    color: #fff;
}

.btn-outline-primary-custom {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary-custom:hover {
    background-color: var(--primary);
    color: #fff;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: #fff;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: #fff;
    border-bottom: 2px solid var(--primary);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* ===== STATS CARDS (Dashboard) ===== */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.15;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-card .stat-label {
    color: #64748B;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.stat-primary { border-left-color: var(--primary); }
.stat-card.stat-success { border-left-color: var(--success); }
.stat-card.stat-warning { border-left-color: var(--warning); }
.stat-card.stat-danger { border-left-color: var(--danger); }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--secondary);
    color: #fff;
    padding: 1.5rem 0;
    transition: var(--transition);
    z-index: 1040;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
    text-align: center;
}

.sidebar .brand h3 {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.sidebar .brand small {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.sidebar .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.7rem 1.5rem;
    transition: var(--transition);
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

.sidebar .nav-link.active {
    color: #fff;
    background: var(--primary);
    box-shadow: inset 4px 0 0 #fff;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
    background: #fff;
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.top-navbar .toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: none;
}

.top-navbar .user-dropdown {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-navbar .user-dropdown .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    padding: 1.5rem;
    flex: 1;
    min-height: 100vh;
    transition: var(--transition);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: transparent;
    padding: 0 0 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-item a {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--secondary);
    font-weight: 600;
}

/* ===== TABLES ===== */
.table {
    font-size: 0.9rem;
}

.table thead {
    background: var(--secondary);
    color: #fff;
}

.table thead th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(59, 158, 158, 0.05);
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* ===== FORMS ===== */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 158, 158, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

/* ===== BADGES ===== */
.badge-status {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-status.active { background: #D1FAE5; color: #065F46; }
.badge-status.pending { background: #FEF3C7; color: #92400E; }
.badge-status.completed { background: #DBEAFE; color: #1E40AF; }
.badge-status.cancelled { background: #FEE2E2; color: #991B1B; }
.badge-status.inactive { background: #E2E8F0; color: #475569; }

/* ===== PROFILE IMAGE ===== */
.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    padding: 3px;
    background: #fff;
}

.profile-img-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== NOTIFICATIONS ===== */
.notification-badge {
    position: relative;
}

.notification-badge .badge-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== FOOTER ===== */
.footer {
    background: #fff;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: #64748B;
    margin-left: 260px;
    transition: var(--transition);
}

.footer strong {
    color: var(--primary);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1.5rem;
}

.login-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease;
}

.login-box .brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-box .brand h2 {
    color: var(--secondary);
    font-weight: 700;
}

.login-box .brand small {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

.login-box .form-control {
    padding: 0.75rem 1rem;
}

.login-box .btn-login {
    padding: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== LOADING ===== */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar, .top-navbar, .footer {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}