/* LMS Specific Styles - Corporate & Clean */

/* General LMS Layout */
.lms-body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #e2e8f0 0%, #f8fafc 100%);
}

.lms-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--dark);
    /* Corporate Navy */
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    border-left: 3px solid var(--primary);
}

.nav-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
}

.user-mini-profile {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-info {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
}

.user-info span {
    color: #64748b;
    font-size: 0.75rem;
}

/* Main Content Area */
.lms-content {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
    width: calc(100% - 260px);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: white !important;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-icon:hover {
    background: var(--light);
}

.top-actions {
    display: flex;
    gap: 1rem;
}

/* Login Page */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    padding: 2.5rem;
    border-radius: 16px;
    background: white !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    margin: 1rem 0 0.5rem;
    color: var(--dark);
}

.login-header p {
    font-size: 0.9rem;
    color: var(--gray);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    transition: 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.forgot-link {
    color: var(--primary-dark-dark);
    /* Fallback */
    color: #b7791f;
    font-weight: 500;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

.login-footer a {
    color: var(--dark);
    font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.full-width-col {
    grid-column: span 3;
}

.metric-card {
    padding: 1.5rem;
    border-radius: 12px;
    background: white !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card h3 {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.metric-trend {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.metric-trend.positive {
    color: #10b981;
}

.section-title {
    margin: 2rem 0 1rem;
    font-size: 1.2rem;
    color: var(--dark);
}

/* Course Listing */
.course-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.course-card {
    border-radius: 12px;
    overflow: hidden;
    background: white !important;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #f1f5f9;
}

.course-card:hover:not(.locked) {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.course-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(1);
}

.course-thumb {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.in-progress {
    background: var(--primary);
    color: var(--dark);
}

.status-badge.locked {
    background: #e2e8f0;
    color: #64748b;
}

.course-details {
    padding: 1.25rem;
}

.course-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.instructor {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.progress-wrapper {
    margin-top: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 0.4rem;
}

.progress-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 3px;
}

.progress-bar-sm {
    height: 4px;
    background: #f1f5f9;
    border-radius: 2px;
    width: 100%;
    margin-top: 10px;
}

.progress-bar-sm .fill {
    height: 100%;
    background: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .logo,
    .sidebar .user-info,
    .sidebar-nav span {
        display: none;
    }

    .lms-content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }

    .nav-item {
        justify-content: center;
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .full-width-col {
        grid-column: span 1;
    }
}