/* 全域樣式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 1000px;
}

/* 電腦版樣式優化 */
@media (min-width: 992px) {
    body {
        font-size: 18px;
    }

    .container {
        max-width: 1200px;
    }
    
    .form-control, .form-select, .btn {
        font-size: 1.1rem;
        padding: 15px;
    }
    
    .form-label {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .card-body {
        padding: 50px;
    }
    
    .card-header h2 {
        font-size: 2.2rem;
    }
    
    .file-upload-label {
        padding: 40px;
    }
    
    .file-upload-label i {
        font-size: 32px;
    }
    
    .file-upload-label span {
        font-size: 1.2rem;
    }
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    color: white;
    padding: 25px;
    border: none;
}

.card-header h2 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 30px;
}

/* 表單樣式 */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 12px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* 檔案上傳樣式 */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--light-bg);
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: #e8f4fd;
}

.file-upload-label i {
    margin-right: 10px;
    font-size: 24px;
}

.file-name {
    margin-top: 10px;
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* 按鈕樣式 */
.btn {
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #45b369 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
    border: none;
}

/* 提示訊息 */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

/* 表格樣式 */
.table-wrapper {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead {
    background: var(--dark-color);
    color: white;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* 搜尋欄 */
.search-bar {
    margin-bottom: 20px;
}

.search-bar .input-group {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 分頁 */
.pagination {
    justify-content: center;
    margin-top: 20px;
}

.page-link {
    border-radius: 8px;
    margin: 0 5px;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 載入動畫 */
.spinner-border {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 10px;
}

.loading .spinner-border {
    display: inline-block;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .card-body {
        padding: 20px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 登入頁面特殊樣式 */
.login-container {
    max-width: 450px;
    margin: 100px auto;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 60px;
    color: white;
    margin-bottom: 20px;
}

.login-header h1 {
    color: white;
    font-weight: 700;
}

/* 儀表板標題 */
.dashboard-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-item .label {
    color: #666;
    font-size: 14px;
}

