:root {
  color-scheme: light;
  --paper: #faf7f0;
  --paper-warm: #f1eadf;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-solid: #ffffff;
  --ink: #1f1b16;
  --ink-soft: #51483d;
  --muted: #7c7164;
  --line: #e3d8c8;
  --line-strong: #c7b8a5;
  --gold: #b45f3a;
  --gold-soft: #d79774;
  --oxblood: #8f3324;
  --sage: #5d7468;
  --shadow: 0 18px 58px rgba(58, 43, 28, 0.1);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(31, 27, 22, 0.022) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(180deg, #fffcf6 0%, var(--paper) 54%, #f3f4ef 100%);
}

body:has(.admin-page),
body:has(.auth-page) {
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

body.admin-body,
body.auth-body {
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button,
a.download-link,
a.secondary-link {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

button:hover,
a.download-link:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 30;
  overflow: visible;
  min-height: 0;
  padding: 10px 18px;
  background:
    linear-gradient(135deg, #fffcf6 0%, #faf7f0 54%, #eef2ed 100%);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.topbar {
  position: relative;
  z-index: 40;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-seal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(167, 122, 37, 0.5);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.58);
  font: 700 20px/1 var(--serif);
  box-shadow: inset 0 0 0 6px rgba(216, 189, 124, 0.12);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar h1,
.hero-copy h2,
.section-heading h2,
.pane-title h2,
.pane-header h2,
.preview-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  margin-top: 3px;
  font-size: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: nowrap;
}

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.user-summary {
  max-width: 280px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(82, 102, 90, 0.22);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(167, 122, 37, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
  font-size: 13px;
  backdrop-filter: blur(14px);
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(82, 102, 90, 0.12);
}

.avatar-control,
.user-menu summary {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(167, 122, 37, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 5px rgba(216, 189, 124, 0.1);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.avatar-control:hover,
.user-menu summary:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 5px rgba(216, 189, 124, 0.12),
    0 10px 26px rgba(167, 122, 37, 0.18);
}

.avatar-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.user-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.user-menu {
  position: relative;
  z-index: 80;
}

.user-menu summary {
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: 0 18px 48px rgba(20, 19, 17, 0.16);
}

.user-menu[open] {
  z-index: 120;
}

.user-menu-panel button,
.user-menu-panel a,
.avatar-upload-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-panel button:hover,
.user-menu-panel a:hover,
.avatar-upload-row:hover {
  background: #f4f1ea;
  transform: none;
  box-shadow: none;
}

.avatar-upload-row input {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(20, 19, 17, 0.28);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.profile-modal {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(167, 122, 37, 0.28);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.skill-modal {
  width: min(920px, 100%);
}

.scheduled-modal {
  width: min(980px, 100%);
}

.admin-detail-modal {
  width: min(980px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 4px 0 0;
  font: 400 28px/1.1 var(--serif);
}

.user-detail-body {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.detail-grid article {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section h3 {
  margin: 0;
  font-size: 15px;
}

.detail-section p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: #fff;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-form {
  display: grid;
  gap: 14px;
  padding: 20px 22px 22px;
}

.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-form input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 12px;
  color: var(--ink);
  background: #fffdf8;
  letter-spacing: 0;
  text-transform: none;
}

.profile-form textarea {
  min-height: 168px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 12px;
  color: var(--ink);
  background: #fffdf8;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.profile-form input[readonly] {
  color: var(--muted);
  background: rgba(243, 239, 230, 0.72);
}

.profile-form input:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 189, 124, 0.18);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(185, 173, 148, 0.7);
}

.secondary-button {
  min-height: 38px;
  padding: 0 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(185, 173, 148, 0.7);
  font-weight: 700;
  font-size: 13px;
}

.primary-button {
  min-height: 38px;
  padding: 0 16px;
  color: #fffdf8;
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 900;
  font-size: 13px;
}

.danger-button {
  color: var(--oxblood);
  border-color: rgba(120, 50, 31, 0.28);
}

.danger-button:hover {
  color: #fffdf8;
  background: var(--oxblood);
  border-color: var(--oxblood);
}

.secondary-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(185, 173, 148, 0.7);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover,
.secondary-link:hover {
  background: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(167, 122, 37, 0.16);
}

.run-summary {
  min-width: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(82, 102, 90, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 12px;
}

.run-summary strong {
  color: var(--sage);
  font: 800 12px/1 var(--sans);
}

.run-summary.is-running {
  border-color: rgba(82, 102, 90, 0.5);
  background: rgba(232, 241, 236, 0.92);
}

.run-summary.is-queued {
  border-color: rgba(167, 122, 37, 0.44);
  background: rgba(255, 248, 226, 0.92);
}

.run-summary.is-failed {
  border-color: rgba(120, 50, 31, 0.42);
  background: rgba(255, 238, 232, 0.94);
}

.run-summary.is-completed {
  border-color: rgba(55, 112, 80, 0.36);
  background: rgba(234, 247, 239, 0.94);
}

.announcement-bar {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(167, 122, 37, 0.22);
  color: var(--ink-soft);
  background: rgba(255, 248, 226, 0.78);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.workspace {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 10px 12px 12px;
  overflow: hidden;
}

.mobile-view-switch {
  display: none;
}

.mobile-menu-button {
  display: none;
}

.chat-pane,
.files-pane {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(47, 38, 22, 0.08);
}

.pane-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pane-title h2,
.pane-header h2,
.preview-header h2 {
  margin-top: 4px;
  font: 400 24px/1.1 var(--serif);
}

.workbench {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 430px;
  gap: 12px;
  align-items: stretch;
}

.chat-list-pane {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(47, 38, 22, 0.08);
}

.project-toolbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--line);
}

.workspace-tool-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 800;
}

.chat-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.pane-title {
  margin: 0;
  padding: 16px 22px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.chat-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.message-search-input {
  width: 160px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 700;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px clamp(22px, 4.6vw, 78px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.7), rgba(250, 247, 240, 0.78)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 31px,
      rgba(185, 173, 148, 0.14) 32px
    );
}

.message {
  position: relative;
  max-width: min(980px, 92%);
  padding: 18px 20px;
  border: 1px solid rgba(227, 216, 200, 0.86);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.92);
  white-space: pre-wrap;
  line-height: 1.68;
  font-size: 15px;
  box-shadow: 0 14px 28px rgba(47, 38, 22, 0.07);
  animation: fadeUp 300ms ease both;
}

.message.search-hit {
  border-color: rgba(167, 122, 37, 0.68);
  box-shadow:
    0 0 0 3px rgba(216, 189, 124, 0.18),
    0 14px 28px rgba(47, 38, 22, 0.07);
}

.message::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold-soft);
}

.message.user {
  align-self: flex-end;
  background: #f1eadf;
  color: var(--ink);
  border-color: rgba(180, 95, 58, 0.32);
}

.message.user::before {
  background: var(--gold);
}

.message.assistant {
  align-self: flex-start;
}

.message.system {
  align-self: center;
  max-width: min(760px, 94%);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border-style: dashed;
  box-shadow: none;
}

.message-meta {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.message.user .message-meta {
  color: var(--muted);
}

.message-body {
  white-space: pre-wrap;
}

.inline-preview-link {
  display: inline;
  padding: 0;
  color: #0071e3;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.inline-preview-link:hover {
  color: #0057b8;
}

.message.user .inline-preview-link {
  color: #fff;
}

.message-contexts {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(185, 173, 148, 0.36);
  color: var(--muted);
  font-size: 12px;
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.message-delete-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(180, 95, 58, 0.24);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.72);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.message-delete-button:hover {
  color: #fff;
  background: #d70015;
  border-color: #d70015;
}

.live-output {
  margin: 0 24px 16px;
  border: 1px solid rgba(167, 122, 37, 0.42);
  overflow: hidden;
  background: #161410;
  box-shadow: 0 16px 42px rgba(20, 19, 17, 0.18);
}

.live-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e8dcbf;
  border-bottom: 1px solid rgba(216, 189, 124, 0.24);
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-title div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-title strong,
.live-title span {
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 0 0 rgba(216, 189, 124, 0.6);
  animation: pulse 1.6s ease infinite;
}

.live-output pre,
#previewBody {
  margin: 0;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
}

.live-output pre {
  max-height: 210px;
  padding: 14px;
  color: #efe8d5;
  font: 13px/1.58 var(--mono);
}

.live-log-details summary {
  cursor: pointer;
  padding: 10px 14px;
  color: #e8dcbf;
  border-bottom: 1px solid rgba(216, 189, 124, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.live-log-details:not([open]) pre {
  display: none;
}

.upload-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(185, 173, 148, 0.28);
}

.upload-progress div span {
  display: block;
}

.upload-progress div span {
  width: 0%;
  height: 100%;
  background: var(--gold);
  transition: width 0.16s ease;
}

.context-picker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 22px 8px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.86);
}

.context-groups {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr);
  gap: 12px;
  flex: 1;
}

