* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;
}

body {

    font-family: Arial, sans-serif;

    background: #f4f6f9;
}

/* LAYOUT */

.layout {

    display: flex;

    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {

    position: fixed;

    top: 0;

    left: 0;

    width: 250px;

    height: 100vh;

    background: #111827;

    color: white;

    padding-top: 20px;

    overflow-y: auto;

    z-index: 1000;
}

.logo {

    font-size: 28px;

    font-weight: bold;

    text-align: center;

    margin-bottom: 40px;
}

.sidebar ul {

    list-style: none;
}

.sidebar ul li {

    margin-bottom: 5px;
}

.sidebar ul li a {

    display: block;

    color: #d1d5db;

    text-decoration: none;

    padding: 14px 25px;

    transition: 0.2s;
}

.sidebar ul li a:hover {

    background: #1f2937;

    color: white;
}

/* CONTENT */

.main {

    flex: 1;

    margin-left: 250px;

    padding: 30px;

    min-height: 100vh;
}

.topbar {

    background: white;

    padding: 20px 25px;

    border-radius: 12px;

    margin-bottom: 30px;

    display: flex;

    justify-content: space-between;

    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* TITLES */

h1 {

    margin-bottom: 25px;

    color: #111827;

    font-size: 38px;
}

.dashboard-card h3 {

    color: #64748b;

    margin-bottom: 12px;

    font-size: 16px;
}

.dashboard-card p {

    font-size: 34px;

    font-weight: bold;

    color: #111827;
    margin-top:12px;
    
    font-weight:700;
}

/* BUTTONS */

.btn {

    display: inline-block;

    background: #2563eb;

    color: white;

    text-decoration: none;

    padding: 12px 18px;

    border-radius: 10px;

    border: none;

    cursor: pointer;

    transition: 0.2s;
}

.btn:hover {

    background: #1d4ed8;
}

/* TABLES */

.table-container {

    background: white;

    padding: 20px;

    border-radius: 12px;

    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table {

    width: 100%;

    border-collapse: collapse;
}

table th {

    background: #f3f4f6;

    text-align: left;

    padding: 14px;
}

table td {

    padding: 14px;

    border-bottom: 1px solid #e5e7eb;
}

table tr:hover {

    background: #f9fafb;
}

/* FORMS */

.form-container {

    background: white;

    padding: 30px;

    border-radius: 12px;

    max-width: 600px;

    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


.alert-success {

    background: #dcfce7;

    color: #166534;

    padding: 15px;

    border-radius: 10px;

    margin-bottom: 20px;
}
/* LOGIN */

.login-page {

    display: flex;

    justify-content: center;

    align-items: center;

    height: 100vh;

    background: #f3f4f6;
}

.login-box {

    width: 400px;

    background: white;

    padding: 40px;

    border-radius: 16px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.login-box h1 {

    text-align: center;

    margin-bottom: 30px;

    color: #111827;

    font-size: 32px;
}

.login-box button {

    width: 100%;
}

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px,1fr));

    gap: 20px;
}

.form-group {

    display: flex;

    flex-direction: column;
}

.form-group label {

    margin-bottom: 8px;

    font-weight: 600;

    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {

    padding: 12px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    font-size: 14px;

    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {

    outline: none;

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37,99,235,0.1);
}

.btn-primary {

    background: #2563eb;

    color: white;

    border: none;

    padding: 12px 22px;

    border-radius: 10px;

    cursor: pointer;

    text-decoration: none;

    font-weight: 600;
}

.btn-primary:hover {

    background: #1d4ed8;
}

.btn-secondary {

    background: #e5e7eb;

    color: #111827;

    padding: 12px 22px;

    border-radius: 10px;

    text-decoration: none;

    font-weight: 600;
}

.btn-secondary:hover {

    background: #d1d5db;
}

/*
|--------------------------------------------------------------------------
| FORMULARIOS
|--------------------------------------------------------------------------
*/

.form-card {

    background: white;

    border-radius: 14px;

    padding: 30px;

    box-shadow:
        0 2px 10px rgba(0,0,0,0.08);

    width: 100%;
}

.form-title {

    margin: 0;

    font-size: 28px;

    color: #111827;
}

.form-subtitle {

    margin-top: 5px;

    color: #6b7280;
}

/*
|--------------------------------------------------------------------------
| TABLAS
|--------------------------------------------------------------------------
*/

.table-card {

    background: white;

    border-radius: 14px;

    padding: 25px;

    box-shadow:
        0 2px 10px rgba(0,0,0,0.08);

    overflow-x: auto;
}

/*
|--------------------------------------------------------------------------
| LOGIN
|--------------------------------------------------------------------------
*/

.login-card {

    background: white;

    border-radius: 16px;

    padding: 35px;

    max-width: 420px;

    margin: 60px auto;

    box-shadow:
        0 4px 20px rgba(0,0,0,0.12);
}

.info-item{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    gap:10px;

    background:#f9fafb;

    padding:15px;

    border-radius:10px;

    min-height:110px;

}
.info-item label {

    display: block;

    width:100%;

    text-align:center;

    margin-bottom: 8px;

    font-size: 13px;

    color: #6b7280;

    font-weight: 600;
}

.info-item div {

    width:100%;

    text-align:center;

    font-size: 16px;

    font-weight: 600;

    color: #111827;
}
.action-btn{

    padding:8px 14px;

    border-radius:8px;

    text-decoration:none;

    color:white;

    font-size:13px;

    display:inline-block;

    margin-right:5px;
}

.action-view{

    background:#0ea5e9;
}

.action-view:hover{

    background:#0284c7;
}

.action-danger{

    background:#dc2626;
}

.action-danger:hover{

    background:#b91c1c;
}

.action-success{

    background:#16a34a;
}

.action-success:hover{

    background:#15803d;
}

.section-card{

    background:white;

    padding:25px;

    border-radius:14px;

    margin-bottom:30px;

    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.section-title{

    margin-bottom:20px;

    font-size:24px;
}

.big-balance{

    font-size:40px;

    font-weight:bold;

    color:#dc2626;
}

.balance-label{

    color:#666;

    margin-top:8px;
}

.factura-item{

    padding:12px 0;

    border-bottom:1px solid #eee;
}

.timeline-item{

    border-left:4px solid #0d6efd;

    padding-left:15px;

    margin-bottom:20px;
}

.timeline-date{

    color:#666;

    font-size:13px;

    margin-bottom:5px;
}

.timeline-content{

    background:#f8fafc;

    padding:12px;

    border-radius:10px;
}

.cliente-estado-box{

    display:flex;

    align-items:center;

    gap:15px;
}

.btn-danger{

    background:#dc2626;

    color:white;

    padding:10px 16px;

    border-radius:8px;

    text-decoration:none;
}

.btn-danger:hover{

    background:#b91c1c;
}

.btn-success{

    background:#16a34a;

    color:white;

    padding:10px 16px;

    border-radius:8px;

    text-decoration:none;
}

.btn-success:hover{

    background:#15803d;
}

.btn-primary-small{

    background:#2563eb;

    color:white;

    padding:8px 14px;

    border-radius:8px;

    text-decoration:none;

    font-size:14px;
}

.btn-primary-small:hover{

    background:#1d4ed8;
}

.dashboard-cards{

    display:grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 260px)
        );

    gap:20px;

    margin-bottom:30px;

    align-items:center;
}

.dashboard-card{

    background:white;

    border-radius:14px;

    padding:22px;

    box-shadow:
        0 2px 10px
        rgba(0,0,0,0.08);

    width:100%;

    box-sizing:border-box;
    text-align:center;
     transition:.2s;
}

.dashboard-card:hover{
    transform:translateY(-3px);
}

.dashboard-card-title{

    color:#64748b;

    font-size:14px;

    margin-bottom:10px;
}

.dashboard-card-value{

    font-size:34px;

    font-weight:bold;

    color:#0f172a;
}

.dashboard-card-value.success{

    color:#16a34a;
}

.dashboard-card-value.danger{

    color:#dc2626;
}

.dashboard-card-value.warning{

    color:#d97706;
}

.dashboard-card.success{
    border-left:5px solid #16a34a;
}

.dashboard-card.danger{
    border-left:5px solid #dc2626;
}

.dashboard-card.warning{
    border-left:5px solid #f59e0b;
}

.dashboard-card.primary{
    border-left:5px solid #2563eb;
}

.dashboard-card-full{
    background:white;
    border-radius:12px;
    padding:20px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.estado-dia{

    background:#dcfce7;

    color:#166534;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:bold;
}

.estado-mora{

    background:#fee2e2;

    color:#991b1b;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:bold;
}

.estado-activo{

    background:#dcfce7;

    color:#166534;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:bold;
}

.estado-suspendido{

    background:#fee2e2;

    color:#991b1b;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:bold;
}

.cliente-row{

    cursor:pointer;

    transition:0.2s;
}

.cliente-row:hover{

    background:#f1f5f9;
}

.cliente-row:active{

    transform:scale(0.998);
}

.tipo-normal{

    display:inline-block;

    background:#dbeafe;

    color:#1d4ed8;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:700;
}

.tipo-cortesia{

    display:inline-block;

    background:#ffedd5;

    color:#c2410c;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:700;
}

.filtro-card{
    border:1px solid #e5e7eb;

    border-radius:10px;
    
    cursor:pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}

.filtro-plan{
    border:1px solid #e5e7eb;

    border-radius:10px;
    
    cursor:pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}

.filtro-card:hover{

    transform:translateY(-3px);
    border-color:#2563eb;
    box-shadow:
        0 8px 20px rgba(0,0,0,.15);

}

.filtro-plan:hover{

    transform:translateY(-3px);
    border-color:#2563eb;
    box-shadow:
        0 8px 20px rgba(0,0,0,.15);

}

.badge{

    background:#e5e7eb;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

    font-weight:600;

}

.filtro-card:active,
.filtro-plan:active{

    transform:scale(.97);

}

#filtros-activos{

    display:flex;
    gap:10px;
    align-items:center;
    justify-content:center;

    margin:20px 0;
    flex-wrap:wrap;
}

.filtro-badge{

    background:#eef4ff;

    color:#1e4fa8;

    border:1px solid #cfdfff;

    border-radius:20px;

    padding:8px 14px;

    font-size:14px;

    font-weight:600;
}

.filtro-clear{

    background:#dc3545;

    color:white;

    border:none;

    border-radius:20px;

    padding:8px 14px;

    cursor:pointer;

    font-weight:600;
}

.filtro-clear:hover{

    opacity:.9;
}

.card{

    background:#fff;

    border:1px solid #e5e7eb;

    border-radius:10px;

    padding:0;

    box-shadow:0 2px 6px rgba(0,0,0,.08);
}

.card-body{

    padding:15px;
}

.card-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    flex-wrap:wrap;

    gap:20px;

}

.card-title{

    font-size:18px;

    font-weight:bold;

    color:#153764;

    margin-bottom:18px;

}

.form-control{

    width:100%;

    padding:12px 15px;

    border:1px solid #d1d5db;

    border-radius:8px;

    font-size:14px;

    box-sizing:border-box;

    transition:.2s;
}

.form-control:focus{

    outline:none;

    border-color:#1e4fa8;

    box-shadow:
        0 0 0 3px
        rgba(30,79,168,.15);
}

#busquedaServicios{

    font-size:16px;

    font-weight:500;
}

