/* 設置頁面的基本樣式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* 讓元素縱向排列 */
    justify-content: flex-start; /* 從頁面頂部開始排列 */
    align-items: center; /* 水平居中 */
    height: 100vh; /* 設置頁面高度為 100% 視口高度 */
    background-color: #f5f5f5;
}

/* 父容器，讓form和table垂直排列 */
.container {
    display: flex;
    flex-direction: column; /* 使form與table垂直排列 */
    justify-content: flex-start; /* 從上方開始排列 */
    align-items: center; /* 水平居中 */
    margin-top: 20px;
    padding: 20px;
}

.login-div {
    display: flex;
    background-color: 	#4F4F4F;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: 95%;
    margin-left: auto; /* 表單靠右 */
    margin: 0px;
}

/* 登入表單樣式，靠右對齊 */
.login {
    display: flex;
    flex-direction: row; /* 使表單元素縱向排列 */
    justify-content: flex-end; /* 讓物件全部靠右 */
    align-items: flex-end;  /* 使表單元素對齊右邊 */
    background-color: #E0E0E0;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-left: auto; /* 表單靠右 */
    margin: auto;
}
/* 父容器設置為 Flexbox */
.login_OK {
    display: flex; /* 水平排列子元素 */
    justify-content: space-between; /* 左右分散對齊 */
    align-items: center; /* 垂直居中子元素 */
    background-color: #ffffff; /* 背景色 */
    /*padding: 10px; 增加內邊距 */
    border-radius: 10px; /* 圓角效果 */
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1); /* 增加陰影 */
    box-sizing: border-box; /* 包含內邊距和邊框 */
    height: 139px;
    max-height: 139px;
    width: 100%; /* 占滿容器寬度 */
}

/* 輸入框容器 */
.input-group {
    padding: 5px;
    /* margin-bottom: 26px; 增加與下一項之間的間距 */
    display: flex;
    flex-direction: column; /* 標籤和輸入框縱向排列 */
    justify-content: center;
}

.input-group label {
    font-weight: bold;
    text-align: left;
    font-size: 14px;
    margin-bottom: 5px; /* 使標籤與輸入框有間距 */
}

.input-group input {
    width: 95px; /* 設定輸入框寬度 */
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
    border-radius: 5px;
    
}
.user-info {
    padding: 0px 10px 100px 0px; /* 上，右，下，左 */
    justify-content: center;
    font-weight: bold; /* 使用加粗字體 */
    font-size: 20px; /* 調整字體大小 */
    color: #333; /* 字體顏色 */
}

.logo-5G {
    /* flex-shrink: 0; 防止 Logo 被壓縮 */
    max-width: 250px; /* 設定一個合理的最大寬度 */
}

.logo-5G img {
    height:90px; /* 控制 Logo 的高度 */
    
    padding: 0px 0px 0px 0px; /* 上，右，下，左 */
    display: inline-block; /* 保持 Logo 和名稱在同一行 */
}
.user-right {
    display: flex; /* 使內部元素水平排列 */
    justify-content: space-between; /* 使子元素分散對齊，左邊和右邊 */
    align-items: center; /* 垂直居中 */
    height: 100%;
    width: 100%; /* 使容器寬度佔滿父容器 */
}

.user-right2 {
    display: flex; /* 名稱與按鈕橫向排列 */
    align-items: center; /* 垂直居中 */
    justify-content: flex-end; /* 物件全部靠右對齊 */
    max-width: 700px; /* 設定一個合理的最大寬度 */
}
/* 登入與註冊按鈕容器 */
.buttons {
    display: flex;
    padding: 23px 0px 0px 0px; /* 上，右，下，左 */
    flex-direction: column; /* 按鈕排列 */
    justify-content: space-between;
    margin-left: 5px; /* 使按鈕與表單元素有間距 */
}

.buttons input[type="submit"] {
    width: 70px; /* 設定按鈕寬度 */
    padding: 10px;
    margin-bottom: 10px; /* 與下一項的間距 */
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: 2px solid #000000;
    font-weight: bold; /* 使用加粗字體 */
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px; /* 使按鈕有間距 */
}

/* 按鈕懸停效果 */
.buttons input[type="submit"]:hover {
    background-color: #ADADAD;
}
.buttons input[type="button"] {
    width: 70px; /* 設定按鈕寬度 */
    padding: 10px;
    margin-top: 10px; /* 與下一項的間距 */
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: 2px solid #000000;
    border-radius: 5px;
    font-weight: bold; /* 使用加粗字體 */
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px; /* 使按鈕有間距 */
}