.context-group {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.context-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.context-chip,
.context-empty {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  padding: 0 9px;
  border: 1px solid rgba(167, 122, 37, 0.32);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(216, 189, 124, 0.14);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.context-chip:hover {
  border-color: var(--gold);
  background: rgba(216, 189, 124, 0.24);
}

.context-chip.folder {
  border-color: rgba(93, 116, 104, 0.34);
  color: var(--sage);
  background: rgba(238, 242, 237, 0.78);
}

.context-chip.file {
  border-color: rgba(180, 95, 58, 0.28);
  background: rgba(180, 95, 58, 0.08);
}

.context-empty {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.context-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.context-actions .secondary-button,
.context-actions .icon-button {
  min-height: 32px;
}

.execution-summary {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-top: 1px solid rgba(227, 216, 200, 0.58);
  color: var(--ink-soft);
  background: rgba(255, 252, 246, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.composer {
  position: relative;
  margin: 14px 22px 18px;
  padding: 10px;
  border: 1px solid rgba(199, 184, 165, 0.86);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.95);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 8px;
  box-shadow: 0 16px 38px rgba(58, 43, 28, 0.09);
}

.composer.drag-over {
  border-color: rgba(180, 95, 58, 0.72);
  background: #fff7ed;
  box-shadow:
    0 0 0 4px rgba(180, 95, 58, 0.12),
    0 16px 38px rgba(58, 43, 28, 0.09);
}

.composer.drag-over::after {
  content: "松开上传到当前文件夹";
  position: absolute;
  inset: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(180, 95, 58, 0.58);
  border-radius: 14px;
  color: var(--gold);
  background: rgba(255, 250, 242, 0.88);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 68px;
  max-height: 180px;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink);
  background: transparent;
  outline: none;
  line-height: 1.55;
}

.composer textarea:focus {
  box-shadow: none;
}

.composer button {
  width: 44px;
  min-height: 44px;
  align-self: end;
  color: #fffdf8;
  background: var(--gold);
  border-color: var(--gold);
  border-radius: 50%;
  font-weight: 800;
  font-size: 20px;
}

.composer button:hover {
  background: #9f4f2d;
  box-shadow: 0 12px 26px rgba(180, 95, 58, 0.22);
}

.upload-button {
  width: 44px;
  min-height: 44px;
  align-self: end;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 184, 165, 0.86);
  border-radius: 50%;
  color: var(--ink);
  background: #fffaf2;
  font-weight: 900;
  font-size: 20px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.upload-button:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px rgba(167, 122, 37, 0.16);
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.files-pane {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(220px, 42%) minmax(150px, 24%) minmax(170px, 1fr);
  overflow: hidden;
}

.pane-header,
.preview-header {
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.pane-header > div,
.preview-header > div {
  min-width: 0;
}

.preview-header {
  width: 100%;
  flex: 0 0 auto;
}

#previewTitle {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane-header.compact {
  padding: 18px 16px;
}

.file-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.files-pane .secondary-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.files-pane .icon-button {
  width: 32px;
  height: 32px;
}

#currentPath {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

#currentPath {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.path-crumb {
  min-height: 22px;
  max-width: 180px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 5px;
  color: var(--sage);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-crumb:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.8);
}

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

.storage-quota {
  width: 104px;
  height: 16px;
  display: grid;
  grid-template-rows: 10px 3px;
  align-content: center;
  gap: 2px;
  margin: 0 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.storage-quota strong {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  line-height: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-quota-track {
  height: 3px;
  overflow: hidden;
  border: 0;
  background: rgba(82, 102, 90, 0.14);
}

.storage-quota-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--sage);
  transition:
    width 220ms ease,
    background 220ms ease;
}

.storage-quota.low-space {
  border-color: transparent;
}

.storage-quota.low-space strong {
  color: var(--oxblood);
}

.storage-quota.low-space .storage-quota-track {
  background: rgba(120, 50, 31, 0.1);
}

.storage-quota.low-space .storage-quota-track span {
  background: var(--oxblood);
}

.file-list {
  position: relative;
  overflow: auto;
  padding: 36px 10px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.58);
}

