body {
    font-family: Arial, sans-serif;
    background: #f2f2f2;
}

.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px;
}

.logo-sidebar {
    max-width: 160px;
    width: 100%;
    height: auto;
}


input {
    width: 90%;
    padding: 8px;
    margin: 10px 0;
}

button {
    width: 100%;
    padding: 8px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

#mensaje {
    margin-top: 10px;
    color: red;
}
/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    background: #f4f6f9;
}

/* LAYOUT */
.app {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: #1f2933;
    color: #fff;
}

.sidebar-header {
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    background: #111827;
}

.sidebar-header span {
    font-size: 14px;
    color: #9ca3af;
}

.menu {
    list-style: none;
}

.menu li {
    padding: 15px 20px;
    cursor: pointer;
    color: #d1d5db;
}

.menu li:hover {
    background: #374151;
    color: white;
}

/* MAIN */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header {
    height: 50px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
}

.header button {
    background: #ff0000;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    width: 10%;
}

/* CONTENT */
.content {
    padding: 25px;
}

/*REporte*/
.reporte-container {
            padding: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            font-size: 14px;
        }

        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }

        th {
            position: sticky;
            top: 0;
            z-index: 2;
            background-color: #2c3e50;
            color: white;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        .saldo-negativo {
            color: red;
            font-weight: bold;
        }

        .saldo-positivo {
            color: green;
            font-weight: bold;
        }

        /*button*/

        /* Scroll tabla */
.reporte-container {
    max-height: 70vh;
    overflow-y: auto;
}

/* Paginador */
.paginador {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px 0;
}

.paginador select {
    padding: 4px;
}

.paginador-botones button {
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
}
#tablaSeleccionados {
    margin-top: 10px;
    border-top: 2px solid #ccc;
}

#tablaSeleccionados td, 
#tablaSeleccionados th {
    padding: 6px;
}

.total-seleccion {
    margin-top: 10px;
    font-size: 18px;
}
.tabla-scroll {
    max-height: 350px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 6px;
    border: 1px solid #ccc;
}