/* 按鈕懸停效果 */
.buttons input[type="button"]:hover {
    background-color: #fb8c00;
}


.form-container{
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px;
    border: 1px solid #ccc;
    background-color: 	#4F4F4F;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: 95%;
    height: 81.5%;
    margin: 0 auto; /* 表格水平居中 */
    /* overflow-y: auto; 表格容器可滾動 */
    max-height: 75.7%; /* 限制表格的最大高度 */
}

/* 容器樣式 */
.button-page {
    display: flex; /* 將按鈕排成橫向排列 */
    justify-content: flex-start;
    gap: 10px; /* 按鈕之間的間距 */
    margin: 0px; /* 上下外距 */
    padding: 10px; /* 內距 */
    background-color: #9e9e9e; /* 背景顏色 */
    border-radius: 8px; /* 圓角 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 輕微陰影 */
}

/* 通用按鈕樣式 */
.btn {
    padding: 10px 20px; /* 內距 */
    border: 2px solid #000000; /* 邊框 */
    border-radius: 5px; /* 圓角 */
    font-size: 16px; /* 字型大小 */
    font-weight: bold; /* 字型加粗 */
    color: black; /* 文字顏色 */
    cursor: pointer; /* 滑鼠指標為手型 */
    transition: background-color 0.3s, transform 0.2s; /* 過渡效果 */
}

/* 頁面專用按鈕樣式 */
.btn.btn-page {
    background-color: #ffffff; /* 按鈕背景顏色 */
}

/* 按鈕互動效果 */
.btn:hover {
    background-color: #f4c79c; /* 滑鼠懸停背景顏色 */
}

.btn:active {
    transform: scale(0.95); /* 按下時輕微縮小 */
}

/* 點擊後選中的按鈕樣式 */
.btn.selected {
    background-color: #f4c79c; /* 按鈕背景顏色 */
    color: black; /* 按鈕文字顏色 */
}



/* 按鈕禁用狀態 */
.btn:disabled {
    background-color: #cccccc; /* 灰色背景 */
    cursor: not-allowed; /* 禁用鼠標樣式 */
    opacity: 0.6; /* 透明度降低 */
}

/* 下拉選單樣式 */
select {
    padding: 10px 20px; /* 內距 */
    border: none; /* 去除預設邊框 */
    border-radius: 5px; /* 圓角 */
    font-size: 16px; /* 字型大小 */
    font-weight: bold; /* 字型加粗 */
    color: black; /* 文字顏色 */
    cursor: pointer; /* 滑鼠指標為手型 */
    text-align: center; /* 文字水平置中 */
    text-align-last: center; /* 使最後一個選項文字也置中 */
}

/* 強制選項文字置中 */
select option {
    text-align: center; /* 使下拉選項的文字置中 */
}

.Schedule-input-box-form1 {
    display: flex; /* 使用 Flexbox 排列內容 */
    justify-content: center; /* 水平置中 */
    align-items: center; /* 垂直置中 */
    text-align: center; /* 文字居中 */
    margin-top: 20px; /* 與其他內容的間距 */
    padding: 6px;
    border: 2px ;/*dashed red  可視化父容器邊界 */
    background-color: 	#B9B9FF;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: auto;
    height: 200%; /* 調整高度 */
    margin: 0 auto; /* 水平居中 */
    /* overflow-y: auto; 可滾動 */
    max-height: 85%; /* 限制最大高度 */
    position: relative; /* 為 <h1> 絕對定位提供參考 */
}

.Schedule-input-box-form1 h1 {
    position: absolute; /* 使用絕對定位來輔助居中 */
    top: 50%; /* 距離容器頂部 50% */
    left: 50%; /* 距離容器左側 50% */
    transform: translate(-50%, -50%); /* 將 <h1> 移回中心點 */
    border: 2px ;/*dashed blue  可視化子元素邊界 */
    margin: 0; /* 移除 h1 預設的外邊距 */
    font-size: 40px; /* 可根據需要調整大小 */
    color: #333; /* 文字顏色 */
}



.Schedule-input-box-form1 img {
    max-width: 5%; /* 確保圖片不超出表單 */
    height: auto; /* 保持比例 */
    border-radius: 10px; /* 可選：給圖片加圓角效果 */
}

.Schedule-input-box-form{
    display: none;
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px;
    border: 1px solid #ccc;
    background-color: 	#B9B9FF;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: auto;
    height: 200%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 84.7%; /* 限制表格的最大高度 */
}
/* 設置表格與表單緊貼 */
.Schedule-input-box {
    padding: 6px;
    border: 2px solid #000000;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 300px; /* 限制表格的最大高度 */
}

