.dashboard-layout {

    display: flex;

    min-height: 100vh;

}
/* =========================
   GRID
========================= */

.dashboard-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 20px;

    margin-top: 20px;

}

/* =========================
   CARDS
========================= */

.dashboard-card {
    background: var(--color-card);
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: 0.2s ease;
}

/* =========================
   HOVER
========================= */

.dashboard-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37,99,235,0.35);
    box-shadow: var(--glow-primary);
}

.dashboard-card h3 {
    margin-bottom: 10px;
    color: var(--color-dark);
}

.dashboard-card p {
    font-size: 26px;
    font-weight: bold;
    margin-top: 10px;
}

/* =========================
   CARD HEADER
========================= */

.card-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;

}

.card-header h3 {
    font-size: 18px;
    color: var(--color-white);
}

.card-header i {
    font-size: 26px;
}

/* =========================
   CARD VALUE
========================= */

.dashboard-card p {
    font-size: 32px;
    font-weight: bold;
}

/* =========================
   DEVICE CARD
========================= */

.dashboard-card.devices {

    border-top: 4px solid var(--color-primary);

}

.dashboard-card.devices p {

    color: var(--color-primary-light);

}

/* =========================
   ALERT CARD
========================= */

.dashboard-card.alerts {
    border-top: 4px solid var(--color-danger);
}

.dashboard-card.alerts p {
    color: var(--color-danger);
}

/* =========================
   MQTT CARD
========================= */

.dashboard-card.mqtt {
    border-top: 4px solid var(--color-success);
}

.dashboard-card.mqtt p {
    color: var(--color-success);
}

/* =========================
   CONTENT
========================= */

.dashboard-content {
    padding: 20px;
    margin-left:240px;
}

/* =========================
   HEADER
========================= */

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--color-dark);
}

.dashboard-header p {
    color: var(--color-text-muted);
    font-size: 15px;
}

/* =========================
   PANELS
========================= */

.dashboard-panels {

    display: grid;

    grid-template-columns: 1fr;

    gap: 20px;

    margin-top: 20px;

}

/* =========================
   PANEL
========================= */

.panel {

    background: var(--color-card);

    border: 1px solid var(--color-border);

    border-radius: var(--radius-md);

    padding: 18px;

}

/* =========================
   PANEL TITLE
========================= */

.panel-title {

    font-size: 16px;

    font-weight: 600;

    margin-bottom: 18px;

    color: var(--color-white);

}

/* =========================
   ACTIVITY
========================= */

.activity-item {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 14px;

    color: var(--color-text-muted);

    font-size: 14px;

}

/* =========================
   STATUS
========================= */

.status {

    width: 10px;

    height: 10px;

    border-radius: 50%;

}

.status.online {

    background: var(--color-success);

}

.status.alert {

    background: var(--color-danger);

}

/* =========================
   TABLE
========================= */

.devices-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.devices-table th {

    text-align: left;

    padding-bottom: 14px;

    color: var(--color-text-muted);

    font-size: 13px;

}

.devices-table td {
    padding: 14px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
}

/* =========================
   BADGES
========================= */

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.online {
    background: rgba(34,197,94,0.15);
    color: var(--color-success);
}

.badge.offline {
    background: rgba(239,68,68,0.15);
    color: var(--color-danger);
}

.badge.reconnecting {
    background: rgba(59,130,246,0.15);
    color: #3B82F6;
}

.badge-warning {
    background: #f59e0b !important;
    color: #ffffff !important;
    border: 1px solid #f59e0b;
}
.badge-warning:hover {
    background: #d97706 !important;
}

/* =========================
CHART PANEL
========================= */

.chart-panel {
    margin-top: 20px;
    height: 320px;
}

#powerChart {
    width: 100% !important;
    height: 240px !important;

}/* =========================
EMPTY STATE
========================= */

.empty-state {

    background: var(--color-card);

    border: 1px solid var(--color-border);

    border-radius: var(--radius-md);

    padding: 40px;

    text-align: center;

}

.empty-state h2 {

    margin-bottom: 12px;

}

.empty-state p {

    margin-bottom: 25px;

}

/* =========================
PRIMARY BUTTON
========================= */

.primary-button {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: 0.2s ease;
}

.primary-button:hover {
    box-shadow: var(--glow-primary);
}

/* =========================
SITES GRID
========================= */

.sites-grid {
    display: grid;
    grid-template-columns:
    repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* =========================
SITE CARD
========================= */

.site-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px;
    transition: 0.2s ease;
    cursor: pointer;
}

.site-card:hover {
    border-color: rgba(37,99,235,0.35);
    box-shadow: var(--glow-primary);
}

/* =========================
SITE TOP
========================= */

.site-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

/* =========================
SETTINGS
========================= */

.site-settings {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 16px;
}

/* =========================
MODAL
========================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
MODAL BOX
========================= */

.modal {
    width: 100%;
    max-width: 420px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    transform: translateY(30px);
    opacity: 0;
    transition: 0.25s ease;
}
.modal-overlay.active .modal {
    transform: translateY(0);
    opacity: 1;
}

/* =========================
HEADER
========================= */

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* =========================
CLOSE
========================= */

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 18px;
}

/* =========================
FORM
========================= */

