/* =========================================================
   LINGUA DEUTSCH CONNECT
   TEACHER PORTAL
========================================================= */

:root {
    --black: #101010;
    --black-deep: #080b14;

    --gold: #d4a900;
    --gold-light: #ffce00;

    --red: #c8102e;
    --red-bright: #dd0000;

    --blue: #1255d8;
    --blue-light: #7fa8ff;

    --white: #ffffff;
    --light: #f7f8fa;
    --gray: #666666;
    --gray-light: #f1f2f4;

    --border: rgba(16, 16, 16, 0.09);

    --success: #16844a;
    --danger: #c8102e;

    --radius: 18px;
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   GLOBAL
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family: "DM Sans", Arial, sans-serif;

    background: var(--light);
    color: var(--black);

    overflow-x: hidden;
}


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


button,
a {
    -webkit-tap-highlight-color: transparent;
}


button {
    cursor: pointer;
}


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


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


.hidden {
    display: none !important;
}


[hidden] {
    display: none !important;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

.eyebrow {
    display: inline-block;

    margin-bottom: 8px;

    color: var(--gold);

    font-size: 0.72rem;
    font-weight: 800;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}


h1,
h2,
h3 {
    font-family: "Space Grotesk", Arial, sans-serif;
}


h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
}


h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}


h3 {
    font-size: 1.15rem;
}


/* =========================================================
   BUTTONS
========================================================= */

.primary-btn,
.outline-btn,
.logout-btn,
.table-action {
    border: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        opacity 0.2s ease;
}


.primary-btn {
    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 0 18px;

    background: var(--gold);
    color: var(--black);

    border-radius: 10px;

    font-weight: 800;
}


.primary-btn:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}


.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


.outline-btn {
    min-height: 44px;

    padding: 0 16px;

    background: transparent;
    color: var(--black);

    border: 1px solid var(--border);
    border-radius: 10px;

    font-weight: 700;
}


.outline-btn:hover {
    border-color: var(--gold);
    color: var(--black);
}


.logout-btn {
    width: 100%;

    min-height: 44px;

    padding: 0 14px;

    background: rgba(255, 255, 255, 0.08);
    color: white;

    border-radius: 10px;

    font-weight: 700;
}


.logout-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}


.table-action {
    padding: 8px 12px;

    border-radius: 8px;

    background: rgba(212, 169, 0, 0.12);
    color: #806500;

    font-weight: 700;
}


.table-action:hover {
    background: var(--gold);
    color: var(--black);
}


/* =========================================================
   AUTH PAGE
========================================================= */

.teacher-auth-page {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(212, 169, 0, 0.12),
            transparent 32%
        ),
        var(--black-deep);
}


.auth-shell {
    width: min(1100px, 100%);

    display: grid;
    grid-template-columns: 1fr 440px;

    overflow: hidden;

    border-radius: 26px;

    background: white;

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.35);
}


.auth-brand {
    position: relative;

    padding: 48px;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    min-height: 650px;

    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.95),
            rgba(8, 11, 20, 0.94)
        );
}


.auth-brand::after {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    right: -100px;
    bottom: -100px;

    border-radius: 50%;

    border: 55px solid rgba(212, 169, 0, 0.12);

    pointer-events: none;
}


.brand-logo {
    width: 115px;
}


.brand-logo img {
    width: 100%;

    border-radius: 12px;
}


.brand-content {
    position: relative;
    z-index: 2;

    max-width: 560px;
}


.brand-content h1 {
    margin-bottom: 22px;

    font-size: clamp(2.4rem, 5vw, 4.3rem);
}


.brand-content h1 span {
    color: var(--gold-light);
}


.brand-content > p {
    max-width: 510px;

    color: rgba(255, 255, 255, 0.7);

    font-size: 1.02rem;

    line-height: 1.7;
}


.teacher-features {
    margin-top: 35px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;
}


.teacher-features div {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.04);
}


.teacher-features span {
    color: var(--gold-light);

    font-weight: 900;
}


.teacher-features p {
    color: rgba(255, 255, 255, 0.8);

    font-size: 0.88rem;
}


.auth-card {
    padding: 42px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: white;
}


