:root {
    --primary-color: #4a6572;
    --primary-light: #f1f6f9;
    --secondary-color: #344955;
    --accent-color: #f9aa33;
    --text-color: #232f34;
    --bg-color: #dbe7ec;
    --white: #ffffff;
    --gray-light: #e0e0e0;
    --sidebar-bg: #5c7c8a;
    --sidebar-hover: #4a6572;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--bg-color);
    padding: 2rem 5%;
    border-bottom: 2px solid #bbcbd2;
}

header h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.sub-header {
    background-color: #c9d6dc;
    padding: 0.5rem 5%;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 1px solid #bbcbd2;
    display: flex;
    justify-content: space-between;
}

/* Main Container */
.container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    min-height: 600px;
}

/* Sidebar */
.sidebar {
    width: 20%;
    background-color: var(--sidebar-bg);
    padding: 2rem;
    color: var(--white);
}

.sidebar h2 {
    font-size: 26px; /* 1.25rem */
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 1rem;
}

.sidebar-menu a, .sidebar-menu button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #bdccd4;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 20px;
}

.sidebar-menu a:hover, .sidebar-menu button:hover {
    background-color: #a7bcc7;
}

/* Content Area */
.content {
    flex: 1;
    padding: 2rem 3rem;
}

.content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

/* Form Styles */
.login-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.login-btn:hover {
    background-color: var(--secondary-color);
}

.error-msg {
    color: #d32f2f;
    background-color: #ffebee;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

table th {
    background-color: #b7c9d6; /* var(--primary-light); */
    color: var(--secondary-color);
    font-weight: 800;
    white-space: nowrap;  
}

/* 表格奇偶列底色 */
table tbody tr:nth-child(even) {
    background-color: #f5f8fa;   /* 偶數列：淡色 */
}

table tbody tr:nth-child(odd) {
    background-color: #ffffff;   /* 奇數列：白色，可視需要調整 */
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover, .pagination a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.pagination span {
    padding: 0.5rem 1rem;
    color: #999;
}
