* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #c9cad1 0%, #726f75 100%) !important;
    min-height: 100vh !important;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #2c3e50 !important;
    background-color: #2c3e50 !important;
    background-image: none !important;
    color: white !important;
    padding: 25px !important;
    border-radius: 15px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
    text-align: center;
}

header h1,
header h2 {
    color: #fff !important;
    border: none !important;
    margin-bottom: 8px;
}

header p {
    color: #fff !important;
    opacity: 0.92;
    margin: 0;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.6rem;
    margin: 25px 0 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.work-item-name {
    /* 工作項目名稱輸入框的特殊樣式 */
}

.historical-total-info {
    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.form-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

th {
    background-color: #2c3e50 !important;
    color: #fff !important;
    font-weight: bold;
}

td {
    background-color: #f8f9fa;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #219a52;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dynamic-table {
    margin: 20px 0;
    overflow-x: auto;
}

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

.table-input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    padding: 5px;
}

.table-input:focus {
    outline: none;
    background: white;
}

/* 進度比較樣式 */
.progress-comparison {
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

.progress-ahead {
    background-color: #d4edda;
    color: #155724;
}

.progress-behind {
    background-color: #f8d7da;
    color: #721c24;
}

.progress-on-track {
    background-color: #d1ecf1;
    color: #0c5460;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .dynamic-table {
        overflow-x: auto;
    }
    
    table {
        min-width: 800px;
    }
}

/* 狀態欄樣式 */
.status-bar {
    background-color: #2c3e50 !important;
    background-image: none !important;
    color: white !important;
    padding: 12px 0 !important;
    font-size: 0.95rem;
    border-bottom: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.status-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.login-info, .current-time {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.3);
}

.logout-btn {
    color: white !important;
    text-decoration: none !important;
    padding: 6px 15px !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 5px !important;
    cursor: pointer;
    font-size: 0.9rem !important;
    background: transparent !important;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: white !important;
}

/* 調整主容器上邊距，為狀態欄留出空間 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 10px; /* 為狀態欄留出空間 */
}

/* 工程名稱下拉選單樣式 */
.project-select-container {
    position: relative;
}

.project-select-container input {
    width: 100%;
}

.project-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}


/* 在現有 CSS 中添加以下樣式 */

/* 下拉選單樣式 */
.table-input select {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 5px;
    cursor: pointer;
}

.table-input select:focus {
    outline: none;
    background: white;
}

/* 工作項目和材料下拉選單特殊樣式 */
.work-item-select, .material-select {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* 歷史項目樣式保持不變 */
.historical-item {
    background-color: #f0f8ff !important;
}

.historical-item .work-item-name {
    background-color: #e6f3ff;
    font-weight: bold;
}

.historical-item .total-cumulative {
    background-color: #e6f3ff;
    font-weight: bold;
    color: #2c3e50;
}

/* 歷史材料樣式 */
.historical-material {
    background-color: #f0fff0 !important;
}

.historical-material .material-name {
    background-color: #e6ffe6;
    font-weight: bold;
}

.historical-material .total-delivered,
.historical-material .total-used,
.historical-material .inventory {
    background-color: #e6ffe6;
    font-weight: bold;
    color: #2c3e50;
}

/* 歷史累計資訊樣式 */
.historical-total-info {
    font-size: 0.75rem;
    color: #666;
    margin-top: 3px;
    font-style: italic;
}

/* 只讀輸入框樣式 */
input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 工作項目和材料表格樣式調整 */
#workItemsTable td,
#materialsTable td {
    vertical-align: middle;
}

#workItemsTable .table-input,
#materialsTable .table-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px;
    background-color: white;
}

#workItemsTable .table-input:focus,
#materialsTable .table-input:focus {
    background-color: #fff;
    border-color: #3498db;
}

/* 歷史項目中的名稱欄位特殊樣式 */
.historical-item td:first-child,
.historical-material td:first-child {
    position: relative;
}

/* 狀態欄樣式 */
.status-bar {
    background-color: #2c3e50 !important;
    background-image: none !important;
    color: white !important;
    padding: 12px 0 !important;
    font-size: 0.95rem;
    border-bottom: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.status-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.login-info, .current-time {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.3);
}

.logout-btn {
    color: white !important;
    text-decoration: none !important;
    padding: 6px 15px !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 5px !important;
    cursor: pointer;
    font-size: 0.9rem !important;
    background: transparent !important;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: white !important;
}

