:root {
    --lms-ink: #1f2937;
    --lms-muted: #64748b;
    --lms-blue: #2563eb;
    --lms-teal: #0f766e;
    --lms-amber: #d97706;
    --lms-rose: #e11d48;
}

body {
    color: var(--lms-ink);
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    padding: 10px 14px;
    background: #fff;
    color: var(--lms-ink);
    border: 2px solid var(--lms-blue);
    border-radius: 6px;
}

.topnav-dark {
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: #111827;
}

.topnav-dark .navbar-nav .nav-link,
.topnav-dark .navbar-nav .nav-link i {
    color: rgba(255, 255, 255, .86);
}

.topnav-dark .navbar-nav .nav-link:hover,
.topnav-dark .navbar-nav .nav-link.active {
    color: #fff;
}

.topnav-dark .dropdown-menu .dropdown-item {
    color: var(--lms-ink);
}

.topnav-dark .dropdown-menu .dropdown-item:hover,
.topnav-dark .dropdown-menu .dropdown-item:focus,
.topnav-dark .dropdown-menu .dropdown-item.active {
    color: var(--lms-blue);
}

@media (max-width: 991.98px) {
    .topnav .nav-item.dropdown.active > .nav-link {
        color: var(--bs-menu-item-active-color);
    }

    .topnav-dark .nav-item.dropdown.active > .nav-link {
        color: #fff;
    }

    .topnav-dark .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, .82);
    }

    .topnav-dark .dropdown-menu .dropdown-item:hover,
    .topnav-dark .dropdown-menu .dropdown-item:focus,
    .topnav-dark .dropdown-menu .dropdown-item.active {
        color: #fff;
    }
}

.card,
.modal-content,
.dropdown-menu {
    border-radius: 8px;
}

.page-content {
    padding-bottom: 36px;
}

.page-title-box {
    align-items: flex-start;
}

.page-title-box .btn,
.page-title-box form {
    align-self: flex-start;
    flex: 0 0 auto;
}

.lms-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1030;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--lms-blue);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease, background .18s ease;
}

.lms-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lms-back-to-top:hover,
.lms-back-to-top:focus {
    color: #fff;
    background: var(--lms-teal);
}

.lms-back-to-top svg {
    width: 20px;
    height: 20px;
}

.icon-xs {
    width: 14px;
    height: 14px;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

.lms-hero {
    min-height: 280px;
    border-radius: 8px;
    padding: clamp(24px, 4vw, 42px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(15, 118, 110, .66)),
        url("../images/bg-2.jpg") center/cover no-repeat;
}

.lms-hero h1,
.lms-hero h2 {
    max-width: 850px;
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    line-height: 1.15;
    color: #fff;
}

.lms-hero p {
    max-width: 720px;
}

.lms-hero-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 10px;
}

.lms-hero-kpis div {
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    padding: 16px;
    color: #fff;
    backdrop-filter: blur(10px);
}

.lms-hero-kpis strong,
.lms-hero-kpis span {
    display: block;
}

.lms-hero-kpis strong {
    font-size: 1.45rem;
}

.lms-hero-kpis span {
    color: rgba(255, 255, 255, .72);
    font-size: .78rem;
}

.lms-stat-card .avatar-title {
    width: 42px;
    height: 42px;
}

.lms-stat-link {
    color: inherit;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease;
}

.lms-stat-link:hover,
.lms-stat-link:focus {
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
}

.lms-dashboard-band {
    background:
        linear-gradient(120deg, rgba(37, 99, 235, .92), rgba(15, 118, 110, .82)),
        url("../images/bg-3.jpg") center/cover no-repeat;
    border-radius: 8px;
    padding: clamp(22px, 4vw, 38px);
    color: #fff;
}

.lms-dashboard-band p {
    color: rgba(255, 255, 255, .78);
    max-width: 760px;
}

.lms-action-tile {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    padding: 18px;
    height: 100%;
    background: #fff;
    color: var(--lms-ink);
    text-decoration: none;
}

.lms-action-tile:hover {
    border-color: rgba(37, 99, 235, .35);
    color: var(--lms-ink);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.lms-action-tile i,
.lms-action-tile svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--lms-teal);
}

.lms-progress-ring {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: conic-gradient(var(--lms-teal) calc(var(--value) * 1%), #e5e7eb 0);
}

.lms-progress-ring span {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: #fff;
    color: var(--lms-ink);
    font-weight: 700;
}

.lms-feature-card {
    min-height: 174px;
}

.lms-feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--lms-blue);
    background: rgba(37, 99, 235, .1);
}

.lms-feature-icon svg {
    width: 19px;
    height: 19px;
}

.lms-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lms-timeline-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.lms-timeline-item span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 118, 110, .12);
    color: var(--lms-teal);
    font-weight: 700;
}

.lms-timeline-item p {
    margin: 4px 0 0;
    color: var(--lms-muted);
}

.lms-color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid rgba(15, 23, 42, .15);
}

.lms-chart {
    min-height: 300px;
}

.lms-chart-small {
    min-height: 260px;
}

