:root {
    --bg-start: #0f1c2f;
    --bg-end: #1b5d6b;
    --surface: rgba(8, 18, 35, 0.72);
    --surface-strong: rgba(10, 22, 41, 0.86);
    --surface-soft: rgba(255, 255, 255, 0.08);
    --border-soft: rgba(255, 255, 255, 0.14);
    --text-main: #eef6ff;
    --text-muted: #bfd3ea;
    --brand: #ffb703;
    --success: #2fc58d;
    --warning: #f4a261;
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.28);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --sidebar-width: 300px;
    --font-heading: "Space Grotesk", "Trebuchet MS", sans-serif;
    --font-body: "DM Sans", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    color: var(--text-main);
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top left, rgba(255, 183, 3, 0.16), transparent 26%),
        radial-gradient(circle at bottom right, rgba(47, 197, 141, 0.14), transparent 25%),
        linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.24), transparent 85%);
    pointer-events: none;
}

body.login-page {
    background:
        linear-gradient(135deg, rgba(5, 14, 27, 0.78), rgba(10, 34, 50, 0.72)),
        url("../../bg-01.jpg") center center / cover fixed,
        linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

a {
    color: inherit;
}

.login-main {
    min-height: calc(100vh - 76px);
}

.site-footer {
    position: relative;
    z-index: 1;
    padding: 0 1rem 1.25rem;
    color: rgba(238, 246, 255, 0.72);
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.44);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer a {
    color: #ffe19b;
    font-weight: 700;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #fff2c4;
    text-decoration: underline;
}

.site-footer-seal {
    color: var(--brand);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-panel,
.glass-panel,
.welcome-banner,
.metric-card,
.feature-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
}

.hero-panel,
.glass-panel,
.welcome-banner {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero-panel {
    height: 100%;
    padding: 2.75rem;
    border-radius: calc(var(--radius-xl) + 8px);
    background:
        linear-gradient(160deg, rgba(255, 183, 3, 0.13), transparent 55%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(11, 27, 44, 0.5));
    animation: fade-slide 0.7s ease;
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.25), transparent 70%);
}

.glass-panel {
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(8, 18, 35, 0.82), rgba(8, 18, 35, 0.68));
    animation: fade-slide 0.9s ease;
}

.feature-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
}

.feature-card h2,
.section-title,
.page-title,
.hero-title {
    font-family: var(--font-heading);
}

.feature-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.feature-card p,
.hero-text,
.helper-box li,
.review-copy,
.meta-line,
.submission-card p {
    color: var(--text-muted);
}

.eyebrow-badge,
.status-chip,
.demo-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #fff2c4;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-chip.alt {
    color: #cbe9ff;
}

.section-kicker {
    color: #ffe19b;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.hero-title {
    max-width: 12ch;
    line-height: 1.02;
}

.hero-text {
    max-width: 55ch;
    font-size: 1.05rem;
}

.demo-accounts {
    display: grid;
    gap: 1rem;
}

.demo-account {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
}

.helper-box {
    padding: 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
}

.helper-box h3 {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
    font-family: var(--font-heading);
}

.helper-box p {
    color: var(--text-muted);
}

.helper-box-compact {
    padding: 1rem;
}

.helper-box ul {
    padding-left: 1rem;
}

.login-activity-block {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-brand {
    border: 0;
    color: #15253d;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), #ffd166);
}

.btn-brand:hover,
.btn-brand:focus {
    color: #15253d;
    background: linear-gradient(135deg, #ffc53a, #ffe08a);
}

.form-control,
.form-select {
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.06);
}

.form-control:focus,
.form-select:focus {
    color: var(--text-main);
    border-color: rgba(255, 183, 3, 0.65);
    box-shadow: 0 0 0 0.25rem rgba(255, 183, 3, 0.14);
    background-color: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder,
input[type="date"] {
    color: rgba(238, 246, 255, 0.72);
}

.form-text,
code {
    color: #ffe19b;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 17, 31, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.shell-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.shell-main > main {
    flex: 1;
    width: 100%;
}

.sidebar-desktop {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 1rem 0 1rem 1rem;
}

.sidebar-panel {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: calc(100vh - 2rem);
    padding: 1.35rem;
    border: 1px solid var(--border-soft);
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(180deg, rgba(8, 18, 35, 0.94), rgba(8, 18, 35, 0.82));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: inherit;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #15253d;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, var(--brand), #ffd166);
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.02rem;
}

.brand-copy small {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid transparent;
    border-radius: 18px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.sidebar-link::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.sidebar-link:hover,
.sidebar-link:focus {
    color: var(--text-main);
    transform: translateX(2px);
    border-color: rgba(255, 183, 3, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: #15253d;
    border-color: rgba(255, 209, 102, 0.92);
    background: linear-gradient(135deg, var(--brand), #ffd166);
}

.sidebar-link.active::before {
    background: rgba(21, 37, 61, 0.65);
}

.sidebar-link-copy {
    display: flex;
    flex-direction: column;
}

.sidebar-link-copy strong {
    font-size: 0.96rem;
    font-family: var(--font-heading);
}

.sidebar-link-copy small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.sidebar-link.active .sidebar-link-copy small {
    color: rgba(21, 37, 61, 0.78);
}

.sidebar-footer {
    margin-top: auto;
}

.sidebar-footer .helper-box {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-offcanvas {
    color: var(--text-main);
    background: linear-gradient(180deg, rgba(8, 18, 35, 0.98), rgba(8, 18, 35, 0.92));
}

.mobile-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--border-soft);
}

.mobile-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-offcanvas .sidebar-link {
    position: relative;
    pointer-events: auto;
}

.mobile-offcanvas .btn-close {
    filter: invert(1) grayscale(1) brightness(200%);
}

.panel-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.nav-pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-main);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-pill-link:hover,
.nav-pill-link:focus {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 183, 3, 0.35);
    transform: translateY(-1px);
}

.nav-pill-link.active {
    color: #15253d;
    border-color: rgba(255, 209, 102, 0.85);
    background: linear-gradient(135deg, var(--brand), #ffd166);
}

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

.user-pill {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.user-pill small {
    color: var(--text-muted);
}

.topbar-title-group {
    min-width: 0;
}

.topbar-actions {
    flex-shrink: 0;
}

.btn-logout {
    font-weight: 700;
    border-color: rgba(220, 53, 69, 0.85);
    background: linear-gradient(135deg, #dc3545, #b02a37);
}

.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.6rem 1.7rem;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(8, 18, 35, 0.78)),
        linear-gradient(135deg, rgba(255, 183, 3, 0.11), transparent 55%);
}

.stats-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.9rem;
}

.stats-inline-2x2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(126px, 1fr));
    width: min(100%, 320px);
}

