/* EduJournal — редактор оценок (контракт PvE) */

.ej-overlay {
    position: fixed;
    inset: 0;
    z-index: 15000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 8, 12, .82);
}

.ej-overlay.active {
    display: flex;
}

.ej-panel {
    width: min(920px, 100%);
    max-height: min(88vh, 720px);
    display: flex;
    flex-direction: column;
    background: #1e222d;
    border: 1px solid #363a45;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
    overflow: hidden;
}

.ej-head {
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: #252932;
    border-bottom: 1px solid #363a45;
}

.ej-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: "Segoe UI", sans-serif;
}

.ej-head p {
    margin: 0;
    font-size: 11px;
    color: #787b86;
}

.ej-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: #787b86;
    background: transparent;
    border: 1px solid #363a45;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
}

.ej-close:hover {
    color: #fff;
    border-color: #434651;
}

.ej-brief {
    padding: 10px 18px;
    font-size: 12px;
    line-height: 1.5;
    color: #b2b5be;
    background: rgba(41, 98, 255, .06);
    border-bottom: 1px solid #363a45;
}

.ej-brief strong {
    color: #f0b90b;
}

.ej-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px 16px;
}

.ej-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: "Segoe UI", sans-serif;
}

.ej-table th,
.ej-table td {
    padding: 8px 10px;
    border: 1px solid #363a45;
    text-align: center;
}

.ej-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #252932;
    color: #787b86;
    font-size: 10px;
    letter-spacing: .6px;
    text-transform: uppercase;
    font-weight: 600;
}

.ej-table th.ej-student-col,
.ej-table td.ej-student-col {
    text-align: left;
    min-width: 140px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #1e222d;
}

.ej-table tbody tr:nth-child(even) td.ej-student-col {
    background: #252932;
}

.ej-table tbody tr:hover td {
    background: rgba(41, 98, 255, .04);
}

.ej-table tbody tr:hover td.ej-student-col {
    background: #2a2e3a;
}

.ej-grade-cell {
    min-width: 56px;
}

.ej-grade-cell--target {
    background: rgba(240, 185, 11, .08) !important;
}

.ej-grade-input {
    width: 44px;
    padding: 4px 2px;
    text-align: center;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: Consolas, "JetBrains Mono", monospace;
    background: #131722;
    border: 1px solid #363a45;
    border-radius: 3px;
}

.ej-grade-input:focus {
    outline: none;
    border-color: #26a69a;
    box-shadow: 0 0 0 2px rgba(38, 166, 154, .2);
}

.ej-grade-input.ej-grade-input--target {
    border-color: #f0b90b;
}

.ej-grade-static {
    color: #787b86;
    font-family: Consolas, "JetBrains Mono", monospace;
}

.ej-foot {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #363a45;
    background: #252932;
}

.ej-foot-note {
    font-size: 11px;
    color: #787b86;
    max-width: 420px;
    line-height: 1.45;
}

.ej-foot-actions {
    display: flex;
    gap: 8px;
}

.ej-btn {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid;
}

.ej-btn--submit {
    color: #05080a;
    background: linear-gradient(100deg, #26a69a, #4db6ac);
    border-color: #26a69a;
}

.ej-btn--cancel {
    color: #787b86;
    background: transparent;
    border-color: #363a45;
}

.ej-btn--submit:hover {
    filter: brightness(1.06);
}
