* {
    box-sizing: border-box;
}

body.lms-body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #173042;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 28%),
        linear-gradient(180deg, #f4f8fb 0%, #eef4f7 100%);
}

a {
    color: inherit;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.lms-shell,
.lms-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.lms-home-shell,
.lms-auth-shell {
    min-height: 100vh;
    display: grid;
    align-items: center;
    gap: 24px;
    padding: 32px 0;
}

.lms-home-shell {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.lms-brand-block {
    max-width: 760px;
}

.lms-eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0e7490;
}

.lms-hero h1,
.lms-panel h1,
.lms-topbar h1 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.lms-hero p,
.lms-muted,
.lms-lesson-content,
.lms-detail-list dd {
    color: #486275;
}

.lms-topbar-copy {
    max-width: 700px;
    margin: 0;
    color: #5a7284;
    line-height: 1.55;
}

.lms-panel,
.lms-card,
.lms-course-card,
.lms-module {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.lms-panel,
.lms-hero,
.lms-card,
.lms-course-card,
.lms-module {
    padding: 24px;
}

.lms-panel-form {
    max-width: 480px;
    margin: 0 auto;
}

.lms-actions,
.lms-course-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.lms-btn,
.lms-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

.lms-btn-primary {
    background: #0f766e;
    color: #fff;
    border: 0;
}

.lms-btn-secondary {
    background: #fff;
    color: #0f766e;
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.lms-form {
    display: grid;
    gap: 16px;
    margin: 24px 0;
}

.lms-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.lms-form input {
    width: 100%;
    border: 1px solid rgba(23, 48, 66, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    background: #fff;
}

.lms-alert {
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    padding: 14px 16px;
}

.lms-alert-page {
    margin-bottom: 20px;
}

.lms-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.92rem;
    color: #5a7284;
}

.lms-breadcrumbs a {
    text-decoration: none;
    color: #0e7490;
}

.lms-topbar {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.lms-userbox {
    text-align: right;
}

.lms-userbox-label {
    color: #5d7585;
    font-size: 0.84rem;
    margin-bottom: 4px;
}

.lms-userbox-name {
    font-weight: 700;
}

.lms-grid {
    display: grid;
    gap: 18px;
}

.lms-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.lms-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.lms-kpi-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.lms-kpi-label {
    color: #5d7585;
    font-size: 0.92rem;
}

.lms-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 8px;
}

.lms-card-label {
    color: #5d7585;
    font-size: 0.92rem;
}

.lms-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 8px;
}

.lms-section {
    margin-bottom: 28px;
}

.lms-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    margin-bottom: 16px;
}

.lms-courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.lms-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}

.lms-course-card h3,
.lms-module h3,
.lms-panel h2 {
    margin: 0 0 10px;
}

.lms-course-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lms-course-card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.lms-course-instructor {
    color: #5d7585;
    font-size: 0.92rem;
}

.lms-course-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f766e;
}

.lms-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lms-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    background: #0f766e;
    color: #fff;
}

