:root {
    --primary: #2C3E50;
    --secondary: #34495E;
    --accent: #F3C623;
    --accent-light: #FFB22C;
    --accent-dark: #FA812F;
    --background-light: #FEF3E2;
    --text-dark: #333;
    --text-light: #f1faee;
    --gray: #7f8c8d;
}

/* ===================== */
/* BASE */
/* ===================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-light), #fff);
    display: flex;
    justify-content: center; /* FIX */
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    overflow-x: hidden;
}

/* ===================== */
/* FORMAS DECORATIVAS */
/* ===================== */
body::before,
body::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-light), transparent 70%);
    z-index: 0;
    opacity: 0.35;
}

body::before {
    top: -100px;
    left: -100px;
}

body::after {
    bottom: -120px;
    right: -120px;
}

/* ===================== */
/* CONTAINER */
/* ===================== */
.container {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 420px;
    border-top: 6px solid var(--accent);
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease-in-out;
}

/* Animación suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== */
/* LOGO */
/* ===================== */
.logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-container img {
    max-width: 140px;
    height: auto;
}

/* ===================== */
/* TITULOS */
/* ===================== */
h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* ===================== */
/* FORMULARIO */
/* ===================== */
.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    padding: 13px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

input:focus, select:focus {
    border-color: var(--accent);
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(243, 198, 35, 0.25);
}

/* ===================== */
/* BOTON */
/* ===================== */
button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-light);
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* ===================== */
/* LINKS */
/* ===================== */
.link-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.link-text a {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 600;
}

.link-text a:hover {
    text-decoration: underline;
}

/* ===================== */
/* ALERTAS */
/* ===================== */
.alert {
    padding: 12px;
    background-color: rgba(243, 198, 35, 0.18);
    color: var(--primary);
    border-left: 4px solid var(--accent-dark);
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */
@media (max-width: 480px) {
    .container {
        padding: 1.8rem;
        border-radius: 14px;
    }

    h2 {
        font-size: 1.4rem;
    }

    button {
        font-size: 0.95rem;
    }
}
/* ===================== */
/* alerta error similitud */
/* ===================== */
.alert-danger {
    padding: 14px 16px;
    background: linear-gradient(
        135deg,
        #f8d7da,
        #f5c6cb
    ); /* Gradiente suave */
    color: #721c24;
    border-left: 5px solid #c82333; /* Acento visual */
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(200, 35, 51, 0.18);
    animation: alertFade 0.4s ease;
    position: relative;
}

/* Ícono visual (sin HTML extra) */
.alert-danger::before {
    content: "⚠️";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

/* Animación */
@keyframes alertFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */
@media (max-width: 480px) {
    .alert-danger {
        font-size: 0.85rem;
        padding: 12px 14px 12px 38px; /* espacio para icono */
        text-align: left;
    }
}

/* ===================== */
/* MODAL OVERLAY */
/* ===================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(44, 62, 80, 0.92),
        rgba(52, 73, 94, 0.88)
    );
    display: flex;
    justify-content: center; /* FIX */
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 1rem;
}

/* Activación */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================== */
/* FORMAS DECORATIVAS */
/* ===================== */
.modal-overlay::before,
.modal-overlay::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0.25;
    z-index: 0;
}

.modal-overlay::before {
    top: -80px;
    left: -80px;
}

.modal-overlay::after {
    bottom: -100px;
    right: -100px;
}

/* ===================== */
/* MODAL CONTENT */
/* ===================== */
.modal-content {
    background: #ffffff;
    padding: 2.2rem;
    border-radius: 18px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.35);
    border-top: 6px solid var(--accent);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    animation: modalIn 0.4s ease;
}

/* Animación de entrada */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===================== */
/* HEADER */
/* ===================== */
.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--primary);
    margin: 0;
    font-weight: 600;
}

/* ===================== */
/* RESUMEN DE DATOS */
/* ===================== */
.data-summary {
    background: linear-gradient(135deg, #fafafa, #f3f3f3);
    padding: 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid #eee;
}

/* ===================== */
/* FILAS */
/* ===================== */
.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 6px;
    gap: 10px;
}

.data-row strong {
    color: var(--secondary);
}

.data-row span {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

/* ===================== */
/* IMAGEN */
/* ===================== */
.img-preview {
    display: block;
    margin: 14px auto;
    max-width: 160px;
    border-radius: 12px;
    border: 3px solid var(--accent);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* ===================== */
/* BOTONES */
/* ===================== */
.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 1.2rem;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

/* Cancelar */
.btn-cancel {
    background: linear-gradient(135deg, #95a5a6, var(--gray));
    color: #fff;
}

/* Confirmar */
.btn-confirm {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-light);
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.6rem;
        border-radius: 14px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .data-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-row span {
        text-align: left;
    }

    .modal-buttons {
        flex-direction: column;
    }
}

