[hidden], .workspace-archived { display: none !important; }
:root { --bg: #f7f8fa; --ink: #252830; --muted: #737982; --line: #e2e5e9; --shadow: none; }
html { scroll-behavior: auto; }
body { letter-spacing: 0; }
.sidebar { width: 200px; background: #fff; border-right: 1px solid var(--line); color: var(--ink); padding: 24px 14px; }
.brand { gap: 9px; padding: 0 2px; }
.brand strong { font-size: 15px; }
.brand span { color: var(--muted); }
.brand-mark { background: #0f766e; color: white; border-radius: 7px; width: 36px; height: 36px; }
.sidebar nav a { color: #565b63; border-radius: 6px; padding: 11px 14px; margin: 4px 0; }
.sidebar nav a[aria-current="page"] { color: #0f766e; background: #e9f4f1; font-weight: 700; }
.workspace { margin-left: 200px; padding: 22px 28px; min-width: 0; display: block; }
.topbar { min-height: 42px; margin-bottom: 18px; gap: 12px; align-items: center; }
.topbar h1 { font-size: 23px; margin: 0; }
.topbar .eyebrow { display: none; }
.workspace-connection { margin: 0; font-size: 13px; color: var(--muted); }
.workspace > .panel { background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.stat-grid { gap: 0; border-block: 1px solid var(--line); margin-bottom: 22px; }
.stat-grid .stat { border: 0; border-right: 1px solid var(--line); box-shadow: none; border-radius: 0; padding: 14px 20px; background: transparent; }
.stat-grid .stat:last-child { border-right: 0; }
.stat strong { font-size: 28px; }
.stat small { font-size: 12px; }
#assistant.assistant-panel { padding: 0; }
#assistant .section-title { margin-bottom: 12px; }
#assistant .section-title h2 { font-size: 16px; }
#assistant.assistant-panel .assistant-layout { display: flex; flex-direction: column-reverse; gap: 12px; }
#assistant.assistant-panel .assistant-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 0; border: 0; background: transparent; }
.assistant-tools .field { margin: 0; flex: 1 1 200px; max-width: 300px; }
.assistant-tools .check-row { align-self: center; }
.assistant-tools .row-actions { margin: 0; }
#assistant.assistant-panel .assistant-messages { height: max(260px, calc(100dvh - 450px)); min-height: 260px; max-height: 700px; background: #fff; padding: 18px; border: 1px solid var(--line); }
.assistant-message { border: 0; border-radius: 0; border-bottom: 1px solid #eef0f2; padding: 14px 8px; margin: 0; background: transparent; }
.assistant-message.from-user { background: #f4f8f7; border-color: #eef0f2; }
.assistant-message p, .execution-row p { overflow-wrap: anywhere; }
.assistant-actions { display: block; color: var(--muted); font-size: 12px; }
summary { cursor: pointer; padding: 8px 0; }
#assistant.assistant-panel .assistant-input { margin-top: 12px; grid-template-columns: minmax(0, 1fr) 120px; }
#assistant.assistant-panel .assistant-input textarea { min-height: 84px; height: 84px; }
#assistant .assistant-supervisor { background: #f5f8fa; }
.execution-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.execution-toolbar select { width: 150px; }
.execution-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.execution-row-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.execution-row-heading strong { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.execution-row .status { flex-shrink: 0; }
.execution-meta { color: var(--muted); font-size: 12px; margin-top: 8px; overflow-wrap: anywhere; }
.workspace .card-list > *, .workspace .device-top > * { min-width: 0; }
.workspace .mini-card p, .workspace .mini-card h3, .workspace .mini-card small { overflow-wrap: anywhere; }
.workspace .card-list { grid-template-columns: minmax(0, 1fr); }
.execution-row p { font-size: 13px; line-height: 1.7; margin: 8px 0; }
.execution-row details { margin-top: 8px; font-size: 13px; }
.empty-state { text-align: center; color: var(--muted); padding: 60px 0; }
.manual-agent-details { margin-top: 20px; border-top: 1px solid var(--line); }
.device-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
#control .phone-wrap { max-width: 360px; margin-inline: auto; }
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 8px; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 4px; }
  .sidebar nav a { white-space: nowrap; padding: 8px 12px; margin: 0; }
  .workspace { margin-left: 0; padding: 18px 16px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topbar, .top-actions { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .workspace { padding: 14px 12px; }
  .topbar h1 { font-size: 20px; }
  .topbar { flex-direction: row; align-items: center; min-height: 40px; }
  .workspace-connection { font-size: 11px; }
  .top-actions { gap: 8px; }
  .stat-grid .stat { padding: 10px 8px; }
  .stat-grid .stat small { display: none; }
  .stat-grid .stat span { font-size: 12px; }
  .stat strong { font-size: 24px; }
  #assistant.assistant-panel .assistant-input { grid-template-columns: minmax(0, 1fr) 82px; }
  #assistant .assistant-input { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 2; }
  #assistantSendBtn { padding: 0 8px; }
  #assistant.assistant-panel .assistant-messages { min-height: 320px; padding: 10px; }
  .assistant-tools .field { max-width: none; flex-basis: calc(50% - 12px); min-width: 0; }
  .execution-row-heading { gap: 8px; }
  .execution-toolbar { flex-wrap: wrap; }
  .phone-agent-workspace { padding: 10px; }
  .form-row, .graphic-publish-grid { min-width: 0; }
}