.scheduled-run-history {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.file-list::before {
  content: "拖拽文件到此处上传";
  position: absolute;
  top: 9px;
  left: 10px;
  right: 10px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(180, 95, 58, 0.28);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.72);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.file-list.drag-over {
  outline: 2px dashed rgba(180, 95, 58, 0.72);
  outline-offset: -7px;
  background: rgba(216, 189, 124, 0.16);
}


.chat-list {
  padding: 10px;
  display: grid;
  gap: 8px;
  overflow: auto;
  max-height: 690px;
}

.chat-list-item {
  min-height: 74px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  grid-template-rows: 1fr auto;
  gap: 6px 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: #fffdf8;
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(47, 38, 22, 0.08);
}

.chat-list-item.running .chat-list-title::after {
  content: "运行中";
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(167, 122, 37, 0.35);
  border-radius: 999px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle;
}

.chat-list-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.chat-list-time {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}

.chat-delete {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
}

.chat-delete:hover {
  color: var(--oxblood);
  border-color: rgba(120, 50, 31, 0.38);
}

.file-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr) auto 34px 34px 28px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  color: var(--ink);
}

.file-select {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
}

.file-row[draggable="true"] {
  cursor: grab;
}

.file-row[draggable="true"]:active {
  cursor: grabbing;
}

.file-row + .file-row {
  border-top-color: rgba(222, 215, 199, 0.72);
}

.file-row:hover,
.file-row.active,
.file-row.drop-target {
  background: #fffdf8;
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px rgba(47, 38, 22, 0.08);
}

.file-row.drop-target {
  border-color: var(--gold);
  background: rgba(216, 189, 124, 0.18);
}

.file-icon {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  background: rgba(255, 253, 248, 0.78);
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.file-name-wrap {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.file-origin {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.file-origin:empty {
  display: none;
}

.file-meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.file-delete {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.file-delete:hover {
  color: var(--oxblood);
  border-color: rgba(120, 50, 31, 0.42);
  background: rgba(120, 50, 31, 0.06);
}

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

.result-card {
  display: grid;
  gap: 10px;
  border-style: solid;
  background: #fffaf2;
}

.result-files,
.result-actions,
.template-list,
.credits-log-list {
  display: grid;
  gap: 8px;
}

.result-files {
  grid-template-columns: 1fr;
}

.result-files .table-action {
  width: 100%;
  justify-content: flex-start;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}

.template-list,
.credits-log-list {
  padding: 18px 22px 22px;
}

.deliverables-modal {
  width: min(920px, 100%);
}

.preview-modal {
  width: min(1440px, calc(100vw - 32px));
  height: calc(100vh - 20px);
  max-height: calc(100vh - 20px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.preview-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.preview-dialog-body {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  background: #fff;
}

.preview-dialog-body.render-preview {
  padding-top: 14px;
  box-sizing: border-box;
  overflow: hidden;
  background: #f5f5f7;
}

.preview-dialog-body .preview-frame {
  min-height: 0;
  height: 100%;
}

.preview-dialog-body.render-preview .preview-frame {
  height: calc(100% - 14px);
}

#previewDialog.modal-backdrop {
  padding: 10px 16px;
}

.deliverables-toolbar {
  display: flex;
  gap: 8px;
  padding: 14px 22px 0;
  flex-wrap: wrap;
}

.deliverables-toolbar .table-action.active {
  color: #fff;
  background: #1f1b16;
  border-color: #1f1b16;
}

.deliverables-filter {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.deliverables-list {
  max-height: min(68vh, 680px);
  overflow: auto;
}

.template-item,
.credit-log-row {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  text-align: left;
}

.task-center-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.deliverable-row.pinned {
  border-color: rgba(180, 95, 58, 0.42);
  background: #fffaf2;
}

.task-center-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.scheduled-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 0;
}

.scheduled-list-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px 22px 22px;
  border-right: 1px solid var(--line);
}

.scheduled-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.scheduled-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.scheduled-item.paused {
  opacity: 0.72;
}

.scheduled-item-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.scheduled-item-main strong,
.scheduled-item-main p,
.scheduled-item-main .task-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scheduled-item-main strong {
  color: var(--ink);
  font-size: 15px;
}

.scheduled-item-main p,
.task-meta,
.task-events,
.task-error {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.task-error {
  color: var(--oxblood);
}

.scheduled-form {
  align-content: start;
  padding: 20px 22px 22px;
}

.scheduled-form-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.scheduled-toggle span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #fffdf8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.scheduled-toggle input {
  width: auto;
  min-height: auto;
  accent-color: #0071e3;
}

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

.scheduled-form-hint {
  padding: 10px 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 12px;
  color: #424245;
  background: rgba(0, 113, 227, 0.06);
  font-size: 12px;
  line-height: 1.5;
}

.task-center-main strong {
  font-size: 15px;
}

.task-center-main p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.task-status {
  width: max-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(82, 102, 90, 0.28);
  border-radius: 999px;
  color: var(--sage);
  background: rgba(232, 241, 236, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.status-queued .task-status {
  color: var(--gold);
  border-color: rgba(167, 122, 37, 0.35);
  background: rgba(255, 248, 226, 0.92);
}

.status-failed .task-status {
  color: var(--oxblood);
  border-color: rgba(120, 50, 31, 0.32);
  background: rgba(255, 238, 232, 0.94);
}

.status-success .task-status {
  color: #2f6f4e;
  border-color: rgba(47, 111, 78, 0.32);
  background: rgba(234, 247, 239, 0.94);
}

.task-meta,
.task-events,
.task-error {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.task-events {
  padding-left: 10px;
  border-left: 2px solid rgba(93, 116, 104, 0.24);
}

.task-error {
  color: var(--oxblood);
}

.task-files,
.task-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.template-item strong,
.credit-log-row strong {
  font-size: 14px;
}

.template-item span,
.credit-log-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1.1fr);
  gap: 16px;
  padding: 18px 22px 22px;
}

.skill-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.skill-section:last-child {
  grid-column: 1 / -1;
}

.skill-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.skill-section-title strong {
  font-size: 14px;
}

.skill-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.skill-list {
  display: grid;
  gap: 8px;
}

.skill-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.skill-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
}

.skill-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.skill-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.skill-form {
  padding: 0;
}

.download-link {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 9px 14px;
  color: #fffdf8;
  background: var(--gold);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.download-link:hover {
  background: #8c641d;
  box-shadow: 0 12px 28px rgba(167, 122, 37, 0.22);
}

#previewBody {
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 18px 20px;
  color: #2b2924;
  font: 13px/1.68 var(--mono);
  background: #fffdf8;
  overflow: auto;
}

#previewBody.render-preview {
  padding: 0;
  font-family: var(--sans);
  background: #fff;
}

.preview-frame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  border: 0;
  background: #fff;
}

.preview-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(199, 184, 165, 0.72);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.68);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.empty-state.compact {
  padding: 10px 8px;
  font-size: 12px;
}

.binary-preview {
  display: grid;
  gap: 10px;
  font-family: var(--sans);
  line-height: 1.5;
}

.binary-preview strong {
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.binary-preview span {
  color: var(--muted);
}

.binary-preview a {
  width: max-content;
  padding: 9px 13px;
  border-radius: 999px;
  color: #fffdf8;
  background: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.auth-page {
  min-height: 100vh;
  padding: clamp(22px, 5vw, 70px);
  background:
    radial-gradient(circle at 82% 18%, rgba(216, 189, 124, 0.2), transparent 28%),
    linear-gradient(135deg, #fffefa 0%, #f4efe5 100%);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #f6f7f6;
}

.admin-page {
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding: 28px;
  background: #f6f7f6;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand span {
  display: block;
}

.admin-sidebar-brand strong {
  font-size: 15px;
}

.admin-sidebar-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-sidebar nav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.admin-sidebar a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.admin-sidebar a:hover {
  color: var(--ink);
  background: #f4f1ea;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(34px, 7vw, 110px);
}

.auth-hero h1,
.admin-header h1 {
  margin: 12px 0 0;
  font: 400 clamp(48px, 7vw, 86px) / 0.98 var(--serif);
}

.auth-hero p:last-child,
.admin-header p {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
}

.auth-feature-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  color: var(--ink-soft);
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
}

.auth-feature-list li {
  position: relative;
  padding-left: 18px;
}

.auth-feature-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.auth-panel,
.invite-admin,
.bulk-credits-admin,
.ops-panel,
.admin-table-wrap,
.admin-metrics article {
  border: 1px solid rgba(185, 173, 148, 0.48);
  background: #fff;
  box-shadow: 0 14px 36px rgba(47, 38, 22, 0.08);
}

.auth-panel {
  padding: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-tab {
  min-height: 42px;
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
  font-weight: 800;
}

.auth-tab.active {
  color: #fffdf8;
  background: var(--ink);
  border-color: var(--ink);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 13px;
  color: var(--ink);
  background: #fffdf8;
  letter-spacing: 0;
  text-transform: none;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 189, 124, 0.18);
}

.auth-form button {
  min-height: 50px;
  margin-top: 8px;
  color: #fffdf8;
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 900;
}

.auth-message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--oxblood);
  line-height: 1.55;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.compact-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 0;
}

.compact-metrics .wide-metric {
  grid-column: span 2;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dashboard-insight-grid > article {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
}

.dashboard-insight-grid h3 {
  margin: 0;
  font-size: 14px;
}

.ops-list.compact {
  padding: 0;
}

.invite-admin {
  margin-bottom: 18px;
  padding: 18px;
}

.bulk-credits-admin {
  margin-bottom: 18px;
  padding: 18px;
}

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

.ops-panel {
  min-width: 0;
  padding: 18px;
}

.ops-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  margin-bottom: 10px;
  color: var(--sage);
  border: 1px solid rgba(82, 102, 90, 0.22);
  background: rgba(255, 253, 248, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.ops-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.ops-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.ops-row strong,
.ops-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-row strong {
  color: var(--ink);
  font-size: 13px;
}

.ops-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ops-row p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.memory-row {
  align-items: start;
}

.ops-row b {
  color: var(--gold);
  font-size: 13px;
  white-space: nowrap;
}

.storage-quota-control {
  display: grid;
  grid-template-columns: auto 68px auto;
  align-items: center;
  gap: 7px;
}

.storage-bulk-form {
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.storage-quota-control input {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 8px;
  color: var(--ink);
  background: #fffdf8;
}

.storage-quota-control input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 189, 124, 0.16);
}

.table-select {
  display: block;
  margin-top: 7px;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
}

.file-search-input {
  width: 82px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
}

.file-sort-select {
  min-height: 34px;
  max-width: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 700;
}

.file-rename,
.file-move {
  width: 34px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(199, 184, 165, 0.62);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.72);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.file-rename:hover,
.file-move:hover {
  color: var(--gold);
  border-color: rgba(180, 95, 58, 0.38);
  background: #fffaf2;
}

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

.failure-hint {
  color: var(--muted);
  font-size: 12px;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 18px 42px rgba(47, 38, 22, 0.16);
  font-size: 13px;
  font-weight: 800;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.success {
  border-color: rgba(55, 128, 94, 0.32);
}

.toast.error {
  border-color: rgba(120, 50, 31, 0.36);
  color: var(--oxblood);
}

.toast.leaving {
  opacity: 0;
  transform: translateY(8px);
}

.invite-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.inline-admin-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-admin-form input {
  width: 86px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 10px;
  color: var(--ink);
  background: #fffdf8;
}

.inline-admin-form input[type="text"] {
  width: 132px;
}

.inline-admin-form input#inviteNoteInput {
  width: 180px;
}

.invite-filterbar,
.audit-filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}

.invite-filterbar input,
.invite-filterbar select,
.audit-filterbar input,
.audit-filterbar select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 10px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 800;
}

