/* ============================================================
   1. PALETA DE COLORES FINTEXOR (UNIFICADA)
============================================================ */
:root {
    --primary:    #0B1F3A;   /* Azul Marino */
    --secondary:  #17A4A3;   /* Turquesa */
    --accent:     #14C2C3;   /* Aqua */

    --text-main:  #1E1E1E;
    --text-sec:   #6F7A89;

    --border:     #D9DEE5;
    --bg-light:   #F4F6F9;
}

/* ============================================================
   2. BASE GLOBAL
============================================================ */
body {
    background: var(--bg-light);
    font-family: "Inter", sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none !important;
}
/* ============================================================
   3. LOGIN – CENTRADO REAL EN ESCRITORIO
============================================================ */
.login-page {
    /* Eliminamos los márgenes globales, el centrado lo hace Flex */
    background: var(--bg-light) !important;

    /* Centrado perfecto para ESCRITORIO */
    min-height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    
    overflow: hidden !important;
}

/* Contenedor */
.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Aseguramos que el contenedor no tenga padding por defecto */
}

/* Tarjeta login para ESCRITORIO */
.login-card {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    width: 380px; /* Ancho fijo para escritorio */
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

/* Logo */
.login-logo {
    width: 160px;
    margin-bottom: 12px;
}

/* Inputs */
.input-fintexor {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    font-size: 1rem;
    width: 100%; /* Aseguramos que ocupen el 100% del contenedor */
    box-sizing: border-box; /* Incluye padding y borde en el ancho total */
}

/* Botón */
.btn-fintexor-primary {
    background: var(--primary);
    color: #fff !important;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    width: 100%; /* Aseguramos que ocupe el 100% del contenedor */
    display: block; /* Para que width: 100% funcione en el botón */
}


/* ============================================================
   RESPONSIVE – MÓVIL (Vista de Panel Centrado)
============================================================ */
@media (max-width: 575px) {

    /* Ajustamos el contenedor principal */
    .login-page {
        /* Mantenemos el centrado horizontal, pero forzamos el inicio vertical */
        align-items: flex-start !important; 
        padding-top: 25px !important; /* Menos espacio arriba para que suba más */
    }
    
    /* El login-container ya está bien para centrar */

    /* Tarjeta de Login (Simulando Panel APK) */
    .login-card {
        /* Reestablecemos el ancho a un porcentaje para que se vea más grande en móvil */
        width: 90% !important;     
        max-width: 380px !important; /* Limitamos el crecimiento */
        
        /* Mantenemos los bordes redondeados que se ven en la imagen */
        border-radius: 18px !important; 
        
        /* Ajustamos la sombra para que se vea como un panel */
        box-shadow: 0 5px 20px rgba(0,0,0,0.08) !important; 
        
        /* Ajustamos el padding interno */
        padding: 28px !important; 
        
        /* El width de 90% fuerza el centrado automático por el Flexbox del .login-page */
    }

    /* Elementos internos */
    .login-logo {
        width: 180px !important; /* Un poco más pequeño */
    }

    .input-fintexor {
        font-size: 1rem !important;
        padding: 14px !important;
        border-radius: 10px !important;
    }

    .btn-fintexor-primary {
        padding: 14px !important;
        font-size: 1.1rem !important;
        border-radius: 12px !important;
    }
}

/* ===========================================
   4. SIDEBAR – ESTILO VERTICAL Y PROFESIONAL
=========================================== */

/* Contenedor principal */
.sidebar {
    width: 240px;
    height: 100vh;
    background: var(--primary);
    color: #ffffff;
    position: fixed;
    top: 60px !important; /* Ajusta según la altura real del navbar */
    left: 0;
    padding-top: 0px;
    z-index: 9999;
    transition: left .3s ease;
    overflow-y: auto;
    
}

/* Cada opción del menú */
.sidebar a,
.sidebar .menu-link {
    display: flex;                 /* Fuerza icono + texto en fila */
    align-items: center;
    gap: 10px;                     /* Separación icono-texto */
    padding: 12px 20px;
    font-size: 15px;
    color: #ffffff !important;    /* Texto blanco */
    text-decoration: none;
    width: 100%;                  /* Que ocupe toda la línea */
}

/* Iconos del menú */
.sidebar a i {
    font-size: 18px;
    opacity: 0.9;
}

/* Hover elegante */
.sidebar a:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff !important;
}

/* MOBILE — Sidebar oculta */
@media (max-width: 992px) {
    .sidebar {
        left: -260px;
    }
    .sidebar.sidebar-open {
        left: 0;
    }
}



/* ============================================================
   5. CONTENT PRINCIPAL (AJUSTADO)
============================================================ */
.content {
    margin-left: 240px;
    padding: 20px;
    transition: margin-left 0.3s ease;
    padding-top: 60px !important;  /* Ajusta este valor según tu navbar */
}

