/* 全域樣式 */
body {
    font-family: "Microsoft JhengHei", "微軟正黑體", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* 輪播背景 */
.carousel-bg {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 卡片懸停效果 */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

/* 表格樣式 */
.table-responsive {
    border-radius: 0.375rem;
}

/* 表單樣式 */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* 按鈕樣式 */
.btn {
    border-radius: 0.375rem;
}

/* 導航列 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 後台側邊欄 */
.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
    padding: 20px 0;
}

.sidebar .nav-link {
    color: #495057;
    padding: 10px 20px;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #e9ecef;
    border-left-color: #0d6efd;
    color: #0d6efd;
}

/* 內容區域 */
.content-area {
    padding: 20px;
    min-height: calc(100vh - 56px);
}

/* 統計卡片 */
.stat-card {
    border-left: 4px solid #0d6efd;
}

.stat-card.success {
    border-left-color: #198754;
}

.stat-card.warning {
    border-left-color: #ffc107;
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card.info {
    border-left-color: #0dcaf0;
}

/* 標籤樣式 */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .carousel-bg {
        min-height: 200px;
    }
    
    .carousel-bg h1 {
        font-size: 1.5rem;
    }
    
    .sidebar {
        min-height: auto;
    }
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 檔案上傳區域 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 40px;
    text-align: center;
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: #0d6efd;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

/* 簽核流程圖 */
.approval-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.approval-step {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    margin: 0 5px;
}

.approval-step.active {
    background-color: #cfe2ff;
    border: 2px solid #0d6efd;
}

.approval-step.completed {
    background-color: #d1e7dd;
    border: 2px solid #198754;
}

.approval-arrow {
    font-size: 1.5rem;
    color: #6c757d;
}

/* 福利券預覽 */
.coupon-preview {
    border: 2px dashed #ffc107;
    border-radius: 0.5rem;
    padding: 30px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    text-align: center;
}

/* 搜尋框 */
.search-box {
    position: relative;
}

.search-box .bi-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    padding-left: 40px;
}