.paginador {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.filtros {
    margin-bottom: 10px;
}

.filtros input {
    padding: 5px;
    width: 250px;
}
.repotegral-container {
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.encabezado {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.concepto {
    font-weight: bold;
    margin-top: 20px;
    border-bottom: 1px solid #000;
}

table.repote {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

table.repote th,
table.repote td {
    padding: 4px;
    border-bottom: 1px solid #ccc;
    text-align: right;
}

table.repote th:first-child,
table.repote td:first-child {
    text-align: left;
}

.subtotal {
    font-weight: bold;
    border-top: 2px solid #000;
}

.reportegral-container {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: #fff;
    padding: 12px;
    color: #000;
}

.reporte-header {
    border-bottom: 2px solid #000;
    margin-bottom: 8px;
}

.reporte-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.reporte-header p {
    margin: 4px 0 8px 0;
}

.tabla-scroll {
    overflow-x: auto;
    max-height: 70vh;
}

.tabla-reporte {
    width: 100%;
    border-collapse: collapse;
}

.tabla-reporte thead th {
    position: sticky;
    top: 0;
    z-index: 2;

    background: #2c3e50;
    border: 1px solid #000;
    padding: 6px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.tabla-reporte tbody td {
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    padding: 4px 6px;
    white-space: nowrap;
}

/* Línea inferior tipo reporte */
.tabla-reporte tbody tr {
    border-bottom: 1px solid #000;
}

/* Alineaciones tipo contable */
.tabla-reporte td:nth-child(5),
.tabla-reporte td:nth-child(6),
.tabla-reporte td:nth-child(7),
.tabla-reporte td:nth-child(8) {
    text-align: right;
}

.tabla-reporte td:nth-child(3),
.tabla-reporte td:nth-child(4) {
    text-align: center;
}

/* Concepto como encabezado visual */
.tr-concepto td {
    font-weight: bold;
    background: #f5f5f5;
    border-top: 2px solid #000;
}

/* Totales */
.tr-total td {
    font-weight: bold;
    background: #efefef;
    border-top: 2px solid #000;
}
/*/////////////////////////////////*/

.tabla-reporte td:nth-child(n+6) {
    text-align: right;
}

.tabla-reporte th {
    background: #dcdcdc;
    border: 1px solid #000;
}

/* ===============================
   FILTROS (label arriba del input)
================================ */
.filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 16px;
    padding: 16px;
    margin-bottom: 15px;

    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.filtros label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.filtros input {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;

    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;

    transition: border-color 0.2s, box-shadow 0.2s;
}

.filtros input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Cada filtro como bloque vertical */
.filtros > label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Input de búsqueda más ancho */
.filtros label:has(#filtroConcepto) {
    grid-column: span 2;
}

/* Responsive */
@media (max-width: 768px) {
    .filtros label:has(#filtroConcepto) {
        grid-column: span 1;
    }
}


/*
//////////////////////////////////////////////
*/

.form-perfil {
    max-width: 420px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.campo {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.campo label {
    font-weight: 600;
    margin-bottom: 4px;
}

.campo input,
.campo select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.modal {
    position: fixed;
    inset: 0;
    /*background: rgba(0,0,0,.7);*/
    /*display: flex;*/
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #2b2b2b;
    color: #fff;
    padding: 25px;
    width: 500px;
    border-radius: 8px;
}

.modal-pago h3 {
    margin-top: 0;
}

/* .resaltado {
    background: #6b7b00;
    padding: 6px;
    margin: 6px 0;
    font-weight: bold;
} */

.nota {
    font-size: 12px;
    margin-top: 10px;
}

/*



*/
/* ===== MODAL PERSONALIZADO (para avisos) ===== */
.modal-custom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1060;
}

.modal-custom-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-custom-content button {
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-custom-content button:hover {
    background-color: #0b5ed7;
}

/* Hacer que la página ocupe toda la pantalla sin scroll general */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Evita scroll en el body */
}

/* Contenedor principal: flex para sidebar + main */
.app {
    display: flex;
    height: 100vh;      /* Altura completa de la ventana */
    width: 100%;
}

/* Sidebar fijo con su propio scroll si es necesario */
.sidebar {
    width: 250px;        /* Ajusta al ancho de tu sidebar */
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;    /* Scroll solo si el contenido del sidebar es muy alto */
}

/* Main: ocupa el resto del espacio y organiza header + content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header fijo (sin scroll) */
.header {
    flex-shrink: 0;
    /* Si necesitas una altura fija, agrégala aquí */
}

/* Contenido con scroll vertical */
.content {
    flex: 1;
    overflow-y: auto;    /* Aquí aparecerá la barra de scroll */
    padding: 1rem;       /* Espaciado interior, ajustable */
}

.filtros-cliente {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}
.filtros-cliente label {
    margin-right: 10px;
}
/* Contenedor de la tabla con scroll horizontal */
.tabla-scroll {
    overflow-x: auto;
    width: 100%;
}

/* Tabla de usuarios */
#tablaUsuarios {
    min-width: 600px; /* ajusta según tus necesidades */
}

/* Columna de acciones: permitir que los botones se envuelvan */
#tablaUsuarios td:last-child {
    white-space: normal;
    word-break: break-word;
    min-width: 180px;
}

/* Botones dentro de la columna de acciones */
#tablaUsuarios td:last-child button {
    margin: 2px;
    white-space: nowrap;
    display: inline-block;
}

/* Para la columna de cliente (evitar desbordamiento) */
#tablaUsuarios td:nth-child(3) {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Al pasar el mouse, mostrar el texto completo */
#tablaUsuarios td:nth-child(3):hover {
    overflow: visible;
    white-space: normal;
    background-color: #fff;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}