.auth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 50px;
}


.mini-logo {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    background: var(--black);
    color: var(--gold);

    border-radius: 10px;

    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
}


.secure-badge {
    padding: 8px 10px;

    border-radius: 999px;

    background: #f7f3df;
    color: #816900;

    font-size: 0.72rem;
    font-weight: 800;
}


.auth-heading {
    margin-bottom: 28px;
}


.auth-heading h2 {
    margin-bottom: 8px;

    font-size: 2rem;
}


.auth-heading p {
    color: var(--gray);

    line-height: 1.6;
}


.auth-form {
    display: grid;
    gap: 20px;
}


.form-group {
    display: grid;
    gap: 8px;
}


.form-group label {
    font-size: 0.86rem;
    font-weight: 700;
}


.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    outline: none;

    background: white;
    color: var(--black);
}


.form-group input {
    min-height: 48px;
}


.form-group textarea {
    resize: vertical;
}


.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--gold);

    box-shadow:
        0 0 0 3px rgba(212, 169, 0, 0.12);
}


.password-wrap {
    position: relative;
}


.password-wrap input {
    padding-right: 70px;
}


.password-toggle {
    position: absolute;

    top: 50%;
    right: 8px;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: #777;

    font-size: 0.78rem;
    font-weight: 800;
}


.auth-submit {
    width: 100%;

    margin-top: 4px;
}


.form-message {
    padding: 12px 14px;

    border-radius: 10px;

    font-size: 0.88rem;
    line-height: 1.5;
}


.form-message.error {
    background: #fff0f2;
    color: var(--danger);
}


.form-message.success {
    background: #edf9f2;
    color: var(--success);
}


.auth-footer {
    margin-top: 28px;

    display: flex;
    justify-content: center;
    gap: 8px;

    color: var(--gray);

    font-size: 0.8rem;
}


.auth-footer a {
    color: var(--black);

    font-weight: 700;
}


.auth-footer a:hover {
    color: var(--gold);
}


/* =========================================================
   DASHBOARD LAYOUT
========================================================= */

.teacher-layout {
    min-height: 100vh;

    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
}


.teacher-sidebar {
    position: sticky;
    top: 0;

    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 22px 16px;

    background: var(--black);
    color: white;
}


.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 5px 8px 25px;
}


.sidebar-brand img {
    width: 42px;
    height: 42px;

    object-fit: cover;

    border-radius: 9px;
}


.sidebar-brand div {
    display: grid;
    gap: 2px;
}


.sidebar-brand strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
}


.sidebar-brand span {
    color: rgba(255, 255, 255, 0.5);

    font-size: 0.68rem;
}


.teacher-nav {
    display: grid;
    gap: 5px;
}


.teacher-nav-link {
    width: 100%;
    min-height: 46px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 13px;

    border: none;
    border-radius: 10px;

    background: transparent;
    color: rgba(255, 255, 255, 0.64);

    font-weight: 600;

    text-align: left;
}


.teacher-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}


.teacher-nav-link.active {
    background: var(--gold);
    color: var(--black);
}


.teacher-nav-link span:first-child {
    width: 22px;

    text-align: center;

    font-weight: 900;
}


.sidebar-bottom {
    margin-top: auto;

    display: grid;
    gap: 10px;
}


.sidebar-home {
    padding: 10px;

    color: rgba(255, 255, 255, 0.58);

    font-size: 0.8rem;

    text-align: center;
}


.sidebar-home:hover {
    color: var(--gold);
}


.teacher-main {
    min-width: 0;

    padding: 34px 42px 60px;
}


.teacher-header {
    margin-bottom: 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.teacher-header h1 {
    margin-bottom: 7px;
}


.teacher-header h1 span {
    color: var(--gold);
}


.teacher-header p {
    color: var(--gray);
}


.teacher-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 13px;

    border: 1px solid var(--border);

    border-radius: 14px;

    background: white;
}


.teacher-avatar {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--black);
    color: var(--gold);

    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
}


.teacher-profile-mini div:last-child {
    display: grid;
    gap: 2px;
}


.teacher-profile-mini strong {
    font-size: 0.86rem;
}