.buscador-card{

    margin-bottom:20px;
    max-width:800px;
}



/*=============================
  DASHBOARD DE FILTROS
=============================*/

.filtro-seccion{
    margin-top:22px;
    margin-bottom:12px;
}

.filtro-seccion h4{
    margin:0 0 12px;
    color:#334155;
    font-size:18px;
    font-weight:700;
}

.filtro-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(135px,1fr));
    gap:10px;
}

.filtro-mini{
    cursor:pointer;
    border-radius:12px;
    padding:12px;
    text-align:center;
    transition:.20s;
    border:1px solid #dbeafe;
}

.filtro-mini:hover{
    transform:translateY(-2px);
    box-shadow:0 6px 14px rgba(0,0,0,.08);
}

.filtro-mini .numero{
    font-size:24px;
    font-weight:700;
    margin-bottom:4px;
}

.filtro-mini .titulo{
    font-size:13px;
    font-weight:600;
}

/* Colores pastel */

.filtro-estado{
    background:#DCEFFD;
}

.filtro-plan{
    background:#DDF7E5;
}

.filtro-barrio{
    background:#EEE7FB;
}

.filtro-cartera{
    background:#FFF3D6;
}

.modal-retirar{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    z-index:9999;

    align-items:center;

    justify-content:center;

}

