:root {
  --brand: #1769e0;
  --brand-deep: #0d3f91;
  --brand-cyan: #08b7c9;
  --ink: #132342;
  --muted: #60708c;
  --line: #dbe4f0;
  --panel: #ffffff;
  --page: #f3f7fb;
  --amazon-dark: #071a38;
  --amazon-blue: #12325f;
  --ok: #0f766e;
  --danger: #b42318;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

/* Yuhua operations workspace v29 */
.login-view {
  background-color: #071a38;
  background-image: radial-gradient(circle at 78% 18%, rgba(8, 183, 201, 0.18), transparent 32%), radial-gradient(circle at 18% 82%, rgba(23, 105, 224, 0.22), transparent 34%);
}

.login-panel {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 28px 80px rgba(1, 16, 40, 0.36);
}

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 7px 22px rgba(4, 63, 145, 0.18);
}

.app-shell {
  grid-template-columns: 264px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  background: #071a38;
  overflow: hidden;
}

.nav-list {
  overflow-y: auto;
  padding: 8px 12px 20px;
  scrollbar-width: thin;
  scrollbar-color: #31517e transparent;
}

.nav-group-label {
  padding: 14px 12px 5px;
  color: #7f9abc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.nav-item,
.ghost-button {
  min-height: 42px;
  border-radius: 9px;
  color: #c9d8ee;
}

.nav-item.active {
  background: #153a6c;
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand-cyan);
}

.nav-item:hover,
.ghost-button:hover {
  background: #102e58;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #071a38;
}

.topbar {
  height: 84px;
  padding: 0 34px;
  border-bottom-color: #e3ebf5;
}

.usage-pill {
  background: #edf6ff;
  border-color: #bcdcff;
  color: #0d4d9f;
}

.view-panel {
  max-width: 1540px;
  margin: 0 auto;
  padding: 28px 34px 48px;
}

.primary-button {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(23, 105, 224, 0.18);
}

.primary-button:hover {
  background: #0d58c6 !important;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(8, 183, 201, 0.2);
  outline-offset: 1px;
  border-color: var(--brand);
}

.input-panel,
.result-panel,
.generated-panel,
.chat-sidebar,
.chat-panel,
.admin-grid > section,
.settings-grid > section,
.priority-panel,
.status-panel,
.quick-actions,
.agent-context-panel,
.agent-chat-panel,
.resource-request-panel {
  border-radius: 14px;
  border-color: #dce6f2;
  box-shadow: 0 10px 30px rgba(22, 54, 96, 0.055);
}

.overview-lead,
.resource-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 30px;
  color: #fff;
  background: #0b2852;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(7, 36, 82, 0.18);
}

.overview-lead > div,
.resource-intro > div {
  max-width: 850px;
}

.overview-lead h3,
.resource-intro h3 {
  margin-top: 8px;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.3;
  text-wrap: balance;
}

.overview-lead p,
.resource-intro p {
  margin: 12px 0 0;
  color: #c7d7ee;
  line-height: 1.7;
}

.status-kicker {
  color: #66d7e1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 20px;
  margin-top: 20px;
}

.priority-panel,
.status-panel,
.quick-actions,
.agent-context-panel,
.agent-chat-panel,
.resource-request-panel {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.workflow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workflow-steps button,
.action-strip button {
  width: 100%;
  min-height: 78px;
  display: grid;
  gap: 5px;
  text-align: left;
  padding: 15px 16px;
  border: 1px solid #d9e5f2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.workflow-steps button:hover,
.action-strip button:hover {
  border-color: #8cc7ef;
  background: #f4faff;
}

.workflow-steps span,
.action-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.status-list {
  display: grid;
  gap: 4px;
}

.status-list > div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 3px 10px;
  padding: 11px 4px;
  border-bottom: 1px solid #edf1f6;
}

.status-list small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.45;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
}

