/* ==============================================================================
   Bing Rewards 控制台 - 明亮纯净设计系统 (Light Theme) & 移动端深度适配
   ============================================================================== */

:root {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --bg-surface-hover: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-color-light: #cbd5e1;
    --border-color-focus: #3b82f6;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #eff6ff;
    --color-primary-glow: rgba(37, 99, 235, 0.15);

    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-success-border: #a7f3d0;

    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fde68a;

    --color-error: #dc2626;
    --color-error-bg: #fef2f2;
    --color-error-border: #fecaca;

    --color-purple: #7c3aed;
    --color-purple-bg: #f5f3ff;
    --color-purple-border: #ddd6fe;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ================= 全局滚动条美化 (Custom Scrollbars) ================= */
/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* WebKit (Chrome, Edge, Safari, Opera) 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ================= 登录页设计 (明亮卡片风) ================= */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
    background: radial-gradient(circle at 50% 20%, #eff6ff 0%, #f8fafc 80%);
}

.login-background-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.03) 50%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    box-shadow: var(--shadow-elevated);
}

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

.logo-badge {
    width: 52px;
    height: 52px;
    background: var(--color-primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.logo-icon {
    font-size: 26px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 15px;
    pointer-events: none;
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.alert-box {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 18px;
}

.alert-error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: var(--color-error);
}

.login-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 24px;
}

/* ================= 按钮规范 ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-surface-subtle);
    border-color: var(--border-color-light);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    color: var(--text-primary);
    background: var(--bg-surface-subtle);
    border-color: var(--border-color-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

/* ================= 顶部导航栏 ================= */
.top-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon-sm {
    font-size: 20px;
}

.logo-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    margin: 0;
}

.version-badge {
    font-size: 11px;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    padding: 1px 6px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-status-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

.status-idle {
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.status-idle .status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #94a3b8;
}

.status-running {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid #bfdbfe;
}

.status-running .status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.user-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================= 仪表盘主体 ================= */
.dashboard-main {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 运行中提示条 */
.running-banner {
    background: var(--color-primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.running-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
}

.spinner-icon {
    display: inline-block;
    animation: spin 2s linear infinite;
}

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

.running-progress-track {
    height: 6px;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.running-progress-fill {
    height: 100%;
    background-color: var(--color-primary);
    background-size: 28px 28px;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.25) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.25) 75%,
        transparent 75%,
        transparent
    );
    animation: progress-bar-stripes 1s linear infinite;
    border-radius: 9999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes progress-bar-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 28px 0; }
}

/* 核心指标栅格 */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-fast);
}

.metric-card:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-color-light);
    transform: translateY(-1px);
}

