@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
    --portal-font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lecturer-session-restore #lecturerAuth {
    visibility: hidden;
}

body,
button,
input,
select,
textarea {
    font-family: var(--portal-font);
}

.lecturer-topbar,
.lecturer-brand,
.lecturer-links,
.lecturer-shell,
.lecturer-app,
.lecturer-sidebar,
.lecturer-content,
.panel,
.lecturer-card,
.data-card {
    box-sizing: border-box;
}

.lecturer-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 10px 24px rgba(8, 27, 52, 0.16);
}

body.lecturer-authenticated {
    overflow: hidden;
}

body.lecturer-authenticated .lecturer-app {
    font-size: 14px;
}

body.lecturer-authenticated .lecturer-app h2 {
    font-size: 1.35rem;
}

body.lecturer-authenticated .lecturer-app h3 {
    font-size: 1rem;
}

body.lecturer-authenticated .lecturer-app input,
body.lecturer-authenticated .lecturer-app select,
body.lecturer-authenticated .lecturer-app textarea,
body.lecturer-authenticated .lecturer-app button {
    font-size: 13px;
}

body.lecturer-authenticated .lecturer-topbar {
    position: fixed;
    inset: 0 0 auto;
    height: 64px;
    min-height: 64px;
}

.lecturer-brand,
.lecturer-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.lecturer-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}

.lecturer-brand strong span {
    color: var(--gold);
}

.lecturer-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.lecturer-shell {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 1rem;
}

body:not(.lecturer-authenticated) .lecturer-shell {
    min-height: calc(100vh - 66px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

body.lecturer-authenticated .lecturer-shell {
    position: fixed;
    inset: 64px 0 0;
    width: 100%;
    height: calc(100dvh - 64px);
    max-width: none;
    padding: 0;
    overflow: hidden;
}

.lecturer-auth {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    width: min(880px, 100%);
    margin: 0 auto;
    padding: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 20px 44px rgba(11, 31, 58, 0.13);
}

.lecturer-auth > div,
.lecturer-form,
.lecturer-card,
.data-card,
.lecturer-sidebar,
.panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(11, 31, 58, 0.06);
}

.lecturer-auth > div:first-child {
    padding: 20px 20px 0;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(155deg, var(--ice-2), #fff);
}

.lecturer-auth-forms {
    display: grid;
    align-items: stretch;
    background: #fff;
}

.lecturer-auth-forms .lecturer-form {
    align-content: start;
    min-height: 100%;
    padding: 28px 24px;
    gap: 1.25rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.lecturer-auth-forms .lecturer-form label + label {
    margin-top: 0.5rem;
}

.lecturer-auth-forms .lecturer-form > .primary-button {
    margin-top: 3rem;
}

.lecturer-auth-forms .lecturer-form.hidden,
.lecturer-auth.hidden,
.lecturer-app.hidden {
    display: none !important;
}

.lecturer-auth h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(1.75rem, 3vw, 2rem);
    line-height: 1.12;
}

.feature-list {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--navy);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
    flex: 0 0 auto;
}

.preview {
    margin-top: 18px;
    height: auto;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--ice-2);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lecturer-kicker {
    margin: 0 0 0.45rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lecturer-form {
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
}

.lecturer-form h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.75rem;
}

.lecturer-form label {
    display: grid;
    gap: 0.35rem;
    color: var(--navy);
    font-weight: 800;
}

.lecturer-form input,
.lecturer-form select,
.lecturer-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 46px;
    padding: 0.65rem 0.8rem;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.lecturer-form input:focus,
.lecturer-form select:focus,
.lecturer-form textarea:focus {
    outline: 0;
    border-color: rgba(30, 136, 229, 0.65);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
}

.grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form .wide {
    grid-column: 1 / -1;
}

.hint,
.form-message {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.form-message.error {
    color: #b42318;
}

.form-message.success {
    color: #067647;
}

.link-button {
    border: 0;
    padding: 0;
    width: fit-content;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    text-decoration: underline;
}

.lecturer-app {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}

.lecturer-sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    width: 76px;
    height: calc(100dvh - 64px);
    z-index: 20;
    padding: 0;
    display: grid;
    grid-template-rows: 1fr;
    gap: 0;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    transition: width 0.2s ease, box-shadow 0.2s ease;
}

.lecturer-sidebar:hover,
.lecturer-sidebar:focus-within {
    width: 290px;
    box-shadow: 12px 0 28px rgba(11, 31, 58, 0.16);
}

.lecturer-sidebar-heading {
    display: none;
    align-items: center;
    gap: 0.75rem;
    min-height: 92px;
    padding: 1rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.lecturer-sidebar-heading strong {
    display: block;
    color: var(--navy);
    font-size: 1rem;
}

.lecturer-sidebar-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--navy), #168d75);
    color: #fff;
    font-weight: 900;
}

