
    /*
     * TaskFlow 使用单文件 CSS，采用类似 Tailwind 的设计令牌与组件化类名，
     * 不依赖构建工具或外部资源，打开文件即可使用。
     */
    :root {
      color-scheme: light;
      --bg: #f5f7fa;
      --bg-accent: #eef4ff;
      --surface: #ffffff;
      --surface-soft: #f8fafc;
      --surface-muted: #f1f5f9;
      --text: #172033;
      --text-soft: #64748b;
      --text-faint: #94a3b8;
      --line: #e5eaf1;
      --line-strong: #d5deea;
      --primary: #3b82f6;
      --primary-dark: #2563eb;
      --primary-soft: #eaf2ff;
      --primary-contrast: #ffffff;
      --danger: #ef4444;
      --danger-soft: #fff0f0;
      --warning: #f59e0b;
      --warning-soft: #fff7e6;
      --success: #10b981;
      --success-soft: #e8fbf4;
      --violet: #8b5cf6;
      --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .03);
      --shadow-md: 0 16px 40px rgba(15, 23, 42, .10), 0 3px 10px rgba(15, 23, 42, .04);
      --radius-sm: 10px;
      --radius-md: 16px;
      --radius-lg: 24px;
      --transition: 0.2s ease;
    }

    [data-theme="dark"] {
      color-scheme: dark;
      --bg: #111827;
      --bg-accent: #18243a;
      --surface: #1f2937;
      --surface-soft: #243244;
      --surface-muted: #29384b;
      --text: #f1f5f9;
      --text-soft: #a9b7ca;
      --text-faint: #718096;
      --line: #334155;
      --line-strong: #475569;
      --primary: #60a5fa;
      --primary-dark: #93c5fd;
      --primary-soft: rgba(96, 165, 250, .14);
      --primary-contrast: #10203a;
      --danger: #f87171;
      --danger-soft: rgba(248, 113, 113, .13);
      --warning: #fbbf24;
      --warning-soft: rgba(251, 191, 36, .13);
      --success: #34d399;
      --success-soft: rgba(52, 211, 153, .13);
      --violet: #a78bfa;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, .18), 0 5px 16px rgba(0, 0, 0, .10);
      --shadow-md: 0 18px 45px rgba(0, 0, 0, .28), 0 4px 12px rgba(0, 0, 0, .14);
    }

    * { box-sizing: border-box; }
    html { min-width: 320px; scroll-behavior: smooth; }
    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at 86% -10%, var(--bg-accent) 0, transparent 30rem),
        var(--bg);
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      font-size: 15px;
      line-height: 1.5;
      transition: background var(--transition), color var(--transition);
    }
    button, input, textarea, select { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
    [tabindex]:focus-visible {
      outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
      outline-offset: 2px;
    }
    ::selection { background: color-mix(in srgb, var(--primary) 24%, transparent); }

    .app-shell { min-height: 100vh; }
    .topbar {
      position: sticky;
      top: 0;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 72px;
      padding: 14px max(20px, calc((100vw - 1180px) / 2));
      background: color-mix(in srgb, var(--bg) 88%, transparent);
      border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    .brand {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      color: var(--text);
      text-decoration: none;
      font-weight: 800;
      letter-spacing: -.035em;
      font-size: 21px;
    }
    .brand-mark {
      display: grid;
      width: 39px;
      height: 39px;
      place-items: center;
      color: #fff;
      background: linear-gradient(135deg, var(--primary), #7c3aed);
      border-radius: 13px;
      box-shadow: 0 7px 18px color-mix(in srgb, var(--primary) 30%, transparent);
    }
    .brand-mark svg { width: 23px; height: 23px; }
    .brand-subtitle {
      display: block;
      margin-left: 2px;
      color: var(--text-faint);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .05em;
      line-height: 1;
      text-transform: uppercase;
    }
    .header-actions { display: flex; align-items: center; gap: 8px; }
    .icon-btn, .ghost-btn, .primary-btn, .danger-btn, .text-btn {
      border: 0;
      transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
    }
    .icon-btn {
      display: inline-grid;
      width: 42px;
      height: 42px;
      place-items: center;
      color: var(--text-soft);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 12px;
      box-shadow: var(--shadow-sm);
    }
    .icon-btn:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); transform: translateY(-1px); }
    .icon-btn svg { width: 19px; height: 19px; }
    .theme-sun { display: block; }
    .theme-moon { display: none; }
    [data-theme="dark"] .theme-sun { display: none; }
    [data-theme="dark"] .theme-moon { display: block; }

    .page-container {
      width: min(1180px, calc(100% - 40px));
      margin: 0 auto;
      padding: 42px 0 60px;
    }
    .hero {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 30px;
    }
    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      margin: 0 0 10px;
      color: var(--primary);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .15em;
    }
    .eyebrow::before {
      width: 22px;
      height: 2px;
      background: var(--primary);
      border-radius: 4px;
      content: "";
    }
    .hero h1 {
      max-width: 650px;
      margin: 0;
      color: var(--text);
      font-size: clamp(29px, 4.5vw, 46px);
      font-weight: 800;
      letter-spacing: -.055em;
      line-height: 1.1;
    }
    .hero-copy p:last-child {
      max-width: 570px;
      margin: 13px 0 0;
      color: var(--text-soft);
      font-size: 15px;
    }
    .date-chip {
      display: inline-flex;
      flex: 0 0 auto;
      align-items: center;
      gap: 8px;
      padding: 11px 14px;
      color: var(--text-soft);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 12px;
      box-shadow: var(--shadow-sm);
      font-size: 13px;
      white-space: nowrap;
    }
    .date-chip svg { width: 16px; height: 16px; color: var(--primary); }

    .dashboard-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(280px, 1.45fr);
      gap: 13px;
      margin-bottom: 18px;
    }
    .stat-card, .progress-card, .panel, .task-composer, .insight-card {
      background: var(--surface);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
      transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    }
    .stat-card {
      min-height: 126px;
      padding: 18px;
      border-radius: var(--radius-md);
    }
    .stat-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .stat-label { color: var(--text-soft); font-size: 12px; font-weight: 650; }
    .stat-icon {
      display: grid;
      width: 31px;
      height: 31px;
      place-items: center;
      border-radius: 9px;
    }
    .stat-icon svg { width: 16px; height: 16px; }
    .stat-total .stat-icon { color: var(--primary); background: var(--primary-soft); }
    .stat-active .stat-icon { color: var(--warning); background: var(--warning-soft); }
    .stat-completed .stat-icon { color: var(--success); background: var(--success-soft); }
    .stat-overdue .stat-icon { color: var(--danger); background: var(--danger-soft); }
    .stat-value {
      display: block;
      margin-top: 13px;
      color: var(--text);
      font-size: 30px;
      font-weight: 800;
      letter-spacing: -.05em;
      line-height: 1;
    }
    .progress-card {
      min-height: 126px;
      padding: 18px 20px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, var(--surface)), var(--surface));
    }
    .progress-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
    .progress-heading h2 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
    .progress-heading p { margin: 4px 0 0; color: var(--text-soft); font-size: 12px; }
    .progress-percent { color: var(--primary); font-size: 23px; font-weight: 800; line-height: 1; }
    .progress-track {
      height: 9px;
      margin-top: 19px;
      overflow: hidden;
      background: var(--surface-muted);
      border-radius: 99px;
    }
    .progress-fill {
      width: 0;
      height: 100%;
      background: linear-gradient(90deg, var(--primary), #8b5cf6);
      border-radius: inherit;
      transition: width .45s ease;
    }
    .progress-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--text-faint); font-size: 11px; }

    .task-composer {
      margin-bottom: 24px;
      padding: 18px;
      border-radius: var(--radius-lg);
    }
    .composer-main { display: flex; gap: 10px; align-items: stretch; }
    .field-wrap { position: relative; flex: 1; }
    .field-wrap > svg {
      position: absolute;
      top: 50%;
      left: 14px;
      width: 18px;
      height: 18px;
      color: var(--text-faint);
      pointer-events: none;
      transform: translateY(-50%);
    }
    .field, .select-field, .textarea-field {
      width: 100%;
      color: var(--text);
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 11px;
      transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    }
    .field, .select-field { height: 46px; padding: 0 13px; }
    .field-wrap .field { padding-left: 42px; }
    .textarea-field { min-height: 76px; padding: 11px 13px; resize: vertical; }
    .field::placeholder, .textarea-field::placeholder { color: var(--text-faint); }
    .field:hover, .select-field:hover, .textarea-field:hover { border-color: var(--line-strong); }
    .field:focus, .select-field:focus, .textarea-field:focus {
      outline: 0;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
    }
    .primary-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 46px;
      padding: 0 20px;
      color: var(--primary-contrast);
      background: var(--primary);
      border-radius: 11px;
      box-shadow: 0 6px 15px color-mix(in srgb, var(--primary) 23%, transparent);
      font-weight: 750;
      white-space: nowrap;
    }
    .primary-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 30%, transparent); }
    .primary-btn:active, .ghost-btn:active, .danger-btn:active, .icon-btn:active { transform: translateY(0) scale(.98); }
    .primary-btn svg, .ghost-btn svg, .danger-btn svg { width: 16px; height: 16px; }
    .composer-fields {
      display: grid;
      grid-template-columns: minmax(180px, 1.5fr) minmax(150px, .85fr) minmax(130px, .75fr) minmax(180px, 1.15fr);
      gap: 10px;
      margin-top: 12px;
    }
    .composer-field-label { display: block; margin: 0 0 6px 2px; color: var(--text-soft); font-size: 11px; font-weight: 650; }
    .composer-hint { display: flex; align-items: center; gap: 6px; margin: 12px 2px 0; color: var(--text-faint); font-size: 11px; }
    .kbd {
      display: inline-flex;
      min-width: 21px;
      min-height: 19px;
      align-items: center;
      justify-content: center;
      padding: 0 5px;
      color: var(--text-soft);
      background: var(--surface-muted);
      border: 1px solid var(--line);
      border-bottom-width: 2px;
      border-radius: 5px;
      font-size: 10px;
      font-weight: 700;
      line-height: 1;
    }

    .panel { padding: 20px; border-radius: var(--radius-lg); }
    .workspace { min-width: 0; }
    .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
    .section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
    .section-heading p { margin: 4px 0 0; color: var(--text-soft); font-size: 12px; }
    .section-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
    .ghost-btn, .danger-btn, .text-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 37px;
      padding: 0 12px;
      border-radius: 9px;
      font-size: 12px;
      font-weight: 650;
    }
    .ghost-btn { color: var(--text-soft); background: var(--surface-soft); border: 1px solid var(--line); }
    .ghost-btn:hover { color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
    .danger-btn { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 18%, var(--line)); }
    .danger-btn:hover { background: color-mix(in srgb, var(--danger) 19%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
    .text-btn { min-height: 31px; padding: 0 8px; color: var(--text-soft); background: transparent; }
    .text-btn:hover { color: var(--primary); background: var(--primary-soft); }
    .hidden-input { display: none; }

    .tabs {
      display: flex;
      gap: 5px;
      margin-bottom: 14px;
      padding: 5px;
      overflow-x: auto;
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 12px;
      scrollbar-width: thin;
    }
    .tab-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      gap: 7px;
      min-height: 36px;
      padding: 0 13px;
      color: var(--text-soft);
      background: transparent;
      border: 0;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 700;
      transition: all var(--transition);
    }
    .tab-btn:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
    .tab-btn.active { color: var(--primary); background: var(--surface); box-shadow: var(--shadow-sm); }
    .tab-count {
      display: inline-grid;
      min-width: 20px;
      height: 20px;
      padding: 0 5px;
      place-items: center;
      color: var(--text-faint);
      background: var(--surface-muted);
      border-radius: 99px;
      font-size: 10px;
      line-height: 1;
    }
    .tab-btn.active .tab-count { color: var(--primary); background: var(--primary-soft); }

    .filter-panel {
      display: grid;
      grid-template-columns: minmax(200px, 1fr) auto minmax(145px, .3fr) minmax(155px, .35fr) auto;
      align-items: center;
      gap: 10px;
      margin-bottom: 17px;
      padding: 12px;
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 13px;
    }
    .search-wrap { position: relative; min-width: 0; }
    .search-wrap svg { position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; transform: translateY(-50%); }
    .search-wrap .field { height: 38px; padding-left: 37px; background: var(--surface); }
    .priority-filter { display: flex; align-items: center; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
    .priority-filter button {
      min-height: 30px;
      padding: 0 9px;
      color: var(--text-soft);
      background: transparent;
      border: 0;
      border-radius: 7px;
      font-size: 11px;
      font-weight: 700;
      transition: all var(--transition);
      white-space: nowrap;
    }
    .priority-filter button:hover { color: var(--text); background: var(--surface-muted); }
    .priority-filter button.active { color: var(--primary); background: var(--primary-soft); }
    .filter-select { position: relative; min-width: 0; }
    .filter-select::after { position: absolute; top: 50%; right: 11px; color: var(--text-faint); content: "⌄"; pointer-events: none; transform: translateY(-53%); }
    .filter-select .select-field { height: 38px; padding: 0 29px 0 11px; appearance: none; background: var(--surface); font-size: 12px; }
    .clear-filter { white-space: nowrap; }

    .bulk-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: -3px 0 14px;
      padding: 10px 12px;
      color: var(--primary);
      background: var(--primary-soft);
      border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
      border-radius: 11px;
    }
    .bulk-toolbar[hidden] { display: none; }
    .bulk-info { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; }
    .bulk-info svg { width: 16px; height: 16px; }
    .bulk-actions { display: flex; gap: 6px; }
    .bulk-actions button { min-height: 31px; }

    .task-list { display: grid; gap: 9px; min-height: 80px; }
    .task-card {
      position: relative;
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr) auto;
      gap: 11px;
      align-items: start;
      padding: 15px 14px 14px 17px;
      overflow: hidden;
      background: var(--surface);
      border: 1px solid var(--line);
      border-left: 4px solid var(--priority-color, var(--primary));
      border-radius: 14px;
      box-shadow: 0 2px 8px rgba(15, 23, 42, .025);
      cursor: default;
      transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), opacity var(--transition), background var(--transition);
    }
    .task-card:hover { border-color: color-mix(in srgb, var(--priority-color, var(--primary)) 35%, var(--line)); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
    .task-card.selected { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 42%, var(--line)); }
    .task-card.priority-high { --priority-color: #ef4444; }
    .task-card.priority-medium { --priority-color: #f59e0b; }
    .task-card.priority-low { --priority-color: #10b981; }
    [data-theme="dark"] .task-card.priority-high { --priority-color: #f87171; }
    [data-theme="dark"] .task-card.priority-medium { --priority-color: #fbbf24; }
    [data-theme="dark"] .task-card.priority-low { --priority-color: #34d399; }
    .task-card.dragging { opacity: .42; transform: scale(.985); }
    .task-card.drop-target { box-shadow: 0 -3px 0 var(--primary), var(--shadow-sm); }
    .task-card.is-removing { opacity: 0; transform: translateX(20px) scale(.97); }
    .task-leading { padding-top: 2px; }
    .task-check {
      display: grid;
      width: 24px;
      height: 24px;
      padding: 0;
      place-items: center;
      color: transparent;
      background: var(--surface);
      border: 2px solid var(--line-strong);
      border-radius: 8px;
      transition: all var(--transition);
    }
    .task-check:hover { border-color: var(--priority-color, var(--primary)); transform: scale(1.06); }
    .task-check.checked { color: #fff; background: var(--success); border-color: var(--success); }
    .task-check svg { width: 14px; height: 14px; stroke-width: 3; }
    .task-content { min-width: 0; }
    .task-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 20px; }
    .priority-pill, .due-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-height: 22px;
      padding: 0 7px;
      border-radius: 6px;
      font-size: 10px;
      font-weight: 750;
      line-height: 1;
    }
    .priority-pill { color: var(--priority-color); background: color-mix(in srgb, var(--priority-color) 11%, var(--surface)); }
    .due-pill { color: var(--text-soft); background: var(--surface-muted); }
    .due-pill svg { width: 12px; height: 12px; }
    .due-pill.today { color: var(--primary); background: var(--primary-soft); }
    .due-pill.overdue { color: var(--danger); background: var(--danger-soft); }
    .task-title {
      margin: 7px 0 0;
      overflow: hidden;
      color: var(--text);
      font-size: 15px;
      font-weight: 750;
      letter-spacing: -.015em;
      line-height: 1.35;
      text-overflow: ellipsis;
      white-space: nowrap;
      transition: color var(--transition);
    }
    .task-card.completed .task-title { color: var(--text-faint); text-decoration: line-through; text-decoration-thickness: 1.5px; }
    .task-description {
      display: -webkit-box;
      margin: 5px 0 0;
      overflow: hidden;
      color: var(--text-soft);
      font-size: 12px;
      line-height: 1.45;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    .task-card.completed .task-description { color: var(--text-faint); }
    .task-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
    .tag-chip {
      display: inline-flex;
      align-items: center;
      min-height: 21px;
      padding: 0 7px;
      color: var(--violet);
      background: color-mix(in srgb, var(--violet) 10%, var(--surface));
      border-radius: 6px;
      font-size: 10px;
      font-weight: 700;
    }
    .created-label { color: var(--text-faint); font-size: 10px; }
    .task-actions {
      display: flex;
      align-items: center;
      gap: 3px;
      padding-top: 1px;
    }
    .task-action, .drag-handle, .task-select {
      display: inline-grid;
      width: 31px;
      height: 31px;
      padding: 0;
      place-items: center;
      color: var(--text-faint);
      background: transparent;
      border: 0;
      border-radius: 8px;
      transition: all var(--transition);
    }
    .task-action { opacity: 0; }
    .task-card:hover .task-action, .task-card:focus-within .task-action, .task-action:focus-visible { opacity: 1; }
    .task-action:hover { color: var(--primary); background: var(--primary-soft); }
    .task-action[data-action="delete"]:hover { color: var(--danger); background: var(--danger-soft); }
    .task-select { color: var(--primary); background: var(--primary-soft); }
    .task-select:not(.selected) { color: var(--text-faint); background: transparent; }
    .task-select:hover { color: var(--primary); background: var(--primary-soft); }
    .task-select svg, .task-action svg, .drag-handle svg { width: 16px; height: 16px; }
    .drag-handle { cursor: grab; touch-action: none; }
    .drag-handle:active { cursor: grabbing; }
    .empty-state {
      display: grid;
      min-height: 220px;
      place-items: center;
      padding: 32px 20px;
      text-align: center;
      background: var(--surface-soft);
      border: 1px dashed var(--line-strong);
      border-radius: 14px;
    }
    .empty-icon {
      display: grid;
      width: 58px;
      height: 58px;
      margin: 0 auto 13px;
      place-items: center;
      color: var(--primary);
      background: var(--primary-soft);
      border-radius: 18px;
    }
    .empty-icon svg { width: 28px; height: 28px; }
    .empty-state h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
    .empty-state p { max-width: 330px; margin: 6px auto 0; color: var(--text-soft); font-size: 12px; }
    .empty-state .text-btn { margin-top: 11px; }

    .lower-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 14px; margin-top: 14px; }
    .insight-card { min-height: 190px; padding: 20px; border-radius: var(--radius-lg); }
    .insight-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
    .insight-heading h2 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
    .insight-heading span { color: var(--text-faint); font-size: 11px; }
    .tag-chart { display: grid; gap: 11px; }
    .tag-chart-empty { color: var(--text-faint); font-size: 12px; }
    .tag-row { display: grid; grid-template-columns: minmax(75px, 110px) 1fr 25px; align-items: center; gap: 10px; }
    .tag-row-label { overflow: hidden; color: var(--text-soft); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
    .tag-bar-track { height: 7px; overflow: hidden; background: var(--surface-muted); border-radius: 99px; }
    .tag-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--primary), var(--violet)); border-radius: inherit; transition: width .45s ease; }
    .tag-row-count { color: var(--text); font-size: 11px; font-weight: 750; text-align: right; }
    .tips-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
    .tip-item { display: flex; align-items: flex-start; gap: 10px; color: var(--text-soft); font-size: 12px; }
    .tip-item svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--primary); }
    .tip-item strong { color: var(--text); font-weight: 700; }
    .footer { margin-top: 28px; color: var(--text-faint); font-size: 11px; text-align: center; }

    .toast-region {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 100;
      display: grid;
      gap: 8px;
      width: min(360px, calc(100vw - 36px));
      pointer-events: none;
    }
    .toast {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      color: var(--text);
      background: var(--surface);
      border: 1px solid var(--line);
      border-left: 3px solid var(--primary);
      border-radius: 11px;
      box-shadow: var(--shadow-md);
      font-size: 12px;
      animation: toast-in .25s ease both;
      pointer-events: auto;
    }
    .toast.success { border-left-color: var(--success); }
    .toast.error { border-left-color: var(--danger); }
    .toast.warning { border-left-color: var(--warning); }
    .toast-icon { flex: 0 0 auto; color: var(--primary); }
    .toast.success .toast-icon { color: var(--success); }
    .toast.error .toast-icon { color: var(--danger); }
    .toast.warning .toast-icon { color: var(--warning); }
    .toast-icon svg { width: 17px; height: 17px; }
    .toast-message { flex: 1; padding-top: 1px; }
    .toast-close { display: grid; width: 20px; height: 20px; padding: 0; place-items: center; color: var(--text-faint); background: transparent; border: 0; }
    .toast-close:hover { color: var(--text); }
    .toast-close svg { width: 14px; height: 14px; }
    .toast.leaving { animation: toast-out .2s ease both; }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(15, 23, 42, .52);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      animation: fade-in .18s ease both;
    }
    .modal-backdrop[hidden] { display: none; }
    .modal {
      width: min(540px, 100%);
      max-height: min(720px, calc(100vh - 40px));
      overflow: auto;
      padding: 22px;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 20px;
      box-shadow: var(--shadow-md);
      animation: modal-in .22s ease both;
    }
    .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
    .modal-header h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
    .modal-header p { margin: 4px 0 0; color: var(--text-soft); font-size: 12px; }
    .modal-close { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; color: var(--text-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; }
    .modal-close:hover { color: var(--danger); background: var(--danger-soft); }
    .modal-close svg { width: 16px; height: 16px; }
    .modal-fields { display: grid; gap: 13px; }
    .modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
    .modal-label { display: block; margin: 0 0 6px 2px; color: var(--text-soft); font-size: 11px; font-weight: 700; }
    .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
    .modal-error { min-height: 17px; margin: 7px 2px -4px; color: var(--danger); font-size: 11px; }

    @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes modal-in { from { opacity: 0; transform: translateY(9px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(8px); } }
    @keyframes task-in { from { opacity: 0; transform: translateY(-7px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
    .task-card.entering { animation: task-in .28s ease both; }
    body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

    @media (max-width: 1050px) {
      .dashboard-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      .progress-card { grid-column: 1 / -1; }
      .filter-panel { grid-template-columns: minmax(190px, 1fr) auto minmax(145px, .4fr) minmax(155px, .45fr) auto; }
    }
    @media (max-width: 820px) {
      .page-container { width: min(100% - 28px, 680px); padding-top: 30px; }
      .topbar { padding-right: 14px; padding-left: 14px; }
      .hero { align-items: flex-start; flex-direction: column; gap: 16px; }
      .date-chip { align-self: flex-start; }
      .composer-fields { grid-template-columns: 1fr 1fr; }
      .filter-panel { grid-template-columns: 1fr 1fr; }
      .search-wrap { grid-column: 1 / -1; }
      .clear-filter { justify-self: start; }
      .lower-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 560px) {
      .page-container { width: calc(100% - 22px); padding-top: 24px; padding-bottom: 42px; }
      .brand-subtitle { display: none; }
      .topbar { min-height: 63px; }
      .brand { font-size: 19px; }
      .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
      .hero h1 { font-size: 31px; }
      .hero-copy p:last-child { font-size: 13px; }
      .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
      .stat-card { min-height: 108px; padding: 14px; }
      .stat-value { margin-top: 10px; font-size: 26px; }
      .progress-card { grid-column: 1 / -1; min-height: 118px; padding: 15px; }
      .task-composer, .panel, .insight-card { padding: 14px; border-radius: 17px; }
      .composer-main { flex-direction: column; }
      .composer-main .primary-btn { width: 100%; }
      .composer-fields { grid-template-columns: 1fr; gap: 9px; }
      .composer-fields > div:first-child { order: 1; }
      .composer-fields > div:nth-child(2) { order: 2; }
      .composer-fields > div:nth-child(3) { order: 3; }
      .composer-fields > div:nth-child(4) { order: 4; }
      .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
      .section-actions { justify-content: flex-start; width: 100%; }
      .section-actions button { flex: 1; }
      .tabs { margin-right: -2px; margin-left: -2px; }
      .tab-btn { padding: 0 10px; }
      .filter-panel { grid-template-columns: 1fr; padding: 9px; }
      .search-wrap, .priority-filter { grid-column: auto; }
      .priority-filter { justify-content: space-between; }
      .priority-filter button { flex: 1; padding: 0 5px; }
      .filter-select, .clear-filter { width: 100%; }
      .clear-filter { justify-content: center; }
      .bulk-toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
      .bulk-actions { width: 100%; }
      .bulk-actions button { flex: 1; }
      .task-card { grid-template-columns: 27px minmax(0, 1fr); gap: 9px; padding: 13px 10px 12px 12px; }
      .task-actions { grid-column: 2; justify-content: flex-start; margin-top: -4px; }
      .task-action { opacity: 1; }
      .task-title { white-space: normal; }
      .task-select { margin-left: auto; }
      .task-meta-row { padding-right: 2px; }
      .modal-row { grid-template-columns: 1fr; gap: 13px; }
      .modal { padding: 17px; border-radius: 17px; }
      .toast-region { right: 11px; bottom: 11px; width: calc(100vw - 22px); }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    }
  