html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}



/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* LAYOUT */
body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: #1e1e2f;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    font-size: 20px;
    background: #151521;
}

.sidebar-menu {
    flex: 1;
    padding: 10px;
}

.menu-item {
    display: block;
    padding: 12px 16px;
    color: #cfd2dc;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: background 0.2s;
}

    .menu-item:hover {
        background: #2a2a40;
        color: #fff;
    }

.sidebar-footer {
    padding: 10px;
}

.logout {
    background: #b00020;
    color: #fff;
}

    .logout:hover {
        background: #d32f2f;
    }

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: #f4f6f9;
}

/*.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #f4f6f9;
}*/


.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.kpi-value {
    font-size: 32px;
    font-weight: bold;
    color: #4f46e5;
}

.kpi-label {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}


.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


#map {
    width: 100%;
    height: 320px;
    border-radius: 10px;
}


canvas {
    width: 100% !important;
    height: 280px !important;
}


/* TOPBAR */
/*.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}*/

.topbar {
    height: 64px;
    background: #ffffff;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
}

/*.topbar {
    height: 64px;
    background: linear-gradient(90deg, #1e1e2f, #2a2a40);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 20px;
}
*/

/* BORRAR */
/*.topbar {
    height: 64px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}*/

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

/*.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}
*/
/* BORRAR */
/*.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}*/

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    color: #374151;
}

/*.user-name {
    font-size: 14px;
    color: #374151;
}
*/
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* CONTENT */
.page-content {
    padding: 24px;
    margin-top: 38px;
}

/* HAMBURGER */
.menu-toggle {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: #111827;
}


/*.menu-toggle {
    color: #ffffff;
}*/

/*.menu-toggle {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
}*/

/* RESPONSIVE */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }
}


/* SIDEBAR COLLAPSED */
.sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
    z-index: 1000;
}



/* SECONDARY METRICS */
.dashboard-secondary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.metric-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    font-size: 14px;
}

/* Icon */
.metric-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

/* Value */
.metric-value {
    font-size: 22px;
    font-weight: 600;
}

/* Label */
.metric-label {
    color: #6b7280;
    margin-top: 4px;
}

/* SEMÁFOROS */
.metric-card.success {
    border-left: 5px solid #22c55e;
}

.metric-card.warning {
    border-left: 5px solid #facc15;
}

.metric-card.danger {
    border-left: 5px solid #ef4444;
}

.metric-card.info {
    border-left: 5px solid #3b82f6;
}