.invite-filterbar input,
.audit-filterbar input:first-child {
  min-width: min(320px, 100%);
  flex: 1 1 220px;
}

.settings-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

#taskSettingsForm {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

.settings-group-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 0 4px;
}

.settings-group-tabs span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.72);
  font-size: 12px;
  font-weight: 900;
}

#taskSettingsForm .settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

#taskSettingsForm .settings-grid label {
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

#taskSettingsForm .settings-grid label:nth-child(-n + 7)::before {
  content: "任务并发";
  color: #0071e3;
  font-size: 10px;
  font-weight: 900;
}

#taskSettingsForm .settings-grid label:nth-child(n + 8):nth-child(-n + 13)::before {
  content: "成本积分";
  color: #5856d6;
  font-size: 10px;
  font-weight: 900;
}

#taskSettingsForm .settings-grid label:nth-child(n + 14):nth-child(-n + 15)::before {
  content: "存储上传";
  color: #248a3d;
  font-size: 10px;
  font-weight: 900;
}

#taskSettingsForm .settings-grid label:nth-child(n + 16)::before {
  content: "记忆策略";
  color: #b25000;
  font-size: 10px;
  font-weight: 900;
}

.settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-form input,
.settings-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 9px;
  color: var(--ink);
  background: #fffdf8;
}

.settings-form textarea {
  min-height: 72px;
  padding: 9px;
  resize: vertical;
}

.settings-toggles {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
}

.settings-toggles input {
  width: auto;
  min-height: auto;
}

.settings-hint {
  padding: 9px 10px;
  border: 1px solid rgba(167, 122, 37, 0.22);
  color: var(--muted);
  background: rgba(255, 248, 226, 0.5);
  font-size: 12px;
  line-height: 1.5;
}

