:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --line: #dbe3f1;
  --line-strong: #cbd6e8;
  --text: #07142d;
  --muted: #687795;
  --primary: #3375f6;
  --primary-soft: #e7efff;
  --green: #06865b;
  --green-soft: #e4f6ee;
  --amber: #a76c00;
  --amber-soft: #fff3d7;
  --red: #c53c3c;
  --red-soft: #ffebeb;
  --navy: #2c426b;
  --teal: #1f7f87;
  --orange: #c65a2d;
  --purple: #6250a9;
  --shadow: 0 10px 30px rgba(32, 56, 96, 0.12);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  outline-offset: 2px;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  height: 100vh;
}

.side-rail {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px 10px 12px;
  background: #eef4fd;
  border-right: 1px solid var(--line);
}

.rail-brand {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 36px;
  border-radius: 18px;
  color: #fff;
  background: var(--primary);
  font-size: 25px;
  font-weight: 800;
}

.rail-nav {
  display: grid;
  gap: 7px;
}

.rail-link {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 68px;
  padding: 8px 4px;
  border: 0;
  border-radius: 8px;
  color: #152745;
  background: transparent;
  cursor: pointer;
}

.rail-link svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
}

.rail-link span {
  font-weight: 650;
}

.rail-link:hover,
.rail-link:focus-visible {
  background: #e6eefb;
}

.rail-link.is-active {
  color: var(--primary);
  background: #dfeaff;
}

.rail-link.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 16px;
  width: 4px;
  height: 36px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.rail-account {
  margin-top: auto;
  width: 100%;
}

.workspace {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar-wordmark {
  display: block;
  width: 132px;
  height: 38px;
  flex: 0 0 132px;
  object-fit: contain;
}

.topbar-title {
  color: var(--muted);
  white-space: nowrap;
}

.topbar-device {
  margin-left: 8px;
  color: var(--primary);
  border-color: transparent !important;
}

.topbar-session {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.topbar-session form {
  margin: 0;
}

.session-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 220px;
  overflow: hidden;
  color: #40516e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-user svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.main-content {
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 28px 30px 40px;
}

.page-section {
  width: 100%;
  min-width: 0;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading h1 {
  margin: 0 0 5px;
  font-size: 26px;
  line-height: 1.25;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.page-heading-actions {
  align-items: center;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-toolbar {
  margin-bottom: 18px;
}

.course-toolbar .search-control {
  flex: 1;
}

.compact-toolbar {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.search-control {
  display: flex;
  align-items: center;
  min-width: 220px;
  height: 38px;
  padding: 0 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.search-control:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.12);
}

.search-control svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.search-control input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 8px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.select-control,
.input-control {
  height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
}

.select-control:focus,
.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.12);
}

.segments {
  max-width: 100%;
  overflow-x: auto;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 3px;
  border-radius: 7px;
  background: #e8edf6;
}

.segments button {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 52px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: #243653;
  background: transparent;
  cursor: pointer;
}

.segments button.is-active {
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(41, 66, 106, 0.13);
  font-weight: 700;
}

.button,
.icon-button,
.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.button:hover,
.icon-button:hover,
.page-button:hover {
  border-color: #aebed7;
  background: #f8faff;
}

.button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
}

.button.primary {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.button.primary:hover {
  border-color: #2367dd;
  background: #2367dd;
}

.icon-button {
  width: 38px;
  flex: 0 0 38px;
  padding: 0;
}

.icon-button.danger {
  color: var(--red);
}

.icon-button:disabled,
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.course-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.course-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 194px;
  padding: 18px 16px;
  color: #fff;
}

.cover-navy { background: var(--navy); }
.cover-teal { background: var(--teal); }
.cover-orange { background: var(--orange); }
.cover-purple { background: var(--purple); }

.course-cover > svg {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  opacity: 0.82;
}

.cover-label {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 5px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 700;
}

.course-cover h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.course-body {
  display: grid;
  gap: 13px;
  padding: 15px 14px 14px;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  color: var(--muted);
  font-size: 12px;
}

.course-body p {
  min-height: 42px;
  margin: 0;
  color: #41506a;
  line-height: 1.65;
}

.course-progress {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto auto;
  align-items: center;
  gap: 9px;
}

.course-progress > span {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8edf5;
}

.course-progress > span b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.course-progress small {
  color: var(--muted);
}

.modal.course-detail-modal {
  width: min(1120px, calc(100vw - 32px));
  overflow-x: hidden;
}

.course-detail-modal .modal-head,
.course-detail-modal .modal-actions {
  position: sticky;
  z-index: 2;
  background: var(--surface);
}

.course-detail-modal .modal-head { top: 0; }
.course-detail-modal .modal-actions { bottom: 0; }

.course-detail-summary {
  display: grid;
  grid-template-columns: 180px 180px minmax(260px, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.course-detail-summary > div {
  display: grid;
  gap: 5px;
  padding: 13px 18px;
  border-right: 1px solid var(--line);
}

.course-detail-summary > div:last-child { border-right: 0; }
.course-detail-summary span { color: var(--muted); font-size: 12px; }

.course-detail-progress {
  grid-template-columns: minmax(120px, 1fr) auto !important;
  align-items: center;
}

.course-detail-progress > span {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7ecf5;
}

.course-detail-progress b {
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
}

.course-detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 480px;
}

.course-chapter-list {
  padding: 12px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #f7f9fd;
}

.course-chapter-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  margin-bottom: 7px;
  padding: 11px 10px;
  text-align: left;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.course-chapter-item:hover,
.course-chapter-item.active {
  border-color: #c8d8f4;
  background: #fff;
}

.course-chapter-item > span:first-child {
  color: var(--primary);
  font-weight: 800;
}

.course-chapter-item > span:last-child { display: grid; gap: 4px; }
.course-chapter-item small { color: var(--muted); }

.course-content-panel {
  display: grid;
  min-width: 0;
  padding: 18px;
  background: #101828;
}

.course-content-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #dbe6f7;
}

.course-content-empty svg { width: 42px; height: 42px; }
.course-video,
.course-html-frame {
  width: 100%;
  height: 100%;
  min-height: 440px;
  border: 0;
  background: #fff;
}

.course-video { object-fit: contain; background: #0a0f1c; }

@media (max-width: 800px) {
  .course-detail-summary { grid-template-columns: 1fr 1fr; }
  .course-detail-progress { grid-column: 1 / -1; }
  .course-detail-layout { grid-template-columns: 1fr; }
  .course-chapter-list { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .course-video, .course-html-frame { min-height: 320px; }
}

.modal.model-manager-modal {
  width: min(1120px, calc(100vw - 32px));
}

.model-manager-modal .modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.model-manager-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px 0;
  border-bottom: 1px solid var(--line);
}

.model-manager-tabs .segment {
  min-width: 112px;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 700;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
}

.model-manager-tabs .segment.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.model-manager-body {
  min-height: 470px;
}

.model-channel-toolbar,
.model-form-head,
.model-form-actions,
.model-usage-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-channel-toolbar {
  margin-bottom: 16px;
}

.model-channel-toolbar p,
.model-form-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.model-channel-layout {
  min-width: 0;
}

.model-channel-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.model-channel-table {
  min-width: 980px;
}

.token-overview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.token-overview-summary > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 15px 16px;
  border-right: 1px solid var(--line);
}

.token-overview-summary > div:last-child { border-right: 0; }
.token-overview-summary span,
.token-overview-summary small { color: var(--muted); font-size: 12px; }
.token-overview-summary strong { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }

.model-default-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faff;
  cursor: pointer;
}

.model-default-control input { margin-top: 3px; accent-color: var(--primary); }
.model-default-control span { display: grid; gap: 3px; }
.model-default-control small { color: var(--muted); line-height: 1.5; }

.model-channel-table td strong,
.model-channel-table td small {
  display: block;
}

.model-channel-table td small {
  max-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-default-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 6px;
  color: #2563eb;
  font-size: 10px;
  border-radius: 4px;
  background: #eaf1ff;
}

.model-channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.button.compact {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.model-channel-form {
  display: grid;
  gap: 0;
}

.model-channel-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
}

.model-channel-form-body {
  display: grid;
  gap: 14px;
}

.model-channel-form .modal-note {
  margin: 0;
}

