/* LMS — Luma-inspired layout inside MusicStream patterns.
   Center content is black text on white (user preference).
   Dark navy sidebar + white cards + blue accent. */

.lms-shell {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    width: 100%;
}

.lms-sidebar {
    flex: 0 0 248px;
    width: 248px;
    background: linear-gradient(180deg, #191e4d 0%, #232a63 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.1rem 0.85rem 1.25rem;
    box-shadow: 0 10px 30px rgba(25, 30, 77, 0.28);
    position: sticky;
    top: 1rem;
}

.lms-sidebar-brand {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.6rem 0.85rem;
    color: #fff;
}

.lms-sidebar-brand small {
    display: block;
    font-weight: 500;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.lms-sidebar-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 0.9rem 0.6rem 0.4rem;
}

.lms-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.65rem;
    border-radius: 9px;
    margin-bottom: 0.15rem;
    transition: background 0.12s ease, color 0.12s ease;
}

.lms-sidebar-link i {
    font-size: 1rem;
    width: 1.15rem;
    text-align: center;
    flex-shrink: 0;
}

.lms-sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.lms-sidebar-link.active {
    background: #5567ff;
    color: #fff;
    box-shadow: 0 4px 14px rgba(85, 103, 255, 0.45);
}

.lms-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lms-card {
    background: #ffffff;
    color: #111318;
    border: 1px solid #e6e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(20, 24, 60, 0.06);
    padding: 1.35rem 1.5rem;
}

.lms-card h1, .lms-card h2, .lms-card h3, .lms-card h4 {
    color: #111318;
}

.lms-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #111318;
}

.lms-muted { color: #6b7280 !important; }
.lms-small { font-size: 0.85rem; }

.lms-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.lms-stat {
    background: #ffffff;
    color: #111318;
    border: 1px solid #e6e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(20, 24, 60, 0.06);
    padding: 1.1rem 1.25rem;
}

.lms-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    color: #191e4d;
}

.lms-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-top: 0.3rem;
}

.lms-stat-icon {
    font-size: 1.3rem;
    color: #5567ff;
    margin-bottom: 0.5rem;
    display: block;
}

.lms-hero-player {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.lms-hero-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.lms-player-placeholder {
    aspect-ratio: 16 / 9;
    background: #0b0d1f;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    font-size: 0.95rem;
}

.lms-player-placeholder i { font-size: 2.6rem; color: rgba(255,255,255,0.5); }

.lms-player-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.7rem;
    color: #111318;
    font-size: 0.85rem;
    font-weight: 600;
}

.lms-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}

.lms-course-card {
    background: #fff;
    color: #111318;
    border: 1px solid #e6e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(20, 24, 60, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lms-course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(20, 24, 60, 0.12);
}

.lms-course-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #232a63, #5567ff);
    overflow: hidden;
    position: relative;
}

.lms-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lms-course-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 2.2rem;
}

.lms-course-body {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.lms-course-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111318;
    margin: 0;
}