.lms-badge-soft {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.lms-course-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.lms-inline-data,
.lms-detail-list {
    margin: 18px 0 0;
    display: grid;
    gap: 10px;
}

.lms-inline-data {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lms-inline-data dt,
.lms-detail-list dt {
    font-size: 0.82rem;
    color: #5d7585;
}

.lms-inline-data dd,
.lms-detail-list dd {
    margin: 4px 0 0;
    font-weight: 600;
}

.lms-course-layout {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
}

.lms-lesson-layout {
    grid-template-columns: minmax(0, 1.3fr) 340px;
    align-items: start;
}

.lms-course-shell,
.lms-lesson-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.lms-sidebar {
    position: sticky;
    top: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 20px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    padding: 18px;
}

.lms-sidebar-head {
    margin-bottom: 16px;
}

.lms-sidebar-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.lms-sidebar-modules {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.lms-module-group {
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 14px;
    background: #f8fbfc;
    overflow: hidden;
}

.lms-module-group summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-weight: 700;
}

.lms-module-group summary::-webkit-details-marker {
    display: none;
}

.lms-module-list {
    display: grid;
    gap: 8px;
    padding: 0 10px 12px;
}

.lms-sidebar-link {
    display: block;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(23, 48, 66, 0.08);
}

.lms-sidebar-link.is-current {
    border-color: rgba(15, 118, 110, 0.35);
    background: rgba(15, 118, 110, 0.08);
}

.lms-sidebar-link.is-recent {
    border-color: rgba(14, 116, 144, 0.25);
}

.lms-sidebar-link-title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.lms-sidebar-link-meta,
.lms-sidebar-empty {
    color: #5d7585;
    font-size: 0.84rem;
}

.lms-main-column {
    display: grid;
    gap: 22px;
}

.lms-hero-card,
.lms-lesson-hero-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.lms-hero-card-top,
.lms-lesson-hero-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.lms-hero-actions,
.lms-lesson-nav,
.lms-lesson-footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lms-course-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.lms-course-summary-grid article {
    background: #f8fbfc;
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
}

.lms-summary-label {
    color: #5d7585;
    font-size: 0.84rem;
}

.lms-summary-value {
    margin-top: 6px;
    font-weight: 700;
}

.lms-main-panels {
    display: grid;
    gap: 22px;
}

.lms-content-copy {
    white-space: pre-line;
    line-height: 1.7;
    color: #355367;
}

.lms-reading-content {
    font-size: 1.04rem;
}

.lms-outline {
    display: grid;
    gap: 16px;
}

.lms-outline-item {
    border: 1px solid rgba(23, 48, 66, 0.08);
    border-radius: 16px;
    background: #f8fbfc;
    padding: 16px;
}

.lms-outline-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.lms-outline-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.lms-outline-lessons {
    display: grid;
    gap: 8px;
}

.lms-outline-link {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(23, 48, 66, 0.08);
}

.lms-outline-link.is-current {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.3);
}

.lms-modules {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.lms-module-head {
    margin-bottom: 16px;
}

.lms-lessons {
    display: grid;
    gap: 12px;
}

.lms-lesson,
.lms-lesson-card,
.lms-material-item {
    border-radius: 14px;
    background: #f8fbfc;
    border: 1px solid rgba(23, 48, 66, 0.08);
    padding: 16px;
}

.lms-lesson-card,
.lms-material-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.lms-lesson-actions {
    display: flex;
    gap: 8px;
}

.lms-lesson-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.lms-lesson-content {
    white-space: pre-line;
    line-height: 1.55;
}

.lms-list {
    margin: 16px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.lms-empty {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(23, 48, 66, 0.15);
    color: #5d7585;
}

.lms-progress-wrap {
    margin-top: 18px;
}

.lms-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.lms-progress-bar {
    width: 100%;
    height: 12px;
    background: #dbe7ec;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.lms-progress-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
}

.lms-next-box,
.lms-resource-box,
.lms-mini-map {
    margin-top: 20px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fbfc;
    border: 1px solid rgba(23, 48, 66, 0.08);
}

.lms-content-block {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fbfc;
    border: 1px solid rgba(23, 48, 66, 0.08);
    white-space: pre-line;
    line-height: 1.6;
    color: #325063;
}

.lms-material-list {
    display: grid;
    gap: 10px;
}

.lms-lesson-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 28px;
    align-items: center;
}

.lms-video-box {
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(14, 116, 144, 0.08));
    border: 1px solid rgba(15, 118, 110, 0.15);
    margin-bottom: 18px;
}

.small {
    font-size: 0.9rem;
}

.fw-semibold {
    font-weight: 700;
}

.text-dark {
    color: #173042;
}

.text-muted {
    color: #5d7585;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

@media (max-width: 980px) {
    .lms-home-shell,
    .lms-course-layout,
    .lms-lesson-layout,
    .lms-summary-grid,
    .lms-kpi-grid,
    .lms-course-shell,
    .lms-lesson-shell,
    .lms-course-summary-grid {
        grid-template-columns: 1fr;
    }

    .lms-topbar,
    .lms-section-head,
    .lms-hero-card-top,
    .lms-lesson-hero-top,
    .lms-outline-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .lms-userbox {
        text-align: left;
    }

    .lms-sidebar {
        position: static;
    }
}

@media (max-width: 680px) {
    .lms-shell,
    .lms-page,
    .lms-topbar {
        width: min(100%, calc(100% - 20px));
    }

    .lms-inline-data,
    .lms-lesson-card,
    .lms-material-item {
        grid-template-columns: 1fr;
    }

    .lms-lesson-card,
    .lms-material-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
