/* ===== CSS 变量 & 基础重置 ===== */
:root {
  --bg-deep: #0a0a0f;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.1);
  --border-focus: rgba(99,102,241,0.6);

  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99,102,241,0.3);
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --sidebar-w: 240px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ===== 认证页 ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.auth-bg {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 60% 80%, rgba(6,182,212,0.08) 0%, transparent 50%);
}
.auth-orbs { position: absolute; inset: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.4; animation: float 8s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: var(--secondary); bottom: -80px; right: -80px; animation-delay: -3s; }
.orb-3 { width: 200px; height: 200px; background: var(--accent); top: 50%; left: 50%; animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.auth-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 20px; }

.auth-card {
  background: rgba(15,15,25,0.85);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin-bottom: 16px;
}
.auth-logo svg { width: 56px; height: 56px; }
.auth-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.875rem; }

/* Tabs */
.auth-tabs {
  display: flex; position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 28px;
}
.tab-btn {
  flex: 1; padding: 8px 0; font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary); background: transparent;
  border-radius: calc(var(--radius) - 2px);
  transition: color var(--transition);
  position: relative; z-index: 1;
}
.tab-btn.active { color: var(--text-primary); }
.tab-indicator {
  position: absolute; top: 4px; left: 4px;
  width: calc(50% - 4px); height: calc(100% - 8px);
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: calc(var(--radius) - 4px);
  transition: transform var(--transition);
}
.tab-indicator.right { transform: translateX(100%); }

/* Forms */
.auth-form.hidden { display: none; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.825rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 7px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
}
.form-input {
  width: 100%; padding: 10px 12px 10px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: var(--text-muted); }

