@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden !important;
}

#map {
    background: rgb(42, 42, 42);
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    cursor: default !important;
}

/* Ocultar scrollbar en el mapa */
#map::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

#map {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    scrollbar-height: none !important;
    overflow: -moz-scrollbars-none !important;
    overflow: hidden !important;
}

html, body {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.leaflet-container {
    overflow: hidden !important;
}

.leaflet-container::-webkit-scrollbar {
    display: none !important;
}
/* Popup de Mancomunidad en color verde */
.popup-fijo-header.popup-verde {
    background: #27ae60 !important;
    border-bottom: 2px solid #1e8449 !important;
}

/* Borde superior verde para popup mancomunidad */
#popup-fijo-mancomunidad {
    border-top: 4px solid #27ae60 !important;
}



/* ===============================================
   POPUP FIJO MUNICIPIO (ESQUINA SUPERIOR DERECHA)
   =============================================== */

.municipio-popup-fixed {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 2000 !important;
    margin: 0 !important;
}

.municipio-popup-fixed .leaflet-popup-content-wrapper {
    background: #ecf0f3 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25) !important;
    padding: 0 !important;
    min-width: 280px;
    max-width: 350px;
}

.municipio-popup-fixed .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.municipio-popup-fixed .leaflet-popup-tip-container {
    display: none !important;
}

.municipio-popup-fixed .leaflet-popup-close-button {
    color: #31344b !important;
    font-size: 20px !important;
    top: 8px !important;
    right: 12px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    text-align: center !important;
    padding: 0 !important;
}

.municipio-popup-fixed .leaflet-popup-close-button:hover {
    color: #e87a31 !important;
}

.popup-content-fixed {
    padding: 15px;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.popup-header i {
    color: #3498db;
    font-size: 18px;
}

.popup-header-title {
    color: #31344b !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.popup-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
}

.popup-info-row:last-child {
    border-bottom: none;
}

.popup-info-label {
    color: #555 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.popup-info-value {
    color: #3498db !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.popup-info-value.sin-datos {
    color: #e87a31 !important;
    font-style: italic;
}

/* ========================================
   SIDEBAR IZQUIERDO
   ======================================== */

.side_bar {
    position: absolute;
    top: 0;
    left: -100%;
    width: 360px;
    height: 100vh;
    background: #ecf0f3;
    padding: 15px;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1,
                inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1;
    transition: all 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
}

.side_bar .title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 0 5px;
    margin-bottom: 10px;
}

/* .side_bar .title .logo {
    font-size: 27px;
    font-weight: 600;
    color: #31344b;
} */

.side_bar ul {
    margin-top: 10px;
    list-style: none;
    padding: 0;
}

.side_bar ul li {
    margin-bottom: 8px;
}

.side_bar ul a {
    color: #31344b;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1;
    position: relative;
    transition: all 0.2s ease;
}

.side_bar ul a i {
    margin-right: 12px;
    font-size: 20px;
    color: #3498db;
    width: 24px;
    text-align: center;
}

.side_bar ul a:hover {
    color: #3498db;
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1;
}

.side_bar ul a:hover i {
    color: #2980b9;
}

.side_bar ul a:active {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1;
}

label {
    font-size: 20px;
    color: #101427;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1;
    height: 40px;
    width: 40px;
    min-width: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* .btn-circular {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    line-height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}*/

label:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1;
    color: #3498db;
} 

#check {
    display: none;
}

.bars {
    position: absolute;
    left: 15px;
    top: 15px;
    font-size: 20px !important;
    color: #101427;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1;
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    text-align: center;
    line-height: 40px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ecf0f3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2001 !important;
}

.bars:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1;
    color: #3498db;
}

#check:checked ~ .side_bar {
    left: 0;
}

/* ========================================
   SIDEBAR DERECHO
   ======================================== */

#check-right {
    display: none;
}

.bars-right {
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 2001;
    transition: opacity 0.3s ease;
    font-size: 20px !important;
    color: #101427;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1;
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    text-align: center;
    line-height: 40px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ecf0f3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.bars-right:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1;
    color: #3498db;
}

/* Ocultar botón de abrir cuando el sidebar está abierto */
#check-right:checked ~ .bars-right {
    display: none;
}

