/* --- 框架核心佈局 --- */
body {
    display: flex;
    font-family: "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif;
    background-color: #f8f9fa; /* 淡灰色背景 */
    margin: 0;
    height: 100vh;
    overflow: hidden; /* 防止 body 產生滾動條 */
}

.sidebar {
    flex: 0 0 250px; /* 固定寬度 250px */
    background-color: #2c3e50; /* 深藍灰色 */
    color: white;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto; /* 選單過長時內部滾動 */
    transition: margin-left 0.3s ease;
    z-index: 1050;
}

.sidebar.collapsed {
    margin-left: -250px;
}

.main-content {
    flex: 1; /* 佔滿剩餘空間 */
    padding: 30px;
    height: 100vh;
    overflow-y: auto; /* 內容過長時內部滾動 */
}

/* --- 浮動選單按鈕 --- */
.floating-menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1040;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    display: none; /* 預設隱藏，當選單收合時才顯示 */
    transition: background-color 0.3s;
}

.floating-menu-btn:hover {
    background-color: #1a252f;
}

.floating-menu-btn.show {
    display: block;
}

/* --- 手機版 RWD 調整 --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed; /* 手機版改為懸浮覆蓋 */
        height: 100vh;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    
    .sidebar.collapsed {
        box-shadow: none; /* 收合時移除陰影 */
    }
    
    .main-content {
        padding-top: 70px; /* 留出上方空間給浮動按鈕 */
    }
}

/* --- 通用元件樣式 --- */
.section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2c3e50;
}

.info-box {
    background-color: #e9ecef;
    border-left: 4px solid #0d6efd;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 15px;
    border-radius: 0 4px 4px 0;
}

/* 覆蓋 Bootstrap Card 預設樣式，確保一致性 */
.card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    margin-bottom: 1.5rem; /* 統一卡片間距 */
}