/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 16, 28, 0.56);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-overlay.active {
    display: flex;
    animation: overlay-in 0.18s ease both;
}

@keyframes overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    width: 100%;
    max-width: 460px;
    padding: 28px;
    border-radius: var(--r-lg);
    background: #192130;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.2s cubic-bezier(0.34, 1.28, 0.64, 1) both;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-wide {
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h3 {
    margin-bottom: 22px;
    font-size: 18px;
    font-weight: 780;
    letter-spacing: -0.03em;
    color: var(--text-1);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: #1e2a3e;
    color: var(--text-1);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-3);
    opacity: 0.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(79, 104, 232, 0.56);
    box-shadow: 0 0 0 4px rgba(79, 104, 232, 0.10);
    background: #253348;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.form-actions .btn-danger {
    margin-right: auto;
}

.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option input {
    display: none;
}

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    border: 3px solid transparent;
    transition:
        transform 0.12s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}
.color-option input:checked + .color-dot {
    border-color: var(--text-1);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
}
.color-dot:hover {
    transform: scale(1.06);
}
