:root {
      --bg: #f4f6f8;
      --panel: #ffffff;
      --panel-soft: #f9fbfc;
      --text: #18212d;
      --muted: #667085;
      --line: #d9e1e8;
      --line-strong: #b8c4cf;
      --accent: #0f766e;
      --accent-soft: #e6f4f1;
      --blue: #2563eb;
      --amber: #b45309;
      --red: #b42318;
      --green: #147d4f;
      --shadow: 0 16px 44px rgba(24, 33, 45, 0.12);
      --focus: #9edbd4;
    }

    [data-theme="dark"] {
      --bg: #0f1419;
      --panel: #1a1f26;
      --panel-soft: #151a20;
      --text: #e4e7eb;
      --muted: #9ca3af;
      --line: #2d3748;
      --line-strong: #3d4758;
      --accent: #14b8a6;
      --accent-soft: #0f2d2a;
      --blue: #3b82f6;
      --amber: #f59e0b;
      --red: #ef4444;
      --green: #10b981;
      --shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
      --focus: #0d9488;
    }

    [data-theme="dark"] body {
      color-scheme: dark;
    }

    [data-theme="dark"] .login-panel,
    [data-theme="dark"] .sidebar {
      background: rgba(26, 31, 38, 0.96);
    }

    [data-theme="dark"] .topbar {
      background: rgba(15, 20, 25, 0.92);
    }

    [data-theme="dark"] input,
    [data-theme="dark"] select,
    [data-theme="dark"] textarea {
      background: #0f1419;
      border-color: var(--line-strong);
      color: var(--text);
    }

    [data-theme="dark"] input:focus,
    [data-theme="dark"] select:focus,
    [data-theme="dark"] textarea:focus {
      background: #1a1f26;
    }

    [data-theme="dark"] button.secondary {
      background: #1a1f26;
      border-color: var(--line-strong);
      color: var(--text);
    }

    [data-theme="dark"] .table-wrap,
    [data-theme="dark"] .filter-rule-table-wrap,
    [data-theme="dark"] .entity-detail-table-wrap {
      background: var(--panel);
    }

    [data-theme="dark"] th {
      background: #151a20;
    }

    [data-theme="dark"] .card,
    [data-theme="dark"] .plugin-card,
    [data-theme="dark"] .platform-login-card {
      background: var(--panel);
    }

    [data-theme="dark"] .modal {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .modal-backdrop {
      background: rgba(0, 0, 0, 0.7);
    }

    [data-theme="dark"] .toast {
      background: rgba(26, 31, 38, 0.96);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-hero,
    [data-theme="dark"] .plugin-hero,
    [data-theme="dark"] .config-hero {
      background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.06)), var(--panel);
    }

    [data-theme="dark"] .dashboard-clean-hero {
      background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.06)), var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-clean-hero.warn {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(59, 130, 246, 0.04)), var(--panel);
      border-color: rgba(245, 158, 11, 0.32);
    }

    [data-theme="dark"] .dashboard-clean-metric {
      background: rgba(26, 31, 38, 0.72);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-clean-metric.warn {
      background: rgba(245, 158, 11, 0.10);
      border-color: rgba(245, 158, 11, 0.30);
    }

    [data-theme="dark"] .dashboard-clean-card,
    [data-theme="dark"] .dashboard-clean-info-row,
    [data-theme="dark"] .dashboard-clean-chip,
    [data-theme="dark"] .dashboard-clean-line,
    [data-theme="dark"] .dashboard-clean-empty {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .dashboard-status-banner {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-status-banner.ok {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--panel));
      border-color: rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .dashboard-status-banner.warn {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--panel));
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .dashboard-status-badge.bad {
      background: rgba(239, 68, 68, 0.15);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .dashboard-status-badge.warn {
      background: rgba(245, 158, 11, 0.15);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .dashboard-metric-card-new {
      background: rgba(26, 31, 38, 0.8);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-metric-card-new.warn {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .dashboard-metric-icon {
      background: var(--panel);
    }

    [data-theme="dark"] .dashboard-panel {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-panel-header {
      background: var(--panel-soft);
    }

    [data-theme="dark"] .dashboard-panel-icon {
      background: var(--panel);
    }

    [data-theme="dark"] .dashboard-card-item {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .dashboard-card-item:hover {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-card-id {
      background: rgba(255, 255, 255, 0.05);
    }

    [data-theme="dark"] .dashboard-card-status.ok {
      background: rgba(16, 185, 129, 0.15);
      border-color: rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .dashboard-card-status.warn {
      background: rgba(245, 158, 11, 0.15);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .dashboard-card-status.bad {
      background: rgba(239, 68, 68, 0.15);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .dashboard-delivery-stat {
      background: rgba(26, 31, 38, 0.6);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-delivery-stat.ok {
      background: rgba(16, 185, 129, 0.1);
      border-color: rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .dashboard-delivery-stat.warn {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .dashboard-delivery-stat.info {
      background: rgba(59, 130, 246, 0.1);
      border-color: rgba(59, 130, 246, 0.3);
    }

    [data-theme="dark"] .dashboard-delivery-stat.bad {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .dashboard-failure-item {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .dashboard-metric-card,
    [data-theme="dark"] .dashboard-queue-card,
    [data-theme="dark"] .plugin-summary-card {
      background: rgba(26, 31, 38, 0.8);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .dashboard-metric-card.green,
    [data-theme="dark"] .dashboard-queue-card.ok {
      background: rgba(16, 185, 129, 0.1);
      border-color: rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .dashboard-metric-card.amber,
    [data-theme="dark"] .dashboard-queue-card.warn {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .dashboard-metric-card.blue,
    [data-theme="dark"] .dashboard-queue-card.info {
      background: rgba(59, 130, 246, 0.1);
      border-color: rgba(59, 130, 246, 0.3);
    }

    [data-theme="dark"] .dashboard-queue-card.bad {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .dashboard-metric-card.accent {
      background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(26, 31, 38, 0.8));
      border-color: rgba(20, 184, 166, 0.3);
    }

    [data-theme="dark"] .stat {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .stat b {
      background: linear-gradient(135deg, var(--accent), var(--blue));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    [data-theme="dark"] .panel-soft,
    [data-theme="dark"] .dashboard-card-item,
    [data-theme="dark"] .target-choice,
    [data-theme="dark"] .create-filter-item,
    [data-theme="dark"] .rule-row,
    [data-theme="dark"] .entity-filter-bar {
      background: var(--panel-soft);
    }

    [data-theme="dark"] .dashboard-empty,
    [data-theme="dark"] .entity-detail-empty {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .entity-filter-summary {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .entity-filter-divider {
      background: var(--line);
    }

    [data-theme="dark"] .subscription-card {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .publisher-follow-option {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .subscription-target-card {
      background: linear-gradient(135deg, rgba(79, 143, 232, 0.05), var(--panel));
      border-color: rgba(79, 143, 232, 0.4);
    }

    [data-theme="dark"] .subscription-publisher-card {
      background: linear-gradient(135deg, rgba(201, 120, 22, 0.05), var(--panel));
      border-color: rgba(201, 120, 22, 0.4);
    }

    [data-theme="dark"] .subscription-policy-card {
      background: linear-gradient(135deg, rgba(47, 159, 120, 0.05), var(--panel));
      border-color: rgba(47, 159, 120, 0.4);
    }

    [data-theme="dark"] .subscription-filter-card {
      background: linear-gradient(135deg, rgba(6, 182, 212, 0.07), var(--panel));
      border-color: rgba(6, 182, 212, 0.38);
    }

    [data-theme="dark"] .brand-mark { background: transparent; }

    [data-theme="dark"] .pill.ok {
      background: rgba(16, 185, 129, 0.15);
      color: var(--green);
    }

    [data-theme="dark"] .pill.bad {
      background: rgba(239, 68, 68, 0.15);
      color: var(--red);
    }

    [data-theme="dark"] .pill.warn {
      background: rgba(245, 158, 11, 0.15);
      color: var(--amber);
    }

    [data-theme="dark"] .pill.info {
      background: rgba(59, 130, 246, 0.15);
      color: var(--blue);
    }

    [data-theme="dark"] .pill {
      background: rgba(156, 163, 175, 0.15);
      color: var(--muted);
    }

    [data-theme="dark"] .platform-tag {
      background: hsla(var(--platform-hue, 174), 64%, 94%, 0.1);
      border-color: hsla(var(--platform-hue, 174), 52%, 72%, 0.3);
      color: hsla(var(--platform-hue, 174), 58%, 68%, 1);
    }

    [data-theme="dark"] .task-hero-panel {
      background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.06)), var(--panel);
    }

    [data-theme="dark"] .task-summary-card {
      background: rgba(26, 31, 38, 0.7);
      border-color: rgba(15, 118, 110, 0.2);
    }

    [data-theme="dark"] .task-summary-card.ok {
      background: rgba(16, 185, 129, 0.1);
      border-color: rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .task-summary-card.warn {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .task-summary-card.bad {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .plugin-summary-card.ok {
      background: rgba(16, 185, 129, 0.1);
      border-color: rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .plugin-summary-card.warn {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .plugin-summary-card.bad {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .plugin-summary-card.info {
      background: rgba(59, 130, 246, 0.1);
      border-color: rgba(59, 130, 246, 0.3);
    }

    [data-theme="dark"] .empty,
    [data-theme="dark"] .entity-detail-empty {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .qr-code-box {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .platform-login-account {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-item {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-item.active {
      background: var(--accent-soft);
      border-color: var(--accent);
    }

    [data-theme="dark"] .batch-result {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .batch-result.error {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .batch-result.success {
      background: rgba(20, 184, 166, 0.1);
      border-color: rgba(20, 184, 166, 0.3);
    }

    [data-theme="dark"] .target-source-panel,
    [data-theme="dark"] .target-manual-panel,
    [data-theme="dark"] .notification-target-manual-panel {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-section .inline-note,
    [data-theme="dark"] .cookie-export-description,
    [data-theme="dark"] .config-field-description {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .restart-note {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .system-meter-track {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .theme-preview.light::after {
      background: rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .theme-preview.dark::after {
      background: rgba(0, 0, 0, 0.4);
    }

    [data-theme="dark"] input[readonly],
    [data-theme="dark"] textarea[readonly] {
      background: var(--panel-soft);
      border-color: var(--line);
      color: var(--muted);
    }

    [data-theme="dark"] .entity-relation-summary,
    [data-theme="dark"] .entity-live-summary {
      background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.06));
      border-color: rgba(20, 184, 166, 0.3);
    }

    [data-theme="dark"] button.add-button,
    [data-theme="dark"] button.soft-edit-button,
    [data-theme="dark"] button.choice-tool-button,
    [data-theme="dark"] button.plugin-action-install,
    [data-theme="dark"] button.plugin-action-restart,
    [data-theme="dark"] .login-action-cookie,
    [data-theme="dark"] .message-template-edit-button {
      background: rgba(59, 130, 246, 0.15);
      border-color: rgba(59, 130, 246, 0.4);
      color: var(--blue);
    }

    [data-theme="dark"] button.subscription-export-button {
      background: rgba(59, 130, 246, 0.1);
      border-color: rgba(59, 130, 246, 0.3);
      color: #6b9fd8;
    }

    [data-theme="dark"] button.subscription-import-button,
    [data-theme="dark"] button.choice-refresh-button,
    [data-theme="dark"] button.filter-refresh-button,
    [data-theme="dark"] button.plugin-action-start,
    [data-theme="dark"] button.plugin-action-config,
    [data-theme="dark"] .login-action-refresh,
    [data-theme="dark"] .task-action-button.start {
      background: rgba(20, 184, 166, 0.15);
      border-color: rgba(20, 184, 166, 0.4);
      color: var(--accent);
    }

    [data-theme="dark"] button.choice-clear-button,
    [data-theme="dark"] button.filter-clear-button:not(:disabled),
    [data-theme="dark"] .task-action-button.stop {
      background: rgba(239, 68, 68, 0.15);
      border-color: rgba(239, 68, 68, 0.4);
      color: var(--red);
    }

    [data-theme="dark"] button.filter-apply-button,
    [data-theme="dark"] button.entity-filter-clear,
    [data-theme="dark"] button.target-source-toggle,
    [data-theme="dark"] button.target-priority-button,
    [data-theme="dark"] button.publisher-search-button,
    [data-theme="dark"] button.message-template-token-button,
    [data-theme="dark"] button.secret-fetch-button,
    [data-theme="dark"] .message-action-button,
    [data-theme="dark"] .log-action-button {
      background: rgba(20, 184, 166, 0.12);
      border-color: rgba(20, 184, 166, 0.35);
      color: var(--accent);
    }

    [data-theme="dark"] button.filter-pause-button,
    [data-theme="dark"] button.entity-detail-button,
    [data-theme="dark"] .login-action-export,
    [data-theme="dark"] .log-action-button.logger {
      background: rgba(147, 51, 234, 0.15);
      border-color: rgba(147, 51, 234, 0.4);
      color: #a78bfa;
    }

    [data-theme="dark"] button.entity-refresh-button {
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(34, 197, 94, 0.42);
      color: #4ade80;
      box-shadow: 0 4px 10px rgba(34, 197, 94, 0.08);
    }

    [data-theme="dark"] button.plugin-action-stop,
    [data-theme="dark"] button.plugin-action-update,
    [data-theme="dark"] .task-action-button.restart {
      background: rgba(245, 158, 11, 0.15);
      border-color: rgba(245, 158, 11, 0.4);
      color: var(--amber);
    }

    [data-theme="dark"] button.config-field-help {
      background: rgba(99, 102, 241, 0.15);
      border-color: rgba(99, 102, 241, 0.4);
      color: #a5b4fc;
    }

    [data-theme="dark"] button.config-field-help:hover,
    [data-theme="dark"] button.config-field-help[data-expanded="true"] {
      background: rgba(99, 102, 241, 0.2);
      border-color: rgba(99, 102, 241, 0.5);
    }

    [data-theme="dark"] .system-operation-button {
      background: rgba(59, 130, 246, 0.12);
      border-color: rgba(59, 130, 246, 0.35);
      color: var(--blue);
    }

    [data-theme="dark"] .system-operation-button:hover {
      background: rgba(59, 130, 246, 0.18);
      border-color: rgba(59, 130, 246, 0.5);
    }

    [data-theme="dark"] .system-operation-danger {
      background: rgba(239, 68, 68, 0.12);
      border-color: rgba(239, 68, 68, 0.35);
      color: #ef4444;
    }

    [data-theme="dark"] .system-operation-danger:hover {
      background: rgba(239, 68, 68, 0.18);
      border-color: rgba(239, 68, 68, 0.5);
    }

    [data-theme="dark"] .system-operation-danger .system-operation-title {
      color: #f87171;
    }

    [data-theme="dark"] .system-operation-danger .system-operation-desc {
      color: #ef4444;
    }

    [data-theme="dark"] .about-update-btn {
      background: var(--panel-soft);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .cookie-export-tab.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    [data-theme="dark"] .cookie-export-tab {
      background: var(--panel-soft);
      border-color: var(--line);
      color: var(--muted);
    }

    [data-theme="dark"] .qr-refresh-button {
      background: rgba(20, 184, 166, 0.15);
      border-color: rgba(20, 184, 166, 0.4);
      color: var(--accent);
    }

    [data-theme="dark"] .qr-status-card.success {
      background: rgba(20, 184, 166, 0.1);
      border-color: rgba(20, 184, 166, 0.3);
    }

    [data-theme="dark"] .qr-status-card.expired {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .qr-status-card.error {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
    }

    [data-theme="dark"] .entity-subscription-button {
      background: rgba(59, 130, 246, 0.12);
      border-color: rgba(59, 130, 246, 0.35);
      color: #7da9f5;
      box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);
    }

    [data-theme="dark"] .entity-subscription-button:hover {
      background: rgba(59, 130, 246, 0.18);
      box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
    }

    [data-theme="dark"] .entity-live-button,
    [data-theme="dark"] .entity-live-empty {
      background: rgba(148, 163, 184, 0.12);
      border-color: rgba(148, 163, 184, 0.32);
      color: #cbd5e1;
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    }

    [data-theme="dark"] .entity-live-empty {
      background: transparent;
      border-color: rgba(148, 163, 184, 0.38);
      color: #94a3b8;
      box-shadow: none;
    }

    [data-theme="dark"] .entity-live-button:hover {
      background: rgba(148, 163, 184, 0.18);
      box-shadow: 0 8px 16px rgba(15, 23, 42, 0.24);
    }

    [data-theme="dark"] .entity-live-button.is-live {
      background: rgba(16, 185, 129, 0.14);
      border-color: rgba(16, 185, 129, 0.36);
      color: #5eead4;
    }

    [data-theme="dark"] .entity-live-button.is-round {
      background: rgba(59, 130, 246, 0.14);
      border-color: rgba(59, 130, 246, 0.36);
      color: #93c5fd;
    }

    [data-theme="dark"] .entity-live-button.is-offline {
      background: rgba(100, 116, 139, 0.24);
      border-color: rgba(148, 163, 184, 0.48);
      color: #e2e8f0;
    }

    [data-theme="dark"] .entity-live-button.is-waiting {
      background: rgba(245, 158, 11, 0.14);
      border-color: rgba(245, 158, 11, 0.36);
      color: #fcd34d;
    }

    [data-theme="dark"] .plugin-card {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .plugin-card:hover {
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .plugin-icon {
      background: var(--accent-soft);
      border-color: rgba(20, 184, 166, 0.4);
      color: var(--accent);
    }

    [data-theme="dark"] .config-dirty-badge {
      background: rgba(245, 158, 11, 0.15);
      border-color: rgba(245, 158, 11, 0.4);
      color: var(--amber);
    }

    [data-theme="dark"] .config-hero {
      background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.08)),
        var(--panel);
      border-color: rgba(20, 184, 166, 0.3);
    }

    [data-theme="dark"] .config-field-card {
      background: rgba(26, 31, 38, 0.86);
      border-color: var(--line-strong);
      box-shadow: none;
    }

    [data-theme="dark"] .config-field-card:hover {
      background: var(--panel);
      border-color: rgba(20, 184, 166, 0.34);
    }

    [data-theme="dark"] .config-search-box {
      background: var(--panel-soft);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .config-search-box:focus-within {
      background: var(--panel);
      border-color: rgba(20, 184, 166, 0.5);
    }

    [data-theme="dark"] .config-search-box input {
      background: transparent;
      border-color: transparent;
    }

    [data-theme="dark"] .config-search-clear {
      background: rgba(156, 163, 175, 0.12);
      border-color: var(--line-strong);
      color: var(--muted);
    }

    [data-theme="dark"] .config-field-search-row {
      border-color: rgba(20, 184, 166, 0.18);
    }

    [data-theme="dark"] .config-field-search-row .config-search-summary {
      background: rgba(20, 184, 166, 0.10);
      border-color: rgba(20, 184, 166, 0.30);
      color: var(--accent);
    }

    [data-theme="dark"] .config-search-kept {
      border-color: rgba(245, 158, 11, 0.45);
      background: rgba(245, 158, 11, 0.08);
    }

    [data-theme="dark"] .config-composite-head {
      background: rgba(15, 20, 25, 0.52);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .config-composite-body .table-wrap,
    [data-theme="dark"] .config-embedded-field {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .config-advanced {
      background: rgba(15, 20, 25, 0.34);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .config-switch-track {
      background: #111827;
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .config-switch-control input:checked + .config-switch-track {
      background: var(--accent);
      border-color: var(--accent);
    }

    [data-theme="dark"] .config-action-restart {
      background: rgba(180, 35, 24, 0.15);
      border-color: rgba(180, 35, 24, 0.3);
      color: #f87171;
    }

    [data-theme="dark"] .config-action-restart:hover {
      background: rgba(180, 35, 24, 0.25);
      border-color: #b42318;
    }

    [data-theme="dark"] .entity-live-counts span {
      background: rgba(16, 185, 129, 0.12);
      border-color: rgba(16, 185, 129, 0.35);
    }

    [data-theme="dark"] .dashboard-kicker {
      background: var(--accent-soft);
      border-color: rgba(20, 184, 166, 0.4);
      color: var(--accent);
    }

    [data-theme="dark"] .config-kind-pill {
      background: var(--panel);
      border-color: var(--accent);
      color: var(--accent);
    }

    [data-theme="dark"] .entity-detail-count {
      background: rgba(147, 51, 234, 0.15);
      border-color: rgba(147, 51, 234, 0.4);
      color: #a78bfa;
    }

    [data-theme="dark"] .plugin-catalog-banner.ok {
      background: rgba(20, 184, 166, 0.1);
      border-color: rgba(20, 184, 166, 0.3);
      color: var(--accent);
    }

    [data-theme="dark"] .plugin-catalog-banner.warn {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(245, 158, 11, 0.3);
      color: var(--amber);
    }

    [data-theme="dark"] .plugin-catalog-banner.error {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
      color: var(--red);
    }

    [data-theme="dark"] .plugin-catalog-banner.loading {
      background: rgba(59, 130, 246, 0.1);
      border-color: rgba(59, 130, 246, 0.3);
      color: var(--blue);
    }

    [data-theme="dark"] .subscription-mode-option {
      background: var(--panel-soft);
      border-color: var(--line);
      color: var(--muted);
    }

    [data-theme="dark"] .subscription-mode-option:has(input:checked) {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    [data-theme="dark"] .target-choice-list,
    [data-theme="dark"] .filter-rule-table-wrap {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .target-source-row,
    [data-theme="dark"] .message-template-forward-node {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .message-template-preview-message {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .message-template-inline,
    [data-theme="dark"] .message-template-stats {
      background: var(--panel-soft);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .message-template-preview-forward {
      background: rgba(59, 130, 246, 0.08);
      border-color: rgba(59, 130, 246, 0.3);
    }

    [data-theme="dark"] .message-template-forward-card {
      background: var(--panel);
      border-color: rgba(59, 130, 246, 0.3);
    }

    [data-theme="dark"] .message-template-preview-body {
      color: var(--text);
    }

    [data-theme="dark"] .message-template-content-editor,
    [data-theme="dark"] .message-template-builder-block,
    [data-theme="dark"] .message-template-forward-editor-node {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .message-template-builder-block.forward,
    [data-theme="dark"] .message-template-builder-block.forward .message-template-forward-editor-node {
      background: var(--panel);
      border-color: rgba(20, 184, 166, 0.28);
    }

    [data-theme="dark"] .message-template-content-editor.is-dragging {
      background: rgba(20, 184, 166, 0.08);
      border-color: rgba(20, 184, 166, 0.4);
    }

    [data-theme="dark"] .message-template-drop-caret {
      background: #5eead4;
      box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.92), 0 0 0 4px rgba(94, 234, 212, 0.28);
    }

    [data-theme="dark"] .message-template-field-chip,
    [data-theme="dark"] button.message-template-token-button {
      background: rgba(20, 184, 166, 0.12);
      border-color: rgba(20, 184, 166, 0.35);
      color: var(--accent);
    }

    [data-theme="dark"] .message-template-token-title {
      color: var(--text);
    }

    [data-theme="dark"] .message-template-source-panel > summary,
    [data-theme="dark"] .message-template-source-panel .message-template-editor-input {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .readonly-table-note {
      background: rgba(99, 102, 241, 0.1);
      border-color: rgba(99, 102, 241, 0.3);
    }

    [data-theme="dark"] .readonly-mark {
      background: rgba(99, 102, 241, 0.15);
      border-color: rgba(99, 102, 241, 0.4);
      color: #a5b4fc;
    }

    [data-theme="dark"] .delivery-error-text,
    [data-theme="dark"] .delivery-json-text {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .plugin-error-box {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
      color: var(--red);
    }

    [data-theme="dark"] .message-attempts,
    [data-theme="dark"] .task-run-count {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-tab-button {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-tab-button:hover {
      background: var(--panel-soft);
      border-color: rgba(20, 184, 166, 0.3);
    }

    [data-theme="dark"] .config-tab-button.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
      box-shadow: inset 3px 0 0 var(--accent);
    }

    [data-theme="dark"] .config-tab-button.changed {
      background: rgba(245, 158, 11, 0.08);
      border-color: rgba(245, 158, 11, 0.3);
    }

    [data-theme="dark"] .config-tab-button.changed.active {
      background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(20, 184, 166, 0.08));
      border-color: rgba(217, 155, 61, 0.5);
      box-shadow: inset 3px 0 0 rgba(217, 155, 61, 1);
    }

    [data-theme="dark"] .config-tab-state {
      background: var(--panel-soft);
      color: var(--muted);
    }

    [data-theme="dark"] .config-tab-button.changed .config-tab-state {
      background: rgba(245, 158, 11, 0.15);
      color: var(--amber);
    }

    [data-theme="dark"] .config-tab-button.restart-changed .config-tab-state {
      background: rgba(239, 68, 68, 0.15);
      color: var(--red);
    }

    [data-theme="dark"] .secret-eye:hover {
      background: var(--panel-soft);
    }

    [data-theme="dark"] .secret-eye[data-revealed="true"] {
      color: var(--accent);
    }

    [data-theme="dark"] .system-path-item {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-section-count {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .image-preview {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .image-preview img {
      background: var(--panel);
    }

    [data-theme="dark"] .loading-spinner {
      border-color: var(--line-strong);
      border-top-color: var(--accent);
    }

    [data-theme="dark"] .entity-filter-summary {
      background: var(--panel);
      border-color: var(--line);
    }

    [data-theme="dark"] .config-hero-meta span {
      background: rgba(26, 31, 38, 0.8);
      border-color: rgba(156, 163, 175, 0.2);
    }

    [data-theme="dark"] .plugin-card-meta span {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .rule-note {
      background: rgba(245, 158, 11, 0.12);
      color: var(--amber);
    }

    [data-theme="dark"] .message-result.bad,
    [data-theme="dark"] .task-error-line.bad,
    [data-theme="dark"] .dashboard-error-line,
    [data-theme="dark"] .plugin-error-inline {
      color: var(--red);
    }
    * { box-sizing: border-box; }
    [hidden] { display: none !important; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: 0;
    }
    h1, h2, h3, p { margin: 0; }
    h1 { font-size: 21px; line-height: 1.18; }
    h2 { font-size: 16px; line-height: 1.25; }
    h3 { font-size: 14px; line-height: 1.25; }
    button, input, select, textarea { font: inherit; }
    button {
      min-height: 34px;
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 8px 13px;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    button:hover {
      filter: brightness(0.92);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
    }
    button:active {
      transform: translateY(0);
      box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
    }
    button:disabled { cursor: progress; opacity: 0.62; transform: none; box-shadow: none; }
    button.secondary {
      background: #fff;
      color: var(--text);
      border-color: var(--line-strong);
    }
    button.secondary:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
      color: var(--accent);
      box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15);
    }
    button.ghost {
      background: transparent;
      color: var(--text);
      border-color: transparent;
    }
    button.ghost:hover {
      background: var(--panel-soft);
      box-shadow: none;
    }
    button.danger { background: var(--red); color: #fff; }
    button.danger:hover {
      filter: brightness(0.92);
      box-shadow: 0 4px 12px rgba(180, 35, 24, 0.25);
    }
    button.add-button {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    button.subscription-export-button {
      border-color: #c9d8e9;
      background: #f2f7fc;
      color: #2f5f8f;
    }
    button.subscription-import-button {
      border-color: #c8dccb;
      background: #f0f8f1;
      color: #287240;
    }
    input, select, textarea {
      width: 100%;
      min-height: 36px;
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      padding: 8px 12px;
      color: var(--text);
      background: #fff;
      transition: all 0.2s ease;
    }
    input:hover, select:hover, textarea:hover {
      border-color: var(--accent);
    }
    input[readonly],
    textarea[readonly] {
      background: #f6f8fb;
      color: #5f6b7a;
      cursor: default;
    }
    textarea { min-height: 96px; resize: vertical; }
    input:focus, select:focus, textarea:focus, button:focus-visible {
      outline: 3px solid var(--focus);
      outline-offset: 1px;
      border-color: var(--accent);
    }
    .login-shell {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 24px;
      background: linear-gradient(135deg, #f4f6f8 0%, #e8f4f2 50%, #dae9f5 100%);
      position: relative;
      overflow: hidden;
    }

    .login-shell::before {
      content: "";
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(15, 118, 110, 0.05) 0%, transparent 70%);
      animation: rotateGradient 20s linear infinite;
    }

    @keyframes rotateGradient {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    [data-theme="dark"] .login-shell {
      background: linear-gradient(135deg, #0a0e12 0%, #0f1419 50%, #0a1015 100%);
    }

    [data-theme="dark"] .login-shell::before {
      background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
    }

    .login-panel {
      position: relative;
      z-index: 1;
      width: min(440px, 100%);
      display: grid;
      gap: 20px;
      padding: 32px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.98);
      backdrop-filter: blur(16px);
      box-shadow: 0 8px 32px rgba(24, 33, 45, 0.12), 0 20px 64px rgba(24, 33, 45, 0.08);
    }

    .login-header {
      display: flex;
      align-items: center;
      gap: 16px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--line);
    }

    .login-title h1 {
      font-size: 22px;
      margin-bottom: 4px;
    }

    .login-form {
      display: grid;
      gap: 16px;
    }

    .form-field {
      display: grid;
      gap: 8px;
    }

    .form-field label {
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
    }

    .login-form button {
      margin-top: 8px;
    }

    .login-footer {
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }

    .login-hint {
      color: var(--muted);
      font-size: 12px;
      text-align: center;
      margin: 0;
      line-height: 1.5;
    }
    .login-panel {
      width: min(420px, 100%);
      display: grid;
      gap: 16px;
      padding: 28px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.98);
      backdrop-filter: blur(12px);
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.08), 0 20px 48px rgba(24, 33, 45, 0.12);
    }
    .brand-mark {
      width: 42px;
      height: 42px;
      flex: 0 0 auto;
      display: block;
      border-radius: 12px;
      background: transparent;
      box-shadow: none;
      overflow: hidden;
    }
    .brand-mark img {
      display: block;
      width: 100%;
      height: 100%;
    }
    .login-form { display: grid; gap: 10px; }
    .app-shell {
      height: 100vh;
      min-height: 100vh;
      display: grid;
      grid-template-columns: 246px minmax(0, 1fr);
      overflow: hidden;
    }
    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      border-right: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.98);
      backdrop-filter: blur(12px);
      z-index: 5;
      box-shadow: 2px 0 12px rgba(24, 33, 45, 0.04);
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 20px 18px;
      border-bottom: 1px solid var(--line);
    }

    .brand-text {
      display: grid;
      gap: 4px;
    }

    .brand-text strong {
      font-size: 16px;
      color: var(--text);
    }

    .brand-text span {
      color: var(--muted);
      font-size: 12px;
    }

    .nav {
      display: grid;
      gap: 8px;
      padding: 16px 12px;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
    }

    .nav-group {
      display: grid;
      gap: 4px;
    }

    .nav-group-title {
      padding: 8px 12px 4px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .nav button {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 40px;
      padding: 9px 12px;
      border-color: transparent;
      background: transparent;
      color: var(--muted);
      text-align: left;
      justify-content: flex-start;
      border-radius: 8px;
      transition: all 0.2s ease;
      font-size: 14px;
    }

    .nav-icon {
      font-size: 16px;
      width: 20px;
      text-align: center;
      flex-shrink: 0;
    }

    .nav button:hover {
      background: var(--panel-soft);
      color: var(--text);
      transform: translateX(4px);
    }

    .nav button.active {
      background: var(--accent-soft);
      color: var(--accent);
      font-weight: 800;
      box-shadow: inset 3px 0 0 var(--accent);
    }

    .nav button.active .nav-icon {
      transform: scale(1.1);
    }

    .sidebar-footer {
      margin-top: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px 18px;
      border-top: 1px solid var(--line);
    }

    .sidebar-status {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 8px;
      background: var(--panel-soft);
      border: 1px solid var(--line);
    }

    .status-indicator {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--muted);
      position: relative;
    }

    .status-indicator.online {
      background: var(--green);
      box-shadow: 0 0 0 2px rgba(20, 125, 79, 0.2);
      animation: statusPulse 2s ease-in-out infinite;
    }

    @keyframes statusPulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .status-indicator.offline {
      background: var(--muted);
    }

    .status-text {
      color: var(--text);
      font-size: 12px;
      font-weight: 700;
    }

    .topbar-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

    .topbar-actions button {
      min-height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 12px;
      gap: 6px;
    }

    .topbar-actions .compact {
      font-size: 13px;
    }

    .topbar-divider {
      width: 1px;
      height: 24px;
      background: var(--line);
      margin: 0 4px;
    }

    .theme-icon {
      font-size: 16px;
    }
    .workspace {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
    }
    .topbar {
      position: sticky;
      top: 0;
      z-index: 4;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 16px 24px;
      border-bottom: 1px solid var(--line);
      background: rgba(244, 246, 248, 0.95);
      backdrop-filter: blur(12px);
      box-shadow: 0 1px 3px rgba(24, 33, 45, 0.04);
    }

    .topbar-title {
      display: grid;
      gap: 4px;
      min-width: 0;
      flex: 1;
    }

    .topbar-title h1 {
      font-size: 20px;
      color: var(--text);
    }

    .topbar-title span {
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      overflow-wrap: anywhere;
    }

    .topbar-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

    .menu-button {
      display: none;
      min-height: 40px;
      width: 40px;
      padding: 0;
      font-size: 20px;
      border-radius: 8px;
    }
    main {
      min-width: 0;
      min-height: 0;
      overflow: auto;
      padding: 24px;
      background: var(--bg);
    }

    main::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

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

    main::-webkit-scrollbar-thumb {
      background: var(--line-strong);
      border-radius: 4px;
    }

    main::-webkit-scrollbar-thumb:hover {
      background: var(--accent);
    }
    #content.content-logs,
    #content.content-messages,
    #content.content-tasks,
    #content:has(.logs-page),
    #content:has(.messages-page),
    #content:has(.tasks-page),
    #content:has(.testing-page) {
      display: grid;
      overflow: hidden;
    }
    #content.content-logs .page-host,
    #content.content-messages .page-host,
    #content.content-tasks .page-host,
    #content:has(.logs-page) .page-host,
    #content:has(.messages-page) .page-host,
    #content:has(.tasks-page) .page-host,
    #content:has(.testing-page) .page-host {
      min-width: 0;
      min-height: 0;
      display: grid;
    }
    .page {
      display: grid;
      gap: 14px;
    }
    .grid {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 14px;
    }
    .panel {
      min-width: 0;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel);
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.04), 0 8px 24px rgba(24, 33, 45, 0.06);
      transition: box-shadow 0.3s ease;
    }
    .panel:hover {
      box-shadow: 0 4px 12px rgba(24, 33, 45, 0.08), 0 12px 32px rgba(24, 33, 45, 0.1);
    }
    .panel.full { grid-column: span 12; }
    .panel.half { grid-column: span 6; }
    .panel.third { grid-column: span 4; }
    .panel-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 12px;
    }
    .panel-head p { color: var(--muted); font-size: 12px; margin-top: 3px; }
    .stats {
      display: grid;
      grid-template-columns: repeat(6, minmax(120px, 1fr));
      gap: 10px;
    }
    .stat {
      min-width: 0;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel);
      transition: all 0.3s ease;
    }
    .stat:hover {
      border-color: var(--accent);
      box-shadow: 0 4px 16px rgba(15, 118, 110, 0.12);
      transform: translateY(-2px);
    }
    .stat b {
      display: block;
      font-size: 28px;
      line-height: 1.05;
      margin-bottom: 6px;
      background: linear-gradient(135deg, var(--accent), var(--blue));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .stat span { color: var(--muted); font-size: 12px; font-weight: 700; }
    .toolbar {
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }
    .toolbar-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .filters {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 10px;
      align-items: end;
      margin-bottom: 10px;
    }
    .entity-filter-bar {
      min-width: 0;
      max-width: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 14px;
      padding: 10px 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-soft);
    }

    .entity-filter-title {
      display: inline-flex;
      align-items: center;
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
      white-space: nowrap;
    }

    .entity-filter-main {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1 1 520px;
      flex-wrap: wrap;
    }

    .entity-filter-controls {
      min-width: 0;
      max-width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1 1 auto;
      flex-wrap: wrap;
    }

    .entity-filter-controls select {
      width: auto;
      min-width: 120px;
      max-width: 160px;
      min-height: 34px;
      height: 34px;
      padding: 4px 10px;
      font-size: 13px;
      border-radius: 6px;
    }

    .subscription-entity-filter .entity-filter-controls input {
      min-width: 140px;
      max-width: 180px;
      min-height: 34px;
      height: 34px;
      padding: 4px 10px;
      font-size: 13px;
      border-radius: 6px;
      flex: 1 1 140px;
    }

    .entity-filter-divider {
      width: 1px;
      height: 24px;
      background: var(--line);
      margin: 0 4px;
      flex-shrink: 0;
    }

    .entity-filter-tools {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex: 0 0 auto;
      flex-wrap: wrap;
      margin-left: auto;
    }

    .entity-filter-clear {
      min-height: 34px;
      padding: 6px 12px;
      font-size: 13px;
      border-radius: 6px;
    }
    .filter-apply-button,
    .filter-clear-button,
    .filter-refresh-button,
    .filter-pause-button {
      min-height: 28px;
      padding: 3px 9px;
      font-size: 12px;
      filter: none;
    }
    .filter-apply-button {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    .filter-clear-button {
      border-color: #f3c5bd;
      background: #fff3f1;
      color: #b42318;
    }
    .filter-clear-button:disabled {
      cursor: default;
      border-color: #d9e1e8;
      background: #f3f6f8;
      color: #8a96a3;
      opacity: 1;
    }
    .filter-refresh-button {
      border-color: #b9ddcc;
      background: #effaf4;
      color: var(--green);
    }
    .filter-pause-button {
      border-color: #d7c3f4;
      background: #f6f1ff;
      color: #6d3bb5;
    }
    .filter-pause-button[data-paused="true"] {
      border-color: #f5d28f;
      background: #fff8eb;
      color: var(--amber);
    }
    .entity-filter-clear {
      min-height: 28px;
      padding: 3px 9px;
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
      font-size: 12px;
    }
    .entity-filter-clear:disabled {
      cursor: default;
      opacity: 0.55;
    }
    .entity-filter-summary {
      display: inline-flex;
      align-items: center;
      padding: 6px 12px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      white-space: nowrap;
    }
    .filter-toolbar-clear {
      min-height: 34px;
      padding: 6px 12px;
      font-size: 13px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .form-grid.single {
      grid-template-columns: 1fr;
    }
    .field {
      display: grid;
      gap: 5px;
      min-width: 0;
    }
    .field.full { grid-column: 1 / -1; }
    .field-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
    }
    .field-title-line {
      min-width: 0;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex: 0 1 auto;
      flex-wrap: nowrap;
    }
    .field-head .target-picker-search {
      flex: 1 1 96px;
      max-width: none;
      min-width: 72px;
      margin: 0 0 0 auto;
    }
    .field-head .row-actions {
      flex: 0 0 auto;
      flex-wrap: nowrap;
      gap: 4px;
    }
    .field-inline-status {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .field label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .required-mark {
      margin-left: 3px;
      color: var(--red);
      font-weight: 900;
    }
    .readonly-mark {
      display: inline-flex;
      align-items: center;
      min-height: 18px;
      margin-left: 5px;
      padding: 1px 6px;
      border: 1px solid #c7d2fe;
      border-radius: 999px;
      background: #eef2ff;
      color: #3730a3;
      font-size: 11px;
      font-weight: 900;
      line-height: 1.2;
      vertical-align: middle;
    }
    .readonly-field input[readonly],
    .readonly-field textarea[readonly],
    .readonly-field select:disabled,
    .readonly-field input[type="checkbox"]:disabled {
      border-color: #d8e0ea;
      background: #f6f8fb;
      color: #5f6b7a;
      opacity: 1;
      cursor: default;
    }
    .readonly-field .check {
      color: var(--muted);
      cursor: default;
    }
    .readonly-table-note {
      padding: 7px 9px;
      border: 1px dashed #c7d2fe;
      border-radius: 7px;
      background: #f8faff;
    }
    .config-field-list {
      min-width: 0;
      display: grid;
      gap: 12px;
    }
    .config-field-card {
      min-width: 0;
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid #d8e4ef;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 1px 2px rgba(24, 33, 45, 0.04);
    }
    .config-field-card:hover {
      border-color: #b9ded8;
      background: #fbfefd;
    }
    .config-search-kept {
      border-color: #f0c98d;
      background: #fffaf0;
    }
    .config-field-main {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(220px, 1fr) minmax(260px, 460px);
      align-items: center;
      gap: 16px;
    }
    .config-textarea-field .config-field-main,
    .config-composite-field .config-field-main {
      grid-template-columns: 1fr;
    }
    .config-field-meta {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .config-field-title {
      min-width: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .config-field-title > label,
    .config-field-title > span {
      min-width: 0;
      color: var(--text);
      font-size: 14px;
      font-weight: 850;
      line-height: 1.35;
    }
    .config-field-summary {
      max-width: 760px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }
    .config-field-control {
      min-width: 0;
      display: grid;
      gap: 8px;
      justify-self: stretch;
    }
    .config-field-control > *,
    .config-composite-body > *,
    .config-embedded-grid > *,
    .message-template-compact > *,
    .media-delivery-panel > * {
      min-width: 0;
      max-width: 100%;
    }
    .config-field-control input,
    .config-field-control select {
      min-height: 38px;
    }
    .config-field-control input,
    .config-field-control select,
    .config-field-control textarea,
    .config-composite-body input,
    .config-composite-body select,
    .config-composite-body textarea {
      max-width: 100%;
    }
    .config-field-control textarea {
      min-height: 120px;
    }
    .config-toggle-field .config-field-main {
      grid-template-columns: minmax(220px, 1fr) auto;
    }
    @container (max-width: 620px) {
      .config-field-main,
      .config-toggle-field .config-field-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
      }
      .config-field-control {
        width: 100%;
      }
      .config-switch-control {
        justify-content: flex-start;
      }
    }
    .config-switch-control {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 54px;
      min-height: 32px;
      cursor: pointer;
    }
    .config-switch-control input {
      position: absolute;
      opacity: 0;
      width: 1px;
      height: 1px;
      min-height: 0;
      padding: 0;
      pointer-events: none;
    }
    .config-switch-track {
      width: 46px;
      height: 26px;
      display: inline-flex;
      align-items: center;
      padding: 3px;
      border: 1px solid #c9d6e4;
      border-radius: 999px;
      background: #e9eef5;
      transition: background 0.18s ease, border-color 0.18s ease;
    }
    .config-switch-thumb {
      width: 18px;
      height: 18px;
      border-radius: 999px;
      background: #fff;
      box-shadow: 0 1px 4px rgba(24, 33, 45, 0.22);
      transition: transform 0.18s ease;
    }
    .config-switch-control input:checked + .config-switch-track {
      border-color: #0d9488;
      background: #0d9488;
    }
    .config-switch-control input:checked + .config-switch-track .config-switch-thumb {
      transform: translateX(20px);
    }
    .config-switch-control input:disabled + .config-switch-track {
      opacity: 0.62;
      cursor: default;
    }
    .config-switch-control:focus-within .config-switch-track {
      outline: 3px solid var(--focus);
      outline-offset: 2px;
    }
    .config-composite-field {
      padding: 0;
      overflow: hidden;
    }
    .config-composite-head {
      min-width: 0;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 12px 10px;
      border-bottom: 1px solid #e2eaf2;
      background: #f8fbfd;
    }
    .config-composite-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      flex: 0 0 auto;
    }
    .config-composite-actions button {
      min-height: 32px;
      padding: 6px 10px;
      font-size: 13px;
    }
    .config-composite-body {
      min-width: 0;
      display: grid;
      gap: 10px;
      padding: 12px;
    }
    .config-composite-body .table-wrap {
      border-radius: 8px;
      border-color: #d8e4ef;
      box-shadow: none;
    }
    .config-embedded-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .config-embedded-field {
      min-width: 0;
      display: grid;
      gap: 6px;
      padding: 10px;
      border: 1px solid #e2eaf2;
      border-radius: 8px;
      background: #fff;
    }
    .config-embedded-field.full {
      grid-column: 1 / -1;
    }
    .config-embedded-field label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    button.config-field-help {
      position: relative;
      width: 20px;
      min-width: 20px;
      min-height: 20px;
      height: 20px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-color: #c7d2fe;
      border-radius: 999px;
      background: #f4f7ff;
      color: #4f46e5;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      filter: none;
    }
    button.config-field-help:hover,
    button.config-field-help[data-expanded="true"] {
      border-color: #a5b4fc;
      background: #eef2ff;
      color: #3730a3;
    }
    .config-field-description {
      display: block;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
      padding: 8px 10px;
      border: 1px solid #d8e0ea;
      border-radius: 7px;
      background: #f8fafc;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      line-height: 1.55;
      white-space: pre-line;
      overflow-wrap: anywhere;
      animation: plugin-card-in 0.14s ease both;
    }
    .config-field-description[hidden] {
      display: none;
    }
    .publisher-create-form {
      max-width: 100%;
    }
    .publisher-search-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }
    .publisher-search-row input {
      min-width: 0;
    }
    .publisher-search-button {
      min-height: 36px;
      padding: 7px 12px;
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    .publisher-follow-option {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      border: 1px solid #d8e0ea;
      border-radius: 8px;
      background: #f8fafc;
    }
    .publisher-follow-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
    }
    .publisher-follow-copy strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }
    .publisher-follow-copy span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      line-height: 1.45;
    }
    .publisher-follow-switch {
      flex: 0 0 auto;
    }
    .publisher-create-feedback {
      line-height: 1.55;
      overflow-wrap: anywhere;
    }
    .publisher-create-feedback[hidden] {
      display: none;
    }
    .publisher-create-feedback .loading-spinner {
      margin-right: 8px;
      vertical-align: -3px;
    }
    .publisher-create-busy .publisher-create-modal {
      opacity: 0.82;
    }
    .checks {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .check {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 34px;
      font-weight: 650;
    }
    .check input {
      width: 16px;
      height: 16px;
      min-height: 0;
      padding: 0;
    }
    .rule-matrix {
      display: grid;
      gap: 8px;
    }
    .rule-row {
      display: grid;
      grid-template-columns: minmax(96px, 1fr) auto auto;
      align-items: center;
      gap: 12px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .rule-row .check {
      min-height: 24px;
    }
    .rule-row-disabled {
      opacity: 0.62;
    }
    .rule-note {
      display: inline-flex;
      margin-left: 8px;
      padding: 2px 6px;
      border-radius: 999px;
      background: #fff4d8;
      color: #8a5c00;
      font-size: 11px;
      font-weight: 650;
      vertical-align: middle;
    }
    .policy-live-hint {
      margin-top: 8px;
    }
    .subscription-create {
      display: grid;
      gap: 12px;
    }
    .subscription-create-subscription {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: stretch;
    }
    .subscription-transfer {
      display: grid;
      gap: 12px;
    }
    .subscription-transfer-card {
      border-color: #cfdff5;
      box-shadow: 0 10px 24px rgba(52, 87, 140, 0.08);
    }
    .subscription-export-options {
      display: grid;
      gap: 8px;
      margin-bottom: 10px;
    }
    .subscription-export-options .target-choice {
      grid-template-columns: 18px minmax(0, 1fr);
    }
    .subscription-import-text {
      min-height: 220px;
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      font-size: 12px;
      line-height: 1.55;
    }
    .subscription-card {
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.04);
      transition: all 0.3s ease;
    }

    .subscription-card:hover {
      box-shadow: 0 4px 16px rgba(24, 33, 45, 0.08);
      transform: translateY(-2px);
    }

    .subscription-create-subscription > .subscription-card {
      border-width: 2px;
      box-shadow: 0 4px 16px rgba(24, 33, 45, 0.08);
      min-width: 0;
      height: 100%;
    }

    .subscription-create-subscription > .subscription-card:hover {
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.12);
      transform: translateY(-4px);
    }

    .subscription-target-card {
      order: 2;
      border-color: #4f8fe8;
      background: linear-gradient(135deg, rgba(79, 143, 232, 0.02), #fff);
    }

    .subscription-publisher-card {
      order: 1;
      border-color: #c97816;
      background: linear-gradient(135deg, rgba(201, 120, 22, 0.02), #fff);
    }

    .subscription-policy-card {
      order: 3;
      border-color: #2f9f78;
      background: linear-gradient(135deg, rgba(47, 159, 120, 0.02), #fff);
    }

    .subscription-filter-card {
      order: 4;
      display: grid;
      gap: 10px;
      border-color: #45b8d8;
      background: linear-gradient(135deg, rgba(6, 182, 212, 0.035), #fff);
    }
    .subscription-create-subscription > .batch-result {
      order: 5;
      grid-column: 1 / -1;
    }
    .subscription-create-subscription .field-head > .row-actions:only-child {
      margin-left: auto;
    }
    .create-filter-form {
      align-items: end;
    }
    .filter-add-field {
      align-self: end;
    }
    .filter-add-field button {
      width: 100%;
    }
    .create-filter-list {
      display: grid;
      gap: 8px;
    }
    .create-filter-items {
      display: grid;
      gap: 8px;
    }
    .create-filter-item {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }
    .create-filter-item div {
      min-width: 0;
      display: grid;
      gap: 2px;
    }
    .create-filter-item strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }
    .create-filter-item span {
      min-width: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .create-filter-empty {
      padding: 12px;
    }
    .subscription-mode-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }
    .subscription-mode-switch {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .subscription-mode-option {
      min-height: 32px;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      gap: 7px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      white-space: nowrap;
    }
    .subscription-mode-option input {
      display: block;
      width: 14px;
      height: 14px;
      margin: 0;
      min-height: 0;
      padding: 0;
      flex: 0 0 auto;
      border-radius: 50%;
    }
    .subscription-mode-option:has(input:checked) {
      border-color: #9edbd4;
      background: var(--accent-soft);
      color: var(--accent);
    }
    .subscription-mode-option:has(input:disabled) {
      cursor: default;
      opacity: 0.56;
    }
    .target-choice-list {
      display: grid;
      gap: 8px;
      max-height: 260px;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .message-target-picker-toolbar {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
      margin-bottom: 10px;
    }
    .message-target-picker-tabs {
      min-width: 0;
      flex: 0 1 auto;
    }
    .message-target-picker-tabs .subscription-mode-switch {
      margin: 0;
    }
    .message-target-picker-spacer {
      flex: 1 1 auto;
      min-width: 0;
    }
    .message-target-picker-actions {
      flex: 0 0 auto;
    }
    .target-picker-search {
      display: flex;
      align-items: center;
      margin-bottom: 8px;
    }
    .target-picker-search input {
      width: 100%;
      min-height: 36px;
    }
    .message-target-picker-toolbar .target-picker-search {
      flex: 1 1 auto;
      min-width: 180px;
      margin-bottom: 0;
    }
    .target-picker-search.compact input {
      min-height: 32px;
      height: 32px;
      padding-top: 5px;
      padding-bottom: 5px;
      font-size: 13px;
    }
    .filter-rule-table-wrap {
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }
    .filter-rule-table {
      min-width: 0;
      table-layout: fixed;
    }
    .filter-rule-table th,
    .filter-rule-table td {
      padding: 8px 9px;
    }
    .filter-rule-table th:nth-child(1),
    .filter-rule-table td:nth-child(1) {
      width: 72px;
    }
    .filter-rule-table th:nth-child(3),
    .filter-rule-table td:nth-child(3) {
      width: 132px;
    }
    .filter-rule-table th:nth-child(4),
    .filter-rule-table td:nth-child(4) {
      width: 64px;
    }
    .filter-rule-table .primary-line,
    .filter-rule-table .sub-line {
      max-width: none;
    }
    .target-choice {
      display: grid;
      grid-template-columns: 18px 30px minmax(0, 1fr);
      align-items: center;
      gap: 9px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      cursor: pointer;
    }
    .target-choice.disabled {
      cursor: not-allowed;
      opacity: 0.62;
    }
    .target-choice.target-search-hidden {
      display: none !important;
    }
    .target-fetch-empty {
      width: 100%;
      min-height: 38px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 4px 10px;
      border: 1px dashed #9edbd4;
      border-radius: 8px;
      background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.05));
      color: var(--accent);
      font-weight: 900;
      cursor: pointer;
      animation: plugin-card-in 0.16s ease both;
    }
    .target-fetch-empty:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
      transform: translateY(-1px);
    }
    .target-fetch-empty small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .target-manual-panel {
      display: grid;
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      animation: plugin-card-in 0.16s ease both;
    }
    .target-manual-panel .field {
      margin: 0;
    }
    .message-target-filter-control {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }
    .message-target-filter-control input {
      min-width: 120px;
    }
    .target-choice input {
      width: 16px;
      height: 16px;
      min-height: 0;
      padding: 0;
    }
    .target-choice-avatar {
      width: 28px;
      height: 28px;
      display: block;
      border-radius: 7px;
      object-fit: cover;
      border: 1px solid var(--line);
      background: var(--panel-soft);
    }
    .target-choice-text {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 700;
    }
    .target-choice-meta-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      max-width: 100%;
    }
    .target-choice-meta-line .platform-tag {
      flex: 0 0 auto;
    }
    .target-choice-name {
      /* 按内容宽度显示：不拉伸（拉伸会在名称后留白），也不收缩（收缩会被长 ID 挤没）；
         名称自身过长时截断，上限 18em（约 250px）以免把后面的类型与 ID 顶出去 */
      flex: 0 0 auto;
      max-width: min(100%, 18em);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--text);
    }
    .target-choice-sub {
      /* 类型等短标签固定宽度，不参与压缩 */
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    /* 双类选择器（特异性 0,2,0），不依赖与 .target-choice-sub 的书写顺序 */
    .target-choice-sub.target-choice-id {
      /* 只有原始 ID 承担收缩：空间不足时自己省略号截断（如 QQ 官方 openid 有 32 位） */
      flex: 0 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .target-choice-rich {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      cursor: default;
    }
    .target-choice-main {
      min-width: 0;
      display: grid;
      grid-template-columns: 18px 30px minmax(0, 1fr);
      align-items: center;
      gap: 9px;
      cursor: pointer;
    }
    .target-choice-tools {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
    }
    button.target-source-toggle {
      border-color: #d4c8ee;
      background: #f6f2ff;
      color: #6941a8;
    }
    .target-source-panel {
      grid-column: 1 / -1;
      display: grid;
      gap: 6px;
      margin-left: 57px;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      animation: plugin-card-in 0.14s ease both;
    }
    .target-source-help {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }
    .target-source-row {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(72px, 0.7fr) auto;
      align-items: center;
      gap: 8px;
      padding: 6px 7px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: #fff;
    }
    .target-source-row.no-priority {
      grid-template-columns: minmax(0, 1fr) minmax(72px, 0.7fr);
    }
    .target-source-account,
    .target-source-transport {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 12px;
      font-weight: 800;
    }
    .target-source-transport {
      color: var(--muted);
      font-weight: 700;
    }
    button.target-priority-button {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    button.target-priority-button.active {
      border-color: #f0c98d;
      background: #fff8ea;
      color: var(--amber);
    }
    .target-loading {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      color: var(--muted);
      font-weight: 700;
    }
    .batch-result {
      padding: 10px 12px;
      border: 1px solid #f0c98d;
      border-radius: 8px;
      background: #fff8ea;
      color: var(--amber);
      font-size: 12px;
      font-weight: 800;
    }
    .batch-result.error {
      border-color: #f1b8b2;
      background: #fff1f0;
      color: var(--red);
    }
    .batch-result ul {
      margin: 6px 0 0;
      padding-left: 18px;
      font-weight: 650;
      overflow-wrap: anywhere;
    }
    .loading-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid var(--line-strong);
      border-top-color: var(--accent);
      border-radius: 999px;
      animation: spin 0.8s linear infinite;
    }
    button.compact {
      min-height: 28px;
      padding: 4px 8px;
      font-size: 12px;
    }
    button.choice-tool-button {
      border-color: #c7d8f7;
      background: #f1f6ff;
      color: #1d4ed8;
    }
    button.choice-refresh-button {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    button.choice-clear-button {
      border-color: #f1b8b2;
      background: #fff1f0;
      color: #b42318;
    }
    button.soft-edit-button {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    .inline-note {
      color: var(--muted);
      font-size: 12px;
      white-space: pre-line;
      overflow-wrap: anywhere;
    }
    .restart-mark {
      margin-left: 4px;
      color: var(--amber);
      font-weight: 900;
    }
    .restart-note {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 10px;
      padding: 8px 10px;
      border: 1px solid #f0c98d;
      border-radius: 7px;
      background: #fff8ea;
      color: var(--amber);
      font-size: 12px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }
    .table-wrap {
      min-width: 0;
      max-width: 100%;
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.04);
    }
    table {
      width: 100%;
      border-collapse: collapse;
    }
    th, td {
      padding: 12px 13px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: middle;
    }
    th {
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      position: sticky;
      top: 0;
      z-index: 1;
    }
    tr:last-child td { border-bottom: 0; }
    tbody tr {
      transition: background 0.2s ease;
    }
    tbody tr:hover {
      background: var(--panel-soft);
    }
    .primary-line {
      display: block;
      max-width: 340px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }
    .sub-line {
      display: block;
      max-width: 380px;
      color: var(--muted);
      font-size: 12px;
      overflow-wrap: anywhere;
    }
    .row-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .pill {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 4px 10px;
      border-radius: 6px;
      background: #edf1f5;
      color: #405064;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    .pill:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(64, 80, 100, 0.15);
    }
    .pill.ok { background: #e7f7ef; color: var(--green); }
    .pill.ok:hover { box-shadow: 0 2px 8px rgba(20, 125, 79, 0.2); }
    .pill.bad { background: #fdeceb; color: var(--red); }
    .pill.bad:hover { box-shadow: 0 2px 8px rgba(180, 35, 24, 0.2); }
    .pill.warn { background: #fff3df; color: var(--amber); }
    .pill.warn:hover { box-shadow: 0 2px 8px rgba(180, 83, 9, 0.2); }
    .pill.info { background: #eaf1ff; color: var(--blue); }
    .pill.info:hover { box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2); }
    .tag-list {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
    }
    .platform-tag {
      width: fit-content;
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 3px 8px;
      border: 1px solid hsl(var(--platform-hue, 174) 52% 72%);
      border-radius: 999px;
      background: hsl(var(--platform-hue, 174) 64% 94%);
      color: hsl(var(--platform-hue, 174) 58% 28%);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }
    .platform-tag-text {
      display: inline-block;
      max-width: 92px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .avatar {
      width: 34px;
      height: 34px;
      display: block;
      border-radius: 8px;
      object-fit: cover;
      border: 1px solid var(--line);
      background: var(--panel-soft);
    }
    .header-image {
      width: 72px;
      height: 34px;
      display: block;
      border-radius: 7px;
      object-fit: cover;
      border: 1px solid var(--line);
      background: var(--panel-soft);
    }
    .previewable-media {
      cursor: zoom-in;
      transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
    }
    .previewable-media:hover,
    .previewable-media:focus-visible {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    .theme-cell {
      display: flex;
      align-items: center;
      min-width: 142px;
    }
    .theme-preview {
      width: 142px;
      height: 42px;
      position: relative;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 7px;
      border: 1px solid var(--line-strong);
      background: var(--theme-bg, var(--panel-soft));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.42), 0 2px 8px rgba(24, 33, 45, 0.08);
    }
    .theme-preview.light {
      border-color: #d0d7de;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.88), 0 0 0 1px rgba(255,255,255,.72), 0 2px 10px rgba(24, 33, 45, 0.12);
    }
    .theme-preview.dark {
      border-color: rgba(0,0,0,.42);
      box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 2px 9px rgba(0,0,0,.18);
    }
    .theme-preview::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
    }
    .theme-preview.light::after {
      background: rgba(255,255,255,.28);
    }
    .theme-preview.dark::after {
      background: rgba(0,0,0,.32);
    }
    .theme-preview-card {
      position: relative;
      z-index: 1;
      width: 120px;
      height: 30px;
      display: grid;
      grid-template-columns: 20px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      padding: 4px 7px;
      border: 1px solid var(--theme-border, var(--line));
      border-radius: 6px;
      background: var(--theme-card, rgba(255,255,255,.72));
      box-shadow: 0 3px 9px rgba(24, 33, 45, 0.10);
      overflow: hidden;
    }
    .theme-preview-main {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 3px;
      height: 100%;
    }
    .theme-preview-title {
      width: 42px;
      height: 4px;
      border-radius: 999px;
      background: var(--theme-text, currentColor);
    }
    .theme-preview-pill {
      width: 20px;
      height: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 5px;
      background: var(--theme-primary, var(--accent));
      color: var(--theme-on-primary, #fff);
      font-size: 8px;
      line-height: 1;
      font-weight: 900;
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-card, #fff) 58%, transparent);
    }
    .theme-preview-line {
      display: block;
      height: 4px;
      border-radius: 999px;
    }
    .theme-preview-line.main {
      width: 70px;
      background: var(--theme-text, currentColor);
      opacity: .9;
    }
    .theme-preview-line.sub {
      width: 58px;
      background: var(--theme-secondary, currentColor);
      opacity: .82;
    }
    .media-placeholder {
      display: block;
      background: var(--panel-soft);
    }
    .identity-cell {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .subscription-meta-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      max-width: 380px;
      min-height: 22px;
    }
    .subscription-meta-line .platform-tag {
      min-height: 20px;
      padding: 1px 6px;
      font-size: 11px;
    }
    .subscription-meta-line .platform-tag-text {
      max-width: 74px;
    }
    .subscription-meta-line > span:not(.platform-tag) {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .entity-table {
      min-width: 0;
    }
    .entity-table table {
      table-layout: fixed;
    }
    .entity-publisher-table table {
      min-width: 1326px;
    }
    .entity-subscriber-table table {
      min-width: 1096px;
    }
    .entity-publisher-table th:nth-child(1),
    .entity-publisher-table td:nth-child(1) { width: 92px; }
    .entity-publisher-table th:nth-child(2),
    .entity-publisher-table td:nth-child(2) { width: 230px; }
    .entity-publisher-table th:nth-child(3),
    .entity-publisher-table td:nth-child(3),
    .entity-publisher-table th:nth-child(4),
    .entity-publisher-table td:nth-child(4),
    .entity-publisher-table th:nth-child(5),
    .entity-publisher-table td:nth-child(5) { width: 150px; }
    .entity-publisher-table th:nth-child(6),
    .entity-publisher-table td:nth-child(6) { width: 92px; }
    .entity-publisher-table th:nth-child(7),
    .entity-publisher-table td:nth-child(7) { width: 90px; }
    .entity-publisher-table th:nth-child(8),
    .entity-publisher-table td:nth-child(8) { width: 144px; }
    .entity-publisher-table th:nth-child(9),
    .entity-publisher-table td:nth-child(9) { width: 228px; }
    .entity-subscriber-table th:nth-child(1),
    .entity-subscriber-table td:nth-child(1) { width: 92px; }
    .entity-subscriber-table th:nth-child(2),
    .entity-subscriber-table td:nth-child(2) { width: 260px; }
    .entity-subscriber-table th:nth-child(3),
    .entity-subscriber-table td:nth-child(3) { width: 190px; }
    .entity-subscriber-table th:nth-child(4),
    .entity-subscriber-table td:nth-child(4) { width: 92px; }
    .entity-subscriber-table th:nth-child(5),
    .entity-subscriber-table td:nth-child(5) { width: 90px; }
    .entity-subscriber-table th:nth-child(6),
    .entity-subscriber-table td:nth-child(6) { width: 144px; }
    .entity-subscriber-table th:nth-child(7),
    .entity-subscriber-table td:nth-child(7) { width: 228px; }
    .entity-publisher-table .header-image,
    .entity-publisher-table .theme-preview,
    .entity-publisher-table .entity-live-button,
    .entity-publisher-table .entity-live-empty {
      width: 132px;
      height: 44px;
      min-height: 44px;
    }
    .entity-publisher-table .theme-cell {
      width: 132px;
      min-width: 132px;
    }
    .entity-publisher-table .theme-preview-card {
      width: 116px;
      height: 30px;
    }
    .entity-detail-button {
      border-color: #d7c3f4;
      background: #f6f1ff;
      color: #6d3bb5;
    }
    .entity-refresh-button {
      width: 30px;
      min-width: 30px;
      min-height: 30px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-color: #b8dfca;
      background: #f0faf5;
      color: #1f7a4c;
      font-size: 17px;
      font-weight: 900;
      line-height: 1;
      box-shadow: 0 4px 10px rgba(31, 122, 76, 0.08);
      transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }
    .entity-refresh-button:hover {
      transform: translateY(-1px) rotate(18deg);
      background: #e5f7ee;
      box-shadow: 0 8px 16px rgba(31, 122, 76, 0.14);
      filter: none;
    }
    .entity-subscription-button {
      min-height: 28px;
      display: inline-flex;
      align-items: baseline;
      gap: 3px;
      padding: 4px 9px;
      border-color: #c7d7ed;
      background: #f2f7ff;
      color: #2e5d96;
      box-shadow: 0 4px 10px rgba(46, 93, 150, 0.08);
      transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }
    .entity-subscription-button:hover {
      transform: translateY(-1px);
      background: #eaf2ff;
      box-shadow: 0 8px 16px rgba(46, 93, 150, 0.13);
      filter: none;
    }
    .entity-subscription-button strong {
      font-size: 15px;
      line-height: 1;
    }
    .entity-subscription-button span {
      font-size: 12px;
      color: #5278a8;
    }
    .entity-live-button,
    .entity-live-empty {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 7px;
      padding: 0 10px;
      border: 1px solid #d5dde8;
      border-radius: 8px;
      background: #f6f8fb;
      color: #526174;
      text-align: left;
      font-size: 12px;
      font-weight: 850;
      box-shadow: 0 4px 10px rgba(82, 97, 116, 0.06);
      transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }
    .entity-live-button:hover {
      transform: translateY(-1px);
      background: #eef2f7;
      box-shadow: 0 8px 16px rgba(82, 97, 116, 0.12);
      filter: none;
    }
    .entity-live-button.is-live {
      border-color: #a7d9c0;
      background: #eefaf4;
      color: #15734a;
    }
    .entity-live-button.is-offline {
      border-color: #b9c5d3;
      background: #e9eef5;
      color: #344256;
    }
    .entity-live-button.is-round {
      border-color: #b8cff3;
      background: #f0f6ff;
      color: #2d5d9d;
    }
    .entity-live-button.is-waiting {
      border-color: #edd4a3;
      background: #fff8ea;
      color: #9a5b0f;
    }
    .entity-live-dot {
      width: 8px;
      height: 8px;
      flex: 0 0 auto;
      border-radius: 999px;
      background: currentColor;
      opacity: .78;
      box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
    }
    .entity-live-empty {
      border-style: dashed;
      background: #fff;
      color: #8a94a5;
      box-shadow: none;
    }
    .entity-live-empty .entity-live-dot {
      background: transparent;
      border: 2px solid currentColor;
      box-shadow: none;
      opacity: .7;
    }
    .entity-live-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .entity-detail {
      display: grid;
      gap: 14px;
    }
    .entity-detail-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }
    .entity-detail-count {
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border: 1px solid #d7c3f4;
      border-radius: 999px;
      background: #f6f1ff;
      color: #6d3bb5;
      font-size: 12px;
      font-weight: 900;
    }
    .entity-relation-modal {
      display: grid;
      gap: 12px;
    }
    .entity-relation-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 12px;
      border: 1px solid #c7d7ed;
      border-radius: 8px;
      background: linear-gradient(135deg, #f7fbff, #eef6ff);
      box-shadow: 0 8px 22px rgba(46, 93, 150, 0.08);
    }
    .entity-relation-subject {
      min-width: 0;
    }
    .entity-relation-count {
      min-width: 180px;
      display: grid;
      justify-items: end;
      gap: 2px;
      color: #5278a8;
      text-align: right;
    }
    .entity-relation-count strong {
      color: #2e5d96;
      font-size: 22px;
      line-height: 1;
    }
    .entity-relation-count span {
      font-size: 12px;
    }
    .entity-live-modal {
      display: grid;
      gap: 12px;
    }
    .entity-live-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 12px;
      border: 1px solid #b9dccb;
      border-radius: 8px;
      background: linear-gradient(135deg, #f7fffb, #edf9f2);
      box-shadow: 0 8px 22px rgba(31, 111, 71, 0.08);
    }
    .entity-live-counts {
      min-width: 200px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      color: #3d7659;
      text-align: right;
    }
    .entity-live-counts span {
      display: inline-flex;
      align-items: baseline;
      gap: 3px;
      min-height: 28px;
      padding: 4px 8px;
      border: 1px solid #b9dccb;
      border-radius: 999px;
      background: #f0faf5;
      font-size: 12px;
      font-weight: 800;
    }
    .entity-live-counts strong {
      color: #1f6f47;
      font-size: 16px;
      line-height: 1;
    }
    .entity-live-counts small {
      width: 100%;
      color: var(--muted);
      font-size: 12px;
    }
    .entity-detail-table-wrap {
      width: 100%;
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }
    .entity-detail-table {
      min-width: 820px;
      table-layout: fixed;
    }
    .entity-detail-table th,
    .entity-detail-table td {
      padding: 7px 8px;
      vertical-align: middle;
    }
    .entity-detail-table.cursor {
      min-width: 760px;
    }
    .entity-detail-table.subscription-relations {
      min-width: 900px;
    }
    .entity-detail-table.subscription-relations th:first-child,
    .entity-detail-table.subscription-relations td:first-child {
      width: 280px;
    }
    .entity-relation-modal .entity-detail-table-wrap {
      max-height: min(62vh, 620px);
    }
    .entity-relation-modal .entity-detail-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #f8fbfd;
    }
    .entity-live-modal .entity-detail-table-wrap {
      max-height: min(38vh, 360px);
    }
    .entity-live-modal .entity-detail-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #f8fbfd;
    }
    .entity-detail-table .mono,
    .detail-long-text {
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      font-size: 12px;
    }
    .detail-long-text {
      display: block;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .entity-detail-cover {
      width: 46px;
      height: 30px;
      display: block;
      border: 1px solid var(--line);
      border-radius: 6px;
      object-fit: cover;
      background: var(--panel-soft);
    }
    .entity-detail-empty {
      display: grid;
      gap: 4px;
      border: 1px dashed var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .entity-detail-empty strong {
      color: var(--text);
      font-size: 13px;
    }
    .entity-detail-empty span {
      color: var(--muted);
      font-size: 12px;
    }
    .cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 12px;
    }
    .dashboard-page {
      display: grid;
      gap: 16px;
      width: min(1480px, 100%);
      margin: 0 auto;
    }
    .dashboard-hero {
      display: grid;
      grid-template-columns: minmax(240px, 0.55fr) minmax(640px, 1.45fr);
      gap: 14px;
      align-items: stretch;
      border-color: #c8dde1;
      background:
        linear-gradient(135deg, rgba(230, 244, 241, 0.96), rgba(255, 255, 255, 0.98) 52%),
        #fff;
    }
    .dashboard-hero-copy {
      min-width: 0;
      display: grid;
      align-content: center;
      gap: 9px;
    }
    .dashboard-kicker {
      width: fit-content;
      min-height: 26px;
      display: inline-flex;
      align-items: center;
      padding: 3px 9px;
      border: 1px solid #b9ded8;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 12px;
      font-weight: 900;
    }
    .dashboard-hero-copy h2 {
      font-size: 19px;
      line-height: 1.2;
    }
    .dashboard-hero-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .dashboard-summary-grid {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      align-content: start;
      align-items: start;
    }
    .dashboard-metric-card,
    .dashboard-queue-card {
      min-width: 0;
      display: grid;
      gap: 4px;
      padding: 8px 9px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.84);
      box-shadow: 0 5px 16px rgba(24, 33, 45, 0.055);
    }
    .dashboard-metric-card span,
    .dashboard-queue-card span {
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
    }
    .dashboard-metric-card b,
    .dashboard-queue-card b {
      color: var(--text);
      font-size: 19px;
      line-height: 1.05;
      overflow-wrap: anywhere;
    }
    .dashboard-metric-card small {
      color: var(--muted);
      font-size: 10px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }
    .dashboard-queue-card.ok,
    .dashboard-metric-card.green {
      border-color: #b9ded8;
      background: #eef8f6;
    }
    .dashboard-queue-card.warn,
    .dashboard-metric-card.amber {
      border-color: #f0c98d;
      background: #fff8ea;
    }
    .dashboard-queue-card.bad {
      border-color: #f1b8b2;
      background: #fff1f0;
    }
    .dashboard-queue-card.info,
    .dashboard-metric-card.blue {
      border-color: #b9cffc;
      background: #eef4ff;
    }
    .dashboard-metric-card.accent {
      border-color: #b9ded8;
      background: linear-gradient(135deg, #eef8f6, #ffffff);
    }
    .dashboard-metric-card.soft {
      background: #fff;
    }
    button.dashboard-metric-card {
      width: 100%;
      min-height: 82px;
      text-align: left;
      color: var(--text);
      cursor: pointer;
      transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
    }
    button.dashboard-metric-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 24px rgba(24, 33, 45, 0.11);
      filter: none;
    }
    button.dashboard-metric-card:active {
      transform: translateY(0);
      box-shadow: 0 5px 16px rgba(24, 33, 45, 0.08);
    }
    button.dashboard-metric-card:focus-visible {
      border-color: var(--accent);
    }
    .dashboard-panel {
      animation: plugin-card-in 0.18s ease both;
      height: 100%;
    }
    .dashboard-grid {
      grid-column: span 12;
      width: 100%;
      margin: 0 auto;
      grid-template-columns: repeat(2, minmax(0, 540px));
      justify-content: center;
      align-items: stretch;
      gap: 14px;
    }
    .dashboard-grid > .dashboard-panel {
      grid-column: auto;
      height: 100%;
    }
    .dashboard-panel-head p {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      margin-top: 3px;
    }
    .dashboard-list,
    .dashboard-stack {
      display: grid;
      gap: 8px;
    }
    .dashboard-list.compact {
      gap: 7px;
    }
    .dashboard-list-item {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .dashboard-list-item.block {
      grid-template-columns: 1fr;
      align-items: start;
    }
    .dashboard-list-item .primary-line,
    .dashboard-list-item .sub-line {
      max-width: none;
    }
    .dashboard-list-side {
      display: grid;
      justify-items: end;
      gap: 5px;
    }
    .dashboard-queue-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }
    .dashboard-queue-card {
      gap: 2px;
      box-shadow: none;
    }
    .dashboard-queue-card b {
      font-size: 19px;
    }
    .dashboard-error-line {
      display: block;
      color: var(--red);
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .dashboard-empty {
      padding: 32px 20px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      border: 1px dashed var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .dashboard-empty.compact {
      padding: 12px;
    }

    .dashboard-status-banner {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 20px 24px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel);
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.06);
    }

    .dashboard-status-banner.ok {
      background: linear-gradient(135deg, #eef8f6, #ffffff);
      border-color: #b9ded8;
    }

    .dashboard-status-banner.warn {
      background: linear-gradient(135deg, #fff8ea, #ffffff);
      border-color: #f0c98d;
    }

    .dashboard-status-icon {
      width: 48px;
      height: 48px;
      display: grid;
      place-items: center;
      font-size: 28px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.8);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .dashboard-status-text {
      flex: 1;
      display: grid;
      gap: 4px;
    }

    .dashboard-status-text h3 {
      font-size: 17px;
      font-weight: 900;
      color: var(--text);
    }

    .dashboard-status-text p {
      font-size: 12px;
      color: var(--muted);
      font-weight: 700;
    }

    .dashboard-status-details {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .dashboard-status-badge {
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .dashboard-status-badge.bad {
      background: rgba(180, 35, 24, 0.1);
      color: var(--red);
      border: 1px solid rgba(180, 35, 24, 0.2);
    }

    .dashboard-status-badge.warn {
      background: rgba(180, 83, 9, 0.1);
      color: var(--amber);
      border: 1px solid rgba(180, 83, 9, 0.2);
    }

    .dashboard-metrics-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 12px;
    }

    .dashboard-metric-card-new {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel);
      text-align: left;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.04);
    }

    .dashboard-metric-card-new:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(24, 33, 45, 0.1);
      border-color: var(--accent);
    }

    .dashboard-metric-card-new.warn {
      border-color: #f0c98d;
      background: linear-gradient(135deg, #fff8ea, #ffffff);
    }

    .dashboard-metric-icon {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      font-size: 24px;
      border-radius: 10px;
      background: var(--panel-soft);
      flex-shrink: 0;
    }

    .dashboard-metric-content {
      flex: 1;
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .dashboard-metric-label {
      font-size: 11px;
      font-weight: 900;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .dashboard-metric-value {
      font-size: 20px;
      font-weight: 900;
      color: var(--text);
      line-height: 1.1;
    }

    .dashboard-metric-sub {
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      overflow-wrap: anywhere;
    }

    .dashboard-panels-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      align-items: start;
    }

    .dashboard-panel {
      display: flex;
      flex-direction: column;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel);
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.04);
    }

    .dashboard-panel-wide {
      grid-column: span 2;
    }

    .dashboard-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 20px 24px;
      border-bottom: 1px solid var(--line);
      background: var(--panel-soft);
    }

    .dashboard-panel-title {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
    }

    .dashboard-panel-icon {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      font-size: 20px;
      border-radius: 8px;
      background: var(--panel);
      flex-shrink: 0;
    }

    .dashboard-panel-title h2 {
      font-size: 16px;
      font-weight: 900;
      color: var(--text);
    }

    .dashboard-panel-title p {
      font-size: 12px;
      color: var(--muted);
      font-weight: 700;
      margin-top: 2px;
    }

    .dashboard-panel-body {
      padding: 16px;
      flex: 1;
    }

    .dashboard-card-list {
      display: grid;
      gap: 10px;
    }

    .dashboard-card-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      transition: all 0.15s ease;
    }

    .dashboard-card-item:hover {
      background: var(--panel);
      border-color: var(--line-strong);
    }

    .dashboard-card-info {
      flex: 1;
      min-width: 0;
      display: grid;
      gap: 6px;
    }

    .dashboard-card-title {
      font-size: 14px;
      font-weight: 800;
      color: var(--text);
      overflow-wrap: anywhere;
    }

    .dashboard-card-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      font-size: 12px;
      color: var(--muted);
      font-weight: 700;
    }

    .dashboard-card-id {
      padding: 3px 8px;
      border-radius: 4px;
      background: rgba(0, 0, 0, 0.05);
      font-size: 11px;
      font-family: ui-monospace, monospace;
    }

    .dashboard-tag {
      padding: 3px 8px;
      border-radius: 4px;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 11px;
      font-weight: 800;
    }

    .dashboard-card-status {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .dashboard-card-status.ok {
      background: rgba(16, 185, 129, 0.1);
      color: var(--green);
      border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .dashboard-card-status.warn {
      background: rgba(245, 158, 11, 0.1);
      color: var(--amber);
      border: 1px solid rgba(245, 158, 11, 0.2);
    }

    .dashboard-card-status.bad {
      background: rgba(239, 68, 68, 0.1);
      color: var(--red);
      border: 1px solid rgba(239, 68, 68, 0.2);
    }

    .dashboard-status-dot {
      font-size: 14px;
    }

    .dashboard-delivery-section {
      display: grid;
      gap: 16px;
    }

    .dashboard-delivery-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .dashboard-delivery-stat {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }

    .dashboard-delivery-stat.ok {
      border-color: #b9ded8;
      background: #eef8f6;
    }

    .dashboard-delivery-stat.warn {
      border-color: #f0c98d;
      background: #fff8ea;
    }

    .dashboard-delivery-stat.info {
      border-color: #b9cffc;
      background: #eef4ff;
    }

    .dashboard-delivery-stat.bad {
      border-color: #f1b8b2;
      background: #fff1f0;
    }

    .dashboard-delivery-stat.soft {
      background: #fff;
    }

    .dashboard-delivery-stat-icon {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      font-size: 20px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.6);
      flex-shrink: 0;
    }

    .dashboard-delivery-stat-content {
      display: grid;
      gap: 2px;
    }

    .dashboard-delivery-stat-value {
      font-size: 24px;
      font-weight: 900;
      color: var(--text);
      line-height: 1;
    }

    .dashboard-delivery-stat-label {
      font-size: 11px;
      font-weight: 800;
      color: var(--muted);
    }

    .dashboard-failures-list {
      display: grid;
      gap: 12px;
    }

    .dashboard-failures-title {
      font-size: 13px;
      font-weight: 900;
      color: var(--text);
      padding-left: 4px;
    }

    .dashboard-failure-item {
      display: flex;
      gap: 12px;
      padding: 14px 16px;
      border: 1px solid #f1b8b2;
      border-radius: 8px;
      background: #fff1f0;
    }

    .dashboard-failure-icon {
      font-size: 20px;
      flex-shrink: 0;
    }

    .dashboard-failure-content {
      flex: 1;
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .dashboard-failure-target {
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
      overflow-wrap: anywhere;
    }

    .dashboard-failure-error {
      font-size: 12px;
      font-weight: 700;
      color: var(--red);
      overflow-wrap: anywhere;
    }

    .dashboard-failure-id {
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      font-family: ui-monospace, monospace;
    }
    .about-page {
      width: min(680px, 100%);
      margin: 0 auto;
    }
    .about-card {
      display: grid;
      gap: 22px;
      padding: 34px 30px 30px;
    }
    .about-brand {
      display: grid;
      justify-items: center;
      gap: 12px;
      text-align: center;
    }
    .about-logo {
      width: 84px;
      height: 84px;
      border-radius: 20px;
      box-shadow: 0 10px 26px rgba(24, 33, 45, 0.16);
    }
    .about-name {
      font-size: 25px;
      line-height: 1.15;
      font-weight: 900;
      color: var(--blue);
      letter-spacing: 0.2px;
    }
    .about-desc {
      max-width: 520px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }
    .about-meta {
      border: 1px solid var(--line);
      border-radius: 10px;
      overflow: hidden;
      background: var(--panel);
    }
    .about-meta-row {
      display: grid;
      grid-template-columns: 104px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      padding: 14px 16px;
    }
    .about-meta-row + .about-meta-row {
      border-top: 1px solid var(--line);
    }
    .about-meta-label {
      color: var(--text);
      font-size: 14px;
      font-weight: 900;
    }
    .about-meta-value {
      min-width: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      color: var(--text);
      font-size: 14px;
      font-weight: 800;
      text-align: right;
      overflow-wrap: anywhere;
    }
    .about-link {
      color: var(--blue);
      font-weight: 850;
      text-decoration: none;
      border-bottom: 1px solid rgba(37, 99, 235, 0.28);
    }
    .about-link:hover {
      border-bottom-color: var(--blue);
    }
    .about-version {
      font-family: ui-monospace, monospace;
      font-weight: 850;
    }
    .about-update-btn {
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid var(--line-strong);
      border-radius: 7px;
      padding: 5px 10px;
      color: var(--text);
      background: var(--panel);
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
    }
    .about-update-btn:hover:not(:disabled) {
      filter: brightness(0.97);
    }
    .about-update-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .plugin-page {
      gap: 14px;
    }
    .plugin-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
      gap: 14px;
      align-items: stretch;
      border-color: #c8dde1;
      background:
        linear-gradient(135deg, rgba(230, 244, 241, 0.92), rgba(255, 255, 255, 0.96) 52%),
        #fff;
    }
    .plugin-hero-copy {
      display: grid;
      align-content: center;
      gap: 6px;
      min-width: 0;
    }
    .plugin-hero-copy h2 {
      font-size: 18px;
    }
    .plugin-hero-copy p,
    .plugin-panel-head p {
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      overflow-wrap: anywhere;
    }
    .plugin-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      min-width: 0;
    }
    .plugin-summary-card {
      min-width: 0;
      display: grid;
      gap: 3px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255,255,255,0.82);
      box-shadow: 0 4px 14px rgba(24, 33, 45, 0.055);
    }
    .plugin-summary-card b {
      font-size: 22px;
      line-height: 1.05;
      color: var(--text);
      overflow-wrap: anywhere;
    }
    .plugin-summary-card span {
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
    }
    .plugin-summary-card small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .plugin-summary-card.ok {
      border-color: #b9ded8;
      background: #eef8f6;
    }
    .plugin-summary-card.warn {
      border-color: #f0c98d;
      background: #fff8ea;
    }
    .plugin-summary-card.bad {
      border-color: #f1b8b2;
      background: #fff1f0;
    }
    .plugin-summary-card.info {
      border-color: #b9cffc;
      background: #eef4ff;
    }
    .plugin-panel {
      animation: plugin-card-in 0.18s ease both;
    }
    .plugin-filter-bar input {
      width: auto;
      min-width: 210px;
      max-width: 280px;
      min-height: 28px;
      height: 28px;
      padding: 3px 8px;
      font-size: 13px;
    }
    .plugin-name-cell,
    .plugin-card-title {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      align-items: center;
      gap: 9px;
      min-width: 0;
    }
    .plugin-icon {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      border: 1px solid #b9ded8;
      background: var(--accent-soft);
      color: var(--accent);
      font-weight: 950;
      line-height: 1;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
    }
    .plugin-installed-table {
      min-width: 1060px;
    }
    .plugin-installed-table th:nth-child(1),
    .plugin-installed-table td:nth-child(1) {
      min-width: 190px;
    }
    .plugin-installed-table th:nth-child(2),
    .plugin-installed-table td:nth-child(2) {
      min-width: 70px;
    }
    .plugin-installed-table th:nth-child(6),
    .plugin-installed-table td:nth-child(6) {
      min-width: 50px;
    }
    .plugin-installed-table th:nth-child(7),
    .plugin-installed-table td:nth-child(7) {
      min-width: 50px;
    }
    .plugin-update-cell {
      display: grid;
      gap: 4px;
      justify-items: start;
    }
    .plugin-error-inline {
      display: block;
      max-width: 340px;
      color: var(--red);
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .plugin-row-actions button {
      min-height: 30px;
      padding: 5px 9px;
      font-size: 12px;
    }
    button.plugin-action-start {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    button.plugin-action-stop {
      border-color: #f0c98d;
      background: #fff8ea;
      color: var(--amber);
    }
    button.plugin-action-restart {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    button.plugin-action-config {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    button.plugin-action-install {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    button.plugin-action-update {
      border-color: #f0c98d;
      background: #fff8ea;
      color: var(--amber);
    }
    .plugin-catalog-banner {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 10px;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .plugin-catalog-banner strong {
      color: var(--text);
      font-size: 13px;
    }
    .plugin-catalog-banner.ok {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    .plugin-catalog-banner.warn {
      border-color: #f0c98d;
      background: #fff8ea;
      color: var(--amber);
    }
    .plugin-catalog-banner.error {
      border-color: #f1b8b2;
      background: #fff1f0;
      color: var(--red);
    }
    .plugin-catalog-banner.loading {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    .plugin-catalog-modal {
      display: grid;
      gap: 10px;
    }
    .plugin-download-button {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    .plugin-check-update-button {
      border-color: #f0c98d;
      background: #fff8ea;
      color: var(--amber);
    }
    .plugin-scan-button {
      border-color: #a7d8cf;
      background: var(--accent-soft);
      color: var(--accent);
    }
    .plugin-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 12px;
    }
    .plugin-card {
      min-width: 0;
      display: grid;
      gap: 10px;
      padding: 13px;
      border: 1px solid var(--line);
      border-left-width: 3px;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.052);
      animation: plugin-card-in 0.18s ease both;
      transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    }
    .plugin-card:hover {
      transform: translateY(-1px);
      box-shadow: 0 12px 30px rgba(24, 33, 45, 0.09);
    }
    .plugin-card.installed {
      border-left-color: var(--green);
    }
    .plugin-card.needs-update {
      border-left-color: var(--amber);
    }
    .plugin-card.installable {
      border-left-color: var(--blue);
    }
    .plugin-card.blocked {
      border-left-color: var(--red);
    }
    .plugin-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      min-width: 0;
    }
    .plugin-card-title h3 {
      overflow-wrap: anywhere;
    }
    .plugin-card-title span:not(.plugin-icon) {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }
    .plugin-card-description {
      min-height: 40px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      overflow-wrap: anywhere;
    }
    .plugin-card-meta {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .plugin-card-meta span {
      min-height: 24px;
      display: inline-flex;
      align-items: center;
      padding: 3px 7px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }
    .plugin-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      padding-top: 2px;
    }
    .plugin-link {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border: 1px solid #b9cffc;
      border-radius: 999px;
      background: #eef4ff;
      color: #1d4ed8;
      font-size: 12px;
      font-weight: 850;
      text-decoration: none;
    }
    .plugin-link:hover {
      filter: brightness(0.97);
    }
    .plugin-error-box {
      padding: 9px 10px;
      border: 1px solid #f1b8b2;
      border-radius: 8px;
      background: #fff1f0;
      color: var(--red);
      font-size: 12px;
      font-weight: 750;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
    }
    .plugin-operation,
    .plugin-detail {
      display: grid;
      gap: 12px;
    }
    .plugin-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .plugin-detail-item {
      min-width: 0;
      display: grid;
      gap: 4px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .plugin-detail-item span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }
    .plugin-detail-item strong {
      font-size: 13px;
      overflow-wrap: anywhere;
    }
    .plugin-detail-item strong.mono {
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      font-size: 12px;
      font-weight: 750;
    }
    .plugin-detail-section {
      display: grid;
      gap: 8px;
    }
    .plugin-detail-actions {
      padding-top: 4px;
    }
    .plugin-loading-dots {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 5px;
    }
    .plugin-loading-dots span {
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: var(--accent);
      animation: plugin-dot 0.9s ease-in-out infinite;
    }
    .plugin-loading-dots span:nth-child(2) {
      animation-delay: 0.12s;
    }
    .plugin-loading-dots span:nth-child(3) {
      animation-delay: 0.24s;
    }
    .plugin-skeleton-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .plugin-skeleton,
    .plugin-card.skeleton {
      min-height: 154px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: linear-gradient(90deg, #eef2f5 0%, #f8fafb 45%, #eef2f5 90%);
      background-size: 220% 100%;
      animation: plugin-skeleton 1.2s ease-in-out infinite;
    }
    @keyframes plugin-card-in {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes plugin-dot {
      0%, 80%, 100% { transform: scale(0.72); opacity: 0.52; }
      40% { transform: scale(1); opacity: 1; }
    }
    @keyframes plugin-skeleton {
      from { background-position: 120% 0; }
      to { background-position: -120% 0; }
    }
    .platform-login-page {
      width: min(1040px, 100%);
      margin: 0 auto;
    }
    .account-connection-page {
      width: 100%;
      margin: 0;
    }
    .account-connection-section {
      display: grid;
      gap: 12px;
    }
    .account-connection-section .panel-head {
      margin-bottom: 0;
    }
    .platform-login-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(286px, 340px));
      justify-content: start;
      gap: 12px;
      align-items: start;
    }
    .platform-login-card {
      min-width: 0;
      display: grid;
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.052);
    }
    .platform-login-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }
    .platform-login-title {
      min-width: 0;
      display: grid;
      gap: 6px;
    }
    .platform-login-title > span:not(.platform-tag) {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .platform-login-account {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .platform-login-avatar {
      width: 38px;
      height: 38px;
      border-radius: 8px;
    }
    .platform-login-account > div {
      min-width: 0;
      display: grid;
      gap: 3px;
    }
    .platform-login-account span,
    .platform-login-account small {
      display: block;
      color: var(--muted);
      font-size: 12px;
      overflow-wrap: anywhere;
    }
    .platform-login-account strong {
      font-size: 15px;
      overflow-wrap: anywhere;
    }
    .platform-login-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .platform-login-actions button {
      min-width: 0;
      min-height: 32px;
      padding: 6px 8px;
    }
    .platform-login-actions .login-action-qr {
      border-color: transparent;
      background: var(--accent);
      color: #fff;
    }
    .platform-login-actions .login-action-cookie {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    .platform-login-actions .login-action-export {
      border-color: #d7c3f4;
      background: #f6f1ff;
      color: #6d3bb5;
    }
    .platform-login-actions .login-action-refresh {
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
    }
    .platform-login-actions .login-action-unknown {
      border-color: var(--line-strong);
      background: var(--panel-soft);
      color: var(--muted);
    }
    .cookie-export {
      display: grid;
      gap: 10px;
    }
    .cookie-export-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .cookie-export-tab {
      min-height: 30px;
      padding: 5px 10px;
      border-color: var(--line);
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }
    .cookie-export-tab.active {
      border-color: #9edbd4;
      background: var(--accent-soft);
      color: var(--accent);
    }
    .cookie-export-description {
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .cookie-export textarea {
      min-height: 178px;
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      font-size: 12px;
      line-height: 1.5;
    }
    .cookie-export-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .qr-login-panel {
      display: grid;
      justify-items: center;
      gap: 12px;
    }
    .qr-login-copy {
      display: grid;
      gap: 4px;
      text-align: center;
    }
    .qr-login-copy strong {
      font-size: 14px;
      line-height: 1.35;
    }
    .qr-login-copy span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .qr-login-copy b {
      color: var(--accent);
    }
    .qr-code-box {
      position: relative;
      width: 240px;
      height: 240px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }
    .qr-code-box img {
      width: 216px;
      height: 216px;
      display: block;
      object-fit: contain;
      transition: filter 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
    }
    .qr-code-loading {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .qr-code-box.ready .qr-code-loading,
    .qr-code-box.expired .qr-code-loading,
    .qr-code-box.success .qr-code-loading,
    .qr-code-box.error .qr-code-loading {
      display: none;
    }
    .qr-code-box.expired img,
    .qr-code-box.error img {
      filter: blur(4px) grayscale(1);
      opacity: 0.62;
      transform: scale(1.02);
    }
    .qr-code-box.success {
      border-color: #9edbd4;
      box-shadow: 0 0 0 4px var(--accent-soft);
    }
    .qr-expired-overlay {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      background: rgba(255, 255, 255, 0.44);
    }
    .qr-refresh-button {
      width: 52px;
      height: 52px;
      min-height: 52px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 1px solid #b9ded8;
      border-radius: 999px;
      background: #eef8f6;
      color: var(--accent);
      font-size: 25px;
      line-height: 1;
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.16);
    }
    .qr-status-card {
      width: 100%;
      display: grid;
      gap: 4px;
      padding: 10px 11px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .qr-status-card span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .qr-status-card strong {
      color: var(--text);
      font-size: 14px;
      overflow-wrap: anywhere;
    }
    .qr-status-card.success {
      border-color: #9edbd4;
      background: var(--accent-soft);
    }
    .qr-status-card.success strong {
      color: var(--accent);
    }
    .qr-status-card.expired {
      border-color: #f0c98d;
      background: #fff8ea;
    }
    .qr-status-card.expired strong {
      color: var(--amber);
    }
    .qr-status-card.error {
      border-color: #f1b8b2;
      background: #fff1f0;
    }
    .qr-status-card.error strong {
      color: var(--red);
    }
    .card {
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 2px 8px rgba(24, 33, 45, 0.04), 0 8px 24px rgba(24, 33, 45, 0.06);
      transition: all 0.3s ease;
    }
    .card:hover {
      box-shadow: 0 4px 12px rgba(24, 33, 45, 0.08), 0 12px 32px rgba(24, 33, 45, 0.1);
      transform: translateY(-2px);
    }
    .card-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }
    .config-layout {
      display: grid;
      grid-template-columns: 286px minmax(0, 1fr);
      gap: 14px;
      align-items: start;
    }
    .config-list-panel {
      position: sticky;
      top: 0px;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
      gap: 10px;
      max-height: calc(100dvh - 96px);
      overflow: hidden;
    }
    .config-list-tools {
      min-width: 0;
      display: grid;
      gap: 7px;
    }
    .config-search-box {
      min-width: 0;
      min-height: 38px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 7px;
      padding: 5px 6px 5px 10px;
      border: 1px solid #cfdbe7;
      border-radius: 8px;
      background: #f8fbfd;
      transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    }
    .config-search-box:focus-within {
      border-color: #8fcfc6;
      background: #fff;
      box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
    }
    .config-search-icon {
      width: 18px;
      min-width: 18px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 15px;
      line-height: 1;
    }
    .config-search-box input {
      min-width: 0;
      width: 100%;
      min-height: 26px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--text);
      font-size: 13px;
      font-weight: 750;
      outline: none;
    }
    .config-search-box input:focus {
      background: transparent;
      box-shadow: none;
    }
    .config-search-clear {
      width: 24px;
      min-width: 24px;
      min-height: 24px;
      height: 24px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-color: #d7e1ea;
      border-radius: 999px;
      background: #fff;
      color: var(--muted);
      font-size: 15px;
      font-weight: 900;
      line-height: 1;
      filter: none;
    }
    .config-search-clear:hover {
      border-color: #b9ded8;
      background: var(--accent-soft);
      color: var(--accent);
    }
    .config-search-clear[hidden] { display: none; }
    .config-search-summary {
      min-width: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .config-search-empty-panel {
      display: grid;
      place-items: center;
      gap: 6px;
      min-height: 150px;
      padding: 22px;
      border-style: dashed;
      text-align: center;
    }
    .config-search-empty-panel[hidden] { display: none; }
    .config-search-empty-panel strong {
      color: var(--text);
      font-size: 15px;
      font-weight: 900;
    }
    .config-search-empty-panel span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }
    .config-list {
      display: grid;
      gap: 8px;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 2px;
    }
    .config-item {
      width: 100%;
      display: grid;
      gap: 4px;
      min-height: 0;
      padding: 10px 11px;
      border-color: var(--line);
      background: #fff;
      color: var(--text);
      text-align: left;
      white-space: normal;
    }
    .config-item.active {
      border-color: var(--accent);
      background: var(--accent-soft);
      color: var(--accent);
    }
    .config-item span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      overflow-wrap: anywhere;
    }
    .config-detail {
      min-width: 0;
      display: grid;
      gap: 14px;
    }
    .config-hero {
      position: sticky;
      top: 0;
      z-index: 20;
      display: grid;
      gap: 8px;
      padding: 12px 14px;
      overflow: hidden;
      border-color: #b9ded8;
      background:
        linear-gradient(135deg, rgba(233, 249, 246, 0.96), rgba(242, 246, 255, 0.96)),
        #fff;
      box-shadow: 0 10px 28px rgba(33, 107, 97, 0.10);
      backdrop-filter: blur(10px);
    }
    .config-hero-main {
      min-width: 0;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
    }
    .config-hero-title {
      flex: 1 1 auto;
      min-width: 0;
      display: grid;
      gap: 5px;
    }
    .config-title-line {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .config-hero-title h2 {
      font-size: 18px;
    }
    .config-description-line {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .config-hero-title p {
      max-width: 860px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }
    .config-kind-pill {
      width: max-content;
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      padding: 2px 8px;
      border: 1px solid #9edbd4;
      border-radius: 999px;
      background: #fff;
      color: var(--accent);
      font-size: 12px;
      font-weight: 900;
    }
    .config-hero-side {
      flex: 0 0 auto;
      min-width: 0;
      display: grid;
      justify-items: end;
      gap: 8px;
    }
    .config-hero-meta {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .config-hero-meta span {
      min-height: 26px;
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border: 1px solid rgba(24, 33, 45, 0.08);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.76);
      color: var(--text);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }
    .config-field-search-row {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding-top: 8px;
      border-top: 1px solid rgba(15, 118, 110, 0.14);
    }
    .config-field-search-box {
      width: min(520px, 100%);
      background: rgba(255, 255, 255, 0.82);
    }
    .config-field-search-row .config-search-summary {
      flex: 0 0 auto;
      padding: 4px 8px;
      border: 1px solid rgba(15, 118, 110, 0.16);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.68);
      color: var(--accent);
      white-space: nowrap;
    }
    .config-source-path {
      min-width: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .config-workbench {
      min-width: 0;
      display: grid;
      grid-template-columns: 218px minmax(0, 1fr);
      gap: 14px;
      align-items: start;
    }
    .config-tab-panel {
      position: sticky;
      top: 0;
      display: grid;
      gap: 10px;
      max-height: calc(100dvh - 96px);
      overflow: hidden;
      padding: 12px;
    }
    .config-tab-panel-head {
      display: grid;
      gap: 3px;
      padding: 2px 2px 8px;
      border-bottom: 1px solid var(--line);
    }
    .config-tab-panel-head span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }
    .config-tab-panel-head strong {
      color: var(--text);
      font-size: 15px;
      overflow-wrap: anywhere;
    }
    .config-tab-list {
      min-height: 0;
      display: grid;
      gap: 7px;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 2px;
    }
    button.config-tab-button {
      width: 100%;
      min-height: 42px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      padding: 8px 9px;
      border-color: var(--line);
      background: #fff;
      color: var(--text);
      text-align: left;
      white-space: normal;
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
    }
    button.config-tab-button:hover {
      transform: translateX(2px);
      border-color: #b9ded8;
      background: #f6fbfa;
      filter: none;
    }
    button.config-tab-button.active {
      border-color: #74c7bd;
      background: var(--accent-soft);
      color: var(--accent);
      box-shadow: inset 3px 0 0 var(--accent);
    }
    button.config-tab-button.changed {
      border-color: #f0c98d;
      background: #fffaf0;
    }
    button.config-tab-button.changed.active {
      border-color: #d99b3d;
      background: linear-gradient(90deg, #fff8ea, #eef8f6);
      color: #8a5a00;
      box-shadow: inset 3px 0 0 #d99b3d;
    }
    button.config-tab-button:disabled {
      cursor: default;
      opacity: 0.52;
      transform: none;
    }
    .config-tab-name {
      min-width: 0;
      font-size: 13px;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .config-tab-state {
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }
    button.config-tab-button.changed .config-tab-state {
      background: #fff1d6;
      color: var(--amber);
      font-weight: 900;
    }
    button.config-tab-button.restart-changed .config-tab-state {
      background: #fff1f0;
      color: var(--red);
      font-weight: 900;
    }
    .config-tab-stage {
      min-width: 0;
      container-type: inline-size;
      display: grid;
      gap: 14px;
    }
    .config-section {
      min-width: 0;
      padding: 18px;
      animation: plugin-card-in 0.16s ease both;
      scroll-margin-top: 88px;
    }
    .config-section[hidden] { display: none; }
    .config-section-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }
    .config-section-head > div {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .config-section-head h2 {
      font-size: 17px;
    }
    .config-section-kicker {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }
    .config-section-count {
      min-height: 26px;
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }
    .config-advanced {
      grid-column: 1 / -1;
      min-width: 0;
      margin-top: 2px;
      border: 1px dashed #cfdbe8;
      border-radius: 8px;
      background: #fbfcfe;
    }
    .config-advanced > summary {
      min-height: 34px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      color: var(--text);
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
      user-select: none;
      outline-offset: 3px;
      list-style: none;
    }
    .config-advanced > summary::-webkit-details-marker {
      display: none;
    }
    .config-advanced > summary::before {
      content: "▶";
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      color: var(--muted);
      font-size: 13px;
      transition: transform 0.16s ease;
    }
    .config-advanced[open] > summary::before {
      transform: rotate(90deg);
    }
    .config-advanced > summary small {
      margin-left: auto;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .config-advanced > summary small::before {
      content: "展开 · ";
    }
    .config-advanced[open] > summary small::before {
      content: "收起 · ";
    }
    .config-advanced-grid {
      padding: 0 12px 12px;
    }
    .config-dirty-badge {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      padding: 4px 9px;
      border: 1px solid #f0c98d;
      border-radius: 999px;
      background: #fff8ea;
      color: var(--amber);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }
    .config-hero-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      animation: plugin-card-in 0.16s ease both;
    }

    .config-hero-actions[hidden] {
      display: none;
    }

    .config-action-buttons {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      flex-shrink: 0;
    }

    .config-action-restart {
      border-color: #f1b8b2;
      background: #fff1f0;
      color: #b42318;
    }

    .config-action-restart:hover {
      background: #fdeceb;
      border-color: #b42318;
      filter: none;
    }

    .config-section .inline-note {
      display: block;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
      padding: 7px 9px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-soft);
      line-height: 1.45;
    }
    .message-template-field {
      grid-column: 1 / -1;
    }
    .message-template-head,
    .message-template-preview-head {
      min-width: 0;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }
    .message-template-head .config-field-title {
      display: inline-flex;
    }
    .message-template-field .config-composite-body {
      padding-top: 10px;
      padding-bottom: 10px;
    }
    .message-template-compact {
      min-width: 0;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 10px;
    }
    .message-template-stats {
      min-height: 24px;
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border: 1px solid #d8e4ef;
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }
    .message-template-inline {
      min-width: 0;
      padding: 6px 8px;
      border: 1px solid #e2eaf2;
      border-radius: 7px;
      background: #fff;
      color: var(--text);
      font-size: 13px;
      line-height: 1.45;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .message-template-edit-button {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    .message-template-preview {
      min-width: 0;
      display: grid;
      gap: 10px;
    }
    .message-template-preview-message {
      min-width: 0;
      padding: 10px 11px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: #fff;
      line-height: 1.5;
      overflow-wrap: anywhere;
    }
    .message-template-preview-message:nth-child(odd) {
      border-left: 3px solid #3b82f6;
    }
    .message-template-preview-message:nth-child(even) {
      border-left: 3px solid #14b8a6;
    }
    .message-template-preview-body {
      min-width: 0;
      color: var(--text);
      font-size: 13px;
      line-height: 1.6;
      overflow-wrap: anywhere;
    }
    .message-template-preview-index {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .message-template-preview-forward {
      border-style: dashed;
      background: #f5f9ff;
    }
    .message-template-preview-forward::before {
      content: "转发";
      display: inline-flex;
      align-items: center;
      margin-bottom: 8px;
      padding: 1px 6px;
      border-radius: 999px;
      background: rgba(29, 78, 216, 0.1);
      color: #1d4ed8;
      font-size: 11px;
      font-weight: 850;
    }
    .message-template-forward-card {
      min-width: 0;
      padding: 8px;
      border: 1px solid #d9e6ff;
      border-radius: 8px;
      background: #fff;
    }
    .message-template-forward-summary {
      margin-bottom: 8px;
      color: #1d4ed8;
      font-size: 12px;
      font-weight: 800;
    }
    .message-template-forward-nodes {
      display: grid;
      gap: 6px;
      min-width: 0;
    }
    .message-template-forward-node {
      min-width: 0;
      padding: 8px 9px;
      border: 1px solid #d9e6ff;
      border-radius: 7px;
      background: #f8fbff;
      overflow-wrap: anywhere;
    }
    .message-template-forward-node-title {
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .message-template-editor-modal {
      display: grid;
      grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
      gap: 12px;
      min-width: 0;
      align-items: start;
    }
    .message-template-editor-modal.is-chip-delete-ready .message-template-builder-hint {
      color: #b91c1c;
      font-weight: 800;
    }
    .message-template-editor-modal.is-chip-delete-ready .message-template-builder-hint::after {
      content: "  松开即可删除拖出的字段";
    }
    .message-template-editor-pane,
    .message-template-preview-pane,
    .message-template-token-section {
      min-width: 0;
      display: grid;
      gap: 10px;
      align-content: start;
    }
    .message-template-builder-head,
    .message-template-section-head {
      min-width: 0;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }
    .message-template-builder-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 6px;
    }
    .message-template-add-message-button {
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
    }
    .message-template-add-forward-button {
      border-color: #b9ded8;
      background: #eef8f6;
      color: #15675f;
    }
    .message-template-builder-hint {
      min-width: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }
    .message-template-block-list {
      position: relative;
      min-width: 0;
      display: grid;
      gap: 10px;
    }
    .message-template-builder-block {
      min-width: 0;
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-soft);
      border-left: 3px solid #3b82f6;
    }
    .message-template-builder-block.forward {
      border-style: dashed;
      background: #f7fbff;
      border-left-color: #14b8a6;
    }
    .message-template-builder-block-head,
    .message-template-forward-editor-node-head {
      min-width: 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
    .message-template-builder-block-title,
    .message-template-forward-editor-node-head > span {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }
    .message-template-builder-block-actions,
    .message-template-forward-editor-node-actions {
      display: flex;
      justify-content: flex-end;
      gap: 5px;
      flex-wrap: wrap;
    }
    .message-template-builder-block-actions .compact,
    .message-template-forward-editor-node-actions .compact {
      min-height: 24px;
      padding: 2px 7px;
      font-size: 11px;
    }
    .message-template-builder-block-actions .message-template-move-button,
    .message-template-forward-editor-node-actions .message-template-move-button {
      border-color: #d4dde7;
      background: #f8fafc;
      color: var(--muted);
    }
    .message-template-builder-block-actions .message-template-delete-button,
    .message-template-forward-editor-node-actions .message-template-delete-button {
      border-color: #fecaca;
      background: #fff1f2;
      color: #be123c;
    }
    .message-template-builder-block-actions .message-template-add-node-button,
    .message-template-forward-editor-node-actions .message-template-add-node-button {
      border-color: #c7d2fe;
      background: #eef2ff;
      color: #4338ca;
    }
    .message-template-builder-block-actions .compact:disabled,
    .message-template-forward-editor-node-actions .compact:disabled {
      opacity: 0.42;
      cursor: not-allowed;
      transform: none;
    }
    .message-template-content-editor {
      min-width: 0;
      min-height: 72px;
      max-height: 260px;
      overflow: auto;
      padding: 8px 9px;
      border: 1px solid #d8e4ef;
      border-radius: 7px;
      background: #fff;
      color: var(--text);
      font-size: 13px;
      line-height: 1.65;
      outline: none;
      overflow-wrap: normal;
      word-break: normal;
      white-space: pre;
      tab-size: 2;
    }
    .message-template-content-editor[data-template-content][contenteditable="true"] {
      cursor: text;
    }
    .message-template-content-editor:empty::before {
      content: attr(data-placeholder);
      color: var(--muted);
      font-weight: 650;
    }
    .message-template-content-editor:focus {
      border-color: #b9cffc;
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
    }
    .message-template-content-editor.is-dragging {
      border-color: var(--accent);
      background: #eef8f6;
      caret-color: #14b8a6;
      box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);
    }
    .message-template-content-editor.is-drop-disabled {
      border-color: #f4b4b4;
      background: #fff5f5;
      box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.12);
    }
    .message-template-drop-caret {
      position: absolute;
      z-index: 8;
      width: 3px;
      min-height: 18px;
      border-radius: 999px;
      background: #14b8a6;
      box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 4px rgba(20, 184, 166, 0.18);
      pointer-events: none;
    }
    .message-template-field-chip {
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      margin: 0 2px;
      padding: 1px 6px;
      border: 1px solid #b9ded8;
      border-radius: 999px;
      background: #eef8f6;
      color: #15675f;
      font-size: 12px;
      font-weight: 850;
      vertical-align: baseline;
      user-select: none;
      white-space: nowrap;
      cursor: grab;
    }
    .message-template-field-chip:active {
      cursor: grabbing;
    }
    .message-template-field-chip.is-moving {
      opacity: 0;
    }
    .message-template-field-chip.is-disabled {
      border-color: #e5e7eb;
      background: #f3f4f6;
      color: #8a94a6;
      cursor: not-allowed;
      text-decoration: line-through;
    }
    .message-template-forward-editor-nodes {
      min-width: 0;
      display: grid;
      gap: 8px;
    }
    .message-template-forward-editor-node {
      min-width: 0;
      display: grid;
      gap: 6px;
      padding: 8px;
      border: 1px solid #d9e6ff;
      border-radius: 7px;
      background: #fff;
    }
    .message-template-source-panel {
      min-width: 0;
      display: grid;
      gap: 10px;
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-soft);
      overflow: hidden;
    }
    .message-template-source-panel > summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      cursor: pointer;
      padding: 8px 10px;
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
      list-style: none;
      background: #fff;
      border-bottom: 1px solid var(--line);
    }
    .message-template-source-panel[open] > summary {
      border-bottom-color: var(--line);
    }
    .message-template-source-panel > summary::-webkit-details-marker {
      display: none;
    }
    .message-template-source-panel > summary small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }
    .message-template-source-panel .message-template-editor-input {
      min-height: 180px;
      border: 0;
      border-radius: 0;
      background: #fff;
    }
    .message-template-editor-input {
      min-height: 280px;
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      line-height: 1.5;
    }
    .message-template-source-input[hidden] {
      display: none;
    }
    .message-template-token-group {
      min-width: 0;
      display: grid;
      gap: 6px;
    }
    .message-template-token-group-title {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }
    .message-template-token-group-head {
      min-width: 0;
      display: flex;
      align-items: baseline;
      gap: 8px;
      flex-wrap: wrap;
    }
    .message-template-token-group-desc {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }
    .message-template-token-bar {
      min-width: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .message-template-token-button {
      min-height: 32px;
      display: inline-flex;
      align-items: center;
      padding: 5px 9px;
      border-color: #b9ded8;
      background: #eef8f6;
      color: var(--accent);
      text-align: left;
      cursor: grab;
      border-radius: 7px;
    }
    .message-template-token-button:active {
      cursor: grabbing;
    }
    .message-template-token-title {
      color: var(--text);
      font-size: 12px;
      font-weight: 850;
    }
    .message-routing-policy-field,
    .onebot-connection-field,
    .command-permission-field,
    .notification-target-field,
    .media-delivery-field {
      grid-column: 1 / -1;
    }
    .message-routing-policy-field,
    .onebot-connection-field,
    .notification-target-field,
    .media-delivery-field {
      gap: 10px;
    }
    .media-delivery-field .config-composite-body {
      padding: 10px 12px 12px;
    }
    .media-delivery-panel {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(220px, 0.56fr) minmax(260px, 1fr);
      gap: 10px 12px;
      align-items: end;
    }
    .media-delivery-control {
      min-width: 0;
      display: grid;
      gap: 6px;
    }
    .media-delivery-control.full,
    .media-delivery-hint {
      grid-column: 1 / -1;
    }
    .media-delivery-control label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .command-permission-toolbar {
      min-width: 0;
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .command-permission-toolbar input,
    .command-permission-toolbar select,
    .command-permission-toolbar textarea {
      min-width: 0;
      flex: 1 1 220px;
      max-width: 100%;
    }
    .onebot-connection-modal .secret-control {
      max-width: 100%;
    }
    .permission-advanced {
      margin-top: 10px;
    }
    .command-permission-modal {
      grid-template-columns: 1fr;
    }
    .notification-target-cell {
      display: grid;
      gap: 5px;
      justify-items: start;
      min-width: 0;
    }
    .notification-target-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .notification-target-manual-panel {
      display: grid;
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .notification-target-manual-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .config-secret-box {
      display: grid;
      gap: 8px;
    }
    .secret-fetch-panel {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      min-height: 36px;
      padding: 6px 8px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-soft);
    }
    .secret-fetch-panel span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    button.secret-fetch-button {
      min-height: 28px;
      padding: 4px 9px;
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
      font-size: 12px;
    }
    .secret-control {
      position: relative;
      display: block;
      min-width: 0;
    }
    .secret-control input {
      padding-right: 44px;
    }
    .secret-eye {
      position: absolute;
      top: 50%;
      right: 5px;
      width: 30px;
      min-height: 28px;
      display: grid;
      place-items: center;
      padding: 0;
      border-color: transparent;
      background: transparent;
      color: var(--muted);
      transform: translateY(-50%);
    }
    .secret-eye:hover {
      background: var(--panel-soft);
      filter: none;
    }
    .secret-eye-shape {
      position: relative;
      width: 17px;
      height: 11px;
      border: 1.8px solid currentColor;
      border-radius: 999px / 720px;
    }
    .secret-eye-shape::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 5px;
      height: 5px;
      border-radius: 999px;
      background: currentColor;
      transform: translate(-50%, -50%);
    }
    .secret-eye-slash {
      position: absolute;
      width: 2px;
      height: 22px;
      border-radius: 999px;
      background: currentColor;
      opacity: 0;
      transform: rotate(45deg);
    }
    .secret-eye[data-revealed="true"] {
      color: var(--accent);
    }
    .secret-eye[data-revealed="true"] .secret-eye-slash {
      opacity: 1;
    }
    .messages-page {
      min-width: 0;
      height: 100%;
      min-height: 0;
      grid-template-rows: minmax(0, 1fr);
    }
    .message-panel {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 10px;
      overflow: hidden;
      animation: plugin-card-in 0.18s ease both;
    }
    .message-panel-head {
      align-items: center;
      margin-bottom: 0;
    }
    .message-panel-side {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }
    .message-tab-bar {
      min-width: 0;
      display: inline-flex;
      width: fit-content;
      gap: 4px;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .message-tab-button {
      min-height: 30px;
      padding: 5px 12px;
      border: 1px solid transparent;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
      box-shadow: none;
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }
    .message-tab-button.active {
      border-color: rgba(15, 118, 110, 0.28);
      background: var(--panel);
      color: var(--accent);
      box-shadow: 0 5px 16px rgba(24, 33, 45, 0.08);
    }
    .message-tab-button small {
      min-width: 22px;
      min-height: 20px;
      display: inline-grid;
      place-items: center;
      padding: 1px 6px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }
    .message-tab-button.active small {
      border-color: rgba(15, 118, 110, 0.28);
      background: var(--accent-soft);
      color: var(--accent);
    }
    .message-tab-view {
      min-width: 0;
      min-height: 0;
      height: 100%;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 10px;
    }
    .message-tab-view[hidden] {
      display: none;
    }
    .message-record-status {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-align: right;
    }
    .message-auto-refresh-controls {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .message-auto-refresh-toggle {
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 1px 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }
    .message-auto-refresh-toggle input {
      width: 14px;
      min-width: 14px;
      height: 14px;
      min-height: 14px;
      margin: 0;
      padding: 0;
    }
    .message-auto-refresh-controls select {
      width: auto;
      min-width: 96px;
      min-height: 24px;
      height: 24px;
      padding: 1px 7px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 800;
    }
    .message-filter-bar {
      min-width: 0;
      margin-bottom: 0;
    }
    .message-filter-bar .entity-filter-controls {
      min-width: 0;
    }
    .message-filter-bar .entity-filter-controls input,
    .message-filter-bar .entity-filter-controls select {
      width: auto;
      min-width: 136px;
      max-width: 230px;
      min-height: 28px;
      height: 28px;
      padding: 3px 8px;
      font-size: 13px;
    }
    .message-filter-bar .entity-filter-controls input#deliveryFilterKeyword {
      min-width: 220px;
      max-width: 300px;
    }
    .message-filter-bar .entity-filter-controls input#incomingFilterKeyword,
    .message-filter-bar .entity-filter-controls input#incomingFilterTrace {
      min-width: 210px;
      max-width: 300px;
    }
    .message-filter-bar .entity-filter-controls input#deliveryFilterTargetId,
    .message-filter-bar .entity-filter-controls input#deliveryFilterRoute,
    .message-filter-bar .entity-filter-controls input#deliveryFilterAccount,
    .message-filter-bar .entity-filter-controls input#incomingFilterTargetId,
    .message-filter-bar .entity-filter-controls input#incomingFilterSender,
    .message-filter-bar .entity-filter-controls input#incomingFilterPlugin,
    .message-filter-bar .entity-filter-controls input#incomingFilterCommand {
      min-width: 120px;
      max-width: 190px;
    }
    .message-filter-bar .entity-filter-controls button {
      min-height: 28px;
      padding: 3px 9px;
      font-size: 12px;
    }
    .message-internal-toggle {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 8px;
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
      background: var(--panel-soft);
    }
    .message-filter-bar .entity-filter-controls .message-internal-toggle input {
      width: 14px;
      min-width: 14px;
      height: 14px;
      min-height: 14px;
      margin: 0;
      padding: 0;
    }
    .message-table-region,
    .messages-table-host {
      min-width: 0;
      min-height: 0;
      height: 100%;
    }
    .messages-table-wrap {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      height: 100%;
      max-height: 100%;
      overflow: auto;
    }
    .messages-table {
      min-width: 1320px;
      table-layout: fixed;
    }
    .messages-table th {
      position: sticky;
      top: 0;
      z-index: 1;
    }
    .messages-table th,
    .messages-table td {
      padding: 7px 9px;
      vertical-align: top;
    }
    .messages-table th:nth-child(1),
    .messages-table td:nth-child(1) {
      width: 335px;
    }
    .messages-table th:nth-child(2),
    .messages-table td:nth-child(2) {
      width: 220px;
    }
    .messages-table th:nth-child(3),
    .messages-table td:nth-child(3) {
      width: 175px;
    }
    .messages-table th:nth-child(4),
    .messages-table td:nth-child(4) {
      width: 185px;
    }
    .messages-table th:nth-child(5),
    .messages-table td:nth-child(5) {
      width: 210px;
    }
    .messages-table th:nth-child(6),
    .messages-table td:nth-child(6) {
      width: 145px;
    }
    .messages-table th:nth-child(7),
    .messages-table td:nth-child(7) {
      width: 82px;
    }
    .incoming-messages-table {
      min-width: 1180px;
    }
    .incoming-messages-table th:nth-child(1),
    .incoming-messages-table td:nth-child(1) {
      width: 365px;
    }
    .incoming-messages-table th:nth-child(2),
    .incoming-messages-table td:nth-child(2) {
      width: 240px;
    }
    .incoming-messages-table th:nth-child(3),
    .incoming-messages-table td:nth-child(3) {
      width: 170px;
    }
    .incoming-messages-table th:nth-child(4),
    .incoming-messages-table td:nth-child(4) {
      width: 180px;
    }
    .incoming-messages-table th:nth-child(5),
    .incoming-messages-table td:nth-child(5) {
      width: 160px;
    }
    .incoming-messages-table th:nth-child(6),
    .incoming-messages-table td:nth-child(6) {
      width: 82px;
    }
    .message-preview-cell,
    .message-target-cell,
    .message-policy-cell {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .message-preview-title {
      display: -webkit-box;
      max-width: none;
      line-height: 1.35;
      overflow: hidden;
      overflow-wrap: anywhere;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .message-preview-meta {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
    }
    .message-target-title {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .message-target-title .platform-tag {
      flex: 0 0 auto;
    }
    .message-target-title .primary-line {
      min-width: 0;
      flex: 1 1 auto;
    }
    .message-policy-cell {
      grid-template-columns: repeat(2, minmax(0, max-content));
      align-items: start;
    }
    .message-policy-cell .sub-line {
      grid-column: 1 / -1;
    }
    .message-meta-tag {
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 2px 7px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }
    .message-meta-tag.info {
      border-color: #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
    }
    .message-meta-tag.soft {
      border-color: #d9e2d0;
      background: #f4f8ef;
      color: #55703a;
    }
    .message-meta-tag.bad {
      border-color: #fecaca;
      background: #fff1f2;
      color: #b91c1c;
    }
    .message-status-cell {
      display: grid;
      gap: 4px;
      justify-items: start;
    }
    .message-status-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .message-attempts {
      min-width: 28px;
      min-height: 24px;
      display: inline-grid;
      place-items: center;
      padding: 2px 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
    }
    .message-result {
      display: -webkit-box;
      max-width: none;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.35;
      overflow: hidden;
      overflow-wrap: anywhere;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
    }
    .message-result.bad {
      color: var(--red);
    }
    .message-time {
      max-width: none;
    }
    .message-action-button {
      min-height: 26px;
      padding: 3px 8px;
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
      font-size: 12px;
    }
    .delivery-detail {
      display: grid;
      gap: 12px;
    }
    .delivery-error-text,
    .delivery-json-text {
      min-height: 96px;
      max-height: 260px;
      margin: 0;
      overflow: auto;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--text);
      font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .delivery-json-text {
      min-height: 180px;
      max-height: 360px;
    }
    .incoming-processing-list {
      display: grid;
      gap: 8px;
    }
    .incoming-processing-item {
      min-width: 0;
      display: grid;
      gap: 7px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .incoming-processing-item.bad {
      border-color: rgba(180, 35, 24, 0.24);
      background: rgba(180, 35, 24, 0.06);
    }
    .incoming-processing-head {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .incoming-processing-head > span:first-child {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }
    .incoming-processing-meta {
      min-width: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 6px 10px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }
    .incoming-processing-meta span {
      overflow-wrap: anywhere;
    }
    .incoming-processing-error {
      max-height: 160px;
      margin: 0;
      overflow: auto;
      padding: 8px;
      border: 1px solid rgba(180, 35, 24, 0.18);
      border-radius: 6px;
      background: rgba(180, 35, 24, 0.07);
      color: var(--red);
      font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .incoming-related-table-wrap {
      max-height: 320px;
      overflow: auto;
    }
    .message-empty {
      height: 100%;
      display: grid;
      place-items: center;
    }
    .testing-page {
      width: min(1440px, 100%);
      height: 100%;
      margin: 0 auto;
      min-width: 0;
      min-height: 0;
      display: grid;
      gap: 14px;
    }
    .testing-section-head,
    .testing-runbar,
    .testing-output-head,
    .testing-phone-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .testing-workbench {
      min-width: 0;
      min-height: 0;
      height: 100%;
      display: grid;
      grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
      gap: 14px;
      align-items: stretch;
    }
    .testing-input-panel {
      position: sticky;
      top: 0;
      align-self: start;
      max-height: 100%;
      overflow: auto;
      padding: 14px;
      border-radius: 10px;
    }
    .testing-form,
    .testing-output,
    .testing-summary-panel,
    .testing-output-panel,
    .testing-output-content,
    .testing-control-group,
    .testing-fold,
    .testing-data-view {
      min-width: 0;
      display: grid;
      gap: 10px;
    }
    .testing-output {
      min-height: 0;
      height: 100%;
      align-content: start;
      overflow: auto;
      padding-right: 2px;
    }
    .testing-mode-switch {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .testing-mode-option {
      min-width: 0;
      display: block;
      position: relative;
      cursor: pointer;
    }
    .testing-mode-option input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
    .testing-mode-option span {
      min-height: 58px;
      display: grid;
      align-content: center;
      gap: 3px;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
    }
    .testing-mode-option b,
    .testing-mode-option small,
    .testing-switch b,
    .testing-switch small,
    .testing-section-head strong,
    .testing-section-head span,
    .testing-output-head strong,
    .testing-output-head span,
    .testing-media-info strong,
    .testing-media-info span,
    .testing-media-info small {
      display: block;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .testing-mode-option b,
    .testing-switch b,
    .testing-section-head strong,
    .testing-output-head strong,
    .testing-media-info strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
      line-height: 1.25;
    }
    .testing-mode-option small,
    .testing-switch small,
    .testing-section-head span,
    .testing-output-head span,
    .testing-media-info span,
    .testing-media-info small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.4;
    }
    .testing-mode-option input:focus-visible + span {
      outline: 3px solid var(--focus);
      outline-offset: 2px;
    }
    .testing-mode-option input:checked + span {
      border-color: rgba(15, 118, 110, 0.46);
      background: var(--accent-soft);
      color: var(--accent);
    }
    .testing-control-group {
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }
    .testing-control-group:first-of-type {
      padding-top: 10px;
    }
    .testing-section-head {
      align-items: flex-start;
      margin-bottom: 2px;
    }
    .testing-compact-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .testing-switch-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .testing-switch {
      min-width: 0;
      position: relative;
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      gap: 9px;
      align-items: start;
      min-height: 68px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      cursor: pointer;
      transition: border-color 0.16s ease, background 0.16s ease;
    }
    .testing-switch input,
    .testing-json-toggle input {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: 0;
      opacity: 0;
      pointer-events: none;
    }
    .testing-switch-copy {
      min-width: 0;
      display: grid;
      gap: 3px;
    }
    .testing-switch:has(input:checked) {
      border-color: rgba(15, 118, 110, 0.45);
      background: var(--accent-soft);
    }
    .testing-check-mark {
      position: relative;
      width: 18px;
      height: 18px;
      margin-top: 2px;
      border: 1px solid var(--line-strong);
      border-radius: 5px;
      background: var(--panel);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
      transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    }
    .testing-check-mark::after {
      content: "";
      position: absolute;
      left: 5px;
      top: 2px;
      width: 5px;
      height: 9px;
      border: solid #fff;
      border-width: 0 2px 2px 0;
      opacity: 0;
      transform: rotate(45deg) scale(0.8);
      transition: opacity 0.12s ease, transform 0.12s ease;
    }
    .testing-switch input:checked + .testing-check-mark,
    .testing-json-toggle input:checked + .testing-check-mark {
      border-color: var(--accent);
      background: var(--accent);
      box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
    }
    .testing-switch input:checked + .testing-check-mark::after,
    .testing-json-toggle input:checked + .testing-check-mark::after {
      opacity: 1;
      transform: rotate(45deg) scale(1);
    }
    .testing-switch input:focus-visible + .testing-check-mark,
    .testing-json-toggle input:focus-visible + .testing-check-mark {
      outline: 3px solid var(--focus);
      outline-offset: 2px;
    }
    .testing-fold {
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }
    .testing-fold summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
      cursor: pointer;
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
      list-style-position: inside;
    }
    .testing-fold summary small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }
    .testing-template-card {
      min-width: 0;
      display: grid;
      gap: 8px;
    }
    .testing-template-compact {
      min-width: 0;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 7px 9px;
      align-items: center;
    }
    .testing-template-compact .message-template-inline {
      min-height: 32px;
      display: flex;
      align-items: center;
    }
    .testing-template-source {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.4;
    }
    .testing-template-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .testing-template-actions button {
      min-height: 30px;
    }
    .testing-template-editor-modal .message-template-source-panel .message-template-editor-input {
      min-height: 180px;
    }
    .testing-json-toggle {
      width: fit-content;
      position: relative;
      display: inline-grid;
      grid-template-columns: 18px minmax(0, auto);
      align-items: start;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }
    .testing-json-editor {
      min-height: 220px;
      font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    }
    .testing-json-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .testing-runbar {
      position: sticky;
      bottom: -1px;
      justify-content: flex-start;
      padding-top: 10px;
      border-top: 1px solid var(--line);
      background: var(--panel);
    }
    .testing-status {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      margin-left: auto;
      text-align: right;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .testing-run-summary {
      min-width: 0;
      display: grid;
      gap: 10px;
    }
    .testing-summary-empty,
    .testing-start-screen,
    .testing-draw-empty,
    .testing-chat-empty {
      min-width: 0;
      display: grid;
      place-items: center;
      min-height: 220px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      text-align: center;
    }
    .testing-summary-empty {
      min-height: 76px;
      text-align: left;
      place-items: stretch;
    }
    .testing-summary-empty > div,
    .testing-start-screen > div,
    .testing-draw-empty {
      display: grid;
      gap: 5px;
    }
    .testing-summary-empty strong,
    .testing-start-screen strong,
    .testing-draw-empty strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 900;
    }
    .testing-summary-empty span,
    .testing-start-screen span,
    .testing-draw-empty span,
    .testing-chat-empty {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.5;
      overflow-wrap: anywhere;
    }
    .testing-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }
    .testing-summary-item {
      min-width: 0;
      display: grid;
      gap: 3px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .testing-summary-item span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
    }
    .testing-summary-item strong {
      min-width: 0;
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
      overflow-wrap: anywhere;
    }
    .testing-view-tabs {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      padding-top: 2px;
    }
    button.testing-view-tab {
      min-height: 34px;
      padding: 7px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      box-shadow: none;
    }
    button.testing-view-tab.active {
      border-color: rgba(15, 118, 110, 0.42);
      background: var(--accent-soft);
      color: var(--accent);
    }
    .testing-preview-stage {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
      gap: 14px;
      align-items: start;
    }
    .testing-phone-shell {
      min-width: 0;
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #eef2f7;
    }
    .testing-phone-head {
      align-items: flex-start;
      padding: 2px 2px 10px;
      border-bottom: 1px solid rgba(184, 196, 207, 0.7);
    }
    .testing-phone-head strong,
    .testing-phone-head span {
      display: block;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .testing-phone-head strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 950;
    }
    .testing-phone-head span {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }
    .testing-chat {
      max-height: 760px;
      overflow: auto;
      display: grid;
      gap: 14px;
      padding-right: 2px;
    }
    .testing-chat-batch {
      min-width: 0;
      display: grid;
      gap: 8px;
    }
    .testing-chat-batch-label {
      justify-self: center;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(102, 112, 133, 0.12);
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }
    .testing-message {
      justify-self: start;
      width: min(100%, 380px);
      min-width: 0;
      display: grid;
      gap: 8px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 5px 14px rgba(24, 33, 45, 0.06);
    }
    .testing-message.nested {
      width: 100%;
      padding: 8px;
      box-shadow: none;
      background: var(--panel);
    }
    .testing-message-text {
      margin: 0;
      color: var(--text);
      font: 13px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .testing-message-muted {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }
    .testing-message-image {
      min-width: 0;
      margin: 0;
      display: grid;
      gap: 6px;
      justify-items: start;
    }
    .testing-chat-image {
      display: block;
      width: auto;
      max-width: 100%;
      height: auto;
      max-height: 420px;
      object-fit: contain;
      object-position: left top;
      border-radius: 8px;
      background: var(--panel-soft);
      border: 1px solid var(--line);
    }
    .testing-message-image figcaption {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }
    .testing-message-attachment {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 10px;
      align-items: center;
    }
    .testing-attachment-icon {
      min-width: 44px;
      min-height: 32px;
      display: inline-grid;
      place-items: center;
      padding: 4px 8px;
      border-radius: 8px;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 12px;
      font-weight: 950;
    }
    .testing-message-attachment strong,
    .testing-message-attachment small {
      display: block;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .testing-message-attachment strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }
    .testing-message-attachment small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .testing-message-forward {
      min-width: 0;
      display: grid;
      gap: 10px;
      padding: 9px 10px 10px;
      border: 1px solid #dbeafe;
      border-left: 3px solid #60a5fa;
      border-radius: 8px;
      background: #f8fbff;
    }
    .testing-forward-head {
      display: grid;
      gap: 4px;
    }
    .testing-forward-kicker {
      color: #2563eb;
      font-size: 11px;
      font-weight: 950;
      letter-spacing: 0;
    }
    .testing-forward-head strong,
    .testing-forward-head span {
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .testing-forward-head strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
      line-height: 1.35;
    }
    .testing-forward-head span:not(.testing-forward-kicker) {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.45;
    }
    .testing-forward-nodes {
      display: grid;
      gap: 7px;
    }
    .testing-forward-node {
      display: grid;
      gap: 7px;
      padding: 8px 9px 9px;
      border: 1px solid #e3edf9;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.74);
    }
    .testing-forward-node-head {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      color: var(--muted);
    }
    .testing-forward-node-head strong,
    .testing-forward-node-head span {
      min-width: 0;
      overflow-wrap: anywhere;
      font-size: 12px;
      line-height: 1.3;
    }
    .testing-forward-node-head strong {
      color: #475569;
      font-weight: 950;
    }
    .testing-forward-node-head span {
      flex: 0 0 auto;
      color: var(--muted);
      font-weight: 850;
    }
    .testing-forward-node-body {
      display: grid;
      gap: 6px;
    }
    .testing-forward-node-body .testing-message {
      width: 100%;
      max-width: 100%;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }
    .testing-message.nested .testing-chat-image {
      max-height: 280px;
    }
    .testing-draw-viewer {
      min-width: 0;
      display: grid;
      align-content: start;
      gap: 10px;
    }
    .testing-draw-frame {
      min-width: 0;
      min-height: 460px;
      max-height: 820px;
      overflow: auto;
      display: grid;
      place-items: start center;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background:
        linear-gradient(45deg, rgba(102, 112, 133, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(102, 112, 133, 0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(102, 112, 133, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(102, 112, 133, 0.08) 75%),
        var(--panel-soft);
      background-size: 22px 22px;
      background-position: 0 0, 0 11px, 11px -11px, -11px 0;
    }
    .testing-draw-image {
      max-width: 100%;
      width: auto;
      max-height: 780px;
      object-fit: contain;
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 12px 34px rgba(24, 33, 45, 0.14);
    }
    .testing-media-board {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
      gap: 12px;
    }
    .testing-media-tile {
      min-width: 0;
      display: grid;
      gap: 9px;
      padding: 9px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .testing-media-thumb-wrap {
      min-width: 0;
      aspect-ratio: 16 / 10;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
    }
    .testing-media-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      background: var(--panel-soft);
    }
    .testing-media-file {
      display: grid;
      place-items: center;
    }
    .testing-media-info {
      min-width: 0;
      display: grid;
      gap: 3px;
    }
    .testing-media-info small {
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    }
    .testing-meta-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .testing-warning-list {
      display: grid;
      gap: 6px;
      padding: 10px;
      border: 1px solid rgba(201, 120, 22, 0.28);
      border-radius: 8px;
      background: rgba(245, 158, 11, 0.08);
      color: #92400e;
      font-size: 12px;
      font-weight: 800;
    }
    .testing-data-block {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: var(--panel-soft);
    }
    .testing-data-block summary {
      padding: 10px 12px;
      cursor: pointer;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      border-bottom: 1px solid var(--line);
    }
    .testing-data-block pre {
      margin: 0;
      padding: 12px;
      max-height: 320px;
      overflow: auto;
      background: var(--panel);
      color: var(--text);
      font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    [data-theme="dark"] .testing-phone-shell {
      background: #111923;
    }
    [data-theme="dark"] .testing-phone-head {
      border-bottom-color: var(--line-strong);
    }
    [data-theme="dark"] .testing-message,
    [data-theme="dark"] .testing-media-tile {
      background: var(--panel);
      border-color: var(--line-strong);
    }
    [data-theme="dark"] .testing-message-forward {
      border-color: #1e3a5f;
      border-left-color: #3b82f6;
      background: rgba(37, 99, 235, 0.10);
    }
    [data-theme="dark"] .testing-forward-kicker {
      color: #93c5fd;
    }
    [data-theme="dark"] .testing-forward-node {
      border-color: var(--line-strong);
      background: rgba(15, 23, 42, 0.42);
    }
    [data-theme="dark"] .testing-forward-node-head strong {
      color: #dbeafe;
    }
    [data-theme="dark"] .testing-draw-frame {
      background:
        linear-gradient(45deg, rgba(156, 163, 175, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(156, 163, 175, 0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(156, 163, 175, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(156, 163, 175, 0.08) 75%),
        var(--panel-soft);
      background-size: 22px 22px;
      background-position: 0 0, 0 11px, 11px -11px, -11px 0;
    }
    .tasks-page {
      min-width: 0;
      height: 100%;
      min-height: 0;
      grid-template-rows: auto minmax(0, 1fr);
    }
    .task-hero-panel,
    .task-table-panel {
      animation: plugin-card-in 0.18s ease both;
    }
    .task-hero-panel {
      display: grid;
      gap: 8px;
      padding: 10px 12px;
      background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(37, 99, 235, 0.08)),
        var(--panel);
    }
    .task-panel-head {
      margin-bottom: 0;
      align-items: center;
    }
    .task-panel-head p {
      margin-top: 1px;
    }
    .task-record-status {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-align: right;
    }
    .task-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 8px;
    }
    .task-summary-card {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: baseline;
      gap: 2px 8px;
      padding: 7px 9px;
      border: 1px solid rgba(15, 118, 110, 0.16);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.74);
      box-shadow: 0 8px 22px rgba(24, 33, 45, 0.06);
    }
    .task-summary-card span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .task-summary-card b {
      color: var(--text);
      font-size: 18px;
      line-height: 1.1;
    }
    .task-summary-card small {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 11px;
      overflow-wrap: anywhere;
    }
    .task-summary-card.ok {
      border-color: #b9ddcc;
      background: #effaf4;
    }
    .task-summary-card.warn {
      border-color: #f5d28f;
      background: #fff8eb;
    }
    .task-summary-card.bad {
      border-color: #f1b8b2;
      background: #fff1f0;
    }
    .task-table-panel {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 10px;
      overflow: hidden;
    }
    .task-filter-bar {
      min-width: 0;
      margin-bottom: 0;
    }
    .task-filter-bar .entity-filter-controls {
      min-width: 0;
    }
    .task-filter-bar .entity-filter-controls input,
    .task-filter-bar .entity-filter-controls select {
      width: auto;
      min-width: 132px;
      max-width: 230px;
      min-height: 28px;
      height: 28px;
      padding: 3px 8px;
      font-size: 13px;
    }
    .task-filter-bar .entity-filter-controls input#taskFilterKeyword {
      min-width: 190px;
      max-width: 300px;
    }
    .task-filter-bar .entity-filter-controls button {
      min-height: 28px;
      padding: 3px 9px;
      font-size: 12px;
    }
    .tasks-table-host {
      min-width: 0;
      min-height: 0;
      height: 100%;
    }
    .tasks-table-wrap {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      height: 100%;
      max-height: 100%;
      overflow: auto;
    }
    .tasks-table {
      min-width: 1180px;
      table-layout: fixed;
    }
    .tasks-table th {
      position: sticky;
      top: 0;
      z-index: 1;
    }
    .tasks-table th,
    .tasks-table td {
      padding: 7px 9px;
      vertical-align: top;
    }
    .tasks-table th:nth-child(1),
    .tasks-table td:nth-child(1) { width: 220px; }
    .tasks-table th:nth-child(2),
    .tasks-table td:nth-child(2) { width: 190px; }
    .tasks-table th:nth-child(3),
    .tasks-table td:nth-child(3) { width: 230px; }
    .tasks-table th:nth-child(4),
    .tasks-table td:nth-child(4) { width: 130px; }
    .tasks-table th:nth-child(5),
    .tasks-table td:nth-child(5),
    .tasks-table th:nth-child(6),
    .tasks-table td:nth-child(6) { width: 150px; }
    .tasks-table th:nth-child(7),
    .tasks-table td:nth-child(7) {
      width: 72px;
      text-align: center;
    }
    .tasks-table th:nth-child(8),
    .tasks-table td:nth-child(8) { width: 150px; }
    .tasks-table th:nth-child(9),
    .tasks-table td:nth-child(9) { width: 170px; }
    .task-owner-cell {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 8px;
      align-items: center;
    }
    .task-schedule-cell,
    .task-status-cell {
      display: grid;
      gap: 4px;
      justify-items: start;
    }
    .task-run-count {
      min-width: 28px;
      min-height: 24px;
      display: inline-grid;
      place-items: center;
      padding: 2px 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
    }
    .task-time {
      max-width: none;
    }
    .task-error-line {
      display: -webkit-box;
      max-width: none;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.35;
      overflow: hidden;
      overflow-wrap: anywhere;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
    }
    .task-error-line.bad {
      color: var(--red);
    }
    .task-actions {
      display: flex;
      gap: 6px;
      align-items: center;
      flex-wrap: wrap;
    }
    .task-action-button {
      min-height: 26px;
      padding: 3px 8px;
      font-size: 12px;
    }
    .task-action-button.start {
      border-color: #b9ddcc;
      background: #effaf4;
      color: var(--green);
    }
    .task-action-button.stop {
      border-color: #f1b8b2;
      background: #fff1f0;
      color: var(--red);
    }
    .task-action-button.restart {
      border-color: #f5d28f;
      background: #fff8eb;
      color: var(--amber);
    }
    .task-detail {
      display: grid;
      gap: 12px;
    }
    .task-empty {
      height: 100%;
      display: grid;
      place-items: center;
    }
    .system-page {
      display: grid;
      gap: 14px;
    }
    .system-grid {
      align-items: stretch;
    }
    .system-overview,
    .system-path-panel {
      min-width: 0;
      height: 100%;
      display: grid;
      align-content: start;
      gap: 4px;
    }
    .system-stats {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .system-meter {
      display: grid;
      gap: 10px;
      padding-top: 16px;
      margin-top: 4px;
      border-top: 1px solid var(--line);
    }
    .system-meter-head {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      align-items: center;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .system-meter-head strong {
      color: var(--text);
      font-size: 14px;
    }
    .system-meter-track {
      height: 12px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #edf1f5;
    }
    .system-meter-track span {
      display: block;
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--accent), #49b59a);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
      transition: width 0.3s ease;
    }
    .system-meter-warning span {
      background: linear-gradient(90deg, #f59e0b, #f97316);
    }
    .system-meter-danger span {
      background: linear-gradient(90deg, #ef4444, #dc2626);
    }
    .system-meter-foot {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .system-path-value {
      display: block;
      min-width: 0;
      color: var(--text);
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      font-size: 12px;
      font-weight: 650;
      line-height: 1.5;
      overflow-wrap: anywhere;
    }
    .system-path-list {
      display: grid;
      gap: 10px;
    }
    .system-path-item {
      min-width: 0;
      display: grid;
      grid-template-columns: 140px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      transition: border-color 0.15s ease;
    }
    .system-path-item:hover {
      border-color: var(--line-strong);
    }
    .system-path-item .primary-line,
    .system-path-item .sub-line {
      max-width: none;
    }
    .system-forward-panel {
      min-width: 0;
    }
    .system-maintenance-panel {
      min-width: 0;
    }
    .system-operation-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 12px;
    }
    .system-operation-button {
      min-width: 0;
      min-height: 88px;
      display: grid;
      grid-template-rows: auto auto 1fr;
      align-content: start;
      justify-items: start;
      gap: 6px;
      padding: 16px;
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
      text-align: left;
      transition: all 0.15s ease;
    }
    .system-operation-button:hover {
      background: #dce9ff;
      border-color: #93b8fc;
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(29, 78, 216, 0.15);
    }
    .system-operation-icon {
      font-size: 20px;
      line-height: 1;
    }
    .system-operation-title {
      color: #1e3a8a;
      font-size: 15px;
      font-weight: 900;
    }
    .system-operation-desc {
      color: #315fbd;
      font-size: 12px;
      font-weight: 600;
      line-height: 1.4;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .system-operation-danger {
      border-color: #fca5a5;
      background: #fef2f2;
      color: #dc2626;
    }
    .system-operation-danger:hover {
      background: #fee2e2;
      border-color: #f87171;
      box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
    }
    .system-operation-danger .system-operation-title {
      color: #991b1b;
    }
    .system-operation-danger .system-operation-desc {
      color: #dc2626;
    }
    .system-forward-form {
      min-width: 0;
      display: grid;
      gap: 12px;
    }
    .system-forward-target-list {
      max-height: 320px;
    }
    .system-forward-manual details {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .system-forward-manual summary {
      min-height: 34px;
      display: flex;
      align-items: center;
      padding: 7px 10px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
    }
    .system-forward-manual-body {
      display: grid;
      gap: 8px;
      padding: 0 10px 10px;
    }
    .system-forward-manual textarea {
      min-height: 76px;
    }
    .system-forward-message {
      min-height: 126px;
    }
    .system-forward-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .system-forward-result {
      min-width: 0;
    }
    .batch-result.success {
      border-color: #b7d9d4;
      background: #eef8f6;
      color: var(--accent);
    }
    .logs-page {
      min-width: 0;
      height: 100%;
      min-height: 0;
      grid-template-rows: minmax(0, 1fr);
    }
    .log-panel {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
      gap: 10px;
      overflow: hidden;
      animation: plugin-card-in 0.18s ease both;
    }
    .log-panel-head {
      margin-bottom: 0;
    }
    .log-status {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-align: right;
    }
    .log-filter-bar {
      min-width: 0;
      margin-bottom: 0;
    }
    .log-filter-bar .entity-filter-controls {
      min-width: 0;
    }
    .log-filter-bar .entity-filter-controls input {
      width: auto;
      min-width: 168px;
      max-width: 260px;
      min-height: 28px;
      height: 28px;
      padding: 3px 8px;
      font-size: 13px;
    }
    .log-filter-bar .entity-filter-controls button {
      min-height: 28px;
      padding: 3px 9px;
      font-size: 12px;
    }
    .log-pause-button {
      border-color: #d7c3f4;
      background: #f6f1ff;
      color: #6d3bb5;
    }
    .log-auto-top-button {
      border-color: #bdd7f5;
      background: #eff7ff;
      color: #2f6da8;
    }
    .log-auto-top-button[data-enabled="false"] {
      border-color: #d7dde6;
      background: #f5f7fa;
      color: #687384;
    }
    .log-table-region,
    .logs-table-host {
      min-width: 0;
      min-height: 0;
      height: 100%;
    }
    .logs-table-wrap {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      height: 100%;
      max-height: 100%;
      overflow: auto;
    }
    .logs-table {
      min-width: 980px;
      table-layout: fixed;
    }
    .logs-table th {
      position: sticky;
      top: 0;
      z-index: 1;
    }
    .logs-table th,
    .logs-table td {
      padding: 6px 8px;
      vertical-align: top;
    }
    .logs-table th:nth-child(1),
    .logs-table td:nth-child(1) {
      width: 152px;
    }
    .logs-table th:nth-child(2),
    .logs-table td:nth-child(2) {
      width: 82px;
    }
    .logs-table th:nth-child(3),
    .logs-table td:nth-child(3) {
      width: 280px;
    }
    .logs-table th:nth-child(5),
    .logs-table td:nth-child(5) {
      width: 150px;
    }
    .log-time,
    .log-logger {
      max-width: none;
      font-size: 12px;
    }
    .log-row {
      font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
      font-size: 13px;
      line-height: 1.35;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .log-copy-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .log-action-button {
      min-height: 26px;
      padding: 3px 7px;
      border-color: #b9cffc;
      background: #eef4ff;
      color: #1d4ed8;
      font-size: 12px;
    }
    .log-action-button.logger {
      border-color: #d7c3f4;
      background: #f6f1ff;
      color: #6d3bb5;
    }
    .log-empty {
      height: 100%;
      display: grid;
      place-items: center;
    }
    .empty {
      padding: 18px;
      color: var(--muted);
      text-align: center;
    }
    .message {
      min-height: 20px;
      color: var(--muted);
      overflow-wrap: anywhere;
    }
    .message.error { color: var(--red); }
    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 20;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(24, 33, 45, 0.5);
      backdrop-filter: blur(4px);
      animation: backdropFadeIn 0.2s ease both;
    }

    @keyframes backdropFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    [data-theme="dark"] .modal-backdrop {
      background: rgba(0, 0, 0, 0.75);
    }

    [data-theme="dark"] .nav-group-title {
      color: var(--muted);
    }

    [data-theme="dark"] .login-panel {
      background: rgba(26, 31, 38, 0.98);
      border-color: var(--line-strong);
    }

    [data-theme="dark"] .login-header {
      border-bottom-color: var(--line);
    }

    [data-theme="dark"] .login-footer {
      border-top-color: var(--line);
    }

    [data-theme="dark"] .sidebar-footer .danger {
      background: rgba(239, 68, 68, 0.15);
      border-color: rgba(239, 68, 68, 0.4);
      color: var(--red);
    }

    [data-theme="dark"] .sidebar-footer .danger:hover {
      background: rgba(239, 68, 68, 0.25);
      border-color: var(--red);
    }

    [data-theme="dark"] .sidebar-status {
      background: var(--panel-soft);
      border-color: var(--line);
    }

    [data-theme="dark"] .status-indicator.online {
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    }

    [data-theme="dark"] .topbar-divider {
      background: var(--line);
    }

    .button-icon {
      font-size: 14px;
      flex-shrink: 0;
    }

    .topbar-actions .danger {
      border-color: #f1b8b2;
      background: #fff1f0;
      color: var(--red);
    }

    .topbar-actions .danger:hover {
      background: #fdeceb;
      border-color: var(--red);
      filter: none;
    }

    [data-theme="dark"] .topbar-actions .danger {
      background: rgba(239, 68, 68, 0.15);
      border-color: rgba(239, 68, 68, 0.4);
      color: var(--red);
    }

    [data-theme="dark"] .topbar-actions .danger:hover {
      background: rgba(239, 68, 68, 0.25);
      border-color: var(--red);
    }

    [data-theme="dark"] .topbar {
      background: rgba(15, 20, 25, 0.95);
      border-bottom-color: var(--line);
    }

    [data-theme="dark"] main::-webkit-scrollbar-thumb {
      background: var(--line-strong);
    }

    [data-theme="dark"] main::-webkit-scrollbar-thumb:hover {
      background: var(--accent);
    }

    .modal-close-button {
      min-height: 36px;
      width: 36px;
      min-width: 36px;
      padding: 0;
      font-size: 24px;
      line-height: 1;
      border-radius: 8px;
      transition: all 0.2s ease;
    }

    .modal-close-button:hover {
      background: var(--panel-soft);
      color: var(--red);
      transform: rotate(90deg);
    }
    .modal {
      width: min(760px, 100%);
      max-height: min(86vh, 900px);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
      box-shadow: 0 12px 48px rgba(24, 33, 45, 0.2), 0 24px 80px rgba(24, 33, 45, 0.15);
      animation: modalFadeIn 0.3s ease both;
    }
    @keyframes modalFadeIn {
      from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }
    .modal.small { width: min(460px, 100%); }
    .modal.qr { width: min(420px, 100%); }
    .modal.narrow { width: min(540px, 100%); }
    .modal.medium { width: min(620px, 100%); }
    .modal.subscription { width: min(700px, 100%); }
    .modal.subscription-create-modal { width: min(1100px, 100%); }
    .modal.image { width: min(900px, 100%); }
    .modal.wide { width: min(980px, 100%); }
    .modal-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
    }
    .modal-body {
      min-width: 0;
      overflow: auto;
      padding: 16px;
    }
    .modal-busy .modal-body {
      opacity: 0.78;
      pointer-events: none;
    }
    .modal-busy #modalConfirm {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
    }
    .modal-busy #modalConfirm .loading-spinner {
      width: 14px;
      height: 14px;
      border-width: 2px;
    }
    .modal-actions {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 8px;
      padding: 12px 16px;
      border-top: 1px solid var(--line);
      background: var(--panel-soft);
    }
    .confirm-panel {
      display: grid;
      gap: 8px;
      padding: 4px 0;
    }
    .confirm-panel strong {
      color: var(--text);
      font-size: 15px;
    }
    .confirm-panel p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
    }
    .image-preview {
      min-height: 220px;
      display: grid;
      place-items: center;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .image-preview img {
      max-width: 100%;
      max-height: min(72vh, 760px);
      display: block;
      object-fit: contain;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.14);
    }
    .toast-stack {
      position: fixed;
      top: 80px;
      right: 16px;
      z-index: 40;
      width: min(360px, calc(100vw - 32px));
      display: grid;
      gap: 8px;
      pointer-events: none;
    }
    .toast {
      padding: 14px 16px;
      border: 1px solid #b7d9d4;
      border-radius: 12px;
      background: rgba(255,255,255,0.98);
      backdrop-filter: blur(12px);
      box-shadow: 0 8px 24px rgba(24, 33, 45, 0.12), 0 16px 48px rgba(24, 33, 45, 0.08);
      pointer-events: auto;
      cursor: pointer;
      transition: all 0.2s ease;
      animation: toastSlideIn 0.3s ease both;
    }
    @keyframes toastSlideIn {
      from {
        opacity: 0;
        transform: translateX(100%);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }
    .toast:hover {
      transform: translateX(-4px);
      box-shadow: 0 12px 32px rgba(24, 33, 45, 0.16), 0 20px 56px rgba(24, 33, 45, 0.12);
    }
    .toast.error { border-color: #f1b8b2; }
    .toast strong { display: block; color: var(--accent); font-size: 14px; margin-bottom: 4px; }
    .toast.error strong { color: var(--red); }
    .toast span { color: var(--muted); overflow-wrap: anywhere; font-size: 13px; }
    .dashboard-clean-page {
      width: min(1320px, 100%);
      margin: 0 auto;
      gap: 14px;
    }
    .dashboard-clean-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
      gap: 14px;
      align-items: stretch;
      border-color: #c8dde1;
      background:
        linear-gradient(135deg, rgba(230, 244, 241, 0.94), rgba(242, 246, 255, 0.92) 58%),
        #fff;
      overflow: hidden;
    }
    .dashboard-clean-hero.warn {
      border-color: #f0c98d;
      background:
        linear-gradient(135deg, rgba(255, 248, 234, 0.96), rgba(255, 255, 255, 0.94) 58%),
        #fff;
    }
    .dashboard-clean-hero-main {
      min-width: 0;
      display: grid;
      align-content: center;
      gap: 10px;
    }
    .dashboard-clean-hero-main h2 {
      font-size: 20px;
      line-height: 1.2;
    }
    .dashboard-clean-hero-main p {
      max-width: 720px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }
    .dashboard-clean-metrics {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .dashboard-clean-metric {
      min-width: 0;
      display: grid;
      gap: 4px;
      padding: 11px 12px;
      border: 1px solid rgba(15, 118, 110, 0.18);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.74);
      box-shadow: 0 8px 22px rgba(24, 33, 45, 0.06);
    }
    .dashboard-clean-metric.warn {
      border-color: rgba(180, 83, 9, 0.25);
      background: rgba(255, 248, 234, 0.84);
    }
    .dashboard-clean-metric span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }
    .dashboard-clean-metric b {
      color: var(--text);
      font-size: 22px;
      line-height: 1.05;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-metric small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      align-items: stretch;
    }
    .dashboard-clean-card {
      min-width: 0;
      height: 100%;
      display: grid;
      gap: 12px;
      align-content: start;
      animation: plugin-card-in 0.18s ease both;
    }
    .dashboard-clean-card-wide {
      grid-column: 1 / -1;
    }
    .dashboard-clean-card-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }
    .dashboard-clean-card-head h2 {
      font-size: 16px;
      line-height: 1.25;
    }
    .dashboard-clean-card-head p {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .dashboard-clean-card-value {
      color: var(--text);
      font-size: 24px;
      font-weight: 950;
      line-height: 1.05;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-info-list {
      display: grid;
      gap: 8px;
    }
    .dashboard-clean-info-row {
      min-width: 0;
      display: grid;
      grid-template-columns: 116px minmax(0, 1fr);
      gap: 10px;
      align-items: baseline;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .dashboard-clean-info-row span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .dashboard-clean-info-row strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 850;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-info-row.ok strong,
    .dashboard-clean-chip.ok {
      color: var(--green);
    }
    .dashboard-clean-info-row.warn strong,
    .dashboard-clean-chip.warn {
      color: var(--amber);
    }
    .dashboard-clean-info-row.bad strong,
    .dashboard-clean-chip.bad {
      color: var(--red);
    }
    .dashboard-clean-extra {
      padding-top: 2px;
    }
    .dashboard-clean-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      align-items: center;
    }
    .dashboard-clean-chip {
      min-height: 26px;
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      padding: 4px 9px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-chip.ok {
      border-color: rgba(20, 184, 166, 0.24);
      background: rgba(20, 184, 166, 0.08);
    }
    .dashboard-clean-chip.warn {
      border-color: rgba(245, 158, 11, 0.25);
      background: rgba(245, 158, 11, 0.08);
    }
    .dashboard-clean-chip.bad {
      border-color: rgba(239, 68, 68, 0.24);
      background: rgba(239, 68, 68, 0.08);
    }
    .dashboard-clean-lines {
      display: grid;
      gap: 8px;
    }
    .dashboard-clean-line {
      min-width: 0;
      display: grid;
      gap: 4px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
    }
    .dashboard-clean-line strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 850;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-line span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }
    .dashboard-clean-line.warn {
      border-color: rgba(245, 158, 11, 0.25);
      background: rgba(245, 158, 11, 0.08);
    }
    .dashboard-clean-line.bad {
      border-color: rgba(239, 68, 68, 0.24);
      background: rgba(239, 68, 68, 0.08);
    }
    .dashboard-clean-line.bad span {
      color: var(--red);
    }
    .dashboard-clean-empty {
      padding: 14px;
      border: 1px dashed var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      text-align: center;
    }

    @media (max-width: 1180px) {
      .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .panel.half, .panel.third { grid-column: span 12; }
      .dashboard-clean-hero,
      .dashboard-hero { grid-template-columns: 1fr; }
      .dashboard-clean-grid,
      .dashboard-panels-grid {
        grid-template-columns: 1fr;
      }
      .dashboard-panel-wide {
        grid-column: span 1;
      }
      .dashboard-metrics-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .dashboard-delivery-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .dashboard-grid {
        width: 100%;
        grid-template-columns: minmax(0, 760px);
        justify-content: center;
      }
      .dashboard-grid > .dashboard-panel { grid-column: auto; }
      .plugin-hero { grid-template-columns: 1fr; }
      .plugin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .plugin-skeleton-grid { grid-template-columns: 1fr; }
      .task-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .testing-workbench,
      .testing-preview-stage {
        grid-template-columns: 1fr;
      }
      .testing-input-panel {
        position: static;
        max-height: none;
        overflow: visible;
      }
      .testing-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    @media (max-width: 880px) {
      .app-shell { grid-template-columns: 1fr; }
      .sidebar {
        position: fixed;
        width: min(286px, calc(100vw - 34px));
        transform: translateX(-105%);
        transition: transform 0.18s ease;
        box-shadow: var(--shadow);
      }
      body.sidebar-open .sidebar { transform: translateX(0); }
      .menu-button { display: inline-flex; }
      .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
        gap: 12px;
      }
      .topbar-actions {
        width: 100%;
        justify-content: flex-start;
      }
      .topbar-actions .compact {
        min-width: auto;
        padding: 8px 10px;
      }
      .topbar-divider {
        display: none;
      }
      main { padding: 16px; }
      .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .dashboard-clean-metrics,
      .dashboard-clean-grid,
      .dashboard-summary-grid,
      .dashboard-queue-grid {
        grid-template-columns: 1fr;
      }
      .dashboard-clean-card-head {
        align-items: stretch;
        flex-direction: column;
      }
      .dashboard-clean-info-row {
        grid-template-columns: 1fr;
        gap: 4px;
      }
      .dashboard-metrics-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .dashboard-delivery-stats {
        grid-template-columns: 1fr;
      }
      .dashboard-status-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      .dashboard-status-details {
        width: 100%;
      }
      button.dashboard-metric-card,
      button.dashboard-metric-card-new {
        min-height: 76px;
      }
      .subscription-create-subscription {
        grid-template-columns: 1fr;
      }
      .form-grid { grid-template-columns: 1fr; }
      .message-template-editor-modal { grid-template-columns: 1fr; }
      .config-layout { grid-template-columns: 1fr; }
      .config-list-panel {
        position: static;
        max-height: none;
        overflow: visible;
      }
      .config-list {
        max-height: 260px;
      }
      .config-hero-main {
        align-items: flex-start;
        flex-direction: column;
      }
      .config-hero-meta {
        justify-content: flex-start;
      }
      .config-workbench {
        grid-template-columns: 1fr;
      }
      .config-tab-panel {
        position: static;
        max-height: none;
        overflow: visible;
      }
      .config-tab-list {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 2px;
      }
      button.config-tab-button {
        width: min(210px, 72vw);
        flex: 0 0 auto;
      }
      .config-hero-main {
        gap: 10px;
      }
      .config-field-search-row {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
      }
      .config-field-search-box {
        width: 100%;
      }
      .config-field-search-row .config-search-summary {
        width: fit-content;
      }
      .config-hero-side {
        width: 100%;
        justify-items: start;
      }
      .config-hero-meta {
        justify-content: flex-start;
      }
      .config-hero-actions {
        justify-content: flex-start;
      }
      .config-action-buttons {
        flex-direction: row;
        justify-content: flex-start;
      }
      .config-section {
        padding: 14px;
      }
      .config-field-main,
      .config-toggle-field .config-field-main {
        grid-template-columns: 1fr;
        gap: 10px;
      }
      .config-field-control {
        width: 100%;
      }
      .config-switch-control {
        justify-content: flex-start;
      }
      .config-composite-head {
        flex-direction: column;
        align-items: stretch;
      }
      .config-composite-actions {
        justify-content: flex-start;
      }
      .config-embedded-grid {
        grid-template-columns: 1fr;
      }
      .message-template-compact,
      .media-delivery-panel {
        grid-template-columns: 1fr;
      }
      .message-template-stats {
        width: fit-content;
      }
      .media-delivery-control.full,
      .media-delivery-hint {
        grid-column: auto;
      }
      .plugin-filter-bar input,
      .plugin-filter-bar select {
        width: 100%;
        max-width: none;
      }
      .entity-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
      }
      .entity-filter-title {
        font-size: 13px;
      }
      .entity-filter-controls {
        flex-direction: column;
        width: 100%;
        gap: 8px;
      }
      .entity-filter-controls select,
      .subscription-entity-filter .entity-filter-controls input {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 44px;
        height: 44px;
        font-size: 16px;
        padding: 8px 12px;
      }
      .entity-filter-divider {
        width: 100%;
        height: 1px;
        margin: 4px 0;
      }
      .entity-filter-summary {
        font-size: 13px;
      }
      .entity-filter-clear {
        width: 100%;
        min-height: 44px;
        font-size: 14px;
      }
      .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      table {
        min-width: 800px;
      }
      .plugin-card-grid {
        grid-template-columns: 1fr;
      }
      .plugin-detail-grid {
        grid-template-columns: 1fr;
      }
      .testing-section-head,
      .testing-phone-head,
      .testing-runbar,
      .testing-output-head {
        align-items: flex-start;
        flex-direction: column;
      }
      .testing-mode-switch,
      .testing-compact-grid,
      .testing-switch-grid,
      .testing-summary-grid,
      .testing-meta-grid,
      .testing-media-board {
        grid-template-columns: 1fr;
      }
      .testing-message {
        width: 100%;
      }
      .testing-draw-frame {
        min-height: 280px;
        padding: 8px;
      }
      .testing-template-actions button,
      .testing-json-actions button,
      .testing-runbar button {
        flex: 1 1 auto;
      }
      .testing-runbar .testing-status {
        margin-left: 0;
        justify-content: flex-start;
        text-align: left;
      }
      .system-path-item {
        grid-template-columns: 1fr;
      }
      .logs-page {
        height: 100%;
        min-height: 0;
      }
      .message-panel-head {
        flex-direction: column;
      }
      .message-panel-side {
        width: 100%;
        justify-content: flex-start;
      }
      .message-tab-bar {
        width: 100%;
      }
      .message-tab-button {
        flex: 1 1 0;
        justify-content: center;
      }
      .task-panel-head {
        flex-direction: column;
      }
      .message-record-status {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
      }
      .message-auto-refresh-controls {
        width: 100%;
        justify-content: flex-start;
      }
      .task-record-status {
        justify-content: flex-start;
        text-align: left;
      }
      .message-filter-bar,
      .log-filter-bar,
      .task-filter-bar {
        align-items: stretch;
      }
      .message-filter-bar .entity-filter-title,
      .log-filter-bar .entity-filter-title,
      .task-filter-bar .entity-filter-title {
        width: 100%;
      }
      .message-filter-bar .entity-filter-main,
      .log-filter-bar .entity-filter-main,
      .task-filter-bar .entity-filter-main {
        width: 100%;
        flex: 1 1 100%;
      }
      .message-filter-bar .entity-filter-controls,
      .log-filter-bar .entity-filter-controls,
      .task-filter-bar .entity-filter-controls {
        width: 100%;
        flex: 1 1 100%;
      }
      .message-filter-bar .entity-filter-controls input,
      .message-filter-bar .entity-filter-controls select,
      .task-filter-bar .entity-filter-controls input,
      .task-filter-bar .entity-filter-controls select {
        width: 100%;
        min-width: 0;
        max-width: none;
      }
      .message-filter-bar .entity-filter-controls input#deliveryFilterKeyword,
      .message-filter-bar .entity-filter-controls input#incomingFilterKeyword,
      .message-filter-bar .entity-filter-controls input#incomingFilterTrace {
        min-width: 0;
        max-width: none;
      }
      .task-filter-bar .entity-filter-controls input#taskFilterKeyword {
        min-width: 0;
        max-width: none;
      }
      .message-filter-bar .entity-filter-controls button,
      .log-filter-bar .entity-filter-controls button,
      .task-filter-bar .entity-filter-controls button {
        flex: 1 1 auto;
      }
      .message-filter-bar .entity-filter-tools,
      .log-filter-bar .entity-filter-tools,
      .task-filter-bar .entity-filter-tools {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
      }
      .message-filter-bar .entity-filter-tools button,
      .log-filter-bar .entity-filter-tools button,
      .task-filter-bar .entity-filter-tools button {
        flex: 1 1 auto;
      }
      .message-filter-bar .entity-filter-summary,
      .log-filter-bar .entity-filter-summary,
      .task-filter-bar .entity-filter-summary {
        width: 100%;
        margin-left: 0;
      }
      .messages-table {
        min-width: 1100px;
      }
      .messages-table th:nth-child(1),
      .messages-table td:nth-child(1) {
        width: 270px;
      }
      .messages-table th:nth-child(2),
      .messages-table td:nth-child(2) {
        width: 180px;
      }
      .messages-table th:nth-child(3),
      .messages-table td:nth-child(3) {
        width: 160px;
      }
      .messages-table th:nth-child(4),
      .messages-table td:nth-child(4) {
        width: 170px;
      }
      .messages-table th:nth-child(5),
      .messages-table td:nth-child(5) {
        width: 180px;
      }
      .incoming-messages-table {
        min-width: 1020px;
      }
      .incoming-messages-table th:nth-child(1),
      .incoming-messages-table td:nth-child(1) {
        width: 300px;
      }
      .incoming-messages-table th:nth-child(2),
      .incoming-messages-table td:nth-child(2) {
        width: 200px;
      }
      .incoming-messages-table th:nth-child(3),
      .incoming-messages-table td:nth-child(3),
      .incoming-messages-table th:nth-child(4),
      .incoming-messages-table td:nth-child(4),
      .incoming-messages-table th:nth-child(5),
      .incoming-messages-table td:nth-child(5) {
        width: 160px;
      }
      .log-panel-head {
        flex-direction: column;
      }
      .log-status {
        justify-content: flex-start;
        text-align: left;
      }
      .log-filter-bar .entity-filter-controls input,
      .log-filter-bar .entity-filter-controls select {
        width: 100%;
        min-width: 0;
        max-width: none;
      }
      .logs-table {
        min-width: 760px;
      }
      .logs-table th:nth-child(3),
      .logs-table td:nth-child(3) {
        width: 210px;
      }
      .tasks-table {
        min-width: 900px;
      }
      .tasks-table th:nth-child(1),
      .tasks-table td:nth-child(1) {
        width: 170px;
      }
      .tasks-table th:nth-child(2),
      .tasks-table td:nth-child(2),
      .tasks-table th:nth-child(3),
      .tasks-table td:nth-child(3) {
        width: 180px;
      }
    }

    @media (max-width: 520px) {
      .topbar-actions button span:not(.button-icon):not(.theme-icon) {
        display: none;
      }
      .topbar-actions .compact {
        min-width: 40px;
        padding: 8px;
      }
      .about-card { padding: 26px 18px 22px; }
      .about-logo { width: 68px; height: 68px; border-radius: 16px; }
      .about-meta-row { grid-template-columns: 84px minmax(0, 1fr); padding: 12px; }
    }