/* 設置表格內部樣式 */
.Schedule-input-box table {
    width: 50%; /* 設置表格寬度為 100% */
    border-collapse: collapse; /* 消除邊框間距 */
}

.Schedule-input-box td {
    font-weight: bold; /* 字型加粗 */
    padding: 5px;
    width: 80px;
    text-align: center; /* 使表格內容居中 */
    border: 1px solid #ccc;
}

/* 設置表格內的輸入框 */
.Schedule-input-box input {
    width: 80%; /* 設置表格內的輸入框寬度 */
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.schedule-tableQ{
    margin-bottom: 10px; /* 每個表格之間的下方間距 */
    
    width: 100%; /* 確保表格占滿寬度 */
}

.schedule-tableQ:last-of-type {
    margin-bottom: 0; /* 移除最後一個表格的下方間距 */
}

/* 滾動效果調整 */
.container {
    overflow-y: auto; /* 允許父容器滾動 */
    max-height: 100vh; /* 限制父容器高度不超過視口 */
}

/* 背景與頁面過渡效果 */
body {
    transition: background-color 0.3s ease; /* 添加背景顏色過渡效果 */
}

/* 輸入框焦點效果 */
.input-group input:focus {
    border-color: #4CAF50; /* 當聚焦時變更邊框顏色 */
    outline: none; /* 取消藍色邊框 */
}

.Device-monitoring-data-box-form{
    display: none;
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px;
    border: 1px solid #ccc;
    background-color: 	#B9B9FF;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: auto;
    height: 200%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 84.7%; /* 限制表格的最大高度 */
}

/* 設置表格與表單緊貼 */
.Device-monitoring-data-box {
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px;
    border: 2px solid #000000;/* <-- */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 300px; /* 限制表格的最大高度 */
    margin-bottom: 10px; /* 每個表格之間的下方間距 */
}
.Device-monitoring-data-box:last-of-type{
    margin-bottom: 0; /* 移除最後一個表格的下方間距 */
}

/* 表格樣式 */
.Device-monitoring-data-box table {
    width: 100%; /* 表格自適應容器寬度 */
    border-collapse: collapse; /* 移除多餘邊框 */
    text-align: center; /* 文字置中 */
}

/* 表頭樣式 */
.Device-monitoring-data-box thead th {
    background-color: #ADADAD; /* 表頭背景顏色 */
    color: white; /* 表頭文字顏色 */
    padding: 10px;
    font-size: 16px;
}


/* 表格內容樣式 */
.Device-monitoring-data-box tbody td {
    border: 1px solid #ddd; /* 每個儲存格的邊框 */
    padding: 10px;
    font-size: 14px;
}

/* 奇數行背景色 */
.Device-monitoring-data-box tbody tr:nth-child(odd) {
    background-color: #f2f2f2;
}

/* 偶數行背景色 */
.Device-monitoring-data-box tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* 滑鼠懸停效果 */
.Device-monitoring-data-box tbody tr:hover {
    background-color: #ddd;
    transition: background-color 0.3s;
}

.Account-add-and-monitoring-data-box-form{
    display: none;
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px;
    border: 1px solid #ccc;
    background-color: 	#B9B9FF;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: auto;
    height: 200%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 84.7%; /* 限制表格的最大高度 */
}
.toggle-container{
    display: flex;
    justify-content: flex-start;
    margin: 0px;
}

.toggle-wrapper{
    position: relative;
    display: flex;
    width: 240px;
    height: 40px;
    background: #ccc;
    border-radius: 20px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

input[type="radio"]{
    display: none;
}

.toggle-label{
    flex: 1;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
    position: relative;
    z-index: 2;
}

.toggle-slider{
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: #4CAF50;
    border-radius: 20px;
    transition: transform 0.3s ease-in-out;
    z-index: 1;
}

#tab2:checked ~ .toggle-slider{
    transform: translateX(100%);
}

#tab1:checked + label{
    color: white;
}
#tab2:checked + label{
    color: white;
}

.Account-add-div-AHAH{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    max-height: 50%;
    width: 100%;
    box-sizing: border-box;
}

.Account-add-data-form{
    display: none;
    background-color: #ccc;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 40%;
    margin: auto;
    border: 2px solid #4CAF50;
}

.Account-add-input-group label{
    align-self: flex-start;
    margin-bottom: 8px;
}