.model-form-actions {
  justify-content: flex-end;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.model-usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.model-usage-summary > div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.model-usage-summary > div:last-child {
  border-right: 0;
}

.model-usage-summary span {
  color: var(--muted);
  font-size: 12px;
}

.model-usage-summary strong {
  font-size: 21px;
}

.model-usage-filter {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.model-usage-filter .select-control,
.model-usage-filter .input-control {
  width: auto;
  min-width: 145px;
}

.model-usage-table {
  min-width: 900px;
}

.status.muted {
  color: #667085;
  background: #eef1f5;
}

@media (max-width: 900px) {
  .token-overview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .token-overview-summary > div:nth-child(2) { border-right: 0; }
  .token-overview-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }

  .model-usage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-usage-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .model-usage-filter .select-control,
  .model-usage-filter .input-control {
    width: 100%;
  }
}

.store-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.store-detail-title {
  min-width: 0;
  flex: 1;
}

.store-detail-title h1,
.store-detail-title p {
  margin: 0;
}

.store-detail-title h1 {
  font-size: 23px;
}

.store-detail-title p,
.store-action-note {
  color: var(--muted);
  font-size: 12px;
}

.store-detail-title p {
  margin-top: 5px;
}

.store-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.store-action-note {
  margin: 0 0 14px;
}

.store-connection-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.store-connection-summary > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.store-connection-summary > div:last-child {
  border-right: 0;
}

.store-connection-summary span {
  color: var(--muted);
  font-size: 12px;
}

.store-connection-summary strong {
  overflow-wrap: anywhere;
}

.store-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.store-overview > div {
  display: grid;
  gap: 5px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.store-overview > div:last-child { border-right: 0; }
.store-overview span { color: var(--muted); font-size: 12px; }
.store-overview strong { font-size: 20px; }
.store-detail-body { min-height: 430px; }

.store-detail-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.store-detail-filter .input-control { min-width: 190px; }
.store-detail-filter .select-control { width: auto; min-width: 130px; }
.store-detail-table-wrap { overflow-x: auto; }
.store-product-table { min-width: 1540px; }
.store-order-table { min-width: 960px; }

.store-product-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.store-product-thumbnail {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f7f9fd;
}

.store-product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.store-product-thumbnail.is-empty {
  gap: 2px;
  padding: 4px;
  text-align: center;
  font-size: 10px;
}

.store-product-thumbnail.is-empty svg {
  width: 18px;
  height: 18px;
}

.store-product-copy {
  min-width: 0;
}

.store-product-copy a,
.store-product-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-product-copy a:hover {
  color: var(--primary);
}

.store-product-pagination .select-control {
  width: auto;
  min-width: 104px;
}

.store-product-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.store-product-detail-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.store-product-detail-grid span { color: var(--muted); font-size: 12px; }
.store-product-detail h3 { margin: 18px 0 10px; font-size: 15px; }

.store-supplier-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbff;
}

.store-supplier-form > .button {
  align-self: end;
  justify-self: end;
}

.store-sku-edit-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.store-product-detail {
  padding-right: 30px;
}

.store-sku-edit-table .input-control {
  width: 100%;
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
}

.store-sku-edit-table th:nth-child(1) { width: 18%; }
.store-sku-edit-table th:nth-child(2) { width: 25%; }
.store-sku-edit-table th:nth-child(3),
.store-sku-edit-table th:nth-child(4) { width: 17%; }
.store-sku-edit-table th:nth-child(5) { width: 23%; }

.store-sku-edit-table th,
.store-sku-edit-table td {
  padding-right: 8px;
  padding-left: 8px;
  overflow-wrap: anywhere;
}

.sku-save-button {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .store-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-detail-header { align-items: flex-start; flex-wrap: wrap; }
  .store-detail-actions { width: 100%; justify-content: flex-start; }
  .store-connection-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-connection-summary > div:nth-child(2) { border-right: 0; }
  .store-connection-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .store-detail-filter { flex-direction: column; }
  .store-detail-filter .input-control,
  .store-detail-filter .select-control { width: 100%; }
  .store-product-detail-grid { grid-template-columns: 1fr; }
  .store-supplier-form { grid-template-columns: 1fr; }
}

.desktop-home {
  position: relative;
  min-height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 36px 52px 64px;
  background: #f5f8fe;
}

.desktop-home-hero,
.desktop-app-grid {
  position: relative;
  z-index: 1;
}

.desktop-home-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.desktop-home-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 18px;
  color: #fff;
  background: #4e84f7;
  box-shadow: 0 12px 26px rgba(51, 117, 246, 0.2);
  font-size: 30px;
  font-weight: 700;
}

.desktop-home-greeting h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.35;
}

.desktop-home-greeting h1 span,
.desktop-home-greeting h1 strong {
  color: var(--primary);
}

.desktop-home-greeting p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.desktop-home-clock {
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.desktop-home-clock strong {
  display: block;
  font-size: 36px;
  font-weight: 500;
}

.desktop-home-clock span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.desktop-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 52px 46px;
  max-width: 1120px;
  margin: 62px auto 0;
}

.desktop-platform-list {
  display: contents;
}

