:root {
  color-scheme: light;
  --background: #fafaf9;
  --background-panel: #ffffff;
  --background-subtle: #f7f7f5;
  --background-muted: #f3f3f1;
  --foreground: #171717;
  --foreground-soft: #404040;
  --foreground-muted: #737373;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --primary: #18181b;
  --primary-foreground: #fafaf9;
  --secondary: #f5f5f4;
  --secondary-foreground: #1c1917;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warn-bg: #fef3c7;
  --warn-text: #92400e;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --info-bg: #dbeafe;
  --info-text: #1d4ed8;
  --shadow-sm: 0 1px 2px rgba(23, 23, 23, 0.04);
  --shadow-md: 0 14px 34px rgba(23, 23, 23, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --sidebar-width: 264px;
  --content-width: 1360px;
  --font-sans:
    "Geist",
    "SF Pro Text",
    "PingFang SC",
    "Hiragino Sans GB",
    "Noto Sans SC",
    "Microsoft YaHei",
    "Helvetica Neue",
    Arial,
    sans-serif;
  --font-display:
    "Geist",
    "SF Pro Display",
    "PingFang SC",
    "Hiragino Sans GB",
    "Noto Sans SC",
    "Microsoft YaHei",
    sans-serif;
  --font-mono:
    "SFMono-Regular",
    ui-monospace,
    "Cascadia Code",
    "JetBrains Mono",
    "SF Mono",
    Menlo,
    monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 22%),
    linear-gradient(180deg, #fcfcfb 0%, var(--background) 100%);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "rlig" 1, "calt" 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(23, 23, 23, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.022) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 88%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button,
input {
  font: inherit;
}

form {
  margin: 0;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 23, 23, 0.1);
}

button:active,
.button:active {
  transform: translateY(0);
}

button:disabled,
.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.secondary,
.button.secondary {
  background: var(--background-panel);
  color: var(--foreground);
  border-color: var(--border);
}

button.ghost,
.button.ghost {
  background: transparent;
  color: var(--foreground-soft);
  border-color: var(--border);
  box-shadow: none;
}

button.danger,
.button.danger {
  background: #dc2626;
  color: #fff;
}

.runner-meta-list form,
.hero-actions form,
.action-row form,
.button-row form {
  margin: 0;
}

button.small,
.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

button:focus-visible,
.button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(23, 23, 23, 0.14);
  outline-offset: 2px;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--background-panel);
  color: var(--foreground);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

input:hover {
  border-color: var(--border-strong);
}

input:focus {
  border-color: #a8a29e;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.045);
}

input::placeholder {
  color: var(--foreground-muted);
}

input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--foreground);
}

code,
.inline-code,
.path-text,
.preformatted,
.live-log-output {
  font-family: var(--font-mono);
}

code,
.inline-code {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.26rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--secondary);
  color: var(--foreground-soft);
  font-size: 0.8rem;
  word-break: break-all;
}