.status-dot.ready { background: #12a67a; }
.status-dot.local { background: #2f7be5; }
.status-dot.pending { background: #e4a028; }

.quick-actions { margin-top: 20px; }
.action-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.decision-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(440px, 1.18fr);
  gap: 20px;
  align-items: start;
}

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

.ops-result {
  min-height: 460px;
  padding: 18px;
  border: 1px solid #dce6f2;
  border-radius: 11px;
  background: #f9fbfe;
  line-height: 1.65;
}

.ops-result h4 { margin: 0 0 8px; color: var(--brand-deep); }
.ops-result ul { margin: 8px 0 18px; padding-left: 20px; }
.ops-result .result-meta { color: var(--muted); font-size: 12px; }

.privacy-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 9px;
  background: #fff8e7;
  color: #7a5200;
  font-size: 13px;
  line-height: 1.55;
}

.search-field { margin-bottom: 12px; }
.knowledge-list { display: grid; gap: 9px; }
.knowledge-item { padding: 14px; border: 1px solid #dce6f2; border-radius: 10px; background: #fff; }
.knowledge-item header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.knowledge-item p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.knowledge-item button { border: 0; background: transparent; color: var(--danger); padding: 4px; }

.agent-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 20px;
  align-items: start;
}

.agent-context-panel,
.agent-chat-panel { display: grid; gap: 15px; }
.context-status { padding: 13px; border-radius: 10px; background: #eef7ff; display: grid; gap: 4px; }
.context-status span { color: var(--muted); font-size: 12px; }
.ops-agent-messages { min-height: 430px; max-height: 58vh; overflow-y: auto; padding: 16px; background: #f5f8fc; border: 1px solid var(--line); border-radius: 12px; }
.agent-empty { max-width: 560px; margin: 110px auto; text-align: center; color: var(--muted); }
.agent-empty strong { color: var(--ink); }
.agent-message { max-width: 86%; margin-bottom: 12px; padding: 13px 15px; border-radius: 12px; line-height: 1.65; white-space: pre-wrap; }
.agent-message.user { margin-left: auto; background: #dfeeff; }
.agent-message.assistant { background: #fff; border: 1px solid #dce6f2; }
.agent-message .message-meta { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }

.resource-badge { flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(102, 215, 225, 0.5); border-radius: 999px; color: #a8edf3; font-size: 12px; }
.resource-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.resource-service-grid article { display: grid; align-content: start; min-height: 205px; padding: 19px; border: 1px solid #dce6f2; border-radius: 13px; background: #fff; }
.resource-service-grid article > span { color: var(--brand); font-size: 12px; font-weight: 900; }
.resource-service-grid h4 { margin: 9px 0 7px; font-size: 17px; }
.resource-service-grid p { margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
.resource-service-grid button { margin-top: auto; min-height: 42px; border: 1px solid #b7d7f7; border-radius: 8px; background: #f3f9ff; color: #0d58ad; font-weight: 800; }
.resource-request-panel { margin-top: 20px; }
.resource-request-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.resource-request-form .wide { grid-column: 1 / -1; }
.resource-request-form button { justify-self: start; }
.request-list { display: grid; gap: 8px; margin-top: 16px; }
.request-item { padding: 12px 14px; border-radius: 9px; background: #f6f9fc; border: 1px solid #e0e8f1; }
.request-item small { display: block; margin-top: 5px; color: var(--muted); }

@media (max-width: 1080px) {
  .overview-grid,
  .decision-layout,
  .agent-layout { grid-template-columns: 1fr; }
  .resource-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; min-height: 0; }
  .brand-lockup.compact { padding-bottom: 10px; }
  .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; padding: 4px 12px 14px; }
  .nav-group-label { grid-column: 1 / -1; padding-top: 12px; }
  .sidebar-footer { display: flex; justify-content: space-between; align-items: center; }
  .topbar { height: auto; min-height: 82px; padding: 16px 18px; gap: 12px; }
  .view-panel { padding: 18px 14px 36px; }
  .overview-lead,
  .resource-intro { align-items: stretch; flex-direction: column; padding: 22px; }
  .workflow-steps,
  .action-strip,
  .resource-service-grid,
  .form-grid.two,
  .resource-request-form { grid-template-columns: 1fr; }
  .resource-request-form .wide { grid-column: auto; }
  .agent-message { max-width: 96%; }
  .ops-agent-messages { min-height: 360px; }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

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

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background-color: #071a38;
  background-image: radial-gradient(circle at 78% 18%, rgba(8, 183, 201, 0.18), transparent 32%), radial-gradient(circle at 18% 82%, rgba(23, 105, 224, 0.22), transparent 34%);
}

.login-panel {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 28px 80px rgba(1, 16, 40, 0.36);
}

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

.brand-lockup.compact {
  padding: 18px;
  color: #fff;
}

.brand-lockup.compact span {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  margin-top: 2px;
}

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 900;
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 25px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 17px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.hint,
.form-error {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-error {
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
}

.sidebar {
  background: #071a38;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding: 8px 12px 20px;
}

.nav-item,
.ghost-button {
  border: 0;
  background: transparent;
  color: #d7dde6;
  text-align: left;
  padding: 12px 14px;
  border-radius: 9px;
}

.nav-item.active,
.nav-item:hover,
.ghost-button:hover {
  background: #153a6c;
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  color: #cbd5e1;
  display: grid;
  gap: 10px;
  font-size: 13px;
}

.main-area {
  min-width: 0;
}

.topbar {
  height: 84px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
}

.usage-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #edf6ff;
  border: 1px solid #bcdcff;
  border-radius: 999px;
  padding: 9px 14px;
  color: #0d4d9f;
}

.view-panel {
  padding: 28px 34px 48px;
}

.workflow-grid,
.admin-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 20px;
  align-items: start;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 20px;
  align-items: start;
}

.admin-grid {
  grid-template-columns: minmax(520px, 0.95fr) minmax(360px, 1.05fr);
}

.size-grid {
  display: grid;
  grid-template-columns: 1.4fr minmax(96px, 0.8fr) minmax(96px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.input-panel,
.result-panel,
.generated-panel,
.chat-sidebar,
.chat-panel,
.admin-grid > section,
.settings-grid > section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  min-width: 0;
}

.input-panel {
  display: grid;
  gap: 16px;
}

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

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

.upload-box {
  border: 1px dashed #aab3c0;
  border-radius: 8px;
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fafafa;
  color: var(--muted);
}

.upload-box input {
  display: none;
}

.upload-box span {
  color: var(--ink);
  font-weight: 800;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.compact-preview {
  grid-template-columns: repeat(4, minmax(0, 80px));
}

.chat-reference-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chat-reference-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.chat-reference-legend strong,
.chat-reference-item > span,
.chat-message-references figure > span {
  color: var(--ink);
  font-weight: 800;
}

.chat-reference-item {
  display: grid;
  gap: 5px;
  margin: 0;
}

.chat-reference-item > span {
  font-size: 11px;
}

.compact-upload {
  min-height: 86px;
}

.template-grid {
  display: grid;
  gap: 14px;
}

.template-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.template-card.pending {
  border-color: #facc15;
  background: #fffdf3;
}

.template-card.rejected {
  border-color: #fecaca;
  background: #fff7f7;
}

.template-thumb {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}

.template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.template-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.template-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: #eef2ff;
  color: #3730a3;
}

.status-badge.approved {
  background: #ecfdf3;
  color: #047857;
}

.status-badge.pending {
  background: #fffbeb;
  color: #92400e;
}

.status-badge.rejected {
  background: #fef2f2;
  color: #b42318;
}

.chat-sidebar,
.chat-panel {
  padding: 18px;
}

.chat-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.chat-history-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f6f8;
}

.chat-history-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.chat-history-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.chat-list-row {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.chat-list-item {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.chat-list-row.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.16);
}

.chat-list-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.chat-history-action {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.chat-history-action:last-child {
  border-right: 0;
}

.chat-history-action:hover {
  background: #f8fafc;
}

.chat-history-action.danger {
  color: #b42318;
}

.chat-list-item span,
.chat-message-meta {
  color: var(--muted);
  font-size: 12px;
}

.chat-panel {
  display: grid;
  gap: 14px;
}

.chat-messages {
  min-height: 360px;
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
  display: grid;
  align-content: start;
  gap: 12px;
}

.chat-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.chat-message.user {
  background: #fff7e6;
  border-color: #ffd38a;
}

.chat-message p {
  margin: 0;
  line-height: 1.5;
}

.chat-message img {
  max-width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

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

.chat-image-actions button {
  min-width: 112px;
}

.chat-archived-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #f5c266;
  border-radius: 6px;
  background: #fff8e6;
  color: #694100;
}

.chat-archived-notice span {
  color: #7a5b20;
  font-size: 13px;
}

.chat-message-references {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 8px;
}

.chat-message-references figure {
  display: grid;
  gap: 5px;
  margin: 0;
}

.chat-message-references figure > span {
  font-size: 11px;
}

.chat-message-references img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.image-chat-draft strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.manual-copy-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fbfcfe;
  display: grid;
  gap: 12px;
}

.manual-copy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7ebf0;
  padding-bottom: 10px;
}

.manual-copy-head strong {
  font-size: 15px;
}

.manual-copy-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.style-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.style-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.style-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.18);
}

.style-card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.style-card-text strong {
  font-size: 13px;
  line-height: 1.25;
}

.style-card-text small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.style-thumb {
  position: relative;
  width: 78px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  background: linear-gradient(135deg, #f8fafc, #e7edf6);
}

.style-product,
.style-accent {
  position: absolute;
  display: block;
  border-radius: 4px;
}

.style-product {
  left: 24px;
  top: 18px;
  width: 30px;
  height: 20px;
  background: #111827;
  box-shadow: 0 7px 12px rgba(15, 23, 42, 0.22);
}

.style-product::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.style-accent.one {
  left: 8px;
  top: 8px;
  width: 22px;
  height: 5px;
  background: var(--brand);
}

.style-accent.two {
  right: 8px;
  top: 10px;
  width: 18px;
  height: 5px;
  background: #2563eb;
}

.style-accent.three {
  left: 10px;
  bottom: 8px;
  width: 58px;
  height: 5px;
  background: #cbd5e1;
}

.style-thumb.faithful {
  background: #fff;
}

.style-thumb.faithful .style-product {
  left: 22px;
  top: 16px;
  outline: 2px solid #94a3b8;
}

.style-thumb.faithful .style-accent.one,
.style-thumb.faithful .style-accent.two {
  width: 8px;
  height: 8px;
  border: 1px solid #64748b;
  background: transparent;
}

.style-thumb.conversion .style-accent.one,
.style-thumb.conversion .style-accent.two,
.style-thumb.conversion .style-accent.three,
.style-thumb.specs .style-accent.one,
.style-thumb.specs .style-accent.two,
.style-thumb.specs .style-accent.three {
  height: 7px;
}

.style-thumb.mobile .style-accent.one,
.style-thumb.mobile .style-accent.three {
  left: 7px;
  width: 64px;
  height: 10px;
  background: #111827;
}

.style-thumb.lifestyle {
  background: linear-gradient(180deg, #dbeafe 0 45%, #e7f0dc 45% 100%);
}

.style-thumb.editorial {
  aspect-ratio: 16 / 9;
  width: 78px;
}

.style-thumb.macro .style-product {
  left: 16px;
  top: 8px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

.style-thumb.bundle .style-accent.one,
.style-thumb.bundle .style-accent.two {
  top: 32px;
  width: 12px;
  height: 14px;
}

.style-thumb.comparison::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: rgba(255, 153, 0, 0.18);
}

.style-thumb.studio {
  background: radial-gradient(circle at 50% 80%, rgba(15, 23, 42, 0.12), transparent 32%), linear-gradient(180deg, #ffffff, #edf2f7);
}

.style-thumb.warm {
  background: linear-gradient(135deg, #fff2d8, #f8fafc 45%, #f2e6d8);
}

.style-thumb.warm .style-accent.three {
  background: #d7b98c;
}

.style-thumb.tech {
  background: linear-gradient(135deg, #e8eef7, #c8d4e5);
}

.style-thumb.tech .style-accent.one,
.style-thumb.tech .style-accent.two {
  background: #38bdf8;
}

.style-thumb.outdoor {
  background: linear-gradient(180deg, #bfdbfe 0 48%, #dcecc6 48% 100%);
}

.style-thumb.minimal {
  background: #fff;
}

.style-thumb.minimal .style-product {
  left: 34px;
  top: 20px;
}

.style-thumb.minimal .style-accent.one,
.style-thumb.minimal .style-accent.two,
.style-thumb.minimal .style-accent.three {
  opacity: 0.35;
}

.style-thumb.retail {
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

.style-thumb.retail .style-accent.one,
.style-thumb.retail .style-accent.three {
  height: 9px;
  background: #ef4444;
}

.style-thumb.material .style-product {
  left: 17px;
  top: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.style-thumb.gift {
  background: linear-gradient(135deg, #fff7ed, #f8fafc);
}

.style-thumb.gift .style-accent.one,
.style-thumb.gift .style-accent.two {
  top: 34px;
  width: 12px;
  height: 14px;
}

.style-thumb.compare::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: rgba(255, 153, 0, 0.2);
}

.style-thumb.compare::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: #94a3b8;
}

.button-row,
.image-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 15px;
  font-weight: 800;
}

.primary-button {
  background: var(--brand);
  color: #111827;
}

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

.danger-button {
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 11px 15px;
  font-weight: 800;
  background: #fff1f2;
  color: #991b1b;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
}

.copy-grid {
  display: grid;
  gap: 14px;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
}

.copy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.copy-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.18);
}

.copy-card h4 {
  margin: 0;
  font-size: 16px;
}

.copy-card p,
.copy-card li {
  line-height: 1.5;
}

.copy-card ul {
  margin: 0;
  padding-left: 18px;
}

.copy-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafafa;
}

.copy-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.copy-details p {
  margin: 10px 0 0;
  color: #334155;
}

.copy-details pre {
  margin: 10px 0 0;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #334155;
  font: inherit;
}

.generated-panel {
  margin-top: 20px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.generation-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e6;
  color: #253246;
}

.generation-status p {
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.generation-status.active {
  border-color: rgba(255, 153, 0, 0.55);
}

.generation-status .skip-current-button {
  width: auto;
  margin-left: auto;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.image-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.image-card.is-loading {
  border-color: rgba(255, 153, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.12);
}

.image-card.is-error {
  border-color: #fca5a5;
}

.image-card.is-error .retry-button {
  background: #fff1f2;
  color: #991b1b;
}

.image-thumb {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 153, 0, 0.22), rgba(35, 47, 62, 0.14)),
    #f8fafc;
  color: #253246;
  font-weight: 900;
}

.image-thumb small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(35, 47, 62, 0.18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-card button {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  color: var(--amazon-blue);
  font-weight: 800;
}

.image-meta {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.inline-form input {
  min-width: 0;
}

.inline-form .primary-button {
  grid-column: 1 / -1;
  justify-self: start;
}

.user-list,
.risk-grid {
  display: grid;
  gap: 14px;
}

.user-row,
.risk-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.daily-cost-panel {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.daily-cost-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.daily-cost-title span {
  color: var(--muted);
  font-size: 13px;
}

.daily-cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.daily-cost-table th,
.daily-cost-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.daily-cost-table th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 700;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.account-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  overflow: hidden;
}

.account-summary {
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.account-summary strong,
.account-summary span,
.account-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary span,
.account-summary em {
  color: var(--muted);
  font-style: normal;
}

.account-row label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}

.account-row input {
  width: 100%;
  min-width: 0;
}

.account-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.account-permissions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.account-permissions label {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}

.account-permissions input {
  width: auto;
}

.protected-account {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 800;
}

.permission-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.permission-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
}

.permission-row input {
  width: auto;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

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

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

th {
  background: #f9fafb;
  color: var(--muted);
  font-size: 13px;
}

.log-product-cell {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr);
  gap: 10px;
  align-items: start;
  max-width: 360px;
}

.log-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f8fafc;
}

.log-thumb.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.log-product-copy {
  display: grid;
  gap: 3px;
}

.log-product-copy strong {
  font-size: 13px;
}

.log-product-copy small,
.log-product-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.skill-flow {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.68);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal {
  width: min(980px, 100%);
  max-height: 94vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
}

.modal .section-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 12px;
}

#annotationCanvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 14px;
  cursor: crosshair;
  touch-action: none;
}

#annotationCanvas.brush-mode {
  cursor: cell;
}

.annotation-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented-control button {
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  font-weight: 800;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.active {
  background: var(--brand);
  color: #111827;
}

.upload-inline {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.upload-inline input {
  display: none;
}

.upload-inline span {
  font-weight: 800;
}

.compact-preview {
  grid-template-columns: repeat(3, minmax(72px, 96px));
  margin-bottom: 12px;
}

@media (max-width: 980px) {
  .app-shell,
  .workflow-grid,
  .chat-layout,
  .admin-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .app-shell {
    display: block;
  }

  .nav-list {
    display: flex;
    gap: 7px;
    padding: 4px 12px 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .nav-group-label {
    display: none;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
  }

  .brand-lockup.compact {
    padding: 10px 14px 6px;
  }

  .brand-lockup.compact .logo-mark {
    width: 42px;
    height: 42px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 12px;
    white-space: nowrap;
  }

  .sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px 12px;
  }

  .sidebar-footer #currentUserLabel {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-footer #logoutButton {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 44px;
    padding: 9px 14px;
  }

  .topbar {
    height: auto;
    padding: 18px;
    align-items: flex-start;
    gap: 12px;
  }

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

  .account-row {
    grid-template-columns: 1fr;
  }

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

  .style-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* Yuhua lighter teal-blue gradient, collapsible navigation and back-to-top v31 */
:root {
  --brand: #1498c4;
  --brand-cyan: #19c6ca;
  --brand-blue: #1498c4;
  --brand-deep: #2779bd;
  --brand-gradient: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand) 55%, var(--brand-deep) 100%);
  --brand-gradient-dark: linear-gradient(145deg, #0b627b 0%, #0d819b 52%, #246bae 100%);
  --brand-soft: #eefbfd;
  --page: #f3fafc;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

body {
  background:
    radial-gradient(circle at 92% 4%, rgba(16, 197, 206, 0.08), transparent 28%),
    linear-gradient(180deg, #f7fbfe 0%, var(--page) 100%);
}

.login-view {
  background-color: #0b6079;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(68, 228, 224, 0.32), transparent 34%),
    radial-gradient(circle at 18% 82%, rgba(80, 171, 225, 0.3), transparent 36%),
    linear-gradient(145deg, #0a516e 0%, #0d7890 52%, #2464a5 100%);
}

.sidebar {
  background: linear-gradient(180deg, #0b5270 0%, #0d6f88 56%, #0a8190 100%);
  box-shadow: 12px 0 38px rgba(7, 91, 112, 0.14);
}

.brand-lockup.compact {
  border-bottom: 1px solid rgba(115, 222, 231, 0.12);
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nav-group-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: #d5f1f5;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus-visible {
  border-color: rgba(95, 223, 230, 0.3);
  background: linear-gradient(90deg, rgba(16, 197, 206, 0.13), rgba(22, 105, 198, 0.15));
  color: #e7fbff;
}

.nav-group-chevron {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #b7f3f1;
  font-size: 16px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 160ms ease, background-color 160ms ease;
}

.nav-group.collapsed .nav-group-chevron {
  transform: rotate(-90deg);
  background: rgba(16, 197, 206, 0.15);
}

.nav-group-items {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 2px;
}

.nav-group-items[hidden] {
  display: none !important;
}

.nav-item {
  width: 100%;
  position: relative;
  padding-left: 16px;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(18, 194, 199, 0.88) 0%, rgba(38, 125, 197, 0.9) 100%);
  color: #fff;
  box-shadow: inset 3px 0 0 #72f1e8, 0 8px 18px rgba(4, 75, 106, 0.16);
}

.nav-item:hover,
.ghost-button:hover {
  background: linear-gradient(90deg, rgba(51, 213, 213, 0.2), rgba(48, 137, 201, 0.24));
}

.sidebar-footer {
  background: rgba(4, 79, 96, 0.34);
  border-top-color: rgba(164, 244, 241, 0.22);
}

.main-area {
  background:
    radial-gradient(circle at 96% 1%, rgba(25, 198, 202, 0.1), transparent 28%),
    linear-gradient(180deg, #f9fdfe 0%, #f1f9fb 100%);
}

.topbar {
  background: linear-gradient(90deg, #ffffff 0%, #f7fcfd 52%, #eaf9fb 100%);
  border-bottom-color: #d2e9ee;
}

.topbar .eyebrow,
.status-kicker,
.resource-service-grid article > span {
  color: #078ea8;
}

.usage-pill {
  background: linear-gradient(135deg, rgba(25, 198, 202, 0.15), rgba(39, 121, 189, 0.1));
  border-color: rgba(20, 152, 196, 0.24);
  color: #0b6685;
  box-shadow: 0 8px 22px rgba(18, 137, 163, 0.09);
}

.overview-lead,
.resource-intro {
  background:
    linear-gradient(120deg, rgba(3, 49, 67, 0.28), rgba(7, 58, 81, 0.1)),
    linear-gradient(120deg, #0b6b83 0%, #0e819d 48%, #2874ba 100%);
  box-shadow: 0 18px 42px rgba(11, 114, 145, 0.2);
}

.overview-lead p,
.resource-intro p {
  color: #e2f3fb;
}

.primary-button {
  background: var(--brand-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(18, 128, 190, 0.2);
}

.primary-button:hover {
  background: var(--brand-gradient) !important;
  filter: brightness(0.94) saturate(1.08);
  transform: translateY(-1px);
}

.secondary-button:hover,
.resource-service-grid button:hover {
  border-color: rgba(16, 166, 199, 0.48);
  background: linear-gradient(135deg, rgba(16, 197, 206, 0.08), rgba(22, 105, 224, 0.07));
}

.workflow-steps button:hover,
.action-strip button:hover {
  border-color: rgba(20, 163, 205, 0.44);
  background: linear-gradient(135deg, rgba(16, 197, 206, 0.055), rgba(22, 105, 224, 0.045));
}

.agent-message.user,
.context-status {
  background: linear-gradient(135deg, rgba(16, 197, 206, 0.12), rgba(22, 105, 224, 0.1));
}

.segmented-control button.active {
  background: var(--brand-gradient);
  color: #fff;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  min-width: 58px;
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 14px 34px rgba(7, 79, 143, 0.3);
  font-weight: 900;
}

.back-to-top > span:first-child {
  font-size: 21px;
  line-height: 1;
}

.back-to-top > span:last-child {
  font-size: 11px;
  line-height: 1;
}

.back-to-top:hover {
  filter: brightness(0.94) saturate(1.08);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline-color: rgba(16, 197, 206, 0.42);
}

@media (max-width: 980px) {
  .sidebar {
    background: linear-gradient(100deg, #0b5270 0%, #0d7189 58%, #0a8190 100%);
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 12px;
  }

  .nav-group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
  }

  .nav-group-toggle {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 9px 10px;
    white-space: nowrap;
  }

  .nav-group-items {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    padding: 0;
  }

  .nav-item {
    width: auto;
    min-height: 44px;
    padding: 9px 12px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
    min-width: 54px;
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-group-chevron,
  .primary-button,
  .back-to-top {
    transition: none;
  }
}

/* Yuhua welcome, light operations shell and restrained motion v32 */
:root {
  --brand: #148fc0;
  --brand-cyan: #18bac5;
  --brand-blue: #1889d3;
  --brand-deep: #155aa0;
  --brand-gradient: linear-gradient(115deg, #1876de 0%, #168fd0 58%, #16b8c5 100%);
  --brand-soft: #e9f5fd;
  --ink: #102a50;
  --muted: #64748d;
  --line: #dce5f0;
  --panel: #ffffff;
  --page: #f3f7fd;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

html {
  background: var(--page);
}

body {
  color: var(--ink);
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(28, 91, 150, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 91, 150, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

body[data-screen="welcome"],
body[data-screen="login"] {
  overflow-x: hidden;
}

.welcome-view {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  overflow: hidden;
  background-color: #f3f7fd;
  background-image:
    radial-gradient(ellipse 40% 54% at 77% 46%, rgba(218, 239, 253, 0.76) 0%, rgba(234, 245, 253, 0.38) 46%, transparent 76%),
    linear-gradient(rgba(28, 91, 150, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 91, 150, 0.018) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-view.is-leaving {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.992);
}

.welcome-layout {
  width: min(1380px, calc(100% - 96px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(680px, 1.15fr) minmax(420px, 0.85fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0;
}

.welcome-copy {
  max-width: 790px;
}

.welcome-badge {
  width: fit-content;
  margin: 0 0 30px;
  padding: 10px 16px;
  border: 1px solid #cbdff7;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #1768bd;
  box-shadow: 0 8px 24px rgba(40, 91, 150, 0.055);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.welcome-badge span {
  margin-right: 6px;
  color: #169bc7;
  font-size: 10px;
}

.welcome-copy h1 {
  margin: 0;
  color: #112d61;
  font-size: clamp(46px, 4.4vw, 70px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.welcome-copy h1 span {
  display: inline-block;
  margin-left: 0.06em;
  background: var(--brand-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.welcome-description {
  max-width: 630px;
  margin: 28px 0 34px;
  color: #5e7394;
  font-size: 17px;
  line-height: 1.9;
}

.welcome-start {
  min-width: 280px;
  min-height: 68px;
  padding: 0 30px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(23, 116, 202, 0.22);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.welcome-start span {
  display: inline-block;
  margin-left: 12px;
  font-size: 22px;
  transition: transform 180ms ease;
}

.welcome-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(23, 116, 202, 0.27);
  filter: saturate(1.04);
}

.welcome-start:hover span {
  transform: translateX(3px);
}

.welcome-start:focus-visible {
  outline: 4px solid rgba(22, 143, 208, 0.2);
  outline-offset: 4px;
}

.welcome-start:disabled {
  cursor: wait;
  opacity: 0.78;
}

.welcome-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.welcome-benefits span {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid #d3e2f5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #58739a;
  box-shadow: 0 6px 18px rgba(42, 88, 143, 0.04);
  font-size: 14px;
}

.welcome-visual {
  min-height: 570px;
  display: grid;
  place-items: center;
}

.welcome-orbit-system {
  position: relative;
  width: min(590px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: welcome-system-drift 7.5s ease-in-out infinite;
}

.welcome-aura {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(218, 240, 254, 0.36) 52%, transparent 74%);
}

.welcome-orbit {
  position: absolute;
  border: 1px solid rgba(37, 121, 210, 0.13);
  border-radius: 50%;
  transform-origin: center;
}

.welcome-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  margin-top: -5px;
  border: 1px solid #c3eaff;
  border-radius: 50%;
  background: #fbfdff;
  box-shadow: 0 0 12px rgba(52, 158, 224, 0.3);
}

.welcome-orbit-one {
  width: 100%;
  height: 46%;
  animation: welcome-orbit-one 18s linear infinite;
}

.welcome-orbit-two {
  width: 84%;
  height: 66%;
  border-color: rgba(19, 174, 198, 0.12);
  animation: welcome-orbit-two 22s linear infinite reverse;
}

.welcome-orbit-two::after {
  width: 7px;
  height: 7px;
  background: #dff8fb;
  border-color: #bcecf0;
}

.welcome-orbit-dot {
  display: none;
}

.welcome-logo.logo-mark {
  position: relative;
  z-index: 2;
  width: 280px;
  height: 320px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: welcome-logo-breathe 7.5s ease-in-out infinite;
}

.welcome-logo.logo-mark img,
.welcome-logo.logo-mark canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.welcome-logo.logo-mark img {
  opacity: 0;
  mix-blend-mode: multiply;
}

.welcome-logo.logo-mark.is-fallback img {
  opacity: 1;
}

.welcome-logo-base,
.welcome-logo-staircase,
.welcome-stair-layer,
.welcome-logo-star {
  position: absolute;
  inset: 0;
}

.welcome-logo-base {
  z-index: 1;
}

.welcome-logo-staircase {
  z-index: 2;
  pointer-events: none;
}

.welcome-stair-layer {
  opacity: 0;
  transform: translateY(7px) scale(0.985);
  transform-origin: center;
}

.welcome-logo-star {
  z-index: 3;
  opacity: 0;
  transform: scale(0.45) rotate(-12deg);
  transform-origin: 84% 12%;
}

.welcome-logo.is-animating .welcome-stair-layer {
  animation: welcome-stair-in 0.22s cubic-bezier(0.2, 0.82, 0.3, 1) forwards;
}

.welcome-logo.is-animating .welcome-stair-layer:nth-child(1) { animation-delay: 0.34s; }
.welcome-logo.is-animating .welcome-stair-layer:nth-child(2) { animation-delay: 0.51s; }
.welcome-logo.is-animating .welcome-stair-layer:nth-child(3) { animation-delay: 0.68s; }
.welcome-logo.is-animating .welcome-stair-layer:nth-child(4) { animation-delay: 0.85s; }
.welcome-logo.is-animating .welcome-stair-layer:nth-child(5) { animation-delay: 1.02s; }
.welcome-logo.is-animating .welcome-stair-layer:nth-child(6) { animation-delay: 1.19s; }

.welcome-logo.is-animating .welcome-logo-star {
  animation: welcome-star-in 0.42s 1.19s cubic-bezier(0.2, 0.82, 0.3, 1) forwards;
}

@keyframes welcome-stair-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes welcome-star-in {
  0% { opacity: 0; transform: scale(0.45) rotate(-12deg); filter: brightness(1); }
  62% { opacity: 1; transform: scale(1.16) rotate(2deg); filter: brightness(1.2) drop-shadow(0 0 10px rgba(33, 125, 211, 0.36)); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes welcome-system-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.25deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(0.25deg); }
}

@keyframes welcome-orbit-one {
  from { transform: rotate(-18deg); }
  to { transform: rotate(342deg); }
}

@keyframes welcome-orbit-two {
  from { transform: rotate(53deg); }
  to { transform: rotate(413deg); }
}

@keyframes welcome-logo-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.006); }
}

.login-view {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #f3f7fd;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(22, 184, 197, 0.11), transparent 27%),
    radial-gradient(circle at 84% 82%, rgba(24, 118, 222, 0.09), transparent 30%),
    linear-gradient(rgba(28, 91, 150, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 91, 150, 0.018) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}

.login-panel {
  position: relative;
  width: min(520px, 100%);
  padding: 42px;
  border: 1px solid #dce6f2;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(25, 60, 104, 0.12);
  color: var(--ink);
  animation: login-panel-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-panel-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-back {
  min-height: 44px;
  margin: -14px 0 18px -10px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #6b7d96;
  font-weight: 700;
  cursor: pointer;
}

.login-back:hover {
  color: #1768bd;
}

.login-panel .brand-lockup {
  color: var(--ink);
}

.login-panel .brand-lockup h1 {
  color: #102a50;
  line-height: 1.35;
}

.login-panel .eyebrow {
  color: #148bb8;
}

.login-panel .logo-mark {
  flex: 0 0 auto;
  border: 1px solid #e0e8f2;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(27, 90, 151, 0.1);
}

.login-form input {
  min-height: 48px;
  border-color: #d7e1ed;
  background: #fafdff;
  color: var(--ink);
}

.login-form input:hover {
  border-color: #b9cee3;
}

.login-form .primary-button,
.login-form .secondary-button {
  min-height: 48px;
}

.login-form .secondary-button {
  background: #f6f9fc;
  border-color: #dbe5ef;
  color: #526986;
}

.login-panel .hint {
  color: #74839a;
}

.app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
  background: var(--page);
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #dfe7f1;
  box-shadow: none;
  color: var(--ink);
}

.brand-lockup.compact {
  min-height: 104px;
  border-bottom: 1px solid #e7edf4;
  color: #102a50;
}

.brand-lockup.compact strong {
  color: #102a50;
}

.brand-lockup.compact span {
  color: #718099;
}

.sidebar .logo-mark {
  border: 1px solid #e2e9f1;
  box-shadow: 0 6px 18px rgba(25, 83, 139, 0.08);
}

.nav-list {
  gap: 7px;
  padding: 14px 12px 22px;
  scrollbar-color: #c9d6e4 transparent;
}

.nav-group-toggle {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #7b899c;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus-visible {
  border-color: transparent;
  background: #f5f8fb;
  color: #3f5878;
}

.nav-group-chevron {
  width: 24px;
  height: 24px;
  background: #f2f6fa;
  color: #6b7e96;
}

.nav-group.collapsed .nav-group-chevron {
  background: #eef5fb;
  color: #2679b9;
}

.nav-group-items {
  gap: 3px;
}

.nav-item,
.ghost-button {
  min-height: 44px;
  color: #324a68;
  font-weight: 700;
}

.nav-item {
  padding-left: 16px;
}

.nav-item.active {
  background: #e8f4fd;
  color: #155f9d;
  box-shadow: none;
}

.nav-item:hover,
.ghost-button:hover {
  background: #f1f6fb;
  color: #155f9d;
}

.sidebar-footer {
  border-top: 1px solid #e4ebf3;
  background: #ffffff;
  color: #60728b;
}

.main-area {
  min-width: 0;
  background-color: #f3f7fd;
  background-image:
    linear-gradient(rgba(28, 91, 150, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 91, 150, 0.016) 1px, transparent 1px);
  background-size: 48px 48px;
}

.topbar {
  min-height: 92px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e0e8f1;
}

.topbar .eyebrow,
.status-kicker,
.resource-service-grid article > span {
  color: #1688aa;
}

.topbar h2 {
  color: #102a50;
}

.usage-pill {
  background: #edf8fb;
  border-color: #cbe7ec;
  color: #176e8d;
  box-shadow: none;
}

.view-panel {
  max-width: 1640px;
  padding: 34px 40px 56px;
}

.overview-lead {
  align-items: center;
  padding: 8px 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.overview-lead h3 {
  color: #102a50;
  font-size: clamp(28px, 2.4vw, 38px);
  letter-spacing: -0.025em;
}

.overview-lead p {
  max-width: 920px;
  color: #65758d;
}

.resource-intro {
  align-items: center;
  padding: 28px 30px;
  border: 1px solid #dde7f1;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(24, 64, 108, 0.055);
}

.resource-intro h3 {
  color: #102a50;
}

.resource-intro p {
  color: #65758d;
}

.input-panel,
.result-panel,
.generated-panel,
.chat-sidebar,
.chat-panel,
.admin-grid > section,
.settings-grid > section,
.priority-panel,
.status-panel,
.quick-actions,
.agent-context-panel,
.agent-chat-panel,
.resource-request-panel,
.resource-service-grid article,
.knowledge-item,
.request-item,
.template-card {
  border-color: #dfe7f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(24, 64, 108, 0.045);
}

.primary-button {
  background: var(--brand-gradient) !important;
  border-color: transparent !important;
  box-shadow: 0 9px 20px rgba(22, 126, 189, 0.17);
}

.primary-button:hover {
  filter: brightness(0.97) saturate(1.03);
  box-shadow: 0 12px 24px rgba(22, 126, 189, 0.21);
}

.secondary-button,
.resource-service-grid button {
  background: #ffffff;
  border-color: #d5e0eb;
  color: #315675;
}

.secondary-button:hover,
.resource-service-grid button:hover,
.workflow-steps button:hover,
.action-strip button:hover {
  border-color: #9ecce0;
  background: #f2f9fc;
}

.agent-message.user,
.context-status {
  background: #ecf7fb;
}

.segmented-control button.active {
  background: #197fbd;
  color: #ffffff;
}

.back-to-top {
  border: 1px solid #cfe0ec;
  background: #ffffff;
  color: #176f9e;
  box-shadow: 0 12px 28px rgba(25, 76, 124, 0.14);
}

.back-to-top:hover {
  background: #eef8fb;
  filter: none;
}

@media (max-width: 1100px) {
  .welcome-layout {
    width: min(100% - 56px, 980px);
    grid-template-columns: minmax(520px, 1.1fr) minmax(330px, 0.9fr);
    gap: 24px;
  }

  .welcome-copy h1 {
    font-size: clamp(42px, 5.5vw, 58px);
  }

  .welcome-visual {
    min-height: 480px;
  }

  .welcome-logo.logo-mark {
    width: 230px;
    height: 270px;
  }
}

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

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #dfe7f1;
    background: #ffffff;
  }

  .brand-lockup.compact {
    min-height: 74px;
  }

  .nav-list {
    padding: 6px 12px 12px;
  }

  .nav-group-toggle {
    background: #f6f9fc;
  }

  .nav-item.active {
    background: #e8f4fd;
    color: #155f9d;
  }

  .topbar {
    min-height: 84px;
  }

  .view-panel {
    padding: 26px 22px 48px;
  }
}

@media (max-width: 860px) {
  .welcome-view {
    overflow-y: auto;
  }

  .welcome-layout {
    width: min(100% - 42px, 620px);
    min-height: 100svh;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 4px;
    padding: 30px 0 38px;
  }

  .welcome-copy {
    text-align: center;
  }

  .welcome-badge {
    margin: 0 auto 20px;
    font-size: 12px;
  }

  .welcome-copy h1 {
    font-size: clamp(32px, 8.8vw, 45px);
    line-height: 1.24;
  }

  .welcome-description {
    margin: 18px auto 24px;
    font-size: 14px;
    line-height: 1.78;
  }

  .welcome-start {
    min-width: min(280px, 100%);
    min-height: 58px;
    font-size: 16px;
  }

  .welcome-benefits {
    justify-content: center;
    margin-top: 22px;
  }

  .welcome-benefits span {
    min-height: 40px;
    padding: 0 11px;
    font-size: 12px;
  }

  .welcome-visual {
    min-height: 260px;
    order: -1;
  }

  .welcome-orbit-system {
    width: 300px;
  }

  .welcome-logo.logo-mark {
    width: 142px;
    height: 164px;
  }

  .welcome-orbit-two {
    display: block;
  }
}

@media (max-width: 560px) {
  .login-view {
    padding: 20px 14px;
  }

  .login-panel {
    padding: 28px 22px;
    border-radius: 16px;
  }

  .login-panel .brand-lockup {
    align-items: flex-start;
  }

  .login-panel .brand-lockup h1 {
    font-size: 22px;
  }

  .welcome-layout {
    width: min(100% - 28px, 520px);
  }

  .welcome-visual {
    min-height: 226px;
  }

  .welcome-orbit-system {
    width: 258px;
  }

  .welcome-logo.logo-mark {
    width: 124px;
    height: 144px;
  }

  .welcome-benefits {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-view,
  .welcome-start,
  .welcome-start span,
  .login-panel,
  .welcome-orbit-system,
  .welcome-orbit-one,
  .welcome-orbit-two,
  .welcome-logo.logo-mark {
    animation: none !important;
    transition: none !important;
  }

  .welcome-stair-layer,
  .welcome-logo-star {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .welcome-view.is-leaving {
    opacity: 1;
    transform: none;
  }
}

/* Flat task navigation and tool center v33 */
.primary-nav {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 14px 24px;
  overflow-x: hidden;
}

.nav-section-label {
  margin: 0;
  padding: 13px 12px 7px;
  color: #8492a5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.primary-nav .nav-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #415775;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  box-shadow: none;
}

.primary-nav .nav-item:hover {
  border-color: #e4ebf3;
  background: #f5f8fc;
  color: #17669f;
}

.primary-nav .nav-item.active {
  border-color: #d7eafa;
  background: #e8f3fd;
  color: #1269a8;
  box-shadow: none;
}

.nav-icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.nav-icon svg {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  display: block;
}

.nav-icon-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon-fill {
  display: none !important;
  fill: currentColor;
  stroke: none;
}

.nav-item.active .nav-icon-outline {
  display: none;
}

.nav-item.active .nav-icon-fill {
  display: block !important;
}

.topbar {
  min-height: 72px;
  height: 72px;
  padding: 0 30px;
}

.workspace-breadcrumb {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7a899e;
  font-size: 14px;
}

.workspace-breadcrumb strong {
  color: #18375f;
  font-size: 15px;
}

.tool-center-heading {
  margin-bottom: 28px;
}

.tool-center-heading h3 {
  margin: 0;
  color: #102a50;
  font-size: clamp(28px, 2.3vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.tool-center-heading p {
  margin: 10px 0 0;
  color: #667892;
  font-size: 15px;
  line-height: 1.7;
}

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

.tool-launch-card {
  min-width: 0;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid #dce6f1;
  border-radius: 14px;
  background: #ffffff;
  color: #102a50;
  text-align: left;
  box-shadow: 0 7px 20px rgba(24, 64, 108, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tool-launch-card:hover {
  border-color: #a9cee6;
  background: #ffffff;
  color: #102a50;
  box-shadow: 0 13px 28px rgba(24, 76, 124, 0.08);
  transform: translateY(-2px);
}

.tool-launch-card:focus-visible {
  outline: 3px solid rgba(22, 143, 208, 0.2);
  outline-offset: 2px;
  border-color: #70b6df;
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.tool-card-icon svg {
  width: 27px;
  height: 27px;
  display: block;
  fill: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-card-icon svg .icon-detail {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
}

.tool-card-icon svg .icon-cutout {
  fill: #ffffff;
}

.tool-card-icon svg .icon-layer-back {
  opacity: 0.52;
}

.tool-card-icon.tone-blue {
  background: #e9f3ff;
  color: #176fd0;
}

.tool-card-icon.tone-cyan {
  background: #e5f9fc;
  color: #1198b6;
}

.tool-card-icon.tone-green {
  background: #eaf8f3;
  color: #168a69;
}

.tool-card-icon.tone-violet {
  background: #f0efff;
  color: #6662c5;
}

.tool-card-icon.tone-amber {
  background: #fff5e7;
  color: #c07918;
}

.tool-card-copy {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.tool-card-copy strong {
  color: #102a50;
  font-size: 18px;
  line-height: 1.4;
}

.tool-card-copy small {
  color: #6b7c94;
  font-size: 13px;
  line-height: 1.65;
}

.tool-card-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px 12px;
  border: 1px solid #a9cfee;
  border-radius: 9px;
  color: #146ec1;
  font-size: 13px;
  font-weight: 800;
}

.tool-card-action b {
  font-size: 16px;
  line-height: 1;
  transition: transform 160ms ease;
}

.tool-launch-card:hover .tool-card-action b {
  transform: translateX(2px);
}

@media (max-width: 1180px) {
  .tool-center-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }

  .nav-section-label {
    display: none;
  }

  .primary-nav .nav-item {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 9px 12px;
    white-space: nowrap;
  }

  .nav-icon,
  .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .nav-icon {
    flex-basis: 20px;
  }

  .topbar {
    min-height: 70px;
    height: auto;
    padding: 14px 18px;
  }
}

@media (max-width: 680px) {
  .tool-center-grid {
    grid-template-columns: 1fr;
  }

  .tool-center-heading {
    margin-bottom: 22px;
  }

  .tool-launch-card {
    min-height: 210px;
    padding: 20px;
  }

  .tool-card-action {
    min-height: 44px;
  }

  .usage-pill span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-launch-card,
  .tool-card-action b {
    transition: none;
  }
}

/* Guided task hierarchy and denser operations overview v34 */
.overview-lead .primary-button {
  flex: 0 0 auto;
  min-width: 154px;
}

.workflow-steps {
  grid-template-columns: 1fr;
}

.workflow-steps button {
  min-height: 58px;
  grid-template-columns: minmax(150px, 0.68fr) minmax(0, 1.32fr);
  align-items: center;
  column-gap: 18px;
  padding: 12px 16px;
}

.workflow-steps button strong {
  color: #18375f;
}

.tool-center-heading {
  margin-bottom: 22px;
}

.tool-center-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tool-center-section {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dbe6f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 28px rgba(24, 64, 108, 0.04);
}

.tool-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-group-heading > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid #c8e1ef;
  border-radius: 11px;
  background: #ecf7fb;
  color: #14799c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.tool-group-heading h4 {
  margin: 0;
  color: #15365d;
  font-size: 17px;
  line-height: 1.35;
}

.tool-group-heading p {
  margin: 3px 0 0;
  color: #75859a;
  font-size: 12px;
  line-height: 1.45;
}

.tool-center-section .tool-center-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-center-section .tool-launch-card {
  min-height: 206px;
  padding: 20px;
  border-color: #e0e8f1;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(24, 64, 108, 0.025);
}

.tool-center-section .tool-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
}

.tool-center-section .tool-card-icon svg {
  width: 24px;
  height: 24px;
}

.tool-center-section .tool-card-copy {
  gap: 6px;
  margin-top: 15px;
}

.tool-center-section .tool-card-copy strong {
  font-size: 17px;
}

.tool-center-section .tool-card-copy small {
  line-height: 1.55;
}

.tool-center-section .tool-card-action {
  min-height: auto;
  margin-top: 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
}

@media (max-width: 1180px) {
  .tool-center-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .overview-lead .primary-button {
    width: 100%;
  }

  .workflow-steps button {
    grid-template-columns: 1fr;
    align-items: start;
    row-gap: 5px;
  }

  .tool-center-section {
    padding: 16px;
  }

  .tool-center-section .tool-center-grid {
    grid-template-columns: 1fr;
  }

  .tool-center-section .tool-launch-card {
    min-height: 190px;
  }
}
