:root {
  color-scheme: light;
  --page: oklch(0.965 0.018 230);
  --surface: oklch(0.994 0.006 245);
  --surface-2: oklch(0.94 0.008 245);
  --line: oklch(0.88 0.012 245);
  --line-strong: oklch(0.78 0.018 245);
  --text: oklch(0.25 0.018 248);
  --muted: oklch(0.48 0.018 248);
  --muted-2: oklch(0.62 0.014 248);
  --accent: oklch(0.55 0.16 250);
  --accent-soft: oklch(0.94 0.035 250);
  --coral: oklch(0.72 0.13 28);
  --sun: oklch(0.86 0.13 86);
  --mint: oklch(0.78 0.11 165);
  --lilac: oklch(0.8 0.08 305);
  --danger: oklch(0.56 0.18 28);
  --danger-soft: oklch(0.95 0.03 28);
  --success: oklch(0.55 0.13 155);
  --warning: oklch(0.66 0.13 75);
  --shadow: 0 24px 60px oklch(0.28 0.04 248 / 0.16);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 18% 18%, oklch(0.91 0.09 86 / 0.9) 0 118px, transparent 119px),
    radial-gradient(circle at 86% 22%, oklch(0.88 0.08 305 / 0.72) 0 138px, transparent 139px),
    radial-gradient(circle at 78% 78%, oklch(0.87 0.09 165 / 0.78) 0 150px, transparent 151px),
    linear-gradient(135deg, oklch(0.975 0.023 225), oklch(0.958 0.03 245) 48%, oklch(0.972 0.025 78));
}

.login-view::before,
.login-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-view::before {
  inset: 8% 5% auto auto;
  width: 260px;
  height: 180px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, transparent 0 28px, oklch(0.68 0.09 250 / 0.12) 28px 30px, transparent 30px),
    linear-gradient(0deg, transparent 0 28px, oklch(0.68 0.09 250 / 0.12) 28px 30px, transparent 30px);
  background-size: 30px 30px;
  transform: rotate(-4deg);
}

.login-view::after {
  left: 8%;
  bottom: 8%;
  width: 180px;
  height: 58px;
  border-radius: 999px;
  background: oklch(0.62 0.11 250 / 0.12);
  filter: blur(1px);
}

.login-panel {
  width: min(860px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1fr);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.login-illustration {
  min-height: 488px;
  position: relative;
  display: grid;
  place-items: end center;
  padding: 32px 24px;
  background:
    linear-gradient(160deg, oklch(0.88 0.075 178), oklch(0.92 0.055 214) 46%, oklch(0.95 0.065 85));
}

.office-card {
  position: absolute;
  border-radius: 8px;
  background: oklch(0.992 0.01 85 / 0.88);
  border: 1px solid oklch(0.86 0.03 210 / 0.6);
  box-shadow: 0 12px 28px oklch(0.35 0.04 210 / 0.13);
}

.office-card-note {
  width: 82px;
  height: 64px;
  left: 32px;
  top: 34px;
  transform: rotate(-7deg);
  background:
    linear-gradient(var(--sun) 0 12px, transparent 12px),
    linear-gradient(90deg, oklch(0.42 0.08 250 / 0.18) 0 42px, transparent 42px);
}

.office-card-task {
  width: 112px;
  height: 78px;
  right: 26px;
  top: 70px;
  transform: rotate(6deg);
  background:
    linear-gradient(var(--lilac) 0 14px, transparent 14px),
    repeating-linear-gradient(0deg, transparent 0 15px, oklch(0.64 0.03 245 / 0.22) 15px 16px);
}

.desk-scene {
  width: min(300px, 100%);
  height: 260px;
  position: relative;
}

.desk {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 24px;
  height: 84px;
  border-radius: 8px 8px 18px 18px;
  background: linear-gradient(180deg, oklch(0.74 0.11 52), oklch(0.67 0.11 45));
  box-shadow: inset 0 12px 0 oklch(0.86 0.08 69), 0 18px 28px oklch(0.3 0.05 230 / 0.18);
}

.monitor {
  position: absolute;
  left: 34px;
  top: -54px;
  width: 112px;
  height: 72px;
  border: 8px solid oklch(0.38 0.08 248);
  border-radius: 8px;
  background:
    linear-gradient(135deg, oklch(0.96 0.055 190), oklch(0.89 0.065 250));
}

.monitor::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -24px;
  width: 14px;
  height: 18px;
  background: oklch(0.38 0.08 248);
}

