:root {
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --modal-bg: #fff;
    --modal-radius: 12px;
    --modal-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Overlay hidden by default */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

/* Show overlay when active */
.modal-overlay.is-active {
    display: flex;
}

/* Modal */
.modal {
    background: var(--modal-bg);
    color: #111;
    max-width: 520px;
    width: 100%;
    border-radius: var(--modal-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 1.125rem;
    margin: 0;
}

.modal-close {
    appearance: none;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.btn {
    appearance: none;
    border: 1px solid #ddd;
    background: #f7f7f7;
    color: #111;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.btn.primary {
    background: #2563eb;
    border-color: #1e40af;
    color: #fff;
}