/* 調整主容器上邊距，為狀態欄留出空間 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 10px; /* 為狀態欄留出空間 */
}

/* 工程名稱下拉選單樣式 */
.project-select-container {
    position: relative;
}

.project-select-container input {
    width: 100%;
}

.project-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.project-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.project-suggestion:hover {
    background-color: #f0f8ff;
}

/* 其他樣式保持不變... */


.project-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.project-suggestion:hover {
    background-color: #f0f8ff;
}

/* 歷史工作項目樣式 */
.historical-item {
    background-color: #f0f8ff !important;
}

.historical-item .work-item-name {
    background-color: #e6f3ff;
    font-weight: bold;
}

.historical-item .total-cumulative {
    background-color: #e6f3ff;
    font-weight: bold;
    color: #2c3e50;
}

/* 歷史累計資訊樣式 */
.historical-total-info {
    font-size: 0.75rem;
    color: #666;
    margin-top: 3px;
    font-style: italic;
}

/* 只讀輸入框樣式 */
input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 工作項目表格樣式調整 */
#workItemsTable td {
    vertical-align: middle;
}

#workItemsTable .table-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px;
    background-color: white;
}

#workItemsTable .table-input:focus {
    background-color: #fff;
    border-color: #3498db;
}

/* 歷史項目中的工作名稱欄位特殊樣式 */
.historical-item td:first-child {
    position: relative;
}



/* 歷史材料樣式 */
.historical-material {
    background-color: #f0fff0 !important;
}

.historical-material .material-name {
    background-color: #e6ffe6;
    font-weight: bold;
}

.historical-material .total-delivered,
.historical-material .total-used,
.historical-material .inventory {
    background-color: #e6ffe6;
    font-weight: bold;
    color: #2c3e50;
}

/* 歷史累計資訊樣式 */
.historical-total-info {
    font-size: 0.75rem;
    color: #666;
    margin-top: 3px;
    font-style: italic;
}

/* 只讀輸入框樣式 */
input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 工作項目和材料表格樣式調整 */
#workItemsTable td,
#materialsTable td {
    vertical-align: middle;
}

#workItemsTable .table-input,
#materialsTable .table-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px;
    background-color: white;
}

#workItemsTable .table-input:focus,
#materialsTable .table-input:focus {
    background-color: #fff;
    border-color: #3498db;
}

/* 歷史項目中的名稱欄位特殊樣式 */
.historical-item td:first-child,
.historical-material td:first-child {
    position: relative;
}


/* 預定進度天數提示 */
.planned-progress-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.planned-progress-null {
    color: #e74c3c;
    font-weight: bold;
}

.planned-progress-calculated {
    color: #27ae60;
    font-weight: bold;
}

/* 預定進度天數輸入框樣式 */
#planned_progress_days {
    background-color: #f8f9fa;
}

/* 日期選擇器樣式 */
.existing-date a {
    background-color: #007bff !important;
    color: white !important;
     border-radius: 0 !important;
}

.new-date a {
    background-color: #dc3545 !important;
    color: white !important;
     border-radius: 0 !important;
}

.today-date a {
    background-color: #28a745 !important;
    color: white !important;
     border-radius: 0 !important;
    font-weight: bold;
}

/* 歷史資訊樣式 */
.historical-total-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* 表格輸入框樣式 */
.table-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* 響應式表格 */
.dynamic-table {
    overflow-x: auto;
}

.dynamic-table table {
    min-width: 800px;
}
/* 狀態列連結樣式 */
.status-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status-link {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.status-link i {
    font-size: 12px;
}

/* 調整狀態欄佈局 */
.status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.system-title {
    font-weight: bold;
    font-size: 18px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-info {
    font-size: 14px;
}

.current-time {
    font-size: 14px;
    font-weight: bold;
}

.logout-btn {
    color: white !important;
    text-decoration: none !important;
    padding: 6px 15px !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 5px !important;
    background: transparent !important;
    transition: all 0.3s ease;
    font-size: 0.9rem !important;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: white !important;
}
/* 日報表列表表格專用樣式 - 強制垂直置中 */
#reportsTable {
    border-collapse: collapse;
    width: 100%;
}

#reportsTable th,
#reportsTable td {
    vertical-align: middle !important;
    text-align: center;
    padding: 12px 10px;
    border: 1px solid #e9ecef;
    height: auto !important;
}

#reportsTable th {
    background-color: #2c3e50 !important;
    color: white !important;
    font-weight: bold;
    border: none;
}