.side_bar_right {
    position: absolute;
    top: 0;
    right: -100%;
    width: 410px;
    height: 100vh;
    background: #ecf0f3;
    padding: 15px;
    box-shadow: 3px -3px 7px #ffffff,
                -3px 3px 5px #ceced1,
                inset 3px -3px 7px #ffffff,
                inset -3px 3px 5px #ceced1;
    transition: all 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
}

.side_bar_right::-webkit-scrollbar {
    display: none !important;
}

.side_bar_right {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

#check-right:checked ~ .side_bar_right {
    right: 0;
}

.title_right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d1d1d1;
}

.title_right h3 {
    font-size: 18px;
    font-weight: 600;
    color: #31344b;
    margin: 0;
}

.title_right h3 i {
    margin-right: 8px;
    color: #3498db;
}

.btn-circular-right {
    height: 40px;
    width: 40px;
    line-height: 40px;
    font-size: 20px;
}

.selector-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.selector-container label {
    font-size: 15px;
    font-weight: 500;
    color: #31344b;
    box-shadow: none;
    height: auto;
    width: auto;
    border-radius: 0;
    text-align: left;
    margin-bottom: -5px;
}

.selector-container label i {
    margin-right: 6px;
    font-size: 18px;
    vertical-align: middle;
}

.selector-select {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: #ecf0f3;
    color: #31344b;
    font-size: 14px;
    font-weight: 400;
    box-shadow: inset -2px -2px 5px #ffffff,
                inset 2px 2px 4px #c5c5c8;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.selector-select:focus {
    box-shadow: inset -3px -3px 6px #ffffff,
                inset 3px 3px 5px #c5c5c8;
}

.selector-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #d0d0d0;
}

.indicadores-lista {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 5px;
}

.indicadores-lista::-webkit-scrollbar {
    display: none !important;
}

.placeholder-text {
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 20px 10px;
    font-style: italic;
}

.placeholder-text i {
    margin-right: 5px;
}

.indicador-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #ecf0f3;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #c5c5c8;
    transition: all 0.2s ease;
}

.indicador-item:hover {
    box-shadow: inset -2px -2px 4px #ffffff,
                inset 2px 2px 3px #c5c5c8;
}

.indicador-item.active {
    background: #3498db;
    color: white;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.1),
                inset 2px 2px 3px rgba(0,0,0,0.1);
}

.indicador-item .indicador-codigo {
    font-weight: 600;
    font-size: 13px;
    min-width: 70px;
    margin-right: 10px;
}

.indicador-item .indicador-nombre {
    font-size: 12px;
    flex: 1;
}

.indicador-item.active .indicador-codigo,
.indicador-item.active .indicador-nombre {
    color: white;
}

.mapa-info {
    margin-top: 15px;
    padding: 12px;
    background: #ecf0f3;
    border-radius: 8px;
    box-shadow: inset -2px -2px 5px #ffffff,
                inset 2px 2px 4px #c5c5c8;
}

.mapa-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #31344b;
    margin-bottom: 10px;
    border-bottom: 1px solid #d1d1d1;
    padding-bottom: 8px;
}

.mapa-info h4 i {
    margin-right: 6px;
    color: #3498db;
}

.mapa-info p {
    font-size: 13px;
    color: #555;
    margin: 5px 0;
}

.mapa-info p:first-of-type {
    font-weight: 600;
    color: #3498db;
}

/* ========================================
   PANEL DE COORDENADAS
   ======================================== */

.panel-coord {
    position: fixed;
    bottom: 21px;
    left: 50%;
    transform: translateX(-50%);
    background: #ecf0f3e8;
    padding: 5px 18px;
    border-radius: 15px;
    z-index: 1000;
    font-size: 12px;
    color: #31344b;
    font-weight: 500;
    min-width: 280px;
    white-space: nowrap;
    /* box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1,
                inset -1px -1px 3px #ffffff,
                inset 1px 1px 2px #ceced1; */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    border: none;
}

.panel-coord-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.panel-coord-icon {
    color: #3498db;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.panel-coord-label {
    color: #7f8c8d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-coord-value {
    color: #3498db;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.panel-coord-divider {
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d1d1, transparent);
    margin: 2px 0;
}

