/* --- General --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6; /* Un gris muy claro, casi blanco */
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Para que no se estire si el contenido es poco */
    min-height: 100vh;
    box-sizing: border-box;
}

.form-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 800px; /* Ancho máximo del contenedor general */
    box-sizing: border-box;
}



.step {
    display: none;
}
.step.active-step {
    display: block;
}

.step-header {
    text-align: center;
    margin-bottom: 30px;
}
.step-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50; /* Azul oscuro/gris */
    margin-bottom: 5px;
}
.step-header p {
    font-size: 1em;
    color: #7f8c8d; /* Gris medio */
    margin-top: 0;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875em; /* 14px */
    font-weight: 500;
    color: #34495e; /* Azul/gris más oscuro para etiquetas */
    margin-bottom: 8px;
}
.form-group label .required-asterisk {
    color: #e74c3c; /* Rojo */
    font-weight: bold;
    margin-left: 2px;
}
.form-group label .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #bdc3c7;
    color: white;
    font-size: 0.75em;
    font-style: normal;
    font-weight: bold;
    margin-left: 5px;
    cursor: help;
    user-select: none;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95em;
    background-color: #f8f9fa; /* Fondo gris muy claro */
    border: 1px solid #e9ecef; /* Borde muy sutil */
    border-radius: 25px; /* Estilo "pill" */
    box-sizing: border-box;
    color: #495057;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input::placeholder {
    color: #adb5bd;
    opacity: 1;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #80bdff; /* Azul claro en focus */
    background-color: #fff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.15);
}

/* --- Grid for Step 2 --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna por defecto (móviles) */
    gap: 0px 25px; /* No gap vertical, sí horizontal */
}
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr; /* Dos columnas */
    }
    .image-upload-container {
        /* Opcional: si quieres que ocupe una fila completa al final o un lugar específico */
        /* grid-column: 1 / -1; */
        margin-top: 0; /* Ajustar si es necesario */
    }
}

/* --- Image Uploader --- */
.image-upload-container > label { /* La etiqueta "Seleccione Imagen" */
    margin-bottom: 8px; /* Igual que las otras etiquetas */
}
.image-upload-styled {
    width: 100%;
    max-width: 200px; /* Ancho como en la referencia */
    height: 200px;
    background-color: #f8f9fa;
    border: 2px dashed #d1d8e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    margin: 0 auto; /* Para centrar si está en una columna completa */
}
.image-upload-styled:hover {
    border-color: #adb5bd;
    /* background-color: #e9ecef; */
}
.upload-label-styled {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    position: relative;
}
#preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px; /* Un poco menos que el contenedor */
}
.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}
.upload-placeholder .placeholder-icon {
    font-size: 2.8em;
    margin-bottom: 10px;
}
.upload-placeholder span {
    font-size: 0.9em;
    font-weight: 500;
}
.upload-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}
.upload-actions .action-icon {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34495e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}
.upload-actions .action-icon:hover {
    background-color: #fff;
}
.upload-actions .action-icon i {
    font-size: 0.85em;
}
.upload-input { /* El input file real */
    display: none;
}

/* --- Buttons --- */
.form-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center; /* Centra el botón si solo hay uno */
}
.btn {
    padding: 12px 25px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 25px; /* Pill shape */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    width: 100%; /* Botones ocupan todo el ancho en móvil */
    max-width: 300px; /* Ancho máximo para botones */
    text-align: center;
}
.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #fff; /* Blanco como el de "Siguiente Registro" */
    color: #2c3e50; /* Texto oscuro */
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background-color: #f8f8f8;
    border-color: #d0d0d0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.btn-secondary {
    background-color: #ecf0f1; /* Gris claro */
    color: #7f8c8d;
    border: 1px solid #dce4e8;
}
.btn-secondary:hover {
    background-color: #e0e6e9;
}

@media (min-width: 768px) {
    .form-buttons {
        flex-direction: row-reverse; /* Botón primario a la derecha */
        justify-content: center;
    }
    .btn {
        width: auto; /* Ancho automático en pantallas grandes */
        min-width: 180px;
    }
}