/* 重置樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', '微軟正黑體', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 頁首樣式 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 60px;
    height: 60px;
    background-color: #34495e;
    border-radius: 8px;
    display: block;
}

.logo-text {
    font-size: 28px;
    font-weight: 600;
    color: #ecf0f1;
}

/* 導航選單樣式 */
.navbar {
    background-color: #34495e;
    border-bottom: 3px solid #3498db;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    flex: 1;
}

.nav-link {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background-color: #2c3e50;
    color: #3498db;
}

.nav-link.active {
    background-color: #3498db;
    color: white;
    border-bottom-color: #2980b9;
}

/* 主要內容區域 */
.main-content {
    min-height: 60vh;
    padding: 40px 0;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.content-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.content-card h3 {
    color: #34495e;
    font-size: 24px;
    margin-bottom: 20px;
}

.content-card h4 {
    color: #2c3e50;
    font-size: 20px;
    margin: 25px 0 15px 0;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.content-card p {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}

.content-card ul {
    margin: 20px 0;
    padding-left: 25px;
}

.content-card li {
    margin-bottom: 8px;
    color: #666;
}

.form-container {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.placeholder {
    background-color: #e9ecef;
    padding: 40px;
    text-align: center;
    color: #6c757d;
    border-radius: 4px;
    border: 2px dashed #ced4da;
    font-style: italic;
}

/* 頁尾樣式 */
.footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    padding: 40px 0 20px 0;
    margin-top: 50px;
}

.footer-content {
    margin-bottom: 30px;
}

.footer-info h3 {
    color: #3498db;
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 8px;
    font-size: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 14px;
}

/* 子表單 */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table-responsive table {
    width: 100%;
    white-space: nowrap;
}

.RWDTB {
	width: auto;
    overflow: auto;
}

.RWDTB td, th {
	font-family: Tahoma, Helvetica, Arial, sans-serif;
	font-size: 0.9em;
	word-wrap: break-word;
	word-break: break-all;	
	border:1px solid gray;
	padding: 5px;
	height: 30px;
	text-align: center;
}

.RWDTB th {
	background-color: #BFC9CA;
}

.RWDTB td:first-child, th:first-child {
	position: sticky;
	left: 0; /* 首行永遠固定於左 */
	z-index: 1;
	background-color: #BFC9CA;
}

.RWDTB thead tr th {
	position: sticky;
	top: 0; /* 列首永遠固定於上 */
}

.RWDTB th:first-child{
	z-index: 2;
	background-color: #BFC9CA;
}

/* RWD 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .content-section h2 {
        font-size: 28px;
    }
    
    .content-card {
        padding: 20px;
    }
    
    .content-card h3 {
        font-size: 22px;
    }
    
    .form-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 0;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .content-section h2 {
        font-size: 24px;
    }
    
    .content-card {
        padding: 15px;
    }
    
    .main-content {
        padding: 20px 0;
    }
}
