@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Montserrat:wght@800&family=Poppins:wght@600&display=swap');

* { box-sizing: border-box; }

/* Al hacer clic en "Editar"/"Completar" y llegar con un #ancla en la URL,
   se desliza suave hasta ahi en vez de aparecer de golpe arriba de todo. */
html { scroll-behavior: smooth; }

:root {
    --azul-oscuro: #1E3A8A;
    --azul-medio: #3B82F6;
    --azul-degradado: linear-gradient(135deg, #1E3A8A, #3B82F6);
    --acento: #F59E0B;
    --acento-texto: #4A1B0C;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f2f4f7;
    color: #1f2937;
}

.topbar {
    background: var(--azul-degradado);
    color: #fff;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.logo-cursiva {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: .5px;
    line-height: 1;
}

.titulo-home {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 27px;
    white-space: nowrap;
    line-height: 1.3;
    color: var(--azul-oscuro);
}

@media (max-width: 900px) {
    .titulo-home {
        white-space: normal;
    }
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .titulo-home {
        background: var(--azul-degradado);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.panel-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.panel-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 4px;
    border-bottom: 0.5px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
}

.panel-lista li:last-child .panel-item {
    border-bottom: none;
}

.panel-item:hover {
    background: #f9fafb;
}

.panel-item-icono {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-item-icono.azul { background: #0C447C; color: #fff; }
.panel-item-icono.verde { background: #3B6D11; color: #fff; }

.panel-item-titulo {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.panel-item-desc {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.panel-con-imagen { display: flex; gap: 24px; align-items: stretch; }
.panel-con-imagen > .panel-lista-col { flex: 1.3; min-width: 0; }
.panel-con-imagen > .panel-imagen-col {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
}
.panel-con-imagen > .panel-imagen-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 800px) {
    .panel-con-imagen { flex-direction: column; }
    .panel-con-imagen > .panel-imagen-col { display: none; }
}

.btn-resaltado {
    background: linear-gradient(180deg, #F0813A, #EA580C) !important;
    color: #fff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 6px;
    box-shadow: 0 2px 0 #B8460A, 0 3px 6px rgba(0, 0, 0, 0.25);
    border: none;
}

.topbar-home {
    color: #fff;
    text-decoration: none;
    margin-right: 12px;
    opacity: 0.9;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    line-height: 1.1;
}

.topbar-home:hover { opacity: 1; }

.topbar-home .icono { font-size: 26px; }
.topbar-home .etiqueta { font-size: 10px; }

.contenedor {
    max-width: 480px;
    margin: 60px auto;
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.login-split {
    display: flex;
    min-height: 100vh;
}

.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f7;
}

.login-panel .contenedor {
    margin: 24px;
}

.login-imagen {
    flex: 1;
    background-size: cover;
    background-position: center;
}

@media (max-width: 800px) {
    .login-imagen { display: none; }
}

.contenedor-ancho {
    max-width: 1140px;
    margin: 40px auto;
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.tabla-scroll {
    overflow-x: auto;
    margin-bottom: 32px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 4px 16px;
}

.form-grid .campo-ancho {
    grid-column: 1 / -1;
}

.form-grid .campo-doble {
    grid-column: span 2;
}

.form-grid input, .form-grid select {
    margin-bottom: 14px;
}

#dia {
    max-width: 70px;
}

input[type="file"] {
    width: auto;
    padding: 8px 0;
    background: none;
    border: none;
}

.filtro-imagen-decorativa {
    max-width: 70px;
    height: auto;
    border-radius: 6px;
}

.titulo-con-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.titulo-con-imagen h2 { margin: 0; }

.tabla-caja-banco th, .tabla-caja-banco td {
    text-align: right;
}

.tabla-caja-banco th:first-child, .tabla-caja-banco td:first-child {
    text-align: left;
}

.tabla-caja-banco .separador {
    border-left: 2px solid #9ca3af;
}

.tabla-caja-banco .grupo-caja {
    background: #E6F1FB;
    color: #0C447C;
}

.tabla-caja-banco .grupo-banco {
    background: #EAF3DE;
    color: #27500A;
}

.tabla-caja-banco td.grupo-caja, .tabla-caja-banco td.grupo-banco {
    color: #1f2937;
}

h1, h2 { margin-top: 0; }

.tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: #6b7280;
    border-bottom: 3px solid transparent;
}

.tab-btn.activo {
    color: var(--azul-oscuro);
    border-bottom: 3px solid var(--azul-oscuro);
    font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.activo { display: block; }

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
}

.noticia {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.noticia:last-child { border-bottom: none; }

.noticia h3 { margin-bottom: 4px; }

.noticia p { text-align: justify; }

.noticia .fecha {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

button.btn {
    width: 100%;
    padding: 11px;
    background: var(--azul-degradado);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

button.btn:hover { background: var(--azul-oscuro); }

.error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
}

.exito {
    position: fixed;
    top: 20px;
    left: 50%;
    width: max-content;
    max-width: 90%;
    background: #f0fdf4;
    color: #15803d;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    animation: toastExito 6s ease forwards;
}

.exito::before {
    content: "\2713  ";
}

@keyframes toastExito {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Version NO flotante / que no desaparece sola, para confirmaciones con
   mas texto que un aviso rapido de 4 segundos (ej. que pasa despues de
   una solicitud) - el usuario necesita tiempo para leerla completa. */
.exito-fijo {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    font-size: 14px;
}

.tabla th, .tabla td {
    text-align: left;
    padding: 7px 8px;
    border-bottom: 3px solid #d1d5db;
}

.tabla th {
    color: #6b7280;
    font-weight: 600;
    background: #f9fafb;
}

.nowrap { white-space: nowrap; }

.icono-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--azul-degradado);
    color: #fff;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 10px;
}

.icono-accion:hover { opacity: 0.85; }

.btn-pagar {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1.5px solid #15803d;
    color: #15803d;
    background: #fff;
    padding: 5px 14px 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    vertical-align: middle;
    margin-right: 10px;
}

.btn-pagar:hover { background: #f0fdf4; }

.icono-accion-peligro {
    background: #E24B4A;
    border: none;
    cursor: pointer;
    padding: 0;
}

.btn-contabilizar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #3B9A4A, #278A38);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 0 #1F6E2C, 0 3px 6px rgba(0,0,0,0.2);
    margin: 8px 0 32px;
}

.btn-contabilizar:hover { background: linear-gradient(180deg, #349142, #237830); }

.exportes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.btn-exportar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 16px;
    min-width: 150px;
    text-decoration: none;
}

.btn-exportar svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-exportar-titulo {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.btn-exportar-sub {
    display: block;
    font-size: 11px;
    color: #6b7280;
}

.btn-exportar-excel { border: 1.5px solid #5DCAA5; }
.btn-exportar-excel svg { color: #0F6E56; }

.btn-exportar-pdf { border: 1.5px solid #F0997B; }
.btn-exportar-pdf svg { color: #993C1D; }

.acciones {
    white-space: nowrap;
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -4px 0 6px -4px rgba(0,0,0,0.15);
}

.tabla-lineas-finas th, .tabla-lineas-finas td {
    border-right: 0.5px solid #e5e7eb;
}

.tabla-lineas-finas th:last-child, .tabla-lineas-finas td:last-child {
    border-right: none;
}

.tabla-lineas-finas .col-ingreso {
    background: #E6F1FB;
    color: #0C447C;
}

.tabla-lineas-finas td.col-ingreso {
    color: #1f2937;
}

.tabla-lineas-finas .col-egreso {
    background: #F1EFE8;
    color: #444441;
}

.tabla-lineas-finas td.col-egreso {
    color: #1f2937;
}

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

.top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 6px;
}

.banner-impersonando {
    background: #92400e;
    color: #fff;
    padding: 10px 24px;
    font-size: 14px;
    text-align: center;
}

.banner-impersonando a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 8px;
}

.carrusel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 28px;
}

.carrusel-pistas {
    display: flex;
    transition: transform 0.6s ease;
}

.carrusel-slide {
    flex: 0 0 100%;
}

.carrusel-slide img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.carrusel-texto {
    padding: 10px 16px;
    background: #f9fafb;
    font-size: 14px;
    border-radius: 0 0 8px 8px;
    margin-bottom: 24px;
}

.carrusel-texto a { margin-left: 8px; }

.carrusel-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrusel-flecha:hover { background: rgba(0,0,0,0.55); }

.carrusel-flecha-izq { left: 12px; }
.carrusel-flecha-der { right: 12px; }

.planes { margin-bottom: 32px; }

.planes h2 { text-align: center; margin-bottom: 20px; }

.planes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.plan-card {
    background: #fff;
    border: 3.5px solid #d1d5db;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, background .15s, transform .15s;
}

.plan-card:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.06);
    transform: translateY(-2px);
}

.plan-encabezado {
    min-height: 84px;
    text-align: center;
}

.plan-card .plan-etiqueta {
    font-size: 12.5px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 2px;
}

.plan-card .plan-precio {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #1f2937;
}

.plan-card .plan-periodo {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.plan-card ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 2px;
}

.plan-card ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: #2196F3;
    font-weight: 700;
}

.plan-titulo-servicio {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.25;
}

.plan-destacado {
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 8px;
}

.plan-card-destacado ul li::before {
    color: #0f6e56;
}

.plan-boton-destacado {
    background: #0f6e56 !important;
}

.plan-boton-destacado:hover {
    background: #0b5744 !important;
}

.plan-boton {
    display: block;
    text-align: center;
    background: #2196F3;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: auto;
}

.plan-boton:hover { background: #1976D2; }

.planes-descripcion h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0891b2;
    margin-bottom: 8px;
}

.planes-descripcion p {
    font-size: 14px;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 10px;
}

@media (max-width: 800px) {
    .planes-grid { grid-template-columns: 1fr; }
}

.noticia-imagen {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.noticia-enlace {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.noticia-enlace-prefijo {
    color: var(--azul-oscuro);
    font-weight: 700;
    font-size: 15px;
}

.noticia-boton {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.site-footer {
    background: var(--azul-oscuro);
    color: #e5e7eb;
    margin-top: 40px;
}

.site-footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.site-footer h3 {
    color: #fff;
    font-size: 15px;
    margin: 0 0 12px;
}

.site-footer p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 10px;
    color: #cbd5e1;
}

.footer-redes {
    display: flex;
    gap: 12px;
}

.footer-icono {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    z-index: 200;
}

.footer-whatsapp-bocadillo {
    position: fixed;
    right: 84px;
    bottom: 33px;
    background: #E9FBF0;
    color: #0F6E56;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 18px;
    border: 1.5px solid #25D366;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 200;
    white-space: nowrap;
    text-decoration: none;
}

.footer-whatsapp-bocadillo::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #25D366;
}

@media (max-width: 500px) {
    .footer-whatsapp-bocadillo { display: none; }
}

.footer-arriba {
    position: fixed;
    right: 20px;
    bottom: 82px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--azul-oscuro);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 200;
}

.formulario-moderno {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #d1d5db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 32px;
}

.formulario-moderno-titulo {
    background: var(--azul-degradado);
    color: #fff;
    margin: 0;
    padding: 14px 20px;
    font-size: 17px;
}

.formulario-moderno-cuerpo {
    background: #f4f7fb;
    padding: 20px;
}

.formulario-moderno-cuerpo input,
.formulario-moderno-cuerpo select,
.formulario-moderno-cuerpo textarea {
    background: #fff;
}

.formulario-moderno-cuerpo .error,
.formulario-moderno-cuerpo .exito-fijo {
    margin-top: 0;
}

.input-archivo-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.input-archivo-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    margin-bottom: 6px;
}

.input-archivo-label:hover {
    background: #f3f4f6;
}

.input-archivo-label svg {
    flex-shrink: 0;
}

.nombre-archivo-elegido {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
}
