/* 主題定製 */
:root {
    --primary-color: #000000;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* 頁面背景 */
body {
    background-color: #f8f9fa;
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 主導航條 */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
}

/* 頁腳 */
.footer {
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

/* 卡片樣式 */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.8rem 1rem;
}

/* 庫存警告 */
tr.low-stock {
    background-color: rgba(255, 193, 7, 0.1);
}

/* 表單樣式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

/* 貨幣格式化 */
.hkd::before {
    content: "HK$";
    margin-right: 0.25rem;
}

/* 儀表板卡片 */
.dashboard-card {
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* 打印樣式 */
@media print {
    .navbar, .footer, .no-print, .btn, .modal {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* 表格響應式設計 */
.table-responsive {
    border-radius: 0.25rem;
}

/* 頁面標題 */
h1 {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
}

/* 輔助類 */
.lead {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* 按鈕懸停效果 */
.btn {
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #333333;
    border-color: #000000;
}

/* 模態框樣式 */
.modal-content {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 自訂按鈕和徽章 */
.badge {
    padding: 0.4em 0.6em;
    font-weight: 500;
}

/* 導航項目選中樣式 */
.nav-link.active {
    font-weight: 600;
}

/* 表格懸停效果 */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* 響應式佈局優化 */
@media (max-width: 768px) {
    .btn-sm-block {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* 動畫效果 */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 在低庫存時的特殊樣式 */
.low-stock td:nth-child(2) {
    color: var(--danger-color);
    font-weight: 600;
}

/* 下拉菜單樣式 */
.dropdown-menu {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
}

/* 頁面容器 */
.container {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* 自訂圖標樣式 */
.feature-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 客戶名稱鏈接樣式 */
.customer-link {
    color: #000000;
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px dashed #000000;
    padding-bottom: 1px;
}

.customer-link:hover {
    color: #0056b3;
    border-bottom: 1px solid #0056b3;
}

/* 訂單狀態標籤 */
.status-badge {
    padding: 0.3em 0.6em;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.pending {
    background-color: #ffc107;
    color: #212529;
}

.status-badge.processing {
    background-color: #17a2b8;
    color: white;
}

.status-badge.completed {
    background-color: #28a745;
    color: white;
}

.status-badge.cancelled {
    background-color: #dc3545;
    color: white;
}

/* 統計數字顯示 */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}