.path-text {
  word-break: break-word;
  color: var(--foreground-soft);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(231, 229, 228, 0.9);
  backdrop-filter: blur(14px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-seal {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #18181b;
  color: #fafaf9;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-kicker,
.page-kicker,
.section-kicker,
.sidebar-label {
  margin: 0;
  color: var(--foreground-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.brand-summary,
.page-summary,
.panel-subtitle {
  margin: 6px 0 0;
  color: var(--foreground-muted);
  font-size: 0.92rem;
  line-height: 1.68;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: grid;
  gap: 1px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--foreground-soft);
  background: transparent;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.nav-link:hover {
  background: var(--background-subtle);
  border-color: var(--border);
}

.nav-link.active {
  background: var(--background-subtle);
  border-color: var(--border);
  color: var(--foreground);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-meta {
  color: var(--foreground-muted);
  font-size: 0.76rem;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 16px;
}

.sidebar-block {
  display: grid;
  gap: 10px;
}

.sidebar-status-card,
.sidebar-meta-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.sidebar-status-card {
  display: grid;
  gap: 10px;
}

.sidebar-status-card strong {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.35;
}

.sidebar-status-card small {
  color: var(--foreground-muted);
  line-height: 1.55;
}

.sidebar-meta-list {
  display: grid;
  gap: 10px;
}

.sidebar-meta-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--foreground-muted);
  font-size: 0.78rem;
}

.app-main {
  min-width: 0;
  padding: 24px 28px 52px;
}

.app-toolbar {
  max-width: var(--content-width);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.runner-banner,
.flash-list,
.page-shell {
  max-width: var(--content-width);
}

.runner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.runner-active {
  border-color: #bfdbfe;
}

.runner-primary,
.runner-meta-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.runner-primary strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
}

.runner-primary p {
  margin: 1px 0 0;
  color: var(--foreground-muted);
  font-size: 0.88rem;
}

.flash-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.flash {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background-panel);
  color: var(--foreground-soft);
  box-shadow: var(--shadow-sm);
}

.flash-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.flash-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.page-shell {
  margin-top: 20px;
  display: grid;
  gap: 22px;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-shell {
  width: min(100%, 440px);
}

.auth-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.auth-header h1 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.auth-flash-list {
  margin-top: 18px;
}

.auth-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.auth-field-card {
  padding: 14px;
}

.page-header-card,
.panel,
.summary-card,
.meta-card,
.callout {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background-panel);
  box-shadow: var(--shadow-sm);
}

.page-header-card,
.panel {
  border-radius: var(--radius-lg);
}

.summary-card,
.meta-card,
.callout {
  border-radius: var(--radius-md);
}

.page-header-card {
  padding: 24px 24px 20px;
  background:
    radial-gradient(circle at top right, rgba(245, 245, 244, 0.88), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
  box-shadow: var(--shadow-md);
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-header-copy h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-actions,
.button-row,
.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-grid,
.section-grid {
  display: grid;
  gap: 14px;
}

.summary-grid {
  margin-top: 22px;
}

.summary-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-card,
.meta-card {
  padding: 16px 18px;
}

.summary-card span,
.meta-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--foreground-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.summary-card strong,
.meta-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.summary-card small {
  display: block;
  margin-top: 8px;
  color: var(--foreground-muted);
  line-height: 1.5;
  font-size: 0.84rem;
}

.summary-card-note strong {
  font-size: 1.2rem;
}

.section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-grid-compact {
  grid-template-columns: minmax(0, 760px);
}

.section-grid-detail {
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
}

.panel {
  padding: 20px;
}

.panel-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-head-start {
  align-items: flex-start;
}

.panel h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--foreground);
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background-panel);
}

.proxy-pool-table-wrap {
  margin-top: 18px;
}

.proxy-endpoint {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--foreground-soft);
}

.proxy-pool-meta {
  margin: 12px 0 0;
  color: var(--foreground-muted);
  font-size: 0.84rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: #fcfcfb;
  color: var(--foreground-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fcfcfb;
}

.cell-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--foreground-muted);
  font-size: 0.8rem;
}

.progress {
  display: grid;
  gap: 8px;
}

.progress small {
  color: var(--foreground-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f0ee;
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #18181b;
}

.empty-state {
  padding: 16px 0;
  color: var(--foreground-muted);
}

.break {
  word-break: break-word;
}

.stack-lg {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-grid {
  align-items: start;
}

.field-card,
.switch-field {
  display: grid;
  gap: 10px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
}

.field-card-required {
  border-color: var(--border-strong);
}

.field-topline,
.field-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field-topline {
  justify-content: space-between;
}

.field-label {
  font-weight: 600;
  color: var(--foreground);
}

.field-card small,
.switch-copy small {
  color: var(--foreground-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.field-env {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground-muted);
  font-size: 0.76rem;
}

.switch-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.switch-copy {
  display: grid;
  gap: 8px;
}

.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.switch-control input {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 26px;
  opacity: 0;
  cursor: pointer;
}

.switch-ui {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e7e5e4;
  transition: background 140ms ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  transition: transform 140ms ease;
}

.switch-control input:checked + .switch-ui {
  background: #18181b;
}

.switch-control input:checked + .switch-ui::after {
  transform: translateX(18px);
}

.form-submit-inline {
  display: flex;
  align-items: flex-end;
}

.task-edit-form {
  display: grid;
  gap: 10px;
}

.task-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
}

.detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px 16px;
}

.detail-grid dt {
  color: var(--foreground-muted);
}

.detail-grid dd {
  margin: 0;
}

.preformatted {
  margin: 0;
  padding: 18px;
  min-height: 420px;
  max-height: 760px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfbfa;
  color: var(--foreground);
  font-size: 0.86rem;
  line-height: 1.65;
}

.chip,
.badge,
.status-pill,
.transport-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip,
.badge {
  background: var(--secondary);
  border-color: var(--border);
  color: var(--foreground-soft);
}

.badge-muted {
  color: var(--foreground-muted);
}

.status-running {
  background: var(--info-bg);
  color: var(--info-text);
}

.status-idle,
.status-pending {
  background: var(--secondary);
  color: var(--foreground-soft);
  border-color: var(--border);
}

.status-succeeded {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-failed {
  background: var(--error-bg);
  color: var(--error-text);
}

.status-partial {
  background: #ede9fe;
  color: #6d28d9;
}

.status-stopped {
  background: #e0f2fe;
  color: #075985;
}

.live-log-panel {
  display: grid;
  gap: 16px;
}

.inline-alert {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background-subtle);
  color: var(--foreground-soft);
  margin-bottom: 14px;
}

.inline-alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.live-log-head {
  gap: 16px;
}

.transport-badge {
  background: var(--secondary);
  border-color: var(--border);
  color: var(--foreground-soft);
}

.transport-badge[data-state="stream"] {
  background: var(--success-bg);
  color: var(--success-text);
}

.transport-badge[data-state="connecting"],
.transport-badge[data-state="reconnecting"] {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.transport-badge[data-state="polling"] {
  background: var(--info-bg);
  color: var(--info-text);
}

.log-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
}

.log-search {
  display: grid;
  gap: 8px;
  flex: 1 1 260px;
}

.log-search span,
.log-note {
  color: var(--foreground-muted);
  font-size: 0.84rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground-soft);
  font-size: 0.88rem;
}