/* 操作欄加寬，按鈕單列不擠 */
#reportsTable td:last-child,
#reportsTable th:last-child {
    min-width: 360px !important;
    width: 360px !important;
    white-space: nowrap;
}

#reportsTable tbody tr {
    height: auto !important;
}

.action-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 4px !important;
}

/* 按鈕基礎樣式 - 統一高度和垂直對齊 */
.btn-excel,
.btn-pdf,
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    margin: 0 !important;
}

/* 特定按鈕樣式 */
.btn-excel {
    background-color: #27ae60 !important;
    color: white !important;
}

.btn-excel:hover {
    background-color: #219a52 !important;
    color: white !important;
}

.btn-pdf {
    background-color: #e74c3c !important;
    color: white !important;
}

.btn-pdf:hover {
    background-color: #c0392b !important;
    color: white !important;
}

/* 徽章樣式 - 確保垂直置中 */
.stats-badge {
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #495057;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 24px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* 表格響應式設計 */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 條紋表格行顏色 */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 強制所有表格內容垂直居中 */
#reportsTable tbody td {
    vertical-align: middle !important;
}

/* 確保表格單元格內的所有內容垂直居中 */
#reportsTable td > * {
    vertical-align: middle !important;
}

/* 移除可能影響垂直對齊的繼承樣式 */
#reportsTable td,
#reportsTable th {
    line-height: 1.2 !important;
}

/* 特別針對操作列的按鈕容器 */
#reportsTable td:last-child .action-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
}

/* 確保按鈕在容器內垂直居中 */
#reportsTable td:last-child .action-buttons .btn,
#reportsTable td:last-child .action-buttons .btn-view,
#reportsTable td:last-child .action-buttons .btn-delete,
#reportsTable td:last-child .action-buttons .btn-excel,
#reportsTable td:last-child .action-buttons .btn-pdf {
    vertical-align: middle !important;
    align-self: center !important;
    flex: 0 0 auto;
}

/* 日報表列表表格字體大小調整 - 整體增加2px */
#reportsTable th,
#reportsTable td {
    font-size: 16px !important; /* 原本應該是14px，增加2px */
}

#reportsTable .btn-view,
#reportsTable .btn-delete,
#reportsTable .btn,
#reportsTable .btn-excel,
#reportsTable .btn-pdf,
#reportsTable .btn-sm {
    font-size: 0.85rem !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
}

#reportsTable .stats-badge {
    font-size: 16px !important; /* 施工狀態徽章字體大小 */
    padding: 6px 12px !important; /* 稍微調整內邊距以適應更大字體 */
    height: 28px !important; /* 增加高度 */
}

/* 確保表格內容垂直置中 */
#reportsTable th,
#reportsTable td {
    vertical-align: middle !important;
    text-align: center;
}

#reportsTable tbody tr {
    height: 70px !important;
}

/* 操作按鈕區域 */
#reportsTable .action-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    flex-wrap: wrap;
    height: 100% !important;
    margin-top: 0 !important;
}

/* 按鈕基礎樣式 */
.btn-excel,
.btn-pdf {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important; /* 稍微增加高度 */
    padding: 0 14px !important;
    line-height: 1 !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px !important;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-excel {
    background-color: #27ae60 !important;
    color: white !important;
}

.btn-excel:hover {
    background-color: #219a52 !important;
}

.btn-pdf {
    background-color: #e74c3c !important;
    color: white !important;
}

.btn-pdf:hover {
    background-color: #c0392b !important;
}

/* 派工單特定樣式 */
.search-form {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.search-form .form-row {
    margin-bottom: 15px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    min-width: 70px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* 分頁樣式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 下拉選單樣式 */
select.table-input,
select.form-control {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

select.table-input:focus,
select.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 按鈕樣式調整 */
.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 表單區塊樣式調整 */
.form-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.form-section h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-size: 20px;
}

/* 輸入框和文字區域樣式 */
input[type="text"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: white;
    box-sizing: border-box;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* 必填欄位標記 */
label[for]:required::after {
    content: " *";
    color: #e74c3c;
}

/* 表格樣式 */
.dynamic-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.dynamic-table th {
    background-color: #2c3e50 !important;
    color: #fff !important;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #2c3e50;
    font-weight: bold;
}

.dynamic-table th:last-child,
.dynamic-table td:last-child {
    min-width: 100px;
    white-space: nowrap;
}

.dynamic-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
}

.dynamic-table tr:hover {
    background-color: #f5f5f5;
}