:root {
    --bg: #050816;
    --bg-soft: #0b1022;
    --surface: rgba(16, 24, 46, 0.88);
    --surface-solid: #11182f;
    --surface-alt: #151d39;
    --line: rgba(244, 114, 182, 0.22);
    --primary: #f72585;
    --primary-strong: #be185d;
    --secondary: #8b5cf6;
    --accent: #38bdf8;
    --accent-rose: #fb7185;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #8ea0c0;
    --shadow: 0 24px 80px rgba(4, 12, 32, 0.45);
    --radius: 24px;
    --radius-sm: 14px;
    --max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(247, 37, 133, 0.26), transparent 30%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.2), transparent 28%),
        radial-gradient(circle at 50% 10%, rgba(251, 113, 133, 0.12), transparent 26%),
        linear-gradient(180deg, #040510 0%, #060b18 48%, #04060f 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(10, 15, 32, 0.9);
    color: var(--text);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.page-shell {
    position: relative;
    overflow: hidden;
}

.container {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
}

.workspace-shell {
    width: min(calc(100% - 1rem), 1680px);
    margin: 0 auto;
    padding: 1rem 0 2.8rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(18px);
    background: rgba(4, 8, 22, 0.74);
    border-bottom: 1px solid rgba(244, 114, 182, 0.12);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-family: "Space Grotesk", "Outfit", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 14px 30px rgba(247, 37, 133, 0.32);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text-soft);
    font-weight: 500;
}