.lms-course-title a { color: #111318; text-decoration: none; }
.lms-course-title a:hover { color: #5567ff; }

.lms-course-meta {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    align-items: center;
}

.lms-stars { color: #f5a623; font-weight: 700; }

.lms-progress {
    height: 8px;
    background: #eceef6;
    border-radius: 999px;
    overflow: hidden;
    width: 100%;
}

.lms-progress-bar {
    height: 100%;
    background: #5567ff;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.lms-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: #eceef6;
    color: #232a63;
    white-space: nowrap;
}

.lms-badge-free { background: #e6f7ec; color: #137333; }
.lms-badge-private { background: #fdeeda; color: #9a5b00; }
.lms-badge-enrolled { background: #e3e8ff; color: #2c3cb8; }
.lms-badge-pass { background: #e6f7ec; color: #137333; }
.lms-badge-fail { background: #fdecec; color: #b3261e; }
.lms-badge-pending { background: #fff4d6; color: #8a6d00; }
.lms-badge-paid { background: #e6f7ec; color: #137333; }
.lms-badge-preview { background: #191e4d; color: #fff; }

.lms-btn-primary {
    background: #5567ff;
    border: 1px solid #5567ff;
    color: #fff;
    font-weight: 600;
    border-radius: 9px;
    padding: 0.55rem 1.2rem;
    text-decoration: none;
    display: inline-block;
}

.lms-btn-primary:hover { background: #4353d6; border-color: #4353d6; color: #fff; }

.lms-lesson-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.75rem;
    border-radius: 9px;
    color: #111318;
    text-decoration: none;
}

a.lms-lesson-row:hover { background: #f4f6ff; color: #111318; }

.lms-lesson-row.active { background: #eef1ff; }

.lms-lesson-row.locked { opacity: 0.65; }

.lms-lesson-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eef1ff;
    color: #5567ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.lms-lesson-row.active .lms-lesson-icon { background: #5567ff; color: #fff; }

.lms-check { color: #137333; font-size: 1.05rem; flex-shrink: 0; }
.lms-lock { color: #9aa0b4; flex-shrink: 0; }

.lms-module-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 1.1rem 0 0.4rem;
}

.lms-module-title:first-child { margin-top: 0; }

.lms-table {
    width: 100%;
    border-collapse: collapse;
    color: #111318;
    font-size: 0.9rem;
}

.lms-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #6b7280;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid #eceef6;
}

.lms-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #f0f1f8;
    vertical-align: middle;
}

.lms-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #6b7280;
}

.lms-empty i { font-size: 2.2rem; display: block; margin-bottom: 0.75rem; color: #c3c8dd; }
.lms-empty h3 { color: #111318; font-size: 1.05rem; margin-bottom: 0.4rem; }

.lms-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    height: 170px;
    padding-top: 0.5rem;
}

.lms-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    height: 100%;
    justify-content: flex-end;
}

.lms-bar {
    width: 100%;
    max-width: 42px;
    background: linear-gradient(180deg, #5567ff, #8b98ff);
    border-radius: 6px 6px 0 0;
    min-height: 3px;
}

.lms-bar-label { font-size: 0.66rem; color: #6b7280; font-weight: 600; white-space: nowrap; }
.lms-bar-value { font-size: 0.66rem; color: #111318; font-weight: 700; white-space: nowrap; }

.lms-achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.lms-achievement {
    background: #fff;
    border: 1px solid #e6e8f0;
    border-radius: 14px;
    padding: 1.2rem 1rem;
    text-align: center;
    color: #111318;
}

.lms-achievement.locked { opacity: 0.55; filter: grayscale(0.6); }

.lms-achievement-icon {
    font-size: 2rem;
    color: #5567ff;
    display: block;
    margin-bottom: 0.55rem;
}

.lms-text-content {
    white-space: pre-wrap;
    line-height: 1.75;
    color: #111318;
    font-size: 0.98rem;
}

.lms-form-control {
    width: 100%;
    border: 1px solid #d9dce8;
    border-radius: 9px;
    padding: 0.55rem 0.8rem;
    font-size: 0.92rem;
    color: #111318;
    background: #fff;
}

.lms-form-control:focus {
    outline: none;
    border-color: #5567ff;
    box-shadow: 0 0 0 3px rgba(85, 103, 255, 0.18);
}

.lms-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0f1f8;
    color: #111318;
}

.lms-toggle-row:last-child { border-bottom: none; }

/* Certificate (printable) */
.lms-cert-wrap { background: #f3f4fa; padding: 1.5rem; border-radius: 14px; }

.lms-certificate {
    background: #fff;
    color: #111318;
    border: 3px double #191e4d;
    border-radius: 6px;
    padding: 3rem 3.5rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(20, 24, 60, 0.12);
}

.lms-certificate .cert-eyebrow {
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 700;
}

.lms-certificate .cert-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #191e4d;
    margin: 0.8rem 0 1rem;
}

.lms-certificate .cert-name {
    font-size: 1.9rem;
    font-weight: 800;
    color: #111318;
    border-bottom: 2px solid #5567ff;
    display: inline-block;
    padding: 0 1.5rem 0.4rem;
    margin: 0.8rem 0 1rem;
}

.lms-certificate .cert-body { color: #333a4d; line-height: 1.7; max-width: 620px; margin: 0 auto; }
.lms-certificate .cert-course { font-size: 1.25rem; font-weight: 700; color: #191e4d; margin: 0.6rem 0; }
.lms-certificate .cert-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; font-size: 0.85rem; color: #6b7280; flex-wrap: wrap; }
.lms-certificate .cert-signer { font-weight: 700; color: #111318; border-top: 1px solid #c9cede; padding-top: 0.4rem; }

@media (max-width: 900px) {
    .lms-shell { flex-direction: column; }
    .lms-sidebar { flex: none; width: 100%; position: static; }
    .lms-certificate { padding: 2rem 1.25rem; }
}

@media print {
    .no-print, .lms-sidebar, nav.navbar, .site-footer { display: none !important; }
    .lms-shell { display: block; }
    .lms-main { display: block; }
    .lms-card { box-shadow: none; border: none; padding: 0; }
    .lms-cert-wrap { background: #fff; padding: 0; }
    .lms-certificate { box-shadow: none; max-width: none; }
    body { background: #fff !important; }
}
