/* File: learner/assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    --sidebar-bg: #ffffff;
    --sidebar-width: 260px;
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
}

/* --- LOGIN & REGISTER PAGE STYLES --- */
.login-body {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Constrain the width on desktop */
.login-card {
    width: 100%;
    max-width: 420px;
    /* Fixes the "too big on desktop" issue */
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    margin: auto;
    /* Ensures centering if flex fails */
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem auto;
}

/* --- SIDEBAR LAYOUT --- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-menu {
    padding: 1rem 0;
    flex-grow: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.sidebar-link.active {
    background-color: #eef2ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-link i {
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2rem;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }

    .mobile-toggle {
        display: block !important;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1100;
        background: white;
        padding: 0.5rem;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

.mobile-toggle {
    display: none;
}

/* --- COMPONENT STYLES --- */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
    font-weight: 600;
}

.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    background: #eef2ff;
    color: var(--primary-color);
}

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

/* --- MODERN FORM INPUTS --- */
.form-control,
.form-select {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    padding: 0.75rem 0.25rem;
    box-shadow: none !important;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-bottom-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.01);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.input-group-text {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    color: var(--text-muted);
    padding-left: 0.5rem;
}

.input-group:focus-within .input-group-text {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.input-group .form-control {
    margin-left: 0;
    padding-left: 0.75rem;
}