.inline-stat {
    min-width: 126px;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
}

.stats-inline-2x2 .inline-stat {
    min-width: 0;
}

.inline-stat strong,
.metric-card strong {
    display: block;
    font-size: 1.45rem;
    font-family: var(--font-heading);
}

.inline-stat span,
.metric-card span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.submission-list {
    display: grid;
    gap: 1rem;
}

.submission-card {
    padding: 1.2rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.submission-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 183, 3, 0.28);
}

.submission-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.submission-card h4 {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    font-family: var(--font-heading);
}

.meta-row,
.action-row,
.toolbar,
.review-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.meta-line {
    font-size: 0.92rem;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-pending {
    background: rgba(255, 183, 3, 0.18);
    color: #ffe19b;
}

.badge-approved {
    background: rgba(47, 197, 141, 0.18);
    color: #a9f0d1;
}

.badge-revision {
    background: rgba(244, 162, 97, 0.18);
    color: #ffd3b1;
}

.link-download {
    color: #c8f4ff;
    font-weight: 500;
    text-decoration: none;
}

.link-download:hover {
    color: #ffffff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.metric-card {
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(8, 18, 35, 0.72));
}

.toolbar {
    align-items: center;
}

.toolbar .form-control,
.toolbar .form-select {
    min-width: 210px;
}

.toolbar .btn {
    white-space: nowrap;
}

.toolbar-actions {
    display: inline-flex;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.85rem;
}

.toolbar-actions form {
    margin: 0;
}

.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quick-link-card {
    display: block;
    padding: 1.25rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.quick-link-card:hover,
.quick-link-card:focus {
    color: inherit;
    transform: translateY(-2px);
    border-color: rgba(255, 183, 3, 0.35);
    background: rgba(255, 255, 255, 0.1);
}

.quick-link-card h4 {
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.quick-link-card p {
    margin-bottom: 0;
    color: var(--text-muted);
}

.section-divider {
    height: 1px;
    margin: 1.6rem 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}

.section-anchor {
    scroll-margin-top: 8.5rem;
}

.management-list {
    display: grid;
    gap: 1rem;
}

.management-card {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
}

.management-card h4 {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
    font-family: var(--font-heading);
}

.management-card p {
    color: var(--text-muted);
}

.activity-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(8, 18, 35, 0.5)),
        rgba(255, 255, 255, 0.04);
}

.course-badges,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.course-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: #d5ecff;
}

.assignment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.assignment-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
}

.assignment-option input {
    margin-top: 0.15rem;
}

.assignment-option strong {
    display: block;
    font-size: 0.95rem;
}

.assignment-option span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.metric-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metric-inline {
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
}

.metric-inline strong {
    display: block;
    font-size: 1rem;
}

.sticky-panel {
    position: sticky;
    top: 6rem;
}

.muted-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.review-modal {
    color: var(--text-main);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(8, 18, 35, 0.96), rgba(8, 18, 35, 0.9));
    box-shadow: var(--shadow-lg);
}

.review-details {
    display: grid;
    gap: 1rem;
}

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

.review-card {
    flex: 1 1 220px;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
}

.empty-state {
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.admin-surface .welcome-banner {
    background:
        linear-gradient(140deg, rgba(47, 197, 141, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(8, 18, 35, 0.75));
}

.form-select option,
.form-control option {
    color: #10233a;
    background-color: #f5f8fc;
}

@keyframes fade-slide {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .app-shell {
        display: block;
    }

    .hero-panel,
    .glass-panel {
        padding: 1.5rem;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-inline {
        justify-content: flex-start;
    }

    .stats-inline-2x2 {
        width: 100%;
    }

    .sticky-panel {
        position: static;
    }

    .site-footer {
        padding: 0 0.75rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .topbar-title-group {
        gap: 0.55rem !important;
    }

    .topbar-title-group .section-kicker {
        display: none;
    }

    .topbar .page-title {
        max-width: 42vw;
        overflow: hidden;
        font-size: 1rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .topbar-menu-btn,
    .btn-logout {
        padding: 0.45rem 0.65rem;
        font-size: 0.9rem;
    }

    .hero-title {
        max-width: none;
        font-size: 2.2rem;
    }

    .demo-account,
    .submission-card-header,
    .action-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar .form-control,
    .toolbar .form-select {
        min-width: 100%;
    }

    .toolbar .btn {
        width: 100%;
    }

    .toolbar-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        width: 100%;
    }

    .toolbar-actions .btn {
        white-space: normal;
    }

    .site-footer-inner {
        flex-direction: column;
        gap: 0.25rem;
        border-radius: var(--radius-lg);
        font-size: 0.85rem;
    }
}
