/* =======================================================
   TemaVistaUsuario.css
   ESTILOS PREMIUM PARA LOGIN, REGISTRO Y RECUPERACIÓN
   Estrategia: Desktop-First (estilos base para escritorio)
======================================================= */

/* ─── RESET ─── */
.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 MUNICIPAL ─── */
.login-page, .recovery-page { 
    background: url('../../imagenes/logo muni.jpg') no-repeat center center fixed; 
    background-size: cover; background-position: center;
    position: relative; z-index: 1;
    min-height: 100vh; display: flex; flex-direction: column;
    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 ─── */
.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; }

.wrapper-recovery { width: 100%; max-width: 900px; position: relative; }
.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; }
.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; }

.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; }

/* ─── FORMULARIOS ─── */
.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; }

/* ─── INPUTS INDEX ─── */
.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; }

/* ─── INPUTS RECOVERY ─── */
.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; }
.recovery-input-group .input-group-addon { background: #ffffff !important; border: none !important; border-right: 1px solid #ccc !important; 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; 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%; }
.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; }

/* ─── 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%; min-height: 44px; }
.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; }

.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; }

.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%; min-height: 44px; }
.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%; min-height: 44px; }
.btn-mail:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 15px rgba(221,75,57,0.4) !important; }

/* ─── PIN INPUTS ─── */
.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-amber { background: #f39c12; }
.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; } }

/* ─── ALERTA INTERNA (dentro del box) ─── */
.alert-container-interno .alert-custom { margin-bottom: 20px; }

/* ─── ALERTA EXTERNA (fuera del box, arriba) ─── */
.alert-container-externo { width: 100%; margin-bottom: 20px; }
.alert-container-externo .alert-custom { margin-bottom: 0; }

/* ─── BOTÓN REGISTRARSE ─── */
.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; }

/* ─── REGISTRO TWO-COLUMN LAYOUT ─── */
.form-two-columns { display: flex; flex-wrap: wrap; gap: 0 30px; }
.form-two-columns .form-col { flex: 1; min-width: 280px; }

/* ============================================================
   RESPONSIVE - DESKTOP FIRST
============================================================ */

/* ─── 1680px: Pantallas extra grandes ─── */
@media screen and (max-width: 1680px) {
    .login-box { max-width: 430px; }
    .wrapper-recovery { max-width: 850px; }
}

/* ─── 1280px: Laptops ─── */
@media screen and (max-width: 1280px) {
    .login-box { max-width: 420px; }
    .wrapper-recovery { max-width: 800px; }
    .login-logo b { font-size: 40px; }
    .login-logo img { height: 70px; }
}

/* ─── 980px: Tablets ─── */
@media screen and (max-width: 980px) {
    .login-box { max-width: 85%; }
    .wrapper-recovery { max-width: 85%; }
    .login-logo b { font-size: 35px; }
    .login-logo img { height: 65px; }
    .recovery-title { font-size: 23px; }
    .content-box { padding: 30px 28px; }
    .recovery-header { padding: 18px 24px; flex-wrap: wrap; gap: 12px; }
    .recovery-header .btn-regresar-rojo { flex-shrink: 0; }
    .form-group { margin-bottom: 22px; }
    .form-group label { font-size: 15px; }
    .btn-theme-filled { padding: 13px 26px; font-size: 17px; }
    .btn-wa, .btn-mail { padding: 16px 18px !important; font-size: 17px !important; }
}