/* ========================================
   MODALES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #ecf0f3;
    margin: 3% auto;
    padding: 0;
    border-radius: 15px;
    box-shadow: -5px -5px 15px #ffffff,
                5px 5px 10px #bebebe;
    max-width: 90%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
                opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-content {
    width: 400px;
    max-width: 95%;
}

.edit-content {
    width: 700px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: auto;
}

.edit-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.edit-content::-webkit-scrollbar-track {
    background: #ecf0f3;
    border-radius: 4px;
}

.edit-content::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.close-login,
.close-edit {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-login:hover,
.close-edit:hover {
    color: #e87a31;
}

.login-header {
    text-align: center;
    padding: 25px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.login-logo {
    width: 120px;
    margin-bottom: 10px;
}

.login-header h2 {
    color: #31344b;
    font-size: 22px;
    font-weight: 600;
    margin: 10px 0 0;
}

#login-form {
    padding: 25px 30px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    margin-left: 20px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #31344b;
    margin-bottom: 8px;
    box-shadow: none;
    height: auto;
    width: auto;
    border-radius: 0;
    text-align: left;
}

.form-group label i {
    margin-right: 6px;
    color: #3498db;
}

.form-group input {
    width: 90%;
    margin: 20px;
    text-align: center;
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    background: #ecf0f3;
    color: #31344b;
    font-size: 14px;
    box-shadow: inset -3px -3px 6px #ffffff,
                inset 3px 3px 5px #c5c5c8;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    box-shadow: inset -4px -4px 8px #ffffff,
                inset 4px 4px 6px #b5b5b8;
}

.btn-login {
    width: 90%;
    margin: 20px;
    text-align: center;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #3498db;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #b5b5b8;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.1),
                inset 2px 2px 3px rgba(0,0,0,0.1);
}

.error-message {
    color: #e87a31;
    font-size: 13px;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
}

/* Edit Modal */

.edit-header {
    text-align: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.edit-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.edit-header h2 i {
    margin-right: 8px;
    color: #3498db;
}

.edit-header p {
    color: #3498db;
    font-size: 16px;
    font-weight: 500;
    margin: 8px 0 0;
}

.edit-fields-container {
    padding: 20px 25px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 200px;
    white-space: nowrap;
}

/* Scrollbar horizontal visible */
.edit-fields-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.edit-fields-container::-webkit-scrollbar-track {
    background: #d0d0d0;
    border-radius: 6px;
}

.edit-fields-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 6px;
    border: 2px solid #d0d0d0;
}

.edit-fields-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.edit-fields-container::-webkit-scrollbar-corner {
    background: #d0d0d0;
}

/* Firefox scrollbar */
.edit-fields-container {
    scrollbar-width: auto;
    scrollbar-color: #3498db #d0d0d0;
}

/* Contenedor interno para permitir scroll horizontal */
.edit-fields-inner {
    display: inline-block;
    min-width: max-content;
    padding-right: 25px;
    vertical-align: top;
}

/* Clase compartida para scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #d0d0d0;
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 6px;
    border: 2px solid #d0d0d0;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.custom-scrollbar::-webkit-scrollbar-corner {
    background: #d0d0d0;
}

.custom-scrollbar {
    scrollbar-width: auto;
    scrollbar-color: #3498db #d0d0d0;
}

.edit-field-group {
    margin-bottom: 18px;
    padding: 12px 15px;
    background: #ecf0f3;
    border-radius: 10px;
    box-shadow: -2px -2px 5px #ffffff,
                2px 2px 4px #c5c5c8;
    display: inline-block;
    min-width: 180px;
    margin-right: 15px;
    vertical-align: top;
}

.edit-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    box-shadow: none;
    height: auto;
    width: auto;
    border-radius: 0;
    text-align: left;
}

.edit-field-group input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: #ecf0f3;
    color: #31344b;
    font-size: 14px;
    box-shadow: inset -2px -2px 4px #ffffff,
                inset 2px 2px 3px #c5c5c8;
    outline: none;
    transition: all 0.2s ease;
}

.edit-field-group input:focus {
    box-shadow: inset -3px -3px 5px #ffffff,
                inset 3px 3px 4px #b5b5b8;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 15px 25px 20px;
    border-top: 1px solid #d1d1d1;
}

.btn-cancel-edit,
.btn-save-edit {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-edit {
    background: #95a5a6;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-cancel-edit:hover {
    background: #7f8c8d;
}

.btn-save-edit {
    background: #2ecc71;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-save-edit:hover {
    background: #2284d3;
    transform: translateY(-2px);
}

.btn-save-edit:active {
    transform: translateY(0);
}

.edit-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.edit-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.edit-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

/* ========================================
   ESTILOS MENSAJES DE ÉXITO
   ======================================== */