.lecturer-sidebar .small {
    margin: 0.15rem 0 0;
    overflow-wrap: anywhere;
}

.lecturer-sidebar-menu {
    display: grid;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #9aa5ad transparent;
    overflow-x: hidden;
}

.tab-button {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0.7rem;
    min-height: 58px;
    border: 0;
    border-bottom: 1px solid #e2e7eb;
    border-radius: 0;
    padding: 0.75rem;
    background: transparent;
    color: #344054;
    cursor: pointer;
    text-align: left;
    font-weight: 750;
    transition: background 0.18s ease, color 0.18s ease;
}

.tab-button.active,
.tab-button:hover {
    background: #eef7f3;
    color: #0f6248;
}

.tab-button.active {
    color: #0f6248;
    box-shadow: inset 3px 0 #168d75;
}

.tab-button > span:nth-child(2),
.tab-button .nav-arrow {
    display: none;
}

.tab-button:hover > span:nth-child(2),
.tab-button:focus-visible > span:nth-child(2) {
    position: fixed;
    left: 84px;
    z-index: 80;
    display: block;
    width: max-content;
    max-width: 220px;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    background: #121716;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    font-size: 0.88rem;
    white-space: nowrap;
}

.lecturer-sidebar:hover .tab-button,
.lecturer-sidebar:focus-within .tab-button {
    grid-template-columns: 30px minmax(0, 1fr) 20px;
    padding: 0.75rem 1rem;
}

.lecturer-sidebar:hover .tab-button > span:nth-child(2),
.lecturer-sidebar:hover .tab-button .nav-arrow,
.lecturer-sidebar:focus-within .tab-button > span:nth-child(2),
.lecturer-sidebar:focus-within .tab-button .nav-arrow {
    position: static;
    z-index: auto;
    display: block;
    width: auto;
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font-size: inherit;
    white-space: normal;
}

.nav-icon {
    font-size: 1.25rem;
    text-align: center;
}

.nav-arrow {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1;
    text-align: right;
}

