/* 導覽列與側邊欄銜接優化 */
.w3-teal, .w3-bar {
    margin-top: 0 !important;
    background-color: #1abc9c !important; /* 翡翠綠 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10; /* 確保陰影蓋在內容上 */
}
/* 側邊欄優化*/
#Sidebar {
    background-color: #2c3e50 !important; /* 深藍色質感 */
    color: white !important;
    top: 0 !important; /* 強制頂天 */
    height: 100vh !important; /* 滿版高度 */
    z-index: 1001; /* 高於頂部導覽列 */
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    border: none;
}
#Sidebar .w3-bar-item {
    padding: 12px 24px;
    border-bottom: 1px solid #34495e;
    transition: all 0.3s;
}
#Sidebar .w3-bar-item:hover {
    background-color: #1abc9c !important;
    color: white !important;
}
/* --- 子選單優化 --- */
/* 子選單容器 (下拉後) */
.w3-hide {
    background-color: #1e2b37 !important; /* 比側邊欄更深的底色，增加層次 */
    transition: all 0.3s ease;
    border-left: 4px solid #1abc9c; /* 側邊裝飾線 */
    margin: 0 !important;
}

/* 子選單內的項目 */
.w3-hide .w3-bar-item {
    padding-left: 45px !important; /* 增加縮排感 */
    font-size: 0.9em;
    color: #bdc3c7 !important;
    border-bottom: none !important; /* 子項目不加底線 */
}
/* 滑過子項目的效果 */
.w3-hide .w3-bar-item:hover {
    background-color: #ddd !important;
    color: #000 !important;
    /* text-decoration: none; */
    padding-left: 50px !important; /* 微幅右移特效 */
}

/* 點擊後的父選單按鈕 (展開狀態) */
.w3-green, .is-active {
    background-color: #1abc9c !important;
    color: white !important;
    font-weight: bold;
}

/* 圖示靠右與動畫 */
.rotate-icon, .fa-caret-down {
    float: right;
    margin-top: 4px;
    transition: transform 0.3s ease;
}

/* 展開時旋轉圖示 */
.w3-show-block + .w3-button .rotate-icon, 
.is-active .rotate-icon {
    transform: rotate(180deg);
}