.desktop-platform-state {
  display: flex;
  grid-column: 1 / -1;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.desktop-platform-state svg {
  width: 17px;
  height: 17px;
  animation: desktop-platform-spin 900ms linear infinite;
}

.desktop-platform-state.is-error {
  color: #a94343;
}

@keyframes desktop-platform-spin {
  to { transform: rotate(360deg); }
}

.desktop-app-launcher {
  display: flex;
  min-width: 0;
  min-height: 154px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.desktop-app-launcher:hover .desktop-app-icon,
.desktop-app-launcher:focus-visible .desktop-app-icon {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(34, 52, 84, 0.16);
}

.desktop-app-launcher:active .desktop-app-icon { transform: translateY(-1px); }

.desktop-app-launcher:disabled,
.desktop-app-launcher.is-unavailable {
  cursor: not-allowed;
}

.desktop-app-launcher:disabled .desktop-app-icon,
.desktop-app-launcher.is-unavailable .desktop-app-icon,
.desktop-app-launcher:disabled:hover .desktop-app-icon,
.desktop-app-launcher.is-unavailable:hover .desktop-app-icon {
  transform: none;
  filter: grayscale(0.22) saturate(0.58);
  box-shadow: 0 8px 18px rgba(34, 52, 84, 0.08);
  opacity: 0.68;
}

.desktop-app-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 19px;
  color: #fff;
  box-shadow: 0 12px 26px rgba(34, 52, 84, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
  font-size: 34px;
  font-weight: 700;
}

.desktop-app-icon svg { width: 42px; height: 42px; }
.desktop-app-icon.platform { background: var(--platform-color, #356fe8); }
.desktop-app-icon.platform.is-compact { font-size: 23px; }
.desktop-app-icon.stores { background: #148568; }
.desktop-app-icon.tasks { background: #16808b; }
.desktop-app-icon.courses { background: #7552d5; }
.desktop-app-icon.consult { background: #31425f; }

.desktop-app-launcher > strong,
.desktop-app-launcher > small {
  display: -webkit-box;
  width: min(100%, 176px);
  overflow: hidden;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}

.desktop-app-launcher > strong {
  min-height: 40px;
  font-size: 15px;
  font-weight: 650;
  line-height: 20px;
  -webkit-line-clamp: 2;
}

.desktop-app-launcher > small {
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  -webkit-line-clamp: 2;
}

@media (prefers-reduced-motion: reduce) {
  .desktop-platform-state svg { animation: none; }
}

.course-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.course-card-actions small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-note {
  margin: -8px 0 14px;
  color: #536482;
  font-size: 13px;
}

.table-panel {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #e5eaf3;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  height: 43px;
  padding-top: 10px;
  padding-bottom: 10px;
  color: #50617d;
  background: #fafbfe;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbfcff;
}

.data-table td > strong,
.data-table td > small {
  display: block;
}

.data-table td > small {
  margin-top: 6px;
  color: var(--muted);
}

.numeric {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.store-list-page {
  min-width: 0;
}

.store-page-heading {
  align-items: end;
  gap: 24px;
}

.store-page-heading > div:first-child {
  min-width: 250px;
}

.store-toolbar {
  flex: 0 1 auto;
  flex-wrap: nowrap;
}

.store-toolbar > .select-control {
  width: 130px;
}

.store-add-button {
  min-width: 104px;
  height: 38px;
  white-space: nowrap;
}

.store-sync-note {
  margin: -4px 0 12px;
  color: #71809a;
  font-size: 12px;
}

.store-table-panel {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.store-table {
  min-width: 1000px;
  table-layout: fixed;
}

.store-table th:nth-child(1) { width: 17%; }
.store-table th:nth-child(2) { width: 9%; }
.store-table th:nth-child(3) { width: 9%; }
.store-table th:nth-child(4) { width: 11%; }
.store-table th:nth-child(5) { width: 13%; }
.store-table th:nth-child(6) { width: 12%; }
.store-table th:nth-child(7) { width: 12%; }
.store-table th:nth-child(8) { width: 17%; }

.store-table td {
  height: 92px;
}

.store-table td,
.store-table th {
  overflow: hidden;
}

.store-search {
  width: 230px;
}

.platform-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--store-platform-color, #101827);
}

.store-identity,
.store-data-counts {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.store-identity strong {
  overflow: hidden;
  max-width: 240px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-name-link {
  overflow: hidden;
  color: #17233b;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-name-link:hover {
  color: var(--primary);
}

.store-platform-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-identity small,
.store-data-counts small {
  color: var(--muted);
  font-size: 11px;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b87900;
}

.rating svg {
  width: 18px;
  height: 18px;
  fill: rgba(184, 121, 0, 0.08);
}

.store-row-actions {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: start;
  gap: 6px;
  min-width: 0;
}

.store-row-actions .button {
  height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}

.store-connect-button svg {
  width: 15px;
  height: 15px;
}

.store-delete-button {
  grid-column: 1;
  width: 34px;
  height: 34px;
  color: #4f607d;
  border: 1px solid var(--line);
  background: #fff;
}

.store-delete-button:hover:not(:disabled) {
  color: #d13c3c;
  border-color: #efb8b8;
  background: #fff7f7;
}

.store-data-counts strong,
.store-data-counts small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-connection-modal {
  width: min(760px, calc(100vw - 32px));
}

.store-connection-modal .modal-body {
  padding: 18px;
}

.store-form-grid {
  gap: 14px;
}

.store-form-grid .input-control,
.store-form-grid .select-control {
  min-width: 0;
}

.store-form-grid textarea.input-control {
  min-height: 76px;
  resize: vertical;
}

.store-form-grid [readonly] {
  color: #687993;
  background: #f8faff;
}

.store-remark-field {
  grid-column: 1 / -1;
}

.store-credential-note {
  margin: 16px 0 0;
  padding: 10px 12px;
  color: #687993;
  border-radius: 5px;
  background: #f5f7fb;
  font-size: 12px;
  line-height: 1.6;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.success {
  color: var(--green);
  background: var(--green-soft);
}

.status.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.danger {
  color: var(--red);
  background: var(--red-soft);
}

.status.info {
  color: #2465d8;
  background: #e9f0ff;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.empty-state {
  padding: 46px 20px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.table-panel > .empty-state {
  border: 0;
  border-radius: 0;
}

.skill-toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}

.skill-catalog-loading {
  color: var(--muted);
  font-size: 12px;
}

.skill-search {
  width: 230px;
}

.task-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-identity strong {
  overflow-wrap: anywhere;
  font-family: "Consolas", "Microsoft YaHei", monospace;
  font-size: 12px;
}

.task-identity small {
  color: var(--muted);
}

.table-loading {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.task-detail-modal {
  width: min(860px, calc(100vw - 32px));
}

.task-detail-body {
  display: grid;
  gap: 16px;
  max-height: min(680px, calc(100vh - 180px));
  overflow-y: auto;
}

.task-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.task-detail-summary > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faff;
}

.task-detail-summary span,
.task-detail-section-head span {
  color: var(--muted);
  font-size: 12px;
}

[data-task-detail-trace] {
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.task-detail-section {
  display: grid;
  gap: 10px;
}

.task-detail-section h3 {
  margin: 0;
  font-size: 14px;
}

.task-detail-section pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-event-list {
  display: grid;
  gap: 8px;
}

.task-result-list {
  display: grid;
  gap: 8px;
}

.task-result-review-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 8px;
}

.task-result-item {
  display: grid;
  grid-template-columns: 24px minmax(120px, 0.7fr) 110px minmax(0, 1.3fr) minmax(180px, 0.8fr) 64px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}

.task-result-item > input {
  margin-top: 2px;
}

.task-result-item code {
  overflow-wrap: anywhere;
  color: #34435b;
}

.task-result-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.task-result-review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.task-result-review input {
  width: 92px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: #fff;
}

.task-result-review button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--primary);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.task-result-review button:hover {
  border-color: #9eb7df;
  background: #f5f8ff;
}

.listing-confirmation-list {
  display: grid;
  gap: 10px;
}

.listing-confirmation-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faff;
}

.listing-confirmation-item img,
.listing-confirmation-placeholder {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  background: #e9eef7;
}

.listing-confirmation-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.listing-confirmation-copy p,
.listing-confirmation-copy small {
  margin: 0;
  color: var(--muted);
}

.listing-risk {
  color: var(--amber) !important;
}

.task-event-item {
  display: grid;
  grid-template-columns: 84px 90px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}

.task-event-item time,
.task-event-item small {
  color: var(--muted);
}

.button.danger {
  border-color: #efc5c5;
  color: var(--red);
  background: #fff5f5;
}

@media (max-width: 720px) {
  .task-detail-summary {
    grid-template-columns: 1fr 1fr;
  }

  .task-event-item {
    grid-template-columns: 72px 72px minmax(0, 1fr);
  }

  .task-result-item {
    grid-template-columns: 24px 1fr 90px;
  }

  .task-result-review-toolbar {
    grid-template-columns: 1fr;
  }

  .task-result-item p {
    grid-column: 2 / -1;
  }

  .task-result-review {
    grid-column: 2 / -1;
  }

  .task-event-item small:last-child {
    grid-column: 3;
  }
}

/* Student desktop V2 shell: 92px icon rail, 64px topbar and blue product identity. */
body.prototype-shell {
  --bg: #f7f9fd;
  --surface: #ffffff;
  --surface-muted: #f7f9fd;
  --line: #e5eaf3;
  --line-strong: #d5ddeb;
  --text: #172033;
  --muted: #71809a;
  --primary: #3375f6;
  --primary-soft: #eaf1ff;
  --green: #18a96b;
  --green-soft: #e8f7f0;
  --amber: #e8a300;
  --amber-soft: #fff7dc;
  --red: #e84640;
  --red-soft: #fff0ef;
  background: var(--bg);
  color: var(--text);
}

body.prototype-shell .app-shell {
  min-height: 100vh;
  grid-template-columns: 92px minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
}

body.prototype-shell .side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  align-items: center;
  padding: 18px 10px 14px;
  border-right: 1px solid #dde7f8;
  background: #eef4ff;
}

body.prototype-shell .rail-brand {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 42px;
  border-radius: 18px;
  color: #fff;
  background: #4e7ff5;
  box-shadow: 0 12px 26px rgba(51, 117, 246, 0.22);
}

body.prototype-shell .rail-avatar-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  font-size: 25px;
  font-weight: 750;
  line-height: 1;
}

body.prototype-shell .rail-nav,
body.prototype-shell .rail-footer {
  width: 100%;
  display: grid;
  gap: 7px;
}

body.prototype-shell .rail-footer {
  margin-top: auto;
  padding: 0;
  border: 0;
}

body.prototype-shell .rail-link {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  color: #334056;
  background: transparent;
  text-align: center;
}

body.prototype-shell .rail-link svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

body.prototype-shell .rail-link span {
  font-size: 13px;
  font-weight: 600;
}

body.prototype-shell .rail-link:hover,
body.prototype-shell .rail-link:focus-visible {
  background: rgba(255, 255, 255, 0.68);
}

body.prototype-shell .rail-link.is-active {
  color: var(--primary);
  background: #dfeaff;
}

body.prototype-shell .rail-link.is-active::before {
  left: -10px;
  top: 17px;
  width: 4px;
  height: 34px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

body.prototype-shell .rail-account {
  margin-top: 0;
}

body.prototype-shell .side-rail-close,
body.prototype-shell .nav-backdrop,
body.prototype-shell .topbar-menu,
body.prototype-shell .topbar-window-title,
body.prototype-shell .topbar-window-controls {
  display: none;
}

body.prototype-shell .workspace {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

body.prototype-shell .topbar {
  position: relative;
  min-height: 64px;
  height: 64px;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

body.prototype-shell .topbar-brand {
  gap: 10px;
  flex: 0 0 auto;
}

body.prototype-shell .topbar-logo {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  object-fit: contain;
}

body.prototype-shell .topbar-wordmark {
  width: 132px;
  height: 38px;
  flex-basis: 132px;
}

body.prototype-shell .topbar-title {
  color: var(--muted);
  font-size: 13px;
}

body.prototype-shell .topbar-session {
  gap: 8px;
}

body.prototype-shell .topbar-device {
  color: var(--primary);
}

body.prototype-shell .main-content {
  height: calc(100vh - 64px);
  margin: 0;
  padding: 26px 30px 44px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

body.prototype-shell .page-heading {
  margin-bottom: 18px;
}

body.prototype-shell .page-heading h1 {
  color: #35464e;
  font-size: 23px;
  font-weight: 650;
}

body.prototype-shell .page-heading p {
  color: #84939a;
  font-size: 12px;
}

body.prototype-shell .toolbar {
  padding-bottom: 14px;
  border-bottom: 1px solid #e4ebee;
}

body.prototype-shell .segments {
  padding: 3px;
  border: 0;
  border-radius: 7px;
  background: #e9edf5;
}

body.prototype-shell .segments button {
  border-radius: 5px;
  color: #647188;
}

body.prototype-shell .segments button.is-active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 2px 7px rgba(31, 50, 83, 0.08);
}

body.prototype-shell .desktop-capability-banner {
  margin: 16px 0 14px;
  padding: 10px 12px;
  border: 1px solid #dfe8e9;
  border-radius: 3px;
  color: #6e7c82;
  background: #f8fbfb;
  font-size: 12px;
}

body.prototype-shell .desktop-capability-banner.is-ready {
  border-color: #c9dfd7;
  color: #4d7d70;
  background: #f1f8f5;
}

body.prototype-shell .desktop-capability-banner.is-warning {
  border-color: #eadcbe;
  color: #8a6b35;
  background: #fffaf0;
}

body.prototype-shell .skill-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.prototype-shell .desktop-capability-banner {
  display: none;
}

body.prototype-shell .skill-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.prototype-shell .skill-card {
  min-height: 212px;
}

body.prototype-shell .task-page .primary-tabs {
  margin-top: 24px;
}

body.prototype-shell .desktop-app-icon.alibaba {
  color: #fff;
  background: #f57c18;
}

body.prototype-shell .desktop-app-icon.consult {
  background: #179b7d;
}

body.prototype-shell .token-usage-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

body.prototype-shell .token-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

body.prototype-shell .token-subsection-head h2,
body.prototype-shell .token-subsection-head p {
  margin: 0;
}

body.prototype-shell .token-subsection-head h2 {
  font-size: 16px;
}

body.prototype-shell .token-subsection-head p {
  color: var(--muted);
  font-size: 12px;
}

body.prototype-shell .skill-card {
  min-height: 164px;
  padding: 17px 18px 14px;
  border: 1px solid #dfe7ea;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  text-align: left;
}

body.prototype-shell .skill-card:hover,
body.prototype-shell .skill-card:focus-visible {
  border-color: #b8ccf7;
  background: #fbfdff;
  box-shadow: 0 5px 14px rgba(51, 117, 246, 0.08);
  transform: translateY(-1px);
}

body.prototype-shell .skill-card:disabled {
  opacity: .68;
}

body.prototype-shell .skill-card:disabled:hover {
  border-color: #dfe7ea;
  background: #fff;
  box-shadow: none;
  transform: none;
}

body.prototype-shell .skill-card > strong {
  color: #35464e;
  font-size: 16px;
  font-weight: 680;
}

body.prototype-shell .skill-description {
  min-height: 42px;
  color: #75838a;
  line-height: 1.65;
}

body.prototype-shell .skill-task-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
}

body.prototype-shell .skill-task-types em {
  padding: 3px 7px;
  border: 1px solid #d9e3f6;
  border-radius: 3px;
  color: #4d6798;
  background: #f4f7ff;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

body.prototype-shell .skill-card-foot {
  padding-top: 11px;
  border-top: 1px solid #edf1f2;
}

body.prototype-shell .skill-card-foot b {
  color: var(--primary);
  font-weight: 650;
}

body.prototype-shell .empty-state {
  border: 1px dashed #cbd8dc;
  border-radius: 3px;
  color: #7d8b91;
  background: #fbfcfc;
}

body.prototype-shell .table-panel,
body.prototype-shell .task-filter-bar,
body.prototype-shell .task-metric-strip {
  border-radius: 3px;
  box-shadow: none;
}

body.prototype-shell:not([data-page="desktop"]) .main-content {
  background: #f5f8fe;
}

body.prototype-shell .task-metric-strip > div {
  background: #f8fafb;
}

body.prototype-shell .focus-ring:focus-visible,
body.prototype-shell :where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid rgba(51, 117, 246, 0.58);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  body.prototype-shell .app-shell {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  body.prototype-shell .side-rail {
    padding-inline: 7px;
  }

  body.prototype-shell .rail-link.is-active::before {
    left: -7px;
  }

  body.prototype-shell .topbar {
    padding: 0 16px;
  }

  body.prototype-shell .main-content {
    padding: 20px 18px 34px;
  }

  body.prototype-shell .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body.prototype-shell .topbar-brand {
    display: grid;
    gap: 1px;
  }

  body.prototype-shell .topbar-wordmark {
    width: 112px;
    height: 34px;
    flex-basis: 112px;
  }

  body.prototype-shell .topbar-title {
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.prototype-shell .skill-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.prototype-shell .skill-search {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.prototype-shell .side-rail,
  body.prototype-shell .nav-backdrop,
  body.prototype-shell .skill-card {
    transition: none;
  }
}

body.is-desktop-embedded {
  overflow: hidden;
}

body.is-desktop-embedded .app-shell {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  height: 100vh;
}

body.is-desktop-embedded .side-rail,
body.is-desktop-embedded .topbar {
  display: flex;
}

body.is-desktop-embedded .topbar-brand {
  flex: 0 0 62px;
  justify-content: center;
}

body.is-desktop-embedded .workspace {
  height: 100vh;
}

body.is-desktop-embedded .main-content {
  height: calc(100vh - 64px);
  padding: 26px 30px 44px;
}

body.is-desktop-embedded[data-page="desktop"] .main-content {
  padding: 0;
  background: #f5f8fe;
  overflow: auto;
}

body[data-page="desktop"] .main-content {
  padding: 0;
  overflow: auto;
  background: #f5f8fe;
}

body.is-desktop-embedded[data-page="desktop"] .desktop-home {
  min-height: 100%;
}

.workspace-tabs {
  min-width: 0;
  max-width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  margin-left: 8px;
  overflow: hidden;
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 88px;
  height: 40px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #dbe4f2;
  border-radius: 7px;
  color: var(--primary);
  background: #edf3ff;
  font-size: 13px;
  font-weight: 600;
}

.workspace-tab svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.workspace-tab span {
  display: inline;
  white-space: nowrap;
}

.workspace-tabs.is-home-only .workspace-tab {
  min-width: 0;
  height: 36px;
  padding: 0 4px;
  border-color: transparent;
  background: transparent;
}

body.is-desktop-embedded .workspace-tabs {
  display: none;
}

.skill-catalog-note,
.skill-followup-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.skill-catalog-note {
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
}

.skill-followup-note {
  min-height: 28px;
  padding: 6px 8px;
  border-left: 3px solid #d6a44d;
  background: #fff8e9;
}

.skill-followup-note svg,
.skill-catalog-note svg {
  width: 16px;
  height: 16px;
}

body.prototype-shell .page-section {
  max-width: 1400px;
  margin: 0 auto;
}

.token-panel {
  padding-top: 18px;
}

.token-platform-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 11px 14px;
  color: #667085;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  background: #f7f8fa;
  font-size: 13px;
}

.token-platform-banner svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.token-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.token-platform-balance {
  display: flex;
  min-width: 0;
  min-height: 230px;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  color: #fff;
  border-radius: 8px;
  background: #253b70;
}

.token-platform-balance span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.token-platform-balance strong {
  margin: 12px 0 8px;
  font-size: 42px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.token-platform-balance small {
  color: rgba(255, 255, 255, 0.72);
}

.token-platform-recharge {
  display: flex;
  min-width: 0;
  min-height: 230px;
  flex-direction: column;
  align-items: stretch;
  padding: 22px;
  overflow: visible;
}

.token-platform-recharge h2 {
  margin: 0 0 18px;
  font-size: 16px;
}

.token-platform-recharge p {
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.token-platform-recharge > .button {
  align-self: flex-start;
  margin-top: auto;
}

.token-amount-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.token-amount-list button {
  min-width: 0;
  min-height: 54px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
}

.token-amount-list button:disabled {
  color: #8590a3;
  background: #f8f9fb;
  cursor: not-allowed;
}

.token-platform-record-tabs {
  display: flex;
  gap: 2px;
  margin-top: 20px;
  border-bottom: 1px solid var(--line);
}

.token-platform-record-tabs button {
  padding: 10px 16px;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.token-platform-record-tabs button.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.token-platform-record {
  margin-top: 12px;
}

.token-platform-record .empty-state {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  gap: 7px;
}

.token-platform-record .empty-state svg {
  width: 26px;
  height: 26px;
}

.token-platform-record .empty-state strong {
  color: var(--text);
}

.token-platform-record .empty-state span {
  font-size: 13px;
}

.token-platform-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 260px;
  place-content: center;
}

.token-platform-placeholder svg {
  width: 32px;
  height: 32px;
}

@media (max-width: 900px) {
  .token-platform-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .token-amount-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.product-media-panel,
.product-basic-panel {
  overflow: hidden;
}

.product-media-body {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 18px;
}

.product-main-image,
.product-image-frame,
.product-image-frame > a {
  min-width: 0;
  display: grid;
  place-items: center;
}

.product-main-image,
.product-image-frame.is-main {
  aspect-ratio: 1;
}

.product-image-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f7f9fd;
}

.product-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-image-frame.is-gallery {
  aspect-ratio: 1;
}

.product-image-frame.is-detail {
  min-height: 180px;
}

.product-image-frame.is-empty,
.product-image-failure {
  min-height: 120px;
  gap: 8px;
  padding: 16px;
  place-content: center;
  text-align: center;
}

.product-gallery-block h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 10px;
}

.product-basic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 18px;
  gap: 16px;
}

.product-basic-grid > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.product-basic-grid .is-wide {
  grid-column: 1 / -1;
}

.product-basic-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.product-basic-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.product-source-link {
  margin: 0 18px 18px;
}

.product-detail-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  gap: 1px;
  background: var(--line);
}

.product-detail-summary > div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 18px;
  background: #fff;
}

.product-detail-summary span {
  color: var(--muted);
  font-size: 12px;
}

.product-detail-section {
  margin-top: 16px;
  overflow: hidden;
}

.product-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}

.product-detail-section-head h2,
.product-detail-section-head p {
  margin: 0;
}

.product-detail-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.product-supplier-form {
  display: grid;
  grid-template-columns: 1fr;
  padding: 18px;
  border: 0;
  border-radius: 0;
}

.product-detail-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.product-sku-table {
  min-width: 1050px;
}

@media (max-width: 1100px) {
  .product-detail-hero { grid-template-columns: 1fr; }
  .product-detail-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .product-media-body,
  .product-basic-grid,
  .product-detail-images { grid-template-columns: 1fr; }
  .product-basic-grid .is-wide { grid-column: auto; }
  .product-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.browser-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.is-browser-page .main-content {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

body.is-browser-page .browser-shell {
  height: 100%;
}

.browser-chrome {
  border-bottom: 1px solid #dfe5ef;
  background: #fff;
}

.browser-toolbar {
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: #fff;
}

.browser-toolbar > .icon-button {
  flex: 0 0 36px;
}

body.prototype-shell .browser-entry-controls {
  min-width: 0;
  width: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 0 12px 8px;
  border-bottom: 0;
  background: #fff;
}

.browser-entry-controls .select-control {
  min-width: 116px;
  max-width: 164px;
}

.browser-entry-controls .button,
.browser-task-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.browser-address {
  min-width: 0;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 0 13px;
  border: 1px solid #dce4f1;
  border-radius: 20px;
  color: #596880;
  background: #f7f9fc;
  font-size: 12px;
}

.browser-address svg {
  width: 15px;
  height: 15px;
}

.browser-address span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-situation-button {
  position: relative;
  min-width: 112px;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 169, 107, .12);
}

.browser-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #fff;
}

.browser-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  flex: 1;
  overflow: hidden;
  transition: grid-template-columns 180ms ease;
}

.browser-shell.is-task-open .browser-body {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.browser-runtime-state {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
}

.browser-runtime-state svg {
  width: 34px;
  height: 34px;
}

.task-drawer {
  min-width: 0;
  width: auto;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #fff;
  transition: opacity 180ms ease;
}

.task-drawer-inner {
  width: 380px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.browser-shell:not(.is-task-open) .task-drawer {
  opacity: 0;
  pointer-events: none;
}

.task-drawer-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.task-drawer-head > svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.task-drawer-head > strong {
  min-width: 0;
  flex: 1;
}

.task-drawer-head .status.running {
  color: #2465d8;
  background: #e9f0ff;
}

.task-drawer-summary span {
  color: var(--muted);
  font-size: 11px;
}

.task-drawer-head strong,
.task-drawer-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-drawer-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  flex: 1;
  padding: 16px;
  overflow: auto;
}

.task-drawer-summary {
  display: grid;
  gap: 6px;
}

.task-drawer-summary .status {
  justify-self: start;
}

.task-drawer-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.task-drawer-stat {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5eaf3;
  border-radius: 6px;
  background: #f7f9fc;
}

.task-drawer-stat strong,
.task-drawer-stat span {
  display: block;
}

.task-drawer-stat strong {
  overflow: hidden;
  color: #243653;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-drawer-stat span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.task-drawer-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8edf4;
}

.task-drawer-progress span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.task-drawer-metrics {
  margin: 0;
  border-top: 1px solid var(--line);
}

.task-drawer-metrics > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.task-drawer-metrics dt { color: var(--muted); }
.task-drawer-metrics dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.task-drawer-events {
  min-height: 0;
  display: grid;
  gap: 8px;
}

.task-drawer-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-drawer-events-head strong {
  font-size: 13px;
}

.task-drawer-events-head small,
.task-drawer-event time,
.task-drawer-event-progress {
  color: var(--muted);
  font-size: 11px;
}

.task-drawer-event-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.task-drawer-event {
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.task-drawer-event-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-drawer-event-copy strong {
  color: #536482;
  font-size: 11px;
  font-weight: 700;
}

.task-drawer-event-copy span {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.5;
}

.task-drawer-event-progress {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.task-drawer-event-empty {
  margin: 0;
  padding: 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.task-drawer-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.desktop-capability-banner {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #d8e0ec;
  border-radius: 6px;
  color: #536482;
  background: #f7f9fc;
  font-size: 12px;
}

.desktop-capability-banner.is-ready {
  border-color: #b9dfd2;
  color: #176c56;
  background: #eef9f5;
}

.desktop-capability-banner.is-warning {
  border-color: #ead8a8;
  color: #82621c;
  background: #fff9e9;
}

.skill-preflight {
  margin-bottom: 14px;
  padding: 9px 11px;
  border: 1px solid #d8e0ec;
  border-radius: 6px;
  color: #536482;
  background: #f7f9fc;
  font-size: 12px;
}

.skill-preflight.is-ready {
  border-color: #b9dfd2;
  color: #176c56;
  background: #eef9f5;
}

.skill-preflight.is-error {
  border-color: #efc5c5;
  color: var(--red);
  background: #fff5f5;
}

.skill-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.skill-metric-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 14px;
}

.skill-metric-strip > div + div {
  border-left: 1px solid var(--line);
}

.skill-metric-strip span,
.skill-detail-grid span {
  color: var(--muted);
  font-size: 11px;
}

.skill-metric-strip strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skill-detail-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.skill-detail-grid strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #34435d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 214px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.skill-card:hover,
.skill-card:focus-visible {
  border-color: #aebfda;
  box-shadow: 0 8px 20px rgba(48, 75, 118, 0.08);
}

.skill-card:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.skill-card:disabled:hover {
  border-color: var(--line);
  box-shadow: none;
}

.skill-card-head,
.skill-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.skill-icon svg {
  width: 20px;
  height: 20px;
}

.skill-icon.blue { color: #3375f6; background: #e8f0ff; }
.skill-icon.orange { color: #de681e; background: #fff0e7; }
.skill-icon.green { color: #138263; background: #e5f5ef; }
.skill-icon.purple { color: #7552d5; background: #f0eafe; }

.skill-card > strong {
  overflow-wrap: anywhere;
  margin-top: 18px;
  font-size: 18px;
}

.skill-description {
  overflow-wrap: anywhere;
  margin-top: 7px;
  color: #60708d;
  line-height: 1.65;
}

.skill-platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
  margin-top: 10px;
}

.skill-platform-tags em {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 7px;
  border: 1px solid #dce7e5;
  border-radius: 3px;
  color: #2d7567;
  background: #f1f9f6;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.skill-task-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
  margin-top: 10px;
}

.skill-task-types em {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 7px;
  border: 1px solid #d9e3f6;
  border-radius: 3px;
  color: #4d6798;
  background: #f4f7ff;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.skill-followup-note {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.skill-card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e8ecf3;
}

.skill-card-foot small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.skill-card-foot b {
  color: var(--primary);
  font-size: 12px;
}

.consult-unavailable {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.consult-unavailable svg {
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.consult-unavailable strong {
  color: var(--text);
  font-size: 16px;
}

.consult-unavailable span {
  color: var(--muted);
  font-size: 13px;
}

.device-review-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f3f6fb;
}

.device-review-card {
  width: min(560px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.device-review-copy {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.device-review-copy small,
.device-review-note {
  color: var(--muted);
  font-size: 12px;
}

.device-review-copy h1 {
  margin: 0;
  font-size: 26px;
}

.device-review-copy p {
  margin: 0;
  color: #52627b;
  line-height: 1.7;
}

.device-review-info {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.device-review-info > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
}

.device-review-info dt {
  color: var(--muted);
  font-size: 12px;
}

.device-review-info dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.device-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.device-review-actions form {
  margin: 0;
}

.device-review-note {
  min-height: 18px;
  margin: 16px 0 0;
}

.consult-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: calc(100vh - 170px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.conversation-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f8faff;
}

.consult-mode {
  display: flex;
  margin: 16px;
}

.consult-mode button {
  flex: 1;
}

.consult-new {
  margin: 0 16px 12px;
}

.conversation-list {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 0;
  overflow: auto;
  padding: 0 8px;
}

.conversation-item {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.conversation-item:hover,
.conversation-item.is-active {
  background: #e7efff;
}

.conversation-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-panel {
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 68px;
  min-width: 0;
  min-height: 0;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.chat-agent {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.chat-agent > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
}

.chat-agent > span svg {
  width: 19px;
  height: 19px;
}

.chat-agent div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-agent small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #fbfcff;
}

.message-row {
  display: flex;
  justify-content: flex-start;
}

.message-row.is-user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(610px, 76%);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  line-height: 1.65;
}

.message-row.is-user .message-bubble {
  border-color: #bfd3ff;
  background: #e8f0ff;
}

.message-bubble small,
.message-source {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.message-source {
  padding-top: 8px;
  color: var(--primary);
  border-top: 1px solid #e2e7ef;
}

.chat-composer {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.primary-tabs {
  display: flex;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.primary-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 5px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.primary-tabs button svg {
  width: 18px;
  height: 18px;
}

.primary-tabs button > span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e9edf5;
  font-size: 11px;
}

.primary-tabs button.is-active {
  color: var(--primary);
}

.primary-tabs button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--primary);
}

.task-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.task-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.task-metric-strip > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.chat-composer-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.chat-composer-icon svg {
  width: 19px;
  height: 19px;
}

.task-metric-strip span {
  color: var(--muted);
  font-size: 12px;
}

.task-metric-strip strong {
  font-size: 16px;
}

.task-filter-title {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.date-range .input-control {
  width: 138px;
}

.date-range b {
  font-weight: 400;
}

.task-table {
  min-width: 960px;
  table-layout: fixed;
}

.task-table th,
.task-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.task-table th:nth-child(1) { width: 23%; }
.task-table th:nth-child(2) { width: 15%; }
.task-table th:nth-child(3) { width: 10%; }
.task-table th:nth-child(4) { width: 7%; }
.task-table th:nth-child(5) { width: 12%; }
.task-table th:nth-child(6) { width: 13%; }
.task-table th:nth-child(7) { width: 8%; }
.task-table th:nth-child(8) { width: 12%; }

.task-table td:last-child .button {
  min-width: 100px;
  padding-right: 9px;
  padding-left: 9px;
  white-space: nowrap;
}

.result-view-tabs {
  width: fit-content;
  margin-bottom: 14px;
}

.result-filter-bar {
  align-items: center;
}

.result-record-table {
  min-width: 1240px;
}

.listing-summary-table {
  min-width: 1120px;
}

@media (min-width: 861px) {
  .task-page .table-panel {
    overflow-x: hidden;
  }

  .task-page .data-table {
    min-width: 0;
    table-layout: fixed;
  }

  .task-page .data-table th,
  .task-page .data-table td {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
    overflow: hidden;
  }

  .task-page .data-table td {
    writing-mode: horizontal-tb;
  }

  .result-record-table th:nth-child(1) { width: 26%; }
  .result-record-table th:nth-child(2) { width: 11%; }
  .result-record-table th:nth-child(3) { width: 11%; }
  .result-record-table th:nth-child(4) { width: 14%; }
  .result-record-table th:nth-child(5) { width: 10%; }
  .result-record-table th:nth-child(6) { width: 8%; }
  .result-record-table th:nth-child(7) { width: 12%; }
  .result-record-table th:nth-child(8) { width: 8%; }

  .listing-summary-table th:nth-child(1) { width: 18%; }
  .listing-summary-table th:nth-child(2) { width: 8%; }
  .listing-summary-table th:nth-child(3) { width: 13%; }
  .listing-summary-table th:nth-child(4) { width: 7%; }
  .listing-summary-table th:nth-child(5) { width: 6%; }
  .listing-summary-table th:nth-child(6) { width: 6%; }
  .listing-summary-table th:nth-child(7) { width: 10%; }
  .listing-summary-table th:nth-child(8) { width: 18%; }
  .listing-summary-table th:nth-child(9) { width: 14%; }

  .optimization-summary-table th:nth-child(1) { width: 22%; }
  .optimization-summary-table th:nth-child(2) { width: 11%; }
  .optimization-summary-table th:nth-child(3) { width: 10%; }
  .optimization-summary-table th:nth-child(4) { width: 10%; }
  .optimization-summary-table th:nth-child(5) { width: 8%; }
  .optimization-summary-table th:nth-child(6) { width: 13%; }
  .optimization-summary-table th:nth-child(7) { width: 16%; }
  .optimization-summary-table th:nth-child(8) { width: 10%; }

  .result-record-table td:nth-child(2),
  .result-record-table td:nth-child(3),
  .result-record-table td:nth-child(7),
  .listing-summary-table td:nth-child(2),
  .listing-summary-table td:nth-child(3),
  .listing-summary-table td:nth-child(8),
  .optimization-summary-table td:nth-child(2),
  .optimization-summary-table td:nth-child(3),
  .optimization-summary-table td:nth-child(6),
  .optimization-summary-table td:nth-child(7) {
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-record-table .result-product {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
  }

  .result-record-table .result-thumb {
    width: 40px;
    height: 40px;
  }

  .result-record-table .result-product strong,
  .result-record-table .result-task-link strong,
  .result-record-table .result-product small,
  .result-record-table .result-task-link small,
  .result-record-table .result-platform-path,
  .result-record-table .result-price-stack > span,
  .result-record-table .result-price-stack small,
  .listing-summary-table .result-task-link strong,
  .listing-summary-table .result-task-link small,
  .optimization-summary-table .task-identity strong,
  .optimization-summary-table .task-identity small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    writing-mode: horizontal-tb;
  }

  .result-record-table td:last-child,
  .listing-summary-table td:last-child,
  .optimization-summary-table td:last-child {
    padding-right: 6px;
    padding-left: 6px;
  }

  .result-record-table td:last-child .button,
  .listing-summary-table td:last-child .button,
  .optimization-summary-table td:last-child .button {
    width: 100%;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    white-space: nowrap;
  }
}

.listing-result-count {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  font-size: 15px;
}

.listing-result-count.is-success {
  color: #087a50;
}

.listing-result-count.is-danger {
  color: #c23a3a;
}

.account-profile-band {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-size: 20px;
  font-weight: 750;
}

.account-profile-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  margin-right: auto;
}

.account-profile-copy strong {
  font-size: 19px;
}

.account-profile-copy span {
  color: var(--muted);
  font-size: 12px;
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-info-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-info-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.account-info-head svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.account-info-head .status,
.account-current-device,
[data-account-device-apply] {
  margin-left: auto;
}

.account-current-device {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

[data-account-device-apply] {
  margin-left: auto;
}

.account-info-list {
  margin: 0;
  padding: 4px 16px 8px;
}

.account-info-list > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f6;
}

.account-info-list > div:last-child {
  border-bottom: 0;
}

.account-info-list dt {
  color: var(--muted);
  font-size: 12px;
}

.account-info-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #334056;
  font-size: 12px;
  font-weight: 600;
}

.account-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.account-formal-note {
  margin: 0;
  padding: 12px 16px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.65;
}

.account-formal-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.account-formal-empty svg {
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.account-formal-empty p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.account-security-body {
  display: grid;
  gap: 14px;
}

.account-phone-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.account-phone-code-row .button {
  height: 38px;
  margin-bottom: 0;
}

.account-device-list-panel {
  margin-top: 14px;
}

.account-device-list-panel > .account-info-head {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface);
}

.account-device-list-panel .table-panel {
  border-radius: 0 0 8px 8px;
}

.account-device-table {
  min-width: 900px;
}

@media (max-width: 1100px) {
  .desktop-app-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 46px 26px;
    margin-top: 48px;
  }
}

@media (max-width: 820px) {
  .desktop-home { padding: 28px 22px 72px; }
  .desktop-home-avatar { width: 62px; height: 62px; flex-basis: 62px; }
  .desktop-home-greeting h1 { font-size: 22px; }
  .desktop-home-clock { display: none; }
  .desktop-app-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); margin-top: 46px; }
  .account-info-grid { grid-template-columns: 1fr; }
  .account-phone-code-row { grid-template-columns: 1fr; }
}

.result-product {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.result-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f3f6fa;
}

.result-thumb::before {
  content: "图";
  color: #8b98ad;
  font-size: 11px;
}

.result-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.result-product > span:last-child,
.result-task-link,
.result-price-stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.result-product strong,
.result-task-link strong {
  overflow: hidden;
  max-width: 220px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-product small,
.result-task-link small,
.result-price-stack small {
  color: var(--muted);
  font-size: 11px;
}

.result-platform-path {
  color: #40516e;
  white-space: nowrap;
}

.result-price-stack > span {
  color: var(--text);
  font-weight: 650;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 14px;
}

.pagination > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.page-button {
  width: 38px;
  padding: 0;
}

.page-button.is-active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.results-panel {
  margin-top: 6px;
}

.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  color: var(--text);
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(11, 22, 42, 0.42);
}

.modal.skill-modal {
  width: min(720px, calc(100vw - 32px));
  overflow: hidden;
}

.skill-modal > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 40px);
}

.skill-modal .modal-head,
.skill-modal .modal-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  background: var(--surface);
}

.skill-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.skill-modal .modal-actions {
  flex-wrap: wrap;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head > div {
  display: grid;
  gap: 3px;
}

.modal-head strong {
  font-size: 17px;
}

.modal-head small {
  color: var(--muted);
}

.modal-body {
  padding: 20px 18px;
}

.modal-body > p:first-child {
  margin-top: 0;
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.modal.task-detail-modal {
  width: min(1180px, calc(100vw - 48px));
  height: min(820px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.modal.task-detail-modal[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.task-detail-modal .modal-head,
.task-detail-modal .modal-actions {
  min-width: 0;
  background: var(--surface);
}

.task-detail-modal .modal-head > div,
.task-detail-modal .modal-head strong,
.task-detail-modal .task-detail-summary > div,
.task-detail-modal .task-detail-section {
  min-width: 0;
}

.task-detail-modal .modal-head small,
.task-detail-modal .modal-head strong,
.task-detail-modal .task-detail-section h3 {
  writing-mode: horizontal-tb;
}

.task-detail-modal .modal-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-modal .task-detail-body {
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.task-detail-modal .modal-actions {
  flex-wrap: wrap;
}

.modal-note {
  margin: 0 18px 18px;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-group > span {
  font-size: 12px;
  font-weight: 700;
}

.form-group .input-control,
.form-group .select-control {
  width: 100%;
}

.input-suffix {
  position: relative;
}

.input-suffix .input-control {
  padding-right: 32px;
}

.input-suffix > span {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--muted);
}

.modal-description {
  color: #4f607d;
  line-height: 1.65;
}

.modal-action-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.modal-action-note svg {
  width: 17px;
  height: 17px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 7px;
  color: #fff;
  background: #17233b;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.task-notification {
  position: fixed;
  right: 24px;
  bottom: 72px;
  z-index: 101;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #cbdcff;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(27, 47, 74, 0.16);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.task-notification:not([hidden]) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.task-notification-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
}

.task-notification-main > svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.task-notification-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-notification-copy small,
.task-notification-copy span {
  color: var(--muted);
  font-size: 11px;
}

.task-notification-copy strong {
  overflow: hidden;
  color: #243653;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-notification-close {
  color: var(--muted);
}

.login-body {
  min-height: 100vh;
  height: auto;
  overflow: auto;
  background: var(--surface);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(360px, 43%) minmax(0, 1fr);
  min-height: 100vh;
}

.login-intro {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 38px 48px;
  color: #fff;
  background: #182947;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 11px;
}

.login-brand > img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.skill-parameter-section {
  display: grid;
  gap: 13px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.skill-parameter-head,
.skill-selection-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skill-parameter-head h2,
.skill-parameter-head p { margin: 0; }
.skill-parameter-head h2 { font-size: 15px; }
.skill-parameter-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }

.skill-dynamic-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.skill-schema-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.skill-schema-state { flex: 0 0 auto; padding: 2px 5px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.skill-schema-state.is-effective { color: #176b42; background: #e9f7ef; }
.skill-schema-state.is-retained { color: #667085; background: #eef1f5; }
.skill-schema-note { min-height: 30px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.skill-selection-plans { display: grid; gap: 10px; }
.skill-selection-plan { padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcff; }
.skill-selection-plan-fields { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(120px, 1fr) minmax(90px, .7fr) minmax(105px, .7fr); gap: 10px; margin-top: 10px; }
.skill-selection-plan-fields .form-group { gap: 5px; }
.skill-selection-plan-fields [readonly] { color: #667085; background: #f0f2f6; }

.device-switch-dialog { width: min(620px, calc(100vw - 32px)); }
.device-switch-body { display: grid; gap: 14px; }
.device-switch-body > p { margin: 0; color: #59677d; line-height: 1.7; }
.device-switch-current,
.device-switch-option { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8faff; }
.device-switch-current > svg,
.device-switch-option > svg { width: 22px; height: 22px; color: var(--primary); }
.device-switch-current div,
.device-switch-option div { display: grid; min-width: 0; gap: 3px; }
.device-switch-current span,
.device-switch-current small,
.device-switch-option small { color: var(--muted); font-size: 12px; }
.device-switch-options { display: grid; gap: 8px; }
.device-switch-empty { padding: 13px; border: 1px dashed var(--line); border-radius: 6px; background: #fafbfc; }
.device-switch-note { margin: 0 !important; }

.login-brand strong {
  font-size: 17px;
}

.login-intro-copy {
  width: min(500px, 100%);
  margin: auto 0;
}

.login-kicker {
  margin: 0 0 12px !important;
  color: #8db7ff !important;
  font-weight: 750;
}

.login-intro-copy h1 {
  margin: 0 0 17px;
  font-size: 40px;
  line-height: 1.18;
}

.login-intro-copy > p {
  margin: 0;
  color: #c6d2e7;
  font-size: 16px;
  line-height: 1.75;
}

.login-intro-copy ul {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.login-intro-copy li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #e2e8f4;
}

.login-intro-copy li svg {
  width: 20px;
  height: 20px;
  color: #79a8ff;
}

.login-intro > small {
  color: #8fa0bd;
}

.login-main {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 100vh;
  padding: 40px 24px;
  background: var(--bg);
}

.login-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(33, 58, 98, 0.12);
}

.login-card > header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}

.login-card > header h2 {
  margin: 0 0 5px;
  font-size: 23px;
}

.login-card > header p {
  margin: 0;
  color: var(--muted);
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
  padding: 11px 12px;
  border: 1px solid #f2bcbc;
  border-radius: 7px;
  color: #a42525;
  background: #fff1f1;
  line-height: 1.5;
}

.login-error svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-input {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
}

.login-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.12);
}

.login-input > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.login-input input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 9px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.login-input button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.login-input button:hover {
  color: var(--text);
  background: #eef2f8;
}

.login-input button svg {
  width: 18px;
  height: 18px;
}

.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 3px;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-security svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 1180px) {
  .account-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-heading-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .store-toolbar {
    display: grid;
    grid-template-columns: 130px minmax(220px, 1fr) max-content;
    align-items: center;
  }

  .store-search {
    width: 100%;
  }

  .task-filter-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .task-filter-title {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 860px) {
  .main-content {
    padding: 24px 20px 36px;
  }

  .course-toolbar {
    flex-wrap: wrap;
  }

  .course-toolbar .search-control {
    flex-basis: 100%;
  }

  .consult-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .store-toolbar {
    grid-template-columns: minmax(130px, 0.7fr) minmax(210px, 1.3fr) max-content;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: auto;
    padding: 24px;
  }

  .login-intro-copy {
    margin: 54px 0 42px;
  }

  .login-intro-copy h1 {
    font-size: 32px;
  }

  .login-intro > small {
    display: none;
  }

  .login-main {
    min-height: auto;
    padding: 32px 20px 52px;
  }
}

@media (max-width: 720px) {
  body.prototype-shell .app-shell {
    display: block;
    height: 100vh;
  }

  body.prototype-shell .workspace {
    width: 100%;
    height: 100vh;
  }

  body.prototype-shell .side-rail {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 68px;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  body.prototype-shell .rail-brand {
    display: none;
  }

  body.prototype-shell .rail-nav {
    width: auto;
    display: grid;
    flex: 0 0 calc(100% * 6 / 7);
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    height: 100%;
  }

  body.prototype-shell .rail-footer {
    width: auto;
    height: 100%;
    display: grid;
    flex: 0 0 calc(100% / 7);
    margin: 0;
    gap: 2px;
  }

  body.prototype-shell .rail-account,
  body.prototype-shell .rail-link {
    display: flex;
    min-height: 56px;
    padding: 4px 2px;
    gap: 3px;
    font-size: 11px;
  }

  body.prototype-shell .rail-link.is-active::before {
    top: auto;
    right: 24%;
    bottom: -5px;
    left: 24%;
    width: auto;
    height: 3px;
  }

  body.prototype-shell .topbar {
    min-height: 56px;
    height: 56px;
    padding: 0 14px;
  }

  body.prototype-shell .main-content {
    height: calc(100vh - 56px - 68px);
    padding: 18px 14px 28px;
  }

  .store-table-panel {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .store-table {
    display: block;
    min-width: 0;
  }

  .store-table thead {
    display: none;
  }

  .store-table tbody {
    display: grid;
    gap: 10px;
  }

  .store-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
  }

  .store-table tbody td {
    display: grid;
    min-width: 0;
    height: auto;
    gap: 6px;
    padding: 12px;
    border-bottom: 1px solid #edf1f7;
  }

  .store-table tbody td::before {
    content: attr(data-label);
    color: #71809a;
    font-size: 11px;
    font-weight: 700;
  }

  .store-table tbody td:first-child,
  .store-table tbody td:last-child {
    grid-column: 1 / -1;
  }

  .store-table tbody td:last-child {
    border-bottom: 0;
  }

  .store-identity strong,
  .store-name-link {
    max-width: 100%;
  }

  .store-row-actions {
    grid-template-columns: max-content max-content max-content;
  }

  .store-delete-button {
    grid-column: auto;
  }

  .store-toolbar {
    grid-template-columns: 1fr;
  }

  .store-toolbar > .select-control,
  .store-add-button {
    width: 100%;
  }

  .store-connection-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .store-remark-field {
    grid-column: auto;
  }

  .account-info-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-band {
    align-items: flex-start;
  }

  .account-profile-band .status {
    margin-left: auto;
  }

  .task-metric-strip {
    grid-template-columns: 1fr 1fr;
  }
  body {
    overflow: hidden;
  }

  .app-shell {
    display: block;
    height: 100vh;
  }

  .side-rail {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: block;
    height: 68px;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .rail-brand,
  .rail-account {
    display: none;
  }

  .rail-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    height: 100%;
  }

  .rail-link {
    min-height: 56px;
    padding: 4px 2px;
    gap: 3px;
    font-size: 11px;
  }

  .rail-link svg {
    width: 20px;
    height: 20px;
  }

  .rail-link.is-active::before {
    top: auto;
    right: 24%;
    bottom: -5px;
    left: 24%;
    width: auto;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  .workspace {
    height: 100vh;
  }

  .topbar {
    height: 56px;
    padding: 0 14px;
  }

  .topbar-title {
    overflow: hidden;
    max-width: 100px;
    text-overflow: ellipsis;
  }

  .session-user {
    display: none;
  }

  .main-content {
    height: calc(100vh - 56px - 68px);
    padding: 18px 14px 28px;
  }

  .page-heading {
    margin-bottom: 16px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .course-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .course-cover {
    min-height: 170px;
  }

  .compact-toolbar,
  .skill-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-toolbar .search-control,
  .compact-toolbar .select-control,
  .compact-toolbar .button,
  .skill-search {
    width: 100%;
  }

  .consult-page {
    min-height: 0;
  }

  .consult-shell {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .conversation-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .conversation-list {
    display: flex;
    overflow-x: auto;
    padding: 0 10px 10px;
  }

  .conversation-item {
    min-width: 210px;
  }

  .chat-panel {
    grid-template-rows: 62px 300px 68px;
  }

  .message-list {
    padding: 16px 12px;
  }

  .message-bubble {
    max-width: 88%;
  }

  .task-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .task-filter-bar > .select-control {
    width: 100%;
  }

  .date-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .date-range > span {
    grid-column: 1 / -1;
  }

  .date-range .input-control {
    width: 100%;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .pagination > span {
    width: 100%;
    margin-right: 0;
  }

  .modal-actions {
    flex-wrap: wrap;
  }

  .skill-modal > form {
    max-height: calc(100vh - 24px);
  }

  .modal-action-note {
    width: 100%;
  }

  .toast {
    right: 16px;
    bottom: 84px;
  }

  .task-notification {
    right: 16px;
    bottom: 132px;
  }

  .login-intro {
    padding: 18px 16px;
  }

  .login-intro-copy {
    margin: 36px 0 24px;
  }

  .login-intro-copy h1 {
    font-size: 28px;
  }

  .login-intro-copy > p {
    font-size: 14px;
  }

  .login-intro-copy ul {
    display: none;
  }

  .login-main {
    padding: 24px 14px 40px;
  }

  .login-card {
    padding: 24px 18px;
  }
}

@media (max-width: 1100px) {
  .browser-toolbar {
    flex-wrap: wrap;
  }

  body.prototype-shell .browser-entry-controls {
    flex-wrap: wrap;
  }

  .browser-address {
    order: 10;
    flex-basis: 100%;
  }

  .browser-shell.is-task-open .browser-body {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .task-drawer-inner {
    width: 330px;
  }
}

@media (max-width: 820px) {
  .browser-toolbar {
    gap: 6px;
    padding-inline: 8px;
  }

  body.prototype-shell .browser-entry-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  }

  .browser-entry-controls .select-control {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .browser-entry-controls .button,
  .browser-task-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .browser-entry-controls .button svg,
  .browser-task-button svg {
    margin: 0;
  }

  .browser-shell.is-task-open .browser-body {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .task-drawer-inner {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .browser-toolbar > .icon-button {
    display: none;
  }

  body.prototype-shell .browser-entry-controls {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .browser-entry-controls .select-control[name="entry"] {
    display: none;
  }

  .browser-task-button {
    order: 1;
    margin-left: auto;
  }

  .browser-address {
    order: 3;
    padding-inline: 10px;
  }

  .task-drawer-body {
    gap: 14px;
    padding: 12px;
  }

  .task-drawer-event {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .task-drawer-event-progress {
    grid-column: 2;
    text-align: left;
  }
}