.keyboard {
  position: absolute;
  left: 28px;
  bottom: 18px;
  width: 136px;
  height: 22px;
  border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, oklch(0.79 0.035 245) 0 10px, oklch(0.92 0.01 245) 10px 14px);
}

.coffee {
  position: absolute;
  right: 34px;
  top: 20px;
  width: 34px;
  height: 40px;
  border-radius: 6px 6px 12px 12px;
  background: oklch(0.96 0.015 45);
  border: 4px solid oklch(0.42 0.08 248);
}

.coffee::after {
  content: "";
  position: absolute;
  right: -15px;
  top: 9px;
  width: 16px;
  height: 16px;
  border: 4px solid oklch(0.42 0.08 248);
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

.cat-body {
  position: absolute;
  right: 42px;
  bottom: 86px;
  width: 104px;
  height: 108px;
  border-radius: 48% 48% 42% 42%;
  background: linear-gradient(180deg, oklch(0.94 0.04 77), oklch(0.86 0.06 67));
  border: 4px solid oklch(0.35 0.04 55);
  z-index: 2;
}

.cat-ear {
  position: absolute;
  top: -24px;
  width: 36px;
  height: 36px;
  background: oklch(0.91 0.05 73);
  border: 4px solid oklch(0.35 0.04 55);
  transform: rotate(45deg);
  border-radius: 6px;
}

.cat-ear-left {
  left: 13px;
}

.cat-ear-right {
  right: 13px;
}

.cat-face {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 62px;
  height: 42px;
  transform: translateX(-50%);
}

.cat-face span {
  position: absolute;
  top: 5px;
  width: 9px;
  height: 13px;
  border-radius: 999px;
  background: oklch(0.22 0.02 55);
}

.cat-face span:first-child {
  left: 11px;
}

.cat-face span:nth-child(2) {
  right: 11px;
}

.cat-face i {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 22px;
  height: 11px;
  border-bottom: 3px solid oklch(0.35 0.04 55);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.cat-tail {
  position: absolute;
  right: 16px;
  bottom: 118px;
  width: 82px;
  height: 62px;
  border: 14px solid oklch(0.82 0.065 66);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 999px 0 0;
  z-index: 1;
}

.login-content {
  padding: 34px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: oklch(0.985 0.004 245);
  font-weight: 800;
  margin-bottom: 18px;
}

.login-panel h1,
.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.login-form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

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

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

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.wechat-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 6px;
  background: oklch(0.56 0.16 152);
  color: oklch(0.985 0.004 245);
  font-weight: 750;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 32px;
  min-height: 32px;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.password-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.password-toggle:focus-visible {
  box-shadow: 0 0 0 3px oklch(0.55 0.16 250 / 0.14);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.remember-row {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

input, textarea, select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

.remember-row input {
  width: 16px;
  min-height: 16px;
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  padding: 0;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.55 0.16 250 / 0.14);
}

.login-form button,
.primary-btn,
.command-form button {
  min-height: 38px;
  border-radius: 6px;
  background: var(--accent);
  color: oklch(0.985 0.004 245);
  padding: 0 14px;
  font-weight: 750;
}

.login-form .password-toggle {
  min-height: 32px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-weight: 650;
}

.login-form .password-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.ghost-btn,
.icon-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 650;
}

.danger-btn {
  min-height: 34px;
  border-radius: 6px;
  background: var(--danger);
  color: oklch(0.985 0.004 245);
  padding: 0 12px;
  font-weight: 750;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 3px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  gap: 14px;
  padding: 16px 20px 24px;
}

.command-band,
.filters,
.pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-band {
  justify-content: space-between;
}

.command-form {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.5fr) minmax(180px, 0.7fr);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: 14px;
  align-items: start;
}

.list-pane,
.detail-pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pane-head {
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.pane-head span {
  color: var(--muted);
  font-size: 13px;
}

.demand-list {
  display: grid;
}

.demand-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(240px, 1.8fr) minmax(90px, 0.8fr) minmax(90px, 0.7fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
}

.demand-row:last-child {
  border-bottom: 0;
}

.demand-row:hover,
.demand-row.active {
  background: var(--accent-soft);
}

.cell-id {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.cell-title {
  min-width: 0;
}

.cell-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.cell-title span,
.meta-line {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.status-pill,
.priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: fit-content;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.status-done,
.status-test_pass,
.status-online,
.status-accepted {
  background: oklch(0.94 0.035 155);
  color: var(--success);
}

.status-doing,
.status-submitted {
  background: oklch(0.94 0.04 250);
  color: var(--accent);
}

.status-test_fail,
.status-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-next {
  background: oklch(0.95 0.04 75);
  color: var(--warning);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  padding: 0 9px;
}

.detail-pane {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.detail-card {
  padding: 16px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-head h2 {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.detail-field {
  min-width: 0;
}

.detail-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.detail-field strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.detail-description {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.detail-description p {
  margin: 7px 0 0;
  color: var(--text);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.empty-detail,
.empty-list {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.drawer,
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.drawer-mask,
.dialog-mask {
  position: absolute;
  inset: 0;
  background: oklch(0.2 0.02 248 / 0.34);
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(720px, 100%);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

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

.icon-btn {
  width: 34px;
  padding: 0;
  font-size: 22px;
}

.demand-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  overflow: auto;
  align-content: start;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.dialog-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.dialog-panel p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.dialog-panel footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(520px, calc(100% - 28px));
  border-radius: 8px;
  background: oklch(0.25 0.018 248);
  color: oklch(0.985 0.004 245);
  padding: 11px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.assistant-topbar {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.assistant-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.assistant-user,
.assistant-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  white-space: nowrap;
}

.assistant-user::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: oklch(0.38 0.12 292);
  box-shadow: 0 0 0 2px oklch(0.93 0.04 292);
}

.assistant-tab.active {
  color: var(--accent);
}

.assistant-workspace {
  height: calc(100vh - 36px);
  min-height: 0;
  display: grid;
  grid-template-columns: 500px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 12px;
  background: oklch(0.94 0.018 245);
  overflow: hidden;
}

.assistant-side,
.assistant-chat-panel {
  min-height: 0;
  min-width: 0;
}

.assistant-side {
  display: grid;
  grid-template-rows: minmax(260px, 1fr) minmax(260px, 0.95fr);
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
}

.assistant-result-panel,
.assistant-command-panel,
.assistant-chat-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px oklch(0.25 0.02 248 / 0.05);
}

.assistant-result-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 8px 8px 0 0;
  border-bottom: 0;
}

.assistant-command-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 0 0 8px 8px;
}

.assistant-panel-head,
.assistant-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.assistant-panel-head strong,
.assistant-chat-head strong {
  font-size: 14px;
}

.assistant-chat-head span {
  color: var(--muted);
  font-size: 12px;
}

.small-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.assistant-result-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.result-tab {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.result-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.result-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: oklch(0.985 0.004 245);
}

.assistant-log-list,
.assistant-command-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--surface);
}

.assistant-log-item {
  display: grid;
  grid-template-columns: 58px 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

.assistant-log-time {
  color: var(--muted-2);
  font-family: Consolas, monospace;
}

.assistant-log-item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  font-size: 11px;
}

.assistant-log-item p {
  margin: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-log-item.done b {
  background: oklch(0.94 0.035 155);
  color: var(--success);
}

.assistant-log-item.running b {
  background: var(--accent-soft);
  color: var(--accent);
}

.assistant-log-item.failed b {
  background: var(--danger-soft);
  color: var(--danger);
}

.assistant-log-item.done p {
  color: oklch(0.46 0.11 150);
}

.assistant-log-item.failed p {
  color: var(--danger);
}

.assistant-command-toolbar {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.assistant-command-toolbar select,
.assistant-command-toolbar input {
  min-height: 28px;
  border-radius: 6px;
  font-size: 12px;
}

.assistant-command-list {
  padding: 7px 10px;
}

.assistant-command-row {
  width: 100%;
  height: 34px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 6px;
  font-size: 12px;
}

.assistant-command-row:hover {
  background: var(--accent-soft);
  border-color: oklch(0.82 0.05 250);
  color: var(--accent);
}

.assistant-command-row span {
  font-family: Consolas, monospace;
  font-size: 9px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  padding: 1px 3px;
}

.assistant-command-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.assistant-command-row i {
  color: var(--muted-2);
  font-style: normal;
  text-align: center;
}

.assistant-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

.assistant-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 8px;
  overflow: hidden;
}

.assistant-chat-history {
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 14px;
  background: var(--surface);
}

.chat-message {
  max-width: min(760px, 86%);
  margin-bottom: 14px;
}

.chat-message.me {
  margin-left: auto;
  text-align: right;
}

.chat-meta {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.chat-meta span {
  margin-left: 4px;
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-weight: 500;
}

.chat-bubble {
  display: inline-block;
  max-width: 100%;
  border: 1px solid oklch(0.8 0.07 250);
  border-radius: 8px;
  background: oklch(0.97 0.025 250);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.me .chat-bubble {
  background: oklch(0.92 0.055 250);
  color: var(--accent);
}

.assistant-composer {
  display: grid;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.assistant-composer textarea {
  width: 100%;
  min-height: 96px;
  max-height: 180px;
  resize: vertical;
  border-color: oklch(0.72 0.09 250);
  background: oklch(0.99 0.005 245);
}

.assistant-composer footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.assistant-composer .primary-btn {
  min-width: 112px;
}

@media (max-width: 980px) {
  .assistant-workspace {
    height: auto;
    min-height: calc(100vh - 36px);
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .assistant-side {
    grid-template-rows: 280px 360px;
  }

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

  .detail-pane {
    display: none;
  }

  .demand-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .cell-id,
  .cell-module,
  .cell-date {
    grid-column: 1 / 2;
  }

  .cell-status,
  .row-actions {
    grid-column: 2 / 3;
  }
}

@media (max-width: 680px) {
  .assistant-topbar {
    align-items: flex-start;
    padding: 6px 10px;
  }

  .assistant-tabs {
    gap: 12px;
    flex-wrap: wrap;
  }

  .assistant-workspace {
    padding: 10px;
    gap: 10px;
  }

  .assistant-side {
    grid-template-rows: 260px 320px;
  }

  .assistant-log-item {
    grid-template-columns: 54px 54px minmax(0, 1fr);
    padding: 8px 10px;
  }

  .assistant-chat-history {
    padding: 14px 12px;
  }

  .chat-message {
    max-width: 94%;
  }

  .assistant-composer {
    padding: 10px 12px 12px;
  }

  .assistant-composer footer {
    flex-wrap: wrap;
  }

  .login-view {
    padding: 16px;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-illustration {
    min-height: 178px;
    place-items: center end;
    padding: 18px;
  }

  .office-card-note {
    left: 18px;
    top: 20px;
  }

  .office-card-task {
    right: 22px;
    top: 18px;
  }

  .desk-scene {
    width: 220px;
    height: 148px;
    transform: scale(0.72);
    transform-origin: right bottom;
  }

  .login-content {
    padding: 24px;
  }

  .topbar {
    align-items: flex-start;
    padding: 14px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .user-pill {
    width: 100%;
    max-width: 160px;
  }

  .workspace {
    padding: 12px;
  }

  .command-band {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .demand-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .cell-status,
  .row-actions,
  .cell-id,
  .cell-module,
  .cell-date {
    grid-column: auto;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .drawer-panel {
    width: 100%;
  }

  .demand-form {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .span-2 {
    grid-column: span 1;
  }
}