.teacher-profile-mini span {
    color: var(--gray);

    font-size: 0.72rem;
}


.dashboard-message {
    margin-bottom: 20px;

    padding: 13px 15px;

    border-radius: 10px;

    font-size: 0.88rem;
}


.dashboard-message.success {
    background: #edf9f2;
    color: var(--success);
}


.dashboard-message.error {
    background: #fff0f2;
    color: var(--danger);
}


/* =========================================================
   DASHBOARD SECTIONS
========================================================= */

.dashboard-section {
    display: block;
}


.dashboard-section:not(.active) {
    display: none;
}


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

    gap: 16px;

    margin-bottom: 42px;
}


.teacher-stat-card {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 20px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.035);
}


.stat-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: #f8f4df;

    font-size: 1.1rem;
}


.teacher-stat-card div:last-child {
    min-width: 0;

    display: grid;
    gap: 3px;
}


.teacher-stat-card span {
    color: var(--gray);

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.07em;
}


.teacher-stat-card strong {
    font-family: "Space Grotesk", sans-serif;

    font-size: 1.65rem;
}


.section-heading {
    margin-bottom: 18px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 15px;
}


.section-heading h2 {
    margin-bottom: 5px;
}


.section-heading p {
    color: var(--gray);

    font-size: 0.9rem;
}


.classes-grid {
    display: grid;

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

    gap: 18px;
}


.class-card {
    padding: 22px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: white;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.035);
}


.class-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    margin-bottom: 18px;
}


.level-badge {
    padding: 6px 9px;

    border-radius: 999px;

    background: var(--black);
    color: var(--gold);

    font-size: 0.7rem;
    font-weight: 800;
}


.class-status {
    color: var(--success);

    font-size: 0.68rem;
    font-weight: 800;

    text-transform: uppercase;
}


.class-card h3 {
    margin-bottom: 7px;

    font-size: 1.3rem;
}


.class-schedule {
    min-height: 22px;

    margin-bottom: 20px;

    color: var(--gray);

    font-size: 0.84rem;
}


.class-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    padding: 14px 0;

    margin-bottom: 15px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}


.class-card-stats div {
    display: grid;

    gap: 2px;

    text-align: center;
}


.class-card-stats div + div {
    border-left: 1px solid var(--border);
}


.class-card-stats strong {
    font-family: "Space Grotesk", sans-serif;
}


.class-card-stats span {
    color: var(--gray);

    font-size: 0.68rem;
}


.class-open-btn {
    width: 100%;
}


.loading-card,
.empty-card {
    padding: 35px 20px;

    border: 1px dashed rgba(16, 16, 16, 0.15);

    border-radius: var(--radius);

    background: white;

    color: var(--gray);

    text-align: center;
}


.empty-card {
    grid-column: 1 / -1;
}


.empty-card h3 {
    margin: 10px 0 6px;

    color: var(--black);
}


.empty-card p {
    max-width: 500px;

    margin: 0 auto 18px;

    line-height: 1.6;
}


.empty-icon {
    font-size: 2rem;
}


/* =========================================================
   PLACEHOLDERS
========================================================= */

.feature-placeholder {
    padding: 60px 25px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: white;

    text-align: center;
}


.placeholder-icon {
    margin-bottom: 12px;

    font-size: 2.3rem;
}


.feature-placeholder h3 {
    margin-bottom: 8px;
}


.feature-placeholder p {
    max-width: 540px;

    margin: auto;

    color: var(--gray);

    line-height: 1.7;
}


.data-list {
    display: grid;
    gap: 12px;
}


/* =========================================================
   CLASS PAGE
========================================================= */

.class-header {
    margin-bottom: 28px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;
}


.back-link {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--gray);

    font-size: 0.82rem;
    font-weight: 700;
}


.back-link:hover {
    color: var(--gold);
}


.class-header h1 {
    margin-bottom: 8px;
}


.class-header p {
    color: var(--gray);
}


.class-overview-grid {
    display: grid;

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

    gap: 15px;

    margin-bottom: 28px;
}


.class-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-bottom: 22px;

    padding: 6px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: white;
}


.class-tab {
    min-height: 42px;

    padding: 0 16px;

    border: none;
    border-radius: 8px;

    background: transparent;
    color: var(--gray);

    font-weight: 700;
}


