/* 儀表板樣式 */

/* 卡片陰影效果 */
.card.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.card.shadow-sm:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* 卡片標題樣式 */
.card-header {
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

/* 統計卡片樣式 */
.card.bg-light {
    background-color: #f8f9fa !important;
    transition: transform 0.2s ease-in-out;
}

.card.bg-light:hover {
    transform: translateY(-2px);
}

/* 表格樣式增強 */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    cursor: pointer;
}

.table thead th {
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid #dee2e6;
}

.table-sm td,
.table-sm th {
    padding: 0.5rem;
    vertical-align: middle;
}

/* 趨勢指標 */
.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

/* 載入動畫 */
.loading-spinner {
    text-align: center;
    padding: 3rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25rem;
}

/* 數字動畫效果 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-body h3,
.card-body h5 {
    animation: countUp 0.5s ease-out;
}

/* 進度條樣式 */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* 徽章樣式 */
.badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 警告框樣式 */
.alert {
    border-left: 4px solid;
    border-radius: 0.25rem;
}

.alert-info {
    border-left-color: #17a2b8;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-success {
    border-left-color: #28a745;
}

/* 圖標美化 */
.card-body i[style*="font-size: 2rem"] {
    color: var(--bs-primary);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
}

/* 刷新按鈕動畫 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

button:active .icon-refresh {
    animation: spin 0.5s linear;
}

/* 成功/失敗顏色 */
.text-profit {
    color: #28a745;
    font-weight: 600;
}

.text-loss {
    color: #dc3545;
    font-weight: 600;
}

/* 分隔線美化 */
hr {
    margin: 2rem 0;
    border-top: 2px solid #e9ecef;
    opacity: 1;
}

/* 鏈接樣式 */
a.text-decoration-none:hover {
    text-decoration: underline !important;
}

/* 小型按鈕組 */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* 數據顯示卡片 */
.data-card {
    border-radius: 8px;
    overflow: hidden;
}

/* 標題圖標間距 */
h2 i,
h5 i,
h6 i {
    margin-right: 0.5rem;
}

/* 空狀態樣式 */
.alert.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 產業熱度卡片 */
.card.border-0 {
    border: none !important;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* 關鍵字標籤樣式 */
.keyword-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background-color: #e7f3ff;
    border-radius: 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.keyword-tag:hover {
    background-color: #0066cc;
    color: white;
    transform: scale(1.05);
}