.modal form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal input,
.modal textarea {
    background: #0F172A;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
    color: var(--color-white);
    resize: none;
}/* =========================
SITE ACTIONS
========================= */

.site-actions {

    display: flex;

    justify-content: center;

    gap: 14px;

    margin-top: 25px;

}

/* =========================
SECONDARY BUTTON
========================= */

.secondary-button {

    background: transparent;

    border: 1px solid var(--color-border);

}

/* =========================
BREADCRUMB
========================= */

.breadcrumb {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 16px 20px 0 260px;

    font-size: 13px;

    color: var(--color-text-muted);
    

}

.breadcrumb a {

    transition: 0.2s ease;

}

.breadcrumb a:hover {

    color: var(--color-white);

}

/* =========================
DEVICE CARD
========================= */

.device-card {

    background: var(--color-card);

    border: 1px solid var(--color-border);

    border-radius: var(--radius-md);

    padding: 0px 20px 30px 20px;

}

/* =========================
DEVICE TOP
========================= */

.device-card-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;

}

/* =========================
DEVICE STATUS
========================= */

.device-status {

    display: inline-block;

    margin-top: 8px;

    font-size: 12px;

    color: var(--color-success);

}

/* =========================
METRICS
========================= */

.device-metrics {

    display: flex;

    gap: 30px;

}

/* =========================
METRIC
========================= */

.metric {

    display: flex;

    flex-direction: column;

    gap: 6px;

}

/* =========================
LABEL
========================= */

.metric-label {

    font-size: 12px;

    color: var(--color-text-muted);

}
/* =========================
SECTION TITLE
========================= */

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 10px;
}

/* =========================
DEVICES GRID
========================= */

.devices-grid {
    display: grid;
    grid-template-columns:
    repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
/* =========================
SITE ACTIONS BAR
========================= */

.site-actions-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 30px;
}
/* =========================
CONNECTING
========================= */

.device-connecting {
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* =========================
STATUS COLORS
========================= */

.device-status.connecting {
    color: #F59E0B;
}

.device-status.online {
    color: #10B981;
}

.device-status.offline {
    color: #EF4444;
}

/* =========================
MODAL SELECT
========================= */

.modal select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-sidebar);
    color: var(--color-white);
    font-size: 14px;
    outline: none;
    margin-bottom: 14px;
}

.modal select:focus {
    border-color: var(--color-primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-link {
    color: #ff7a00;
    text-decoration: none;
    transition: 0.2s;
}

.logout-link:hover {
    opacity: 0.7;
}

.navbar-separator {
    opacity: 0.5;
}

/*EFECTO VIDRIO*/

/* =========================
GLASS EFFECT
========================= */

.dashboard-card,
.panel,
.device-card,
.site-card,
.modal {

    background:
    rgba(10,14,24,0.38);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(14px);

    border:
        1px solid rgba(255,255,255,0.05);

    box-shadow:
        0 10px 35px rgba(0,0,0,0.18);

    position: relative;

    overflow: hidden;
}

.dashboard-card::before,
.panel::before,
.device-card::before,
.site-card::before,
.modal::before {

    content: '';

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.05),
            transparent
        );

    pointer-events: none;
}
@media (max-width: 900px) {
    .dashboard-content {
        padding: 20px;
        margin-top:0px;
        margin-left:0px;
    }.breadcrumb {
        padding: 16px 20px 0 20px;
    }.device-card{
        margin-right:0px;
    }
}

/* =========================
SENSOR LED
========================= */

.sensor-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 5px;
}

.sensor-led.online {
    background: #10B981;
    box-shadow:
        0 0 8px #10B981,
        0 0 15px #10B981;
}

.sensor-led.offline {
    background: #EF4444;
    box-shadow:
        0 0 8px #EF4444,
        0 0 15px #EF4444;
}

.sensor-led.reconnecting {
    background: #F59E0B;
    box-shadow:
        0 0 8px #F59E0B,
        0 0 15px #F59E0B;
}

/* =========================
GPS LED
========================= */

.gps-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 5px;
}

.gps-led.online {
    background: #10B981;
    box-shadow:
        0 0 8px #10B981,
        0 0 15px #10B981;
}

.gps-led.waiting {
    background: #3B82F6;
    box-shadow:
        0 0 8px #3B82F6,
        0 0 15px #3B82F6;
}

.gps-led.offline {
    background: #EF4444;
    box-shadow:
        0 0 8px #EF4444,
        0 0 15px #EF4444;
}
.gps-last-connection {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}
/* =========================
BADGES
========================= */

.sensor-badges {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.sensor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: rgba(255,255,255,0.03);
    font-size: 13px;
    transition: 0.2s ease;
}

.sensor-badge:hover {
    border-color: var(--color-primary);
}.sensor-link {
    display: block;
    text-decoration: none;
    color: inherit;
}/* =========================
VALOR PRINCIPAL SENSOR
========================= */

.device-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 25px;
    margin-bottom: 20px;
}

.sensor-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.sensor-unit {
    font-size: 18px;
    opacity: .7;
    font-weight: 500;
}

.badge-success {
    background: #16a34a;
    color: #fff;
}
button.sensor-badge {
    color: inherit;
    cursor: pointer;
    font-family: inherit;
}