.modal-retirar.activo{

    display:flex;

}

.modal-retirar-contenido{

    width:500px;

    max-width:95%;

    background:#fff;

    border-radius:10px;

    padding:20px;

    box-shadow:0 15px 40px rgba(0,0,0,.35);

}

.modal-retirar textarea{

    width:100%;

    resize:vertical;

    margin-top:10px;

    margin-bottom:20px;

}

.acciones{

    display:flex;

    justify-content:flex-end;

    gap:10px;

}

.btn-rojo{

    background:#dc2626;

    color:white;

    border:none;

    padding:10px 18px;

    border-radius:6px;

    cursor:pointer;

}

.btn-amarillo{

    background:#EEF527;

    color:black;

    border:none;

    padding:10px 18px;

    border-radius:6px;

    cursor:pointer;

}

.grid2{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));

    gap:18px;

}

.grid2 label{

    display:block;

    color:#64748b;

    font-size:13px;

    margin-bottom:4px;

}

.grid2 strong{

    font-size:16px;

}

.acciones-grid{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

}

#mapaServicio{

    height:420px;

    border-radius:12px;

    overflow:hidden;

}

/*==================================
PROGRESO FACTURACION
===================================*/

.progreso-box{

    height:80vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

}

.progreso-box h2{

    color:#153764;

    margin-bottom:10px;

}