.lms-player {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.lms-player-media {
    min-height: 340px;
    background:
        linear-gradient(0deg, rgba(15, 23, 42, .35), rgba(15, 23, 42, .35)),
        url("../images/bg-1.jpg") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lms-player-poster {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
}

.lms-player-poster svg {
    width: 42px;
    height: 42px;
}

.lms-player-panel {
    padding: 28px;
    align-self: center;
}

.lms-chapter-list {
    max-height: 560px;
    overflow: auto;
}

.lms-chapter-link {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    color: var(--lms-ink);
    text-decoration: none;
    margin-bottom: 10px;
}

.lms-chapter-link.active,
.lms-chapter-link:hover {
    border-color: rgba(37, 99, 235, .45);
    background: rgba(37, 99, 235, .06);
    color: var(--lms-ink);
}

.certificate-preview {
    border: 2px solid rgba(15, 118, 110, .35);
    border-radius: 8px;
    padding: clamp(28px, 5vw, 54px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(240, 253, 250, .9)),
        url("../images/bg-2.jpg") center/cover no-repeat;
}

.certificate-page {
    background: #f8fafc;
}

.certificate-sheet {
    max-width: 1120px;
    margin: 0 auto;
    aspect-ratio: 1.414 / 1;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .92)),
        radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, .16), transparent 30%);
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
    padding: 22px;
}

.certificate-frame {
    position: relative;
    height: 100%;
    border: 6px double rgba(15, 23, 42, .22);
    border-radius: 6px;
    padding: clamp(24px, 4vw, 52px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.certificate-frame::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(37, 99, 235, .18);
    pointer-events: none;
}

.certificate-corner {
    position: absolute;
    width: 78px;
    height: 78px;
    border-color: rgba(15, 118, 110, .38);
}

.certificate-corner-tl {
    top: 18px;
    left: 18px;
    border-top: 3px solid;
    border-left: 3px solid;
}

.certificate-corner-tr {
    top: 18px;
    right: 18px;
    border-top: 3px solid;
    border-right: 3px solid;
}

.certificate-corner-bl {
    bottom: 18px;
    left: 18px;
    border-bottom: 3px solid;
    border-left: 3px solid;
}

.certificate-corner-br {
    right: 18px;
    bottom: 18px;
    border-right: 3px solid;
    border-bottom: 3px solid;
}

.certificate-topline,
.certificate-footer-row {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.certificate-brand {
    display: block;
    color: var(--lms-blue);
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
}

.certificate-topline p,
.certificate-qr span,
.certificate-signature span,
.certificate-meta-grid span {
    color: var(--lms-muted);
}

.certificate-status {
    border: 1px solid rgba(15, 118, 110, .3);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--lms-teal);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
}

.certificate-main {
    position: relative;
    z-index: 1;
    text-align: center;
    margin: auto 0;
}

.certificate-kicker {
    color: var(--lms-amber);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.certificate-main h2 {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    color: var(--lms-muted);
    font-weight: 500;
}

.certificate-main h3 {
    font-size: clamp(2.3rem, 6vw, 4.2rem);
    line-height: 1.05;
    margin: 12px 0;
    color: #111827;
    font-family: Georgia, "Times New Roman", serif;
}

.certificate-main h4 {
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    color: var(--lms-blue);
    max-width: 860px;
    margin: 8px auto 12px;
}

.certificate-copy {
    max-width: 780px;
    margin: 0 auto;
    color: var(--lms-muted);
    font-size: 1.03rem;
}

.certificate-meta-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.certificate-meta-grid div,
.certificate-detail-card .row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.certificate-meta-grid div {
    border-top: 1px solid rgba(15, 23, 42, .14);
    padding-top: 12px;
}

.certificate-meta-grid strong {
    color: #111827;
    word-break: break-word;
}

.certificate-signature {
    min-width: 220px;
}

.certificate-signature div {
    width: 220px;
    border-top: 2px solid rgba(15, 23, 42, .5);
    margin-bottom: 10px;
}

.certificate-seal {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 3px solid rgba(217, 119, 6, .36);
    outline: 1px solid rgba(217, 119, 6, .28);
    outline-offset: -10px;
    color: var(--lms-amber);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.5rem;
    font-weight: 800;
}

.certificate-qr {
    text-align: center;
}

.certificate-qr-svg {
    display: block;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.certificate-detail-card a {
    word-break: break-all;
}

.auth-bg {
    min-height: 100%;
    background:
        linear-gradient(0deg, rgba(15, 23, 42, .25), rgba(15, 23, 42, .25)),
        url("../images/auth-bg.jpg") center/cover no-repeat;
    position: relative;
}

.auth-bg .bg-overlay {
    opacity: .58;
}

.auth-bg > .row,
.auth-bg > *:not(.bg-overlay) {
    position: relative;
    z-index: 1;
}

.table-nowrap th,
.table-nowrap td {
    white-space: nowrap;
}

.form-control[type="color"] {
    min-height: 38px;
}

@media (max-width: 991.98px) {
    .lms-hero,
    .lms-player {
        grid-template-columns: 1fr;
    }

    .lms-hero-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .certificate-sheet {
        aspect-ratio: auto;
    }

    .certificate-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .certificate-footer-row {
        align-items: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .lms-hero {
        padding: 24px;
    }

    .lms-hero-kpis {
        grid-template-columns: 1fr;
    }

    .lms-player-media {
        min-height: 230px;
    }

    .certificate-frame {
        padding: 26px 18px;
    }

    .certificate-meta-grid {
        grid-template-columns: 1fr;
    }

    .certificate-seal {
        width: 88px;
        height: 88px;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }

    body {
        background: #fff !important;
    }

    #page-topbar,
    .topnav,
    .footer,
    .rightbar-overlay,
    .lms-back-to-top,
    .certificate-actions,
    .certificate-detail-card {
        display: none !important;
    }

    .main-content,
    .page-content,
    .certificate-page,
    .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .certificate-sheet {
        width: 297mm;
        height: 210mm;
        max-width: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 10mm;
    }
}

.public-home {
    background: #fff;
}

.public-nav {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    backdrop-filter: blur(12px);
}

.public-mega-menu {
    width: 100%;
    left: 0;
    right: 0;
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, .08);
    border-radius: 0;
    padding: 22px 0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

.public-mega-link {
    display: block;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    color: var(--lms-ink);
    text-decoration: none;
    background: #fff;
}

.public-mega-link span,
.public-mega-link small {
    display: block;
}

.public-mega-link small {
    color: var(--lms-muted);
}

.public-hero {
    margin-top: 70px;
}

.public-hero-slide {
    position: relative;
    min-height: 620px;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
}

.public-hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, .86), rgba(15, 23, 42, .38));
}

.public-hero-slide > .container {
    position: relative;
    z-index: 1;
}

.public-hero-copy {
    max-width: 760px;
    color: #fff;
}

.public-hero-copy h1 {
    font-size: clamp(2rem, 5vw, 4.6rem);
    line-height: 1.02;
    margin-bottom: 18px;
    color: #fff;
}

.public-hero-copy p {
    max-width: 640px;
    color: rgba(255, 255, 255, .82);
    font-size: 1.08rem;
    margin-bottom: 28px;
}

.public-section {
    padding: 72px 0;
}

.public-muted {
    background: #f8fafc;
}

.public-title {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    margin-bottom: 8px;
}

.public-counters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    overflow: hidden;
}

