.contents {
    max-width: 1077px;
}

.create_btn {
    width: 160px;
    height: 40px;
    font-size: 18px;
    margin-bottom: 8px;
}

/* 修改分類表格的樣式 */
.item_row {
    display: flex;
    flex-wrap: wrap;
}

.category_content {
    max-width: 343px;
    width: 100%;
    height: auto;
    min-height: 552px;
    background: #fff;
    box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.16);
    border-radius: 15px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    padding-bottom: 66px;
}

.category_content:not(:last-child) {
    margin-right: 24px;
}

/* 表格樣式 */
.category_content table {
    width: 100%;
    border-collapse: collapse;
}

.category_content table thead th {
    background: #285ee4;
    color: #fff;
    height: 44px;
    font-size: 20px;
    text-align: center;
    border-radius: 15px 15px 0 0;
    padding: 9px 0;
}

.category_content table tbody {
    height: calc(100% - 40px);
    overflow-y: auto;
    display: block;
}

.category_content table tbody tr {
    display: flex;
    width: 100%;
}

.category_content table tbody tr:nth-child(2n+1) {
    background-color: #f6f6f6;
}

.category_content table tbody tr:nth-child(2n) {
    background-color: #fcfcfc;
}

.category_content table tbody tr:hover {
    background-color: #BACBF6;
}

.category_content table tbody tr.active {
    background-color: #BACBF6;
}

/* 勾選欄位 */
.tb-checkbox {
    width: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 名稱欄位 */
.tb-name {
    width: calc(100% - 60px);
    padding: 8px 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 單選按鈕樣式 */
.tb_container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tb_container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tb_container .outter {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #285ee4;
    position: relative;
    display: inline-block;
}

.tb_container .checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #285ee4;
    display: none;
}

.tb_container input:checked ~ .outter .checkmark {
    display: block;
}

/* 響應式調整 */
@media screen and (max-width: 768px) {
    .item_row {
        flex-direction: column;
    }

    .category_content {
        max-width: 100%;
        margin-right: 0 !important;
    }
}

@media screen and (max-width: 450px) {
    .create_btn {
        width: 100%;
    }
}

/* 保持原有的最小高度並讓內容可滾動 */
.category_content table tbody {
    max-height: 512px; /* 552px (最小高度) - 40px (標題高度) */
    overflow-y: auto;
    display: block;
}

/* 讓連結在表格內顯示正常 */
.tb-name a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: center;
}

/* 新增樣式以匹配列表頁面 */
.category_content {
    margin-right: 10px;
    flex: 1;
}
.category_content table {
    width: 100%;
    border-collapse: collapse;
}
.category_content thead th {
    background-color: #4679de;
    color: white;
    padding: 10px;
    text-align: center;
}
.category_content tbody td {
    padding: 8px 10px;
    height: 44px; /* 固定每行高度為44px */
    box-sizing: border-box;
}
.tb-checkbox {
    width: 40px;
}
.item_row.row {
    display: flex;
    margin: 0 -10px;
}
/* 表單新增樣式 */
.add-form {
    width: 92%;
    height: 36px;
    margin: 0 16px 16px 15px; 
    padding: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    border-top: none;
    display: flex;
}
  
.add-form input {
    width: 100%;
    height: 36px;
    padding: 10px 16px 10px 15px;
    border: 1px solid #c6c6c6;
    border-radius: 4px;
    box-sizing: border-box;
    color: #000000;
    outline: none; 
}

.add-form input::placeholder {
    color: #000000;
    opacity: 1; 
}

.add-form span {
    display: block;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #285ee4;
    font-size: 14px;
    cursor: pointer;
}
      
/* .add-form {
    position: relative;
    }    */

.add-form::after {
    content: none;
    }
    
/* 選中行的背景色 */
tr.selected, tr:has(input:checked) {
    background-color: #E6EDFF;
}
/* 刪除按鈕樣式 */
.tb-name-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.category-name {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.category-item-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.delete-icon {
    flex-shrink: 0;
    cursor: pointer;
}


