:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #151922;
  --muted: #647084;
  --line: #dbe2ea;
  --line-strong: #c6d0dc;
  --brand: #155eef;
  --brand-2: #0f766e;
  --accent: #d97706;
  --danger: #c2410c;
  --success: #047857;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow: 0 18px 45px rgba(21, 25, 34, 0.08);
  --shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 22px 58px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  --sidebar: 248px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(115deg, rgba(21, 94, 239, 0.08), rgba(15, 118, 110, 0.06) 38%, rgba(217, 119, 6, 0.05) 72%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 251, 0.96) 42%, #f5f7fb),
    repeating-linear-gradient(90deg, rgba(100, 112, 132, 0.045) 0, rgba(100, 112, 132, 0.045) 1px, transparent 1px, transparent 56px),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  border-right: 1px solid rgba(198, 208, 220, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86)),
    var(--surface);
  backdrop-filter: blur(16px);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.95), rgba(15, 118, 110, 0.95)),
    #155eef;
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.24);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left-width: 5px;
}

.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.nav button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
}

.nav button {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #303847;
}

.nav button.active,
.nav button:hover {
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.11), rgba(15, 118, 110, 0.08)),
    #f8fbff;
  border-color: rgba(21, 94, 239, 0.22);
  color: var(--brand);
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.08);
}

.nav-icon {
  width: 18px;
  text-align: center;
  color: inherit;
}