.public-counters div {
    padding: 34px 28px;
    background: #fff;
    border-right: 1px solid rgba(15, 23, 42, .08);
}

.public-counters div:last-child {
    border-right: 0;
}

.public-counters strong {
    display: block;
    font-size: 2.35rem;
    color: var(--lms-blue);
}

.public-counters span {
    color: var(--lms-muted);
}

.public-course,
.public-review {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    padding: 24px;
    background: #fff;
}

.public-course img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 18px;
}

.public-course h3 {
    font-size: 1.1rem;
    min-height: 52px;
}

.public-course p {
    color: var(--lms-muted);
    min-height: 72px;
}

.public-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--lms-muted);
    font-size: .88rem;
}

.public-review p {
    color: var(--lms-ink);
    font-size: 1rem;
}

.public-review strong,
.public-review span {
    display: block;
}

.public-review span {
    color: var(--lms-muted);
}

.instructor-public-hero {
    margin-top: 70px;
    min-height: 560px;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    color: #fff;
}

.instructor-public-copy {
    max-width: 780px;
    padding: 96px 0;
}

.instructor-public-copy h1 {
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.04;
    margin-bottom: 18px;
    color: #fff;
}

.instructor-public-copy .lead {
    max-width: 680px;
    color: rgba(255, 255, 255, .84);
    margin-bottom: 28px;
}

.instructor-public-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.instructor-public-logo,
.instructor-public-avatar {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, .82);
    background: #fff;
}

.instructor-public-logo {
    border-radius: 8px;
    padding: 10px;
}

.instructor-public-avatar {
    border-radius: 50%;
}

.instructor-contact-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    padding: 24px;
    background: #fff;
}

.instructor-contact-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--lms-ink);
    text-decoration: none;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.instructor-contact-panel a:last-child {
    border-bottom: 0;
}

.instructor-contact-panel svg {
    width: 18px;
    height: 18px;
    color: var(--lms-teal);
    flex: 0 0 18px;
}

.public-footer {
    padding: 28px 0;
    background: #0f172a;
    color: rgba(255, 255, 255, .78);
}

.public-footer a {
    color: #fff;
}

@media (max-width: 767.98px) {
    .public-hero-slide {
        min-height: 540px;
    }

    .instructor-public-hero {
        min-height: 520px;
    }

    .instructor-public-copy {
        padding: 72px 0;
    }

    .public-counters {
        grid-template-columns: 1fr;
    }

    .public-counters div {
        border-right: 0;
        border-bottom: 1px solid rgba(15, 23, 42, .08);
    }

    .public-counters div:last-child {
        border-bottom: 0;
    }
}
