@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --brand: #465FFF;
  --brand-hover: #3B4FE0;
  --brand-light: rgba(70, 95, 255, 0.08);
  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.08);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.08);
  --error: #EF4444;
  --error-light: rgba(239, 68, 68, 0.08);
  --sidebar-bg: #1C2434;
  --sidebar-text: rgba(255,255,255,0.6);
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: rgba(70,95,255,0.15);
  --header-bg: #FFFFFF;
  --body-bg: #F1F5F9;
  --card-bg: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text: #1C2434;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --sidebar-width: 180px;
  --sidebar-collapsed: 64px;
  --transition: 0.2s ease;

  /* 旧变量名别名：模板里仍大量使用 --primary/--text2/--muted/--danger/--bg/--surface，
     统一定义在根变量里，避免各页面各自 :root{} 覆盖导致深色模式失效 */
  --primary: var(--brand);
  --primary-light: var(--brand-light);
  --text2: var(--text-secondary);
  --muted: var(--text-muted);
  --danger: var(--error);
  --danger-light: var(--error-light);
  --bg: var(--body-bg);
  --bg2: var(--border-light);
  --surface: var(--card-bg);
  --bg-subtle: var(--border-light);
}

.dark {
  --sidebar-bg: #0F172A;
  --sidebar-text: rgba(255,255,255,0.5);
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active: rgba(70,95,255,0.2);
  --header-bg: #1E293B;
  --body-bg: #0F172A;
  --card-bg: #1E293B;
  --border: #334155;
  --border-light: #1E293B;
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
}

* { font-family: 'Outfit', system-ui, -apple-system, sans-serif; }

body { background: var(--body-bg); color: var(--text); transition: background var(--transition), color var(--transition); }

/* Alpine：未初始化前隐藏，避免闪烁 */
[x-cloak] { display: none !important; }

/* Sidebar */
.ta-sidebar {
  background: var(--sidebar-bg); color: var(--sidebar-text);
  width: var(--sidebar-width); transition: width var(--transition), background var(--transition);
  overflow: hidden; display: flex; flex-direction: column;
}
.ta-sidebar.collapsed { width: var(--sidebar-collapsed); }
.ta-sidebar.collapsed .logo-text,
.ta-sidebar.collapsed .nav-label,
.ta-sidebar.collapsed .sidebar-bottom-text { display: none; }
.ta-sidebar.collapsed nav { padding: 8px; }
.ta-sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.ta-sidebar.collapsed .logo-area { justify-content: center; padding: 0; }
.ta-sidebar.collapsed .logo-box { margin: 12px 0; }
.ta-sidebar.collapsed .sidebar-bottom { justify-content: center; padding: 8px; }


.ta-sidebar .logo-area {
  border-bottom: 1px solid rgba(255,255,255,0.06); display: flex;
  align-items: center; gap: 10px; padding: 0 20px; height: 56px; flex-shrink: 0; overflow: hidden;
  cursor: pointer; user-select: none;
}
.ta-sidebar .logo-area:hover { background: rgba(255,255,255,0.03); }
.ta-sidebar .collapse-icon { margin-left: auto; width: 16px; height: 16px; opacity: 0.25; transition: all 0.2s; flex-shrink: 0; }
.ta-sidebar .logo-area:hover .collapse-icon { opacity: 0.6; }
.ta-sidebar.collapsed .collapse-icon { display: none; }
.ta-sidebar .logo-box {
  width: 32px; height: 32px; border-radius: 8px; background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.ta-sidebar .logo-text { font-weight: 600; font-size: 15px; letter-spacing: 0.02em; color: #fff; white-space: nowrap; }

.ta-sidebar a, .ta-sidebar .nav-item {
  color: var(--sidebar-text); transition: all 0.15s;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  position: relative; text-decoration: none;
}
.ta-sidebar .nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.ta-sidebar .nav-item:hover svg { color: var(--brand); opacity: 0.85; }
.ta-sidebar a.active, .ta-sidebar .nav-item.active {
  background: var(--sidebar-active); color: var(--brand); font-weight: 600;
}
.ta-sidebar .nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%); width: 3px; height: 18px;
  border-radius: 0 3px 3px 0; background: var(--brand);
  transition: height var(--transition);
}
.ta-sidebar.collapsed .nav-item.active::before { left: -8px; height: 14px; }

