:root {
  color-scheme: light;
  --bg: #f7f9ff;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(113, 135, 180, 0.2);
  --line-strong: rgba(90, 116, 170, 0.3);
  --text: #15213d;
  --muted: #66708a;
  --blue: #2779f6;
  --blue-dark: #1261d8;
  --violet: #745af8;
  --mint: #18b977;
  --coral: #ff6558;
  --amber: #e69b12;
  --shadow: 0 18px 55px rgba(52, 74, 125, 0.11);
  --shadow-soft: 0 8px 24px rgba(52, 74, 125, 0.08);
  font-family: Pretendard, "Noto Sans KR", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Multi-agent group discussions */
.discussion-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.discussion-list-panel {
  min-width: 0;
  min-height: 620px;
  padding: 20px 12px;
}

.discussion-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--line);
}

.discussion-list-heading h2 { margin: 2px 0 0; font-size: 18px; }
.discussion-list-heading strong {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue);
  font-size: 11px;
  text-align: center;
  background: #edf4ff;
}

.discussion-room-list { min-width: 0; max-width: 100%; display: grid; gap: 5px; margin-top: 10px; }
.discussion-room-button {
  width: 100%;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  text-align: left;
  background: transparent;
}
.discussion-room-button:hover { background: #f5f7fc; }
.discussion-room-button.active { background: #edf4ff; }
.discussion-room-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border: 1px solid #9ba7b8;
  border-radius: 50%;
  background: #fff;
}
.discussion-room-button.active .discussion-room-dot,
.discussion-room-dot.running { border-color: var(--blue); background: var(--blue); }
.discussion-room-dot.completed { border-color: #19a974; background: #19a974; }
.discussion-room-dot.failed { border-color: #df6c64; background: #df6c64; }
.discussion-room-button strong,
.discussion-room-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discussion-room-button strong { font-size: 12px; }
.discussion-room-button small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.discussion-list-empty { margin: 24px 8px; color: var(--muted); font-size: 11px; text-align: center; }

.discussion-detail {
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
  padding: 0;
}
.discussion-empty {
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  text-align: center;
}
.discussion-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: var(--blue);
  font-size: 24px;
  background: #edf4ff;
}
.discussion-empty h2 { margin: 17px 0 7px; font-size: 19px; }
.discussion-empty p { max-width: 440px; margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.discussion-detail-header { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.discussion-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.discussion-title-row h2 { margin: 3px 0 6px; font-size: 20px; }
.discussion-title-row p { margin: 0; color: var(--muted); font-size: 10px; }
.discussion-header-actions { display: flex; align-items: center; gap: 7px; }
.discussion-download-button { min-height: 34px; padding: 0 12px; white-space: nowrap; }
.discussion-delete-button { width: 34px; height: 34px; padding: 0; }
.discussion-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6d7582;
  font-size: 9px;
  font-weight: 700;
  background: #f0f3f7;
}
.discussion-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9aa4b2; }
.discussion-status.running { color: #176bbf; background: #eaf4ff; }
.discussion-status.running::before { background: #2779f6; box-shadow: 0 0 0 3px rgba(39,121,246,.12); }
.discussion-status.completed { color: #147e59; background: #e9f8f2; }
.discussion-status.completed::before { background: #18a974; }
.discussion-status.failed, .discussion-status.cancelled { color: #a64e49; background: #fff0ee; }
.discussion-status.failed::before, .discussion-status.cancelled::before { background: #df6c64; }
.discussion-topic {
  margin: 16px 0 0;
  padding: 13px 15px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  color: #4e5968;
  font-size: 11px;
  line-height: 1.7;
  background: #f9fafc;
  white-space: pre-wrap;
}
.discussion-participants { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.discussion-participant {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 9px 6px 6px;
  border: 1px solid #e5e9f0;
  border-radius: 999px;
  background: #fff;
}
.discussion-participant i,
.discussion-message-symbol {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-weight: 700;
}
.discussion-participant i { width: 23px; height: 23px; font-size: 9px; }
.discussion-participant span { min-width: 0; }
.discussion-participant strong, .discussion-participant small { display: block; }
.discussion-participant strong { font-size: 9px; }
.discussion-participant small { max-width: 125px; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.discussion-participant em { color: var(--blue); font-size: 7px; font-style: normal; font-weight: 700; }

.discussion-stream {
  min-height: 300px;
  max-height: 620px;
  overflow-y: auto;
  padding: 24px;
  background: #fbfcfe;
}
.discussion-round-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #9ba4b1; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.discussion-round-divider::before, .discussion-round-divider::after { content: ""; height: 1px; flex: 1; background: #e5e9ef; }
.discussion-message { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; max-width: 720px; margin: 0 0 20px; }
.discussion-message-symbol { width: 34px; height: 34px; font-size: 11px; }
.discussion-message-meta { display: flex; align-items: baseline; gap: 7px; margin-bottom: 6px; }
.discussion-message-meta strong { font-size: 11px; }
.discussion-message-meta span { color: var(--muted); font-size: 8px; }
.discussion-message-meta em { margin-left: auto; color: #8e98a7; font-size: 8px; font-style: normal; }
.discussion-message-body {
  padding: 12px 14px;
  border: 1px solid #e3e7ed;
  border-radius: 4px 14px 14px 14px;
  color: #46515f;
  font-size: 11px;
  line-height: 1.75;
  background: #fff;
}
.discussion-message-body p { margin: 0 0 8px; }
.discussion-message-body p:last-child { margin-bottom: 0; }
.discussion-message-body h2, .discussion-message-body h3 { margin: 12px 0 6px; color: #263342; font-size: 13px; }
.discussion-message-body h2:first-child, .discussion-message-body h3:first-child { margin-top: 0; }
.discussion-message-body ul, .discussion-message-body ol { margin: 7px 0; padding-left: 19px; }
.discussion-message.user { display: block; max-width: 620px; margin-left: auto; }
.discussion-message.user .discussion-message-body { border-radius: 14px 4px 14px 14px; color: #31567d; background: #edf6ff; border-color: #d8e9fa; }
.discussion-message.conclusion { display: block; max-width: 760px; margin: 28px auto 22px; }
.discussion-conclusion-card { overflow: hidden; border: 1px solid #cfdcff; border-radius: 16px; background: #fff; box-shadow: 0 10px 32px rgba(40,92,170,.08); }
.discussion-conclusion-heading { display: flex; align-items: center; gap: 10px; padding: 13px 16px; color: #fff; background: linear-gradient(120deg, #2779f6, #675de3); }
.discussion-conclusion-heading span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: rgba(255,255,255,.15); }
.discussion-conclusion-heading strong, .discussion-conclusion-heading small { display: block; }
.discussion-conclusion-heading strong { font-size: 11px; }
.discussion-conclusion-heading small { margin-top: 2px; color: #dfe7ff; font-size: 8px; }
.discussion-conclusion-card .discussion-message-body { padding: 18px; border: 0; border-radius: 0; }
.creation-output { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.85; }
.creation-result.draft .discussion-conclusion-card { border-color: #b9dfd3; }
.creation-result.draft .discussion-conclusion-heading { background: linear-gradient(120deg, #168c72, #2779a8); }
.creation-result.final .discussion-conclusion-card { box-shadow: 0 14px 38px rgba(62,70,180,.13); }
.discussion-activity { display: flex; align-items: center; gap: 8px; margin: 12px 0 0 44px; color: var(--muted); font-size: 9px; }
.discussion-activity i { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); animation: discussion-pulse 1s infinite alternate; }
.discussion-activity i:nth-child(2) { animation-delay: .2s; }.discussion-activity i:nth-child(3) { animation-delay: .4s; }
@keyframes discussion-pulse { to { opacity: .25; transform: translateY(-2px); } }
.discussion-error { margin: 0 24px 18px; padding: 11px 13px; border-radius: 10px; color: #9b4d49; font-size: 10px; background: #fff1ef; }
.discussion-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); background: #fff; }
.discussion-controls > p { margin: 0; color: var(--muted); font-size: 9px; }
.discussion-control-actions { display: flex; gap: 7px; margin-left: auto; }
.discussion-followup { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.discussion-followup textarea { min-height: 42px; max-height: 120px; resize: vertical; padding: 11px 12px; border: 1px solid #dbe1ea; border-radius: 10px; outline: 0; font-size: 11px; }
.discussion-followup textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,121,246,.1); }

.group-chat-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 24px 80px rgba(28,45,72,.22); }
.group-chat-dialog::backdrop { background: rgba(22,34,51,.48); backdrop-filter: blur(3px); }
.group-chat-dialog-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 32px); }
.group-chat-dialog .dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.group-chat-dialog-body { overflow-y: auto; display: grid; gap: 18px; padding: 22px 24px; }
.group-chat-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 180px 160px; gap: 12px; }
.group-chat-dialog label > span, .group-participant-editor h3 { display: block; margin-bottom: 7px; color: #475361; font-size: 10px; font-weight: 700; }
.group-chat-dialog input, .group-chat-dialog select, .group-chat-dialog textarea { width: 100%; padding: 10px 11px; border: 1px solid #dce2ea; border-radius: 10px; outline: 0; color: var(--text); background: #fff; }
.group-chat-dialog input:focus, .group-chat-dialog select:focus, .group-chat-dialog textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,121,246,.1); }
.group-chat-dialog textarea { resize: vertical; line-height: 1.6; }
.group-participant-editor { display: grid; gap: 12px; }
.group-participant-editor-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.group-participant-editor-heading h3 { margin: 0; font-size: 12px; }
.group-participant-editor-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.group-participant-editor-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.group-participant-editor-actions > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.group-participant-editor-actions > .button { min-height: 34px; padding: 0 11px; font-size: 9px; white-space: nowrap; }
.group-participant-preset-group { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #f4f6fa; }
.group-participant-preset-group .button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 8px; box-shadow: none; font-size: 8px; white-space: nowrap; }
.group-participant-preset-group .button[aria-pressed="true"] { color: var(--blue-dark); background: #fff; box-shadow: 0 3px 9px rgba(52,74,125,.1); }
.group-participant-list { display: grid; gap: 10px; }
.group-participant-card { padding: 14px; border: 1px solid #e2e7ee; border-radius: 14px; background: #f9fafc; }
.group-participant-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-participant-card-heading span, .group-participant-card-heading strong { display: block; }
.group-participant-card-heading span { color: var(--blue); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.group-participant-card-heading strong { margin-top: 2px; font-size: 11px; }
.group-participant-card-heading .button { min-height: 30px; padding: 5px 10px; font-size: 8px; }
.group-participant-fields { display: grid; grid-template-columns: 1fr 1.2fr .75fr 1fr; gap: 10px; }
.group-participant-persona { grid-column: 1 / -1; }
.group-participant-persona textarea { min-height: 86px; }
.group-chat-facilitator-field { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 3px 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: #edf4ff; }
.group-chat-facilitator-field > span, .group-chat-facilitator-field > small { grid-column: 1; margin: 0 !important; }
.group-chat-facilitator-field > small { color: var(--muted); font-size: 8px; }.group-chat-facilitator-field > select { grid-column: 2; grid-row: 1 / 3; }

@media (max-width: 1120px) {
  .discussion-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .discussion-participant small { max-width: 90px; }
}

@media (max-width: 820px) {
  .discussion-layout { grid-template-columns: minmax(0, 1fr); }
  .discussion-list-panel { min-height: auto; }
  .discussion-room-list { width: 100%; display: flex; overflow-x: auto; overscroll-behavior-inline: contain; padding-bottom: 3px; }
  .discussion-room-button { width: 190px; min-width: 190px; flex: 0 0 190px; }
  .discussion-list-empty { margin: 15px; }
  .discussion-detail, .discussion-empty { min-height: 520px; }
  .discussion-stream { max-height: none; }
  .group-participant-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-participant-persona { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .discussion-title-row { flex-direction: column; }
  .discussion-header-actions { width: 100%; justify-content: space-between; }
  .discussion-detail-header, .discussion-stream { padding: 16px 14px; }
  .discussion-controls { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .discussion-control-actions, .discussion-control-actions .button { width: 100%; }
  .discussion-control-actions .button { flex: 1; }
  .discussion-followup { grid-template-columns: 1fr; }
  .discussion-followup .button { width: 100%; }
  .discussion-message { grid-template-columns: 30px minmax(0, 1fr); }
  .discussion-message-symbol { width: 30px; height: 30px; }
  .group-chat-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .group-chat-dialog-card { height: 100%; max-height: none; }
  .group-chat-dialog-body { padding: 18px 14px; }
  .group-chat-form-grid, .group-participant-fields { grid-template-columns: 1fr; }
  .group-participant-editor-heading { align-items: stretch; flex-direction: column; }
  .group-participant-editor-actions { justify-content: space-between; }
  .group-participant-persona { grid-column: 1; }
  .group-chat-facilitator-field { grid-template-columns: 1fr; }
  .group-chat-facilitator-field > select { grid-column: 1; grid-row: auto; margin-top: 7px; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

button, textarea, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(39, 121, 246, 0.28);
  outline-offset: 2px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 48vw;
  height: 48vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
  pointer-events: none;
}
.ambient-one { top: -25vw; right: -12vw; background: #add6ff; }
.ambient-two { bottom: -30vw; left: 8vw; background: #dfd2ff; }

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.64);
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 8px 0 30px rgba(53, 74, 122, 0.05);
  backdrop-filter: blur(28px) saturate(145%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 28px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: linear-gradient(145deg, #247aff, #79aaff);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.8), 0 6px 14px rgba(39,121,246,.25);
  position: relative;
}
.brand-mark::after {
  content: "J";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.nav-list { display: grid; gap: 8px; }
.mobile-logout-form { display: none; }
.nav-item {
  border: 0;
  background: transparent;
  color: #506079;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 650;
}
.nav-item:hover { background: rgba(255,255,255,.72); color: var(--text); }
.nav-item.active { background: rgba(230, 239, 255, .86); color: var(--blue-dark); box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.nav-badge:empty, .nav-badge[data-count="0"] { display: none; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.52);
}
.system-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(24,185,119,.1); }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-footer form { margin-left: auto; }
.logout-button {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.72);
  color: var(--muted); font-size: 17px;
}
.logout-button:hover { color: var(--coral); border-color: rgba(255,101,88,.25); }

.main-content { width: min(1380px, 100%); padding: 42px clamp(24px, 3.5vw, 58px) 64px; margin: 0 auto; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.page-header-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--blue); font-size: 11px; letter-spacing: .16em; font-weight: 850; }
.page-header h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; }
.header-copy { margin: 9px 0 0; color: var(--muted); }
.icon-button {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); color: var(--muted);
  background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 white; font-size: 21px;
}

.glass-panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(24px) saturate(135%);
  border-radius: 22px;
}

.button {
  border: 1px solid transparent; min-height: 44px; padding: 0 18px; border-radius: 13px; font-weight: 750;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: linear-gradient(135deg, var(--blue-dark), #3593ff); box-shadow: 0 9px 20px rgba(39,121,246,.24); }
.button-ghost { background: white; color: var(--muted); border-color: var(--line); }
.button-danger { background: #fff4f2; color: #d8453c; border-color: rgba(255,101,88,.22); }

.new-task-dialog { width: min(780px, calc(100vw - 40px)); max-width: none; max-height: min(860px, calc(100dvh - 40px)); padding: 0; border: 0; background: transparent; }
.new-task-dialog::backdrop { background: rgba(29,39,65,.34); backdrop-filter: blur(9px); }
.new-task-dialog-card { max-height: min(860px, calc(100dvh - 40px)); display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid rgba(255,255,255,.95); border-radius: 24px; background: rgba(250,252,255,.98); box-shadow: 0 28px 80px rgba(34,49,84,.26); }
.new-task-dialog-header { padding: 24px 28px 20px; }
.new-task-dialog-header h2 { font-size: 25px; letter-spacing: -.035em; }
.new-task-dialog-header p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.new-task-dialog-body { min-height: 0; overflow-y: auto; padding: 24px 28px 28px; }
.task-brief-field, .new-task-routing label { position: relative; display: grid; gap: 8px; color: var(--text); font-size: 12px; font-weight: 750; }
.task-brief-field > span b { color: var(--coral); }
.task-brief-field textarea { width: 100%; min-height: 132px; resize: vertical; padding: 15px 16px; border: 1px solid var(--line-strong); border-radius: 15px; color: var(--text); background: white; font-size: 12px; line-height: 1.6; }
.task-brief-field textarea::placeholder { color: #8a94aa; }
.task-brief-field small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.5; }
.task-brief-field small kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--blue-dark); background: white; font: inherit; font-weight: 800; }
.command-picker { z-index: 30; max-height: 240px; overflow-y: auto; padding: 6px; border: 1px solid var(--line-strong); border-radius: 13px; background: white; box-shadow: 0 14px 36px rgba(34,49,84,.18); }
.command-picker[hidden] { display: none; }
.command-picker button { width: 100%; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 0; border-radius: 9px; color: var(--text); text-align: left; background: transparent; cursor: pointer; }
.command-picker button:hover, .command-picker button.active { background: #eef5ff; }
.command-picker button > b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--blue-dark); background: #e8f1ff; font-size: 14px; }
.command-picker button span { min-width: 0; }
.command-picker button strong, .command-picker button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-picker button strong { font-size: 11px; }
.command-picker button small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.command-picker button em { color: var(--muted); font-size: 9px; font-style: normal; }
.new-task-routing { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.new-task-routing select { width: 100%; min-height: 46px; padding: 0 36px 0 13px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--text); background: white; font-weight: 650; }
.new-task-routing select:disabled { color: var(--muted); background: #f1f4f9; }
.new-task-routing-hint { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.task-repeat-section { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(244,247,253,.78); }
.task-repeat-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.task-repeat-toggle strong, .task-repeat-toggle small { display: block; }
.task-repeat-toggle strong { color: var(--text); font-size: 13px; }
.task-repeat-toggle small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.task-repeat-toggle > input { appearance: none; flex: 0 0 auto; width: 42px; height: 24px; padding: 3px; border: 0; border-radius: 99px; background: #ccd4e2; cursor: pointer; transition: background .16s ease; }
.task-repeat-toggle > input::before { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(40,54,82,.25); transition: transform .16s ease; }
.task-repeat-toggle > input:checked { background: var(--blue); }
.task-repeat-toggle > input:checked::before { transform: translateX(18px); }
.task-repeat-fields { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.task-repeat-fields[hidden], .task-repeat-grid label[hidden] { display: none; }
.task-repeat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.task-repeat-grid label { min-width: 0; display: grid; gap: 8px; color: var(--text); font-size: 11px; font-weight: 750; }
.task-repeat-grid select, .task-repeat-grid input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: white; font-weight: 650; }
.task-repeat-interval { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; }
.task-repeat-interval small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.task-repeat-preview { margin: 12px 0 0; color: var(--blue-dark); font-size: 10px; font-weight: 750; line-height: 1.5; }
.task-repeat-note { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.dataset-picker { min-width: 0; margin: 24px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(244,247,253,.78); }
.dataset-picker legend { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0; color: var(--text); font-size: 13px; font-weight: 800; }
.dataset-picker legend span { display: flex; align-items: center; gap: 8px; }
.dataset-picker legend small { padding: 3px 6px; border-radius: 6px; color: var(--muted); background: white; font-size: 9px; font-weight: 650; }
.dataset-picker legend b { color: var(--blue-dark); font-size: 11px; }
.dataset-picker > p { margin: 6px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dataset-option-list { max-height: 250px; display: grid; gap: 8px; overflow-y: auto; padding: 2px; }
.dataset-option { position: relative; min-width: 0; display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.dataset-option:hover { border-color: rgba(39,121,246,.34); }
.dataset-option:has(input:checked) { border-color: rgba(39,121,246,.45); background: #f4f8ff; box-shadow: inset 0 0 0 1px rgba(39,121,246,.08); }
.dataset-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dataset-option-check { width: 20px; height: 20px; display: grid; place-items: center; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: white; }
.dataset-option input:checked + .dataset-option-check { border-color: var(--blue); background: var(--blue); }
.dataset-option input:checked + .dataset-option-check::after { content: "✓"; color: white; font-size: 12px; font-weight: 900; }
.dataset-option input:focus-visible + .dataset-option-check { outline: 3px solid rgba(39,121,246,.25); outline-offset: 2px; }
.dataset-option-copy, .dataset-option-copy > span { min-width: 0; display: block; }
.dataset-option-copy > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dataset-option-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dataset-option-copy b { flex: 0 0 auto; color: var(--blue-dark); font-size: 9px; }
.dataset-option-copy small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.dataset-option-copy em { display: block; margin-top: 7px; color: #7b8499; font-size: 9px; font-style: normal; font-weight: 650; }
.dataset-picker-empty { display: flex; align-items: center; gap: 11px; min-height: 74px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.68); }
.dataset-picker-empty[hidden] { display: none; }
.dataset-picker-empty > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #eaf2ff; }
.dataset-picker-empty strong, .dataset-picker-empty small { display: block; }
.dataset-picker-empty strong { color: var(--text); font-size: 11px; }
.dataset-picker-empty small { margin-top: 4px; font-size: 9px; }
.new-task-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px 22px; border-top: 1px solid var(--line); background: rgba(255,255,255,.88); }
.new-task-dialog-actions > span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
.new-task-dialog-actions kbd { min-width: 22px; padding: 3px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; text-align: center; background: white; font: inherit; }
.new-task-dialog-actions > div { display: flex; gap: 8px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, .9fr); gap: 20px; }
.main-stack, .side-stack { display: grid; align-content: start; gap: 20px; }
.tasks-panel, .attention-panel, .night-panel, .agents-panel { padding: 22px; }
.manager-panel { padding: 20px; display: grid; gap: 14px; }
.manager-identity { display: flex; align-items: center; gap: 12px; }
.manager-identity h2 { margin: 2px 0 0; font-size: 16px; }
.manager-symbol { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(135deg, var(--blue), #70aaff); box-shadow: 0 8px 22px rgba(39,121,246,.2); }
.manager-report { min-width: 0; display: grid; gap: 8px; padding-top: 13px; border-top: 1px solid var(--line); }
.manager-report p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.manager-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.manager-status i { width: 7px; height: 7px; border-radius: 50%; background: #91a1be; }
.manager-status.active { color: var(--blue); }
.manager-status.active i { background: var(--blue); box-shadow: 0 0 0 4px rgba(39,121,246,.1); }
.manager-status.attention { color: var(--coral); }
.manager-status.attention i { background: var(--coral); }
.manager-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.manager-actions .button { min-height: 38px; padding: 0 12px; font-size: 11px; }
.manager-actions .text-button { margin-left: auto; font-size: 11px; }
.section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-header.compact { margin-bottom: 12px; }
.section-header h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.section-kicker.coral { color: var(--coral); }
.section-kicker.violet { color: var(--violet); }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 5px; border-radius: 999px; background: #edf3ff; color: var(--blue); font-size: 12px; vertical-align: 2px; }
.count.attention { background: #fff0ee; color: var(--coral); }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 700; padding: 6px; }
.section-description { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.action-description, .task-section-description { display: block; }

.task-list { display: grid; gap: 10px; }
.task-row {
  display: grid; grid-template-columns: 42px minmax(150px,1fr) minmax(100px,.55fr) minmax(130px,.72fr) 76px;
  align-items: center; gap: 12px; min-height: 78px; padding: 12px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel-strong);
  box-shadow: inset 0 1px 0 white;
}
.task-row.completed { border-color: rgba(39,121,246,.18); background: rgba(243,248,255,.95); }
.task-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: white; font-weight: 800; }
.task-title { min-width: 0; }
.task-title strong, .task-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-title strong { font-size: 14px; }
.task-title span, .agent-cell span { color: var(--muted); font-size: 11px; }
.agent-cell { display: flex; align-items: center; gap: 7px; min-width: 0; }
.agent-mini { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; color: white; font-size: 10px; font-weight: 850; flex: none; }
.agent-cell span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-wrap { min-width: 0; }
.status-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.status-dot.waiting { background: var(--amber); }
.status-dot.review { background: var(--coral); }
.status-dot.done { background: var(--blue); }
.progress-track { height: 6px; background: #e7ebf3; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #66b3ff); }
.progress-value { color: var(--muted); font-size: 11px; float: right; margin-top: -18px; }
.task-result-summary { margin: 7px 0 0; overflow: hidden; color: var(--blue-dark); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.details-button { min-height: 36px; padding: 0 10px; border: 1px solid rgba(39,121,246,.25); border-radius: 10px; background: white; color: var(--blue); font-size: 11px; font-weight: 700; white-space: nowrap; }
.details-button.result { color: var(--blue-dark); border-color: rgba(39,121,246,.32); background: #f8fbff; }

.attention-list, .night-list { display: grid; gap: 8px; }
.attention-item, .night-item {
  display: grid; align-items: center; gap: 10px; padding: 11px; min-height: 60px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-strong);
}
.attention-item { grid-template-columns: 38px 1fr auto; min-height: 68px; padding: 12px; }
.attention-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff0ee; color: var(--coral); }
.attention-item strong, .night-item strong { display: block; font-size: 12px; }
.attention-item span, .night-item span { color: var(--muted); font-size: 10px; }
.attention-item button { border: 1px solid rgba(39,121,246,.22); color: var(--blue); background: white; border-radius: 10px; min-height: 34px; padding: 0 10px; font-size: 11px; font-weight: 750; }
.night-item { grid-template-columns: 34px 1fr auto; }
.night-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--violet); background: #f0edff; }
.night-time { color: var(--violet) !important; font-weight: 700; white-space: nowrap; }

.agents-panel { margin-top: 20px; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; }
.agents-panel > .section-header { display: block; margin: 0; }
.agents-panel .section-description { margin-top: 8px; line-height: 1.45; }
.agent-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 9px; }
.agent-card {
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-strong); min-height: 66px; padding: 10px;
  display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 9px; text-align: left;
  box-shadow: inset 0 1px 0 white; transition: transform .18s ease, box-shadow .18s ease;
}
.agent-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.agent-card .agent-symbol { width: 36px; height: 36px; border-radius: 11px; }
.agent-symbol { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: white; font-weight: 900; }
.agent-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.25; }
.agent-state { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.agent-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.agent-state.waiting::before { background: #91a1be; }
.agent-state.night::before { background: var(--violet); }

.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state > span { display: block; color: var(--blue); font-size: 28px; }
.empty-state strong { display: block; margin-top: 8px; color: var(--text); }
.empty-state p { margin: 6px 0 0; font-size: 12px; }
.mini-empty { padding: 22px 8px; text-align: center; color: var(--muted); font-size: 12px; }

.task-dialog { border: 0; padding: 0; background: transparent; width: min(1120px, calc(100vw - 48px)); max-width: none; height: min(900px, calc(100vh - 48px)); max-height: none; }
.task-dialog::backdrop { background: rgba(29,39,65,.28); backdrop-filter: blur(8px); }
.identity-dialog { width: min(560px, calc(100vw - 32px)); border: 0; padding: 0; background: transparent; }
.identity-dialog::backdrop { background: rgba(29,39,65,.28); backdrop-filter: blur(8px); }
.identity-dialog .dialog-body textarea { width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: white; font: inherit; line-height: 1.55; }
.identity-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.markdown-dialog { width: min(1120px, calc(100vw - 48px)); max-width: none; height: min(900px, calc(100vh - 48px)); max-height: none; border: 0; padding: 0; background: transparent; }
.markdown-dialog::backdrop { background: rgba(29,39,65,.35); backdrop-filter: blur(10px); }
.markdown-dialog-card { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid white; border-radius: 24px; background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(34,49,84,.28); }
.artifact-dialog-title { flex: 1; min-width: 0; }
.artifact-dialog-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.artifact-download-button { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; gap: 5px; border-radius: 11px; font-size: 11px; text-decoration: none; white-space: nowrap; }
.artifact-download-button[hidden] { display: none; }
.markdown-path { max-width: 800px; margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.markdown-body { overflow-y: auto; padding: 30px 36px 48px; }
.markdown-body pre { max-width: 880px; margin: 0 auto; color: #2e3d59; font-family: inherit; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.artifact-loading { color: var(--muted); text-align: center; }
.artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.artifact-entry { min-width: 0; min-height: 86px; padding: 12px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #fff; text-align: left; }
.artifact-entry:hover { border-color: rgba(39,121,246,.35); background: #f7faff; }
.artifact-entry img, .artifact-file-icon { width: 58px; height: 58px; flex: none; border-radius: 10px; object-fit: cover; }
.artifact-file-icon { display: grid; place-items: center; color: var(--blue); background: #edf4ff; font-size: 25px; }
.artifact-entry span:last-child { min-width: 0; }
.artifact-entry strong, .artifact-entry small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-entry strong { font-size: 11px; }
.artifact-entry small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.artifact-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.artifact-table { width: 100%; border-collapse: collapse; background: white; font-size: 11px; }
.artifact-table th, .artifact-table td { min-width: 110px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.artifact-table th { position: sticky; top: 0; z-index: 1; color: var(--blue-dark); background: #edf4ff; font-weight: 800; }
.artifact-image { display: grid; place-items: center; }
.artifact-image img { max-width: 100%; max-height: calc(100vh - 190px); border-radius: 14px; box-shadow: var(--shadow-soft); }
.artifact-html-frame { width: 100%; height: calc(100vh - 150px); min-height: 560px; display: block; border: 0; border-radius: 12px; background: white; }
.dialog-card { background: rgba(255,255,255,.94); border: 1px solid white; border-radius: 24px; box-shadow: 0 28px 80px rgba(34,49,84,.24); overflow: hidden; }
.task-dialog .dialog-card { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.dialog-header > div { min-width: 0; }
.dialog-header h2 { margin: 0; font-size: 23px; }
.dialog-header h2 { max-width: 100%; overflow-wrap: anywhere; }
.dialog-close { border: 0; background: #eef2f8; color: var(--muted); width: 36px; height: 36px; border-radius: 11px; font-size: 22px; }
.dialog-close { flex: 0 0 auto; }
.dialog-body { display: grid; gap: 18px; padding: 24px; }
.task-dialog .dialog-body { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 22px; padding: 28px 30px; overflow-y: auto; }
.task-dialog .task-original-brief,
.task-dialog .task-recurrence-detail,
.task-dialog .task-run-history,
.task-dialog .execution-steps,
.task-dialog .runner-notice,
.task-dialog .execution-result,
.task-dialog .task-interactions,
.task-dialog .task-question,
.task-dialog .task-schedule-plan,
.task-dialog .execution-log,
.task-dialog .task-meta { grid-column: 1 / -1; }
.dialog-body label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dialog-body input[type="text"], .dialog-body select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 12px; background: white; color: var(--text); }
.dialog-body input[type="range"] { width: 100%; accent-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.task-original-brief { padding: 18px 20px; border: 1px solid rgba(39,121,246,.18); border-radius: 15px; background: #f5f9ff; }
.task-original-brief > span, .execution-overview span, .execution-progress span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.task-original-brief > p { margin: 8px 0 0; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.task-original-brief > p.collapsed { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 10; line-clamp: 10; }
.task-original-toggle { min-height: 34px; margin-top: 10px; padding: 0 11px; border: 1px solid rgba(39,121,246,.2); border-radius: 9px; color: var(--blue-dark); background: rgba(255,255,255,.84); font-size: 10px; font-weight: 800; }
.task-original-toggle[hidden] { display: none; }
.task-original-toggle:hover { border-color: rgba(39,121,246,.38); background: white; }
.task-recurrence-detail { display: grid; gap: 12px; padding: 18px 20px; border: 1px solid rgba(116,90,248,.18); border-radius: 15px; background: #f8f6ff; }
.task-recurrence-detail[hidden] { display: none; }
.task-recurrence-detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.task-recurrence-detail-heading span { display: block; color: var(--violet); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.task-recurrence-detail-heading h3 { margin: 3px 0 0; font-size: 13px; }
.task-recurrence-detail-heading > small { color: var(--muted); font-size: 9px; line-height: 1.45; text-align: right; }
.task-recurrence-detail-list { display: grid; gap: 8px; }
.task-recurrence-detail-item { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid rgba(116,90,248,.14); border-radius: 12px; background: rgba(255,255,255,.82); }
.task-recurrence-detail-item strong, .task-recurrence-detail-item small { display: block; }
.task-recurrence-detail-item strong { font-size: 12px; }
.task-recurrence-detail-item small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.task-recurrence-detail-item > b { padding: 5px 8px; border-radius: 8px; color: var(--violet); background: #eeeaff; font-size: 9px; white-space: nowrap; }
.task-recurrence-detail-item > b.inactive { color: var(--muted); background: #edf0f5; }
.task-recurrence-detail-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.task-recurrence-detail-actions > b { padding: 5px 8px; border-radius: 8px; color: var(--violet); background: #eeeaff; font-size: 9px; white-space: nowrap; }
.task-recurrence-detail-actions > b.inactive { color: var(--muted); background: #edf0f5; }
.task-recurrence-detail-actions .button { min-height: 32px; padding: 0 10px; font-size: 9px; }
.task-run-history { display: grid; gap: 12px; padding-top: 2px; }
.task-run-history[hidden] { display: none; }
.task-run-history-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.task-run-history-heading span { display: block; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.task-run-history-heading h3 { margin: 3px 0 0; font-size: 13px; }
.task-run-history-heading > small { color: var(--muted); font-size: 9px; }
.task-run-history-list { display: grid; gap: 8px; }
.task-run-history-item { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.76); text-align: left; }
.task-run-history-item:hover { border-color: rgba(39,121,246,.3); background: #f7faff; }
.task-run-history-item strong, .task-run-history-item small, .task-run-history-item em { display: block; }
.task-run-history-item strong { font-size: 12px; }
.task-run-history-item small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.task-run-history-item em { display: -webkit-box; overflow: hidden; margin-top: 6px; color: #536078; font-size: 10px; font-style: normal; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-run-history-item > b { color: var(--blue); font-size: 10px; white-space: nowrap; }
.execution-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.execution-overview > div { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); }
.execution-overview strong { display: block; margin-top: 6px; font-size: 12px; }
.execution-progress > div { display: flex; justify-content: space-between; align-items: center; }
.execution-progress > div strong { color: var(--blue); font-size: 12px; }
.task-session-context { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); }
.task-session-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-session-heading span, .task-session-heading strong { display: block; }
.task-session-heading span { color: var(--muted); font-size: 11px; font-weight: 700; }
.task-session-heading strong { margin-top: 6px; font-size: 12px; line-height: 1.4; }
.task-session-usage { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 13px; }
.task-session-usage > strong { flex: 0 0 auto; font-size: 11px; }
.task-session-usage > small { color: var(--muted); font-size: 9px; line-height: 1.45; text-align: right; }
.task-session-context .agent-context-track { margin-bottom: 0; }
.execution-track { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #e5eaf3; }
.execution-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #6eb7ff); transition: width .2s ease; }
.execution-steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; }
.execution-steps li { position: relative; display: grid; justify-items: center; gap: 7px; color: #9aa5b8; font-size: 10px; font-weight: 700; }
.execution-steps li::before { content: ""; position: absolute; z-index: 0; top: 13px; right: 50%; width: 100%; height: 2px; background: #dce2ed; }
.execution-steps li:first-child::before { display: none; }
.execution-steps i { position: relative; z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #e7ebf3; color: #8794aa; font-style: normal; }
.execution-steps li.done, .execution-steps li.current { color: var(--text); }
.execution-steps li.done::before, .execution-steps li.current::before { background: rgba(39,121,246,.55); }
.execution-steps li.done i { color: white; background: var(--mint); }
.execution-steps li.current i { color: white; background: var(--blue); box-shadow: 0 0 0 5px rgba(39,121,246,.1); }
.runner-notice { margin: 0; padding: 12px 14px; border-radius: 12px; color: #526681; background: #eef5ff; font-size: 11px; line-height: 1.55; }
.runner-notice.waiting { color: #865e17; background: #fff7e7; }
.execution-result, .execution-log { padding-top: 2px; }
.execution-result h3, .execution-log h3 { margin: 0; font-size: 12px; }
.execution-result > div { max-height: 220px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); color: #34415a; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.task-dialog .execution-result > div { min-height: 150px; max-height: none; padding: 20px; font-size: 13px; line-height: 1.75; }
.md-file-link { display: inline-flex; align-items: center; gap: 5px; margin: 1px 2px; padding: 2px 7px; border: 0; border-radius: 7px; color: var(--blue-dark); background: #eaf3ff; font: inherit; font-weight: 750; text-align: left; text-decoration: underline; text-decoration-color: rgba(18,97,216,.3); text-underline-offset: 2px; }
.md-file-link:hover { background: #dcecff; }
.recovery-result > div { border-color: rgba(39,121,246,.2); background: #f2f7ff; }
.task-interactions { display: grid; gap: 12px; padding-top: 2px; }
.task-interaction-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.task-interaction-heading span { display: block; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.task-interaction-heading h3 { margin: 4px 0 0; font-size: 14px; }
.task-interaction-heading small { color: var(--muted); font-size: 10px; }
.task-interaction-list { display: grid; gap: 10px; }
.task-interaction-item { width: min(88%, 760px); padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px 15px 15px 5px; background: rgba(255,255,255,.78); }
.task-interaction-item.user { justify-self: end; border-color: rgba(39,121,246,.2); border-radius: 15px 15px 5px 15px; background: #eef6ff; }
.task-interaction-item.manager { border-color: rgba(125,90,220,.2); background: #f7f3ff; }
.task-interaction-item.system { background: #f5f6f9; }
.task-interaction-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.task-interaction-meta strong { color: var(--text); font-size: 10px; }
.task-interaction-meta b { padding: 2px 6px; border-radius: 99px; color: #6d5aa7; background: rgba(125,90,220,.1); font-size: 8px; }
.task-interaction-content { color: #34415a; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-interaction-content.collapsed { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 10; line-clamp: 10; }
.task-interaction-toggle { min-height: 30px; margin-top: 9px; padding: 0 10px; border: 1px solid rgba(39,121,246,.18); border-radius: 8px; color: var(--blue-dark); background: rgba(255,255,255,.82); font-size: 9px; font-weight: 800; }
.task-interaction-toggle[hidden] { display: none; }
.task-interaction-toggle:hover { border-color: rgba(39,121,246,.34); background: white; }
.task-interaction-empty { margin: 0; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); font-size: 11px; text-align: center; }
.task-question { position: relative; display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(255,101,88,.22); border-radius: 14px; background: #fff8f6; }
.task-question[hidden] { display: none; }
.task-question.follow-up { border-color: rgba(39,121,246,.2); background: #f3f8ff; }
.task-question.follow-up > div span { color: var(--blue); }
.task-question > div span { display: block; color: var(--coral); font-size: 11px; font-weight: 800; }
.task-question > div strong { display: block; margin-top: 6px; color: var(--text); font-size: 13px; line-height: 1.55; }
.task-question textarea { width: 100%; resize: vertical; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px; background: white; color: var(--text); font: inherit; line-height: 1.5; }
.task-question .button { justify-self: end; }
.task-schedule-plan { display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(39,121,246,.2); border-radius: 14px; background: #f3f8ff; }
.task-schedule-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-schedule-heading span, .task-schedule-heading strong { display: block; }
.task-schedule-heading span { color: var(--blue); font-size: 11px; font-weight: 800; }
.task-schedule-heading strong { margin-top: 5px; font-size: 13px; }
.task-schedule-heading small { color: var(--muted); font-size: 10px; }
.task-schedule-list { display: grid; gap: 7px; }
.task-schedule-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.task-schedule-list > .task-schedule-review { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
.task-schedule-list strong, .task-schedule-list small { display: block; }
.task-schedule-list strong { font-size: 11px; }
.task-schedule-list p { margin: 7px 0 0; color: #43516a; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.task-schedule-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.task-schedule-list button, .schedule-cancel { flex: none; border: 0; border-radius: 8px; color: var(--coral); background: #fff0ee; font-size: 10px; }
.task-schedule-list button { min-height: 32px; padding: 0 10px; }
.schedule-cancel { width: 30px; height: 30px; font-size: 16px; }
.night-symbol.planned { color: var(--blue); background: #eaf3ff; }
.execution-log-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.execution-log-heading span { display: block; margin-bottom: 3px; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.execution-log-heading small { color: var(--muted); font-size: 10px; }
.execution-log ul { max-height: 220px; overflow: auto; margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.task-dialog .execution-log ul { max-height: 360px; }
.execution-log li { position: relative; display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 12px; padding: 11px 13px 11px 16px; border: 1px solid transparent; border-radius: 11px; background: rgba(241,244,250,.75); font-size: 10px; }
.execution-log li::before { content: ""; position: absolute; top: 11px; bottom: 11px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: #bac4d5; }
.execution-log li.running::before { background: var(--blue); }
.execution-log li.success::before { background: var(--mint); }
.execution-log li.error { border-color: rgba(255,101,88,.18); background: #fff7f5; }
.execution-log li.error::before { background: var(--coral); }
.execution-log li.waiting::before { background: #e5a52f; }
.execution-log-meta { display: flex; align-items: center; align-content: flex-start; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.execution-log-meta b { padding: 3px 6px; border-radius: 99px; color: #53627b; background: rgba(75,91,119,.1); font-size: 8px; }
.execution-log li.running .execution-log-meta b { color: var(--blue-dark); background: #e6f1ff; }
.execution-log li.success .execution-log-meta b { color: #277b65; background: #e5f7f1; }
.execution-log li.error .execution-log-meta b { color: #ae4439; background: #ffe7e3; }
.execution-log-meta time { color: #65728a; font-variant-numeric: tabular-nums; }
.execution-log-meta small { flex-basis: 100%; color: var(--muted); font-size: 9px; }
.execution-log-content { min-width: 0; }
.execution-log-content strong, .execution-log-content small { display: block; overflow-wrap: anywhere; }
.execution-log-content strong { color: #34415a; font-size: 10px; line-height: 1.5; }
.execution-log-content small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.execution-log li.empty { grid-template-columns: 1fr; border: 1px dashed var(--line-strong); text-align: center; }
.execution-log li.empty::before { display: none; }
.task-meta { padding: 12px; border-radius: 12px; background: #f2f5fb; color: var(--muted); font-size: 11px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; padding: 18px 24px 24px; }
.dialog-actions > div { display: flex; gap: 8px; }
.group-chat-form-error { margin: 0; padding: 10px 12px; border: 1px solid rgba(223,108,100,.25); border-radius: 10px; color: #a23e36; background: #fff4f2; font-size: 11px; font-weight: 700; line-height: 1.5; }

.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 50; transform: translate(-50%, 24px); opacity: 0;
  padding: 13px 18px; border-radius: 14px; background: rgba(21,33,61,.92); color: white; box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease; pointer-events: none; font-size: 13px; font-weight: 650;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-view { animation: view-in .24s ease; }
.app-view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.subpage-header { align-items: center; margin-bottom: 28px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.summary-card { min-height: 130px; padding: 20px; position: relative; overflow: hidden; }
.summary-card::after { content: ""; position: absolute; width: 84px; height: 84px; right: -22px; bottom: -30px; border-radius: 50%; background: rgba(39,121,246,.09); }
.summary-card > span, .summary-card > small { display: block; color: var(--muted); font-size: 12px; }
.summary-card > strong { display: block; margin: 8px 0 3px; font-size: 34px; letter-spacing: -.04em; }
.summary-card.blue > strong { color: var(--blue); }
.summary-card.violet > strong { color: var(--violet); }
.summary-card.green > strong { color: var(--mint); }
.summary-card.violet::after { background: rgba(116,90,248,.09); }
.summary-card.green::after { background: rgba(24,185,119,.09); }
.page-panel { padding: 20px; }
.project-overview-panel { margin-bottom: 24px; }
.project-overview-panel .section-header { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.project-overview-panel select { max-width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--panel-strong); color: var(--text); }
.project-overview-area { margin-top: 24px; }
.project-overview-area h3 { font-size: 20px; }
.project-overview-area small { color: var(--muted); font-size: 12px; font-weight: 400; }
.project-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-overview-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-strong); line-height: 1.65; overflow-wrap: anywhere; }
.project-overview-heading { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: flex-start; }
.project-overview-heading h4 { margin: 0; font-size: 17px; }
.project-overview-status { font-size: 12px; color: var(--blue-dark); }
.project-overview-status.waiting { color: var(--coral); }
.project-overview-status.complete { color: var(--text); }
.project-overview-card h5 { margin: 16px 0 8px; font-size: 14px; }
.project-overview-card p { margin: 8px 0; }
.project-overview-card textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.project-overview-card ul { margin: 8px 0; padding-left: 20px; }
.project-overview-card li + li { margin-top: 8px; }
.project-overview-actions, .project-overview-references { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.project-overview-card summary { cursor: pointer; margin-top: 16px; color: var(--blue-dark); }
.project-overview-live { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; font-size: 13px; }
@media (max-width: 820px) { .project-overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .project-overview-panel .section-header > label { width: 100%; } .project-overview-panel select { width: 100%; } .project-overview-card { padding: 16px; } }
.task-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(145px, auto)); gap: 10px; margin-bottom: 16px; }
.task-toolbar select, .task-toolbar input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.82); padding: 0 12px; }
.search-field { position: relative; }
.search-field > span { position: absolute; left: 14px; top: 10px; color: var(--muted); font-size: 20px; }
.search-field input { padding-left: 42px; }
.all-task-list { display: grid; }
.all-task-row { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; min-height: 82px; padding: 13px 8px; display: grid; grid-template-columns: 42px minmax(210px,1.5fr) 100px 110px minmax(120px,.7fr) 22px; align-items: center; gap: 14px; color: var(--text); text-align: left; }
.all-task-row:first-child { border-top: 0; }
.all-task-row:hover { background: rgba(255,255,255,.58); }
.schedule-toolbar { display: grid; grid-template-columns: minmax(240px,1fr) repeat(2, minmax(160px, auto)); gap: 10px; margin-bottom: 16px; }
.schedule-toolbar select, .schedule-toolbar input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.82); padding: 0 12px; }
.schedule-calendar-toolbar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.schedule-period-controls { display: flex; align-items: center; gap: 7px; min-width: 0; }
.schedule-period-controls h2 { margin: 0 0 0 8px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-nav-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: #4b5870; background: rgba(255,255,255,.76); font-size: 22px; cursor: pointer; }
.calendar-nav-button:hover { border-color: rgba(39,121,246,.3); color: var(--blue); background: white; }
.schedule-today-button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.schedule-view-switcher { flex: none; display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #f1f4f9; }
.schedule-view-switcher button { min-width: 52px; min-height: 31px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; }
.schedule-view-switcher button.active { color: var(--blue-dark); background: white; box-shadow: 0 2px 8px rgba(35,53,88,.1); }
.schedule-calendar-help { display: flex; align-items: center; gap: 7px; margin: 10px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.schedule-calendar-help span { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: var(--blue); background: #eaf3ff; font-weight: 850; }
.schedule-calendar { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.72); }
.schedule-month-grid { min-width: 760px; display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.schedule-month-weekday { min-height: 34px; display: grid; place-items: center; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7f9fc; font-size: 9px; font-weight: 800; }
.schedule-month-weekday:first-child { color: #c85b54; }
.schedule-month-weekday:nth-child(7) { color: var(--blue); }
.schedule-month-day { position: relative; min-height: 116px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.58); transition: background .14s ease, box-shadow .14s ease; }
.schedule-month-day:nth-child(7n + 7) { border-right: 0; }
.schedule-month-day:nth-last-child(-n + 7) { border-bottom: 0; }
.schedule-month-day.outside { background: rgba(245,247,251,.55); }
.schedule-month-day.outside .schedule-month-date { color: #a8b0bf; }
.schedule-month-day.today .schedule-month-date { color: white; background: var(--blue); }
.schedule-month-day.selected { box-shadow: inset 0 0 0 2px rgba(39,121,246,.58); background: #f6faff; }
.schedule-month-day.drop-active, .schedule-week-slot.drop-active { background: #e6f2ff; box-shadow: inset 0 0 0 2px var(--blue); }
.schedule-month-date { width: 26px; height: 26px; display: grid; place-items: center; margin: 0 0 5px auto; padding: 0; border: 0; border-radius: 8px; color: #4c5870; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.schedule-month-events { display: grid; gap: 3px; }
.schedule-calendar-event { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 5px 6px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--schedule-color) 24%, white); border-left: 3px solid var(--schedule-color); border-radius: 7px; color: #33415a; background: color-mix(in srgb, var(--schedule-color) 9%, white); font-size: 8px; line-height: 1.25; cursor: grab; }
.schedule-calendar-event:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.schedule-calendar-event.dragging { opacity: .42; cursor: grabbing; }
.schedule-calendar-event.projected { border-style: dashed; color: #65728a; background: color-mix(in srgb, var(--schedule-color) 5%, white); cursor: default; }
.schedule-calendar-event.random-time:not(.projected) { cursor: pointer; }
.schedule-calendar.is-dragging .schedule-calendar-event:not(.dragging) { pointer-events: none; }
.schedule-calendar-event time { flex: none; color: var(--schedule-color); font-weight: 850; font-variant-numeric: tabular-nums; }
.schedule-calendar-event span { min-width: 0; overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.schedule-calendar-event b { margin-left: auto; color: var(--schedule-color); font-size: 9px; }
.schedule-calendar-event.approval { border-color: #efcc91; border-left-color: #e79a27; background: #fff8ea; }
.schedule-calendar-event.approval time { color: #ad6915; }
.schedule-calendar-event.history { cursor: pointer; }
.schedule-calendar-event.history.success { --schedule-color: #25845c !important; border-color: #b9dfcd; background: #eef9f3; }
.schedule-calendar-event.history.failure { --schedule-color: #c65656 !important; border-color: #eac2c2; background: #fff2f2; }
.schedule-calendar-event.history b { padding: 1px 4px; border-radius: 5px; color: white; background: var(--schedule-color); font-size: 7px; }
.schedule-more-events { margin-top: 4px; padding: 2px 4px; border: 0; color: var(--blue); background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }
.schedule-week-scroll { max-height: 620px; min-width: 820px; overflow: auto; }
.schedule-week-header { position: sticky; z-index: 8; top: 0; display: grid; grid-template-columns: 56px repeat(7,minmax(100px,1fr)); border-bottom: 1px solid var(--line); background: rgba(249,251,254,.96); backdrop-filter: blur(10px); }
.schedule-week-day { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px; border: 0; border-left: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; }
.schedule-week-day span { font-size: 9px; font-weight: 750; }
.schedule-week-day strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #33415a; font-size: 11px; }
.schedule-week-day.today strong { color: white; background: var(--blue); }
.schedule-week-day.selected { background: #edf5ff; }
.schedule-week-grid { position: relative; display: grid; grid-template-columns: 56px repeat(7,minmax(100px,1fr)); grid-template-rows: repeat(48,28px); background: white; }
.schedule-week-time { z-index: 1; padding: 4px 8px 0 0; color: #8d97a8; background: #fbfcfe; font-size: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.schedule-week-slot { border-top: 1px solid #edf0f5; border-left: 1px solid #edf0f5; background: rgba(255,255,255,.65); }
.schedule-week-slot:nth-child(odd) { border-top-color: #f5f6f9; }
.schedule-calendar-event.week { z-index: 3; align-self: start; min-height: 26px; margin: 1px 3px; padding: 4px 5px; box-shadow: 0 2px 6px rgba(35,53,88,.1); }
.schedule-agenda-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 0 6px 12px; border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.schedule-agenda-heading span { display: block; color: var(--blue); font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.schedule-agenda-heading h2 { margin: 4px 0 0; font-size: 15px; }
.schedule-agenda-heading > strong { color: var(--muted); font-size: 10px; }
.schedule-timeline { display: grid; }
.schedule-row { min-height: 86px; padding: 14px 8px; display: grid; grid-template-columns: 120px 42px minmax(220px,1fr) 100px auto; gap: 12px 14px; align-items: center; border-top: 1px solid var(--line); }
.schedule-row:first-child { border-top: 0; }
.schedule-row:hover { background: rgba(255,255,255,.52); }
.schedule-row.projected { background: rgba(247,249,253,.58); }
.schedule-row.history.success { box-shadow: inset 3px 0 #25845c; }
.schedule-row.history.failure { box-shadow: inset 3px 0 #c65656; }
.schedule-date strong, .schedule-date span { display: block; }
.schedule-date strong { font-size: 11px; }
.schedule-date span { margin-top: 5px; color: var(--blue); font-size: 12px; font-weight: 800; }
.schedule-agent-symbol { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: white; font-weight: 850; }
.schedule-row-main { min-width: 0; }
.schedule-row-main strong, .schedule-row-main button { display: block; width: 100%; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 800; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.schedule-row-main button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.schedule-row-main button:hover { color: var(--blue); }
.schedule-row-main small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.schedule-row-main p { margin: 8px 0 0; color: #43516a; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.schedule-objective b, .task-schedule-review p b { margin-right: 5px; color: var(--blue); font-size: 9px; }
.schedule-row-main .schedule-history-summary { padding: 8px 10px; border-radius: 9px; background: #f6f8fb; color: #4c5870; font-size: 10px; }
.schedule-row.history.success .schedule-history-summary b { color: #25845c; }
.schedule-row.history.failure .schedule-history-summary b { color: #b94343; }
.schedule-content-preview, .schedule-work-detail { margin-top: 10px; overflow: hidden; border: 1px solid #dbe5f3; border-radius: 11px; background: #fff; }
.schedule-copy-preview { padding: 11px 12px; }
.schedule-copy-preview > span, .schedule-media-preview > span, .schedule-work-detail > span { display: block; margin-bottom: 6px; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.schedule-copy-preview p, .schedule-work-detail p { margin: 0; color: #1f2b3f; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.schedule-copy-editor { display: grid; gap: 10px; padding: 12px; border-top: 1px solid #edf1f7; background: #fbfdff; }
.schedule-copy-editor label { display: grid; gap: 6px; }
.schedule-copy-editor label > span { color: var(--blue); font-size: 9px; font-weight: 850; }
.schedule-copy-editor label > span small { color: var(--muted); font-size: 8px; font-weight: 650; }
.schedule-copy-editor textarea { width: 100%; min-height: 76px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: #1f2b3f; background: white; font: inherit; font-size: 11px; line-height: 1.6; }
.schedule-copy-editor label + label textarea { min-height: 54px; }
.schedule-copy-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.schedule-copy-editor-actions > small { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.schedule-row-main .schedule-copy-editor-actions .button, .task-schedule-list .schedule-copy-editor-actions .button { width: auto; min-height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 11px; overflow: visible; border: 1px solid rgba(39,121,246,.2); border-radius: 9px; color: var(--blue-dark); background: #eef5ff; font-size: 9px; font-weight: 800; text-overflow: clip; white-space: nowrap; }
.schedule-work-detail { padding: 11px 12px; }
.schedule-media-preview { padding: 10px 12px 12px; border-top: 1px solid #edf1f7; }
.schedule-media-preview > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 7px; }
.schedule-media-preview button { position: relative; min-width: 0; aspect-ratio: 1 / 1; overflow: hidden; padding: 0; border: 1px solid #dbe5f3; border-radius: 9px; background: #f4f7fb; cursor: pointer; }
.schedule-media-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.schedule-media-preview b { position: absolute; z-index: 1; top: 5px; left: 5px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; color: white; background: rgba(24,39,66,.82); font-size: 9px; }
.schedule-content-notes { display: block; padding: 8px 12px; border-top: 1px solid #edf1f7; color: var(--muted); font-size: 9px; line-height: 1.5; }
.schedule-artifacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.schedule-artifacts button { width: auto; padding: 5px 8px; overflow: hidden; border: 1px solid #d8e5fb; border-radius: 7px; color: var(--blue); background: #f6f9ff; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.schedule-kind { width: max-content; padding: 6px 9px; border-radius: 999px; color: #6350c9; background: #f2efff; font-size: 9px; font-weight: 800; }
.schedule-kind.night { color: #6047d7; background: #f4f1ff; }
.schedule-kind.approval { color: #b25b14; background: #fff3df; }
.schedule-kind.history.success { color: #176c49; background: #e7f7ef; }
.schedule-kind.history.failure { color: #ad3f3f; background: #fdeaea; }
.schedule-history-open { color: var(--blue); }
.schedule-history-record { padding: 7px 9px; border-radius: 8px; color: var(--muted); background: #f2f4f7; font-size: 9px; font-weight: 750; white-space: nowrap; }
.schedule-remove { min-height: 34px; padding: 0 11px; color: var(--coral); font-size: 9px; }
.schedule-review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.schedule-review-actions .button { min-height: 34px; padding: 0 11px; font-size: 9px; }
.schedule-approved { padding: 7px 9px; border-radius: 8px; color: #16734c; background: #eaf8f1; font-size: 9px; font-weight: 800; white-space: nowrap; }
.schedule-projected-note { padding: 7px 9px; border: 1px dashed #b9c5d8; border-radius: 8px; color: #65728a; background: #f4f6fa; font-size: 9px; font-weight: 750; white-space: nowrap; }
.schedule-comment-box { grid-column: 3 / -1; display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 8px; align-items: stretch; }
.schedule-comment-box textarea { min-height: 54px; resize: vertical; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: rgba(255,255,255,.82); font: inherit; font-size: 10px; line-height: 1.45; }
.schedule-comment-box .button { min-height: 38px; align-self: stretch; padding: 0 12px; color: var(--blue); font-size: 9px; }
.schedule-move-dialog { width: min(520px, calc(100vw - 32px)); }
.schedule-edit-dialog { width: min(620px, calc(100vw - 32px)); }
.schedule-move-dialog .dialog-header p:last-child, .schedule-edit-dialog .dialog-header p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.schedule-move-body input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text); background: white; font: inherit; }
.schedule-move-note { margin: 12px 0 0; padding: 11px 12px; border-radius: 10px; color: #745415; background: #fff6e6; font-size: 10px; line-height: 1.5; }
.schedule-edit-body { display: grid; gap: 16px; }
.schedule-edit-body > label, .schedule-edit-grid > label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.schedule-edit-body input, .schedule-edit-body select { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: white; font: inherit; }
.schedule-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.schedule-edit-interval { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
.schedule-edit-interval small { min-width: 46px; color: var(--muted); font-size: 9px; }
.schedule-edit-preview { margin: 0; padding: 11px 12px; border: 1px solid rgba(39,121,246,.18); border-radius: 10px; color: var(--blue-dark); background: #eef5ff; font-size: 10px; font-weight: 750; line-height: 1.5; }
.task-schedule-review > .schedule-comment-box { grid-column: 1 / -1; width: 100%; }
.all-task-main strong, .all-task-main small { display: block; }
.all-task-main { min-width: 0; }
.all-task-main strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.all-task-main small { color: var(--muted); margin-top: 5px; font-size: 10px; }
.mode-pill, .status-pill { justify-self: start; padding: 7px 9px; border-radius: 9px; color: var(--blue-dark); background: #edf4ff; font-size: 11px; font-weight: 750; white-space: nowrap; }
.mode-pill.night { color: var(--violet); background: #f1eeff; }
.status-pill { color: var(--text); background: transparent; }
.status-pill i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--mint); }
.status-pill.waiting i { background: #91a1be; }
.status-pill.review i { background: var(--coral); }
.status-pill.done i { background: var(--blue); }
.row-progress { display: flex; align-items: center; gap: 8px; }
.row-progress > span { flex: 1; height: 5px; overflow: hidden; border-radius: 99px; background: #e5eaf3; }
.row-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #6eb7ff); }
.row-progress b { min-width: 30px; color: var(--muted); font-size: 10px; }
.row-arrow { color: #94a0b5; font-size: 24px; }

.common-prompt-manager { margin-bottom: 18px; padding: 24px; }
.common-prompt-manager-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.common-prompt-manager-header h2 { margin: 3px 0 0; font-size: 19px; }
.common-prompt-manager-header p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.common-prompt-scope { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.common-prompt-scope span { padding: 6px 9px; border-radius: 999px; color: var(--blue-dark); background: #eaf3ff; font-size: 9px; font-weight: 800; }
.common-prompt-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 18px; margin-top: 18px; }
.common-prompt-workspace { min-width: 0; }
.common-prompt-workspace > label { display: block; margin-bottom: 8px; color: var(--text); font-size: 11px; font-weight: 800; }
.common-prompt-workspace textarea { width: 100%; min-height: 330px; resize: vertical; padding: 14px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--text); background: rgba(255,255,255,.9); font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.common-prompt-workspace textarea:focus { border-color: rgba(39,121,246,.55); outline: 3px solid rgba(39,121,246,.12); }
.common-prompt-editor-meta { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.common-prompt-editor-meta strong { flex: 0 0 auto; color: #536078; font-size: 9px; }
.common-prompt-actions { display: flex; justify-content: flex-end; gap: 8px; }
.common-prompt-actions .button { min-height: 40px; }
.common-prompt-reference { min-width: 0; padding: 15px; border: 1px solid rgba(39,121,246,.18); border-radius: 14px; background: rgba(237,245,255,.68); }
.common-prompt-reference h3 { margin: 0; font-size: 13px; }
.common-prompt-reference > div:first-child > p { margin: 6px 0 13px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.common-prompt-reference code, .common-prompt-variable code { color: var(--blue-dark); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.common-prompt-variable-list { display: grid; gap: 8px; }
.common-prompt-variable { padding: 11px; border: 1px solid rgba(39,121,246,.13); border-radius: 11px; background: rgba(255,255,255,.76); }
.common-prompt-variable > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.common-prompt-variable code { overflow-wrap: anywhere; font-size: 9px; font-weight: 800; }
.common-prompt-variable strong { flex: 0 0 auto; color: #536078; font-size: 9px; }
.common-prompt-variable p { margin: 7px 0; color: #536078; font-size: 9px; line-height: 1.5; }
.common-prompt-variable small { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; line-height: 1.45; }
.common-prompt-variable small span { margin-right: 6px; color: var(--blue); font-weight: 800; }
.common-prompt-reference-note { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid rgba(39,121,246,.12); color: var(--muted); font-size: 8px; line-height: 1.5; }
.agent-page-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.agent-page-card { min-height: 116px; padding: 16px; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; background: rgba(255,255,255,.58); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; gap: 12px; color: var(--text); text-align: left; }
.agent-page-card:hover, .agent-page-card.selected { background: rgba(255,255,255,.9); box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(39,121,246,.2); transform: translateY(-2px); }
.agent-page-card.manager { background: linear-gradient(145deg, rgba(237,245,255,.94), rgba(255,255,255,.72)); box-shadow: inset 0 0 0 1px rgba(39,121,246,.18); }
.agent-page-card.manager.selected { box-shadow: var(--shadow-soft), inset 0 0 0 2px rgba(39,121,246,.42); }
.agent-page-card strong, .agent-page-card small { display: block; }
.agent-page-card strong { font-size: 13px; }
.agent-page-card small { margin-top: 7px; color: var(--muted); font-size: 10px; }
.manager-card-badge { display: inline-flex; margin-left: 6px; padding: 2px 5px; border-radius: 999px; color: var(--blue); background: #e5f0ff; font-size: 8px; font-style: normal; vertical-align: 1px; }
.agent-detail-panel { padding: 26px; }
.agent-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.agent-detail-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; }
.agent-detail-actions .button { white-space: nowrap; }
.agent-detail-identity { min-width: 0; flex: 1; display: flex; align-items: center; gap: 16px; }
.agent-detail-symbol { flex: 0 0 auto; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: white; font-size: 22px; font-weight: 900; }
.agent-detail-identity h2 { margin: 0; font-size: 24px; }
.agent-detail-identity p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.agent-detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 620px; margin: 24px 0; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.48); }
.agent-detail-metrics > div { padding: 16px 20px; border-left: 1px solid var(--line); }
.agent-detail-metrics > div:first-child { border-left: 0; }
.agent-detail-metrics span, .agent-detail-metrics strong { display: block; }
.agent-detail-metrics span { color: var(--muted); font-size: 10px; }
.agent-detail-metrics strong { margin-top: 5px; font-size: 23px; }
.manager-live-panel { margin: -4px 0 24px; padding: 17px; border: 1px solid rgba(39,121,246,.2); border-radius: 14px; background: linear-gradient(145deg, rgba(239,246,255,.92), rgba(255,255,255,.72)); }
.manager-live-panel[hidden] { display: none; }
.manager-live-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.manager-live-heading h3 { margin: 2px 0 0; font-size: 14px; }
.manager-live-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 800; }
.manager-live-state i { width: 7px; height: 7px; border-radius: 50%; background: #91a1be; }
.manager-live-state.active { color: var(--blue); }
.manager-live-state.active i { background: var(--blue); box-shadow: 0 0 0 4px rgba(39,121,246,.1); }
.manager-live-state.attention { color: var(--coral); }
.manager-live-state.attention i { background: var(--coral); }
.manager-live-task { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid rgba(39,121,246,.16); border-radius: 12px; color: var(--text); text-align: left; background: rgba(255,255,255,.8); cursor: pointer; }
.manager-live-task:hover { border-color: rgba(39,121,246,.34); background: white; }
.manager-live-main { min-width: 0; }
.manager-live-main > strong, .manager-live-main > span, .manager-live-main > small { display: block; }
.manager-live-main > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.manager-live-main > span { margin-top: 8px; color: #526079; font-size: 11px; line-height: 1.5; }
.manager-live-main > small { margin-top: 7px; color: var(--muted); font-size: 9px; }
.manager-live-progress { width: 116px; align-self: center; }
.manager-live-progress > span { height: 7px; display: block; overflow: hidden; border-radius: 999px; background: #dfe8f7; }
.manager-live-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #66aeff); transition: width .25s ease; }
.manager-live-progress b { display: block; margin-top: 7px; color: var(--blue-dark); font-size: 11px; text-align: right; }
.manager-live-empty { margin: 14px 0 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 11px; line-height: 1.55; background: rgba(255,255,255,.54); }
.agent-context-panel { margin: -4px 0 24px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.54); }
.agent-context-copy, .agent-context-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.agent-context-copy h3 { margin: 2px 0 0; font-size: 13px; }
.agent-context-copy > strong { font-size: 13px; }
.agent-context-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; }
.agent-context-list > .agent-empty { grid-column: 1 / -1; }
.agent-context-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.74); }
.agent-context-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.agent-context-card-heading > span { min-width: 0; }
.agent-context-card-heading strong, .agent-context-card-heading small { display: block; }
.agent-context-card-heading strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agent-context-card-heading small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.context-state, .task-session-heading > b { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #6d788d; background: #edf0f5; font-size: 8px; }
.context-state.active, .task-session-heading > b.active { color: #187455; background: #e5f7ef; }
.context-state.warning, .task-session-heading > b.warning { color: #8a5e0c; background: #fff3d8; }
.context-state.danger, .task-session-heading > b.danger { color: #a33b31; background: #ffe8e4; }
.context-state.fresh, .task-session-heading > b.fresh { color: var(--blue-dark); background: #e7f1ff; }
.agent-context-card-value { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 13px; }
.agent-context-card-value strong { font-size: 11px; }
.agent-context-card-value span { color: var(--muted); font-size: 8px; text-align: right; }
.agent-context-track { height: 7px; overflow: hidden; margin: 12px 0 9px; border-radius: 999px; background: #e5eaf3; }
.agent-context-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #64b5ff); transition: width .25s ease; }
.agent-context-track i.warning { background: linear-gradient(90deg, #f2ad38, #f7c75e); }
.agent-context-track i.danger { background: linear-gradient(90deg, #f06b5f, #ff967b); }
.agent-context-track i.fresh { background: #80aef5; }
.context-session-list { display: grid; gap: 6px; padding-top: 2px; }
.context-session-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 7px; border-top: 1px solid var(--line); }
.context-session-list span { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.context-session-list strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.context-session-list small { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.context-session-actions { flex: 0 0 auto; justify-content: flex-end; }
.context-session-actions > b { flex: 0 0 auto; color: #526079; font-size: 9px; }
.context-new-session { min-height: 34px; padding: 0 10px; border: 1px solid rgba(39,121,246,.24); border-radius: 9px; color: var(--blue-dark); background: #eef5ff; font-size: 10px; font-weight: 750; }
.context-new-session:hover:not(:disabled) { border-color: rgba(39,121,246,.42); background: #e4efff; }
.context-new-session:disabled { cursor: not-allowed; color: #929bae; border-color: var(--line); background: #f0f2f6; }
.context-session-empty { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.agent-context-foot span, .agent-context-foot small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.agent-context-foot small { text-align: right; }
.agent-detail-columns { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; }
.agent-detail-columns h3 { margin: 0 0 12px; font-size: 14px; }
.agent-work-heading { min-height: 27px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-work-heading h3 { margin: 0; }
.agent-cancelled-toggle { min-height: 27px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: #667085; background: rgba(255,255,255,.72); font-size: 9px; font-weight: 750; }
.agent-cancelled-toggle:hover { color: var(--text); border-color: #c7d2e5; background: #fff; }
.agent-cancelled-toggle b { display: inline-flex; min-width: 17px; height: 17px; margin-left: 3px; align-items: center; justify-content: center; border-radius: 999px; color: #68758a; background: #e9edf4; font-size: 8px; }
.agent-cancelled-panel { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.compact-task-list { display: grid; gap: 8px; }
.compact-task-list .compact-task-entry { width: 100%; min-height: 58px; margin: 0; padding: 10px 13px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.7); color: var(--text); text-align: left; }
.compact-task-list button.compact-task-entry { cursor: pointer; }
.compact-task-list .compact-task-entry > span { min-width: 0; flex: 1; }
.compact-task-list strong, .compact-task-list small { display: block; }
.compact-task-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-task-list small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.compact-task-list b { flex: 0 0 auto; margin-left: 12px; color: var(--blue); font-size: 11px; }
.compact-task-list .manager-activity-entry { align-items: flex-start; }
.compact-task-list .manager-activity-entry > span { min-width: 0; }
.compact-task-list .manager-activity-entry em { display: -webkit-box; overflow: hidden; margin-top: 7px; color: #526079; font-size: 10px; font-style: normal; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.compact-task-list b.attention { color: var(--coral); }
.agent-cancelled-panel .compact-task-entry { background: rgba(245,247,250,.76); }
.agent-cancelled-panel .compact-task-entry > b { color: #7b8493; }
.activity-kind { display: inline-flex; margin-right: 7px; padding: 2px 6px; border-radius: 999px; color: #6047d7; background: #f0edff; font-size: 8px; font-style: normal; vertical-align: 1px; }
.activity-kind.direct { color: var(--blue); background: #eaf3ff; }
.agent-empty { margin: 0; padding: 20px; border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.5); text-align: center; font-size: 11px; }
.agent-info-list { margin: 0; display: grid; gap: 8px; }
.agent-info-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.agent-info-list dt { color: var(--muted); font-size: 11px; }
.agent-info-list dd { margin: 0; text-align: right; font-size: 11px; font-weight: 700; }
.agent-memory-section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.agent-memory-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.agent-memory-heading h3 { margin: 2px 0 0; font-size: 15px; }
.agent-memory-heading-actions { display: flex; align-items: center; gap: 9px; }
.agent-memory-heading-actions > span { color: var(--muted); font-size: 10px; }
.agent-memory-heading-actions .button { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 10px; }
.agent-memory-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agent-memory-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.68); }
.agent-memory-meta { display: flex; align-items: center; gap: 7px; }
.agent-memory-meta span, .agent-memory-meta b { padding: 3px 7px; border-radius: 999px; color: #6047d7; background: #f0edff; font-size: 8px; font-weight: 800; }
.agent-memory-meta b { color: var(--blue); background: #eaf3ff; }
.agent-memory-meta i { margin-left: auto; color: #7897c9; font-size: 8px; font-style: normal; letter-spacing: 1px; }
.agent-memory-card h4 { margin: 10px 0 5px; font-size: 12px; }
.agent-memory-card p { display: -webkit-box; overflow: hidden; margin: 0; color: #526079; font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.agent-memory-card small { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; }

.memory-dialog { width: min(1120px, calc(100vw - 48px)); max-width: none; height: min(820px, calc(100dvh - 48px)); max-height: none; padding: 0; border: 0; background: transparent; }
.memory-dialog::backdrop { background: rgba(29,39,65,.32); backdrop-filter: blur(9px); }
.memory-dialog-card { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden; border: 1px solid white; border-radius: 24px; background: rgba(250,252,255,.98); box-shadow: 0 28px 80px rgba(34,49,84,.27); }
.memory-dialog .dialog-header p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.memory-dialog-body { min-height: 0; display: grid; grid-template-columns: minmax(300px,.78fr) minmax(420px,1.22fr); overflow: hidden; }
.memory-create-panel, .memory-library-panel { min-width: 0; min-height: 0; padding: 24px; }
.memory-create-panel { display: grid; align-content: start; gap: 15px; border-right: 1px solid var(--line); background: rgba(246,249,254,.78); }
.memory-library-panel { display: grid; grid-template-rows: auto auto minmax(0,1fr); gap: 13px; }
.memory-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.memory-panel-heading span { display: block; color: var(--blue); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.memory-panel-heading h3 { margin: 3px 0 0; font-size: 15px; }
.memory-panel-heading small { color: var(--muted); font-size: 9px; text-align: right; }
.memory-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.memory-create-panel label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.memory-create-panel input, .memory-create-panel select, .memory-search-field input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text); background: white; font: inherit; }
.memory-create-panel textarea { width: 100%; resize: vertical; padding: 11px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text); background: white; font: inherit; line-height: 1.55; }
.memory-create-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memory-create-actions small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.memory-create-actions .button { flex: 0 0 auto; min-height: 40px; padding: 0 14px; font-size: 10px; }
.memory-search-field { display: block; }
.memory-search-field input { min-height: 40px; }
.memory-dialog-list { min-height: 0; display: grid; align-content: start; gap: 9px; overflow-y: auto; padding-right: 4px; }
.memory-dialog-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.memory-dialog-entry-main { min-width: 0; }
.memory-dialog-entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.memory-dialog-entry-meta span, .memory-dialog-entry-meta b { padding: 3px 7px; border-radius: 999px; color: #6047d7; background: #f0edff; font-size: 8px; }
.memory-dialog-entry-meta b { color: var(--blue); background: #eaf3ff; }
.memory-dialog-entry h4 { margin: 9px 0 5px; font-size: 12px; }
.memory-dialog-entry p { margin: 0; color: #526079; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.memory-dialog-entry small { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; }
.memory-delete-button { align-self: start; min-height: 32px; padding: 0 9px; border: 1px solid rgba(255,101,88,.2); border-radius: 9px; color: #c64a42; background: #fff6f4; font-size: 9px; font-weight: 750; }

.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-card { padding: 22px; }
.settings-card-header { display: flex; gap: 12px; margin-bottom: 22px; }
.settings-card-header h2 { margin: 0; font-size: 17px; }
.settings-card-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: #eaf2ff; }
.settings-icon.violet { color: var(--violet); background: #f0edff; }
.settings-icon.coral { color: var(--coral); background: #fff0ee; }
.settings-icon.green { color: var(--mint); background: #e9faf3; }
.settings-icon.social { color: #d94b86; background: #fff0f6; }
.settings-field { display: grid; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.settings-field select, .settings-field input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.85); }
.settings-time-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.settings-time-row > span { padding-bottom: 12px; color: var(--muted); }
.toggle-row { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 12px; }
.toggle-row small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.toggle-row input { appearance: none; flex: 0 0 auto; width: 42px; height: 24px; padding: 3px; border-radius: 99px; background: #ccd4e2; transition: background .16s ease; }
.toggle-row input::before { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(40,54,82,.25); transition: transform .16s ease; }
.toggle-row input:checked { background: var(--blue); }
.toggle-row input:checked::before { transform: translateX(18px); }
.account-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.account-row span { color: var(--muted); }
.account-card .button { width: 100%; margin-top: 20px; }
.social-settings-card { grid-column: 1 / -1; }
.social-connection-list { display: grid; gap: 10px; }
.social-loading { margin: 0; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); font-size: 11px; text-align: center; }
.social-connection { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.68); }
.social-connection-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.social-brand { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(145deg, #6a5cf4, #e74d87 58%, #f2a43a); font-size: 14px; font-weight: 850; }
.social-brand.threads { background: #15171a; }
.social-connection-copy { min-width: 0; }
.social-connection-copy strong, .social-connection-copy small { display: block; }
.social-connection-copy strong { font-size: 13px; }
.social-connection-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.social-connection-status { display: inline-flex; align-items: center; gap: 6px; margin-left: 7px; color: var(--muted); font-size: 9px; font-weight: 750; vertical-align: 2px; }
.social-connection-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #aeb7c5; }
.social-connection-status.connected { color: #16845e; }
.social-connection-status.connected::before { background: var(--mint); }
.social-connection-status.expired { color: var(--coral); }
.social-connection-status.expired::before { background: var(--coral); }
.social-connection-actions { display: flex; align-items: center; gap: 7px; }
.social-connection-actions .button { min-height: 36px; padding: 0 13px; font-size: 10px; }
.social-platform-group { display: block; padding: 0; overflow: hidden; }
.social-platform-heading { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgba(248,250,255,.72); }
.social-account-count { margin-left: 8px; color: var(--muted); font-size: 9px; font-weight: 700; }
.social-add-account, .social-app-setup { display: flex; gap: 7px; align-items: center; }
.social-add-account input, .social-app-setup input, .social-account-name input { height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: white; font-size: 10px; }
.social-add-account input { width: 180px; }
.social-add-account input[type="password"] { width: 210px; }
.social-app-setup input { width: 145px; }
.social-add-account input:disabled { background: #f1f3f7; }
.social-account-list { display: grid; }
.social-account-row { padding: 13px 16px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; border-top: 1px solid var(--line); }
.social-account-info { min-width: 0; }
.social-account-info > small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.social-account-name { display: flex; align-items: center; gap: 7px; }
.social-account-name input { width: min(240px, 100%); font-weight: 750; }
.social-account-name .button { min-height: 34px; padding: 0 10px; font-size: 9px; }
.social-empty { margin: 0; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.social-security-note { margin: 13px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.settings-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-top: 4px; }
.settings-actions span { color: var(--mint); font-size: 11px; font-weight: 700; }

.agent-dialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; padding: 0; background: transparent; }
.agent-dialog::backdrop { background: rgba(29,39,65,.28); backdrop-filter: blur(8px); }
.agent-dialog-card { background: rgba(250,252,255,.96); border: 1px solid white; border-radius: 24px; box-shadow: 0 28px 80px rgba(34,49,84,.24); overflow: hidden; }
.consult-agent-title { display: flex; align-items: center; gap: 11px; }
.consult-agent-title h2 { margin: 0; font-size: 22px; }
.consultation-layout { min-height: min(680px, calc(100vh - 140px)); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); }
.conversation-panel { min-height: 0; padding: 22px; display: grid; grid-template-rows: auto minmax(280px, 1fr) auto; border-right: 1px solid var(--line); }
.conversation-intro { padding: 13px 15px; border-radius: 13px; color: #43526d; background: #edf4ff; }
.conversation-intro strong, .conversation-intro span { display: block; }
.conversation-intro strong { font-size: 12px; }
.conversation-intro span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.conversation-messages { min-height: 0; max-height: calc(100vh - 350px); overflow-y: auto; padding: 22px 4px; display: flex; flex-direction: column; gap: 14px; }
.message { width: min(82%, 520px); align-self: flex-start; }
.message.user { align-self: flex-end; }
.message-author { display: block; margin: 0 4px 5px; color: var(--muted); font-size: 10px; font-weight: 750; }
.message.user .message-author { text-align: right; }
.message > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px 16px 16px 16px; color: #33415a; background: white; font-size: 12px; line-height: 1.65; white-space: pre-wrap; box-shadow: var(--shadow-soft); }
.message.user > div { border-color: transparent; border-radius: 16px 6px 16px 16px; color: white; background: linear-gradient(135deg, var(--blue-dark), #3593ff); }
.message.pending > div { color: var(--muted); background: #f2f5fa; }
.message time { display: block; margin: 5px 4px 0; color: #9aa4b5; font-size: 9px; }
.message.user time { text-align: right; }
.conversation-composer { padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 1px solid var(--line-strong); border-radius: 16px; background: white; }
.conversation-composer textarea { min-height: 60px; resize: none; border: 0; outline: 0; color: var(--text); background: transparent; line-height: 1.5; }
.conversation-composer .button { align-self: end; }
.profile-editor { max-height: calc(100vh - 115px); overflow-y: auto; padding: 22px; background: rgba(244,247,253,.78); }
.profile-editor-header h3 { margin: 0; font-size: 16px; }
.profile-editor-header p { margin: 6px 0 20px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-proposal { margin-bottom: 18px; padding: 14px; border: 1px solid rgba(39,121,246,.2); border-radius: 14px; background: #edf5ff; }
.profile-proposal > div span, .profile-proposal > div small { display: block; }
.profile-proposal > div span { color: var(--blue-dark); font-size: 12px; font-weight: 800; }
.profile-proposal > div small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.profile-proposal dl { margin: 13px 0; display: grid; gap: 8px; }
.profile-proposal dl > div { padding-top: 8px; border-top: 1px solid rgba(39,121,246,.12); }
.profile-proposal dt { color: var(--muted); font-size: 9px; font-weight: 750; }
.profile-proposal dd { margin: 4px 0 0; color: var(--text); font-size: 10px; line-height: 1.5; }
.profile-proposal .button { width: 100%; min-height: 40px; }
.profile-runtime-settings { margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); }
.profile-runtime-settings h4 { margin: 0; color: var(--text); font-size: 12px; }
.profile-runtime-settings p { margin: 5px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.profile-runtime-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 9px; }
.profile-runtime-grid label { min-width: 0; display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 750; }
.profile-runtime-grid select { width: 100%; min-height: 40px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: white; font-size: 10px; }
.profile-runtime-settings > small { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.profile-editor > label { display: grid; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 10px; font-weight: 750; }
.profile-editor > label > small { font-size: 9px; font-weight: 500; line-height: 1.5; }
.profile-editor textarea { width: 100%; resize: vertical; min-height: 70px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text); background: white; font-size: 11px; line-height: 1.5; }
.profile-editor .base-prompt-field textarea { min-height: 150px; }
.prompt-preview { margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); }
.prompt-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prompt-preview-heading h4 { margin: 0; color: var(--text); font-size: 12px; }
.prompt-preview-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; }
.prompt-preview-heading .button { flex: 0 0 auto; min-height: 34px; padding: 0 10px; font-size: 9px; }
.prompt-preview details { margin-top: 10px; border-top: 1px solid var(--line); }
.prompt-preview summary { padding: 10px 2px 7px; color: var(--text); font-size: 10px; font-weight: 800; cursor: pointer; }
.prompt-preview summary small { margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 600; }
.prompt-preview pre { max-height: 320px; margin: 0; padding: 11px; overflow: auto; border-radius: 10px; color: #33415a; background: #f4f7fb; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.project-picker { margin: 18px 0; padding: 0; border: 0; }
.project-picker legend { color: var(--text); font-size: 12px; font-weight: 800; }
.project-picker > p { margin: 5px 0 10px; color: var(--muted); font-size: 9px; }
.project-picker > div { display: grid; gap: 7px; }
.project-choice { padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }
.project-choice input { accent-color: var(--blue); }
.project-choice strong, .project-choice small { display: block; }
.project-choice strong { color: var(--text); font-size: 10px; }
.project-choice small { max-width: 250px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.profile-editor > .button { width: 100%; }

.login-page { display: grid; place-items: center; }
.login-shell {
  width: min(1080px, calc(100% - 40px)); min-height: 100vh; padding: 48px 0;
  display: grid; grid-template-columns: 1.1fr minmax(360px, .78fr); align-items: center; gap: clamp(50px, 8vw, 120px);
}
.login-intro { padding: 28px 0; }
.login-brand { padding: 0; margin-bottom: 72px; width: max-content; }
.login-intro h1 { margin: 0; font-size: clamp(42px, 5vw, 68px); line-height: 1.08; letter-spacing: -.055em; }
.login-intro > p:not(.eyebrow) { max-width: 520px; margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.login-agent-row { display: flex; margin-top: 38px; }
.login-agent-row span {
  width: 46px; height: 46px; margin-left: -7px; display: grid; place-items: center; border-radius: 15px;
  color: white; background: var(--agent-color); border: 3px solid rgba(255,255,255,.92); box-shadow: var(--shadow-soft); font-weight: 850;
}
.login-agent-row span:first-child { margin-left: 0; }
.login-card { padding: 32px; background: rgba(255,255,255,.78); }
.login-card-header h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.login-card-header > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.login-error {
  display: none; margin: 20px 0 0; padding: 12px 14px; border-radius: 12px; color: #c74238; background: #fff0ee;
  border: 1px solid rgba(255,101,88,.2); font-size: 12px; font-weight: 700;
}
.login-error.show { display: block; }
.login-form { display: grid; gap: 17px; margin-top: 27px; }
.login-form label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
.login-form input {
  width: 100%; height: 50px; padding: 0 14px; color: var(--text); background: rgba(255,255,255,.9);
  border: 1px solid var(--line-strong); border-radius: 13px;
}
.login-form input::placeholder { color: #99a2b5; }
.login-button { margin-top: 5px; width: 100%; min-height: 50px; }
.login-security { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.login-security span { color: var(--mint); margin-right: 5px; }

.dataset-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; }
.dataset-summary strong { font-size: 17px; }
.dataset-summary span { color: var(--muted); font-size: 12px; }
.dataset-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.dataset-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 15px; text-align: left; background: rgba(255,255,255,.75); cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.dataset-card:hover { transform: translateY(-2px); border-color: rgba(39,121,246,.34); }
.dataset-card-head { display: flex; justify-content: space-between; margin-bottom: 13px; }
.dataset-card-head i, .dataset-card-head b { padding: 4px 7px; border-radius: 7px; color: var(--blue-dark); background: #e9f2ff; font-size: 9px; font-style: normal; }
.dataset-card > strong { display: block; font-size: 14px; }
.dataset-card p { min-height: 34px; margin: 7px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.dataset-card small { color: var(--muted); font-size: 9px; }
.task-dataset-section { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(247,250,255,.85); }
.task-dataset-section > div:first-child { display: flex; justify-content: space-between; margin-bottom: 9px; }
.task-dataset-section > div:first-child span { color: var(--muted); font-size: 11px; font-weight: 700; }
.task-dataset-section > div:first-child strong { font-size: 11px; }
.task-dataset-list { display: grid; gap: 6px; }
.task-dataset-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; text-align: left; background: white; cursor: pointer; }
.task-dataset-list span, .task-dataset-list strong, .task-dataset-list small { display: block; }
.task-dataset-list strong { font-size: 11px; }
.task-dataset-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-dataset-list b { color: var(--blue-dark); font-size: 10px; }
.dataset-dialog .dialog-card { width: 100%; max-width: 980px; margin: 0 auto; }
.dataset-dialog .dataset-preview, .dataset-dialog .dataset-versions { grid-column: 1 / -1; }
.dataset-detail-summary p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.dataset-detail-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dataset-detail-summary dl > div { padding: 11px; border-radius: 10px; background: var(--soft); }
.dataset-detail-summary dt { color: var(--muted); font-size: 9px; }
.dataset-detail-summary dd { margin: 5px 0 0; font-size: 11px; font-weight: 700; }
.dataset-schema h3, .dataset-versions h3 { margin: 0 0 9px; font-size: 12px; }
.dataset-schema pre { max-height: 220px; overflow: auto; padding: 12px; border-radius: 10px; background: #121a2a; color: #e9efff; font-size: 10px; }
.dataset-preview { min-width: 0; display: grid; gap: 10px; }
.dataset-preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.dataset-preview-heading span { display: block; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.dataset-preview-heading h3 { margin: 4px 0 0; font-size: 14px; }
.dataset-preview-heading small { color: var(--muted); font-size: 9px; }
.dataset-preview-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dataset-preview-meta strong { font-size: 11px; }
.dataset-preview-meta span { color: var(--muted); font-size: 9px; }
.dataset-preview-table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.dataset-preview-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 10px; }
.dataset-preview-table th, .dataset-preview-table td { min-width: 130px; max-width: 360px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.dataset-preview-table thead th { position: sticky; z-index: 2; top: 0; color: var(--blue-dark); background: #edf4ff; font-weight: 800; }
.dataset-preview-table .dataset-row-number { position: sticky; z-index: 1; left: 0; min-width: 44px; width: 44px; color: var(--muted); background: #f7f9fc; text-align: right; }
.dataset-preview-table thead .dataset-row-number { z-index: 3; background: #e7f0fd; }
.dataset-preview-text { max-height: 420px; margin: 0; overflow: auto; padding: 15px; border: 1px solid var(--line); border-radius: 12px; color: #31405a; background: white; font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.dataset-preview-loading, .dataset-preview-empty, .dataset-preview-error { min-height: 130px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); background: rgba(247,250,255,.72); font-size: 11px; text-align: center; }
.dataset-preview-empty strong, .dataset-preview-error strong { color: var(--text); font-size: 12px; }
.dataset-preview-error .button { margin-top: 4px; }
.dataset-versions { display: grid; gap: 6px; }
.dataset-versions > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: white; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.dataset-versions > button:hover, .dataset-versions > button.active { border-color: rgba(39,121,246,.32); background: #f3f8ff; }
.dataset-versions span { color: var(--muted); }
.dataset-versions b { color: var(--blue-dark); font-size: 9px; }

.tool-flow {
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: center; gap: 14px; margin-bottom: 22px; padding: 18px 20px;
  border: 1px solid rgba(39,121,246,.14); border-radius: 20px; background: rgba(239,245,255,.72);
}
.tool-flow > div { display: grid; grid-template-columns: 32px minmax(0,1fr); column-gap: 10px; align-items: center; }
.tool-flow > div > span { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--blue); font-size: 12px; font-weight: 850; }
.tool-flow strong { font-size: 13px; }
.tool-flow small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.tool-flow > i { color: #9caac2; font-style: normal; }
.tool-summary { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tool-page-panel { padding: 22px; }
.tool-candidate-list { display: grid; gap: 12px; }
.tool-candidate-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.76); }
.tool-candidate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tool-candidate-head small { display: block; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.tool-candidate-head h3 { margin: 3px 0 4px; font-size: 16px; }
.tool-candidate-head code { color: var(--muted); font-size: 11px; }
.tool-candidate-card > p { margin: 14px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.candidate-status { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #eef1f6; color: #71809a; font-size: 11px; font-weight: 800; }
.candidate-status.review { color: #96620b; background: #fff3d7; }
.candidate-status.registered { color: #12805a; background: rgba(24,185,119,.1); }
.candidate-status.removed { color: #6d5a42; background: #f4efe8; }
.candidate-status.rejected { color: #a04a55; background: #fff0f2; }
.tool-candidate-meta { display: grid; grid-template-columns: .6fr 1fr 1.4fr 2fr; gap: 8px; margin: 0; }
.tool-candidate-meta div { min-width: 0; padding: 10px 11px; border-radius: 11px; background: #f6f8fc; }
.tool-candidate-meta dt { margin-bottom: 4px; color: #8a94aa; font-size: 10px; }
.tool-candidate-meta dd { margin: 0; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.tool-candidate-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tool-candidate-actions span { margin-right: auto; color: var(--muted); font-size: 11px; }
.tool-list { display: grid; gap: 16px; }
.tool-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.76); }
.tool-card-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tool-card-title { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.tool-symbol { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--blue-dark), #4c9aff); font-size: 18px; }
.tool-card-title small { display: block; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.tool-card-title h3 { margin: 3px 0 4px; font-size: 18px; }
.tool-card-title code { color: var(--muted); font-size: 11px; }
.tool-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.tool-status i { width: 7px; height: 7px; border-radius: 50%; }
.tool-status.active { color: #12805a; background: rgba(24,185,119,.1); }
.tool-status.active i { background: var(--mint); }
.tool-status.disabled { color: #71809a; background: #eef1f6; }
.tool-status.disabled i { background: #91a1be; }
.tool-description { max-width: 760px; margin: 16px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.tool-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 0; }
.tool-meta div { min-width: 0; padding: 11px 12px; border-radius: 12px; background: #f6f8fc; }
.tool-meta dt { margin-bottom: 4px; color: #8a94aa; font-size: 10px; }
.tool-meta dd { margin: 0; color: var(--text); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.tool-controls { display: grid; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.tool-enabled { padding: 0; border: 0; }
.tool-agent-picker { margin: 0; padding: 0; border: 0; }
.tool-agent-picker legend { font-size: 12px; font-weight: 800; }
.tool-agent-picker > p { margin: 4px 0 10px; color: var(--muted); font-size: 11px; }
.tool-agent-picker > div { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-agent-picker label { position: relative; }
.tool-agent-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tool-agent-picker span { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; }
.tool-agent-picker span i { width: 8px; height: 8px; border-radius: 50%; background: var(--agent-color); }
.tool-agent-picker input:checked + span { color: var(--blue-dark); border-color: rgba(39,121,246,.38); background: #eef4ff; box-shadow: inset 0 0 0 1px rgba(39,121,246,.08); }
.tool-agent-picker input:focus-visible + span { outline: 3px solid rgba(39,121,246,.22); outline-offset: 2px; }
.tool-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.tool-actions span { color: var(--muted); font-size: 11px; }

@media (max-width: 1120px) {
  .dataset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell { grid-template-columns: 86px minmax(0,1fr); }
  .brand span:last-child, .nav-item > span:nth-child(2), .sidebar-footer div:last-child { display: none; }
  .brand { justify-content: center; padding-inline: 0; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; position: relative; }
  .nav-badge { position: absolute; top: 4px; right: 5px; }
  .sidebar-footer { justify-content: center; }
  .agent-grid { grid-template-columns: repeat(3, minmax(140px,1fr)); }
  .agents-panel { grid-template-columns: 130px minmax(0,1fr); }
  .agent-page-grid { grid-template-columns: repeat(3, 1fr); }
  .common-prompt-layout { grid-template-columns: minmax(0, 1fr) minmax(270px, .72fr); }
  .task-toolbar { grid-template-columns: 1fr 1fr; }
  .all-task-row { grid-template-columns: 42px minmax(180px,1fr) 92px 105px 22px; }
  .row-progress { display: none; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; height: 66px; padding: 8px 12px; border: 1px solid white; border-radius: 20px; flex-direction: row; align-items: center; }
  .brand, .sidebar-footer { display: none; }
  .nav-list { width: 100%; grid-template-columns: repeat(8,1fr); }
  .mobile-logout-form { display: block; }
  .mobile-logout-form .nav-item { width: 100%; color: var(--coral); }
  .nav-item { min-height: 48px; }
  .main-content { padding: 24px 14px calc(104px + env(safe-area-inset-bottom)); }
  .page-header { gap: 12px; }
  .page-header > div { min-width: 0; }
  .page-header .button { flex: 0 0 auto; white-space: nowrap; }
  .glass-panel { border-radius: 18px; }
  .common-prompt-manager { padding: 17px; }
  .common-prompt-manager-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .common-prompt-scope { justify-content: flex-start; }
  .common-prompt-layout { grid-template-columns: 1fr; }
  .common-prompt-workspace textarea { min-height: 280px; }
  .tasks-panel, .attention-panel, .night-panel, .agents-panel, .page-panel, .settings-card, .agent-detail-panel { padding: 17px; }
  .task-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; }
  .markdown-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; }
  .markdown-dialog-card { min-width: 0; border: 0; border-radius: 0; }
  .markdown-dialog-card, .markdown-dialog .dialog-header, .markdown-body { width: 100%; max-width: 100%; }
  .markdown-dialog .dialog-header { min-width: 0; gap: 10px; overflow: hidden; }
  .markdown-dialog .artifact-dialog-title { width: auto; min-width: 0; overflow: hidden; }
  .markdown-dialog .artifact-dialog-actions { gap: 6px; }
  .markdown-dialog .artifact-download-button { min-height: 36px; padding: 0 10px; }
  .markdown-dialog .dialog-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .markdown-path { width: 100%; }
  .markdown-body { min-width: 0; padding: 18px 14px 30px; }
  .artifact-html-frame { min-width: 0; height: calc(100dvh - 132px); min-height: 0; border-radius: 8px; }
  .task-dialog .dialog-card { border: 0; border-radius: 0; }
  .task-dialog .dialog-body { grid-template-columns: 1fr; padding: 22px 18px; }
  .task-dialog .dialog-body > * { grid-column: 1; }
  .task-dialog .dialog-header { padding: 18px; }
  .task-dialog .dialog-actions { padding: 14px 18px 18px; background: rgba(255,255,255,.96); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .manager-panel { grid-template-columns: 1fr; }
  .manager-report { grid-column: auto; grid-row: auto; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .new-task-dialog { width: min(720px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); }
  .new-task-dialog-card { max-height: calc(100dvh - 28px); }
  .task-row { grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; }
  .task-icon { grid-column: 1; grid-row: 1; width: 40px; height: 40px; }
  .task-title { grid-column: 2; grid-row: 1; }
  .agent-cell { display: none; }
  .status-wrap { display: block; grid-column: 2 / -1; grid-row: 2; }
  .details-button { grid-column: 3; grid-row: 1; }
  .task-result-summary { max-width: none; }
  .agent-grid { grid-template-columns: repeat(2,1fr); }
  .agent-memory-list { grid-template-columns: 1fr; }
  .agent-memory-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .agent-memory-heading-actions { width: 100%; justify-content: space-between; }
  .memory-dialog-body { grid-template-columns: 1fr; overflow-y: auto; }
  .memory-create-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .memory-library-panel { min-height: 480px; }
  .memory-dialog-list { overflow-y: visible; }
  .agent-context-list { grid-template-columns: 1fr; }
  .agent-context-copy, .agent-context-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
  .manager-live-task { grid-template-columns: 1fr; }
  .manager-live-progress { width: 100%; }
  .agent-context-foot small { text-align: left; }
  .agents-panel { grid-template-columns: 1fr; align-items: stretch; }
  .agents-panel > .section-header { display: flex; }
  .section-description { display: none; }
  .action-description, .task-section-description { display: block; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .schedule-toolbar { grid-template-columns: 1fr 1fr; }
  .schedule-toolbar .search-field { grid-column: 1 / -1; }
  .schedule-calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .schedule-view-switcher { align-self: stretch; }
  .schedule-view-switcher button { flex: 1; }
  .schedule-row { grid-template-columns: 96px 38px minmax(150px,1fr) auto; gap: 10px; }
  .schedule-kind { display: none; }
  .schedule-comment-box { grid-column: 3 / -1; }
  .settings-layout { grid-template-columns: 1fr; }
  .tool-flow { grid-template-columns: 1fr; }
  .tool-flow > i { display: none; }
  .tool-meta { grid-template-columns: 1fr 1fr; }
  .tool-candidate-meta { grid-template-columns: 1fr 1fr; }
  .agent-detail-columns { grid-template-columns: 1fr; }
  .consultation-layout { grid-template-columns: 1fr; }
  .conversation-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-editor { max-height: none; }
  .all-task-row { grid-template-columns: 42px minmax(150px,1fr) 86px 20px; gap: 10px; }
  .status-pill { display: none; }
  .agent-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; }
  .agent-dialog-card { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr); border: 0; border-radius: 0; }
  .consultation-layout { min-height: 0; overflow-y: auto; }
  .login-shell { grid-template-columns: 1fr; width: min(500px, calc(100% - 32px)); padding: 28px 0; gap: 20px; }
  .login-intro { padding: 0; }
  .login-brand { margin-bottom: 36px; }
  .login-intro h1 { font-size: 38px; }
  .login-intro > p:not(.eyebrow), .login-agent-row { display: none; }
}

@media (max-width: 520px) {
  .common-prompt-actions { align-items: stretch; flex-direction: column-reverse; }
  .common-prompt-actions .button { width: 100%; }
  .common-prompt-editor-meta { align-items: flex-start; flex-direction: column; gap: 4px; padding: 7px 0; }
  .tool-summary { grid-template-columns: 1fr; }
  .tool-card-main { align-items: stretch; flex-direction: column; }
  .tool-status { align-self: flex-start; }
  .tool-meta { grid-template-columns: 1fr; }
  .tool-candidate-head { flex-direction: column; }
  .tool-candidate-meta { grid-template-columns: 1fr; }
  .tool-candidate-actions { align-items: stretch; flex-direction: column; }
  .tool-candidate-actions span { margin-right: 0; }
  .tool-candidate-actions .button { width: 100%; }
  .tool-actions .button { width: 100%; }
  .dataset-grid { grid-template-columns: 1fr; }
  .dataset-summary { align-items: flex-start; flex-direction: column; }
  .dataset-detail-summary dl { grid-template-columns: 1fr; }
  .dataset-preview-heading, .dataset-preview-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
  .dataset-preview-table th, .dataset-preview-table td { min-width: 118px; max-width: 260px; padding: 9px 10px; }
  .dataset-versions > button { grid-template-columns: auto minmax(0, 1fr); }
  .dataset-versions b { display: none; }
  .main-content { padding-inline: 12px; }
  .sidebar { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); height: 62px; padding: 7px 8px; border-radius: 18px; }
  .nav-list { gap: 2px; }
  .nav-item { min-height: 46px; border-radius: 12px; }
  .nav-icon { font-size: 20px; }
  .nav-badge { top: 1px; right: 1px; }
  .page-header { margin-bottom: 18px; }
  .page-header h1 { font-size: 28px; line-height: 1.12; }
  .header-copy { font-size: 13px; }
  .subpage-header { align-items: flex-start; }
  .subpage-header .button { min-width: 92px; min-height: 42px; max-width: none; padding: 0 12px; font-size: 11px; white-space: nowrap; word-break: keep-all; }
  .page-header-actions { align-items: flex-end; flex-direction: column-reverse; }
  .page-header-actions .button { min-height: 42px; padding: 0 12px; font-size: 11px; white-space: nowrap; }
  .context-session-row { align-items: flex-start; flex-direction: column; }
  .context-session-actions { width: 100%; align-items: center; justify-content: space-between; }
  .context-new-session { min-height: 40px; padding-inline: 13px; }
  .new-task-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; }
  .new-task-dialog-card { height: 100%; max-height: none; border: 0; border-radius: 0; }
  .new-task-dialog-header { padding: 18px 16px 15px; }
  .new-task-dialog-header h2 { font-size: 21px; }
  .new-task-dialog-body { padding: 19px 14px 24px; }
  .task-brief-field textarea { min-height: 120px; }
  .new-task-routing { grid-template-columns: 1fr; gap: 12px; }
  .task-repeat-section { padding: 15px 12px; }
  .task-repeat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dataset-picker { margin-top: 20px; padding: 16px 12px; }
  .dataset-option { padding: 12px; }
  .dataset-option-copy > span { align-items: flex-start; flex-direction: column; gap: 3px; }
  .new-task-dialog-actions { padding: 11px 14px calc(14px + env(safe-area-inset-bottom)); }
  .new-task-dialog-actions > span { display: none; }
  .new-task-dialog-actions > div { width: 100%; }
  .new-task-dialog-actions .button { flex: 1; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .summary-card { min-height: 112px; padding: 15px; border-radius: 17px; }
  .summary-card > strong { font-size: 30px; }
  .manager-report { align-items: flex-start; flex-direction: column; gap: 7px; }
  .manager-report p { white-space: normal; }
  .agent-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .agent-card { min-height: 62px; }
  .manager-actions .button { flex: 1; }
  .manager-actions .text-button { width: 100%; margin-left: 0; text-align: left; }
  .profile-runtime-grid { grid-template-columns: 1fr; }
  .agent-page-grid { grid-template-columns: 1fr; }
  .agent-page-card { min-height: 88px; }
  .task-toolbar { grid-template-columns: 1fr; }
  .schedule-toolbar { grid-template-columns: 1fr; }
  .schedule-toolbar .search-field { grid-column: auto; }
  .schedule-period-controls { width: 100%; flex-wrap: wrap; }
  .schedule-period-controls h2 { order: 2; flex-basis: 100%; margin: 3px 0 0; font-size: 15px; }
  .schedule-calendar-help { align-items: flex-start; }
  .schedule-month-grid { min-width: 680px; }
  .schedule-month-day { min-height: 104px; }
  .schedule-agenda-heading { margin-top: 18px; }
  .schedule-edit-grid { grid-template-columns: 1fr; }
  .schedule-timeline { display: grid; gap: 4px; }
  .schedule-row { grid-template-columns: minmax(0,1fr); gap: 10px; padding: 16px 2px; align-items: start; }
  .schedule-date, .schedule-row-main, .schedule-review-actions, .schedule-comment-box { grid-column: 1 / -1; }
  .schedule-date { display: flex; align-items: center; gap: 8px; }
  .schedule-date strong, .schedule-date span { display: inline; margin: 0; }
  .schedule-row-main strong, .schedule-row-main button { white-space: normal; overflow: visible; line-height: 1.45; }
  .schedule-agent-symbol { display: none; }
  .schedule-remove { padding: 0 8px; }
  .schedule-comment-box { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .schedule-review-actions { justify-content: flex-start; }
  .schedule-content-preview, .schedule-work-detail { width: 100%; }
  .schedule-media-preview > div { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .task-schedule-list > .task-schedule-review { grid-template-columns: 1fr; }
  .task-schedule-review > .schedule-review-actions { justify-content: flex-start; }
  .all-task-row { grid-template-columns: 38px minmax(130px,1fr) 20px; }
  .all-task-row .mode-pill { display: none; }
  .agent-detail-header { align-items: flex-start; flex-direction: column; }
  .agent-detail-identity { min-width: 0; align-items: flex-start; }
  .agent-detail-identity > div { min-width: 0; }
  .agent-detail-identity h2, .agent-detail-identity p { overflow-wrap: anywhere; }
  .agent-detail-actions { width: 100%; flex-direction: column; }
  .agent-detail-actions .button { width: 100%; }
  .agent-detail-metrics { max-width: none; }
  .agent-detail-metrics > div { padding: 13px; }
  .settings-time-row { grid-template-columns: 1fr; }
  .settings-time-row > span { display: none; }
  .social-connection { grid-template-columns: 1fr; }
  .social-connection-actions { width: 100%; }
  .social-connection-actions .button { flex: 1; }
  .social-platform-heading, .social-account-row { align-items: stretch; flex-direction: column; grid-template-columns: 1fr; }
  .social-platform-heading { display: flex; }
  .social-add-account, .social-app-setup { width: 100%; flex-wrap: wrap; }
  .social-add-account input, .social-app-setup input { width: 100%; min-width: 0; flex: 1 1 150px; }
  .social-add-account .button, .social-app-setup .button { flex: 1 1 auto; }
  .social-account-name { align-items: stretch; flex-direction: column; }
  .social-account-name input, .social-account-name .button { width: 100%; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-actions .button { width: 100%; }
  .conversation-panel { padding: 14px; }
  .conversation-composer { grid-template-columns: 1fr; }
  .conversation-composer .button { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions > div, .dialog-actions button { width: 100%; }
  .dialog-actions > div { flex-direction: column; }
  .dialog-header { padding: 16px; gap: 10px; }
  .dialog-header h2 { font-size: 19px; line-height: 1.25; }
  .dialog-close { width: 34px; height: 34px; }
  .task-dialog .dialog-body { gap: 16px; padding: 18px 14px; }
  .task-dialog .dialog-actions { padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
  .task-original-brief { padding: 15px; }
  .task-original-brief > p { font-size: 14px; }
  .task-recurrence-detail { padding: 15px; }
  .task-recurrence-detail-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .task-recurrence-detail-heading > small { text-align: left; }
  .execution-overview { grid-template-columns: 1fr 1fr; }
  .task-session-usage { align-items: flex-start; flex-direction: column; gap: 5px; }
  .task-session-usage > small { text-align: left; }
  .execution-steps { gap: 4px; }
  .execution-steps li { min-width: 0; text-align: center; }
  .execution-log li { grid-template-columns: 1fr; gap: 7px; padding: 11px 12px 11px 15px; }
  .execution-log-meta small { flex-basis: auto; }
  .task-interaction-item { width: 94%; }
  .task-question, .task-schedule-plan { padding: 13px; }
  .task-schedule-heading { flex-direction: column; }
  .task-schedule-review { min-width: 0; }
  .markdown-dialog .dialog-header { padding: 14px; }
  .markdown-path { max-width: 100%; }
  .markdown-body { padding: 12px; }
  .artifact-grid { grid-template-columns: 1fr; }
  .artifact-html-frame { height: calc(100dvh - 112px); }
  .identity-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; }
  .identity-dialog .dialog-card { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; border: 0; border-radius: 0; }
  .identity-dialog .dialog-body { align-content: start; overflow-y: auto; padding: 20px 16px; }
  .memory-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; }
  .memory-dialog-card { border: 0; border-radius: 0; }
  .memory-create-panel, .memory-library-panel { padding: 18px 14px; }
  .memory-form-grid { grid-template-columns: 1fr; }
  .memory-create-actions { align-items: stretch; flex-direction: column; }
  .memory-create-actions .button { width: 100%; }
  .agent-dialog .dialog-header { padding: 13px 14px; }
  .consult-agent-title { min-width: 0; }
  .consult-agent-title > div { min-width: 0; }
  .consult-agent-title h2 { font-size: 18px; overflow-wrap: anywhere; }
  .consultation-layout { display: block; }
  .conversation-panel { min-height: calc(100dvh - 78px); padding: 14px; grid-template-rows: auto minmax(220px,1fr) auto; border-right: 0; }
  .conversation-messages { max-height: none; padding: 16px 2px; }
  .message { width: 92%; }
  .profile-editor { max-height: none; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }
  .profile-runtime-grid { grid-template-columns: 1fr; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); width: calc(100% - 24px); text-align: center; }
}

/* Folder-owned schedules share the schedule page's spacing and colors. */
#projectSchedulesPanel { margin-bottom: 24px; }
#upcomingContentPanel { margin-bottom: 24px; }
.upcoming-content-card { border-top: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.upcoming-content-card summary { cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.upcoming-content-card summary span { display: grid; gap: 8px; }
.upcoming-content-card summary small, .upcoming-content-card figcaption { color: var(--muted); font-size: 12px; }
.upcoming-content-card summary b { color: var(--blue-dark); font-size: 12px; flex-shrink: 0; }
.upcoming-content-card p, .upcoming-content-card li { line-height: 1.7; font-size: 14px; }
.upcoming-content-card h3 { font-size: 15px; margin: 20px 0 8px; }
.upcoming-content-card textarea { width: 100%; margin-top: 8px; min-height: 112px; resize: vertical; }
.upcoming-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(144px, 1fr)); gap: 12px; margin: 16px 0; }
.upcoming-photo-grid figure { margin: 0; min-width: 0; }
.upcoming-photo-grid img { width: 100%; height: 144px; object-fit: contain; background: var(--bg); border-radius: 12px; }
.upcoming-photo-grid figcaption { margin-top: 4px; line-height: 1.5; }
.upcoming-photo-grid .is-excluded img { opacity: .4; filter: grayscale(1); }
.upcoming-photo-state { display: block; color: var(--muted); font-size: 12px; margin: 8px 0 4px; }
.upcoming-photo-grid .button { width: 100%; font-size: 12px; padding: 8px; }
.upcoming-content-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 520px) { .upcoming-content-card summary { flex-direction: column; gap: 8px; } .upcoming-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.project-schedule-card { padding: 20px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.project-schedule-card p { margin: 8px 0; }
.project-schedule-card h3 { margin: 4px 0; }
.project-schedule-card summary { cursor: pointer; color: var(--blue-dark); padding: 12px 0; }
.project-schedule-result { border-left: 2px solid var(--line-strong); padding: 4px 16px; margin: 12px 0; }

/* Brand and project workspace: shared app tokens, independent metadata editor. */
.project-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(140px, auto)); gap: 12px; margin-bottom: 24px; }
.project-toolbar select, #taskWorkProjectSelect, #taskWorkProjectFilter { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); font: inherit; max-width: 100%; }
.project-brand { margin-bottom: 28px; }
.project-brand > h2 { font-size: 18px; margin: 0 0 16px; }
.project-brand h2 small { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 8px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { padding: 20px; min-width: 0; }
.project-card-top, .project-card footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.project-card h3 { margin: 8px 0 12px; font-size: 18px; }
.project-card h3 a { color: var(--text); text-decoration: none; }
.project-card h3 a:hover { color: var(--blue); text-decoration: underline; }
.project-card p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.project-next { display: grid; gap: 8px; padding: 16px 0; margin: 12px 0; border-block: 1px solid var(--line); }
.project-next small { color: var(--blue); }
.project-next strong { font-size: 13px; line-height: 1.7; }
.project-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.project-tabs a { text-decoration: none; }
.project-detail { margin-bottom: 24px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.project-detail section + section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.project-detail h2 { font-size: 18px; margin: 0 0 16px; }
.project-action, .project-task-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.project-action .button { flex-shrink: 0; }
.project-task-row { width: 100%; text-align: left; background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--line); font: inherit; cursor: pointer; }
.project-task-row > span:first-child { min-width: 0; }
.project-task-row strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-task-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.project-note { padding: 16px 0; border-bottom: 1px solid var(--line); }
.project-note h3 { margin: 8px 0; font-size: 15px; }
.project-note > small { color: var(--muted); }
.project-note details summary { cursor: pointer; color: var(--blue); }
.project-note .text-button { margin-right: 16px; }
.project-preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.project-resource { display: block; background: transparent; border: 0; padding: 12px 0; color: var(--blue); text-align: left; font: inherit; cursor: pointer; }
.project-editor { width: min(680px, calc(100% - 24px)); max-height: 90dvh; padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: #fff; }
.project-editor::backdrop { background: rgba(24,40,68,.35); }
.project-editor-fields { padding: 24px; display: grid; gap: 20px; }
.project-editor-fields label { display: grid; gap: 8px; font-size: 13px; font-weight: 650; }
.project-editor-fields label small { color: var(--muted); font-weight: 400; }
.project-editor-fields input, .project-editor-fields select, .project-editor-fields textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: white; color: var(--text); font: inherit; resize: vertical; }
.project-editor-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
#projectEditError { color: var(--coral); white-space: pre-wrap; }
.mobile-more { display: none; }
.mobile-more-dialog nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px; }
.mobile-more-dialog .nav-item { width: 100%; }
@media (min-width: 1121px) { .task-toolbar { grid-template-columns: minmax(160px,1fr) repeat(4,minmax(120px,auto)); } }
@media (max-width: 820px) {
  .nav-list { grid-template-columns: repeat(5, 1fr); }
  .nav-list .mobile-extra, .nav-list .mobile-logout-form { display: none; }
  .nav-list .mobile-more { display: flex; }
  .project-grid { grid-template-columns: 1fr; }
  .project-toolbar { grid-template-columns: 1fr 1fr; }
  .project-toolbar .search-field { grid-column: 1 / -1; }
  #projectDetailSection .page-header { flex-direction: column; align-items: stretch; gap: 16px; }
}
@media (max-width: 520px) {
  .project-editor-grid { grid-template-columns: 1fr; }
  .project-editor-fields { padding: 16px; }
  .project-action { align-items: flex-start; flex-direction: column; gap: 8px; }
  .project-card { padding: 16px; }
  .project-task-row { align-items: flex-start; }
}

/* Terminal handoff commands remain selectable on narrow task dialogs. */
#cliTaskCommand { white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
details.common-prompt-layout { display: block; }
details.common-prompt-layout > summary { cursor: pointer; color: var(--muted); }

.project-source-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; max-height: 420px; overflow: auto; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }

/* Project-owned pages keep their own layout inside the shared navigation. */
.project-custom-frame { display: block; width: 100%; height: 900px; border: 0; border-radius: 24px; background: var(--bg); }
#projectCustomViewHost[hidden] { display: none; }
@media (max-width: 520px) { .project-custom-frame { border-radius: 16px; } }