.Account-add-input-group{
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.Account-add-input-group label{
    font-size: 16px;
    font-weight: bold;
    color: #333;
    align-self: flex-start;
    margin-bottom: 3px;
}


.Account-add-input-group input{
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.Account-add-input-group input:focus{
    border-color:#4CAF50;
    box-shadow: 0px 0px 8px rgba(255, 102, 0, 0.5);
    outline: none;
}

.Account-add-buttons{
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.register-btn{
    background-color: #4CAF50;
    color: rgba(0, 0, 0);
    padding: 12px 18px;
    border-radius: 5px;
    font-size: 16px;
    border: 1.5px solid #000000;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.register-btn:hover{
    background-color: #f4c79c;
}

.register-btn:active{
    transform: scale(0.50);
}

@media screen and (max-width: 600px) {
    .Account-add-data-form{
        max-width: 90%;
        padding: 20px;
    }

    .Account-add-buttons{
        flex-direction: column;
    }

    .register-btn{
        width: 100%;
    }
    
}


.Account-monitoring-data-box-form{
    display: none;
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px 6px 19px 6px;
    border: 1px solid #ccc;
    background-color: 	#B9B9FF;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: auto;
    height: 200%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 84.7%; /* 限制表格的最大高度 */
}

/* 設置表格與表單緊貼 */
.Account-monitoring-data-box {
    margin-top: 20px; /* 設置與表單之間的間距 */
    padding: 6px;
    border: 2px solid #000000;/* <-- */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto; /* 表格水平居中 */
    overflow-y: auto; /* 表格容器可滾動 */
    max-height: 300px; /* 限制表格的最大高度 */
}

/* 表格樣式 */
.Account-monitoring-data-box table {
    width: 100%; /* 表格自適應容器寬度 */
    border-collapse: collapse; /* 移除多餘邊框 */
    text-align: center; /* 文字置中 */
}

/* 表頭樣式 */
.Account-monitoring-data-box thead th {
    background-color: #ADADAD; /* 表頭背景顏色 */
    color: black; /* 表頭文字顏色 */
    padding: 2px;
    font-size: 20px;
    text-align: center; /* 文字置中 */
}


/* 表格內容樣式 */
.Account-monitoring-data-box tbody td {
    border: 1px solid #ccc; /* 每個儲存格的邊框 */
    padding: 2px;
    font-size: 20px;
    text-align: center; /* 文字水平置中 */
    vertical-align: middle; /* 文字垂直置中 */
}


/* 奇數行背景色 */
.Account-monitoring-data-box tbody tr:nth-child(odd) {
    background-color: #f2f2f2;
}

/* 偶數行背景色 */
.Account-monitoring-data-box tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* 滑鼠懸停效果 */
.Account-monitoring-data-box tbody tr:hover {
    background-color: #ddd;
    transition: background-color 0.3s;
}

/* 容器樣式 */
.Account-monitoring-data-box-button-page {
    display: flex; /* 將按鈕排成橫向排列 */
    justify-content: flex-start;
    gap: 10px; /* 按鈕之間的間距 */
    margin: 0px; /* 上下外距 */
    padding: 0px; /* 內距 */
    background-color: #9e9e9e; /* 背景顏色 */
    border-radius: 8px; /* 圓角 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 輕微陰影 */
}

/* 通用按鈕樣式 */
.Amdbbtn {
    /* display: none; */
    padding: 10px 10px; /* 內距 */
    border: 2px solid #000000; /*  */
    border-radius: 5px; /* 圓角 */
    font-size: 16px; /* 字型大小 */
    font-weight: bold; /* 字型加粗 */
    color: black; /* 文字顏色 */
    cursor: pointer; /* 滑鼠指標為手型 */
    background-color: #4caf50; /* 按鈕背景 */
    transition: background-color 0.3s, transform 0.2s; /* 過渡效果 */
}

/* 頁面專用按鈕樣式 */
/* .Amdbbtn.edit-page {
    background-color: #4caf50; /* 按鈕背景藍色 */
/* } */
/* .Amdbbtn.save-page {
    background-color: #4caf50; /* 按鈕背景藍色 */
/* } */

/* 按鈕互動效果 */
.Amdbbtn:hover {
    background-color: #f4c79c; /* 滑鼠懸停背景顏色 */
}

.Amdbbtn:active {
    transform: scale(0.95); /* 按下時輕微縮小 */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    width: 400px;
    max-width: 90%;
    box-sizing: border-box;
}

h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

label {
    flex: 0 0 30%;
    font-size: 14px;
    color: #555;
    text-align: right;
    margin-right: 10px;
}

input {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

button {
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:first-child {
    background-color: #4caf50;
    color: black;
}

button:last-child {
    background-color: #f44336;
    color: black;
}