:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #647080;
  --line: #dfe6ef;
  --brand: #0f766e;
  --brand-2: #155e75;
  --accent: #f59e0b;
  --danger: #b42318;
  --ok: #15803d;
  --shadow: 0 18px 48px rgba(17, 24, 39, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

button, input, select, textarea { font: inherit; }

.technical-only {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

.u2-screen-status {
  margin-top: 12px;
}

.u2-readout-card {
  border-left: 4px solid var(--brand);
}

.u2-readout-card > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.u2-readout-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  word-break: break-word;
}

.text-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.text-chip-row span {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.2;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

button:hover { border-color: var(--brand); }

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 7px;
  padding: 0 14px;
  text-decoration: none;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.6;
}

.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.ghost {
  background: #eef6f6;
  border-color: #cbe5e1;
  color: var(--brand-2);
  font-weight: 700;
}

.danger-action {
  background: #fee2e2;
  border-color: #fecaca;
  color: var(--danger);
}

.wide { width: 100%; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 20px 16px;
  background: #102a43;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2dd4bf, #fbbf24);
  color: #082f49;
  font-weight: 900;
}

.brand strong { display: block; font-size: 17px; }
.brand span { display: block; margin-top: 3px; color: rgba(255,255,255,.64); font-size: 12px; }

nav {
  display: grid;
  gap: 8px;
}

nav a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  padding: 12px 12px;
  border-radius: 7px;
}

nav a:hover {
  background: rgba(255,255,255,.11);
  color: #fff;
}

.guard-card {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
}