.admin-role-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(60, 60, 67, 0.16);
  padding: 0 10px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.role-label {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

.admin-role-select {
  margin-top: 6px;
  width: 100%;
}

.invite-header h2 {
  margin: 4px 0 0;
  font: 400 26px/1.1 var(--serif);
}

.invite-list {
  display: grid;
  gap: 8px;
  min-height: 600px;
}

.invite-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.invite-row strong {
  color: var(--ink);
  font: 900 17px/1 var(--mono);
  letter-spacing: 0.12em;
}

.invite-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-row.used {
  opacity: 0.62;
}

.member-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.member-toolbar h2 {
  margin: 4px 0 0;
  font: 400 26px/1.1 var(--serif);
}

.member-search {
  min-width: min(360px, 100%);
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-search input {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 12px;
  color: var(--ink);
  background: #fffdf8;
  letter-spacing: 0;
  text-transform: none;
}

.member-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 189, 124, 0.16);
}

.member-filterbar,
.member-bulkbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px 0;
}

.member-filterbar select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 800;
}

.member-bulkbar {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 246, 0.62);
}

.member-bulkbar span {
  margin-right: auto;
  color: var(--sage);
  font-size: 13px;
  font-weight: 900;
}

.bulk-credits-form {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(170px, 220px) minmax(150px, 190px) auto;
  gap: 12px;
  align-items: end;
}

.bulk-credits-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bulk-credits-form input,
.bulk-credits-form select {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 11px;
  color: var(--ink);
  background: #fffdf8;
  letter-spacing: 0;
  text-transform: none;
}

.bulk-credits-form input:focus,
.bulk-credits-form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 189, 124, 0.16);
}

