:root {
    --classic-blue: #000066; /* Azul marino clásico */
    --bg-white: #FFFFFF;     /* Fondo blanco puro */
    --menu-gray: #EAEAEA;    /* Gris claro */
    --text-color: #333333;   /* Texto general */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-white);
    color: var(--text-color);
    line-height: 1.6;
    overflow: visible; 
}

/* Agrupación de fondos comunes para interfaces del portal */
.body-login, .body-portal-cliente, .body-chat {
    background-color: var(--menu-gray);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   HEADER Y NAVEGACIÓN
   ========================================= */
header {
    background-color: var(--bg-white); 
    padding: 1rem 0;
    border-bottom: 5px solid var(--classic-blue); 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    width: 100%;
    margin: 0;
}

.header-responsive, .nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}

.logo-container {
    display: inline-block;
}

.header-logo {
    max-height: 80px;
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rif-text {
    color: var(--classic-blue);
    font-size: 0.85rem;
    text-align: right;
}

.logo {
    color: var(--classic-blue);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: var(--classic-blue);
    text-decoration: none;
    font-weight: 500;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary, .btn-sm {
    background-color: var(--menu-gray);
    color: var(--classic-blue);
    border: 1px solid var(--classic-blue);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
    text-align: center;
    display: inline-block;
    border-radius: 4px;
    text-decoration: none;
}

.btn-primary { padding: 10px 20px; }
.btn-sm { font-size: 0.85rem; padding: 8px 15px; }

.btn-primary:hover, .btn-sm:hover {
    background-color: #d4d4d4;
}

/* =========================================
   SECCIÓN PRINCIPAL (HERO) Y FORMULARIO
   ========================================= */
.hero {
    background-color: var(--bg-white);
    color: var(--classic-blue);
    padding: 2rem 0;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.contact-section {
    padding: 2rem 0;
}

.form-container {
    background: var(--menu-gray);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    border: 1px solid #ccc;
    margin-top: 20px;
}

form input, form select, form textarea {
    display: block; 
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

form textarea {
    resize: vertical;
    min-height: 120px;
}

/* =========================================
   PORTAL DE CLIENTES: LOGIN Y RECUPERACIÓN
   ========================================= */
.body-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.login-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border-top: 5px solid var(--classic-blue);
}

.login-title {
    color: var(--classic-blue);
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.9rem;
}

.logo-img {
    max-height: 60px;
    margin-bottom: 20px;
}

.mensaje {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.mensaje.error {
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffcccc;
}

/* Contenedores de contraseña */
.password-container { 
    position: relative; 
    margin-bottom: 20px; 
    text-align: left; 
}

.password-container input { 
    margin-bottom: 0; 
    padding-right: 40px; 
}

.password-toggle { 
    position: absolute; 
    right: 12px; 
    top: 50%; 
    margin-top: 10px; 
    transform: translateY(-50%); 
    cursor: pointer; 
    font-size: 1.2rem; 
    user-select: none; 
}

.link-recuperar { 
    color: var(--classic-blue); 
    text-decoration: underline; 
    font-size: 0.9rem; 
    display: inline-block; 
    margin-top: 15px; 
    cursor: pointer; 
}

/* =========================================
   PORTAL DEL CLIENTE (INTERIOR)
   ========================================= */
.container-portal {
    margin-top: 30px;
    margin-bottom: 50px;
}

.welcome-msg {
    margin-bottom: 30px;
    color: var(--text-color);
}

.caso-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 5px solid var(--classic-blue);
}

.caso-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.caso-id {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--classic-blue);
}

.estatus-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}
.estatus-Pendiente { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.estatus-Recaudos { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.estatus-Estudio { background-color: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.estatus-Finalizado { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

.caso-body {
    color: var(--text-color);
    line-height: 1.6;
}

.servicios-lista {
    margin-top: 10px;
    padding-left: 20px;
}

.btn-chat {
    background-color: #008000;
    color: var(--bg-white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.btn-chat:hover { opacity: 0.9; }

.no-casos {
    text-align: center;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 8px;
    color: #777;
    border: 1px dashed #ccc;
}

/* =========================================
   INTERFAZ DE CHAT (CLIENTE Y ADMIN)
   ========================================= */
.body-chat {
    display: flex;
    flex-direction: column;
    height: 100dvh; /* Altura dinámica para móviles */
    overflow: hidden; 
}

.chat-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img-header {
    max-height: 80px; 
    width: auto; 
    display: block;
}

.chat-header-info {
    color: var(--classic-blue);
    display: flex;
    align-items: center;
    gap: 15px;
}

.expediente-title {
    font-size: 1.1rem;
    border-right: 1px solid #ccc;
    padding-right: 15px;
}

.btn-volver {
    padding: 8px 15px;
    font-size: 0.9rem;
    text-decoration: none;
}

.construccion-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ffeeba;
    font-weight: bold;
    width: 100%;
}

.chat-container {
    max-width: 800px; 
    width: 95%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    flex: 1; 
    min-height: 0; /* Vital para que no desborde en móviles */
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
    overflow: hidden; 
}

.chat-header {
    background-color: var(--classic-blue);
    color: var(--bg-white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #000044;
}

.chat-title {
    margin: 0;
    font-size: 1.2rem;
}

.chat-messages {
    padding: 20px;
    flex: 1; 
    overflow-y: auto; 
    background-color: #e5ddd5; 
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0; 
}

.message {
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 8px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-time {
    display: block;
    font-size: 0.75rem;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

.msg-firma {
    background-color: var(--bg-white);
    align-self: flex-start;
    border-top-left-radius: 0;
    color: var(--text-color);
}

.msg-cliente {
    background-color: #dcf8c6; 
    align-self: flex-end;
    border-top-right-radius: 0;
    color: var(--text-color);
}

.chat-input-area {
    padding: 15px;
    background-color: #f0f0f0;
    border-top: 1px solid #ccc;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
}

.btn-enviar, .btn-adjuntar {
    color: var(--bg-white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: 0.3s;
}

.btn-enviar { background-color: #008000; }
.btn-enviar:hover { background-color: #006600; }
.btn-adjuntar { background-color: #555; }
.btn-adjuntar:hover { background-color: #333; }

.admin-chat-box {
    overflow-y: auto;
    height: 400px;
    max-height: 400px;
    background-color: #e5ddd5;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================================
   MEDIA QUERIES UNIFICADOS (MÓVILES)
   ========================================= */
@media (max-width: 768px) {
    .nav-bar, .header-responsive {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        justify-content: center;
    }
    
    nav, .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary, .btn-sm {
        width: 100%;
        text-align: center;
    }

    .rif-text {
        text-align: center;
    }

    .hero h2 {
        font-size: 1.5rem;
    }
    
    .user-info-header {
        flex-direction: column;
        gap: 5px !important;
        text-align: center;
        margin-top: 10px;
    }
    
    .user-info-header span, .expediente-title {
        border-right: none !important;
        padding-right: 0 !important;
    }
    
    .chat-header-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .chat-container {
        margin: 10px auto;
        height: auto; 
    }
}
/* =========================================
   TABLAS DEL PANEL EN PANTALLAS PEQUEÑAS
   ========================================= */
.tabla-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tabla-scroll table { min-width: 560px; }
.tabla-scroll td, .tabla-scroll th { overflow-wrap: anywhere; }

/* =========================================
   PÁGINA: index.php (incluye lo que dibujan js/app.js y js/carrito.js)
   ========================================= */
body.pg-index .index-1.index-1 {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
body.pg-index .index-2.index-2 {
    flex: 2;
    min-width: 300px;
}
body.pg-index .index-3.index-3 {
    margin-bottom: 15px;
}
body.pg-index .index-4.index-4 {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}
body.pg-index .index-5.index-5 {
    color: #666;
    font-style: italic;
}
body.pg-index .index-6.index-6 {
    flex: 1;
    min-width: 280px;
    background-color: var(--menu-gray);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    height: fit-content;
}
body.pg-index .index-7.index-7 {
    color: var(--classic-blue);
    text-align: center;
    margin-bottom: 1rem;
}
body.pg-index .index-8.index-8 {
    list-style: none;
    margin-bottom: 15px;
}
body.pg-index .index-9.index-9 {
    border: 0;
    border-top: 1px solid #bbb;
    margin: 15px 0;
}
body.pg-index .index-10.index-10 {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--classic-blue);
}
body.pg-index .index-11.index-11 {
    margin-top: 10px;
    font-size: 0.75rem;
}
body.pg-index .index-12.index-12 {
    width: 100%;
    margin-top: 15px;
}
body.pg-index .index-13.index-13 {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 2rem;
}
body.pg-index .index-14.index-14 {
    background: none;
    border: none;
    color: var(--classic-blue);
    text-decoration: underline;
    margin-bottom: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
body.pg-index .index-15.index-15 {
    color: var(--classic-blue);
    text-align: center;
    margin-bottom: 20px;
}
body.pg-index .index-16.index-16 {
    background-color: var(--menu-gray);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ccc;
}
body.pg-index .index-17.index-17 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}
body.pg-index .index-18.index-18 {
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed var(--classic-blue);
    border-radius: 8px;
    text-align: center;
    background-color: var(--bg-white);
}
body.pg-index .index-19.index-19 {
    color: var(--classic-blue);
    margin-bottom: 10px;
}
body.pg-index .index-20.index-20 {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}
body.pg-index .index-21.index-21 {
    background-color: #cc0000;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
body.pg-index .index-22.index-22 {
    margin-top: 15px;
}
body.pg-index .index-23.index-23 {
    border: 0;
    border-top: 1px solid #bbb;
    margin: 25px 0;
}
body.pg-index .index-24.index-24 {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #ccc;
    margin-bottom: 20px;
    text-align: left;
}
body.pg-index .index-25.index-25 {
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
}
body.pg-index .index-26.index-26 {
    text-align: center;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #777;
}
body.pg-index .index-27.index-27 {
    color: var(--classic-blue);
    text-decoration: underline;
}
body.pg-index .index-28.index-28 {
    background-color: var(--menu-gray);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    text-align: center;
}
body.pg-index .index-29.index-29 {
    color: #008000;
    margin-bottom: 15px;
}
body.pg-index .index-30.index-30 {
    margin-bottom: 20px;
    color: var(--text-color);
}
body.pg-index .index-31.index-31 {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px dashed var(--classic-blue);
}
body.pg-index .index-32.index-32 {
    color: #008000;
    margin-bottom: 5px;
}
body.pg-index .index-33.index-33 {
    color: var(--classic-blue);
    margin-bottom: 5px;
}
body.pg-index .index-34.index-34 {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}
body.pg-index .index-35.index-35 {
    text-align: left;
    color: var(--classic-blue);
    margin-bottom: 10px;
}
body.pg-index .index-36.index-36 {
    margin-bottom: 25px;
}
body.pg-index .index-37.index-37 {
    color: #666;
}
body.pg-index .index-38.index-38 {
    background-color: #f0f4f8;
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed var(--classic-blue);
    text-align: center;
}
body.pg-index .index-39.index-39 {
    margin-bottom: 15px;
    font-size: 0.95rem;
}
body.pg-index .index-40.index-40 {
    margin-bottom: 15px;
    width: 100%;
    max-width: 350px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}
body.pg-index .index-41.index-41 {
    width: 100%;
    max-width: 350px;
    background-color: #008000;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1.1rem;
}
body.pg-index .index-42.index-42 {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    margin-top: 20px;
    cursor: pointer;
}
body.pg-index .index-43.index-43 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,60,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
body.pg-index .index-44.index-44 {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
body.pg-index .index-45.index-45 {
    color: var(--classic-blue);
    margin-bottom: 15px;
}
body.pg-index .index-46.index-46 {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #444;
}
body.pg-index .index-47.index-47 {
    width: 70%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid var(--classic-blue);
    border-radius: 6px;
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
    letter-spacing: 5px;
}
body.pg-index .index-48.index-48 {
    display: flex;
    gap: 15px;
    justify-content: center;
}
body.pg-index .index-49.index-49 {
    background: #ccc;
    color: #333;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
body.pg-index .index-50.index-50 {
    padding: 12px 20px;
    width: 100%;
}
body.pg-index .index-51.index-51 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,60,0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
body.pg-index .index-52.index-52 {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
body.pg-index .index-53.index-53 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--classic-blue);
    padding-bottom: 10px;
}
body.pg-index .index-54.index-54 {
    color: var(--classic-blue);
    margin: 0;
}
body.pg-index .index-55.index-55 {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}
body.pg-index .index-56.index-56 {
    overflow-y: auto;
    flex: 1;
    padding-right: 15px;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
    text-align: justify;
}
body.pg-index .index-57.index-57 {
    margin-top: 10px;
}
body.pg-index .index-58.index-58 {
    margin-top: 20px;
    text-align: center;
}
body.pg-index .index-59.index-59 {
    padding: 10px 30px;
}
body.pg-index .index-60.index-60 {
    color: #666;
}
body.pg-index .index-61.index-61 {
    color: var(--classic-blue);
    margin-bottom: 20px;
}
body.pg-index .index-62.index-62 {
    margin-bottom: 15px;
    border: 1px solid var(--classic-blue);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
body.pg-index .index-63.index-63 {
    background-color: var(--classic-blue);
    color: #fff;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.pg-index .index-64.index-64 {
    padding: 15px;
    background: #f9f9f9;
}
body.pg-index .index-65.index-65 {
    margin: 25px 0;
    border: 0;
    border-top: 2px dashed #ccc;
}
body.pg-index .index-66.index-66 {
    margin-bottom: 15px;
    border: 1px solid #777;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
body.pg-index .index-67.index-67 {
    background-color: #777;
    color: #fff;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.pg-index .index-68.index-68 {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.pg-index .index-69.index-69 {
    flex: 1;
    padding-right: 15px;
}
body.pg-index .index-70.index-70 {
    display: block;
    color: var(--text-color);
    font-size: 1.1rem;
}
body.pg-index .index-71.index-71 {
    color: #666;
    display: block;
    margin-top: 5px;
}
body.pg-index .index-72.index-72 {
    margin-top: 8px;
    font-weight: bold;
    color: var(--classic-blue);
}
body.pg-index .index-73.index-73 {
    background-color: var(--classic-blue);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}
body.pg-index .index-74.index-74 {
    color: #777;
}
body.pg-index .index-75.index-75 {
    font-size: 0.8rem;
}
body.pg-index .index-76.index-76 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}
body.pg-index .index-77.index-77 {
    flex: 1;
    padding-right: 10px;
}
body.pg-index .index-78.index-78 {
    font-weight: bold;
    margin-right: 10px;
    color: var(--classic-blue);
}
body.pg-index .index-79.index-79 {
    background: #cc0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-weight: bold;
}
body.pg-index .index-80.index-80 {
    margin-bottom: 15px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}
body.pg-index .index-81.index-81 {
    font-weight: bold;
    color: var(--classic-blue);
    display: block;
    margin-bottom: 3px;
}
body.pg-index .index-82.index-82 {
    color: #cc0000;
}
body.pg-index .index-83.index-83 {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 8px;
}
body.pg-index .index-84.index-84 {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}
body.pg-index .index-85.index-85 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    gap: 10px;
}
body.pg-index .index-86.index-86 {
    padding: 15px;
    background: #fff;
}
body.pg-index .index-87.index-87 {
    font-size: 0.85rem;
    color: #008000;
    margin: 5px 0;
}

/* =========================================
   PÁGINA: index.php
   =========================================
 */

/* =========================================
   PÁGINA: portal_login.php
   =========================================
 */
body.pg-portal-login .portal-login-1.portal-login-1 {
    width: 100%;
}
body.pg-portal-login .portal-login-2.portal-login-2 {
    margin-top: 25px;
    border-top: 1px solid #ccc;
    padding-top: 15px;
}
body.pg-portal-login .portal-login-3.portal-login-3 {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
}

/* =========================================
   PÁGINA: portal_cliente.php
   =========================================
 */
body.pg-portal-cliente .portal-cliente-1.portal-cliente-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.pg-portal-cliente .portal-cliente-2.portal-cliente-2 {
    display: inline-block;
}
body.pg-portal-cliente .portal-cliente-3.portal-cliente-3 {
    max-height: 80px;
    width: auto;
    display: block;
}
body.pg-portal-cliente .portal-cliente-4.portal-cliente-4 {
    color: var(--classic-blue);
    display: flex;
    align-items: center;
    gap: 15px;
}
body.pg-portal-cliente .portal-cliente-5.portal-cliente-5 {
    font-weight: bold;
    font-size: 1.1rem;
    border-right: 1px solid #ccc;
    padding-right: 15px;
}
body.pg-portal-cliente .portal-cliente-6.portal-cliente-6 {
    text-decoration: none;
    padding: 8px 15px;
    font-size: 0.9rem;
}
body.pg-portal-cliente .portal-cliente-7.portal-cliente-7 {
    margin-top: 15px;
}

/* =========================================
   PÁGINA: recuperar_clave_cliente.php
   =========================================
 */
body.pg-recuperar-clave {
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: sans-serif;
}
body.pg-recuperar-clave .login-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border-top: 5px solid var(--classic-blue);
}
body.pg-recuperar-clave .form-group {
    margin-bottom: 20px;
    text-align: left;
}
body.pg-recuperar-clave label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}
body.pg-recuperar-clave input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}
body.pg-recuperar-clave .btn-primary {
    background-color: var(--classic-blue);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
}
body.pg-recuperar-clave .btn-primary:hover {
    opacity: 0.9;
}
body.pg-recuperar-clave .mensaje {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
body.pg-recuperar-clave .mensaje.error {
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffcccc;
}
body.pg-recuperar-clave .mensaje.exito {
    background-color: #e6ffe6;
    color: #008000;
    border: 1px solid #ccffcc;
}
body.pg-recuperar-clave .logo-img {
    max-height: 60px;
    margin-bottom: 20px;
}
body.pg-recuperar-clave .link-recuperar {
    color: #666;
    text-decoration: underline;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 15px;
    cursor: pointer;
}
body.pg-recuperar-clave .recuperar-clave-1.recuperar-clave-1 {
    color: var(--classic-blue);
    margin-bottom: 10px;
}
body.pg-recuperar-clave .recuperar-clave-2.recuperar-clave-2 {
    display: block;
    text-decoration: none;
    margin-top: 20px;
}
body.pg-recuperar-clave .recuperar-clave-3.recuperar-clave-3 {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}
body.pg-recuperar-clave .recuperar-clave-4.recuperar-clave-4 {
    background-color: #008000;
}

/* =========================================
   PÁGINA: crear_clave.php
   =========================================
 */
body.pg-crear-clave .crear-clave-1.crear-clave-1 {
    color: var(--classic-blue);
    margin-bottom: 10px;
}
body.pg-crear-clave .crear-clave-2.crear-clave-2 {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}
body.pg-crear-clave .crear-clave-3.crear-clave-3 {
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}
body.pg-crear-clave .crear-clave-4.crear-clave-4 {
    margin-bottom: 20px;
}
body.pg-crear-clave .crear-clave-5.crear-clave-5 {
    text-decoration: none;
    display: inline-block;
}

/* Panel de datos de pago (lo dibuja js/app.js) */
body.pg-index .pago-btn.pago-btn { background: none; border: 1px solid #ccc; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
body.pg-index .pago-bloque.pago-bloque { width: 100%; margin-bottom: 15px; background-color: var(--classic-blue); color: white; border: none; padding: 10px; border-radius: 4px; cursor: pointer; font-weight: bold; }
body.pg-index .pago-fila.pago-fila { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; border-bottom: 1px dashed #eee; padding-bottom: 5px; gap: 10px; }
body.pg-index .pago-details.pago-details { margin-bottom: 10px; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; background: #fff; text-align: left; }
body.pg-index .pago-summary.pago-summary { background-color: #ddd; padding: 12px 15px; cursor: pointer; font-weight: bold; font-size: 1rem; list-style: none; }

/* Campo de contraseña: etiqueta igual a las demás y ojo centrado en el campo (46 px) */
.password-container label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--text-color); font-size: 0.9rem; }
.password-container .password-toggle { top: auto; bottom: 0; height: 46px; margin-top: 0; transform: none; display: flex; align-items: center; line-height: 1; }

/* Crear clave: el botón ocupa todo el ancho, igual que en el ingreso */
body.pg-crear-clave.pg-crear-clave form .btn-primary { width: 100%; margin-top: 5px; }


/* Crédito del desarrollador (pie de página, discreto) */
.credito-dev { text-align: center; font-size: 0.68rem; line-height: 1.2; padding: 14px 10px; color: #8a8a8a; clear: both; }
.credito-dev a { color: inherit; text-decoration: none; }
.credito-dev a:hover, .credito-dev a:focus { color: var(--classic-blue); }
/* En las pantallas centradas (login, claves) el pie queda fijo abajo para no romper el centrado */
body.body-login .credito-dev, body.pg-admin-login .credito-dev, body.pg-admin-restaurar-clave .credito-dev, body.pg-recuperar-clave .credito-dev { position: fixed; left: 0; right: 0; bottom: 0; padding: 8px 10px; }
@media print { .credito-dev { display: none; } }
