
:root {
    --bs-font-sans-serif: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --bs-body-bg: #f4f7fb;
    --parent-card-bg: #ffffff;
    --child-card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --parent-border: rgba(0, 0, 0, 0.06);
    --bs-primary: #3b82f6; 
    --bs-success: #10b981; 
    --glow-color: rgba(59, 130, 246, 0.06);
    --glow-opacity: 0.08; /* 卡片左上角光晕透明度 */
}
[data-bs-theme="dark"] {
    --bs-body-bg: #0b0f19;
    --parent-card-bg: #131722;
    --child-card-bg: #1a1e2b;
    --card-border: rgba(255, 255, 255, 0.04);
    --parent-border: rgba(255, 255, 255, 0.08);
    --glow-color: rgba(96, 165, 250, 0.12);
    --glow-opacity: 0.15; /* 深色模式稍微亮一点 */
}

body { 
    background-color: var(--bs-body-bg); 
    color: #334155; 
    transition: background-color 0.3s ease; 
    font-family: var(--bs-font-sans-serif);
    min-height: 100vh;
}
[data-bs-theme="dark"] body { color: #f1f5f9; }

/* 背景顶部径向光晕 */
.ambient-glow {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60vh;
    background-image: radial-gradient(circle at 50% 0%, var(--glow-color), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* JetBrains Mono 专属数字样式 */
.num-font { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

/* 页面留白 */
@media (min-width: 992px) { .w-80 { padding-left: 6vw !important; padding-right: 6vw !important; } }
@media (min-width: 1400px) { .w-80 { padding-left: 10vw !important; padding-right: 10vw !important; } }

/* 导航栏 */
.custom-glass-nav {
    background: rgba(var(--bs-body-bg-rgb), 0.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--parent-border);
    box-shadow: none;
}

/* 控制栏卡片 (外观/语言) */
.nav-control-card {
    background-color: var(--parent-card-bg);
    border: 1px solid var(--parent-border);
    border-radius: 12px;
    height: 38px;
    transition: all 0.2s;
}
.nav-control-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}
.nav-action-btn { width: 38px; justify-content: center; }
.nav-action-btn:hover { color: var(--bs-primary) !important; }

/* ---------------- 大卡片 (Parent) ---------------- */
.status-card-parent {
    background: var(--parent-card-bg);
    border: 1px solid var(--parent-border);
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}
[data-bs-theme="dark"] .status-card-parent {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ---------------- 小卡片 (Child) ---------------- */
.status-card-child {
    /* 左上角氛围光晕，使用 CSS 变量动态调整颜色 */
    background-image: radial-gradient(circle at 0% 0%, rgba(var(--theme-hue, 59, 130, 246), var(--glow-opacity)), transparent 70%);
    background-color: var(--child-card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
[data-bs-theme="dark"] .status-card-child { box-shadow: none; }
.status-card-child:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 40px -10px var(--glow-color), 0 0 0 1px rgba(59, 130, 246, 0.05);
    transform: translateY(-4px);
}
[data-bs-theme="dark"] .status-card-child:hover {
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: 0 10px 40px -10px var(--glow-color), 0 0 0 1px rgba(96, 165, 250, 0.1);
}

.bg-light-subtle { background-color: #f1f5f9 !important; }
[data-bs-theme="dark"] .bg-light-subtle { background-color: rgba(255,255,255,0.02) !important; }

/* Admin 表格在卡片内的适配 */
.custom-table { width: 100%; margin-bottom: 0; table-layout: fixed; }
.custom-table th { border-bottom: 1px solid var(--card-border); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: #64748b; padding: 1rem; }
[data-bs-theme="dark"] .custom-table th { color: #94a3b8; }
.custom-table td { padding: 1rem; border-bottom: 1px solid rgba(0,0,0,0.02); vertical-align: middle; }
[data-bs-theme="dark"] .custom-table td { border-bottom-color: rgba(255,255,255,0.02); }
.custom-table tbody tr:last-child td { border-bottom: none; }
.custom-table tbody tr { transition: background 0.15s; }
.custom-table tbody tr:hover td { background-color: rgba(0,0,0,0.02); }
[data-bs-theme="dark"] .custom-table tbody tr:hover td { background-color: rgba(255, 255, 255, 0.02); }

.drag-handle { cursor: grab; font-size: 1.2rem; color: #cbd5e1; transition: color 0.2s; }
.drag-handle:hover { color: var(--bs-primary) !important; }

.admin-status-table { min-width: 850px; }
.admin-status-table th, .admin-status-table td { text-align: center; }
.admin-status-table th:nth-child(1), .admin-status-table td:nth-child(1) { width: 5%; padding-left: 0; }
.admin-status-table th:nth-child(2), .admin-status-table td:nth-child(2) { width: 20%; text-align: left; }
.admin-status-table th:nth-child(3), .admin-status-table td:nth-child(3) { width: 30%; text-align: left; }
.admin-status-table th:nth-child(4), .admin-status-table td:nth-child(4) { width: 15%; }
.admin-status-table th:nth-child(5), .admin-status-table td:nth-child(5) { width: 15%; }
.admin-status-table th:nth-child(6), .admin-status-table td:nth-child(6) { width: 15%; }

/* ---------------- 底部版权优化 ---------------- */
.footer-border { border-color: var(--parent-border) !important; }

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.status-indicator-pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: var(--bs-success);
    animation: pulse-green 2s infinite;
}

/* 通知吐司提示 */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1055; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.unified-toast { pointer-events: auto; padding: 10px 20px; margin-bottom: 10px; border-radius: 8px; font-weight: 500; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); animation: toastIn 0.3s ease-out; color: #fff; }
.unified-toast.success { background: #10b981; }
.unified-toast.danger { background: #ef4444; }
.unified-toast.warning { background: #f59e0b; color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.hiding { animation: toastOut 0.2s ease forwards; }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }
