﻿:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1f2937;
    --dark-card: #374151;
    --light-bg: #f3f4f6;
    --light-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;


     --bg-modal: rgba(0, 0, 0, .45);
      --radius: 16px;
      --accent: #0077ff;
      --accent-hover: #005fd1;
      --bg-card: #ffffff;
      --text: #222;
      --border: #e6e6e6;
      --transition: .25s ease;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout principal */
.menu-container {
    display: flex;
    min-height: 100vh;

}

/* Sidebar */
.sidebar {
    width: 180px;
    background-color: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    transition: all 0.3s ease;
}

    .sidebar.collapsed {
        width: 70px;
    }

.logo {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
}
.textUser {
    margin-left : 10px;
    /*text-align: center;*/
    margin-bottom: 2rem;
    font-size: 12px;
    font-weight: bold;
}
.btnCerrarSession {
    margin-left: 10px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .nav-link:hover,
    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.1);
        border-left: 3px solid var(--primary-color);
    }

    .nav-link i {
        margin-right: 0.5rem;
        width: 20px;
    }

.sidebar.collapsed .nav-link span {
    display: none;
}

/* Contenido principal */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

    .header h1 {
        font-size: 2rem;
        font-weight: 700;
    }

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}
.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}
.columna-oculta {
    display: none;
}

.text-success {
    color: #27ae60;
    font-weight: bold;
    background-color:rgba(0,0,0,0.4);
    border-radius: 10px;
}

.text-bluedodge {
    color: dodgerblue;
}

.text-warning {
    color: #f39c12;
    font-weight: bold;
    background-color: rgba(0,0,0,0.4);
    border-radius: 10px;
}

.text-danger {
    color: #e74c3c;
    font-weight: bold;
    background-color: rgba(0,0,0,0.4);
    border-radius: 10px;
}
.text-dark {
    color: black;
}

.checkbox-rojo {
    accent-color:   #e74c3c;
    font-weight: bold;
}
/* Tarjetas de métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background-color: var(--light-card);
    border-radius: 5px;
    padding: 10px 10px 8px 10px ;
    /*padding: 1.5rem;*/
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/*.metric-cardModif {
    background-color: var(--dark-bg);
    border-radius: 2px;
    padding: 4px 10px 4px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.metric-cardModif:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}*/

.card-contenidoLinear {
    background-color: var(--light-card);
    /*background-color:#e6e6e6;*/
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}
.card-contenidoLinear:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contenido-right {
    align-content: end;
    justify-content: end;
    display: flex;
    padding: 10px 10px;
}
.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
}

    .metric-change.positive {
        color: var(--secondary-color);
    }

    .metric-change.negative {
        color: var(--danger-color);
    }

/* Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: var(--light-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.chart-container {
    position: relative;
    /*height: 300px;*/
     
    
}
#ChartDistribServEstado {
    flex: 1 1 0; /* ocupa todo el espacio restante */
    width: 100%;
    height: 100%;
}

.center-text {
    position: absolute;
    top: 53%;
    left: 10%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.total-value {
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.total-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 5px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
 
 
/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        height: 100vh;
        z-index: 1000;
    }

        .sidebar.active {
            left: 0;
        }

    .main-content {
        padding: 1rem;
    }

    .metrics-grid,
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.5rem;
    }
}

/* Toggle sidebar */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.chart-card,
.card-contenidoLinear,

/* Modo oscuro */
body.dark-mode {
    background-color: var(--dark-bg);
    color: white;
}

    body.dark-mode .metric-card,
    body.dark-mode .card-contenidoLinear,
    body.dark-mode .chart-card {
        background-color: var(--dark-card);
        color: white;
    }

    body.dark-mode .header {
        border-bottom-color: #4b5563;
    }

    body.dark-mode th,
    body.dark-mode td {
        border-bottom-color: #4b5563;
    }

    body.dark-mode .text-primary {
        color: white;
    }

    body.dark-mode .text-secondary {
        color: #9ca3af;
    }
.btn-top-right {
    position: fixed; /* fuera del flujo normal */
    top: 12px; /* pegado al borde superior */
    right: 12px; /* pegado al borde derecho */
    z-index: 1050; /* por encima de la navbar de Bootstrap */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #0d6efd;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    transition: transform .2s ease, background-color .2s ease;
}

.btn-top-right:hover {
    background-color: #0b5ed7;
    transform: scale(1.08);
}

.btn-bottom-left {
    margin-left: 15px;
    margin-top: 50px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #0d6efd;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    transition: transform .2s ease, background-color .2s ease;
}

.btn-bottom-left:hover {
    background-color: #0b5ed7;
    transform: scale(1.08);
}

.btn1 {
    display: inline-flex;
    align-items: center;
    gap: var(--gap);
    padding: calc(var(--space) - 2px) calc(var(--space) + 6px);
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}


.button1 {
    border: none;
    padding: 8px 12px  ;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    margin-right: 15px;

}

.button3 {
    border: none;
    padding: 3px 5px 6px 5px  ;
    margin: 5px 5px 6px 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}
    .button3:first-child {
        margin-top: 0;
    }

    .button3:last-child {
        margin-right: 0;
    }
.button1:last-child {
    margin-right: 0;
}


.button1-edit {
    background-color: #2196F3;
    color: white;
}

.button1-edit:hover {
    background-color: #1740B0;
}

.button1-delete {
    
    background-color: #ED8787;
    color: white;
}

.button1-delete:hover {
    background-color: #E32222;
}

.button1-service {
    background-color: #42B818;
    color: white;
}

.button1-service:hover {
    background-color: #147D15;
}

.button1-pagos {
    background-color: #EDE05C;
    color: white;
}

.button1-pagos:hover {
    background-color: #A39924;
}

.button1-Historial {
    background-color: #969480;
    color: white;
}

.button1-Historial:hover {
    background-color: #575151;
}

.button2 {
    border: none;
    padding: 8px 12px ;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    margin-right: 15px;
    background-color: #2196F3;
    color: white;
}
 

.button2:hover {
    background-color: #1740B0;
}

.select-container {
    position: relative;
    width: 250px;
}

.select-containerFull {
    position: relative;
    width: 100%;
}

select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #007bff;
}


.select-container::after,
.select-containerFull::after {
    content: '▼';
    font-size: 12px;
    color: #666;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}


.multicheck {
    position: relative;
    width: 260px;
    font-family: system-ui, sans-serif;
}

.multicheck button {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}
.panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow: auto;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: none;
    z-index: 10;
   color:black;
}

    .panel.open {
        display: block;
    }

    .panel label {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
    }

    .panel label:hover {
        background: #969480;
    }

.actions {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #eee;
    background: #fafafa;
    position: sticky;
    bottom: 0;
}

.tag {
    display: inline-block;
    background: #eef6ff;
    color: #174ea6;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    margin-left: 8px;
}

