@import '_content/BlazorStrap.V5/BlazorStrap.V5.soy3cwhzex.bundle.scp.css';
@import '_content/BlazorStrap/BlazorStrap.10v83wk5fb.bundle.scp.css';

/* /Layout/MainLayout.razor.rz.scp.css */
.page[b-wfkcejnd4o] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-wfkcejnd4o] {
    flex: 1;
}

.sidebar[b-wfkcejnd4o] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-wfkcejnd4o] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-wfkcejnd4o]  a, .top-row[b-wfkcejnd4o]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-wfkcejnd4o]  a:hover, .top-row[b-wfkcejnd4o]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-wfkcejnd4o]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-wfkcejnd4o] {
        justify-content: space-between;
    }

    .top-row[b-wfkcejnd4o]  a, .top-row[b-wfkcejnd4o]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-wfkcejnd4o] {
        flex-direction: row;
    }

    .sidebar[b-wfkcejnd4o] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-wfkcejnd4o] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-wfkcejnd4o]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-wfkcejnd4o], article[b-wfkcejnd4o] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

/* 回首頁漂浮按鈕 */
.fab-home-container[b-wfkcejnd4o] {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
}

.fab-home[b-wfkcejnd4o] {
    width: 56px;
    height: 56px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.fab-home:hover[b-wfkcejnd4o] {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.fab-home:active[b-wfkcejnd4o] {
    transform: scale(0.95);
}
/* /Layout/NavMenu.razor.rz.scp.css */
/* 文件：wwwroot/css/navmenu.css (最終布局樣式) */

/* 1. 布局核心：CSS Grid */
.page-grid[b-wpscpcgosd] {
    display: grid;
    grid-template-columns: 250px 1fr; /* Sidebar 寬度 250px */
    grid-template-rows: 60px 1fr; /* Header 高度 60px */
    height: 100vh;
    width: 100%;
}

.header[b-wpscpcgosd] {
    grid-column: 1 / 3; /* 頂部佔據全寬 */
    grid-row: 1;
    z-index: 1000;
    background-color: #2c3e50; /* 頂部背景色 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-area[b-wpscpcgosd] {
    grid-column: 1;
    grid-row: 2;
    background-color: #2c3e50; /* 側邊欄背景色 */
    overflow-y: auto;
}

.content-area[b-wpscpcgosd] {
    grid-column: 2;
    grid-row: 2;
    overflow-y: auto;
    padding-top: 1.1rem;
    background-color: #f8f9fa; /* 內容區淺色背景 */
}

/* 2. 側邊欄內部樣式 */

.top-row.ps-3.navbar.navbar-dark[b-wpscpcgosd] {
    background-color: #2c3e50 !important; /* 確保頂部 Navbar 顏色同步 */
    border-bottom: 1px solid #34495e;
}

.user-info[b-wpscpcgosd] {
    padding: 10px 1rem;
    background-color: #34495e; /* 用戶名底色 */
    color: white !important; /* 確保字體是白色 */
    font-size: 0.85rem;
    font-weight: 500;
}

.nav-link[b-wpscpcgosd] {
    color: #ecf0f1 !important; /* 確保連結顏色正確 */
}

    .nav-link:hover[b-wpscpcgosd] {
        background-color: #34495e !important;
        color: white !important;
    }

/* 3. 群組和折疊 */
.nav-group-toggle[b-wpscpcgosd] {
    all: unset;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    background-color: #2c3e50;
    color: white !important;
    padding: 0.75rem 1rem;
}

.nav-group-content[b-wpscpcgosd] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

    .nav-group-content.expanded[b-wpscpcgosd] {
        max-height: 2000px; /* 足夠容納約 50 個項目 */
        transition: max-height 0.3s ease-in;
    }

.nav-group-item[b-wpscpcgosd] {
    padding-left: 2.5rem !important;
    background-color: #253340;
    color: #b0c4de !important;
    width: 100%;
}

/* 活躍連結樣式 */
.nav-link.active[b-wpscpcgosd] {
    background-color: #1abc9c !important;
    color: white !important;
    font-weight: bold;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* /Pages/Home.razor.rz.scp.css */
/* ===============================
   主容器
   =============================== */
.dashboard-page-container.master-layout-container[b-ifp5pf3l88] {
    max-width: 1600px;
    margin: 0 auto;
    background-color: #f8f9fa !important;
    padding: 20px;
    width: 100%;
    color: var(--color-dark) !important;
}


/* ===============================
   Header
   =============================== */
.main-header[b-ifp5pf3l88] {
    margin-bottom: 20px;
}

    .main-header h1[b-ifp5pf3l88] {
        font-size: 24px;
        font-weight: bold;
        color: #28a745 !important;
    }

    .main-header p[b-ifp5pf3l88] {
        font-size: 14px;
        color: #6c757d !important;
    }


/* ===============================
   KPI 區塊
   =============================== */
.kpi-section-wrapper[b-ifp5pf3l88] {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.kpi-card[b-ifp5pf3l88] {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 12px;
    border-radius: 6px;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,.5);
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
    min-height: 120px;
    text-align: center;
}

.kpi-label[b-ifp5pf3l88] {
    font-size: 16px;
    opacity: .9;
}

.kpi-value[b-ifp5pf3l88] {
    font-size: 36px;
    font-weight: bold;
}


/* KPI 顏色 */
.bg-kpi-blue[b-ifp5pf3l88] {
    background-color: #5bc0de;
}

.bg-kpi-grey[b-ifp5pf3l88] {
    background-color: #727a92;
}

.bg-kpi-teal[b-ifp5pf3l88] {
    background-color: #20c997;
}

.bg-kpi-red[b-ifp5pf3l88] {
    background-color: #f26f63;
}

.bg-kpi-green[b-ifp5pf3l88] {
    background-color: #28a745;
}

.bg-kpi-green-light[b-ifp5pf3l88] {
    background-color: #6fcf97;
}


/* ===============================
   中段佈局
   =============================== */
.middle-section-wrapper[b-ifp5pf3l88] {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-section-large[b-ifp5pf3l88] {
    flex: 3;
    min-width: 0;
}

.alerts-section-small[b-ifp5pf3l88] {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}


/* ===============================
   ✅ 卡片本體（重點）
   =============================== */
.chart-card[b-ifp5pf3l88],
.summary-card[b-ifp5pf3l88],
.ranking-card[b-ifp5pf3l88],
.tasks-card[b-ifp5pf3l88] {
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
    padding: 0; /* ❗ 必須 0 */
    overflow: hidden; /* ❗ 標題背景才能完整顯示 */

    min-height: 250px;
    display: flex;
    flex-direction: column;
}


    /* ===============================
   ✅ 卡片標題橫條（真正生效的地方）
   =============================== */
    .chart-card > .card-header-block[b-ifp5pf3l88],
    .summary-card > .card-header-block[b-ifp5pf3l88],
    .ranking-card > .card-header-block[b-ifp5pf3l88],
    .tasks-card > .card-header-block[b-ifp5pf3l88] {
        background-color: var(--color-light-bg); /* ✅ 淺灰背景 */
        padding: 12px 16px;
        border-bottom: 2px solid #ced4da;
        flex-shrink: 0;
    }


/* 標題文字 */
.card-header-block h3[b-ifp5pf3l88] {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark);
}


/* ===============================
   卡片內容區
   =============================== */
.card-content-wrapper[b-ifp5pf3l88] {
    padding: 16px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: var(--color-dark);
}


/* ===============================
   最大用電摘要
   =============================== */
.data-summary-list[b-ifp5pf3l88] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .data-summary-list .data-item[b-ifp5pf3l88] {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .data-summary-list .label[b-ifp5pf3l88] {
        font-size: 14px;
        color: #6c757d;
    }

    .data-summary-list .value[b-ifp5pf3l88] {
        font-weight: 600;
    }

        .data-summary-list .value.large-val[b-ifp5pf3l88] {
            font-size: 18px;
            color: #dc3545;
        }


/* ===============================
   Alerts（互動 + 呼吸動畫版）
   =============================== */
.alerts-section-small .alert-item[b-ifp5pf3l88] {
    position: relative;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 16px 18px; /* ✅ 稍微放大 padding */
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 6px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    cursor: pointer; /* ✅ 可點擊感 */
    transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

    /* ===== Hover：全部卡片微亮 + 上浮 ===== */
    .alerts-section-small .alert-item:hover[b-ifp5pf3l88] {
        box-shadow: 0 6px 14px rgba(0,0,0,.15);
        transform: translateY(-2px);
    }


/* ===============================
   需量警示（紅）＋ 呼吸動畫
   =============================== */
.alert-item.alert-high[b-ifp5pf3l88] {
    border-left-color: #dc3545;
    background-color: #fff5f5;
    animation: alert-pulse-b-ifp5pf3l88 1.8s ease-in-out infinite;
}

    .alert-item.alert-high h4[b-ifp5pf3l88] {
        color: #dc3545;
    }


/* 呼吸動畫（只影響紅色那張） */
@keyframes alert-pulse-b-ifp5pf3l88 {
    0% {
        box-shadow: 0 0 0 rgba(220,53,69,0);
    }

    50% {
        box-shadow: 0 0 12px rgba(220,53,69,.35);
    }

    100% {
        box-shadow: 0 0 0 rgba(220,53,69,0);
    }
}


/* ===============================
   設備異常（藍）
   =============================== */
.alert-item.alert-info[b-ifp5pf3l88] {
    border-left-color: #17a2b8;
    background-color: #f1fcff;
}

    .alert-item.alert-info h4[b-ifp5pf3l88] {
        color: #0b7285;
    }


/* ===============================
   系統正常（綠）
   =============================== */
.alert-item.alert-success[b-ifp5pf3l88] {
    border-left-color: #28a745;
    background-color: #f3faf6;
}

    .alert-item.alert-success h4[b-ifp5pf3l88] {
        color: #28a745;
    }


/* ===============================
   文字大小微調（更好讀）
   =============================== */
.alert-item h4[b-ifp5pf3l88] {
    margin: 0;
    font-size: 16px; /* ✅ 原本 15 → 放大 */
    font-weight: 600;
}

.alert-item p[b-ifp5pf3l88] {
    margin: 0;
    font-size: 14px; /* ✅ 原本 13 → 放大 */
    color: #495057;
}



/* ===============================
   底部區塊
   =============================== */
.bottom-section-wrapper[b-ifp5pf3l88] {
    display: flex;
    gap: 20px;
}

.panel-summary[b-ifp5pf3l88] {
    flex: 1.2;
}

.panel-ranking[b-ifp5pf3l88] {
    flex: 2;
}

.panel-tasks[b-ifp5pf3l88] {
    flex: 1;
}


/* ===============================
   通用
   =============================== */
.btn-full-width[b-ifp5pf3l88] {
    width: 100%;
    margin-top: auto;
}

.chart-legend-footer[b-ifp5pf3l88] {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.legend-item[b-ifp5pf3l88] {
    color: #6c757d;
    margin-left: 15px;
    font-size: 13px;
}

    .legend-item[b-ifp5pf3l88]::before {
        content: "●";
        margin-right: 5px;
    }

    .legend-item.legend-blue[b-ifp5pf3l88]::before {
        color: #007bff;
    }

    .legend-item.legend-red[b-ifp5pf3l88]::before {
        color: #ff0000;
    }

    .legend-item.legend-green[b-ifp5pf3l88]::before {
        color: #28a745;
    }

    .legend-item.legend-orange[b-ifp5pf3l88]::before {
        color: #ff9933;
    }

/* ===============================
   設備警告（橘）
   =============================== */
.alert-item.alert-warning[b-ifp5pf3l88] {
    border-left-color: #ffc107;
    background-color: #fffbf0;
}

    .alert-item.alert-warning h4[b-ifp5pf3l88] {
        color: #856404;
    }

/* ===============================
   響應式斷點
   =============================== */
@media (max-width: 1024px) {
    .kpi-section-wrapper[b-ifp5pf3l88] {
        flex-wrap: wrap;
    }

    .kpi-card[b-ifp5pf3l88] {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
    }

    .kpi-value[b-ifp5pf3l88] {
        font-size: 28px;
    }

    .middle-section-wrapper[b-ifp5pf3l88] {
        flex-direction: column;
    }

    .alerts-section-small[b-ifp5pf3l88] {
        min-width: 0;
    }

    .bottom-section-wrapper[b-ifp5pf3l88] {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .dashboard-page-container.master-layout-container[b-ifp5pf3l88] {
        padding: 12px;
    }

    .kpi-card[b-ifp5pf3l88] {
        padding: 14px 10px;
        min-height: 90px;
    }

    .kpi-label[b-ifp5pf3l88] {
        font-size: 13px;
    }

    .kpi-value[b-ifp5pf3l88] {
        font-size: 22px;
    }

    .chart-card[b-ifp5pf3l88],
    .summary-card[b-ifp5pf3l88],
    .ranking-card[b-ifp5pf3l88],
    .tasks-card[b-ifp5pf3l88] {
        min-height: 200px;
    }

    .alert-item h4[b-ifp5pf3l88] {
        font-size: 14px;
    }

    .alert-item p[b-ifp5pf3l88] {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .dashboard-page-container.master-layout-container[b-ifp5pf3l88] {
        padding: 8px;
    }

    .main-header h1[b-ifp5pf3l88] {
        font-size: 18px;
    }

    .kpi-card[b-ifp5pf3l88] {
        flex: 1 1 100%;
    }

    .kpi-value[b-ifp5pf3l88] {
        font-size: 20px;
    }

    .data-summary-list .value.large-val[b-ifp5pf3l88] {
        font-size: 15px;
    }
}