@media (max-width: 992px) {
    .content {
        margin-left: 0 !important;
        
        
    }

    .content.sidebar-open {
        margin-left: 240px !important;
        
    }
}


@media (max-width: 992px) {
    .content {
        margin-left: 0 !important;
        padding: 12px !important;
        padding-top: 60px !important;  /* Ajusta este valor según tu navbar */
    }
}

/* ============================================================
   6. DASHBOARD — ESTILO APK (home-wrapper, home-card)
============================================================ */
.home-wrapper {
    min-height: 100vh;
    padding: 15px 12px;
    max-width: 520px;
    margin: 180px auto;
}

.home-header {
    margin-bottom: 1.5rem;
}

.home-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Tarjeta estilo APK */
.home-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem 0.8rem;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: 0.12s ease-in-out;
}

.home-card:hover,
.home-card:active {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

/* Iconos de tarjetas */
.home-icon {
    font-size: 1.9rem;
    margin-bottom: 0.4rem;
}

.home-card-title {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 600;
}

/* Versión móvil aún más ajustada */
@media (max-width: 575px) {
    .home-wrapper {
        padding: 10px 8px;
    }

    .home-card {
        padding: 1rem 0.7rem;
        border-radius: 14px;
    }

    .home-icon {
        font-size: 1.7rem;
    }
}

/* ============================================================
   7. TARJETAS LISTADO (CLIENTES, COBROS, ETC.)
============================================================ */
.cliente-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============================================================
   8. TABLAS / COBROS
============================================================ */
.table-cobros {
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
}

.table-cobros thead th {
    background: #17A4A3;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   9. PAGINACIÓN
============================================================ */
.pagination .page-link {
    color: var(--secondary);
    border-radius: 6px;
}


/* TABLAS COMPACTAS PARA COBROS */
.table-cobros {
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table-cobros thead th {
    background: #f1f3f5;
    color: #0B1F3A;
    font-weight: 600;
    padding: 8px 10px;
    white-space: nowrap;
}

.table-cobros tbody td {
    padding: 6px 10px;
    vertical-align: middle;
}

.table-cobros tbody tr:nth-child(even) {
    background: #fafafa;
}

.table-cobros .icon-btn {
    color: #17A4A3;
    font-size: 18px;
    cursor: pointer;
}

.table-cobros .icon-btn:hover {
    color: #14C2C3;
}

.table-cobros .monto-negativo {
    color: #d9534f;
    font-weight: bold;
}

.table-cobros .monto-positivo {
    color: #198754;
    font-weight: bold;
}

.badge-dia {
    background-color: #17A4A3;
    color: #fff;
}

.badge-atrasada {
    background-color: #E04F4F;
    color: #fff;
}
/* ============================================================
   10. FINAL
============================================================ */
.alert {
    font-size: 0.9rem;
}

/* boton cobrar */
.btn-cobrar {
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-cobrar:hover {
    background-color: #0b5ed7;
    color: #fff;
}
/* Contenedor tipo tabla */
.clientes-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Cada fila */
.cliente-row {
    background: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Información del cliente */
.cliente-info {
    display: flex;
    flex-direction: column;
    font-size: 15px;
}

.cliente-info strong {
    font-size: 16px;
}

/* Botones alineados a la derecha */
.cliente-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

/* —————— RESPONSIVE PARA MÓVIL —————— */
@media (max-width: 768px) {

    .cliente-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cliente-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .cliente-actions .btn {
        flex: 1;
        margin: 0 3px;
    }
}
/* ===== Layout general tipo app ===== */
body {
    background-color: #f5f7fb;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-wrapper {
    min-height: 100vh;
    padding: 1.5rem 1rem 2.5rem;
    max-width: 480px;           /* Ancho tipo móvil */
    margin: 0 auto;             /* Centrar en pantallas grandes */
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.home-header {
    margin-bottom: 1.5rem;
}

.home-welcome {
    margin: 0;
    font-size: 0.95rem;
    color: #6b7280;
}

.home-title {
    margin: 0.2rem 0 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #111827;
}

/* ===== Grid de tarjetas ===== */
.home-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Tarjeta tipo app */
.home-card {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 1.2rem 0.9rem;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.home-card:hover,
.home-card:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

/* Icono dentro de la tarjeta */
.home-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    color: #2563eb; /* azul Fintexor / módulo principal */
}

.home-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #111827;
}

/* ===== Footer pequeño ===== */
.home-footer {
    margin-top: auto;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}

/* ===== Ajustes específicos para pantallas pequeñas ===== */
@media (max-width: 575.98px) {
    .home-wrapper {
        padding: 1.2rem 0.85rem 2rem;
    }

    .home-title {
        font-size: 1.3rem;
    }

    .home-card {
        padding: 1.1rem 0.75rem;
        border-radius: 16px;
    }

    .home-icon {
        font-size: 1.7rem;
    }

    .home-card-title {
        font-size: 0.9rem;
    }
}
