/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 頭部樣式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e8e8e8;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #1890ff;
}

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

.user-info span {
    margin-right: 15px;
    color: #666;
}

.logout-btn {
    background-color: #ff4d4f;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.logout-btn:hover {
    background-color: #ff7875;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
}

/* 側邊欄樣式 */
.sidebar {
    position: fixed;
    width: 200px;
    height: 100%;
    background-color: #fff;
    padding-top: 80px;
    color: #333;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    border-right: 1px solid #e8e8e8;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: #e6f7ff;
    color: #1890ff;
    border-left: 3px solid #1890ff;
}

/* 主要內容區域 */
.main-content {
    margin-left: 200px;
    padding: 80px 20px 20px;
    min-height: 100vh;
}

.page-title {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 20px;
    font-weight: 500;
}

/* 卡片樣式 */
.card {
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.card-header {
    padding: 12px 20px;
    border-bottom: 1px solid #e8e8e8;
    background-color: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    color: #666;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #fff;
}

.form-control:hover {
    border-color: #40a9ff;
}

.form-control:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.form-col {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

.form-col-3 {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    padding: 0 10px;
}

.form-col-4 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 10px;
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: all 0.3s;
    height: 32px;
    line-height: 1.5;
    text-decoration: none;
}

.btn-primary {
    background-color: #1890ff;
    color: white;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.btn-success {
    background-color: #52c41a;
    color: white;
    border-color: #52c41a;
}

.btn-success:hover {
    background-color: #73d13d;
    border-color: #73d13d;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.2);
}

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

.btn-danger:hover {
    background-color: #ff7875;
    border-color: #ff7875;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #666;
    border-color: #d9d9d9;
}

.btn-secondary:hover {
    background-color: #fafafa;
    border-color: #40a9ff;
    color: #40a9ff;
}

/* 表格樣式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #e8e8e8;
}

.table th, .table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e8e8e8;
    vertical-align: middle;
}

.table th {
    background-color: #fafafa;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.table tr:nth-child(even) {
    background-color: #fafafa;
}

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

/* 添加連結樣式 */
.table a {
    color: #366109;
    text-decoration: none;
}

.table a:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* 添加狀態標籤樣式 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    line-height: 20px;
}

.status-success {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-pending {
    background-color: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

.status-failed {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

.status-secondary {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

/* 金額樣式 */
.amount {
    font-weight: 500;
    color: #ff4d4f;
}

.text-success {
    color: #52c41a !important;
}

.text-danger {
    color: #ff4d4f !important;
}

/* 操作按鈕樣式 */
.action-btn {
    padding: 4px 8px;
    font-size: 12px;
    margin: 0 2px;
    height: 24px;
    line-height: 1;
}

/* 搜索區域 */
.search-area {
    background-color: #fff;
    padding: 20px;
    border-radius: 2px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8e8e8;
}

/* 統計卡片 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 0 10px 20px;
    text-align: center;
    border: 1px solid #e8e8e8;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 500;
    margin: 10px 0;
    color: #333;
}

.stat-card .stat-title {
    font-size: 14px;
    color: #999;
}

.stat-card.primary {
    border-top: 3px solid #1890ff;
}

.stat-card.success {
    border-top: 3px solid #52c41a;
}

.stat-card.danger {
    border-top: 3px solid #ff4d4f;
}

.stat-card.warning {
    border-top: 3px solid #faad14;
}

/* 分頁樣式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination a {
    color: #666;
    padding: 8px 12px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #d9d9d9;
    margin: 0 4px;
    font-size: 14px;
    border-radius: 2px;
}

.pagination a.active {
    background-color: #1890ff;
    color: white;
    border: 1px solid #1890ff;
}

.pagination a:hover:not(.active) {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination a.disabled {
    color: #d9d9d9;
    pointer-events: none;
    border-color: #f5f5f5;
}

/* 提示框樣式 */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 14px;
}

.alert-success {
    color: #52c41a;
    background-color: #f6ffed;
    border-color: #b7eb8f;
}

.alert-danger {
    color: #ff4d4f;
    background-color: #fff1f0;
    border-color: #ffa39e;
}

/* 登錄頁面樣式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
}

.login-form {
    width: 100%;
    max-width: 360px;
    padding: 30px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8e8e8;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 500;
}

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

.login-form .btn {
    width: 100%;
    padding: 10px;
    height: 40px;
}

/* 連結按鈕樣式 */
.link-button {
    color: #1890ff;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.link-button:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* 浮水印樣式 */
.watermark {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f6ffed;
    color: #52c41a;
    border-radius: 2px;
    font-size: 12px;
    border: 1px solid #b7eb8f;
}

/* 下拉式功能表樣式 */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.763 4.5 2.8 3.45 6 6.75l3.2-3.3L10.237 4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* 文本域樣式 */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* 核取方塊樣式 */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
}

/* 照片預覽樣式 */
.photo-preview {
    width: 100px;
    height: 100px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 100%;
}

/* 徽章樣式 */
.badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    background-color: #ff4d4f;
    color: #fff;
    border-radius: 9px;
    margin-left: 5px;
}

/* 回應式設計 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding-top: 60px;
    }
    
    .sidebar-menu a {
        padding: 15px 10px;
        text-align: center;
    }
    
    .sidebar-menu a span {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .form-col, .form-col-3, .form-col-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
