.panel,
.notice,
.empty-state,
.message-card,
.catalog-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dfe7f2;
  box-shadow: 0 18px 40px rgba(35, 52, 82, 0.06);
}

.panel { padding: 18px; }

.header-actions,
.section-head,
.button-row,
.mini-info,
.bind-row,
.composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-copy {
  display: grid;
  gap: 4px;
}

.hero-line {
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #182236;
}

.section-head.compact { align-items: flex-start; }
.notice, .empty-state, .catalog-item { padding: 14px; }
.notice {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 250, 0.96));
  border-color: rgba(214, 228, 223, 0.96);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
  color: #355650;
  flex: 0 0 auto;
}
.notice.error {
  background: linear-gradient(180deg, rgba(255, 250, 250, 0.98), rgba(255, 244, 244, 0.96));
  border-color: rgba(248, 113, 113, 0.24);
  color: #972f2f;
}
.toast-notice {
  animation: notice-fade 2.4s ease forwards;
}
.empty-state { background: #f8fbff; border-style: dashed; }

.content-area {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-panel {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.bind-entry {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed #cfdced;
  background: #f8fbff;
}

.bind-entry-copy {
  display: grid;
  gap: 6px;
}

.bind-row input { flex: 1 1 auto; }
.bind-row button { flex: 0 0 auto; min-width: 96px; }

.inline-hint {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #e3ebf5;
}
.inline-hint.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
  color: #972f2f;
}
.settings-actions { justify-content: flex-start; }

.settings-input-label {
  width: 100%;
  display: grid;
  gap: 8px;
}

.settings-input-label-text {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: #5f738e;
}

.workspace-directory-card {
  display: grid;
  gap: 12px;
}

.workspace-directory-panel {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #d8e1ef;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 28px rgba(35, 52, 82, 0.05);
}

.workspace-directory-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #60728c;
}

.workspace-directory-path {
  color: #1f2f49;
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.workspace-directory-hint {
  color: #667794;
  font-size: 13px;
  line-height: 1.6;
}

.workspace-directory-draft-row,
.workspace-directory-inline-actions,
.workspace-directory-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-directory-draft-row {
  justify-content: space-between;
}

.workspace-directory-draft-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 123, 255, 0.08);
  color: #0f67de;
  font-size: 12px;
  font-weight: 700;
}

.workspace-directory-inline-actions button {
  min-height: 36px;
  padding: 8px 14px;
}

.workspace-directory-inline-button {
  box-shadow: inset 0 0 0 1px #d8e1ef;
}
.field-label { color: #53637f; font-size: 13px; }

.scroll-panel,
.page-stack {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.message-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.scroll-panel {
  align-content: start;
}

.message-card { padding: 16px; }
.message-card.user { background: transparent; }
.message-card.assistant { background: transparent; }
.message-card.streaming { border-color: #b7e4d5; }
.message-card.error { border-color: rgba(239, 68, 68, 0.24); }
.message-card p {
  white-space: pre-wrap;
  line-height: 1.7;
  margin-top: 6px;
}

.thinking-spinner {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(59, 130, 246, 0.18);
  border-top-color: var(--color-secondary-500);
  animation: spinner-rotate 0.8s linear infinite;
}

.message-cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: var(--space-1);
  border-radius: var(--radius-full);
  background: var(--color-secondary-500);
  vertical-align: text-bottom;
  animation: cursor-blink 1s steps(1, end) infinite;
}

.message-trace {
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
  width: min(100%, 880px);
}

.reasoning-strip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 880px);
  min-height: 32px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  justify-content: start;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.045);
  color: #46556b;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.reasoning-strip > span {
  position: relative;
  z-index: 1;
}

.reasoning-strip:hover {
  background: rgba(15, 23, 42, 0.07);
  color: #263244;
}

.reasoning-strip:focus-visible {
  outline: 2px solid rgba(71, 85, 105, 0.34);
  outline-offset: 2px;
}

.reasoning-strip.expanded {
  background: rgba(15, 23, 42, 0.07);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.035);
}

.reasoning-strip.streaming {
  background:
    linear-gradient(90deg, rgba(13, 148, 136, 0.11), rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.045));
  color: #27506d;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.reasoning-strip.streaming::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg, transparent 8%, rgba(255, 255, 255, 0.42) 42%, transparent 64%);
  opacity: 0.55;
  transform: translateX(-115%);
  animation: trace-strip-shine 2.4s ease-in-out infinite;
  pointer-events: none;
}