.success-message {
    color: #2284d3;
    font-size: 13px;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
}

/* Botón recovery más pequeño */
#forgot-password-form .btn-login {
    padding: 10px 16px;
    font-size: 13px;
    margin-top: 5px;
}

#forgot-password-form .btn-login i {
    font-size: 12px;
    margin-right: 5px;
}

/* Close button forgot password */
.close-forgot-password {
    position: absolute;
    top: 8px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 100;
}

.close-forgot-password:hover {
    color: #e87a31;
}

/* Asegurar que el contenido del modal de recuperación tenga position relative */
#forgot-password-modal .modal-content {
    position: relative;
}

/* ========================================
   LEYENDA
   ======================================== */

.legend {
    position: fixed;
    bottom: 110px;
    right: 20px;
    background: #ecf0f3;
    padding: 12px 15px;
    border-radius: 25px;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1;
    z-index: 1000;
    min-width: 140px;
}

/* Mensaje Sin Datos */
.sin-datos {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f39c12;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    box-shadow: -3px -3px 7px rgba(0,0,0,0.1),
                3px 3px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.sin-datos i {
    margin-right: 8px;
}

.legend h4 {
    font-size: 13px;
    font-weight: 600;
    color: #31344b;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d1d1d1;
}

.legend h4 i {
    margin-right: 5px;
    color: #3498db;
}

.legend-scale {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.2);
}

.legend-label {
    font-size: 12px;
    color: #555;
}

/* ========================================
   BOTÓN MOSTRAR TABLA
   ======================================== */

.btn-mostrar-tabla {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 10px;
    background: #3498db;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #b5b5b8;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-mostrar-tabla:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-mostrar-tabla i {
    font-size: 16px;
}

/* ========================================
   SELECTOR DE MUNICIPIO
   ======================================== */

.municipio-selector {
    margin-top: 15px;
    padding-top: 15px;
    /* border-top: 2px solid #d1d1d1; */
}

.municipio-selector label {
    font-size: 15px;
    font-weight: 500;
    color: #31344b;
    box-shadow: none;
    height: auto;
    width: auto;
    border-radius: 0;
    text-align: left;
    margin-bottom: 8px;
    display: block;
}

.municipio-selector label i {
    margin-right: 6px;
    color: #3498db;
}

.datos-municipio {
    margin-top: 15px;
    padding: 12px;
    background: #ecf0f3;
    border-radius: 8px;
    box-shadow: inset -2px -2px 5px #ffffff,
                inset 2px 2px 4px #c5c5c8;
    max-height: 300px;
    overflow-y: auto;
}

.datos-municipio h4 {
    font-size: 14px;
    font-weight: 600;
    color: #31344b;
    margin-bottom: 10px;
    border-bottom: 1px solid #d1d1d1;
    padding-bottom: 8px;
}

.datos-municipio h4 i {
    margin-right: 6px;
    color: #3498db;
}

.datos-municipio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.datos-municipio-header h4 {
    margin: 0;
    flex: 1;
}

.btn-export-pdf {
    background: #e87a31;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-export-pdf:hover {
    background: #b73425;
    transform: translateY(-2px);
    cursor: pointer;
}

.btn-export-pdf i {
    margin-right: 5px;
}

.dato-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #ffffff;
    border-radius: 6px;
    font-size: 12px;
    gap: 4px;
}

.dato-item .dato-campo {
    color: #555;
    font-weight: 500;
    font-size: 11px;
}

.dato-item .dato-valor {
    color: #3498db;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.dato-item .dato-codigo {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    font-style: italic;
}

.dato-item .dato-codigo-inline {
    font-size: 10px;
    color: #888;
    font-style: italic;
    font-weight: 400;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
}

/* Fila de población con código INE al lado */
.dato-item.dato-item-poblacion {
    flex-direction: row;
    align-items: stretch;
    gap: 15px;
}