/* Collapsed tooltip */
.ta-sidebar.collapsed .nav-item { position: relative; }
.ta-sidebar.collapsed .nav-item:hover::after {
  content: attr(data-tooltip); position: absolute; left: 100%;
  margin-left: 12px; top: 50%; transform: translateY(-50%);
  background: #1C2434; color: #fff;
  padding: 5px 12px; border-radius: 6px; font-size: 12px;
  white-space: nowrap; z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  pointer-events: none; animation: tooltipIn 0.15s ease;
}
@keyframes tooltipIn { from { opacity: 0; transform: translateY(-50%) translateX(-4px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } }

/* Sidebar bottom */
.ta-sidebar .sidebar-bottom {
  border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
  padding: 14px 16px; overflow: hidden; display: flex; align-items: center; gap: 8px;
}
.ta-sidebar .sidebar-bottom .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(70,95,255,0.2); display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-weight: 700; font-size: 11px; flex-shrink: 0;
}
.ta-sidebar .sidebar-bottom .user-name { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.7); white-space: nowrap; }
.ta-sidebar .sidebar-bottom .user-sub { font-size: 10px; color: rgba(255,255,255,0.25); white-space: nowrap; }

/* Sidebar mobile overlay */
.ta-sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 40; display: none; }
.ta-sidebar-overlay.show { display: block; }

/* Main wrap */
.ta-main-wrap { transition: margin var(--transition); }

.ta-header { background: var(--header-bg); border-bottom: 1px solid var(--border); height: 56px; transition: background var(--transition); }
.ta-header .breadcrumb { font-size: 13px; color: var(--text-muted); }
.ta-header .breadcrumb a { color: var(--text-muted); }
.ta-header .breadcrumb a:hover { color: var(--text-secondary); }
.ta-header .breadcrumb .current { color: var(--text); font-weight: 600; }

.ta-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: background var(--transition), border var(--transition); }
.ta-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.ta-card-body { padding: 20px; }

.ta-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border-radius: var(--radius-sm); transition: all 0.15s; cursor: pointer; border: none; font-family: inherit; font-size: 13px; padding: 7px 16px; line-height: 1.4; }
.ta-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ta-btn-primary { background: var(--brand); color: #fff; }
.ta-btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.ta-btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.dark .ta-btn-secondary { background: #334155; color: var(--text); border-color: #475569; }
.ta-btn-secondary:hover:not(:disabled) { background: var(--border-light); border-color: #CBD5E1; }
.dark .ta-btn-secondary:hover:not(:disabled) { background: #475569; border-color: #64748B; }
.ta-btn-ghost { background: transparent; color: var(--text-secondary); }
.ta-btn-ghost:hover:not(:disabled) { background: var(--border-light); color: var(--text); }
.ta-btn-danger { background: var(--error); color: #fff; }
.ta-btn-danger:hover:not(:disabled) { background: #DC2626; }
.ta-btn-sm { padding: 4px 10px; font-size: 12px; }
.ta-btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 4px; }
.ta-btn-icon { padding: 6px; min-width: 30px; justify-content: center; }

.sch-actions { display: flex; align-items: center; gap: 2px; }
.action-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 6px; background: transparent; color: var(--text-secondary); font-size: 15px; cursor: pointer; transition: all 0.15s; line-height: 1; flex-shrink: 0; }
.action-btn:hover { background: var(--border-light); color: var(--text); }
.action-btn.danger:hover { background: var(--error-light); color: var(--error); }

.ta-input, .ta-select, .ta-textarea { border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); background: var(--card-bg); outline: none; transition: border-color 0.15s, background var(--transition); font-family: inherit; }
.ta-input:focus, .ta-select:focus, .ta-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.ta-input { padding: 7px 12px; }
.ta-input-sm { padding: 4px 10px; font-size: 12px; }
.ta-input-xs { padding: 3px 8px; font-size: 11px; }
.ta-select { padding: 7px 32px 7px 12px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.ta-select-sm { padding: 4px 28px 4px 10px; font-size: 12px; background-position: right 6px center; }
.ta-select-xs { padding: 3px 24px 3px 8px; font-size: 11px; background-position: right 4px center; }
.ta-textarea { padding: 8px 12px; resize: vertical; min-height: 80px; }
.ta-textarea-sm { padding: 6px 10px; font-size: 12px; min-height: 60px; }

.ta-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.ta-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }

.ta-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ta-table th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--text-secondary); background: var(--border-light); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; position: relative; }
.ta-table th.sortable { cursor: pointer; }
.ta-table th.sortable:hover { color: var(--brand); }
.ta-table th.sortable .sort-arrow { display: inline-block; margin-left: 4px; opacity: 0.3; font-size: 10px; }
.ta-table th.sortable.asc .sort-arrow, .ta-table th.sortable.desc .sort-arrow { opacity: 1; color: var(--brand); }
.ta-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-light); color: var(--text); white-space: nowrap; }
.ta-table tbody tr:hover { background: rgba(70,95,255,0.02); }
.dark .ta-table tbody tr:hover { background: rgba(70,95,255,0.06); }
.ta-table .sticky-header th { position: sticky; top: 0; z-index: 1; }
.ta-table th.resizable { position: relative; padding-right: 12px !important; }
.ta-table th .resize-handle { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; background: transparent; z-index: 1; }
.ta-table th .resize-handle:hover { background: var(--brand); opacity: 0.4; }
.ta-table th.resizing { background: var(--brand) !important; opacity: 0.1; }
.ta-table--fixed { table-layout: fixed; }
.ta-table--fixed th, .ta-table--fixed td { white-space: nowrap; overflow: visible; text-overflow: clip; }
.ta-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; transition: border var(--transition); }
.ta-table-wrap .ta-table { min-width: 100%; }