.reasoning-strip.streaming:hover,
.reasoning-strip.streaming.expanded {
  background:
    linear-gradient(90deg, rgba(13, 148, 136, 0.14), rgba(37, 99, 235, 0.13), rgba(15, 23, 42, 0.055));
}

.reasoning-strip.error {
  background: rgba(239, 68, 68, 0.09);
  color: #893535;
}

.reasoning-strip-leading {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
}

.reasoning-strip-leading::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.reasoning-strip.streaming .reasoning-strip-leading::before {
  background: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.13);
  animation: trace-status-pulse 1.5s ease-in-out infinite;
}

.reasoning-strip.error .reasoning-strip-leading::before {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.reasoning-strip-title,
.reasoning-strip-action {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reasoning-strip-title {
  min-width: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.reasoning-strip.streaming .reasoning-strip-title {
  background: linear-gradient(90deg, #0f766e, #2563eb, #334155);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: trace-title-shift 3s ease-in-out infinite;
}

.reasoning-strip-action {
  color: #6f8197;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.message-trace-content {
  position: relative;
  display: grid;
  gap: 0;
  padding: 6px 10px 6px 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
}

.message-trace-line {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 8px 0;
  color: #667794;
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
}

.message-trace-line + .message-trace-line {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.message-trace-line.success {
  color: #0f7f59;
}

.message-trace-line.error {
  color: #972f2f;
}

.message-trace-marker {
  position: relative;
  width: 16px;
  height: 20px;
}

.message-trace-marker::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: #94a3b8;
}

.message-trace-line.success .message-trace-marker::before {
  background: #10b981;
}

.message-trace-line.error .message-trace-marker::before {
  background: #ef4444;
}

.message-trace-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-trace-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.message-trace-time {
  flex: 0 0 auto;
  color: #8ca0ba;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.message-trace-text {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-weight: 700;
}

.message-trace-detail {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #6f819a;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

.nav-item-icon svg,
.message-action-icon svg,
.composer-submit svg,
.attachment-trigger svg,
.markdown-code-copy svg {
  width: 18px;
  height: 18px;
}

.message-bubble-assistant {
  width: 100%;
  max-width: 100%;
}

.message-plain-text,
.markdown-body {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.82;
}

.message-attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.message-attachment-item {
  min-width: 0;
}

.message-attachment-image {
  width: 220px;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
}

.message-attachment-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e2e8f0;
}

.message-attachment-image figcaption {
  padding: 6px 8px;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment-file-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 260px;
  max-width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #1e293b;
}

.message-attachment-file-icon {
  position: relative;
  width: 34px;
  height: 36px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 6px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.message-attachment-file-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(37, 99, 235, 0.24);
  border-bottom: 1px solid rgba(37, 99, 235, 0.24);
  border-bottom-left-radius: 4px;
  background: #ffffff;
}

.message-attachment-file-icon span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 9px;
  height: 2px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 -6px 0 rgba(37, 99, 235, 0.58);
}

.message-attachment-file-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-attachment-file-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment-file-type {
  width: fit-content;
  padding: 1px 6px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.markdown-body {
  display: grid;
  gap: 14px;
}

.markdown-body > * {
  margin: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: #10233d;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.markdown-body h1 {
  font-size: 28px;
  line-height: 1.24;
}

.markdown-body h2 {
  font-size: 23px;
  line-height: 1.28;
}

.markdown-body h3 {
  font-size: 19px;
  line-height: 1.34;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 16px;
  line-height: 1.42;
}

.markdown-paragraph {
  color: #20344d;
}

.markdown-list {
  display: grid;
  gap: 8px;
  padding-left: 22px;
  color: #20344d;
}

.markdown-list li {
  padding-left: 4px;
  line-height: 1.78;
}

.markdown-quote {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-left: 3px solid #7cb7ff;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(180deg, rgba(241, 247, 255, 0.96), rgba(248, 251, 255, 0.94));
  color: #35506f;
}

.markdown-rule {
  border: 0;
  border-top: 1px solid rgba(200, 214, 232, 0.92);
  margin: 4px 0;
}

.markdown-inline-code {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  background: #eef4fb;
  color: #11407e;
  font-size: 0.92em;
  line-height: 1.6;
}

.markdown-link {
  color: #0f67de;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 103, 222, 0.22);
}

.markdown-link:hover {
  color: #0c58bf;
  border-bottom-color: rgba(12, 88, 191, 0.38);
}

.markdown-code-block {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.markdown-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.markdown-code-copy {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  background: #e2e8f0;
  color: #4b6484;
  box-shadow: inset 0 0 0 1px #d8e1ef;
}

.markdown-code-copy.copied {
  background: #ecfdf3;
  color: #169b58;
  box-shadow: inset 0 0 0 1px rgba(22, 155, 88, 0.16);
}

.markdown-code-pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow: auto;
  color: #18314e;
  font-size: 13px;
  line-height: 1.75;
}

.message-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity 150ms ease;
}

.message-card:hover .message-card-actions {
  opacity: 1;
}

.message-action-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #5f7773;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.message-action-icon:hover {
  background: #f4fbfa;
}

.message-action-icon.copied {
  background: #ecfdf3;
  color: #16a34a;
}

.composer-shell {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--color-border-light);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.96)
  );
  flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}