.dato-item.dato-item-poblacion .poblacion-container,
.dato-item.dato-item-poblacion .codigo-ine-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 6px;
}

.dato-item.dato-item-poblacion .poblacion-container .dato-campo,
.dato-item.dato-item-poblacion .codigo-ine-container .dato-codigo-label {
    color: #555;
    font-weight: 500;
    font-size: 11px;
    margin-bottom: 4px;
}

.dato-item.dato-item-poblacion .poblacion-container .dato-valor,
.dato-item.dato-item-poblacion .codigo-ine-container .dato-codigo-numero {
    color: #3498db;
    font-weight: 600;
    font-size: 14px;
}

/* Estilos para la comparación con la media */
.dato-comparacion {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    display: block;
    margin-top: 2px;
}

.dato-comparacion.comparacion-alta {
    color: #2284d3;
    background: rgba(39, 174, 96, 0.1);
}

.dato-comparacion.comparacion-media {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.dato-comparacion.comparacion-baja {
    color: #e87a31;
    background: rgba(231, 76, 60, 0.1);
}

/* ========================================
   MODAL TABLA DE DATOS
   ======================================== */

.tabla-modal-content {
    width: 95% !important;
    max-width: 1200px !important;
    max-height: 90vh !important;
}

.tabla-container {
    padding: 20px;
    overflow: auto;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
}

/* Scrollbar visible para la tabla */
.tabla-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.tabla-container::-webkit-scrollbar-track {
    background: #d0d0d0;
    border-radius: 6px;
}

.tabla-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 6px;
    border: 2px solid #d0d0d0;
}

.tabla-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.tabla-container::-webkit-scrollbar-corner {
    background: #d0d0d0;
}

/* Firefox */
.tabla-container {
    scrollbar-width: auto;
    scrollbar-color: #3498db #d0d0d0;
}

.tabla-datos {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: white;
}

.tabla-datos th,
.tabla-datos td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.tabla-datos th {
    background: #3498db;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.tabla-datos tr:nth-child(even) {
    background: #f8f9fa;
}

.tabla-datos tr:hover {
    background: #e8f4f8;
}

.tabla-datos td {
    min-width: 60px;
}

.tabla-datos td:first-child {
    font-weight: 600;
    background: #ecf0f3;
    position: sticky;
    left: 0;
    z-index: 5;
}

.tabla-datos td input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 11px;
    background: white;
}

.tabla-datos td input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.3);
}

.tabla-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #d1d1d1;
    background: #ecf0f3;
    border-radius: 15px 15px 0 0;
}

.tabla-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.tabla-header h2 i {
    margin-right: 8px;
    color: #3498db;
}

.btn-guardar-tabla {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #2ecc71;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-guardar-tabla:hover {
    background: #2284d3;
}

.btn-cerrar-tabla {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #95a5a6;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.btn-cerrar-tabla:hover {
    background: #7f8c8d;
}

.tabla-actions {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #d1d1d1;
    background: #ecf0f3;
    border-radius: 0 0 15px 15px;
}

.tabla-message {
    text-align: center;
    padding: 10px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.tabla-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.tabla-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

.tabla-editar-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: white;
    font-size: 11px;
    cursor: pointer;
    margin-right: 4px;
}

.tabla-editar-btn:hover {
    background: #2980b9;
}

/* ========================================
   MODAL GESTIÓN DE CREENCIALES
   ======================================== */

.credentials-content {
    width: 450px;
    max-width: 95%;
}

.credentials-header {
    text-align: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.credentials-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.credentials-header h2 i {
    margin-right: 8px;
    color: #3498db;
}

#credentials-form {
    padding: 25px 30px;
}

.credentials-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.credentials-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.credentials-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