/* ─── 736px: Tablets pequeños ─── */
@media screen and (max-width: 736px) {
    .login-box { max-width: 90%; }
    .wrapper-recovery { max-width: 90%; }
    .login-box-body { padding: 30px 28px; }
    .login-logo b { font-size: 28px; }
    .login-logo img { height: 55px; margin-right: 10px; }
    .recovery-title { font-size: 20px; gap: 10px; }
    .recovery-title i { font-size: 20px; }
    .content-box { padding: 25px 20px; }
    .recovery-header { padding: 14px 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .recovery-header .btn-regresar-rojo { width: 100%; justify-content: center; padding: 10px 18px !important; font-size: 15px !important; }
    .btn-wa, .btn-mail { width: 100% !important; margin-bottom: 10px; }
    .form-two-columns { flex-direction: column; gap: 0; }
    .form-two-columns .form-col { min-width: 100%; }
    .btn-theme-filled { font-size: 16px; padding: 12px 24px; }
    .btn-outline-theme { padding: 10px; font-size: 14px; }
    .pin-input { width: 50px !important; height: 55px !important; font-size: 24px !important; }
    .alert-custom { font-size: 14px; padding: 14px 45px 14px 15px; }
    .form-group label { font-size: 15px; margin-bottom: 6px; }
    .recovery-input-group .form-control { height: 48px; font-size: 15px; }
    .index-input-group .form-control { height: 43px !important; font-size: 15px !important; }
    .content-header { gap: 10px; }
}

/* ─── 480px: Celulares ─── */
@media screen and (max-width: 480px) {
    .login-box { max-width: 95%; }
    .wrapper-recovery { max-width: 95%; }
    .login-box-body { padding: 20px 15px; }
    .login-logo b { font-size: 22px; white-space: normal !important; }
    .login-logo img { height: 45px; margin-right: 8px; }
    .recovery-title { font-size: 17px; gap: 6px; }
    .recovery-title i { font-size: 17px; }
    .content-box { padding: 20px 15px; }
    .recovery-header { padding: 12px 14px; gap: 10px; }
    .recovery-header .btn-regresar-rojo { padding: 9px 14px !important; font-size: 13px !important; }
    .form-group { margin-bottom: 16px; }
    .form-group label { font-size: 14px; margin-bottom: 5px; }
    .label-rojo-pasion { font-size: 15px !important; line-height: 1.3; }
    .index-input-group .form-control { height: 42px !important; font-size: 14px !important; }
    .index-input-group .form-control-feedback { width: 40px; height: 42px; font-size: 16px; }
    .btn-theme-filled { font-size: 15px; padding: 12px 20px; width: 100%; }
    .btn-outline-theme { font-size: 13px; padding: 10px; }
    .btn-wa, .btn-mail { font-size: 14px !important; padding: 14px !important; gap: 8px; }
    .btn-wa i, .btn-mail i { font-size: 16px !important; }
    .btn-regresar-rojo { font-size: 14px !important; padding: 10px 18px !important; width: 100%; }
    .recovery-input-group .form-control { height: 44px; font-size: 14px; }
    .recovery-input-group .input-group-addon { min-width: 42px; font-size: 14px; }
    .pin-input { width: 40px !important; height: 45px !important; font-size: 20px !important; }
    .registro-top { top: 10px; right: 10px; }
    .btn-registrarse { font-size: 13px; padding: 8px 16px; }
    .alert-custom { font-size: 13px; padding: 12px 40px 12px 12px; margin-bottom: 18px; }
    hr { margin: 20px 0 !important; }
}

/* ─── 360px: Celulares pequeños ─── */
@media screen and (max-width: 360px) {
    .login-box, .wrapper-recovery { max-width: 98%; }
    .login-box-body { padding: 15px 10px; }
    .login-logo b { font-size: 18px; }
    .login-logo img { height: 38px; margin-right: 5px; }
    .recovery-title { font-size: 15px; }
    .recovery-title i { font-size: 15px; }
    .content-box { padding: 15px 10px; }
    .recovery-header { padding: 10px 12px; gap: 8px; }
    .recovery-header .btn-regresar-rojo { font-size: 12px !important; padding: 8px 12px !important; }
    .btn-theme-filled { font-size: 14px; padding: 11px 16px; min-height: 44px; }
    .btn-wa, .btn-mail { font-size: 13px !important; padding: 12px !important; min-height: 44px; }
    .pin-input { width: 35px !important; height: 40px !important; font-size: 18px !important; }
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 13px; }
    .recovery-input-group .form-control { height: 40px; font-size: 13px; }
    .index-input-group .form-control { height: 40px !important; font-size: 13px !important; }
}