.class-tab:hover {
    color: var(--black);
}


.class-tab.active {
    background: var(--black);
    color: var(--gold);
}


.class-tab-panel {
    display: block;
}


.class-tab-panel:not(.active) {
    display: none;
}


/* =========================================================
   TABLES
========================================================= */

.teacher-data-table-wrap {
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: white;
}


.teacher-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}


.teacher-table th,
.teacher-table td {
    padding: 15px 16px;

    border-bottom: 1px solid var(--border);

    text-align: left;

    font-size: 0.85rem;
}


.teacher-table th {
    background: #fafafa;

    color: var(--gray);

    font-size: 0.7rem;
    font-weight: 800;

    letter-spacing: 0.05em;

    text-transform: uppercase;
}


.teacher-table tr:last-child td {
    border-bottom: none;
}


.teacher-table td strong {
    display: block;

    color: var(--black);
}


.table-secondary {
    display: block;

    max-width: 280px;

    margin-top: 3px;

    overflow: hidden;

    color: var(--gray);

    font-size: 0.73rem;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.table-status {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 999px;

    background: #f3f3f3;

    color: #555;

    font-size: 0.68rem;
    font-weight: 800;

    text-transform: uppercase;
}


/* =========================================================
   MODAL
========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: grid;
    place-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.58);
}


.teacher-modal {
    width: min(700px, 100%);
    max-height: 90vh;

    overflow-y: auto;

    padding: 26px;

    border-radius: 18px;

    background: white;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.3);
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 25px;
}


.modal-header h2 {
    font-size: 1.5rem;
}


.modal-close {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: none;
    border-radius: 9px;

    background: #f3f3f3;

    color: var(--black);

    font-size: 1.4rem;
}


.modal-close:hover {
    background: #e9e9e9;
}


.form-grid {
    display: grid;

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

    gap: 17px;
}


.form-grid .full {
    grid-column: 1 / -1;
}


.modal-actions {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 22px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .teacher-layout {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .teacher-main {
        padding: 30px;
    }

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

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


@media (max-width: 850px) {

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;

        padding: 35px;
    }

    .brand-content {
        margin-top: 55px;
    }

    .auth-card {
        padding: 35px;
    }


    .teacher-layout {
        display: block;
    }

    .teacher-sidebar {
        position: static;

        height: auto;

        padding: 12px 15px;
    }

    .sidebar-brand {
        padding-bottom: 12px;
    }

    .teacher-nav {
        display: flex;

        overflow-x: auto;
    }

    .teacher-nav-link {
        width: auto;

        flex: 0 0 auto;
    }

    .sidebar-bottom {
        display: flex;
        align-items: center;
        gap: 10px;

        margin-top: 10px;
    }

    .sidebar-home {
        flex: 1;
    }

    .logout-btn {
        width: auto;
        padding: 0 18px;
    }

    .teacher-main {
        padding: 28px 20px 50px;
    }
}


@media (max-width: 650px) {

    .teacher-auth-page {
        padding: 15px;
    }

    .auth-brand,
    .auth-card {
        padding: 25px;
    }

    .teacher-features {
        grid-template-columns: 1fr;
    }


    .teacher-header,
    .class-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .teacher-profile-mini {
        width: 100%;
    }


    .stats-grid,
    .class-overview-grid,
    .classes-grid {
        grid-template-columns: 1fr;
    }


    .section-heading {
        align-items: flex-start;

        flex-direction: column;
    }


    .section-heading .outline-btn,
    .section-heading .primary-btn {
        width: 100%;
    }


    .class-header-actions,
    .class-header-actions .primary-btn {
        width: 100%;
    }


    .class-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }


    .class-tab {
        flex: 0 0 auto;
    }


    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .full {
        grid-column: auto;
    }


    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
    }
}
/* =========================================================
   CLASS MANAGER (light theme)
========================================================= */

/* THE FIX: manager must span the full grid width */
.classes-grid > .teacher-manager {
    grid-column: 1 / -1;
}

.teacher-manager {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.manager-header,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.manager-header h2,
.panel-heading h3 {
    margin: 4px 0;
}

.manager-header p,
.panel-heading p {
    margin: 4px 0 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.manager-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
    gap: 20px;
    align-items: start;
}

.manager-panel,
.attendance-code-panel {
    min-width: 0;
    padding: 22px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.035);
}

.quick-action-grid {
    display: grid;
    gap: 12px;
}

/* lists */

.student-manager-list,
.attendance-records,
.file-list,
.attendance-history-list,
.performance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lesson-manager-list,
.test-manager-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

/* rows */

.student-row,
.attendance-record,
.history-row,
.performance-row,
.file-card,
.lesson-card,
.test-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.student-row-info,
.file-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.student-row-info strong,
.file-card-info strong,
.attendance-student strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-row-info span,
.file-card-info span,
.attendance-student span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray);
    font-size: 0.78rem;
}

