/* ==========================================
   搞量 - 广告数据中台 全局样式
   ========================================== */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
}

body {
    background: var(--gray-100);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}

/* 导航栏 */
.navbar-brand { font-size: 1.3rem; letter-spacing: 1px; }
.navbar { box-shadow: var(--shadow); }

/* 主内容区 */
.main-content { padding: 20px; }

/* 卡片 */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 15px 20px;
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}
.stat-card .stat-label {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* 表格 */
.table-container {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.table { margin-bottom: 0; }
.table thead th {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody td {
    vertical-align: middle;
    font-size: 0.9rem;
}
.table-hover tbody tr:hover { background: #f0f7ff; }

/* 视频缩略图 */
.video-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--gray-200);
}
.video-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* 状态标签 */
.status-badge { font-size: 0.75rem; }

/* 筛选栏 */
.filter-bar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px 20px;
    margin-bottom: 20px;
}
.filter-bar .form-control,
.filter-bar .form-select {
    font-size: 0.9rem;
}

/* 分页 */
.pagination { margin-bottom: 0; }
.page-link { font-size: 0.9rem; }

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}
.login-card .brand-icon {
    font-size: 3rem;
    color: var(--primary);
    text-align: center;
    display: block;
    margin-bottom: 10px;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}
.empty-state i { font-size: 4rem; margin-bottom: 15px; display: block; }

/* 排序箭头 */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: var(--gray-200); }
th.sortable .sort-icon { margin-left: 4px; opacity: 0.3; }
th.sortable.active .sort-icon { opacity: 1; color: var(--primary); }

/* 响应式 */
@media (max-width: 768px) {
    .main-content { padding: 10px; }
    .stat-card .stat-value { font-size: 1.3rem; }
    .filter-bar { padding: 10px; }
    .table-responsive { font-size: 0.8rem; }
}

/* 金额高亮 */
.money { color: #e74c3c; font-weight: 600; }
.money-green { color: var(--success); font-weight: 600; }

/* 工具提示 */
[data-bs-toggle="tooltip"] { cursor: help; }

/* 动画 */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
