.student-shell {
    padding: 28px 24px 40px;
}

.student-shell [hidden],
.student-hidden {
    display: none !important;
}

.student-topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(78, 95, 198, 0.12), rgba(78, 95, 198, 0.04));
    border: 1px solid rgba(78, 95, 198, 0.12);
    box-shadow: 0 18px 48px rgba(31, 41, 55, 0.10);
    margin-bottom: 28px;
}

.student-identity {
    display: flex;
    align-items: center;
    gap: 24px;
}

.student-identity-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.student-role-line {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--main-color);
}

.student-fullname {
    font-size: 32px;
    line-height: 1.05;
    color: var(--text-color);
}

.student-specialty-line {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.student-email-line {
    font-size: 14px;
    color: var(--muted-text);
}

.student-avatar-block {
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-avatar,
.profile-avatar-settings-preview {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(78, 95, 198, 0.25);
}

    .student-avatar img,
    .profile-avatar-settings-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.student-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.student-primary-button,
.student-secondary-button,
.student-danger-button,
.student-ghost-button {
    border: none;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.student-primary-button {
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
}

.student-secondary-button {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.student-danger-button {
    background: #fff1f2;
    color: #b42318;
    border: 1px solid rgba(180, 35, 24, 0.14);
}

.student-ghost-button {
    background: var(--input-bg);
    color: var(--muted-text);
    border: 1px dashed var(--border-color);
}

    .student-primary-button:hover,
    .student-secondary-button:hover,
    .student-danger-button:hover,
    .student-ghost-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(31, 41, 55, 0.10);
    }

.student-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: var(--card-bg);
    border-radius: 22px;
    border: 1px solid rgba(78, 95, 198, 0.08);
    box-shadow: 0 18px 36px rgba(31, 41, 55, 0.08);
    padding: 24px;
}

.dashboard-card-wide {
    padding: 28px;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

    .dashboard-card-header h2,
    .dashboard-card-header h3 {
        font-size: 22px;
        color: var(--text-color);
    }

    .dashboard-card-header span {
        font-size: 13px;
        color: var(--main-color);
        font-weight: 700;
    }

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 18px;
    color: var(--text-color);
}

.dashboard-empty {
    color: var(--muted-text);
    line-height: 1.55;
}

.student-alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.student-alert-success {
    background: rgba(2, 122, 72, 0.10);
    color: var(--success-color);
    border: 1px solid rgba(2, 122, 72, 0.15);
}

.student-alert-error {
    background: rgba(217, 45, 32, 0.10);
    color: var(--error-color);
    border: 1px solid rgba(217, 45, 32, 0.15);
}

.profile-modal-backdrop,
.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1200;
}

    .profile-modal-backdrop.open,
    .confirm-modal-backdrop.open {
        display: flex;
    }

.profile-modal {
    width: 100%;
    max-width: 760px;
    background: var(--card-bg);
    border-radius: 26px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(78, 95, 198, 0.10);
    padding: 28px;
}

.confirm-modal {
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(78, 95, 198, 0.10);
    padding: 24px;
}

.confirm-modal-header {
    margin-bottom: 14px;
}

    .confirm-modal-header h3 {
        font-size: 24px;
        color: var(--text-color);
    }

.confirm-modal-text {
    color: var(--text-color);
    line-height: 1.55;
    margin-bottom: 20px;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

    .profile-modal-header h2 {
        font-size: 28px;
        color: var(--text-color);
        margin-bottom: 6px;
    }

    .profile-modal-header p {
        color: var(--muted-text);
    }

.profile-modal-close {
    border: none;
    background: var(--input-bg);
    color: var(--text-color);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
}

.profile-settings-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.profile-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.profile-theme-group {
    grid-column: 1 / -1;
}

.profile-avatar-settings {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.profile-avatar-settings-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .profile-avatar-settings-controls p {
        color: var(--muted-text);
        line-height: 1.45;
        font-size: 14px;
    }

.upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.profile-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* custom select for theme */
.native-select-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    min-height: 50px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: 0.2s ease;
}

    .custom-select-trigger:hover {
        background-color: var(--card-bg);
    }

    .custom-select-trigger:focus {
        outline: none;
        border-color: var(--main-color);
        box-shadow: 0 0 0 4px rgba(78, 95, 198, 0.12);
    }

    .custom-select-trigger::after {
        content: "";
        position: absolute;
        right: 14px;
        top: 50%;
        width: 12px;
        height: 12px;
        transform: translateY(-50%);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M5.5 7.5L10 12l4.5-4.5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 12px 12px;
        transition: transform 0.18s ease;
    }

.custom-select.open .custom-select-trigger {
    border-color: var(--main-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(78, 95, 198, 0.12);
}

    .custom-select.open .custom-select-trigger::after {
        transform: translateY(-50%) rotate(180deg);
    }

.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(78, 95, 198, 0.12);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: 0 18px 40px rgba(31, 41, 55, 0.16);
}

.custom-select.open .custom-select-menu {
    display: block;
}

.custom-select-option {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.15s ease;
    line-height: 1.35;
}

    .custom-select-option:hover {
        background-color: rgba(78, 95, 198, 0.08);
    }

    .custom-select-option.selected {
        background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
        color: #ffffff;
        font-weight: 600;
    }

@media (max-width: 980px) {
    .student-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .student-actions {
        justify-content: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .student-shell {
        padding: 20px 16px 28px;
    }

    .student-identity {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .student-fullname {
        font-size: 26px;
    }

    .profile-settings-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar-settings {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-modal,
    .confirm-modal {
        padding: 22px 18px;
    }
}

/* Student workspace and practice module */
.student-hero-card,
.student-sidebar-card,
.student-main-card,
.student-practice-modal,
.student-section-card {
    background: var(--card-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
    box-shadow: var(--shadow);
}

.student-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 26px 28px;
    border-radius: 24px;
    margin-bottom: 20px;
    background:
        radial-gradient(circle at top left, rgba(78, 124, 255, 0.12), transparent 26%),
        linear-gradient(135deg, var(--card-bg), var(--input-bg));
}

.student-avatar-compact {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 22px;
}

.student-workspace {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    align-items: start;
}

.student-sidebar-card {
    position: sticky;
    top: 96px;
    padding: 20px;
    border-radius: 22px;
}

.student-sidebar-block,
.student-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-sidebar-title {
    color: var(--main-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.student-sidebar-divider {
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(to right, transparent, rgba(78, 95, 198, 0.18), transparent);
}

.student-nav-button {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(78, 95, 198, 0.16);
    background: linear-gradient(180deg, #edf3ff, #dce7ff);
    color: #17326e;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.student-nav-button.active {
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    border-color: transparent;
}

.student-full-button {
    width: 100%;
}

.student-main-card {
    min-height: 720px;
    padding: 24px;
    border-radius: 24px;
}

.student-panel {
    display: none;
}

.student-panel.active {
    display: block;
}

.student-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.student-panel-header h2 {
    color: var(--text-color);
    font-size: 26px;
    margin-bottom: 6px;
}

.student-panel-header p {
    color: var(--muted-text);
    line-height: 1.45;
}

.student-practice-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.student-subtab-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border: 1px solid rgba(78, 95, 198, 0.14);
    border-radius: 999px;
    background: var(--input-bg);
    color: var(--text-color);
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.student-subtab-button.active {
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    border-color: transparent;
}

.student-subtab-button span {
    min-width: 26px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.12);
    color: var(--main-color);
    font-size: 12px;
}

.student-subtab-button.active span {
    background: rgba(255, 255, 255, 0.20);
    color: #ffffff;
}

.student-practice-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.28fr);
    gap: 12px;
    margin-bottom: 12px;
}

.student-practice-summary {
    color: var(--muted-text);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.student-practice-table {
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(94, 135, 255, 0.16), transparent 24%),
        linear-gradient(160deg, #10214d, #15306a 62%, #1b3f86);
    border: 1px solid rgba(81, 125, 255, 0.18);
    padding: 14px;
    box-shadow: 0 18px 36px rgba(10, 23, 58, 0.12);
}

.student-practice-table-head,
.student-practice-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.4fr) minmax(190px, 0.75fr) minmax(180px, 0.75fr) minmax(170px, 0.65fr) 150px;
    gap: 14px;
    align-items: center;
}

.student-practice-table-head {
    padding: 0 12px 8px;
    color: rgba(225, 235, 255, 0.90);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.student-practice-table-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.student-practice-row {
    min-height: 82px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(78, 95, 198, 0.09);
    box-shadow: 0 10px 18px rgba(15, 32, 78, 0.08);
}

.student-practice-row[hidden] {
    display: none;
}

.student-practice-title-cell,
.student-practice-date-cell,
.student-practice-supervisor-cell,
.student-practice-progress-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.student-practice-title-cell strong,
.student-practice-date-cell strong,
.student-practice-supervisor-cell strong,
.student-practice-progress-cell strong {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.25;
}

.student-practice-title-cell small,
.student-practice-date-cell small,
.student-practice-supervisor-cell small,
.student-practice-progress-cell small {
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.35;
}

.student-practice-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-practice-index,
.student-practice-state {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.student-practice-index {
    background: rgba(78, 95, 198, 0.10);
    color: var(--main-color);
}

.student-practice-state.active {
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
}

.student-practice-state.completed {
    background: rgba(15, 23, 42, 0.09);
    color: #334155;
}

.student-practice-state.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.student-practice-action-cell {
    display: flex;
    justify-content: flex-end;
}

.student-empty-state {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: #27438d;
    line-height: 1.5;
}

.student-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.54);
}

.student-modal-backdrop[hidden] {
    display: none;
}

.student-practice-modal {
    width: min(1380px, 100%);
    max-height: calc(100vh - 42px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 28px;
    padding: 22px;
}

.student-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(128, 162, 255, 0.20), transparent 24%),
        linear-gradient(140deg, #11234f, #17326a 64%, #1d4488);
    box-shadow: 0 14px 28px rgba(13, 31, 74, 0.16);
}

.student-modal-eyebrow {
    color: rgba(226, 236, 255, 0.82);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.student-modal-header h2 {
    font-size: 28px;
    line-height: 1.12;
    margin-bottom: 6px;
}

.student-modal-header p {
    color: rgba(226, 236, 255, 0.84);
}

.student-modal-close {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.student-modal-status {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
}

.student-modal-status.error {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
}

.student-modal-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
}

.student-modal-tab {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(78, 95, 198, 0.14);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.student-modal-tab.active {
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    border-color: transparent;
}

.student-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.student-modal-panel {
    display: none;
}

.student-modal-panel.active {
    display: block;
}

.student-section-card {
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 14px 28px rgba(31, 41, 55, 0.08);
}

.student-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.student-section-header h3 {
    color: var(--text-color);
    font-size: 18px;
}

.student-section-header span {
    color: var(--muted-text);
    font-size: 13px;
    font-weight: 700;
}

.student-section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.student-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.student-overview-item {
    padding: 14px;
    border-radius: 18px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-overview-item span {
    display: block;
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.student-overview-item strong {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.35;
}

.student-competency-list,
.student-diary-list,
.student-source-list,
.student-appendix-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.student-compact-card {
    padding: 11px 12px;
    border-radius: 15px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
    color: var(--text-color);
}

.student-compact-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.student-compact-card p,
.student-compact-card small {
    color: var(--muted-text);
    line-height: 1.4;
}

.student-source-readonly a {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-color);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.student-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.student-form-wide {
    grid-column: 1 / -1;
}

.student-textarea {
    min-height: 120px;
    resize: vertical;
}

.student-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.student-diary-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    gap: 14px;
}

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

.student-report-table-block {
    padding: 12px;
    border-radius: 18px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-report-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.student-report-table-header h4 {
    color: var(--text-color);
    font-size: 14px;
}

.student-report-row,
.student-source-row {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid rgba(78, 95, 198, 0.08);
    margin-bottom: 8px;
}

.student-source-row {
    grid-template-columns: minmax(180px, 0.7fr) minmax(160px, 0.6fr) minmax(220px, 1fr) auto;
    align-items: center;
}

.student-report-row-actions,
.student-source-row-actions,
.student-appendix-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.student-mini-button {
    min-height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(78, 95, 198, 0.16);
    background: var(--input-bg);
    color: var(--text-color);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.student-organization-view,
.student-introduction-view,
.student-technical-view {
    background:
        radial-gradient(circle at top left, rgba(78, 124, 255, 0.10), transparent 30%),
        var(--card-bg);
}

.student-technical-characteristics {
    display: grid;
    gap: 8px;
}

.student-technical-row {
    display: grid;
    grid-template-columns: 44px minmax(220px, 0.8fr) minmax(260px, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-technical-row span,
.student-technical-preview-grid > div:first-child {
    color: var(--muted-text);
    font-weight: 900;
    text-align: center;
}

.student-technical-row label {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 800;
}

.student-technical-preview-title {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.student-technical-preview-grid {
    display: grid;
    grid-template-columns: 52px minmax(240px, 1fr) minmax(260px, 1fr);
    border: 1px solid rgba(78, 95, 198, 0.22);
    background: var(--card-bg);
}

.student-technical-preview-grid > div {
    min-height: 36px;
    padding: 8px 10px;
    border-right: 1px solid rgba(78, 95, 198, 0.18);
    border-bottom: 1px solid rgba(78, 95, 198, 0.18);
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
}

.student-technical-preview-grid > div:nth-child(3n) {
    border-right: 0;
}

.student-technical-preview-grid .head,
.student-technical-preview-grid .equipment {
    font-weight: 800;
}

.student-technical-preview-grid .equipment {
    grid-column: 1 / -1;
}

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

.student-readonly-item {
    min-height: 88px;
    padding: 14px;
    border-radius: 18px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-readonly-item.wide {
    grid-column: 1 / -1;
}

.student-readonly-item span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.student-readonly-item strong {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.student-document-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.student-document-errors {
    margin: 12px 0 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.student-document-errors-header {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.student-document-errors-header span {
    color: #b45309;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.student-document-errors-header strong {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.35;
}

.student-document-errors-list {
    display: grid;
    gap: 8px;
}

.student-document-error-item {
    width: 100%;
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
}

.student-document-error-item:hover {
    border-color: rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.student-document-error-item span {
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.student-document-error-item strong {
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.35;
}

.student-practice-report-preview-shell {
    margin-top: 16px;
    max-height: 620px;
    overflow: auto;
    padding: 14px;
    border-radius: 18px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-document-readiness {
    padding: 14px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid rgba(40, 167, 69, 0.22);
    color: var(--text-color);
}

.student-document-readiness.error {
    border-color: rgba(220, 53, 69, 0.24);
}

.student-document-readiness strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.student-document-readiness p {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.45;
}

.student-practice-report-preview {
    max-width: 820px;
    margin: 0 auto;
    padding: 34px 40px;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #111827;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    font-family: "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.45;
}

.student-practice-report-preview-title {
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.student-practice-report-preview-meta {
    display: grid;
    grid-template-columns: minmax(180px, 0.45fr) minmax(240px, 1fr);
    border: 1px solid #111827;
}

.student-practice-report-preview-row {
    display: contents;
}

.student-practice-report-preview-row span,
.student-practice-report-preview-row strong {
    padding: 7px 9px;
    border-right: 1px solid #111827;
    border-bottom: 1px solid #111827;
}

.student-practice-report-preview-row strong {
    border-right: 0;
    font-weight: 400;
}

.student-practice-report-preview-section {
    margin-top: 18px;
}

.student-practice-report-preview-section h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.student-practice-report-preview-section p {
    margin: 0;
    white-space: pre-wrap;
    text-align: justify;
}

.student-practice-report-preview-section ol {
    margin: 0;
    padding-left: 24px;
}

.student-attestation-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2250;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(8px, 1.3vw, 18px);
    background: rgba(15, 23, 42, 0.62);
}

.student-attestation-preview-backdrop[hidden] {
    display: none;
}

.student-attestation-preview-modal {
    width: min(1440px, 100%);
    height: calc(100dvh - clamp(16px, 2.6vw, 36px));
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #eef3fb;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
}

.student-attestation-preview-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(203, 213, 225, 0.82);
}

.student-attestation-preview-header h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 24px;
}

.student-attestation-preview-header p {
    margin: 0;
    color: #64748b;
    line-height: 1.35;
}

.student-attestation-preview-header .student-modal-close {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.student-attestation-preview-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    display: flex;
    position: relative;
    overflow: hidden;
    background: #525659;
}

.student-attestation-preview-body iframe {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: block;
    border: 0;
    border-radius: 0;
    background: #525659;
}

.student-document-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(82, 86, 89, 0.86);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
    z-index: 2;
}

.student-document-preview-loading[hidden] {
    display: none;
}

.student-document-preview-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: student-document-preview-spin 0.8s linear infinite;
}

@keyframes student-document-preview-spin {
    to {
        transform: rotate(360deg);
    }
}

.student-attestation-preview-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(203, 213, 225, 0.82);
}

.student-attestation-preview-actions .student-primary-button,
.student-attestation-preview-actions .student-secondary-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 132px;
    min-height: 40px;
}

@media (max-height: 720px) {
    .student-attestation-preview-header {
        padding: 10px 16px;
    }

    .student-attestation-preview-header h2 {
        font-size: 20px;
    }

    .student-attestation-preview-actions {
        padding: 10px 14px;
    }

    .student-attestation-preview-actions .student-primary-button,
    .student-attestation-preview-actions .student-secondary-button {
        min-height: 36px;
    }
}

.student-field-error {
    min-height: 18px;
    margin-top: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.student-diary-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 0.56fr) minmax(520px, 1fr);
    gap: 14px;
    align-items: start;
}

.student-calendar-card {
    position: sticky;
    top: 0;
}

.student-calendar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    max-height: 560px;
    overflow: auto;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(160deg, #122655, #1d3f82);
}

.student-calendar-day {
    min-height: 76px;
    padding: 9px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: #172554;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.student-calendar-day:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(10, 23, 58, 0.18);
}

.student-calendar-day span {
    font-size: 18px;
    font-weight: 900;
}

.student-calendar-day small,
.student-calendar-day b {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: lowercase;
}

.student-calendar-day.filled {
    background: linear-gradient(180deg, #e8fff3, #ffffff);
    border-color: rgba(22, 163, 74, 0.30);
}

.student-calendar-day.filled b {
    color: #15803d;
}

.student-calendar-day.reviewed {
    background: linear-gradient(180deg, #eef5ff, #ffffff);
    border-color: rgba(55, 107, 255, 0.35);
}

.student-calendar-day.reviewed b {
    color: #274db8;
}

.student-calendar-day.empty b {
    color: #b45309;
}

.student-calendar-day.weekend {
    opacity: 0.52;
    cursor: not-allowed;
}

.student-calendar-day.active {
    background: linear-gradient(135deg, #376bff, #243fa8);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(55, 107, 255, 0.30);
}

.student-calendar-day.active small,
.student-calendar-day.active b {
    color: rgba(255, 255, 255, 0.82);
}

.student-diary-editor {
    margin-bottom: 0;
}

.student-short-textarea {
    min-height: 88px;
}

.student-rich-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.student-rich-report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.student-rich-report-builder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(78, 124, 255, 0.10), transparent 28%),
        var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-rich-block {
    padding: 12px;
    border-radius: 17px;
    background: var(--card-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
    box-shadow: 0 10px 18px rgba(15, 32, 78, 0.06);
}

.student-rich-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.student-rich-block-header span {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 900;
}

.student-rich-textarea {
    min-height: 150px;
    line-height: 1.55;
    resize: vertical;
}

.student-rich-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.student-rich-table-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.6fr) minmax(120px, 0.6fr) minmax(160px, 1fr) 36px;
    gap: 8px;
    align-items: center;
}

.student-file-dropzone {
    width: 100%;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 16px;
    border-radius: 18px;
    border: 1px dashed rgba(78, 95, 198, 0.38);
    background:
        radial-gradient(circle at top left, rgba(78, 124, 255, 0.10), transparent 30%),
        var(--input-bg);
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
}

.student-file-dropzone strong {
    font-size: 14px;
    color: var(--text-color);
}

.student-file-dropzone span,
.student-file-dropzone small {
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.35;
}

.student-figure-dropzone {
    margin-top: 10px;
    border-style: solid;
}

.student-existing-figures {
    padding: 12px;
    border-radius: 17px;
    background: rgba(78, 95, 198, 0.08);
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.student-existing-figures > strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 13px;
}

.student-existing-figure {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 13px;
    background: var(--card-bg);
    border: 1px solid rgba(78, 95, 198, 0.08);
    color: var(--text-color);
    text-decoration: none;
    margin-top: 7px;
}

.student-existing-figure small {
    color: var(--muted-text);
}

html[data-theme="dark"] .student-hero-card,
html[data-theme="dark"] .student-sidebar-card,
html[data-theme="dark"] .student-main-card,
html[data-theme="dark"] .student-practice-modal,
html[data-theme="dark"] .student-section-card {
    background: linear-gradient(180deg, #1f2937, #172033);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .student-nav-button,
html[data-theme="dark"] .student-subtab-button:not(.active),
html[data-theme="dark"] .student-modal-tab:not(.active) {
    background: linear-gradient(180deg, #253248, #1a2435);
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.20);
}

html[data-theme="dark"] .student-practice-row,
html[data-theme="dark"] .student-empty-state,
html[data-theme="dark"] .student-compact-card,
html[data-theme="dark"] .student-overview-item,
html[data-theme="dark"] .student-report-table-block,
html[data-theme="dark"] .student-report-row,
html[data-theme="dark"] .student-source-row,
html[data-theme="dark"] .student-readonly-item,
html[data-theme="dark"] .student-rich-block,
html[data-theme="dark"] .student-file-dropzone,
html[data-theme="dark"] .student-existing-figure {
    background: linear-gradient(180deg, #253248, #1b2638);
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--text-color);
}

html[data-theme="dark"] .student-rich-report-builder,
html[data-theme="dark"] .student-existing-figures {
    background: linear-gradient(180deg, #1a2435, #121a28);
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .student-calendar {
    background: linear-gradient(160deg, #0f172a, #172554);
}

html[data-theme="dark"] .student-calendar-day {
    background: linear-gradient(180deg, #253248, #1b2638);
    border-color: rgba(148, 163, 184, 0.20);
    color: #dbeafe;
}

html[data-theme="dark"] .student-calendar-day small,
html[data-theme="dark"] .student-calendar-day b {
    color: #94a3b8;
}

html[data-theme="dark"] .student-calendar-day.filled {
    background: linear-gradient(180deg, rgba(22, 101, 52, 0.38), #1b2638);
}

html[data-theme="dark"] .student-practice-state.completed,
html[data-theme="dark"] .student-practice-index {
    background: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
}

html[data-theme="dark"] .student-practice-state.warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

html[data-theme="dark"] .student-modal-status {
    background: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
}

html[data-theme="dark"] .student-document-errors {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(30, 41, 59, 0.92));
    border-color: rgba(245, 158, 11, 0.34);
}

html[data-theme="dark"] .student-document-errors-header span {
    color: #fbbf24;
}

html[data-theme="dark"] .student-document-error-item {
    background: linear-gradient(180deg, #253248, #1b2638);
    border-color: rgba(245, 158, 11, 0.24);
}

html[data-theme="dark"] .student-document-error-item:hover {
    border-color: rgba(245, 158, 11, 0.48);
}

@media (max-width: 1180px) {
    .student-workspace,
    .student-diary-layout,
    .student-diary-workspace {
        grid-template-columns: 1fr;
    }

    .student-sidebar-card {
        position: static;
    }

    .student-practice-table-head {
        display: none;
    }

    .student-practice-row {
        grid-template-columns: 1fr;
    }

    .student-practice-action-cell {
        justify-content: flex-start;
    }

    .student-report-tables,
    .student-overview-grid,
    .student-readonly-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-technical-row,
    .student-technical-preview-grid {
        grid-template-columns: 44px minmax(160px, 1fr) minmax(180px, 1fr);
    }
}

@media (max-width: 760px) {
    .student-hero-card,
    .student-identity,
    .student-practice-toolbar,
    .student-form-grid,
    .student-report-tables,
    .student-overview-grid,
    .student-readonly-grid,
    .student-rich-table-row,
    .student-source-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .student-technical-row {
        grid-template-columns: 36px 1fr;
    }

    .student-technical-row input {
        grid-column: 1 / -1;
    }

    .student-technical-preview {
        overflow-x: auto;
    }

    .student-technical-preview-grid {
        min-width: 620px;
    }

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

    .student-practice-modal {
        padding: 14px;
    }
}

/* Fullscreen day report editor */
.student-report-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(78, 124, 255, 0.10), transparent 32%),
        var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.12);
}

.student-report-summary-label {
    display: inline-flex;
    margin-bottom: 7px;
    color: var(--main-color);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.student-report-summary-card h4 {
    margin-bottom: 6px;
    color: var(--text-color);
    font-size: 18px;
}

.student-report-summary-card p {
    margin-bottom: 10px;
    color: var(--muted-text);
    line-height: 1.45;
}

.student-review-card {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid rgba(78, 95, 198, 0.12);
    color: var(--text-color);
}

.student-review-card.reviewed {
    border-color: rgba(40, 167, 69, 0.28);
}

.student-review-card.pending {
    border-color: rgba(255, 193, 7, 0.35);
}

.student-review-card strong,
.student-review-card span,
.student-review-card p {
    display: block;
}

.student-review-card strong {
    margin-bottom: 4px;
}

.student-review-card span,
.student-review-card p {
    color: var(--muted-text);
    line-height: 1.45;
}

.student-review-card p {
    margin: 6px 0 0;
}

.student-section-comment {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: var(--text-color);
}

.student-section-comment strong,
.student-section-comment span,
.student-section-comment p {
    display: block;
}

.student-section-comment strong {
    margin-bottom: 4px;
}

.student-section-comment span {
    color: var(--muted-text);
    font-size: 12px;
    font-weight: 800;
}

.student-section-comment p {
    margin: 8px 0 0;
    line-height: 1.45;
}

.student-report-summary-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.student-report-summary-meta span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.10);
    color: var(--main-color);
    font-size: 12px;
    font-weight: 800;
}

.student-report-workspace-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2300;
    padding: 18px;
    background: rgba(15, 23, 42, 0.62);
}

.student-report-workspace-backdrop[hidden] {
    display: none;
}

.student-report-workspace {
    height: calc(100vh - 36px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 28px;
    background: #eef3fb;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
}

.student-report-workspace-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(203, 213, 225, 0.82);
}

.student-report-workspace-eyebrow {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--main-color);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.student-report-workspace-header h2 {
    color: #0f172a;
    font-size: 24px;
    margin-bottom: 5px;
}

.student-report-workspace-header p {
    color: #64748b;
    line-height: 1.4;
}

.student-report-workspace-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.student-report-save-state {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.student-report-save-state.saved {
    background: rgba(22, 163, 74, 0.10);
    color: #15803d;
}

.student-report-save-state.dirty,
.student-report-save-state.saving {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.student-report-save-state.error {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
}

.student-report-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 18px;
    background: rgba(248, 250, 252, 0.96);
    border-bottom: 1px solid rgba(203, 213, 225, 0.82);
}

.student-report-toolbar button {
    min-height: 34px;
    border-radius: 11px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #1e293b;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.student-report-toolbar button:hover {
    border-color: rgba(78, 95, 198, 0.38);
    color: var(--main-color);
}

.student-report-workspace-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: 250px minmax(620px, 1fr) 280px;
    gap: 18px;
    padding: 18px;
    overflow: hidden;
}

.student-report-side-panel,
.student-report-properties-panel {
    min-height: 0;
    overflow: auto;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(203, 213, 225, 0.80);
    padding: 16px;
}

.student-report-side-panel h3,
.student-report-properties-panel h3 {
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 15px;
}

.student-report-outline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.student-report-outline button {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 10px 11px;
    border-radius: 13px;
    border: 1px solid rgba(203, 213, 225, 0.84);
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
}

.student-report-outline button.active {
    border-color: rgba(78, 95, 198, 0.40);
    background: rgba(78, 95, 198, 0.09);
}

.student-report-outline span {
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.student-report-outline small,
.student-report-outline-empty,
.student-report-side-hint,
.student-report-properties-panel p {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.student-report-side-hint {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(78, 95, 198, 0.08);
}

.student-report-document-area {
    min-height: 0;
    overflow: auto;
    padding: 18px 0 42px;
}

.student-report-a4-page {
    width: min(794px, calc(100% - 18px));
    min-height: 1123px;
    margin: 0 auto;
    padding: 72px 78px;
    background: #ffffff;
    color: #111827;
    border-radius: 4px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
    font-family: "Times New Roman", Georgia, serif;
    font-size: 16px;
    line-height: 1.55;
}

.student-report-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(148, 163, 184, 0.70);
    border-radius: 16px;
    color: #475569;
    text-align: center;
    font-family: inherit;
}

.student-report-empty-state strong {
    color: #0f172a;
    font-size: 20px;
}

.student-report-empty-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-family: var(--font-family, Arial, sans-serif);
}

.student-report-empty-actions button {
    min-height: 36px;
    border: 1px solid rgba(78, 95, 198, 0.24);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.student-report-block {
    position: relative;
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.student-report-block:hover,
.student-report-block.selected {
    border-color: rgba(78, 95, 198, 0.25);
    background: rgba(78, 95, 198, 0.035);
}

.student-report-block-controls {
    position: absolute;
    left: -54px;
    top: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.90);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    font-family: var(--font-family, Arial, sans-serif);
    z-index: 2;
}

.student-report-block:hover .student-report-block-controls,
.student-report-block.selected .student-report-block-controls {
    display: flex;
}

.student-report-block-controls button {
    width: 32px;
    min-height: 30px;
    border: none;
    border-radius: 11px;
    background: #f1f5f9;
    color: #334155;
    padding: 0;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.student-report-block-controls button:hover:not(:disabled) {
    background: rgba(78, 95, 198, 0.12);
    color: var(--main-color);
}

.student-report-block-controls button:disabled {
    opacity: 0.38;
    cursor: default;
}

.student-report-editable,
.student-report-block h3 {
    min-height: 36px;
    outline: none;
}

.student-report-block h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
}

.student-report-editable:empty::before,
.student-report-block h3:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.student-report-caption-input,
.student-report-alt-input {
    width: 100%;
    min-height: 36px;
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.55);
    outline: none;
    background: transparent;
    color: #111827;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 15px;
    text-align: center;
}

.student-report-alt-input {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    text-align: left;
    font-family: var(--font-family, Arial, sans-serif);
}

.student-report-table-block-editor table {
    width: 100%;
    margin: 10px 0;
    border-collapse: collapse;
}

.student-report-table-block-editor th,
.student-report-table-block-editor td {
    min-width: 80px;
    min-height: 32px;
    padding: 7px 8px;
    border: 1px solid #111827;
    outline: none;
    vertical-align: top;
}

.student-report-table-block-editor th {
    font-weight: 700;
    background: #f8fafc;
}

.student-report-table-tools {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
    font-family: var(--font-family, Arial, sans-serif);
}

.student-report-table-tools label {
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.student-report-table-tools button {
    min-height: 28px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 9px;
    background: #ffffff;
    color: #334155;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 800;
}

.student-report-figure-preview {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(203, 213, 225, 0.86);
    overflow: hidden;
}

.student-report-figure-preview img {
    display: block;
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
}

.student-report-figure-preview.empty span {
    color: #64748b;
    font-family: var(--font-family, Arial, sans-serif);
    font-size: 14px;
}

.student-report-property-card {
    padding: 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.84);
    margin-bottom: 9px;
}

.student-report-property-card span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.student-report-property-card strong {
    color: #0f172a;
}

.student-report-property-actions {
    display: grid;
    gap: 8px;
}

.student-report-close-guard {
    position: absolute;
    right: 28px;
    top: 86px;
    z-index: 5;
    width: min(520px, calc(100% - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.30);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.student-report-close-guard[hidden] {
    display: none;
}

.student-report-close-guard strong {
    display: block;
    color: #92400e;
    margin-bottom: 3px;
}

.student-report-close-guard span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

html[data-theme="dark"] .student-report-summary-card {
    background: linear-gradient(180deg, #253248, #1b2638);
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .student-report-workspace {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .student-attestation-preview-modal {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .student-report-workspace-header,
html[data-theme="dark"] .student-report-toolbar,
html[data-theme="dark"] .student-report-side-panel,
html[data-theme="dark"] .student-report-properties-panel,
html[data-theme="dark"] .student-attestation-preview-header,
html[data-theme="dark"] .student-attestation-preview-actions {
    background: #172033;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .student-report-workspace-header h2,
html[data-theme="dark"] .student-attestation-preview-header h2,
html[data-theme="dark"] .student-report-side-panel h3,
html[data-theme="dark"] .student-report-properties-panel h3 {
    color: #f8fafc;
}

html[data-theme="dark"] .student-report-workspace-header p,
html[data-theme="dark"] .student-attestation-preview-header p,
html[data-theme="dark"] .student-report-outline small,
html[data-theme="dark"] .student-report-outline-empty,
html[data-theme="dark"] .student-report-side-hint,
html[data-theme="dark"] .student-report-properties-panel p {
    color: #94a3b8;
}

html[data-theme="dark"] .student-attestation-preview-header .student-modal-close {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

html[data-theme="dark"] .student-report-toolbar button,
html[data-theme="dark"] .student-report-outline button,
html[data-theme="dark"] .student-report-property-card,
html[data-theme="dark"] .student-report-close-guard {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.20);
    color: #e5e7eb;
}

.student-report-toolbar-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.student-report-validation-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 18px;
    background: #fff7ed;
    border-bottom: 1px solid rgba(251, 146, 60, 0.24);
    color: #9a3412;
    font-size: 13px;
    font-weight: 850;
}

.student-report-validation-summary[hidden] {
    display: none;
}

.student-report-validation-summary div {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.student-report-validation-summary button,
.student-report-insert-row button,
.student-table-context-panel button,
.student-table-context-menu button {
    border: 1px solid rgba(78, 95, 198, 0.16);
    border-radius: 999px;
    background: #ffffff;
    color: #27438d;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.student-report-validation-summary button {
    min-height: 26px;
    padding: 0 9px;
}

.student-report-block-label {
    margin-bottom: 8px;
    color: #475569;
    font-family: var(--font-family, Arial, sans-serif);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.student-report-mode-select {
    width: 100%;
    min-height: 36px;
    margin-bottom: 8px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    padding: 0 10px;
    font-family: var(--font-family, Arial, sans-serif);
    font-size: 13px;
    font-weight: 800;
}

.student-report-textarea,
.student-report-structured-table textarea {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: #111827;
    font: inherit;
    line-height: 1.55;
    resize: vertical;
}

.student-report-textarea {
    min-height: 180px;
    padding: 12px 13px;
}

.student-report-text-block small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-family: var(--font-family, Arial, sans-serif);
    font-size: 12px;
}

.student-report-insert-row {
    display: grid;
    grid-template-columns: minmax(24px, 1fr) repeat(3, auto) minmax(24px, 1fr);
    gap: 7px;
    align-items: center;
    margin: -5px 0 14px;
    font-family: var(--font-family, Arial, sans-serif);
}

.student-report-insert-row span {
    height: 1px;
    background: rgba(203, 213, 225, 0.72);
}

.student-report-insert-row button {
    min-height: 28px;
    padding: 0 10px;
}

.student-report-insert-row button:hover,
.student-report-validation-summary button:hover,
.student-table-context-panel button:hover:not(:disabled),
.student-table-context-menu button:hover:not(:disabled) {
    background: rgba(78, 95, 198, 0.10);
}

.student-report-outline button.has-problems {
    border-color: rgba(249, 115, 22, 0.45);
    background: #fff7ed;
}

.student-report-outline small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.student-report-outline b {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f97316;
    color: #ffffff;
    font-size: 11px;
}

.student-table-context-panel {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 8px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(203, 213, 225, 0.86);
    font-family: var(--font-family, Arial, sans-serif);
}

.student-table-context-panel button {
    min-height: 28px;
    padding: 0 9px;
}

.student-table-context-panel button:disabled,
.student-table-context-menu button:disabled {
    opacity: 0.42;
    cursor: default;
}

.student-report-structured-table textarea {
    min-height: 48px;
    padding: 7px 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    resize: vertical;
}

.student-report-table-block-editor th.selected,
.student-report-table-block-editor td.selected {
    outline: 2px solid rgba(55, 107, 255, 0.65);
    outline-offset: -2px;
    background: rgba(55, 107, 255, 0.08);
}

.student-report-table-header-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-family: var(--font-family, Arial, sans-serif);
    font-size: 12px;
    font-weight: 850;
}

.student-table-context-menu {
    position: fixed;
    z-index: 2400;
    width: 232px;
    padding: 7px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.student-table-context-menu[hidden] {
    display: none;
}

.student-table-context-menu button {
    width: 100%;
    min-height: 30px;
    justify-content: flex-start;
    border-radius: 10px;
    border-color: transparent;
    background: transparent;
    padding: 0 9px;
    text-align: left;
}

.student-table-context-menu hr {
    margin: 6px 0;
    border: none;
    border-top: 1px solid rgba(203, 213, 225, 0.84);
}

.student-report-property-card.muted {
    color: #64748b;
    line-height: 1.45;
}

html[data-theme="dark"] .student-report-validation-summary {
    background: rgba(154, 52, 18, 0.22);
    border-color: rgba(251, 146, 60, 0.24);
    color: #fdba74;
}

html[data-theme="dark"] .student-report-mode-select,
html[data-theme="dark"] .student-report-textarea,
html[data-theme="dark"] .student-table-context-panel,
html[data-theme="dark"] .student-table-context-menu {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.20);
    color: #e5e7eb;
}

html[data-theme="dark"] .student-report-outline button.has-problems {
    background: rgba(154, 52, 18, 0.22);
    border-color: rgba(251, 146, 60, 0.28);
}

html[data-theme="dark"] .student-report-text-block small,
html[data-theme="dark"] .student-report-block-label,
html[data-theme="dark"] .student-report-table-header-toggle,
html[data-theme="dark"] .student-report-property-card.muted {
    color: #94a3b8;
}

@media (max-width: 1220px) {
    .student-report-workspace-grid {
        grid-template-columns: 220px minmax(520px, 1fr);
    }

    .student-report-properties-panel {
        display: none;
    }
}

@media (max-width: 900px) {
    .student-report-workspace-backdrop {
        padding: 0;
    }

    .student-report-workspace {
        height: 100vh;
        border-radius: 0;
    }

    .student-report-workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-report-workspace-grid {
        grid-template-columns: 1fr;
    }

    .student-report-side-panel {
        max-height: 150px;
    }

    .student-report-a4-page {
        width: 100%;
        min-height: 700px;
        padding: 36px 28px;
    }

    .student-report-block-controls {
        position: static;
        display: flex;
        flex-direction: row;
        width: max-content;
        max-width: 100%;
        margin-bottom: 8px;
        box-shadow: none;
    }

    .student-report-summary-card,
    .student-report-close-guard {
        grid-template-columns: 1fr;
    }
}