.close-credentials {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-credentials:hover {
    color: #e87a31;
}

.btn-cancel-credentials,
.btn-save-credentials {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-credentials {
    background: #95a5a6;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-cancel-credentials:hover {
    background: #7f8c8d;
}

.btn-save-credentials {
    background: #2ecc71;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-save-credentials:hover {
    background: #2284d3;
    transform: translateY(-2px);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .side_bar {
        width: 260px;
    }
    
    .side_bar ul a {
        font-size: 16px;
        padding: 8px 18px;
    }
    
    .side_bar .title .logo {
        font-size: 22px;
    }
    
    .bars {
        left: 15px;
        top: 15px;
        height: 42px;
        width: 42px;
        line-height: 42px;
        font-size: 20px;
    }
    
    .panel-coord {
        padding: 10px 15px;
        min-width: 180px;
        font-size: 10px;
        bottom: 10px;
    }
    
    .side_bar .title {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .side_bar .title .logo {
        text-align: center;
    }
    
    .side_bar .title .btn-circular {
        position: absolute;
        left: 10px;
        top: 10px;
    }
    
    .side_bar_right {
        width: 280px;
    }
    
    .bars-right {
        right: 10px;
        top: 10px;
        height: 42px;
        width: 42px;
        line-height: 42px;
        font-size: 18px;
    }
    
    .login-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .edit-content {
        width: 95%;
        margin: 5% auto;
    }
    
    /* Popup fijo en móvil */
    .municipio-popup-fixed {
        top: 15px !important;
        right: 15px !important;
        left: 15px !important;
        max-width: none !important;
    }
}

@media (max-width: 480px) {
    .side_bar {
        width: 85%;
        max-width: 320px;
    }
    
    .side_bar_right {
        width: 90%;
        max-width: 320px;
    }
    
    #check:checked ~ .side_bar {
        left: 0;
    }
    
    #check-right:checked ~ .side_bar_right {
        right: 0;
    }
    
    .side_bar ul a {
        font-size: 15px;
        padding: 12px 20px;
    }
    
    .title_right h3 {
        font-size: 16px;
    }
    
    .selector-select {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .indicador-item {
        padding: 8px 10px;
    }
    
    .indicador-item .indicador-codigo {
        font-size: 12px;
        min-width: 55px;
    }
    
    .indicador-item .indicador-nombre {
        font-size: 11px;
    }
    
    .panel-coord {
        padding: 2px 20px;
        min-width: 220px;
        font-size: 11px;
    }
    
    .bars {
        left: 12px;
        top: 12px;
        height: 44px;
        width: 44px;
        line-height: 44px;
        font-size: 22px;
        background: #ecf0f3;
        box-shadow: -4px -4px 8px #ffffff,
                    4px 4px 6px #ceced1;
    }
    
    .bars-right {
        right: 12px;
        top: 12px;
        height: 44px;
        width: 44px;
        line-height: 44px;
        font-size: 20px;
        background: #ecf0f3;
        box-shadow: -4px -4px 8px #ffffff,
                    4px 4px 6px #ceced1;
    }
    
    .edit-content {
        width: 98%;
        margin: 2% auto;
        max-height: 90vh;
    }
    
    .edit-fields-container {
        padding: 15px;
    }
    
    .form-actions {
        padding: 12px 15px;
        flex-direction: column;
    }
    
    .btn-cancel-edit,
    .btn-save-edit {
        width: 100%;
    }
    
    .legend {
        bottom: 55px;
        left: 20px;
        padding: 8px 10px;
        min-width: 100px;
    }
    
    #check:checked ~ .map-container .legend,
    #check:checked ~ .legend {
        left: 260px;
    }
    
    .legend h4 {
        font-size: 12px;
    }
    
    .legend-label {
        font-size: 11px;
    }
    
    /* Popup fijo en móvil pequeño */
    .municipio-popup-fixed {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }
}

/* ========================================
   TOOLTIP HOVER MUNICIPIOS
   ======================================== */

.municipio-tooltip {
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid #3498db !important;
    border-radius: 6px !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
}

.municipio-tooltip::before {
    border-top-color: #3498db !important;
}

.leaflet-tooltip-top.municipio-tooltip::before {
    border-top-color: #3498db !important;
}

.leaflet-tooltip-bottom.municipio-tooltip::before {
    border-bottom-color: #3498db !important;
}

.leaflet-tooltip-left.municipio-tooltip::before {
    border-left-color: #3498db !important;
}

.leaflet-tooltip-right.municipio-tooltip::before {
    border-right-color: #3498db !important;
}

/* Efecto de brillo en el tooltip */
.municipio-tooltip:hover {
    background: rgba(52, 152, 219, 0.95) !important;
}

/* ========================================
   POPUP LEAFLET CON ESTILO UNIFICADO
   ======================================== */

.municipio-popup .leaflet-popup-content-wrapper {
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid #3498db !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
}

.municipio-popup .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.municipio-popup .leaflet-popup-tip {
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid #3498db !important;
}

.popup-content {
    padding: 10px 14px;
    min-width: 180px;
}

.popup-title {
    display: block;
    color: white !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center;
    margin-bottom: 5px;
}

.popup-divider {
    height: 1px;
    background: rgba(52, 152, 219, 0.5);
    margin: 8px 0;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.popup-label {
    color: #aaa !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.popup-value {
    color: #3498db !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* ========================================
   MODAL GESTIÓN DE USUARIOS
   ======================================== */

.users-content {
    width: 600px;
    max-width: 95%;
    max-height: 80vh;
}

.users-header {
    text-align: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.users-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.users-header h2 i {
    margin-right: 8px;
    color: #3498db;
}

.users-toolbar {
    padding: 15px 20px;
    border-bottom: 1px solid #d1d1d1;
}

.btn-add-user {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #2ecc71;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-user:hover {
    background: #2284d3;
    transform: translateY(-2px);
}

.btn-add-user i {
    font-size: 14px;
}

.users-list {
    padding: 15px 20px;
    max-height: 400px;
    overflow-y: auto;
}

.users-list::-webkit-scrollbar {
    width: 8px;
}

.users-list::-webkit-scrollbar-track {
    background: #d0d0d0;
    border-radius: 4px;
}

.users-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #c5c5c8;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #31344b;
}

.user-role {
    font-size: 12px;
    color: #888;
}

.user-role.administrador {
    color: #e87a31;
}

.user-role.usuario {
    color: #3498db;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-edit-user,
.btn-delete-user,
.btn-change-password {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit-user {
    background: #3498db;
    color: white;
}

.btn-edit-user:hover {
    background: #2980b9;
}

.btn-change-password {
    background: #f39c12;
    color: white;
}

.btn-change-password:hover {
    background: #e67e22;
}

.btn-delete-user {
    background: #e87a31;
    color: white;
}

.btn-delete-user:hover {
    background: #e03030;
}

.users-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.users-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.users-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

.close-users {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-users:hover {
    color: #e87a31;
}

/* ========================================
   MODAL FORMULARIO USUARIO
   ======================================== */

.user-form-content {
    width: 450px;
    max-width: 95%;
}

.user-form-header {
    text-align: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.user-form-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.user-form-header h2 i {
    margin-right: 8px;
    color: #3498db;
}

#user-form {
    padding: 25px 30px;
}

.user-form-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.user-form-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.user-form-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

.close-user-form {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-user-form:hover {
    color: #e87a31;
}

.btn-cancel-user-form,
.btn-save-user {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-user-form {
    background: #95a5a6;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-cancel-user-form:hover {
    background: #7f8c8d;
}

.btn-save-user {
    background: #2ecc71;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-save-user:hover {
    background: #2284d3;
    transform: translateY(-2px);
}

/* ========================================
   MODAL CAMBIAR CONTRASEÑA USUARIO
   ======================================== */

.user-password-content {
    width: 450px;
    max-width: 95%;
}

.user-password-header {
    text-align: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.user-password-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.user-password-header h2 i {
    margin-right: 8px;
    color: #3498db;
}

.user-password-header p {
    color: #3498db;
    font-size: 16px;
    font-weight: 500;
    margin: 8px 0 0;
}

#user-password-form {
    padding: 25px 30px;
}

.user-password-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.user-password-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.user-password-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

.close-user-password {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-user-password:hover {
    color: #e87a31;
}

.btn-cancel-user-password,
.btn-save-user-password {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-user-password {
    background: #95a5a6;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-cancel-user-password:hover {
    background: #7f8c8d;
}

.btn-save-user-password {
    background: #2ecc71;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-save-user-password:hover {
    background: #2284d3;
    transform: translateY(-2px);
}

/* ========================================
   MODAL CAMBIAR ROL USUARIO
   ======================================== */

.user-role-content {
    width: 450px;
    max-width: 95%;
}

.user-role-header {
    text-align: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d1d1d1;
}

.user-role-header h2 {
    color: #31344b;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.user-role-header h2 i {
    margin-right: 8px;
    color: #9b59b6;
}

.user-role-header p {
    color: #3498db;
    font-size: 16px;
    font-weight: 500;
    margin: 8px 0 0;
}

.user-role-header p strong {
    color: #2c3e50;
}

#user-role-form {
    padding: 25px 30px;
}

.user-role-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0 0 15px 15px;
}

.user-role-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2284d3;
}

.user-role-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e03030;
}

.close-user-role {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-user-role:hover {
    color: #e87a31;
}

.btn-cancel-user-role,
.btn-save-user-role {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-user-role {
    background: #95a5a6;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-cancel-user-role:hover {
    background: #7f8c8d;
}

.btn-save-user-role {
    background: #9b59b6;
    color: white;
    box-shadow: -2px -2px 4px #ffffff,
                2px 2px 3px #b5b5b8;
}

.btn-save-user-role:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

/* ========================================
   POPUP FIJO - ESTILOS PARA BOTON CERRAR
   ======================================== */

.popup-fijo-close {
    height: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    line-height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: #ecf0f3 !important;
    border: none !important;
    color: #e87a31 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1 !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    margin-left: 8px;
}

.popup-fijo-close:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1 !important;
    color: #e03030 !important;
}

.popup-fijo-close:active {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1 !important;
}

/* Popup fijo main container */
.popup-fijo {
    background: #ecf0f3 !important;
    border-radius: 12px !important;
    /* box-shadow: -5px -5px 15px #ffffff,
                5px 5px 10px #bebebe !important; */
}

.popup-fijo-header {
    background: #3498db !important;
}


.popup-fijo-content {
    background: #ecf0f3 !important;
}

/* Scrollbar para popup fijo */
#popup-fijo-municipio::-webkit-scrollbar { width: 6px; }
#popup-fijo-municipio::-webkit-scrollbar-track { background: #f1f1f1; }
#popup-fijo-municipio::-webkit-scrollbar-thumb { background: #3498db; border-radius: 3px; }
#popup-fijo-municipio::-webkit-scrollbar-thumb:hover { background: #2980b9; }

.popup-fijo-header .popup-fijo-close {
    height: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    line-height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: #ecf0f3 !important;
    border: none !important;
    color: #e87a31 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1 !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    margin-left: 8px;
}

.popup-fijo-header .popup-fijo-close:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1 !important;
    color: #e03030 !important;
}

/* ========================================
   BOTON CERRAR SIDEBAR
   ======================================== */

.btn-circular.close-btn {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    line-height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: #ecf0f3 !important;
    margin-bottom: 110px;
    border: none !important;
    color: #e87a31 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1 !important;
    transition: all 0.2s ease !important;
}

.btn-circular.close-btn:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1 !important;
    color: #e03030 !important;
}

.btn-circular.close-btn:active {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1 !important;
}

/* ========================================
   BOTON ABRIR SIDEBAR (BAJO EL SIDEBAR)
   ======================================== */

#btn-open-sidebar {
    position: fixed !important;
    left: 15px !important;
    top: 15px !important;
    z-index: 1999 !important;
    font-size: 20px !important;
    color: #101427 !important;
    box-shadow: -3px -3px 7px #ffffff,
                3px 3px 5px #ceced1 !important;
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    text-align: center !important;
    line-height: 40px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: #ecf0f3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
}

#btn-open-sidebar:hover {
    box-shadow: inset -3px -3px 7px #ffffff,
                inset 3px 3px 5px #ceced1 !important;
    color: #3498db !important;
}

/* ========================================
   BOTON CAMBIAR ROL EN LA LISTA DE USUARIOS
   ======================================== */

/* Boton de cambiar rol en la lista de usuarios */
.btn-change-role {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-change-role:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
}

.btn-change-role i {
    margin: 0;
}
 
/* Estilo base para valores del popup - permite override inline */
.popup-fijo-value {
    color: #3498db;
}

/* Popup de Mancomunidad en color verde */
.popup-fijo-header.popup-verde {
    background: #27ae60 !important;
    border-bottom: 2px solid #1e8449 !important;
}

/* Borde superior verde para popup mancomunidad */
#popup-fijo-mancomunidad {
    border-top: 4px solid #27ae60 !important;
}