.form-error {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 0.825rem; color: #fca5a5;
  margin-bottom: 14px;
}
.form-error.hidden { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; margin-top: 4px; padding: 12px; }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.btn-danger { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.btn-success:hover { background: rgba(16,185,129,0.25); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-icon svg { width: 16px; height: 16px; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ===== 主控制台布局 ===== */
.dashboard { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: rgba(8,8,16,0.9);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.sidebar-logo-text { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.sidebar-logo-text span { display: block; font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-section-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  padding: 8px 12px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  margin-bottom: 2px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.nav-item.active {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.2);
}

.sidebar-bottom {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}
.user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; flex-shrink: 0;
}
.user-name { font-size: 0.85rem; font-weight: 500; flex: 1; }
.logout-btn {
  background: transparent; padding: 6px;
  border-radius: 6px; color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
.logout-btn svg { width: 16px; height: 16px; display: block; }

/* Main content */
.main-content {
  flex: 1; margin-left: var(--sidebar-w);
  min-height: 100vh; display: flex; flex-direction: column;
}
.page { display: none; flex: 1; flex-direction: column; }
.page.active { display: flex; }

.page-header {
  padding: 28px 32px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-bottom: 20px;
}
.page-title { font-size: 1.4rem; font-weight: 700; }
.page-subtitle { color: var(--text-secondary); font-size: 0.85rem; margin-top: 4px; }

.page-body { padding: 28px 32px; flex: 1; overflow-y: auto; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), background var(--transition);
}
.card:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.15); }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* ===== Account 卡片 ===== */
.account-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.account-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.account-alias { font-weight: 600; font-size: 0.95rem; }
.account-username { color: var(--text-secondary); font-size: 0.8rem; margin-top: 2px; }
.account-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ===== Task 卡片 ===== */
.task-card { position: relative; overflow: hidden; }
.task-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0; transition: opacity var(--transition);
}
.task-card.running::before { opacity: 1; }
.task-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 500;
}
.status-running {
  background: rgba(16,185,129,0.15); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.3);
}
.status-idle {
  background: rgba(148,163,184,0.1); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.status-error { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.status-stopped {
  background: rgba(100,116,139,0.15); color: var(--text-muted);
  border: 1px solid rgba(100,116,139,0.3);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.status-running .status-dot { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.task-name { font-weight: 600; font-size: 0.95rem; margin: 10px 0 4px; }
.task-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  color: var(--text-muted); font-size: 0.78rem;
  margin-bottom: 14px;
}
.task-meta-item { display: flex; align-items: center; gap: 4px; }
.task-meta-item svg { width: 13px; height: 13px; }
.task-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 日志面板 ===== */
.log-panel {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1; display: flex; flex-direction: column;
}
.log-toolbar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.02);
}
.log-title { font-size: 0.85rem; font-weight: 500; flex: 1; }
.log-body {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.78rem; line-height: 1.7;
  color: #a8b4c8;
  min-height: 300px; max-height: 500px;
}
.log-line { white-space: pre-wrap; word-break: break-all; }
.log-line.info { color: #93c5fd; }
.log-line.warn { color: #fcd34d; }
.log-line.error { color: #fca5a5; }
.log-line.success { color: #6ee7b7; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: rgba(14,14,24,0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-weight: 600; font-size: 1.05rem; }
.modal-close {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ===== 表单元素（通用）===== */
.form-input-bare {
  width: 100%; padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input-bare:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input-bare::placeholder { color: var(--text-muted); }

select.form-input-bare { appearance: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-check {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 0.875rem; color: var(--text-secondary);
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
}

/* ===== 课程选择器 ===== */
.course-list {
  max-height: 280px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
}
.course-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; transition: background var(--transition);
}
.course-item:last-child { border-bottom: none; }
.course-item:hover { background: rgba(255,255,255,0.04); }
.course-item input[type="checkbox"] { accent-color: var(--primary); flex-shrink: 0; }
.course-item-info { flex: 1; min-width: 0; }
.course-item-title { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-item-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ===== 设置页 ===== */
.settings-section {
  margin-bottom: 28px;
}
.settings-section-title {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ===== 空状态 ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; text-align: center;
}
.empty-icon {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-icon svg { width: 28px; height: 28px; color: var(--text-muted); }
.empty-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.empty-desc { color: var(--text-secondary); font-size: 0.875rem; }

/* ===== Toast 通知 ===== */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(20,20,35,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; min-width: 260px; max-width: 380px;
  animation: toastIn 0.25s ease;
  pointer-events: auto;
}
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.out { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut {
  to { transform: translateX(100%); opacity: 0; }
}
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--accent); }

/* ===== 加载状态 ===== */
.loading-spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

/* ===== 统计卡片 ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-value.primary { color: #a5b4fc; }
.stat-value.success { color: #6ee7b7; }
.stat-value.warning { color: #fcd34d; }

/* ===== 响应式 ===== */
.mobile-header {
  display: none;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* 日志页专用非响应式基础样式（避免在手机端继承多余样式） */
.log-page-body {
  display: flex;
  flex-direction: column;
}
.log-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(8, 8, 16, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 90;
  }
  .menu-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background var(--transition);
  }
  .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  .menu-toggle svg {
    width: 20px;
    height: 20px;
  }
  .mobile-header-title {
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #a5b4fc, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .page-header {
    padding: 20px 20px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid var(--border);
  }
  /* 确保日志页头部在移动端覆盖正确 */
  .log-page-header {
    padding: 20px 20px 16px !important;
  }
  .page-body {
    padding: 20px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .log-panel {
    min-height: 400px;
  }
  .log-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .log-header-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .log-header-actions select {
    width: 100% !important;
  }
  .log-header-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 10px;
  }
  .modal-header, .modal-body, .modal-footer {
    padding: 14px 16px;
  }
  .account-actions, .task-actions {
    flex-direction: column;
  }
  .account-actions button, .task-actions button {
    width: 100%;
  }
}

.status-completed{color:var(--success);background:rgba(16,185,129,.12)}
.status-incomplete{color:var(--warning);background:rgba(245,158,11,.12)}
.status-paused{color:var(--text-secondary);background:var(--bg-input)}
.task-error{font-size:.8rem;color:var(--warning);overflow-wrap:anywhere;margin:10px 0}
.task-progress{font-size:.8rem;color:var(--text-secondary);margin:10px 0;overflow-wrap:anywhere}
