:root {
    --bg-page: #f4f1ea;
    --header-brown: #5d4a3a;
    --text-dark: #3e3326;
    --panel-login: #e8dcc2;
    --panel-reg: #c4bda9;
    --red-urgent: #c0392b;
    --green-ok: #558b2f;
    --btn-brown: #6d5442;
    --shadow: 0 8px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', sans-serif; margin: 0; padding: 0;
    background-color: var(--bg-page); color: var(--text-dark); font-size: 18px;
}

/* HEADER */
/* HEADER CENTRADO Y MÁS GRANDE */
.main-header {
    background-color: var(--header-brown);
    color: white;
    padding: 10px 30px;
    display: flex;
    justify-content: center;     /* centra horizontalmente */
    align-items: center;
    text-align: center;          /* asegura centrado del texto */
}

.main-header h1 {
    margin: 0;
    font-weight: 700;
    font-size: 2.1rem;           /* aumenta tamaño */
    letter-spacing: 1px;
}

/* LOGIN WRAPPER */
.container { max-width: 1150px; margin: 40px auto; padding: 0 20px; }
.login-wrapper {
    display: flex; border: 2px solid #3e3326; border-radius: 15px;
    overflow: hidden; height: 380px; box-shadow: var(--shadow); background: white;
}
.panel {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 20px; cursor: pointer; transition: 0.2s; color: var(--text-dark);
}
.panel:hover { filter: brightness(0.95); } 
.panel-left { background-color: var(--panel-login); border-right: 2px solid #3e3326; }
.panel-right { background-color: var(--panel-reg); border-left: 2px solid #3e3326; }
.panel-center { 
    flex: 1.4; background-color: #fffcf5; display: flex; align-items: center; justify-content: center; padding: 10px;
}
/* CORRECCIÓN IMAGEN GIGANTE */
.panel-center img { max-height: 100%; max-width: 100%; object-fit: contain; }

.icon-action { font-size: 3rem; margin-bottom: 15px; color: #333; opacity: 0.8; }
.text-action { margin: 0; font-size: 1.1rem; }
.title-action { margin: 5px 0; font-size: 1.4rem; font-weight: 800; text-transform: uppercase; color: #222; }

/* LOGOS */
.logos-bar { display: flex; justify-content: center; gap: 15px; margin-top: 40px; flex-wrap: wrap; }
.logo-card { background: white; padding: 10px 20px; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); height: 50px; display: flex; align-items: center; }
.logo-card img { max-height: 100%; }

/* DASHBOARD */
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.card-main, .card-side { background: white; border-radius: 15px; box-shadow: var(--shadow); overflow: hidden; }
.card-side { padding: 25px; }
.card-header-alert { background: white; border-top: 8px solid var(--red-urgent); padding: 20px 30px; border-bottom: 1px solid #eee; }
.card-body { padding: 30px; }
.info-row { display: flex; align-items: center; gap: 25px; }
.logo-big { width: 90px; height: 90px; object-fit: contain; border-radius: 50%; border: 1px solid #ddd; padding: 5px; }
.status-text { font-size: 1.2rem; font-weight: bold; color: var(--red-urgent); }
.amount-huge { font-size: 3.8rem; font-weight: 800; color: var(--red-urgent); margin: 10px 0; line-height: 1; }
.btn-pay-big { width: 100%; background-color: var(--green-ok); color: white; border: none; padding: 18px; font-size: 1.4rem; font-weight: bold; border-radius: 10px; cursor: pointer; margin-top: 25px; box-shadow: 0 5px 0 #3e6b1e; }

/* LISTAS */
.side-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #eee; }
.tag-pagado { background: #e8f5e9; color: #2e7d32; padding: 5px 12px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; display: flex; align-items: center; gap: 5px; }

/* MODALES */
.modal-overlay { 
    position: fixed; top:0; left:0; width:100%; height:100%; 
    background: rgba(0,0,0,0.6); z-index: 2000; 
    display: flex; justify-content: center; align-items: center; 
    backdrop-filter: blur(3px); 
}
.hidden { display: none !important; }
.modal-box { background: white; padding: 40px; border-radius: 20px; width: 90%; max-width: 500px; position: relative; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.close-icon { position: absolute; top: 15px; right: 20px; font-size: 2rem; cursor: pointer; color: #888; }
.input-field { width: 100%; padding: 14px; font-size: 1.1rem; border: 2px solid #ddd; border-radius: 8px; margin-bottom: 15px; box-sizing: border-box; outline: none; }
.label-field { display: block; text-align: left; font-weight: bold; margin-bottom: 5px; color: #5a4335; }
.btn-modal-action { background: var(--btn-brown); color: white; width: 100%; padding: 15px; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; margin-top: 10px; }

/* TOASTS (ENCIMA DE TODO) */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 3000; /* Mayor que modal (2000) */
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    padding: 15px 20px; border-radius: 8px; font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); background: white;
    display: flex; align-items: center; gap: 10px; min-width: 250px;
}
.toast.success { border-left: 5px solid #4caf50; color: #2e7d32; }
.toast.error { border-left: 5px solid #e53935; color: #c0392b; }

/* CHATBOT */
.chat-float-btn { position: fixed; bottom: 30px; right: 30px; background: var(--header-brown); color: white; padding: 15px 30px; border-radius: 50px; cursor: pointer; z-index: 1500; display: flex; gap:10px; align-items:center;}
.chat-window { position: fixed; bottom: 100px; right: 30px; width: 350px; height: 500px; background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 50px rgba(0,0,0,0.25); z-index: 1500; display: flex; flex-direction: column; border: 1px solid #ddd; }
.chat-header { background: var(--header-brown); color: white; padding: 15px; display:flex; justify-content:space-between;}
.chat-messages { flex: 1; padding: 15px; background: #f9f9f9; overflow-y: auto; }
.chat-options { padding: 10px; background: white; border-top: 1px solid #eee; }
.chat-opt-btn { display: block; width: 100%; padding: 12px; margin-bottom: 8px; background: white; border: 1px solid #ccc; border-radius: 8px; text-align: left; cursor: pointer; }
.bubble { padding: 12px 16px; border-radius: 15px; margin-bottom: 10px; display: inline-block; max-width: 80%; }
.bubble.bot { background: white; border: 1px solid #ddd; }
.bubble.user { background: #e3f2fd; align-self: flex-end; }



/* === HEADER DASHBOARD centrado y botón más elegante === */
.dash-header-center {
    justify-content: center;
    position: relative;
    padding: 20px 20px;
}

.dash-username {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
}

.pretty-logout {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff22;
    border: 1px solid #ddd;
    padding: 8px 20px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    transition: 0.25s;
}
.pretty-logout:hover {
    background: #ffffff55;
}

/* === Ajustar dashboard para que entre sin scroll === */
.dashboard-adjusted {
    margin-top: 0 !important;
    padding-top: 10px;
}

/* === Reducimos separación general === */
.dash-grid {
    gap: 25px !important;
    margin-top: 10px !important;
}

/* === Tarjeta principal más abajo y más compacta === */
.card-main {
    transform: translateY(10px); /* Ajuste reciente: mover hacia abajo */
    padding-bottom: 10px;
}

/* Contenido más compacto */
.card-body {
    padding: 20px !important;
}

/* Tamaños accesibles */
.amount-huge {
    font-size: 3.3rem !important;
    margin-top: 5px;
}

/* Botón de pago más accesible */
.btn-pay-big {
    padding: 14px !important;
    font-size: 1.35rem !important;
    border-radius: 14px !important;
}
.btn-pay-big:hover {
    filter: brightness(1.1);
}

/* === Lado derecho más ordenado === */
.card-side {
    padding: 20px !important;
}

.side-item {
    padding: 10px 0 !important;
    font-size: 1.1rem;
}

.tag-pagado {
    padding: 6px 14px;
    font-size: 1rem;
}

/* === Mejora visual general === */
.card-main, .card-side {
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Logos más grandes y limpios */
.logo-big {
    width: 100px;
    height: 100px;
    padding: 8px;
    border-radius: 50%;
}

/* LOGO CENTRAL MÁS GRANDE */
.logos-bar .logo-card:nth-child(4) img {
    height: 115px !important;
}

/* === Ajuste responsive si la pantalla es baja === */
@media (max-height: 760px) {
    .card-main { transform: translateY(30px); }
    .card-side { transform: translateY(0px); }
    .amount-huge { font-size: 2.7rem !important; }
}

/* ======================================
   FOOTER CORPORATIVO — ULTRACOMPACTO SIN TÍTULO
   ====================================== */
.footer-corporativo {
    background: var(--header-brown);
    padding: 12px 0 8px 0;   /* altura súper compacta */
    text-align: center;
    color: white;
}

/* Se elimina el título del footer */
.footer-title {
    display: none !important;
}

/* Logos compactos y centrados */
.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    flex-wrap: nowrap;
    margin-bottom: 6px;
}

/* Tamaño reducido de logos */
.footer-logos img {
    height: 34px;
    opacity: 0.9;
    transition: 0.2s;
}

/* Logo central un poco más grande */
.footer-logos img.central {
    height: 50px !important;
}

/* Hover discreto */
.footer-logos img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Copyright minimal */
.footer-copy {
    font-size: 0.7rem;
    margin: 0;
    opacity: 0.5;
}

/* === Asegura que el footer esté SIEMPRE pegado abajo === */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;   /* La página ocupa toda la altura de pantalla */
}

main {
    flex: 1;             /* Empuja el footer hacia abajo */
}

/* === Footer ampliado sin dejar espacio blanco === */
.footer-corporativo {
    padding: 20px 0 12px 0;   /* Más alto para usar la franja blanca */
}

/* Logos más grandes para ocupar ese espacio */
.footer-logos img {
    height: 48px !important;  /* Subido desde 34px */
}

.footer-logos img.central {
    height: 70px !important;  /* Logo central más grande */
}

/* === FORZAR DOS COLUMNAS EN EL DASHBOARD === */
.dash-grid {
    display: grid !important;
    grid-template-columns: 1.6fr 1fr !important;
    width: 100%;
}

/* Evitar que la tarjeta derecha se vaya abajo */
.card-main, .card-side {
    width: 100%;
}

@media (max-width: 900px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta derecha más compacta y sin scroll */
.card-side {
    padding: 18px !important;
    max-height: none !important;
    overflow: visible !important;
}
.side-list {
    max-height: none !important;
    overflow: visible !important;
}

.card-side {
    margin-top: 32px !important;
}