.nav-submenu {
  border: 1px solid rgba(198, 208, 220, 0.76);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.nav-submenu-title {
  min-height: 34px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #303847;
  font-size: 13px;
  font-weight: 800;
}

.nav-child {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #536174;
  display: flex;
  align-items: center;
  padding: 0 8px 0 36px;
  text-align: left;
}

.nav-child span {
  min-width: 26px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.nav-child:hover {
  background: #ffffff;
  border-color: rgba(21, 94, 239, 0.18);
  color: var(--brand);
}

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

.user-chip {
  border: 1px solid rgba(198, 208, 220, 0.84);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    var(--surface-2);
}

.user-chip strong {
  display: block;
  font-size: 13px;
}

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

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 64px;
  border-bottom: 1px solid rgba(198, 208, 220, 0.72);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.content {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px 28px 44px;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
  background:
    linear-gradient(120deg, rgba(21, 94, 239, 0.12), transparent 46%),
    var(--bg);
}

.portal-layout {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 26px;
  padding: clamp(24px, 6vw, 72px);
}

.portal-head {
  width: min(880px, 100%);
}

.portal-head .brand-mark {
  margin-bottom: 18px;
}

.portal-kicker {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.portal-head h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
}

.portal-head p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.portal-grid {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.portal-card {
  min-height: 260px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.portal-card.admin::before {
  background: linear-gradient(90deg, var(--accent), var(--brand));
}

.portal-card h2 {
  margin: 6px 0 0;
  font-size: 24px;
}

.portal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.portal-card .button {
  margin-top: auto;
  width: fit-content;
}

.portal-session {
  width: min(980px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.login-panel {
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-visual {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
}

.signal-board {
  width: min(760px, 100%);
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.94)),
    repeating-linear-gradient(90deg, rgba(21, 94, 239, 0.05) 0, rgba(21, 94, 239, 0.05) 1px, transparent 1px, transparent 44px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 26px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}

.signal-col {
  display: grid;
  gap: 12px;
}

.signal-strip,
.signal-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
}

.signal-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signal-kpi {
  height: 8px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}

.signal-kpi span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.signal-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

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

.bar {
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--brand);
}

.login-card {
  max-width: 390px;
}

.login-card h1 {
  font-size: 30px;
  margin: 16px 0 8px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.7;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-weight: 650;
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  min-height: 40px;
  padding: 9px 11px;
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.65;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.14);
}

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

.button {
  min-height: 40px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
  border-radius: var(--radius);
  padding: 0 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button:hover {
  filter: brightness(0.97);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.ghost-button {
  min-height: 36px;
  padding: 0 9px;
  border-radius: var(--radius);
  color: var(--muted);
}

.ghost-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border-color: var(--line);
  background: var(--surface);
}

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

.status-line {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.workbench-content {
  display: grid;
  gap: 22px;
}

.section-kicker {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.studio-stage {
  min-height: 390px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0 56%, rgba(17, 24, 39, 0.96) 56% 100%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  overflow: hidden;
}

.studio-copy {
  padding: clamp(26px, 4vw, 44px);
  align-self: center;
}

.studio-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
}

.studio-eyebrow span {
  width: 34px;
  height: 1px;
  background: #111827;
}

.studio-copy h2 {
  max-width: 720px;
  margin: 18px 0 14px;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.02;
  font-weight: 850;
}

.studio-copy p {
  max-width: 650px;
  margin: 0;
  color: #566174;
  font-size: 15px;
  line-height: 1.9;
}

.studio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.studio-board {
  background:
    linear-gradient(180deg, #111827, #151d2b),
    #111827;
  color: #f8fafc;
  padding: clamp(18px, 3vw, 30px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  position: relative;
}

.studio-board::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.board-top {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.board-top strong {
  color: #f8fafc;
}

.board-paper {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #f8fafc;
  color: #111827;
  border-radius: var(--radius);
  padding: 20px;
  align-self: center;
  min-height: 190px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  position: relative;
  z-index: 1;
}

.paper-line {
  height: 11px;
  border-radius: 999px;
  background: #111827;
  opacity: 0.88;
  margin-bottom: 13px;
}

.paper-line.long {
  width: 86%;
}

.paper-line.mid {
  width: 64%;
}

.paper-line.short {
  width: 42%;
}

.paper-line.muted-line {
  background: #cbd5e1;
}

.paper-note {
  width: min(220px, 100%);
  border-left: 3px solid var(--accent);
  background: #fff7ed;
  padding: 11px 12px;
  margin: 18px 0;
}

.paper-note span {
  display: block;
  color: #9a3412;
  font-size: 12px;
}

.paper-note strong {
  display: block;
  margin-top: 4px;
  color: #111827;
}

.board-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 1;
}

.board-matrix div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  border-radius: var(--radius);
  padding: 12px;
}

.board-matrix span {
  display: block;
  color: rgba(248, 250, 252, 0.58);
  font-size: 12px;
}

.board-matrix strong {
  display: block;
  margin-top: 7px;
  color: #f8fafc;
  font-size: 15px;
}

.studio-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 0;
}

.studio-toolbar h2 {
  margin: 6px 0 0;
  font-size: 22px;
}

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

.studio-tabs span {
  border: 1px solid rgba(198, 208, 220, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #364152;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 750;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.agent-card {
  min-height: 272px;
  border: 1px solid rgba(17, 24, 39, 0.11);
  background: #fffdfa;
  border-radius: var(--radius);
  padding: 18px 18px 18px 56px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.07);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease, background 170ms ease;
}

.agent-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 38px;
  height: auto;
  background:
    linear-gradient(180deg, #111827, #263244),
    #111827;
}

.agent-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 24, 39, 0.22);
  background: #ffffff;
  box-shadow: 0 26px 62px rgba(17, 24, 39, 0.12);
}

.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 100%;
  z-index: 1;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.agent-card h3 {
  margin: 6px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.agent-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.agent-card .button {
  margin-top: auto;
  width: fit-content;
  min-height: 38px;
}

.agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.agent-meta span {
  border: 1px solid rgba(219, 226, 234, 0.95);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.82);
  color: #526174;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.agent-status {
  color: var(--success);
  font-size: 12px;
  font-weight: 850;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.badge.green {
  background: #ecfdf5;
  color: var(--success);
}

.badge.orange {
  background: #fff7ed;
  color: var(--danger);
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
}

.panel-header {
  min-height: 56px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.panel-body {
  padding: 16px;
}

.chat-layout {
  height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-width: 0;
}

.conversation-list {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
  overflow: auto;
}

.conversation-list .button {
  width: 100%;
  margin-bottom: 12px;
}

.conversation-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.conversation-item:hover,
.conversation-item.active {
  background: var(--surface);
  border-color: var(--line);
}

.conversation-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

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

.chat-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
}

.messages {
  overflow: auto;
  padding: 24px min(5vw, 56px);
}

.empty-state {
  max-width: 720px;
  margin: 8vh auto 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.empty-state h2 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.message {
  max-width: 820px;
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: var(--brand);
}

.message.assistant .avatar {
  background: var(--brand-2);
}

.bubble {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 13px 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.user .bubble {
  background: #f8fbff;
}

.bubble-tools {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.composer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px min(5vw, 56px) 18px;
}

.composer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.composer textarea {
  min-height: 52px;
  max-height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  resize: vertical;
  padding: 13px;
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 12px;
  background: var(--surface-2);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.5fr);
  gap: 16px;
  align-items: start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.36);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(720px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-header {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.modal-body {
  padding: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 12px 14px;
  max-width: 360px;
}

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

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

.hide {
  display: none !important;
}

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

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

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

  .nav-submenu {
    grid-column: 1 / -1;
  }

  .topbar {
    position: static;
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }

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

  .studio-stage {
    grid-template-columns: 1fr;
    background: var(--surface);
  }

  .studio-board {
    min-height: 320px;
  }

  .studio-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-layout,
  .split,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .conversation-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 210px;
  }

  .login-visual {
    display: none;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding-left: 0;
  }
}

@media (max-width: 620px) {
  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .agent-grid {
    grid-template-columns: 1fr;
  }

  .studio-copy {
    padding: 22px;
  }

  .studio-board {
    padding: 18px;
  }

  .board-matrix {
    grid-template-columns: 1fr 1fr;
  }

  .studio-actions .button {
    width: 100%;
  }

  .agent-card {
    min-height: 248px;
  }

  .composer-inner {
    grid-template-columns: 1fr;
  }

  .composer-inner .button {
    width: 100%;
  }

  .message {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
