.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 48px 56px;
    width: 90%;
    max-width: 500px;
    border-radius: 25px !important;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 48px rgba(112,125,255,0.10);
}

.close-button {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 24px;
    font-weight: bold;
    color: #b3b3c6;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: #6c4cff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}
.modal-actions.two-actions { justify-content: center; }
.modal-actions.two-actions .btn-outline,
.modal-actions.two-actions #confirmOkBtn {
    flex: 1 1 50%;
}



.btn-outline {
    background-color: transparent;
    color: #b3b3c6;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    border: 1.5px solid #e0e6ed;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: #f3f0ff;
    color: #6c4cff;
    border-color: #6c4cff;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #222;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.modal-content p {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.body.modal-open {
    overflow: hidden;
}

/* Стили для формы внутри модального окна */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e6ed;
    border-radius: 15px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: #6c4cff;
    box-shadow: 0 0 0 3px rgba(112,125,255,0.1);
    outline: none;
}

/* Стили для кнопок внутри модального окна */
.modal-content button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #6c4cff;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
}

.modal-content button[type="submit"]:hover {
    background-color: #4d36c9;
}

/* Стили для результатов поиска */
#add-student-search-results {
    margin-top: 20px;
}

#add-student-search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#add-student-search-results li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e0e6ed;
}

#add-student-search-results li:last-child {
    border-bottom: none;
}

/* Стили для кнопки прикрепления ученика */
.attach-student {
    background-color: #6c4cff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.attach-student:hover {
    background-color: #4d36c9;
} 