/* =========================
   MODAL OVERLAY
========================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;
}

/* OCULTO */
.modal.hidden {
    display: none;
}

/* =========================
   CONTENIDO MODAL
========================= */
.modal-content {
    background: #ffffff;
    width: 440px;
    max-width: 94%;
    padding: 28px;

    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);

    position: relative;
    animation: modalIn 0.25s ease-out;
}

/* =========================
   BOTÓN CERRAR
========================= */
.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;

    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;

    color: #666;
}

.modal-close:hover {
    color: #F57C00;
}

/* =========================
   TÍTULO
========================= */
.modal-content h2 {
    margin-bottom: 22px;
    color: #F57C00;
    font-size: 22px;
}

/* =========================
   FORMULARIO
========================= */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Labels */
.modal-content label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

/* Inputs */
.modal-content input {
    width: 100%;
    padding: 10px 12px;

    border: 1px solid #ccc;
    border-radius: 8px;

    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.modal-content input:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 2px rgba(245, 124, 0, 0.2);
}

/* =========================
   ACCIONES
========================= */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

/* Botón cancelar */
.btn-cancelar {
    background: #e0e0e0;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;

    cursor: pointer;
    font-size: 14px;
}

.btn-cancelar:hover {
    background: #d5d5d5;
}

/* Botón guardar */
.btn-guardar {
    background: #F57C00;
    color: #fff;

    border: none;
    padding: 10px 18px;
    border-radius: 8px;

    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-guardar:hover {
    background: #e26f00;
}

/* =========================
   ANIMACIÓN
========================= */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}