.composer-field {
  display: grid;
  gap: 10px;
}

.composer-shell.dragging {
  border-color: rgba(139, 92, 246, 0.36);
  background: var(--color-primary-50);
}

.composer-skill-badge {
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d7e4f2;
  background: #f3f8ff;
  color: #1f5f9c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-field textarea {
  min-height: 88px;
}

.composer-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.composer-left-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.attachment-trigger {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f1f8f6;
  color: #466560;
  box-shadow: inset 0 0 0 1px rgba(214, 228, 223, 0.96);
}

.attachment-trigger.icon-only {
  width: 38px;
  min-width: 38px;
  padding: 0;
  color: var(--ui-color-primary-strong);
  background: #edf8f6;
  box-shadow: inset 0 0 0 1px rgba(191, 216, 209, 0.96);
}

.composer-attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #f1f5f9;
  color: #1e293b;
}

.composer-attachment-chip-label {
  font-size: 13px;
  line-height: 1.4;
}

.composer-attachment-remove {
  min-width: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #5f7773;
  box-shadow: inset 0 0 0 1px rgba(214, 228, 223, 0.96);
}

.composer-drop-indicator {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(109, 93, 252, 0.42);
  border-radius: 18px;
  background: #F0F7FF;
  color: var(--ui-color-primary-strong);
  font-size: 13px;
  font-weight: 600;
}

.composer-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-submit-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #ffffff;
  animation: spinner-rotate 0.8s linear infinite;
}

.composer-left-tools-expert {
  min-height: 38px;
}

.composer-mode-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f2f6fb;
  color: #5f7188;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.skill-trigger,
.skill-chip {
  min-width: 0;
  padding: 8px 12px;
  border-radius: 999px;
}

.skill-trigger {
  width: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  color: #284843;
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(214, 228, 223, 0.96);
}

.skill-trigger.text-trigger {
  width: auto;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.skill-chip {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.18);
  color: var(--ui-color-primary-strong);
}

.composer-shell .skill-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: min(320px, calc(100vw - 96px));
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid #dbe5f1;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(35, 52, 82, 0.14);
}