.metric-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.bg-blue { background: #eff6ff; color: #2563eb; }
.bg-green { background: #ecfdf5; color: #059669; }
.bg-purple { background: #f5f3ff; color: #7c3aed; }
.bg-amber { background: #fffbeb; color: #d97706; }

.metric-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.metric-value.font-sm {
    font-size: 17px;
}

.text-green { color: var(--color-success); }

/* 流水表格分项单元格的次要说明行（展示当日累计口径，作为本次增量的参照） */
.cell-subtext {
    margin-top: 3px;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1.25;
}

.metric-desc {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 通用区块容器 */
.section-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

/* 历史流水统计徽章规范 */
.history-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: var(--transition-fast);
    user-select: none;
}

.history-count:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.history-count-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    display: inline-block;
}

.history-count-num {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0 2px;
}

/* 图表控件 */
.chart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group {
    display: inline-flex;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.btn-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
}

.btn-toggle.active {
    background: #ffffff;
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.chart-wrapper {
    height: 300px;
    position: relative;
    width: 100%;
}

/* 账号卡片栅格 */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.account-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.account-card:hover {
    border-color: var(--border-color-light);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.account-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.account-user-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.account-index-badge {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.account-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.account-username:hover {
    color: var(--color-primary);
}

.level-badge {
    font-size: 11px;
    background: var(--color-purple-bg);
    color: var(--color-purple);
    border: 1px solid var(--color-purple-border);
    padding: 1px 7px;
    border-radius: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.account-card-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.account-points-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.account-today-tag {
    font-size: 12px;
    color: var(--color-success);
    font-weight: 600;
}

.account-meta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meta-val {
    color: var(--text-primary);
    font-weight: 500;
}

.account-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

/* 状态药丸标签 */
.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); }
.badge-error { background: var(--color-error-bg); color: var(--color-error); border: 1px solid var(--color-error-border); }
.badge-muted { background: var(--bg-surface-subtle); color: var(--text-secondary); border: 1px solid var(--border-color); }
.badge-skip { background: var(--color-primary-light); color: var(--color-primary); border: 1px solid #bfdbfe; }

/* 历史流水积分标签：统一数字层级与颜色语义 */
.score-tag {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    min-width: 52px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.score-tag small {
    margin-left: 2px;
    font-size: 10px;
    font-weight: 600;
}

.score-tag-total {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.score-tag-positive {
    color: var(--color-success);
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
}

.score-tag-today {
    color: #0369a1;
    background: #f0f9ff;
    border-color: #bae6fd;
}

.score-tag-zero {
    color: var(--text-secondary);
    background: var(--bg-surface-subtle);
    border-color: var(--border-color);
}

/* 数据表格 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.history-table {
    min-width: 1240px;
}

.data-table th {
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    white-space: nowrap;
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--bg-surface-hover);
}

.history-table th:nth-child(n + 5),
.history-table td:nth-child(n + 5) {
    text-align: center;
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.history-score-cell {
    display: inline-flex;
    min-width: 72px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.history-time {
    color: var(--text-muted) !important;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.history-batch code {
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.history-account {
    min-width: 138px;
}

.history-account strong {
    font-weight: 650;
}

.history-duration {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.history-duration small {
    color: var(--text-muted);
    font-size: 10px;
}

.history-duration-skip {
    color: var(--color-primary);
}

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.page-indicator {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 浮动提示 */
.toast-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= 移动端响应式深度适配 (< 768px) ================= */
@media (max-width: 768px) {
    .top-nav {
        padding: 10px 14px;
    }

    .nav-container {
        padding: 0;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .nav-brand-row {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    
    .logo-group {
        gap: 6px;
    }

    .logo-icon-sm {
        font-size: 18px;
    }

    .logo-title {
        font-size: 15px;
    }

    .version-badge {
        font-size: 10px;
        padding: 1px 4px;
    }

    .nav-status-user {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .status-badge {
        padding: 3px 8px;
        font-size: 11px;
        border-radius: 20px;
    }

    .status-idle .status-dot,
    .status-running .status-dot {
        width: 6px;
        height: 6px;
    }

    .user-menu {
        padding-left: 0;
        border-left: none;
    }

    .user-name {
        display: none; /* 移动端屏幕空间宝贵，隐藏冗余用户名文字，仅保留紧凑的退出按钮 */
    }

    .nav-actions-row {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .nav-btn-refresh {
        flex: 0 0 auto;
        padding: 7px 12px;
    }

    .nav-btn-run {
        flex: 1;
        padding: 7px 14px;
    }

    .dashboard-main {
        padding: 12px;
        gap: 12px;
    }

    .section-container {
        padding: 14px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .metric-card {
        padding: 12px;
        gap: 10px;
    }

    .metric-icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .metric-value {
        font-size: 19px;
    }

    .metric-value.font-sm {
        font-size: 14px;
    }

    .chart-wrapper {
        height: 240px;
    }

    .chart-controls {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .accounts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .toast-popup {
        left: 16px;
        right: 16px;
        bottom: 16px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-brand-row {
        gap: 4px;
    }

    .logo-title {
        font-size: 14px;
    }

    .status-badge {
        padding: 2px 6px;
        font-size: 10px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= 自定义确认弹窗 (Confirm Modal) ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 16px;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 24px;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.modal-icon {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    flex-shrink: 0;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 22px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions .btn {
    min-width: 80px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
}

/* ================= 实时运行控制台与深色滚动条 ================= */
.log-console-wrap {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 10px;
    height: 350px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    color: #e4e4e7;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
    scrollbar-width: thin;
    scrollbar-color: #3f3f46 transparent;
}

.log-console-wrap::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.log-console-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.log-console-wrap::-webkit-scrollbar-thumb {
    background-color: #3f3f46;
    border-radius: 9999px;
}

.log-console-wrap::-webkit-scrollbar-thumb:hover {
    background-color: #52525b;
}