.log-error {
  color: #dc2626;
  font-size: 0.84rem;
  font-weight: 600;
}

.log-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.meta-card-inline {
  min-height: 96px;
}

.live-log-terminal {
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: 20px;
  background: #09090b;
  box-shadow: 0 20px 44px rgba(9, 9, 11, 0.18);
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #111113;
}

.terminal-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.terminal-tab {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #27272a;
  border-radius: 999px;
  background: #18181b;
  color: #a1a1aa;
  font-size: 0.74rem;
  font-weight: 600;
}

.terminal-tab-active {
  background: #fafaf9;
  color: #18181b;
  border-color: #fafaf9;
}

.terminal-legend {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot-green {
  background: #22c55e;
}

.terminal-dot-amber {
  background: #f59e0b;
}

.terminal-dot-red {
  background: #ef4444;
}

.live-log-output {
  margin: 0;
  min-height: 520px;
  max-height: 72vh;
  padding: 14px;
  overflow: auto;
  display: grid;
  gap: 8px;
  align-content: start;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.045), transparent 24%),
    linear-gradient(180deg, #09090b 0%, #111113 100%);
}

.log-empty {
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #a1a1aa;
  text-align: center;
}

.log-row {
  display: grid;
  grid-template-columns: 182px 98px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.84);
}

.log-row-system {
  grid-template-columns: 96px minmax(0, 1fr);
}

.log-row-info {
  background: rgba(17, 24, 39, 0.88);
}

.log-row-warn {
  background: rgba(66, 32, 6, 0.9);
}

.log-row-error {
  background: rgba(69, 10, 10, 0.9);
}

.log-time {
  color: #71717a;
  font-size: 0.8rem;
  white-space: nowrap;
}

.log-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-message {
  min-width: 0;
  color: #f4f4f5;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(115, 115, 115, 0.28);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(64, 64, 64, 0.38);
  background-clip: padding-box;
}

@media (max-width: 1260px) {
  .summary-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    display: flex;
    overflow: auto;
    padding-bottom: 4px;
  }

  .nav-link {
    min-width: 128px;
  }

  .sidebar-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-main {
    padding: 20px 18px 40px;
  }

  .page-header-row,
  .section-grid,
  .section-grid-detail,
  .form-grid,
  .detail-grid,
  .summary-grid-3,
  .summary-grid-4,
  .summary-grid-6 {
    grid-template-columns: 1fr;
  }

  .page-header-row,
  .panel-head,
  .runner-primary,
  .runner-meta-list {
    align-items: flex-start;
  }

  .sidebar-footer {
    grid-template-columns: 1fr;
  }

  .table-stack thead {
    display: none;
  }

  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }

  .table-stack tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .table-stack tr:last-child {
    border-bottom: 0;
  }

  .table-stack td {
    padding: 8px 14px;
    border: 0;
  }

  .table-stack td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--foreground-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .app-sidebar,
  .app-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-header-card,
  .panel {
    padding: 18px;
  }

  .task-edit-grid {
    grid-template-columns: 1fr;
  }

  .log-row,
  .log-row-system {
    grid-template-columns: 1fr;
  }

  .live-log-output {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .button-row,
  .action-row {
    width: 100%;
  }

  .hero-actions > *,
  .button-row > *,
  .action-row > * {
    flex: 1 1 auto;
  }

  .hero-actions form,
  .action-row form {
    flex: 1 1 auto;
  }

  .hero-actions form button,
  .action-row form button {
    width: 100%;
  }
}