.ta-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 500; line-height: 1.4; }
.ta-badge-success { background: var(--success-light); color: #059669; }
.ta-badge-warning { background: var(--warning-light); color: #D97706; }
.ta-badge-error { background: var(--error-light); color: #DC2626; }
.ta-badge-muted { background: var(--border-light); color: var(--text-muted); }
.ta-badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.ta-badge-info { background: rgba(70,95,255,0.08); color: var(--brand); }
.ta-badge-secondary { background: var(--border-light); color: var(--text-secondary); }
.ta-badge-danger { background: var(--error-light); color: #DC2626; }
.ta-badge-primary { background: var(--brand-light); color: var(--brand); }

.ta-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.ta-tab { padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s; }
.ta-tab:hover { color: var(--text); }
.ta-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.ta-toggle { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #CBD5E1; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.ta-toggle.active { background: var(--brand); }
.ta-toggle .knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.ta-toggle.active .knob { transform: translateX(16px); }

.ta-checkbox { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #CBD5E1; appearance: none; cursor: pointer; flex-shrink: 0; background: var(--card-bg); transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; }
.ta-checkbox:checked { background: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.ta-checkbox-xs { width: 14px; height: 14px; }

.ta-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.ta-modal-overlay.show { display: flex; }
.ta-modal { background: var(--card-bg); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); width: 720px; max-width: 92vw; max-height: 85vh; overflow-y: auto; padding: 24px; transition: background var(--transition); }
.ta-modal-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.ta-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }

.ta-alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.ta-alert-warning { background: var(--warning-light); color: #92400E; }
.ta-alert-error { background: var(--error-light); color: #991B1B; }
.ta-alert-success { background: var(--success-light); color: #065F46; }
.ta-alert-info { background: var(--brand-light); color: #3730A3; }

.ta-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 16px; }
.ta-page-btn { padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; color: var(--text-secondary); background: var(--card-bg); cursor: pointer; transition: all 0.15s; }
.ta-page-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.ta-page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.ta-page-btn:disabled { opacity: 0.4; cursor: default; }
.ta-page-info { font-size: 12px; color: var(--text-muted); margin: 0 8px; }

.ta-dropdown { position: relative; display: inline-block; }
.ta-dropdown-content { position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 50; min-width: 160px; display: none; }
.ta-dropdown-content.show { display: block; }

.ta-separator { width: 1px; height: 16px; background: var(--border); flex-shrink: 0; }

.ta-filter-item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 12px; cursor: pointer; background: var(--card-bg); color: var(--text-secondary); transition: all 0.15s; }
.ta-filter-item:hover { border-color: var(--brand); color: var(--brand); }
.ta-filter-item.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.ta-filter-item .count { font-weight: 600; }

.ta-switch { width: 28px; height: 16px; border-radius: 16px; background: #CBD5E1; position: relative; cursor: pointer; flex-shrink: 0; }
.ta-switch.active { background: var(--success); }
.ta-switch .knob { width: 12px; height: 12px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.ta-switch.active .knob { transform: translateX(12px); }

.ta-id-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-family: ui-monospace, monospace; background: var(--border-light); padding: 2px 8px; border-radius: 4px; }
.ta-id-tag .del { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--text-muted); padding: 0; line-height: 1; }
.ta-id-tag .del:hover { color: var(--error); }
.ta-id-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.ta-rule-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.ta-rule-remove { background: none; border: none; cursor: pointer; font-size: 16px; color: var(--text-muted); padding: 2px 4px; }
.ta-rule-remove:hover { color: var(--error); }

.ta-status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.ta-status-dot.on { background: var(--success); }
.ta-status-dot.off { background: var(--text-muted); }

.ta-detail-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 13px; }
.ta-detail-item.ok { background: var(--success-light); }
.ta-detail-item.fail { background: var(--error-light); }

.ta-toast { position: fixed; bottom: 24px; right: 24px; z-index: 9999; background: #1C2434; color: #fff; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 13px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); opacity: 0; transform: translateY(10px); transition: all 0.3s; }
.ta-toast.show { opacity: 1; transform: translateY(0); }
.ta-toast.error { background: var(--error); }
.ta-toast.success { background: var(--success); }
.ta-toast.warn { background: var(--warning); color: #1a1a1a; }
.ta-toast.warning { background: var(--warning); color: #1a1a1a; }

.ta-health-pill { position: fixed; bottom: 64px; right: 24px; z-index: 9998; display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; font-size: 11px; background: var(--card-bg); border: 1px solid var(--border); cursor: pointer; box-shadow: var(--shadow-sm); color: var(--text-secondary); }
.ta-health-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.ta-health-pill .dot.ok { background: var(--success); }
.ta-health-pill .dot.fail { background: var(--error); }
.ta-health-pill .dot.checking { background: var(--warning); animation: pulse 1s infinite; }
.ta-health-pill .dot.unknown { background: var(--text-muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Stat value */
.ta-stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--text); }
.ta-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }

/* Trend indicators */
.ta-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.ta-trend.up { color: var(--success); }
.ta-trend.down { color: var(--error); }

/* Chart card */
.ta-chart-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; transition: background var(--transition), border var(--transition); }
.ta-chart-card .chart-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; }
.ta-chart-card .chart-container { width: 100%; height: 220px; }

/* Skeleton loading */
.ta-skeleton { background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
.ta-skeleton-text { height: 12px; margin-bottom: 8px; width: 100%; }
.ta-skeleton-text-sm { height: 10px; width: 60%; }
.ta-skeleton-title { height: 16px; width: 40%; margin-bottom: 12px; }
.ta-skeleton-card { height: 100px; }
.ta-skeleton-chart { height: 220px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Responsive */
@media (max-width: 1024px) {
  .ta-sidebar:not(.mobile-show) { transform: translateX(-100%); position: fixed; z-index: 50; height: 100vh; }
  .ta-sidebar.mobile-show { transform: translateX(0); position: fixed; z-index: 50; height: 100vh; }
  .ta-sidebar-overlay.show { display: block; }
  .ta-main-wrap { margin-left: 0 !important; }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 640px) {
  .grid-cols-4 { grid-template-columns: 1fr !important; }
  .grid-cols-2 { grid-template-columns: 1fr !important; }
  .grid-cols-3 { grid-template-columns: 1fr !important; }
  .ta-header .breadcrumb { font-size: 12px; }
  .ta-card-body { padding: 12px; }
  main { padding: 12px !important; }
  .ta-stat-value { font-size: 22px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Helper */
.hidden { display: none !important; }
.col-hidden { display: none !important; }

/* ===== 可配置列表表格（callback / history / health 共用，原先三页各复制一份） ===== */
.cb-table-wrap { overflow-x: auto; max-height: 65vh; border: 1px solid var(--border); border-radius: 8px; }
.cb-table-wrap::-webkit-scrollbar { height: 6px; width: 6px; }
.cb-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.col-resize-handle { position: absolute; top: 0; right: 0; width: 4px; height: 100%; cursor: col-resize; background: transparent; z-index: 2; }
.col-resize-handle:hover, .col-resize-handle:active { background: var(--brand); opacity: .5; }
.cb-panel-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 4px; cursor: default; font-size: 12px; }
.cb-panel-row:hover { background: rgba(148, 163, 184, .12); }
.cb-panel-row.dragging { opacity: .4; }
.cb-panel-drag { cursor: grab; color: var(--text-muted); user-select: none; }
.cb-panel-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 定时任务规则编辑器（tasks 页新建/编辑弹窗） ===== */
.rule-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.rule-row select, .rule-row input { font-size: 12px; }
.rule-row .rule-action-sel { flex: 1 1 130px; min-width: 110px; }
.rule-row .rule-time-input { flex: 0 0 110px; }
.rule-row .rule-days-sel { flex: 0 0 90px; }
.rule-row .rule-remove {
  flex: 0 0 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer; font-size: 12px;
}
.rule-row .rule-remove:hover { color: var(--error); border-color: var(--error); }
