/* =======================================================
   TemaVistaUsuario.css
   ESTILOS PREMIUM PARA LOGIN Y RECUPERACIÓN (USUARIOS)
======================================================= */

/* RESET DE BOTONES E INPUTS */
.btn, button, input { border: none !important; outline: none !important; }
.btn:focus, .btn:active, input:focus, a:focus { 
    outline: none !important; 
    box-shadow: none !important; 
    text-decoration: none !important;
}

/* =========================================
   FONDO DE PANTALLA MUNICIPAL
========================================= */
.login-page, .recovery-page { 
    background: url('../../imagenes/logo muni.jpg') no-repeat center center fixed; 
    background-size: cover; 
    position: relative; 
    z-index: 1;
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; /* Asegura un centrado exacto */
    align-items: center; 
    justify-content: center;
    padding: 20px;
}
.login-page::before, .recovery-page::before {
    content: ""; 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(244, 246, 249, 0.85); 
    z-index: -1;
}

/* =========================================
   CAJAS PRINCIPALES Y CABECERAS
========================================= */
/* LOGIN NORMAL */
.login-box { width: 100%; max-width: 450px; position: relative; display: flex; flex-direction: column; align-items: center;}
.login-box-body { width: 100%; padding: 40px 50px; background: #fff; border-radius: 14px; box-shadow: 0px 10px 35px rgba(0,0,0,0.20); border-top: 5px solid #ff0000; position: relative; overflow: hidden;}

/* RECUPERACIÓN DE CONTRASEÑA (MÁS ANCHA) */
.wrapper-recovery { width: 100%; max-width: 900px; position: relative; } /* Mas ancho como solicitaste registrarse.php*/
.recovery-box { width: 100%; background: #fff; border-radius: 14px; box-shadow: 0px 10px 35px rgba(0,0,0,0.20); border-top: 5px solid #ff0000; position: relative; overflow: hidden; /* Esto fija las esquinas rotas */ }
.recovery-header { padding: 20px 30px; background: #fdfdfd; border-bottom: 1.5px solid #ff0000; display: flex; justify-content: space-between; align-items: center;}
.recovery-title { margin: 0; font-size: 26px; font-weight: 800; color: #444; display: flex; align-items: center; justify-content: center; gap: 14px; }
.recovery-title i { color: #ff0000; font-size: 24px; }
.content-box { padding: 40px; text-align: center; }

/* SIMETRIA TITULO INDEX */
.login-logo { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 20px; 
    white-space: nowrap !important; 
    width: 100%;
}
.login-logo img { height: 80px; margin-right: 15px; object-fit: contain; filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.15)); }
.login-logo b { 
    color: #ff0000; text-transform: uppercase; font-weight: 900; 
    font-size: 45px; text-shadow: 2px 2px 5px rgba(255,255,255,0.9); 
    line-height: 1; margin: 0; white-space: nowrap !important; 
}

/* =========================================
   INPUTS PREMIUM (SOLUCIÓN LINEA DIVISORA)
========================================= */
.form-group { margin-bottom: 25px; text-align: left; }
.form-group label { color: #555; margin-bottom: 10px; display: block; font-size: 16px; font-weight: 600; }
.label-rojo-pasion { color: #ff0000 !important; font-size: 18px !important; font-weight: bold; }

/* RECOVERY: INPUTS BLANCOS CON LÍNEA DIVISORA SUTIL Y ELEGANTE */
.recovery-input-group { 
    display: flex; 
    align-items: stretch;
    width: 100%; 
    border-radius: 6px; 
    background: #fff;
    transition: all .3s ease;
    box-shadow: 0 0 0 1px #ccc; /* Usamos box-shadow en lugar de border para envolver perfecto */
}
.recovery-input-group .input-group-addon {
    background: #ffffff !important; 
    border: none !important;
    border-right: 1px solid #ccc !important; /* LÍNEA DIVISORA RESTAURADA */
    color: #888; 
    min-width: 55px; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    border-radius: 6px 0 0 6px !important;
    padding: 0;
}
.recovery-input-group .form-control {
    height: 52px;
    border: none !important; /* QUITA EL BORDE, EL CONTENEDOR HACE EL MARCO */
    box-shadow: none !important;
    transition: all .3s ease;
    background: transparent !important;
    font-size: 16px;
    padding-left: 15px;
    border-radius: 0 6px 6px 0 !important;
    width: 100%;
}

/* EFECTO DE GLOW EN FOCUS (RECOVERY) */
.recovery-input-group:focus-within { box-shadow: 0 0 8px rgba(255,0,0,0.4), 0 0 0 1px #ff0000 !important; }
.recovery-input-group:focus-within .input-group-addon { border-right-color: #ff0000 !important; color: #ff0000 !important; }

/* =========================================
   ESTILOS ORIGINALES DE INDEX.PHP
========================================= */
.index-input-group { position: relative; width: 100%; display: block; border-radius: 6px; }
.index-input-group .form-control {
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    padding-right: 40px !important;
    padding-left: 15px !important;
    box-shadow: none !important;
    height: 45px !important;
    width: 100%;
}
.index-input-group .form-control-feedback {
    position: absolute; top: 0; right: 0; z-index: 2; display: flex;
    align-items: center; justify-content: center;
    width: 45px; height: 45px;
    color: #ff0000; font-size: 18px; pointer-events: none;
}
.index-input-group:focus-within .form-control {
    border-color: #ff0000 !important;
    box-shadow: 0 0 8px rgba(255,0,0,0.4) !important;
}

/* =========================================
   BOTONES
========================================= */
.btn-theme-filled {
    background: #ff0000 !important; color: white !important; transition: all .3s ease !important;
    font-weight: 700; border-radius: 8px; padding: 14px 30px; font-size: 18px;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 10px;
    box-shadow: 0 4px 10px rgba(255,0,0,0.2) !important; width: 100%;
}
.btn-theme-filled:hover { transform: translateY(-3px) !important; box-shadow: 0 8px 15px rgba(255,0,0,0.3) !important; color: #fff !important; }

.btn-outline-theme {
    background-color: #ffffff !important; border: 2px solid #ff0000 !important;
    color: #ff0000 !important; transition: all 0.3s ease !important; border-radius: 8px; padding: 12px; font-size: 16px; font-weight: bold; width: 100%; display: block; text-align: center;
}
.btn-outline-theme:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 15px rgba(255, 0, 0, 0.2) !important; background-color: #fff5f5 !important; color: #ff0000 !important; }

/* Botón Regresar (Ajustado el texto al centro) */
.btn-regresar-rojo {
    background-color: #dd4b39 !important; padding: 12px 25px !important; font-size: 16px !important; font-weight: bold !important;
    border-radius: 30px !important; color: white !important; transition: all 0.3s ease !important; border: none !important; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important; text-decoration: none !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
.btn-regresar-rojo:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 15px rgba(221, 75, 57, 0.4) !important; color: white !important;}

/* Botones Recuperar Password */
.btn-wa { background-color: #25D366 !important; color: white !important; font-weight: bold; transition: all 0.3s ease !important; box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important; border-radius: 8px; padding: 18px 20px !important; font-size: 18px !important; display: inline-flex; align-items: center; justify-content: center; width: 100%;}
.btn-wa:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 15px rgba(37,211,102,0.4) !important; }

.btn-mail { background-color: #dd4b39 !important; color: white !important; font-weight: bold; transition: all 0.3s ease !important; box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important; border-radius: 8px; padding: 18px 20px !important; font-size: 18px !important; display: inline-flex; align-items: center; justify-content: center; width: 100%;}
.btn-mail:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 15px rgba(221,75,57,0.4) !important; }

/* =========================================
   INPUT PIN
========================================= */
.pin-input {
    width: 60px !important; height: 70px !important; font-size: 35px !important; text-align: center !important;
    border: 2px solid #ccc !important; border-radius: 8px !important; font-weight: bold !important;
    background: white !important; color: #333 !important; transition: all .3s ease;
}
.pin-input:focus { border-color: #ff0000 !important; box-shadow: 0 0 8px rgba(255,0,0,.4) !important; }

/* =========================================
   ALERTAS
========================================= */
#alert_result { width: 100%; }
.alert-custom { position: relative; width: 100%; padding: 16px 50px 16px 18px; border-radius: 10px; color: white; font-weight: 600; font-size: 15px; box-shadow: 0 8px 20px rgba(0,0,0,0.20); animation: fadeIn .3s ease; margin-bottom: 25px; }
.alert-red { background: #dd4b39; }
.alert-green { background: #00a65a; }
.alert-blue { background: #337ab7; }

.alert-content { display: flex; align-items: center; gap: 12px; }
.alert-icon { min-width: 22px; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }
.alert-message { flex: 1; line-height: 1.5; text-align: left; }

.close-alert {
    position: absolute; top: 50%; right: 14px; transform: translateY(-50%); cursor: pointer;
    font-size: 22px; font-weight: bold; line-height: 1; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; color: white;
}
.close-alert:hover { transform: translateY(-50%) scale(1.2); }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media(max-width:768px){
    .content-box { padding: 30px 22px; }
    .recovery-title { font-size: 23px; }
    #alert_result { margin-bottom: 15px; }
    .login-box-body { padding: 30px !important; }
    .login-logo b { font-size: 30px; white-space: normal !important;}
}

/* =========================================
   BOTÓN REGISTRARSE (TOP RIGHT)
========================================= */
.registro-top {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 10;
}
.btn-registrarse {
    background-color: #ff0000 !important;
    color: white !important;
    padding: 12px 28px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255,0,0,0.35) !important;
    transition: all 0.3s ease !important;
}
.btn-registrarse:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(255,0,0,0.45) !important;
    color: white !important;
    text-decoration: none !important;
}