.pager {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-table-wrap .pager {
  padding: 14px 18px 18px;
}

.pager span {
  min-width: 150px;
  text-align: center;
}

.admin-metrics article {
  min-height: 118px;
  padding: 20px;
}

.admin-metrics span {
  display: block;
  font: 400 44px/1 var(--serif);
}

.compact-metrics span {
  overflow-wrap: anywhere;
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1.15;
}

.admin-metrics strong {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.admin-table th,
.admin-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.status-chip {
  display: inline-flex;
  width: max-content;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
}

.status-chip.pending {
  color: var(--oxblood);
  border-color: rgba(120, 50, 31, 0.35);
}

.status-chip.approved {
  color: var(--sage);
  border-color: rgba(82, 102, 90, 0.35);
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.credits-control,
.password-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.credits-control input,
.password-control input {
  width: 92px;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 9px;
  color: var(--ink);
  background: #fffdf8;
}

.password-control input {
  width: 130px;
}

.credits-control input:focus,
.password-control input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 189, 124, 0.16);
}

.table-action {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: #fffdf8;
  border-color: var(--line-strong);
  font-size: 12px;
  font-weight: 800;
}

.table-action:hover {
  border-color: var(--gold);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(216, 189, 124, 0.58);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(216, 189, 124, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(216, 189, 124, 0);
  }
}

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

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

  .admin-sidebar nav {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-center {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .workbench {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  body {
    overflow: auto;
  }

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

  .chat-pane {
    height: 70vh;
    min-height: 520px;
  }

  .files-pane {
    height: 620px;
    min-height: 0;
  }

  .chat-list {
    max-height: 260px;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

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

  .bulk-credits-form {
    grid-template-columns: 1fr 1fr;
  }

  .skills-layout {
    grid-template-columns: 1fr;
  }

  .scheduled-layout {
    grid-template-columns: 1fr;
  }

  .scheduled-list-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .skill-section:last-child {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 12px 14px;
  }

  .topbar {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
  }

  .topbar-center {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    max-height: 42px;
    overflow: hidden;
  }

  .topbar-actions.open,
  .topbar-actions:has(.user-menu[open]) {
    max-height: none;
    overflow: visible;
  }

  .user-menu-panel {
    left: auto;
    right: 0;
    width: min(240px, calc(100vw - 28px));
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .topbar-actions > :not(.mobile-menu-button) {
    min-width: 0;
  }

  .hero-status-row {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .run-summary {
    width: 100%;
  }

  .announcement-bar {
    white-space: normal;
  }

  .workspace {
    padding: 10px;
  }

  .mobile-view-switch {
    position: sticky;
    top: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.94);
  }

  .mobile-view-switch button {
    min-height: 36px;
    border: 1px solid transparent;
    color: var(--muted);
    background: transparent;
    font-weight: 900;
  }

  .mobile-view-switch button.active {
    color: var(--ink);
    border-color: var(--line-strong);
    background: #fffdf8;
  }

  body[data-mobile-view="chats"] .chat-pane,
  body[data-mobile-view="chats"] .files-pane,
  body[data-mobile-view="dialogue"] .chat-list-pane,
  body[data-mobile-view="dialogue"] .files-pane,
  body[data-mobile-view="files"] .chat-list-pane,
  body[data-mobile-view="files"] .chat-pane {
    display: none;
  }

  .chat-pane,
  .files-pane,
  .chat-list-pane {
    height: calc(100vh - 132px);
    min-height: 0;
  }

  .files-pane {
    resize: vertical;
    overflow: auto;
  }

  .file-row {
    grid-template-columns: 18px 28px minmax(0, 1fr) 44px 28px;
    gap: 7px;
    padding-inline: 8px;
  }

  .file-rename,
  .file-move {
    display: none;
  }

  .file-meta {
    font-size: 10px;
  }

  .message {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .context-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .context-groups {
    grid-template-columns: 1fr;
  }

  .execution-summary {
    align-items: flex-start;
    min-height: 0;
    padding: 8px 14px;
    line-height: 1.45;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    margin-inline: 12px;
  }

  .composer button,
  .upload-button {
    width: 42px;
    min-height: 42px;
  }

  .admin-header {
    flex-direction: column;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .bulk-credits-form {
    grid-template-columns: 1fr;
  }

  .skills-layout {
    padding: 14px;
  }

  .scheduled-item {
    grid-template-columns: 1fr;
  }

  .scheduled-form-grid,
  .scheduled-path-row {
    grid-template-columns: 1fr;
  }

  .invite-header,
  .inline-admin-form {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-admin-form input {
    width: 100%;
  }

  .inline-admin-form input[type="text"],
  .inline-admin-form input#inviteNoteInput,
  .invite-filterbar input,
  .invite-filterbar select,
  .audit-filterbar input,
  .audit-filterbar select {
    width: 100%;
  }

  .dashboard-insight-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin information architecture refinements */
.admin-page {
  display: grid;
  align-content: start;
  gap: 18px;
}

.admin-header,
.admin-metrics,
.invite-admin,
.bulk-credits-admin,
.ops-grid,
.admin-table-wrap {
  margin-bottom: 0;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px 0;
  margin: -28px 0 0;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.admin-header h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.admin-sidebar nav {
  gap: 8px;
}

.admin-sidebar a {
  min-height: 42px;
}

.admin-metrics article {
  min-height: 104px;
}

.compact-metrics {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.invite-admin,
.bulk-credits-admin,
.ops-panel,
.admin-table-wrap {
  scroll-margin-top: 96px;
}

#templates,
#invites {
  position: relative;
}

#templates::before,
#credits::before,
#memory::before,
#users::before {
  display: block;
  margin: 0 0 12px;
  color: #86868b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#templates::before {
  content: "运营";
}

#credits::before {
  content: "系统与成本";
}

#memory::before {
  content: "记忆治理";
}

#users::before {
  content: "用户管理";
}

.ops-grid {
  grid-template-columns: minmax(380px, 1.35fr) minmax(300px, 1fr) minmax(300px, 1fr);
}

#tasks {
  grid-row: span 2;
}

.admin-table-wrap {
  order: 20;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.94);
}

@media (max-width: 1080px) {
  .admin-header {
    position: static;
    margin-top: 0;
  }

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

/* Product workflow refinements */
.topbar-actions {
  gap: 8px;
}

.workbench {
  grid-template-columns: 250px minmax(0, 1fr) minmax(360px, 420px);
}

body.files-collapsed .workbench {
  grid-template-columns: 250px minmax(0, 1fr) 0;
}

body.files-collapsed .files-pane {
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
}

.files-pane {
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.chat-pane {
  position: relative;
}

.composer {
  grid-template-columns: minmax(190px, 280px) minmax(170px, 220px) minmax(0, 1fr) 44px 92px 104px;
}

.composer textarea {
  grid-column: 1 / -1;
}

.composer-skill-select {
  align-self: center;
  min-width: 190px;
  max-width: 280px;
  min-height: 40px;
  padding: 0 34px 0 12px;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 700;
}

.composer-output-formats {
  position: relative;
  align-self: center;
  min-height: 40px;
}

.composer-output-formats summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 12px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.composer-output-formats summary::-webkit-details-marker {
  display: none;
}

.composer-output-format-options {
  position: absolute;
  z-index: 12;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(260px, 78vw);
  padding: 8px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
}

.composer-output-format-options label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 700;
}

.composer-skill-description {
  grid-column: 1 / -1;
  padding: 8px 10px 0;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.composer-cost-hint {
  align-self: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.result-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 14px;
  padding: 16px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.07);
}

.result-panel[hidden] {
  display: none;
}

.result-panel h3,
.result-panel p {
  margin: 0;
}

.result-panel h3 {
  margin-top: 4px;
  font-size: 18px;
}

.result-panel p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.result-panel-files {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.task-guide-form {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
}

.task-guide-modal {
  width: min(720px, 100%);
}

.task-guide-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.task-run-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.86);
}

.task-run-option {
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.task-run-option.active {
  color: #fff;
  background: #0071e3;
}

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

.task-type-card {
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.task-type-card strong {
  font-size: 15px;
}

.task-type-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.task-type-card.active,
.task-type-card:hover {
  border-color: rgba(0, 113, 227, 0.34);
  background: rgba(0, 113, 227, 0.08);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.1);
}

.task-guide-form select,
.task-guide-form input,
.task-guide-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.task-guide-form select {
  min-height: 44px;
  padding: 0 12px;
}

.task-guide-form input {
  min-height: 44px;
  padding: 0 12px;
}

.task-guide-form textarea {
  min-height: 130px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.task-guide-context {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 16px;
  color: #0071e3;
  background: rgba(0, 113, 227, 0.07);
}

.task-guide-context span,
.task-guide-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.asset-groups {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  overflow: auto;
}

.asset-groups details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  overflow: hidden;
}

.asset-groups summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.asset-list {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.asset-item,
.asset-empty {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(245, 245, 247, 0.72);
  font-size: 12px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-item:hover {
  color: #0071e3;
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.08);
}

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

.task-guide-hint {
  margin: -4px 0 0;
}

.file-row.generated .file-icon {
  color: #5856d6;
  background: rgba(88, 86, 214, 0.1);
}

.file-row.generated .file-name::after {
  content: "结果";
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #5856d6;
  background: rgba(88, 86, 214, 0.1);
  font-size: 10px;
  font-weight: 800;
}

.files-pane .file-nav-actions {
  gap: 5px;
}

.files-pane .secondary-button.danger-button {
  color: #d70015;
}

@media (max-width: 1080px) {
  body.files-collapsed .workbench,
  .workbench {
    grid-template-columns: 1fr;
  }

  body.files-collapsed .files-pane {
    display: none;
  }
}

@media (max-width: 720px) {
  .composer {
    grid-template-columns: minmax(0, 1fr) 42px 86px;
  }

  .composer textarea {
    grid-column: 1 / -1;
  }

  .composer-output-formats,
  .composer-cost-hint {
    grid-column: 1 / -1;
  }

  .composer-output-formats summary,
  .composer-cost-hint {
    min-height: 42px;
  }

  .composer-cost-hint {
    display: inline-flex;
    align-items: center;
    padding-left: 6px;
    white-space: normal;
  }

  .composer-skill-select {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }

  .composer-output-format-options {
    width: 100%;
  }

  .result-panel {
    grid-template-columns: 1fr;
    margin-inline: 12px;
  }

  .result-panel-files,
  .result-panel .result-actions {
    justify-content: flex-start;
  }

  .task-type-grid {
    grid-template-columns: 1fr;
  }

  .task-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* Apple product-style visual refresh */
:root {
  color-scheme: light;
  --paper: #f5f5f7;
  --paper-warm: #fbfbfd;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-solid: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #3a3a3c;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.14);
  --line-strong: rgba(60, 60, 67, 0.24);
  --gold: #0071e3;
  --gold-soft: #5eb0ff;
  --oxblood: #d70015;
  --sage: #34c759;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.11);
  --serif:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", sans-serif;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

html {
  background: #f5f5f7;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 44%, #eeeff2 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a.download-link,
a.secondary-link,
.upload-button,
.chat-list-item,
.file-row,
.template-item,
.credit-log-row,
.skill-item,
.ops-row,
.invite-row {
  border-radius: 14px;
}

button,
a.download-link,
a.secondary-link {
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

button:hover,
a.download-link:hover,
.upload-button:hover {
  transform: translateY(-1px);
}

button:active,
a.download-link:active,
.upload-button:active {
  transform: scale(0.985);
}

.hero {
  padding: 12px 18px 10px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.topbar {
  min-height: 54px;
  padding: 8px 0;
}

.brand-seal {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, #1d1d1f 0%, #3a3a3c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.12);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 800;
}

.eyebrow,
.section-kicker {
  color: #86868b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.topbar h1 {
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 700;
}

.status-pill,
.user-summary,
.run-summary,
.announcement-bar,
.mobile-view-switch {
  border: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.status-pill,
.user-summary {
  min-height: 36px;
  color: #3a3a3c;
  font-weight: 600;
}

.status-pill::before {
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.14);
}

.avatar-control,
.user-menu summary {
  border: 1px solid rgba(60, 60, 67, 0.14);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 10px 22px rgba(0, 0, 0, 0.08);
}

.avatar-control:hover,
.user-menu summary:hover {
  border-color: rgba(0, 113, 227, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 28px rgba(0, 113, 227, 0.14);
}

.user-menu-panel,
.profile-modal,
.auth-panel,
.invite-admin,
.bulk-credits-admin,
.ops-panel,
.admin-table-wrap,
.admin-metrics article,
.chat-list-pane,
.chat-pane,
.files-pane {
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 18px 50px rgba(0, 0, 0, 0.08);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.user-menu-panel {
  width: 232px;
  padding: 8px;
  border-radius: 18px;
}

.user-menu-panel button,
.user-menu-panel a,
.avatar-upload-row {
  border-radius: 10px;
  color: #1d1d1f;
  font-weight: 600;
}

.user-menu-panel button:hover,
.user-menu-panel a:hover,
.avatar-upload-row:hover {
  background: rgba(0, 113, 227, 0.08);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}

.modal-header,
.pane-title,
.pane-header,
.preview-header,
.member-toolbar,
.member-bulkbar {
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.modal-header h2,
.pane-title h2,
.pane-header h2,
.preview-header h2,
.invite-header h2,
.member-toolbar h2 {
  color: #1d1d1f;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.18;
}

.auth-hero h1,
.admin-header h1 {
  color: #1d1d1f;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0;
}

.icon-button,
.secondary-button,
.secondary-link,
.table-action,
.auth-tab,
.file-rename,
.file-move {
  color: #1d1d1f;
  border-color: rgba(60, 60, 67, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.primary-button,
.auth-form button,
.download-link,
.binary-preview a {
  color: #fff;
  border-color: #0071e3;
  background: #0071e3;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.22);
  font-weight: 700;
}

.icon-button:hover,
.secondary-button:hover,
.secondary-link:hover,
.table-action:hover,
.auth-tab:hover,
.file-rename:hover,
.file-move:hover {
  color: #0071e3;
  border-color: rgba(0, 113, 227, 0.28);
  background: rgba(0, 113, 227, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.primary-button:hover,
.auth-form button:hover,
.download-link:hover,
.binary-preview a:hover {
  background: #0077ed;
  border-color: #0077ed;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.26);
}

.danger-button,
.danger-text {
  color: #d70015 !important;
}

.danger-button:hover {
  color: #fff !important;
  background: #d70015;
  border-color: #d70015;
}

input,
textarea,
select,
.profile-form input,
.profile-form textarea,
.auth-form input,
.member-search input,
.bulk-credits-form input,
.bulk-credits-form select,
.settings-form input,
.settings-form textarea,
.inline-admin-form input,
.storage-quota-control input,
.credits-control input,
.password-control input,
.table-select,
.message-search-input,
.file-search-input,
.file-sort-select {
  border-color: rgba(60, 60, 67, 0.18);
  border-radius: 12px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input:focus,
textarea:focus,
select:focus,
.profile-form input:focus,
.profile-form textarea:focus,
.auth-form input:focus,
.member-search input:focus,
.bulk-credits-form input:focus,
.bulk-credits-form select:focus,
.settings-form input:focus,
.settings-form textarea:focus,
.inline-admin-form input:focus,
.storage-quota-control input:focus,
.credits-control input:focus,
.password-control input:focus,
.message-search-input:focus,
.file-search-input:focus,
.file-sort-select:focus {
  outline: none;
  border-color: rgba(0, 113, 227, 0.55);
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.workspace {
  padding: 12px;
}

.workbench {
  gap: 12px;
}

.messages {
  background:
    linear-gradient(180deg, rgba(251, 251, 253, 0.92), rgba(245, 245, 247, 0.9));
  gap: 14px;
}

.message {
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);
  font-size: 15px;
  line-height: 1.62;
}

.message::before {
  display: none;
}

.message.user {
  color: #fff;
  border-color: #0071e3;
  background: linear-gradient(180deg, #0a84ff 0%, #0071e3 100%);
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.2);
}

.message.user .message-meta {
  color: rgba(255, 255, 255, 0.76);
}

.message.user .message-contexts {
  color: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(255, 255, 255, 0.28);
}

.message.user .message-delete-button {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.message.assistant {
  color: #1d1d1f;
}

.message.system {
  color: #6e6e73;
  border-style: solid;
  background: rgba(255, 255, 255, 0.58);
}

.message-meta,
.message-contexts {
  color: #86868b;
  letter-spacing: 0;
  text-transform: none;
}

.message.search-hit {
  border-color: rgba(0, 113, 227, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.12),
    0 8px 26px rgba(0, 0, 0, 0.06);
}

.live-output {
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 18px;
  background: #1d1d1f;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.live-title,
.live-log-details summary {
  color: #f5f5f7;
  border-bottom-color: rgba(255, 255, 255, 0.12);
  letter-spacing: 0;
  text-transform: none;
}

.pulse-dot {
  background: #34c759;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5);
}

.live-output pre {
  color: #e8e8ed;
}

.context-picker,
.execution-summary {
  border-top: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.66);
}

.context-chip,
.context-empty {
  border-color: rgba(0, 113, 227, 0.2);
  color: #0071e3;
  background: rgba(0, 113, 227, 0.08);
  font-weight: 600;
}

.context-chip.folder {
  color: #248a3d;
  border-color: rgba(52, 199, 89, 0.22);
  background: rgba(52, 199, 89, 0.1);
}

.context-chip.file {
  color: #5856d6;
  border-color: rgba(88, 86, 214, 0.2);
  background: rgba(88, 86, 214, 0.08);
}

.composer {
  grid-template-columns: minmax(190px, 280px) minmax(170px, 220px) minmax(0, 1fr) 44px 92px 104px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 18px 44px rgba(0, 0, 0, 0.1);
}

.composer textarea {
  color: #1d1d1f;
  border-radius: 16px;
}

.composer-skill-select {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(255, 255, 255, 0.78);
}

.composer-output-formats summary {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 720px) {
  .composer {
    grid-template-columns: minmax(0, 1fr) 42px 86px;
  }

  .composer-skill-select,
  .composer-output-formats,
  .composer-skill-description,
  .composer-cost-hint {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }
}

.composer button {
  color: #fff;
  background: #0071e3;
  border-color: #0071e3;
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.24);
}

.composer button:hover {
  background: #0077ed;
  box-shadow: 0 12px 26px rgba(0, 113, 227, 0.28);
}

.composer .composer-submit-button,
.composer .composer-cancel-button {
  width: auto;
  min-width: 0;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}

.composer .composer-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 800;
}

.composer .composer-submit-button span:first-child {
  font-size: 18px;
  line-height: 1;
}

.composer .composer-cancel-button {
  color: #b42318;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(180, 35, 24, 0.28);
  box-shadow: none;
  font-weight: 800;
}

.composer .composer-cancel-button:hover {
  color: #fff;
  background: #b42318;
  border-color: #b42318;
  box-shadow: 0 12px 26px rgba(180, 35, 24, 0.18);
}

.running-choice-modal {
  width: min(560px, 100%);
}

.running-choice-body {
  display: grid;
  gap: 18px;
  padding: 20px 22px 22px;
}

.running-choice-body p {
  margin: 0;
  color: #424245;
  line-height: 1.65;
}

.running-choice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .composer .composer-cancel-button {
    grid-column: 1 / 2;
  }

  .composer .composer-submit-button {
    grid-column: 2 / 4;
  }

  .running-choice-actions {
    display: grid;
  }
}

.upload-button {
  color: #0071e3;
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.composer.drag-over {
  border-color: rgba(0, 113, 227, 0.55);
  background: rgba(240, 248, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.13),
    0 18px 44px rgba(0, 0, 0, 0.1);
}

.composer.drag-over::after {
  border-color: rgba(0, 113, 227, 0.44);
  color: #0071e3;
  background: rgba(255, 255, 255, 0.86);
}

.file-list {
  background: rgba(248, 248, 250, 0.72);
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
}

.file-list::before {
  border-color: rgba(0, 113, 227, 0.2);
  border-radius: 12px;
  color: #86868b;
  background: rgba(255, 255, 255, 0.62);
}

.chat-list-item,
.file-row,
.template-item,
.credit-log-row,
.task-center-row,
.scheduled-item,
.skill-item,
.ops-row,
.invite-row,
.detail-grid article,
.detail-section p,
.empty-state {
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.chat-list-item:hover,
.chat-list-item.active,
.file-row:hover,
.file-row.active,
.file-row.drop-target,
.template-item:hover,
.scheduled-item:hover {
  border-color: rgba(0, 113, 227, 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.07);
}

.chat-list-item.active {
  box-shadow:
    inset 3px 0 0 #0071e3,
    0 10px 26px rgba(0, 0, 0, 0.07);
}

.chat-list-item.running .chat-list-title::after,
.task-status,
.status-chip {
  border-color: rgba(0, 113, 227, 0.2);
  color: #0071e3;
  background: rgba(0, 113, 227, 0.08);
  font-weight: 700;
}

.file-select {
  accent-color: #0071e3;
}

.file-row + .file-row {
  border-top-color: rgba(60, 60, 67, 0.08);
}

.file-icon {
  border: 0;
  border-radius: 10px;
  color: #0071e3;
  background: rgba(0, 113, 227, 0.09);
}

.file-origin,
.ops-row b {
  color: #0071e3;
}

.file-delete {
  border-color: rgba(60, 60, 67, 0.12);
  color: #86868b;
  background: rgba(255, 255, 255, 0.6);
}

.file-delete:hover,
.chat-delete:hover {
  color: #d70015;
  border-color: rgba(215, 0, 21, 0.22);
  background: rgba(215, 0, 21, 0.08);
}

.storage-quota-track,
.upload-progress div {
  background: rgba(60, 60, 67, 0.12);
  border-radius: 999px;
}

.storage-quota-track span,
.upload-progress div span {
  background: #0071e3;
}

.storage-quota.low-space strong,
.task-error,
.auth-message {
  color: #d70015;
}

.storage-quota.low-space .storage-quota-track span,
.status-failed .task-status {
  background: rgba(215, 0, 21, 0.1);
  color: #d70015;
  border-color: rgba(215, 0, 21, 0.22);
}

.status-success .task-status,
.status-chip.approved {
  color: #248a3d;
  border-color: rgba(52, 199, 89, 0.24);
  background: rgba(52, 199, 89, 0.1);
}

.status-queued .task-status,
.status-chip.pending {
  color: #b25000;
  border-color: rgba(255, 149, 0, 0.26);
  background: rgba(255, 149, 0, 0.11);
}

.preview {
  background: rgba(255, 255, 255, 0.5);
}

#previewBody {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.72);
}

.result-card {
  background: rgba(255, 255, 255, 0.88);
}

.auth-page {
  background:
    linear-gradient(180deg, rgba(251, 251, 253, 0.96), rgba(245, 245, 247, 0.96));
}

.auth-panel {
  padding: 28px;
}

.auth-tab {
  border-radius: 12px;
}

.auth-tab.active {
  color: #fff;
  background: #1d1d1f;
  border-color: #1d1d1f;
}

.admin-shell,
.admin-page {
  background: #f5f5f7;
}

.admin-sidebar {
  border-right: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.admin-sidebar a {
  border-radius: 12px;
  color: #515154;
  font-weight: 600;
}

.admin-sidebar a:hover {
  color: #0071e3;
  background: rgba(0, 113, 227, 0.08);
}

.admin-metrics span {
  color: #1d1d1f;
  font-family: var(--sans);
  font-weight: 750;
}

.ops-summary,
.settings-hint {
  border-color: rgba(0, 113, 227, 0.16);
  color: #0071e3;
  background: rgba(0, 113, 227, 0.07);
  border-radius: 14px;
}

.admin-table th,
.admin-table td {
  border-bottom-color: rgba(60, 60, 67, 0.1);
}

.admin-table th {
  color: #86868b;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.admin-table tbody tr:hover {
  background: rgba(0, 113, 227, 0.035);
}

.member-filterbar select {
  border-radius: 12px;
}

.toast {
  border-color: rgba(60, 60, 67, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 18px 44px rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.toast.success {
  border-color: rgba(52, 199, 89, 0.26);
}

.toast.error {
  border-color: rgba(215, 0, 21, 0.26);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.48);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 199, 89, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 12px;
  }

  .mobile-view-switch {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
  }

  .mobile-view-switch button {
    border-radius: 12px;
  }

  .mobile-view-switch button.active {
    color: #0071e3;
    border-color: rgba(0, 113, 227, 0.2);
    background: rgba(0, 113, 227, 0.08);
  }

  .chat-pane,
  .files-pane,
  .chat-list-pane {
    border-radius: 20px;
  }

  .message {
    border-radius: 18px;
  }
}