.lecturer-content {
    grid-column: 2;
    min-width: 0;
    height: 100%;
    padding: 1.5rem clamp(1rem, 3vw, 3rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(circle at 100% 100%, rgba(31, 166, 122, 0.18), transparent 42%),
        #eef7f2;
}

.panel {
    display: none;
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 1.25rem 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.panel.active {
    display: block;
}

.panel-head {
    display: flex;
    justify-content: flex-start;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.panel h2,
.lecturer-card h3,
.data-card h3 {
    margin: 0;
    color: var(--navy);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.stat-card {
    border: 0;
    border-left: 4px solid #168d75;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    background: #fff;
    box-shadow: 0 3px 10px rgba(11, 31, 58, 0.05);
}

.stat-card strong {
    display: block;
    color: var(--navy);
    font-size: 1.55rem;
}

.split-grid,
.data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.lecturer-card,
.data-card {
    padding: 0.95rem;
}

.data-card {
    display: grid;
    gap: 0.45rem;
    align-content: start;
}

.data-card p {
    margin: 0;
}

.record-table {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.record-table-row {
    display: grid;
    grid-template-columns: var(--table-columns);
    align-items: center;
    min-width: 0;
    border-top: 1px solid var(--border);
}

.record-table-row:first-child {
    border-top: 0;
}

.record-table-head {
    background: #edf8f4;
    color: #5f728d;
    font-size: 0.78rem;
    font-weight: 850;
}

.record-table-head > span,
.record-cell {
    min-width: 0;
    padding: 0.8rem 0.75rem;
}

.record-cell small {
    display: block;
    max-width: 320px;
    margin-top: 0.2rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.record-cell {
    overflow-wrap: anywhere;
}

.data-grid:has(> .record-table) {
    display: block;
}

.table-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 0.65rem;
    background: #eaf5ff;
    color: var(--navy);
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.table-empty {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
}

.data-grid:has(> .table-empty) {
    display: block;
    width: 100%;
}

/* Record collections that still use rich cards render as one continuous list. */
.data-grid:has(> .data-card) {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.data-grid:has(> .data-card) > .data-card {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.data-grid:has(> .data-card) > .data-card:last-child {
    border-bottom: 0;
}

.data-grid:has(> .data-card) > .data-card:hover {
    background: #fbfdfc;
}

.data-grid:has(> .empty-card:only-child) {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.data-grid:has(> .empty-card:only-child) > .empty-card {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.65rem;
    background: var(--ice);
    color: var(--navy);
    font-weight: 850;
}

.empty-card {
    border-style: dashed;
    background: #fbfdff;
}

.lecturer-form + .data-grid {
    margin-top: 1rem;
}

@media (max-width: 920px) {
    body:not(.lecturer-authenticated) .lecturer-shell {
        min-height: auto;
        align-items: flex-start;
        padding: 14px 10px 22px;
    }

    .lecturer-auth,
    .lecturer-app,
    .grid-form,
    .stat-grid,
    .split-grid,
    .data-grid {
        grid-template-columns: 1fr;
    }

    .lecturer-sidebar {
        position: static;
        width: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        background: #f5f7f8;
        overflow: visible;
    }

    .lecturer-sidebar-heading {
        display: flex;
    }

    .lecturer-content {
        grid-column: 1;
        height: auto;
        padding: 1rem;
        overflow: visible;
    }

    .lecturer-sidebar-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .tab-button {
        grid-template-columns: 30px minmax(0, 1fr) 20px;
        border-right: 1px solid #e2e7eb;
        color: #27323b;
        padding: 0.85rem 1.1rem;
    }

    .tab-button > span:nth-child(2),
    .tab-button .nav-arrow {
        display: block;
    }

    .tab-button:hover > span:nth-child(2),
    .tab-button:focus-visible > span:nth-child(2) {
        position: static;
        width: auto;
        max-width: none;
        padding: 0;
        border-radius: 0;
        background: transparent;
        color: inherit;
        box-shadow: none;
        font-size: inherit;
        white-space: normal;
    }

    .lecturer-auth {
        border-radius: 18px;
    }

    .lecturer-auth > div:first-child {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 920px) {
    body.lecturer-authenticated {
        overflow: auto;
    }

    body.lecturer-authenticated .lecturer-shell {
        position: static;
        height: auto;
        margin-top: 64px;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .lecturer-topbar,
    .panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .lecturer-links {
        justify-content: flex-start;
    }

    .lecturer-sidebar-menu {
        grid-template-columns: 1fr;
    }
}

/* Compact typography across the complete authenticated lecturer portal. */
body.lecturer-authenticated,
body.lecturer-authenticated .lecturer-topbar,
body.lecturer-authenticated .lecturer-app,
body.lecturer-authenticated .lecturer-app p,
body.lecturer-authenticated .lecturer-app span,
body.lecturer-authenticated .lecturer-app strong,
body.lecturer-authenticated .lecturer-app small,
body.lecturer-authenticated .lecturer-app label,
body.lecturer-authenticated .lecturer-app a,
body.lecturer-authenticated .lecturer-app button,
body.lecturer-authenticated .lecturer-app input,
body.lecturer-authenticated .lecturer-app select,
body.lecturer-authenticated .lecturer-app textarea {
    font-size: 10px !important;
}

body.lecturer-authenticated .lecturer-app h2 {
    font-size: 15px !important;
    line-height: 1.25;
}

body.lecturer-authenticated .lecturer-app h3 {
    font-size: 12px !important;
    line-height: 1.3;
}

body.lecturer-authenticated .lecturer-kicker,
body.lecturer-authenticated .lecturer-app small {
    font-size: 9px !important;
}

body.lecturer-authenticated .status-pill {
    min-height: 22px !important;
    padding: 3px 8px !important;
    font-size: 9px !important;
}

body.lecturer-authenticated .record-table-head > span,
body.lecturer-authenticated .record-cell {
    padding: 7px 9px !important;
    font-size: 10px !important;
}

body.lecturer-authenticated .record-table-row:not(.record-table-head) {
    min-height: 40px !important;
}

body.lecturer-authenticated .data-actions button,
body.lecturer-authenticated .table-link {
    min-height: 27px !important;
    padding: 4px 8px !important;
    font-size: 9px !important;
}

body.lecturer-authenticated .lecturer-content {
    padding: 10px 12px !important;
}

body.lecturer-authenticated .panel {
    padding: 8px 0 !important;
}

body.lecturer-authenticated .panel-head {
    margin-bottom: 8px !important;
}

body.lecturer-authenticated .lecturer-card,
body.lecturer-authenticated .data-card,
body.lecturer-authenticated .stat-card {
    padding: 8px 10px !important;
}

body.lecturer-authenticated .record-table-head > span,
body.lecturer-authenticated .record-cell {
    padding: 5px 7px !important;
}

body.lecturer-authenticated .record-table-row:not(.record-table-head) {
    min-height: 34px !important;
}

body.lecturer-authenticated .lecturer-form {
    gap: 6px !important;
    padding: 8px !important;
}

body.lecturer-authenticated .lecturer-form input,
body.lecturer-authenticated .lecturer-form select,
body.lecturer-authenticated .lecturer-form textarea {
    min-height: 32px !important;
    padding: 5px 7px !important;
}
