/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* NavMenu scoped styles — MudBlazor handles all nav styling */
/* File giữ trống — tránh conflict với MudNavMenu */
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-h1rntiu6tw],
.components-reconnect-repeated-attempt-visible[b-h1rntiu6tw],
.components-reconnect-failed-visible[b-h1rntiu6tw],
.components-pause-visible[b-h1rntiu6tw],
.components-resume-failed-visible[b-h1rntiu6tw],
.components-rejoining-animation[b-h1rntiu6tw] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-retrying[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-failed[b-h1rntiu6tw],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-h1rntiu6tw] {
    display: block;
}


#components-reconnect-modal[b-h1rntiu6tw] {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-h1rntiu6tw 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-h1rntiu6tw 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-h1rntiu6tw 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-h1rntiu6tw]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-h1rntiu6tw 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-h1rntiu6tw {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-h1rntiu6tw {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-h1rntiu6tw {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-h1rntiu6tw] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-h1rntiu6tw] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-h1rntiu6tw] {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover[b-h1rntiu6tw] {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active[b-h1rntiu6tw] {
        background-color: #6b9ed2;
    }

.components-rejoining-animation[b-h1rntiu6tw] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-h1rntiu6tw] {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-h1rntiu6tw 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-h1rntiu6tw] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-h1rntiu6tw {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
/* /Components/Pages/Energy/EnergyDashboardPage.razor.rz.scp.css */
/* ── Energy Device Grid (layout only — card styles in EnergyCard.razor.css) ── */
.energy-device-grid[b-78oo2vehbp] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 400px));
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}
/* /Components/Pages/Machines/MachineDashboardPage.razor.rz.scp.css */
/* ── Machine Device Grid (layout only — card styles in MachineCard.razor.css) ── */
.machine-device-grid[b-4zvxu57tv1] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 400px));
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}
/* /Components/Shared/EnergyCard.razor.rz.scp.css */
/* ── Card ── */
.device-card[b-0p7zavqimb] {
    background: var(--mud-palette-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    transition: transform 0.15s, box-shadow 0.15s;
}
.device-card:hover[b-0p7zavqimb] {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.device-offline[b-0p7zavqimb] {
    opacity: 0.5;
}

/* ── Header: 1 dòng duy nhất ── */
.device-header[b-0p7zavqimb] {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 8px;
    min-height: 0;
}
.device-header-info[b-0p7zavqimb] {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.device-name[b-0p7zavqimb] {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.device-location[b-0p7zavqimb] {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.device-status-dot[b-0p7zavqimb] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Status variants (semantic colors — công nghiệp, giữ cố định) ── */
.status-running[b-0p7zavqimb] { background: #2e7d32; }
.status-running .device-status-dot[b-0p7zavqimb] {
    background: #fff;
    box-shadow: 0 0 5px rgba(255,255,255,0.6);
    animation: pulse-dot-b-0p7zavqimb 1.5s infinite;
}
.status-idle[b-0p7zavqimb] { background: #ef6c00; }
.status-idle .device-status-dot[b-0p7zavqimb] { background: #fff3e0; }
.status-offline[b-0p7zavqimb] { background: #90a4ae; }
.status-offline .device-status-dot[b-0p7zavqimb] { background: #cfd8dc; }

@keyframes pulse-dot-b-0p7zavqimb {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Body ── */
.device-body[b-0p7zavqimb] {
    padding: 12px 14px 10px;
}

/* ── Metrics Grid 2x3 ── */
.metrics-grid[b-0p7zavqimb] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.metric-item[b-0p7zavqimb] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
}
.metric-item.highlight[b-0p7zavqimb] {
    background: color-mix(in srgb, var(--mud-palette-success) 12%, var(--mud-palette-surface));
}
.metric-label[b-0p7zavqimb] {
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}
.metric-value[b-0p7zavqimb] {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    font-family: 'Roboto Mono', 'Consolas', monospace;
}
.metric-item.highlight .metric-value[b-0p7zavqimb] {
    color: var(--mud-palette-success);
}

/* ── Timestamp ── */
.device-timestamp[b-0p7zavqimb] {
    text-align: center;
    font-size: 0.7rem;
    color: var(--mud-palette-text-disabled);
    margin-top: 8px;
    line-height: 1;
}

.device-nodata[b-0p7zavqimb] {
    text-align: center;
    color: var(--mud-palette-text-disabled);
    padding: 24px 0;
    font-size: 0.9rem;
}
/* /Components/Shared/MachineCard.razor.rz.scp.css */
/* ── Card ── */
.device-card[b-aoqbol4elu] {
    background: var(--mud-palette-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    transition: transform 0.15s, box-shadow 0.15s;
}
.device-card:hover[b-aoqbol4elu] {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.device-offline[b-aoqbol4elu] {
    opacity: 0.5;
}

/* ── Header: 1 line ── */
.device-header[b-aoqbol4elu] {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    gap: 6px;
    min-height: 0;
}
.device-header-info[b-aoqbol4elu] {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    flex: 1;
}
.device-name[b-aoqbol4elu] {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.device-location[b-aoqbol4elu] {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.device-status-badge[b-aoqbol4elu] {
    font-size: 0.68rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Body ── */
.device-body[b-aoqbol4elu] {
    padding: 8px 10px 6px;
}

/* ── ACTUAL vs PLAN row ── */
.actual-plan-row[b-aoqbol4elu] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}
.actual-box[b-aoqbol4elu], .plan-box[b-aoqbol4elu] {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 4px;
    border-radius: 6px;
}
.actual-box[b-aoqbol4elu] { background: color-mix(in srgb, var(--mud-palette-success) 12%, var(--mud-palette-surface)); }
.plan-box[b-aoqbol4elu] { background: color-mix(in srgb, var(--mud-palette-error) 12%, var(--mud-palette-surface)); }
.actual-box .big-number[b-aoqbol4elu] {
    color: var(--mud-palette-success);
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    line-height: 1.1;
}
.plan-box .big-number[b-aoqbol4elu] {
    color: var(--mud-palette-error);
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    line-height: 1.1;
}
.box-label[b-aoqbol4elu] {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    letter-spacing: 0.5px;
}

/* ── Time row ── */
.time-row[b-aoqbol4elu] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 4px;
}
.time-item[b-aoqbol4elu] {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
    font-size: 0.75rem;
}
.time-label[b-aoqbol4elu] {
    flex: 1;
    font-size: 0.7rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.time-value[b-aoqbol4elu] {
    font-weight: 700;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    color: var(--mud-palette-primary);
    font-size: 0.82rem;
}

/* ── Sensors row ── */
.sensors-row[b-aoqbol4elu] {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
}
.sensor-item[b-aoqbol4elu] {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 2px;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
}
.sensor-label[b-aoqbol4elu] {
    font-size: 0.62rem;
    color: var(--mud-palette-text-disabled);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sensor-value[b-aoqbol4elu] {
    font-size: 0.92rem;
    font-weight: 700;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

/* ── Timestamp ── */
.device-timestamp[b-aoqbol4elu] {
    text-align: center;
    font-size: 0.65rem;
    color: var(--mud-palette-text-disabled);
    margin-top: 4px;
    line-height: 1;
}

.device-nodata[b-aoqbol4elu] {
    text-align: center;
    color: var(--mud-palette-text-disabled);
    padding: 16px 0;
    font-size: 0.85rem;
}

/* ── Temperature warnings ── */
.temp-warn[b-aoqbol4elu] {
    color: #ef6c00 !important;
}
.temp-high[b-aoqbol4elu] {
    color: #d32f2f !important;
}

/* ── Andon badge pulsing animation ── */
.andon-badge-pulse[b-aoqbol4elu] {
    animation: andon-pulse-b-aoqbol4elu 1.5s ease-in-out infinite;
}
@keyframes andon-pulse-b-aoqbol4elu {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