.nav-link.active,
.nav-link:hover {
    color: var(--text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-toggle {
    display: none;
}

.hero {
    padding: 5rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 2rem;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(247, 37, 133, 0.12);
    border: 1px solid rgba(247, 37, 133, 0.28);
    color: #f9a8d4;
    font-size: 0.95rem;
    font-weight: 600;
}

.hero h1,
.section-title {
    margin: 0;
    font-family: "Space Grotesk", "Outfit", sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 0.96;
    margin-top: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #ffd1ea, #fb7185 35%, #c084fc 68%, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    color: var(--text-soft);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 62ch;
}

.hero-actions,
.stack,
.toolbar,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-card,
.card,
.stat-card,
.feature-card,
.info-card,
.auth-card,
.panel {
    position: relative;
    background: linear-gradient(180deg, rgba(15, 22, 42, 0.95), rgba(9, 14, 28, 0.92));
    border: 1px solid rgba(244, 114, 182, 0.12);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-card {
    padding: 1.8rem;
    overflow: hidden;
}

.hero-visual-card {
    min-height: 620px;
}

.hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
}

.hero-floating-card {
    position: absolute;
    z-index: 2;
    max-width: 240px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(10, 14, 28, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 36px rgba(3, 8, 23, 0.42);
}

.hero-floating-card strong {
    display: block;
    margin-bottom: 0.3rem;
}

.hero-floating-card span {
    color: var(--text-soft);
    line-height: 1.5;
    font-size: 0.95rem;
}

.hero-floating-top {
    top: 86px;
    right: 24px;
}

.hero-floating-bottom {
    left: 24px;
    bottom: 28px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.metric {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(18, 26, 49, 0.82);
    border: 1px solid rgba(244, 114, 182, 0.12);
}

.metric strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.section {
    padding: 2rem 0 4rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.section-copy {
    color: var(--text-soft);
    max-width: 62ch;
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

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

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

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

.card,
.feature-card,
.info-card,
.panel,
.auth-card {
    padding: 1.4rem;
}

.feature-card::before,
.stat-card::before,
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.13), rgba(139, 92, 246, 0.08), rgba(56, 189, 248, 0.05));
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.feature-card:hover::before,
.stat-card:hover::before,
.card:hover::before {
    opacity: 1;
}

.feature-icon,
.stat-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.22), rgba(139, 92, 246, 0.22));
    color: #ffe4f1;
    margin-bottom: 1rem;
    font-weight: 700;
}

.course-card {
    display: grid;
    gap: 1rem;
    overflow: hidden;
}

.course-cover {
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(15, 23, 42, 0.88), rgba(37, 99, 235, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.course-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-cover-lg {
    min-height: 340px;
}

.media-panel {
    overflow: hidden;
}

.media-visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(circle at top left, rgba(247, 37, 133, 0.22), transparent 30%), rgba(10, 14, 26, 0.9);
    margin-bottom: 1.1rem;
}

.media-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-visual-lg {
    aspect-ratio: 16 / 11;
}

.course-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.pill,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.pill {
    background: rgba(247, 37, 133, 0.12);
    color: #fbcfe8;
    border: 1px solid rgba(247, 37, 133, 0.22);
}

.badge.success {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.badge.warning {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.badge.neutral {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 0;
    border-radius: 18px;
    padding: 0.95rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 36px rgba(247, 37, 133, 0.28);
}

.btn-secondary {
    color: white;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.btn-soft {
    color: #ffe4f1;
    background: rgba(247, 37, 133, 0.12);
    border: 1px solid rgba(247, 37, 133, 0.18);
}

.dashboard {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: calc(100vh - 78px);
}

.dashboard-admin {
    grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
    padding: 1.3rem;
    border-right: 1px solid rgba(148, 163, 184, 0.08);
    background: linear-gradient(180deg, rgba(8, 11, 24, 0.92), rgba(7, 11, 21, 0.98));
}

.sidebar-nav {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.sidebar-link {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    color: var(--text-soft);
    font-weight: 600;
}

.sidebar-link.active,
.sidebar-link:hover {
    color: var(--text);
    background: rgba(247, 37, 133, 0.12);
    border: 1px solid rgba(247, 37, 133, 0.18);
}

.dashboard-main {
    padding: 1.8rem;
}

.dashboard-main-wide {
    padding: 1.4rem 1.6rem 2rem;
}

.admin-hero-panel {
    overflow: hidden;
}

.admin-hero-split {
    align-items: flex-start;
}

.admin-hero-metrics {
    min-width: min(100%, 420px);
}

.admin-grid-top {
    align-items: start;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-grid-admin {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
    padding: 1.2rem;
}

.stat-value {
    margin: 0.2rem 0 0;
    font-size: 2rem;
    font-weight: 700;
    font-family: "Space Grotesk", "Outfit", sans-serif;
}

.table-wrap {
    width: 100%;
    overflow: auto;
}

.table-wrap-xl {
    min-height: 420px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table-compact th,
.table-compact td {
    padding: 0.7rem 0.75rem;
}

.table-admin td {
    white-space: nowrap;
}

.table-admin td:first-child {
    white-space: normal;
    min-width: 320px;
}

.table-media {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
}

.table-media-cover {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 15, 32, 0.82);
}

.table-media-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-action-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    min-width: 220px;
}

th,
td {
    padding: 0.95rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.progress {
    position: relative;
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.progress-lg {
    height: 13px;
}

.progress-tinted {
    background: rgba(12, 18, 36, 0.92);
}

.metric-bars {
    display: grid;
    gap: 1rem;
}

.metric-bar {
    display: grid;
    gap: 0.6rem;
}

.progress-cell {
    min-width: 150px;
    display: grid;
    gap: 0.45rem;
}

.course-outline-item.active {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(59, 130, 246, 0.22);
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 18px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
}

.alert.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.alert.info {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

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

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    color: var(--text-soft);
    font-weight: 600;
}

.field small,
.muted {
    color: var(--text-muted);
}

.admin-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
}

.compact-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
}

.resource-card,
.resource-panel {
    overflow: hidden;
}

.growth-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
    align-items: end;
}

.growth-col {
    display: grid;
    gap: 0.7rem;
    justify-items: center;
}

.growth-bars {
    width: 100%;
    min-height: 150px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border-radius: 20px;
    background: rgba(9, 14, 28, 0.82);
    border: 1px solid rgba(244, 114, 182, 0.12);
}

.growth-bar {
    width: 18%;
    min-height: 12px;
    border-radius: 999px 999px 6px 6px;
    box-shadow: 0 12px 24px rgba(7, 11, 22, 0.34);
}

.growth-bar-users {
    background: linear-gradient(180deg, #f72585, #be185d);
}

.growth-bar-courses {
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}

.growth-bar-enrollments {
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.growth-bar-certificates {
    background: linear-gradient(180deg, #22c55e, #15803d);
}

.legend-row {
    margin-top: 1rem;
}

.legend-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-soft);
}

.legend-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.legend-dot.users::before {
    background: #f72585;
}

.legend-dot.courses::before {
    background: #8b5cf6;
}

.legend-dot.enrollments::before {
    background: #38bdf8;
}

.legend-dot.certificates::before {
    background: #22c55e;
}

.empty-state {
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
    border: 1px dashed rgba(247, 37, 133, 0.24);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(100%, 540px);
}

.footer {
    padding: 2rem 0 3rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.video-player,
.embed-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: black;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.video-continue-panel {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(236, 72, 153, 0.22);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(59, 130, 246, 0.12));
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}

.list-clean {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.split {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.hidden {
    display: none !important;
}

@media (max-width: 1080px) {
    .hero-grid,
    .grid-4,
    .stats-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3,
    .dashboard {
        grid-template-columns: 1fr;
    }

    .stats-grid-admin,
    .growth-grid,
    .admin-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    }
}

@media (max-width: 760px) {
    .container {
        width: min(calc(100% - 1.25rem), var(--max-width));
    }

    .video-continue-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-inner {
        flex-wrap: wrap;
    }

    .nav-links,
    .nav-actions {
        width: 100%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links.is-open {
        display: flex;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .hero {
        padding-top: 3rem;
    }

    .hero-visual-card {
        min-height: 420px;
    }

    .hero-floating-card {
        position: static;
        max-width: none;
        margin-top: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .stats-grid,
    .footer-grid,
    .form-grid.cols-2,
    .hero-grid,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .admin-filter-grid,
    .growth-grid,
    .table-action-grid,
    .stats-grid-admin {
        grid-template-columns: 1fr;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .workspace-shell {
        width: min(calc(100% - 0.5rem), 1680px);
    }

    .table-media {
        grid-template-columns: 1fr;
    }
}