.progreso-box p{

    color:#555;

    font-size:16px;

}

.spinner{

    width:80px;

    height:80px;

    border:8px solid #e5e7eb;

    border-top:8px solid #2563eb;

    border-radius:50%;

    animation:girar 1s linear infinite;

    margin-bottom:25px;

}

@keyframes girar{

    from{

        transform:rotate(0deg);

    }

    to{

        transform:rotate(360deg);

    }

}

/*==================================
PROGRESO FACTURACION
==================================*/

.progreso-box{

    max-width:700px;

    margin:120px auto;

    background:white;

    border-radius:18px;

    padding:45px;

    text-align:center;

    box-shadow:0 8px 25px rgba(0,0,0,.15);

}

.spinner{

    width:70px;

    height:70px;

    margin:auto;

    margin-bottom:30px;

    border:8px solid #ddd;

    border-top:8px solid #2563eb;

    border-radius:50%;

    animation:girar .9s linear infinite;

}

@keyframes girar{

    from{

        transform:rotate(0deg);

    }

    to{

        transform:rotate(360deg);

    }

}

.progreso-barra{

    width:100%;

    height:26px;

    background:#ececec;

    border-radius:30px;

    overflow:hidden;

    margin:30px 0;

}

.progreso-valor{

    height:100%;

    background:#16a34a;

    transition:.3s;

}

.progreso-box h2{

    color:#153764;

}

.progreso-box h3{

    margin-top:15px;

    font-size:28px;

    color:#153764;

}

.progreso-box p{

    font-size:18px;

    color:#666;

}