.composer-shell .skill-menu-item {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.composer-shell .skill-menu-item strong {
  color: #20304b;
}

.composer-shell .skill-menu-item span {
  color: #667794;
  font-size: 12px;
  line-height: 1.6;
}

.composer-shell .skill-menu-item.active {
  border-color: rgba(13, 148, 136, 0.18);
  background: rgba(237, 248, 246, 0.96);
}

.catalog-item {

  text-align: left;
  display: grid;
  gap: 8px;
}
.catalog-item.static { cursor: default; }
.catalog-item:hover { transform: translateY(-1px); }
.catalog-item.static:hover { transform: none; }

.form-grid.single { grid-template-columns: 1fr; }
.mini-info {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e3ebf5;
}
.mini-info strong {
  max-width: 68%;
  text-align: right;
  line-height: 1.6;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(239, 247, 245, 0.98);
  color: #4f6965;
  box-shadow: inset 0 0 0 1px rgba(214, 228, 223, 0.92);
}
.status-chip.positive { background: rgba(16, 185, 129, 0.12); color: #0f7f59; }
.status-chip.warning { background: rgba(245, 158, 11, 0.14); color: #b46f0a; }

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--revamp-border);
  background: rgba(255, 255, 255, 0.78);
}

.tab-trigger {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--revamp-text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.tab-trigger:hover:not(:disabled) {
  color: var(--revamp-blue-strong);
  background: var(--revamp-surface-soft);
}

.tab-trigger.active {
  color: var(--revamp-blue-strong);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(35, 52, 82, 0.08), inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.18);
  outline-offset: 2px;
}

@keyframes notice-fade {
  0%, 78% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@keyframes cursor-blink {
  0%, 50% {
    opacity: 1;
  }
  50.1%, 100% {
    opacity: 0;
  }
}

@keyframes spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes trace-strip-shine {
  0% {
    transform: translateX(-115%);
  }
  48%, 100% {
    transform: translateX(115%);
  }
}

@keyframes trace-status-pulse {
  0%, 100% {
    opacity: 0.62;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes trace-title-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reasoning-strip.streaming::after,
  .reasoning-strip.streaming .reasoning-strip-leading::before,
  .reasoning-strip.streaming .reasoning-strip-title {
    animation: none;
  }

  .reasoning-strip.streaming::after {
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .hero-line { font-size: 21px; }
  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .composer-left-tools {
    width: 100%;
  }
  .composer-shell .skill-menu {
    width: min(100%, 320px);
  }
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--color-border-light);
  }
  .main-shell {
    height: 100%;
  }
  .nav-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .main-shell, .sidebar { padding: var(--space-4); }
  .startup-overlay { padding: 18px; }
  .startup-overlay-panel { width: 100%; }
  .startup-overlay-copy { gap: 14px; margin-top: 6px; }
  .startup-overlay-brand-line { flex-direction: column; gap: 14px; }
  .startup-overlay-brand-copy { justify-items: center; text-align: center; }
  .startup-overlay-mark-shell { width: 56px; height: 56px; }
  .startup-overlay-logo { width: 48px; height: 48px; }
  .startup-overlay-copy h1 { font-size: clamp(42px, 14vw, 60px); }
  .startup-overlay-tagline { font-size: 13px; letter-spacing: 0.24em; }
  .startup-overlay-body { width: 100%; margin-top: 28px; }
  .startup-overlay-status { width: 100%; }
  .header-actions,
  .button-row,
  .mini-info,
  .bind-row {
    align-items: stretch;
    flex-direction: column;
  }
  .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-item { justify-content: center; }
  .hero-line { font-size: 18px; }
  .chat-panel { padding: 16px; }
}

@media (max-width: 860px) {
  .workspace-directory-draft-row {
    align-items: stretch;
    flex-direction: column;
  }
}



.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.button-primary {
  background-color: #2563eb;
  color: white;
}

.button-primary:hover:not(:disabled) {
  background-color: #1d4ed8;
}

.button-secondary {
  background-color: #e5e7eb;
  color: #111827;
}

.button-secondary:hover:not(:disabled) {
  background-color: #d1d5db;
}

.button-ghost {
  background-color: transparent;
  color: #111827;
}

.button-ghost:hover:not(:disabled) {
  background-color: #f3f4f6;
}

.button-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

.button-md {
  height: 2.5rem;
  padding: 0 1rem;
  font-size: 1rem;
}

.button-lg {
  height: 3rem;
  padding: 0 1.5rem;
  font-size: 1.125rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--revamp-text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.icon-button svg {
  width: 1em;
  height: 1em;
}

.icon-button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.icon-button-sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
}

.icon-button-md {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1rem;
}

.icon-button-ghost:hover:not(:disabled),
.icon-button-subtle {
  border-color: var(--revamp-border);
  background: var(--revamp-surface-soft);
  color: var(--revamp-blue);
}

.icon-button-subtle:hover:not(:disabled) {
  background: var(--revamp-blue-soft);
  color: var(--revamp-blue-strong);
}

.icon-button-danger:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(254, 242, 242, 0.96);
  color: #dc2626;
}

.panel {
  background-color: white;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panel-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  padding: 0.75rem 1rem;
}

.panel-body {
  padding: 1rem;
}

.panel-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 0.75rem 1rem;
  background-color: #f9fafb;
}

.scroll-area {
  position: relative;
  overflow: hidden;
}

.scroll-area-content {
  height: 100%;
  width: 100%;
  overflow-y: auto;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
