﻿.head {
    font-size: 24px; /* 設置字體大小 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: white;
    background-color: #A3B5C1;
}

.logo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0; /* 允許內容縮小 */
}

.logo span {
    margin-left: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 響應式設計 - 小螢幕優化 */
@media (max-width: 768px) {
    .head {
        padding: 8px;
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
        min-width: 200px;
    }
    
    .logo img {
        width: 80px !important;
        height: 40px !important;
    }
}

@media (max-width: 576px) {
    .head {
        padding: 6px;
    }
    
    .logo img {
        width: 70px !important;
        height: 35px !important;
    }
}

.nav-buttons {
    display: flex; /* 使用 Flexbox 佈局 */
    align-items: center; /* 垂直居中對齊 */
}

.nav-tag {
    flex-grow: 1;
    display: block;
    width: auto;
    padding: 0.1rem 0.1rem;
    color: #487e76;
    font-size: 18px;
    font-weight: bold;
    margin: 1px 1px;
    background-color: #A3B5C1;
    white-space: nowrap; /* 防止換行 */
    padding-right: 1rem; /* 預設值，適用於小屏幕 */
    padding-left: 1rem; /* 內移一個字元 */
    overflow: hidden; /* 隱藏溢出内容 */
    text-overflow: ellipsis; /* 添加省略號*/
}

@media (min-width: 640px) {
    .nav-tag {
        width: 200px;
    }
}


.nav-link {
    --bs-nav-link-color: white;
}

.nav-link i {
    font-size: 20px;
}


.nav-link-black {
    --bs-nav-link-color: black;
}

.nav-link.active {
    background-color: #648296 !important;
    color: white !important;
}


.tabs {
    /*border: 1px solid black !important;*/ /* 設定框線的顏色和大小 */
    background-color: #E3E9ED !important;
    /*color: white !important;*/
    border: 1px solid black;
    /*padding: 10px 15px;*/ /* 為tab添加內邊距 */
    /*display: inline-block;*/ /* 使tabs水平顯示 */
    /*margin-right: -1px;*/ /* 移除多餘的框線 */
}


    .tabs.active {
        background-color: #648296 !important;
        color: white !important;
        border: 1px solid black;
    }

.table thead th {
    background-color: #384567 !important;
    color: white !important;
}

.dt-button {
    background-color: #A3B5C1 !important;
    color: white !important;
}

.page-item.active .page-link {
    background-color: #A3B5C1 !important;
    color: white !important;
    border: 1px solid black;
}

.page-link {
    color: black !important;
}

html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
}

body {
    /*    margin-bottom: 30px;
    margin-top: 30px;*/
    /*height: 80%;*/
    display: flex;
    flex-direction: column;
    /*min-height: 100vh;*/
}

.content {
    flex: 1; /* 填充剩餘空間到底部 */
    margin: 0.5rem 0.5rem;
}

.footer {
    text-align: center !important; /* 將文字置中 */
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 兩列等寬 */
    align-items: center; /* 垂直居中 */
}


/*.dataTables_filter input {
    display: inline-block !important;
}*/

.cell-center {
    text-align: center;
    vertical-align: middle !important;
}


/* 自定按鈕顏色 */
.btn-main {
    background-color: #648296 !important;
    color: white !important;
    border: 1px solid black;
}

/* 自定按鈕顏色 */
.btn-sub {
    background-color: #E3E9ED !important;
    color: #384567 !important;
    border: 1px solid black;
}

/* td內換行 */
.dataTables_wrapper .dataTable td {
    word-break: break-word; /* 這將允許在單詞內換行 */
    white-space: normal; 
}

/*table-hover顏色*/
.table-hover thead tr:hover th, .table-hover tbody tr:hover td {
    background-color: rgba(0, 255, 255, 0.2);
}

/* ===== UI 優化樣式 ===== */

/* 卡片陰影和邊框改善 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    border: 1px solid rgba(0, 0, 0, 0.125) !important;
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* 列表群組項目改善 */
.list-group-item-action {
    transition: all 0.15s ease-in-out;
    border-left: 3px solid transparent;
}

.list-group-item-action:hover {
    background-color: #f8f9fa !important;
    border-left-color: #648296 !important;
    transform: translateX(2px);
}

.list-group-item-action.active {
    background-color: #648296 !important;
    border-color: #648296 !important;
    color: white !important;
    border-left-color: #384567 !important;
}

/* 按鈕動畫效果 */
.btn-main {
    transition: all 0.3s ease !important;
}

.btn-main:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.btn-main:active {
    transform: translateY(0) !important;
}

/* 表單浮動標籤改善 */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #648296 !important;
}

.form-floating > .form-control:focus {
    border-color: #648296 !important;
    box-shadow: 0 0 0 0.25rem rgba(100, 130, 150, 0.25) !important;
}

/* 響應式改善 */
@media (max-width: 768px) {
    .form-floating {
        margin-bottom: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .btn-lg {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    .list-group-item {
        padding: 0.75rem 1rem !important;
    }
}

/* 載入動畫 */
.spinner-border-sm {
    width: 1rem !important;
    height: 1rem !important;
}

/* 訊息提醒樣式改善 */
.alert {
    border-radius: 0.375rem !important;
    border-left-width: 4px !important;
}

.alert-info {
    border-left-color: #0dcaf0 !important;
}

.alert-success {
    border-left-color: #198754 !important;
}

.alert-warning {
    border-left-color: #ffc107 !important;
}

.alert-danger {
    border-left-color: #dc3545 !important;
}

/* 導航選單卡片標題 */
.card-header h6 {
    color: #384567 !important;
    font-weight: 600;
}

/* 頁面標題改善 */
h2, h3 {
    color: #384567 !important;
    font-weight: 600;
    margin-bottom: 1.5rem !important;
}

/* 表單卡片標題 */
.card-header h5 {
    color: #384567 !important;
    font-weight: 600;
}

/* 圖示間距 */
.fas, .fa {
    vertical-align: middle;
}

/* 平滑過渡效果 */
* {
    transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}