.guard-card b { color: #fde68a; }
.guard-card p { margin: 8px 0 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.7; }

.workspace {
  margin-left: 236px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 28px; }
h2 { margin-bottom: 5px; font-size: 18px; }
.topbar p, .section-title p { color: var(--muted); margin-bottom: 0; }

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.stat, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat {
  padding: 16px;
}

.stat span, .stat small {
  display: block;
  color: var(--muted);
}

.stat strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 30px;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(430px, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-subhead {
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.section-subhead h3 {
  margin: 0;
  font-size: 15px;
}

.pill {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e6f4f1;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.device-list, .task-list, .card-list, .log-list, .event-list, .report-grid, .platform-grid {
  display: grid;
  gap: 10px;
}

.device-card, .task-card, .mini-card, .log-card, .event-card, .report-card, .platform-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.scheduler-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.scheduler-box strong {
  display: block;
  margin-bottom: 4px;
}

.scheduler-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.scheduler-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.scheduler-actions input {
  width: 96px;
}

.account-form {
  flex-wrap: wrap;
  margin-top: 10px;
}

.account-form > * {
  flex: 1 1 150px;
}

.account-list {
  margin-top: 10px;
}

.metric-evidence-list {
  margin-top: 10px;
}

.playbook-list {
  margin: 10px 0 14px;
}

.device-group-list {
  margin: 10px 0 12px;
}

.android-inspection-list {
  margin: 10px 0 12px;
}

.connection-card {
  background: #f8fbff;
}

.connection-steps {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.status-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.metric-summary {
  color: var(--ink) !important;
  font-weight: 800;
}

.evidence-thumb {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.workbench-card {
  border-left: 4px solid var(--brand);
}

.progress-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.focus-pulse {
  animation: focusPulse 1.8s ease;
}

@keyframes focusPulse {
  0%, 100% { box-shadow: none; }
  25%, 70% { box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.24); }
}

.danger-text {
  color: var(--danger);
}

.device-card {
  cursor: pointer;
}

.device-card.active {
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}

.simple-device-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.simple-device-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.simple-device-warning {
  background: #fff7ed !important;
  color: #c2410c !important;
}

.simple-bind-result {
  padding: 9px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857 !important;
  font-weight: 800;
}

.usb-device-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.usb-device-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  word-break: break-all;
}

.device-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.device-card h3, .mini-card h3, .report-card h3, .platform-card h3 {
  margin: 0;
  font-size: 14px;
}

.device-card p, .task-card p, .mini-card p, .log-card p, .event-card p, .report-card p, .platform-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.footprint-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.footprint-metrics span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  background: #f8fafc;
}

.footprint-metrics b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.footprint-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.footprint-entry-card {
  min-height: 132px;
}

.summary-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.summary-chip-list span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.summary-chip-list b {
  color: var(--ink);
}

.comment-template-card p:first-of-type {
  color: var(--ink);
  font-size: 14px;
}

.douyin-detail-page {
  margin: 14px 0 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.comment-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.comment-category-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.comment-template-stack {
  display: grid;
  gap: 8px;
}

.comment-template-card {
  padding: 10px;
  background: #ffffff;
}

.record-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.report-card p {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.report-card b {
  color: var(--ink);
}

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

.status {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.online { background: #dcfce7; color: var(--ok); }
.status.idle { background: #fef3c7; color: #92400e; }
.status.stale { background: #fff7ed; color: #c2410c; }
.status.offline { background: #fee2e2; color: var(--danger); }
.status.queued, .status.running, .status.planned, .status.sent { background: #dbeafe; color: #1d4ed8; }
.status.review_required { background: #fee2e2; color: var(--danger); }
.status.healthy, .status.done, .status.ok { background: #dcfce7; color: var(--ok); }
.status.watching, .status.dispatched { background: #fef3c7; color: #92400e; }
.status.needs_review, .status.cancelled, .status.failed { background: #fee2e2; color: var(--danger); }
.status.enabled, .status.default { background: #dcfce7; color: var(--ok); }
.status.standby { background: #e0f2fe; color: #0369a1; }
.status.active, .status.todo { background: #dbeafe; color: #1d4ed8; }
.status.disabled { background: #e5e7eb; color: #4b5563; }
.status.fallback { background: #fef3c7; color: #92400e; }
.status.contacted { background: #fef3c7; color: #92400e; }
.status.won { background: #dcfce7; color: var(--ok); }
.status.lost, .status.paused { background: #fee2e2; color: var(--danger); }

.warning-text {
  color: #c2410c !important;
  font-weight: 700;
}

.phone-wrap {
  display: grid;
  place-items: center;
  padding: 12px 0 18px;
}

.phone-screen {
  width: min(100%, 320px);
  aspect-ratio: 9 / 17;
  border: 10px solid #111827;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .16), rgba(245, 158, 11, .12)),
    #f8fafc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 58px rgba(15, 23, 42, .22);
}

.phone-status {
  min-height: 42px;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12px;
}

.phone-content {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
}

.phone-image {
  display: none;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: #e5e7eb;
}

.phone-content b { font-size: 18px; }
.phone-content p { color: var(--muted); line-height: 1.7; }

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.apk-grid {
  margin-top: 9px;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.check-row input {
  width: auto;
}

.form-row + input,
.form-row + textarea,
.row-actions + .card-list {
  margin-top: 10px;
}

.inline, .form-row {
  display: flex;
  gap: 9px;
}

.tool-row {
  flex-wrap: wrap;
  align-items: center;
}

.tool-row select {
  flex: 1 1 220px;
}

.tool-row button {
  flex: 0 0 auto;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.batch-result {
  margin-top: 10px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compact-title {
  margin-bottom: 8px;
}

.sub-title {
  margin-top: 16px;
}

.snapshot-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.node-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.node-list span {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef6f6;
  color: var(--brand-2);
  font-size: 12px;
  word-break: break-word;
}

.ai-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr);
  gap: 14px;
}

#assistant.assistant-panel {
  padding: 20px;
}

#assistant.assistant-panel .assistant-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: stretch;
}

.assistant-messages {
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

#assistant.assistant-panel .assistant-messages {
  min-height: 520px;
  max-height: min(72vh, 760px);
  padding: 16px;
  font-size: 14px;
}

.assistant-message {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.assistant-message.from-user {
  background: #eef6f6;
  border-color: #bfdede;
}

.assistant-message strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--brand-2);
}

.assistant-message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.assistant-actions span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #e5e7eb;
  font-size: 12px;
  color: var(--muted);
}

.assistant-tools {
  display: grid;
  align-content: start;
  gap: 10px;
}

#assistant.assistant-panel .assistant-tools {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.assistant-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

#assistant.assistant-panel .assistant-input {
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  margin-top: 16px;
}

.assistant-input textarea {
  min-height: 72px;
}

#assistant.assistant-panel .assistant-input textarea {
  min-height: 128px;
}

.agent-step-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.agent-step-row {
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.agent-step-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.graphic-publish-panel {
  border-color: #cbe5e1;
}

.content-channel-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.content-channel-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.content-channel-card b {
  font-size: 15px;
}

.content-channel-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.content-channel-card.active {
  border-color: #3f8f84;
  background: #f2fbf9;
}

.xhs-radar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0;
  align-items: start;
}

.xhs-radar-grid .section-title {
  margin-bottom: 8px;
}

.douyin-tool-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d7e6f2;
  border-radius: 8px;
  background: #f8fbff;
}

.footprint-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, .8fr);
  gap: 14px;
  align-items: start;
}

.footprint-flow {
  display: grid;
  gap: 8px;
}

.flow-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-step b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e6f4f1;
  color: var(--brand);
  font-size: 13px;
}

.flow-step span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.footprint-controls {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.douyin-seo-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbe5e1;
  border-radius: 8px;
  background: #f8fdfc;
}

.seo-row {
  align-items: end;
}

.seo-preview {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.seo-preview span {
  font-weight: 800;
  color: var(--text);
}

.seo-preview small {
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.seo-material-library {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.seo-material-library strong {
  display: block;
  margin-bottom: 4px;
}

.seo-material-library span {
  color: var(--muted);
  font-size: 13px;
}

.seo-material-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seo-material-areas span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.seo-material-areas span.active {
  border-color: #91cfc5;
  background: #e8f7f4;
  color: var(--brand-2);
  font-weight: 700;
}

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

.seo-material-actions input[type="file"] {
  flex: 1 1 180px;
  min-width: 0;
}

.seo-material-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.seo-material-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.graphic-flow-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.graphic-flow-form {
  display: grid;
  gap: 10px;
}

.graphic-flow-card {
  overflow: hidden;
}

.graphic-flow-preview {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.graphic-flow-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.graphic-flow-preview img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.graphic-flow-preview p {
  word-break: break-word;
}

.apk-download-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.apk-download-box img {
  width: 116px;
  height: 116px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.device-binding-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 3px;
}

.binding-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.binding-layout img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.binding-text {
  min-height: 54px;
  max-height: 92px;
  margin-top: 8px;
  font-size: 12px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 88px;
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #d1fae5;
  font-size: 12px;
  line-height: 1.6;
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

code {
  display: block;
  padding: 12px;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
}

.log-panel { margin-bottom: 24px; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 280px minmax(420px, 1fr); }
  .tasks-panel { grid-column: 1 / -1; }
  .protocol-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .graphic-flow-grid, .footprint-entry-grid, .comment-template-grid, .record-detail-grid { grid-template-columns: 1fr; }
  .footprint-grid { grid-template-columns: 1fr; }
  .assistant-layout { grid-template-columns: 1fr; }
  #assistant.assistant-panel .assistant-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
  }
  .workspace { margin-left: 0; padding: 14px; }
  .topbar, .inline, .form-row, .scheduler-box, .scheduler-actions { flex-direction: column; align-items: stretch; }
  .scheduler-actions input { width: 100%; }
  .layout, .two-col, .stat-grid, .protocol-grid, .platform-grid, .report-grid, .content-channel-strip, .xhs-radar-grid, .footprint-metrics { grid-template-columns: 1fr; }
  .graphic-flow-preview { grid-template-columns: 1fr; }
  .binding-layout { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: repeat(2, 1fr); }
  .assistant-input { grid-template-columns: 1fr; }
  #assistant.assistant-panel .assistant-input { grid-template-columns: 1fr; }
  #assistant.assistant-panel .assistant-messages { min-height: 360px; }
}