.student-row-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--black);
    color: var(--gold);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
}

/* forms */

.manager-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.manager-toolbar label,
.teacher-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 180px;
}

.manager-toolbar label > span,
.teacher-form label > span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray);
}

.manager-toolbar select,
.manager-toolbar input,
.teacher-form input,
.teacher-form select,
.teacher-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    color: var(--black);
    outline: none;
}

.manager-toolbar select:focus,
.manager-toolbar input:focus,
.teacher-form input:focus,
.teacher-form select:focus,
.teacher-form textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 169, 0, 0.12);
}

.teacher-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 26px;
}

/* attendance */

.attendance-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.attendance-code-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
    padding: 22px;
    border-radius: 14px;
    background: var(--black);
    color: white;
    text-align: center;
}

.attendance-code-display span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.6);
}

.attendance-code-display strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    letter-spacing: 0.12em;
    color: var(--gold-light);
}

.attendance-code-display small {
    color: rgba(255, 255, 255, 0.6);
}

.attendance-code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.attendance-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.attendance-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.attendance-stat span {
    font-size: 0.72rem;
    color: var(--gray);
}

.attendance-stat strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
}

.attendance-student {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.attendance-student > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.attendance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attendance-status-btn {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--black);
    font-size: 0.75rem;
    font-weight: 700;
}

.attendance-status-btn:hover {
    border-color: var(--gold);
    background: #fbf6df;
}

.attendance-status {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-present  { background: #e5f6ec; color: #16844a; }
.status-late     { background: #fff4d6; color: #8a6a00; }
.status-absent   { background: #ffe9ec; color: #c8102e; }
.status-excused  { background: #e7efff; color: #1255d8; }
.status-unmarked { background: #eeeeee; color: #666; }

.hidden-manager-area {
    display: none;
}

/* files */

.file-card-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: white;
    border: 1px solid var(--border);
}

.file-card-image {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 10px;
}

.file-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.selected-file {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 10px;
    background: var(--light);
}

.selected-file span {
    color: var(--gray);
    font-size: 0.75rem;
}

.material-image-preview {
    max-width: 260px;
    max-height: 180px;
    margin-top: 10px;
    border-radius: 10px;
    object-fit: contain;
}

/* lessons / tests */

.lesson-card,
.test-card {
    flex-direction: column;
    align-items: flex-start;
}

.lesson-card-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray);
    font-size: 0.8rem;
}

.lesson-card p,
.test-card p {
    color: var(--gray);
    font-size: 0.88rem;
    line-height: 1.55;
}

.danger-btn {
    padding: 8px 12px;
    border: 1px solid rgba(200, 16, 46, 0.3);
    border-radius: 8px;
    background: #fff0f2;
    color: var(--danger);
    font-weight: 700;
}

.danger-btn:hover {
    background: var(--danger);
    color: white;
}

/* student popup */

.student-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.teacher-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.teacher-modal-content {
    position: relative;
    width: min(620px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.student-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.student-detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border-radius: 10px;
    background: var(--light);
    min-width: 0;
    overflow-wrap: anywhere;
}

.student-detail-grid span {
    color: var(--gray);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .manager-grid,
    .lesson-manager-list,
    .test-manager-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .student-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .attendance-record,
    .student-row,
    .file-card {
        flex-direction: column;
        align-items: flex-start;
    }
}