/* --- CONFIGURACIÓN GENERAL --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #e0e0e0;
    color: #444;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Cambiado a min-height para que el footer no flote si hay poco contenido */
}

/* --- HEADER CON NAVEGACIÓN --- */
.app-header {
    height: 50px; /* Un poquito más alto para que quepan bien los links */
    background: linear-gradient(90deg, #8b0000 0%, #000000 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10;
}

.brand-name { font-weight: 800; font-size: 1rem; color: #ffffff; }
.app-tag { font-size: 0.7rem; margin-left: 5px; color: #cccccc; text-transform: uppercase; }
.mini-logo { background: #ffffff; color: #8b0000; font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 3px; }

/* Estilo de los links de Inicio y Ofertas */
.header-nav {
    display: flex;
    gap: 15px;
}

.header-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
    opacity: 0.8;
}

.header-nav a:hover {
    opacity: 1;
    color: #ff4d4d;
}

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-control {
    background: #e0e0e0;
    width: 100%;
    max-width: 360px;
    padding: 25px;
    border-radius: 30px;
    box-shadow: 15px 15px 30px #bebebe, -15px -15px 30px #ffffff;
}

/* --- ELEMENTOS DEL PANEL (IMAGEN Y FORMULARIO) --- */
.preview-contenedor {
    width: 140px;
    height: 200px;
    margin: 0 auto 10px auto;
    background: #e0e0e0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 6px 6px 12px #bebebe, inset -6px -6px 12px #ffffff;
}

.preview-contenedor img { width: 100%; height: 100%; object-fit: cover; }
.preview-texto { font-size: 0.65rem; color: #999; text-align: center; padding: 5px; width: 90%; }

.campo { margin-bottom: 12px; display: flex; flex-direction: column; }
.campo label { font-size: 0.75rem; font-weight: bold; margin-bottom: 5px; color: #666; padding-left: 10px; }

input, select {
    background: #e0e0e0;
    border: none;
    padding: 12px;
    border-radius: 12px;
    box-shadow: inset 4px 4px 8px #bebebe, inset -4px -4px 8px #ffffff;
    outline: none;
    font-size: 0.9rem;
    color: #333;
    width: 100%;
}

/* --- BOTONES --- */
.seccion-botones { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

button {
    border: none;
    padding: 14px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    background: #e0e0e0;
    box-shadow: 6px 6px 12px #bebebe, -6px -6px 12px #ffffff;
    transition: 0.2s;
}

button:active {
    box-shadow: inset 4px 4px 8px #bebebe, inset -4px -4px 8px #ffffff;
    transform: scale(0.98);
}

.btn-primario { color: #28a745; font-size: 1rem; }
.btn-promo { color: #555; }
.btn-secundario { font-size: 0.75rem; margin: 0 auto 15px auto; display: block; width: 80%; }

.fila-difusion { display: flex; gap: 10px; width: 100%; }
.btn-compartir { flex: 1; color: #6a1b9a; font-size: 0.75rem; }
.btn-link { flex: 1; color: #444; font-size: 0.75rem; }

/* --- MÓDULO DE EXPANSIÓN --- */
.modulo-expansion {
    margin: 25px 0;
    width: 100%;
    max-width: 360px;
    height: 70px;
    border-radius: 20px;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}

.estado { margin-top: 10px; text-align: center; font-size: 0.8rem; color: #28a745; font-weight: bold; }

/* --- FOOTER INSTITUCIONAL --- */
.app-footer {
    background: linear-gradient(90deg, #8b0000 0%, #000000 100%);
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75rem;
    opacity: 0.8;
    transition: 0.3s;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copy {
    color: #999;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- ESTILOS DE LA PANTALLA DE BLOQUEO --- */
.overlay-seguridad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0; /* Fondo igual a la app */
    z-index: 9999; /* Por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: opacity 0.5s ease; /* Para que desaparezca suavemente */
}

/* Clase para ocultar la pantalla cuando el login es exitoso */
.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}