:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --panel-soft: #eef3ee;
  --ink: #1e2420;
  --muted: #647067;
  --line: #dce3dd;
  --line-strong: #c6d0c8;
  --green: #2f7d58;
  --green-dark: #1f6544;
  --blue: #346bb3;
  --yellow: #b68113;
  --red: #b34848;
  --teal: #1f7a78;
  --shadow: 0 18px 45px rgba(31, 45, 36, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand-logo {
  width: 46px;
  height: 46px;
  display: block;
}

.logo-bg {
  fill: transparent;
}

.logo-m,
.logo-y,
.logo-wind {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-m {
  stroke: #ffffff;
  stroke-width: 5;
}

.logo-y {
  stroke: #dff8ef;
  stroke-width: 4.4;
}

.logo-wind {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 3;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
}

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

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

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  background: var(--panel-soft);
  color: var(--ink);
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--green);
  font-weight: 700;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.main {
  min-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  border-bottom: 1px solid #dfeaf7;
  background: rgba(255, 255, 255, 0.96);
  padding: 0 28px;
  backdrop-filter: blur(14px);
}

.system-link-tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.system-link-tab {
  min-width: 136px;
  border: 0;
  border-right: 1px solid #eef3f8;
  border-radius: 0;
  background: #fff;
  color: #26364f;
  font-size: 20px;
  font-weight: 900;
}

.system-link-tab:first-child {
  border-left: 1px solid #f3f7fb;
}

.system-link-tab:hover {
  background: #f6fbff;
  color: #2366b2;
}

.system-user-segment {
  display: inline-flex;
  align-items: stretch;
  align-self: center;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid #cfe1f5;
  border-radius: 999px;
  background: #f8fbff;
  box-shadow: 0 10px 26px rgba(43, 87, 143, 0.08);
  white-space: nowrap;
}

.system-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 22px 6px 10px;
  background: #fff;
}

.system-user-avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #1fb9df, #0ca6c1);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.system-user-text {
  display: grid;
  gap: 3px;
  line-height: 1;
}

.system-user-text strong {
  max-width: 150px;
  overflow: hidden;
  color: #26364f;
  font-size: 20px;
  font-weight: 900;
  text-overflow: ellipsis;
}

.system-user-text em {
  max-width: 180px;
  overflow: hidden;
  color: #71809a;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
}

.system-segment-button {
  min-width: 118px;
  border: 0;
  border-left: 1px solid #cfe1f5;
  border-radius: 0;
  background: #eef6ff;
  color: #2266b2;
  padding: 0 22px;
  font-size: 18px;
  font-weight: 900;
}

.system-segment-button:hover {
  background: #e5f1ff;
}

.system-segment-button.muted {
  background: #fff;
  color: #66758c;
}

.system-workbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.72);
  padding: 12px 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(36vw, 360px);
  min-width: 230px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  padding: 0 12px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.login-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-switcher .select {
  min-width: 168px;
}

.content {
  padding: 28px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.kpi-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.grid.two-col {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 16px;
}

.search-results {
  display: grid;
  gap: 18px;
}

.search-group {
  display: grid;
  gap: 10px;
}

.search-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.search-empty {
  gap: 8px;
  padding: 28px;
}

.search-empty strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.search-empty span {
  max-width: 620px;
  line-height: 1.65;
}

.logistics-cell {
  min-width: 170px;
}

.logistics-cell .pill {
  margin-right: 4px;
}

.logistics-api-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(231, 247, 255, 0.92), rgba(255, 255, 255, 0.96));
  padding: 14px 16px;
}

.logistics-api-banner > div {
  display: grid;
  gap: 4px;
}

.logistics-api-banner strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.logistics-api-banner span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.logistics-api-banner.ready {
  border-color: rgba(14, 165, 233, 0.32);
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(255, 255, 255, 0.98));
}

.logistics-detail {
  display: grid;
  gap: 16px;
}

.logistics-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  gap: 5px;
  border-left: 3px solid var(--green);
  background: #fff;
  padding: 9px 12px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

.kpi-card .label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.kpi-card .value {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.kpi-card .hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(31, 122, 120, 0.07), transparent 45%),
    #fff;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.scope-banner strong,
.scope-banner span {
  display: block;
}

.scope-banner span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.segmented button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

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

.segmented button.active {
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.select,
.input,
.textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
}

.textarea {
  min-height: 86px;
  resize: vertical;
  padding: 10px;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 13px;
  white-space: nowrap;
}

.primary-button {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  font-weight: 700;
}

.primary-button:hover {
  background: var(--green-dark);
}

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

.secondary-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.danger-button {
  background: #fff;
  border-color: #e4bbbb;
  color: var(--red);
}

.icon-button {
  width: 40px;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.icon-button.ghost {
  background: transparent;
}

.table-wrap {
  overflow-x: auto;
}

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

.compact-table {
  min-width: 520px;
}

.compact-table th,
.compact-table td {
  padding: 10px 9px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

td {
  font-size: 13px;
}

tr:hover td {
  background: #fafbf9;
}

.name-cell strong,
.stack strong {
  display: block;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.green {
  background: #dff1e6;
  color: var(--green-dark);
}

.pill.blue {
  background: #e2ebf8;
  color: var(--blue);
}

.pill.yellow {
  background: #f7ecd2;
  color: #78540c;
}

.pill.red {
  background: #f6dfdf;
  color: var(--red);
}

.pill.gray {
  background: #edf0ed;
  color: #526059;
}

.pill.teal {
  background: #dcf1ef;
  color: var(--teal);
}

.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

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

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-column {
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  font-weight: 800;
}

.kanban-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}

.item-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.item-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #edf0ed;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--green);
}

.empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

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

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

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

#modalBody {
  padding: 18px;
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 60;
  max-width: min(620px, calc(100vw - 44px));
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius);
  background: #1e2420;
  color: #fff;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 650;
  text-align: center;
  box-shadow: 0 18px 46px rgba(37, 48, 68, 0.22);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

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

.mini-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 9px;
  font-size: 12px;
}

.mini-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.progress-list {
  display: grid;
  gap: 12px;
}

.progress-item {
  display: grid;
  gap: 7px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: #edf0ed;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

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

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

  .nav-list {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .sidebar-footer {
    display: none;
  }

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

  .topbar-actions,
  .search-box {
    width: 100%;
  }

  .grid.kpi-grid,
  .grid.two-col,
  .grid.three-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .sidebar,
  .topbar,
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .login-switcher {
    grid-column: 1 / -1;
    width: 100%;
  }

  .login-switcher .select {
    width: 100%;
  }

  .search-box {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .primary-button {
    width: 100%;
    grid-column: 1 / -1;
  }

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

  .modal-backdrop {
    padding: 8px;
  }
}

/* Sky blue UI polish */
:root {
  --bg: #f3f8fd;
  --panel: #ffffff;
  --panel-soft: #eaf5ff;
  --ink: #1d2833;
  --muted: #637789;
  --line: #d8e7f3;
  --line-strong: #acd0ea;
  --green: #2797d7;
  --green-dark: #177ebd;
  --blue: #3b8fe8;
  --yellow: #b68518;
  --red: #c24f5b;
  --teal: #31aeca;
  --shadow: 0 14px 34px rgba(60, 128, 176, 0.11);
}

body {
  background:
    linear-gradient(rgba(73, 159, 217, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 159, 217, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto;
  font-weight: 400;
}

h1,
h2,
h3,
strong,
.kpi-card .value,
.brand strong,
.login-brand strong,
.workspace-card strong {
  font-weight: 500;
}

h1 {
  font-size: 25px;
}

h2 {
  font-size: 19px;
}

h3 {
  font-size: 15px;
}

.sidebar,
.topbar,
.panel,
.kpi-card,
.item-card,
.modal,
.modal-header,
.workspace-card,
.login-panel {
  background: rgba(255, 255, 255, 0.88);
}

.sidebar {
  background: rgba(248, 252, 255, 0.94);
}

.topbar {
  background: rgba(243, 248, 253, 0.9);
}

.brand-mark {
  background: linear-gradient(135deg, #56bdf2, #2f9edc);
  box-shadow: 0 12px 26px rgba(39, 151, 215, 0.18);
}

.logo-y {
  stroke: #e6f7ff;
}

.logo-wind {
  stroke: rgba(255, 255, 255, 0.78);
}

.nav-button {
  font-weight: 400;
}

.nav-button:hover,
.nav-button.active {
  background: #eaf5ff;
  color: #163247;
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--green);
  font-weight: 500;
}

.eyebrow,
.login-switcher,
.kpi-card .label,
th,
.form-field > span,
.ai-date-field,
.ai-chip {
  font-weight: 600;
}

.primary-button,
.segmented button.active {
  background: linear-gradient(135deg, #45ade8, #258ed0);
  border-color: #258ed0;
  color: #fff;
  box-shadow: 0 10px 22px rgba(39, 151, 215, 0.16);
  font-weight: 500;
}

.primary-button:hover {
  background: linear-gradient(135deg, #2f9edc, #177ebd);
}

.secondary-button,
.icon-button,
.mini-button,
.search-box,
.select,
.input,
.textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.secondary-button:hover,
.icon-button:hover,
.mini-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.panel,
.kpi-card,
.workspace-card,
.login-panel {
  border-color: rgba(172, 208, 234, 0.72);
  box-shadow: var(--shadow);
}

.kpi-card {
  background:
    linear-gradient(135deg, rgba(69, 173, 232, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.9);
}

.kpi-card .value {
  font-size: 27px;
}

tr:hover td {
  background: #f5fbff;
}

.pill.green {
  background: #e4f5ed;
  color: #23794f;
}

.pill.blue,
.pill.teal {
  background: #e3f3ff;
  color: #177ebd;
}

.pill.yellow {
  background: #fff2d5;
  color: #85600f;
}

.pill.red {
  background: #ffe6e8;
  color: var(--red);
}

.pill.gray {
  background: #edf4f9;
  color: #5c7080;
}

.bar-fill,
.progress-fill {
  background: linear-gradient(90deg, #45ade8, #31aeca);
}

.login-screen,
.workspace-screen,
.ai-hero {
  background: #edf7ff;
}

.login-screen::after {
  background:
    linear-gradient(90deg, rgba(237, 247, 255, 0.18), rgba(237, 247, 255, 0.48) 52%, rgba(237, 247, 255, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.workspace-screen::after {
  background:
    linear-gradient(180deg, rgba(237, 247, 255, 0.16), rgba(237, 247, 255, 0.42) 58%, rgba(237, 247, 255, 0.12)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.login-brand .brand-mark {
  box-shadow: 0 22px 44px rgba(39, 151, 215, 0.18);
}

.login-brand span {
  font-weight: 500;
}

.workspace-card {
  min-height: 230px;
}

.workspace-card:hover {
  border-color: rgba(39, 151, 215, 0.48);
  box-shadow: 0 24px 54px rgba(60, 128, 176, 0.16);
}

.workspace-card.loading {
  border-color: rgba(39, 151, 215, 0.56);
}

.workspace-icon {
  background: rgba(69, 173, 232, 0.12);
  color: var(--green);
}

.ai-chip {
  border-color: rgba(39, 151, 215, 0.22);
  color: var(--green-dark);
}

.ai-hero {
  border-color: rgba(172, 208, 234, 0.8);
}

.ai-hero-copy h2,
.login-panel-head h1,
.workspace-intro h1 {
  font-weight: 500;
}

.ai-hero .kpi-card,
.ai-qa-console,
.ai-report-controls {
  background: rgba(255, 255, 255, 0.78);
}

/* Tech console theme override */
:root {
  --bg: #071018;
  --panel: #0f1c27;
  --panel-soft: #132838;
  --ink: #e8f4ff;
  --muted: #8aa2b7;
  --line: rgba(123, 199, 255, 0.16);
  --line-strong: rgba(62, 210, 255, 0.38);
  --green: #2ee6a6;
  --green-dark: #18bb84;
  --blue: #48a7ff;
  --yellow: #f5c451;
  --red: #ff6b7a;
  --teal: #31d7e6;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

body {
  background:
    linear-gradient(rgba(72, 167, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 167, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 24% 12%, rgba(46, 230, 166, 0.12), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(72, 167, 255, 0.14), transparent 34%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

.sidebar {
  background: linear-gradient(180deg, rgba(10, 26, 39, 0.98), rgba(6, 14, 22, 0.98));
}

.brand-mark {
  background: linear-gradient(135deg, var(--teal), var(--green));
  color: #061018;
  box-shadow: 0 0 24px rgba(49, 215, 230, 0.38);
}

.nav-button:hover,
.nav-button.active {
  background: rgba(72, 167, 255, 0.1);
}

.nav-button.active {
  box-shadow:
    inset 3px 0 0 var(--teal),
    0 0 22px rgba(49, 215, 230, 0.08);
}

.topbar {
  background: rgba(7, 16, 24, 0.9);
}

.eyebrow {
  color: var(--teal);
}

.search-box,
.segmented,
.secondary-button,
.icon-button,
.mini-button {
  background: rgba(15, 28, 39, 0.9);
}

.panel {
  background: linear-gradient(180deg, rgba(18, 35, 48, 0.96), rgba(10, 22, 32, 0.96));
}

.kpi-card {
  background:
    linear-gradient(135deg, rgba(72, 167, 255, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(19, 40, 56, 0.96), rgba(10, 22, 32, 0.96));
}

.primary-button,
.segmented button.active {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #061018;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(49, 215, 230, 0.24);
}

.primary-button:hover {
  background: linear-gradient(135deg, #5eb4ff, #44effb);
}

.select,
.input,
.textarea {
  background: rgba(7, 16, 24, 0.72);
}

tr:hover td {
  background: rgba(72, 167, 255, 0.06);
}

.pill.green {
  background: rgba(46, 230, 166, 0.16);
  color: var(--green);
}

.pill.blue {
  background: rgba(72, 167, 255, 0.16);
}

.pill.yellow {
  background: rgba(245, 196, 81, 0.16);
  color: var(--yellow);
}

.pill.red {
  background: rgba(255, 107, 122, 0.16);
}

.pill.gray {
  background: rgba(138, 162, 183, 0.14);
  color: #b5c7d8;
}

.pill.teal {
  background: rgba(49, 215, 230, 0.16);
}

.kanban-column {
  background: rgba(7, 16, 24, 0.46);
}

.item-card {
  background: rgba(15, 28, 39, 0.92);
}

.bar-track,
.progress-track {
  background: rgba(138, 162, 183, 0.14);
}

.bar-fill {
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green));
}

.progress-fill {
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.activity-icon {
  background: rgba(49, 215, 230, 0.12);
  color: var(--teal);
}

.modal,
.modal-header {
  background: #0d1a25;
}

.toast {
  background: #071018;
}

.permission-pills,
.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 16, 24, 0.62);
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
}

.check-chip input {
  accent-color: var(--teal);
}

/* Light operations theme with subtle tech accents */
:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --panel-soft: #eef6f3;
  --ink: #1e2420;
  --muted: #647067;
  --line: #dce5df;
  --line-strong: #b9d4cb;
  --green: #2f7d58;
  --green-dark: #1f6544;
  --blue: #346bb3;
  --yellow: #b68113;
  --red: #b34848;
  --teal: #1f7a78;
  --shadow: 0 18px 45px rgba(31, 45, 36, 0.1);
}

body {
  background:
    linear-gradient(rgba(47, 125, 88, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 107, 179, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto;
}

.sidebar {
  background: #fbfcfa;
}

.brand-mark {
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 122, 120, 0.18);
}

.nav-button:hover,
.nav-button.active {
  background: var(--panel-soft);
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--green);
}

.topbar {
  background: rgba(246, 248, 247, 0.94);
}

.eyebrow {
  color: var(--green);
}

.search-box,
.segmented,
.secondary-button,
.icon-button,
.mini-button,
.select,
.input,
.textarea {
  background: var(--panel);
}

.panel,
.kpi-card,
.item-card,
.modal,
.modal-header {
  background: var(--panel);
}

.kpi-card {
  background:
    linear-gradient(135deg, rgba(31, 122, 120, 0.08), transparent 44%),
    var(--panel);
}

.primary-button,
.segmented button.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(47, 125, 88, 0.16);
}

.primary-button:hover {
  background: var(--green-dark);
}

tr:hover td {
  background: #fafbf9;
}

.pill.green {
  background: #dff1e6;
  color: var(--green-dark);
}

.pill.blue {
  background: #e2ebf8;
  color: var(--blue);
}

.pill.yellow {
  background: #f7ecd2;
  color: #78540c;
}

.pill.red {
  background: #f6dfdf;
  color: var(--red);
}

.pill.gray {
  background: #edf0ed;
  color: #526059;
}

.pill.teal {
  background: #dcf1ef;
  color: var(--teal);
}

.kanban-column {
  background: #fbfcfa;
}

.bar-track,
.progress-track {
  background: #edf0ed;
}

.bar-fill {
  background: linear-gradient(90deg, var(--green), var(--teal));
}

.progress-fill {
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.activity-icon {
  background: var(--panel-soft);
  color: var(--green);
}

.toast {
  background: #1e2420;
}

.check-chip {
  background: #fff;
  color: var(--ink);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100vh;
  overflow: hidden;
  background: #eef1f8;
}

.workspace-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100vh;
  overflow: hidden;
  background: #eef1f8;
}

.login-network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(238, 241, 248, 0.2), rgba(238, 241, 248, 0.56) 52%, rgba(238, 241, 248, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.workspace-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(238, 241, 248, 0.2), rgba(238, 241, 248, 0.5) 58%, rgba(238, 241, 248, 0.16)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.workspace-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.external-screen {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--bg);
}

.external-screen[hidden] {
  display: none;
}

.external-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.login-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 460px);
  align-items: center;
  gap: 48px;
  width: min(1120px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}

.workspace-shell {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 28px;
  width: min(1120px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.workspace-user-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  position: fixed;
  top: 44px;
  right: 7vw;
  z-index: 5;
}

.workspace-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid rgba(190, 208, 224, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 8px 18px 8px 8px;
  box-shadow: 0 18px 44px rgba(54, 74, 96, 0.14);
  backdrop-filter: blur(14px);
}

.workspace-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #13a8bd, #159fd3);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.workspace-user-text {
  display: grid;
  gap: 3px;
  line-height: 1;
}

.workspace-user-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workspace-user-text strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.workspace-user-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.workspace-logout-button {
  min-height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(54, 74, 96, 0.12);
  backdrop-filter: blur(14px);
}

/* Workspace identity: compact top-right badge, matching Tianyan system scale. */
.workspace-user-panel {
  top: 8px;
  right: clamp(18px, 2.6vw, 40px);
  gap: 0;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid rgba(204, 222, 242, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(38, 61, 90, 0.08);
  backdrop-filter: blur(14px);
}

.workspace-user-pill {
  min-width: 0;
  min-height: 36px;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px 12px 4px 6px;
  box-shadow: none;
}

.workspace-user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #1eb8dc 0%, #0ca5bf 100%);
  font-size: 16px;
  box-shadow: inset 0 -5px 10px rgba(0, 96, 123, 0.18);
}

.workspace-user-text {
  gap: 1px;
}

.workspace-user-text small {
  display: none;
}

.workspace-user-text strong {
  max-width: 92px;
  overflow: hidden;
  color: #26364f;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-user-text em {
  max-width: 112px;
  overflow: hidden;
  color: #7a8da6;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-logout-button {
  min-width: 72px;
  min-height: 36px;
  border: 0;
  border-left: 1px solid rgba(214, 229, 245, 0.96);
  border-radius: 0;
  background: rgba(248, 251, 255, 0.78);
  color: #2b3b54;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 820;
  box-shadow: none;
}

.workspace-logout-button:hover {
  border-left-color: rgba(112, 166, 238, 0.82);
  background: #eef6ff;
  color: var(--blue);
}

/* 统一入口右上身份区，保持与天眼系统同一套紧凑比例 */
.workspace-user-panel {
  position: absolute;
  top: 8px;
  right: clamp(32px, 7vw, 120px);
  gap: 0;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #cfe1f5;
  border-radius: 999px;
  background: #f8fbff;
  box-shadow: 0 6px 16px rgba(20, 38, 62, 0.08);
}

.workspace-user-pill {
  min-height: 38px;
  gap: 8px;
  background: #fff;
  padding: 0 12px 0 8px;
}

.workspace-user-avatar {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

.workspace-user-text strong {
  max-width: 92px;
  color: #26364f;
  font-size: 14px;
  font-weight: 850;
}

.workspace-user-text em {
  max-width: 112px;
  color: #71809a;
  font-size: 11px;
  font-weight: 760;
}

.workspace-logout-button {
  min-width: 54px;
  min-height: 38px;
  border-left: 1px solid #cfe1f5;
  background: #f8fbff;
  color: #5b6b82;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 820;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
}

.login-brand .brand-mark {
  width: 72px;
  height: 72px;
  box-shadow: 0 24px 48px rgba(47, 125, 88, 0.18);
}

.login-brand .brand-logo {
  width: 72px;
  height: 72px;
}

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

.login-brand strong {
  max-width: 460px;
  font-size: 34px;
  line-height: 1.18;
}

.login-brand span {
  margin-top: 10px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.workspace-intro {
  max-width: 680px;
}

.workspace-intro h1 {
  margin-top: 16px;
  font-size: 40px;
  line-height: 1.08;
}

.workspace-intro p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.workspace-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  border: 1px solid rgba(63, 126, 232, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  padding: 12px 15px;
  box-shadow: 0 18px 42px rgba(54, 74, 96, 0.12);
  backdrop-filter: blur(14px);
}

.workspace-notice strong {
  color: var(--blue);
  font-size: 14px;
  font-weight: 720;
}

.workspace-notice span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
}

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

.workspace-card {
  display: grid;
  gap: 16px;
  min-height: 250px;
  border: 1px solid rgba(198, 208, 200, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 24px;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 24px 58px rgba(54, 74, 96, 0.14);
  backdrop-filter: blur(14px);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.workspace-card:hover {
  transform: translateY(-4px);
  border-color: rgba(104, 117, 255, 0.54);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 68px rgba(54, 74, 96, 0.2);
}

.workspace-card.loading {
  transform: translateY(-2px);
  border-color: rgba(47, 125, 88, 0.54);
  cursor: progress;
}

.workspace-card.is-denied {
  opacity: 0.72;
  border-color: rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.8);
}

.workspace-card.is-denied:hover {
  transform: none;
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: 0 18px 44px rgba(54, 74, 96, 0.12);
}

.workspace-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(47, 125, 88, 0.1);
  color: var(--green);
}

.workspace-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.workspace-card > span:not(.workspace-icon):not(.workspace-lock-note) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.workspace-lock-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 999px;
  background: rgba(254, 226, 226, 0.72);
  color: #b91c1c;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 650;
}

.login-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(198, 208, 200, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 28px;
  box-shadow: 0 28px 68px rgba(54, 74, 96, 0.18);
  backdrop-filter: blur(16px);
}

.login-panel-head {
  margin-bottom: 4px;
}

.login-panel-head h1 {
  margin-top: 16px;
  font-size: 34px;
  line-height: 1.12;
}

.login-panel-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-panel .form-field {
  gap: 7px;
}

.login-panel .input,
.login-panel .select {
  min-height: 46px;
  background: rgba(255, 255, 255, 0.86);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.login-options .check-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
}

.login-submit {
  min-height: 46px;
  margin-top: 4px;
  font-size: 15px;
}

.ai-workspace {
  display: grid;
  gap: 18px;
}

.ai-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #d6ddef;
  border-radius: var(--radius);
  background: #eef1f8;
  box-shadow:
    0 22px 55px rgba(54, 74, 96, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.ai-network-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ai-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(238, 241, 248, 0.52) 0%, rgba(238, 241, 248, 0.14) 48%, rgba(238, 241, 248, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.ai-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  min-height: 620px;
  padding: 24px;
}

.ai-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ai-hero-copy {
  max-width: 540px;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid rgba(47, 125, 88, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-dark);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
}

.ai-hero-copy h2 {
  margin-top: 16px;
  font-size: 34px;
  line-height: 1.12;
}

.ai-hero-copy p,
.ai-qa-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.ai-report-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(198, 208, 200, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  padding: 10px;
  backdrop-filter: blur(14px);
}

.ai-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-date-field .input {
  width: 148px;
}

.ai-kpi-grid {
  align-self: start;
}

.ai-hero .kpi-card,
.ai-qa-console {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(12px);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.ai-hero .kpi-card:hover,
.ai-qa-console:hover {
  transform: translateY(-3px);
  border-color: rgba(104, 117, 255, 0.52);
  box-shadow: 0 28px 58px rgba(54, 74, 96, 0.18);
}

.ai-qa-console {
  align-self: end;
  display: grid;
  gap: 14px;
  max-width: 920px;
  border: 1px solid rgba(198, 208, 200, 0.74);
  border-radius: var(--radius);
  padding: 18px;
}

.ai-qa-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-qa-head h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.ai-hero .quick-prompts .mini-button {
  background: rgba(255, 255, 255, 0.78);
}

.ai-hero .qa-message,
.ai-hero .empty {
  background: rgba(255, 255, 255, 0.76);
}

.ai-board-grid {
  margin-top: 0;
}

.insight-list {
  display: grid;
  gap: 12px;
}

.insight-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(31, 122, 120, 0.05), transparent 42%), #fff;
  padding: 12px;
}

.insight-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.report-doc {
  display: grid;
  gap: 16px;
}

.report-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.report-section h3 {
  margin-bottom: 8px;
}

.report-section p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.report-textarea {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
  white-space: pre;
}

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

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.qa-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(52, 107, 179, 0.05), transparent 44%), #fff;
  padding: 14px;
}

.qa-answer-text {
  margin-top: 8px;
}

.qa-answer-text p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.65;
}

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

@media (max-width: 680px) {
  .login-screen {
    position: fixed;
    overflow-y: auto;
  }

  .workspace-screen {
    position: fixed;
    overflow-y: auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
    width: min(100% - 28px, 460px);
    min-height: 100vh;
    padding: 24px 0;
  }

  .workspace-shell {
    align-content: start;
    gap: 22px;
    width: min(100% - 28px, 520px);
    min-height: 100vh;
    padding: 24px 0;
  }

  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-user-panel {
    position: static;
    width: fit-content;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0;
  }

  .workspace-user-pill {
    width: auto;
    min-width: 0;
    min-height: 36px;
    border-radius: 0;
    padding: 4px 12px 4px 6px;
  }

  .workspace-user-avatar {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .workspace-user-text strong {
    max-width: 92px;
    font-size: 14px;
  }

  .workspace-user-text em {
    max-width: 112px;
    font-size: 11px;
  }

  .workspace-logout-button {
    width: auto;
    min-height: 36px;
    border-radius: 0;
    font-size: 13px;
  }

  .workspace-intro h1 {
    font-size: 30px;
  }

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

  .workspace-card {
    min-height: 176px;
    padding: 20px;
  }

  .workspace-card strong {
    font-size: 22px;
  }

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

  .login-brand .brand-mark,
  .login-brand .brand-logo {
    width: 56px;
    height: 56px;
  }

  .login-brand strong {
    font-size: 24px;
  }

  .login-brand span {
    margin-top: 6px;
    font-size: 15px;
  }

  .login-panel {
    padding: 20px;
  }

  .login-panel-head h1 {
    font-size: 28px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-hero {
    min-height: 760px;
  }

  .ai-hero-content {
    min-height: 760px;
    padding: 16px;
  }

  .ai-hero-top,
  .ai-report-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ai-hero-copy h2 {
    font-size: 28px;
  }

  .ai-date-field {
    display: grid;
    gap: 6px;
  }

  .ai-date-field .input {
    width: 100%;
  }

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

/* Yidiantong final operations UI */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f7fbff;
  --ink: #253044;
  --muted: #7b8798;
  --line: #e4ebf3;
  --line-strong: #cbd8e7;
  --green: #3f7ee8;
  --green-dark: #2f67cf;
  --blue: #3f7ee8;
  --yellow: #b7841b;
  --red: #e05a5a;
  --teal: #45b8c5;
  --shadow: 0 10px 24px rgba(37, 48, 68, 0.05);
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  height: auto;
  min-height: 64px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 0 24px;
  box-shadow: 0 1px 0 rgba(37, 48, 68, 0.02);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 170px;
  margin: 0 22px 0 0;
  padding: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, #4f8df0, #43b7c8);
  box-shadow: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
}

.brand strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.1;
}

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

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-button {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-height: 64px;
  border-radius: 0;
  color: #5d6675;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 600;
}

.nav-button svg {
  display: none;
}

.nav-button:hover,
.nav-button.active {
  background: #f7faff;
  color: var(--blue);
}

.nav-button.active {
  box-shadow: none;
}

.nav-button.active::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 0;
  left: 15px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.sidebar-footer {
  align-self: center;
  margin: 0 0 0 18px;
  border: 0;
  background: #f6f9fd;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  background: var(--teal);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 65px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 251, 0.94);
  padding: 18px 24px;
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

h1,
h2,
h3,
strong,
.kpi-card .value,
.brand strong,
.login-brand strong,
.workspace-card strong {
  font-style: normal;
}

h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 650;
}

h2 {
  font-size: 19px;
  font-weight: 650;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 650;
}

.topbar-actions {
  gap: 10px;
}

.search-box {
  width: min(34vw, 390px);
  height: 38px;
  border-color: var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.content {
  padding: 24px;
}

.grid {
  gap: 16px;
}

.grid.kpi-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.grid.three-col {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.panel,
.kpi-card,
.item-card,
.kanban-column,
.modal,
.modal-header,
.workspace-card,
.login-panel {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  overflow: hidden;
}

.panel-header {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.panel-header p {
  color: var(--muted);
  font-size: 12px;
}

.panel-body {
  padding: 16px 18px;
}

.kpi-card {
  min-height: 116px;
  padding: 17px 18px;
  background:
    linear-gradient(135deg, rgba(63, 126, 232, 0.045), transparent 52%),
    #fff;
}

.kpi-card:nth-child(3) {
  border-color: rgba(63, 126, 232, 0.36);
  background: #f1f6ff;
  box-shadow: 0 0 0 1px rgba(63, 126, 232, 0.08);
}

.kpi-card .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.kpi-card .label svg {
  color: #a3b4c8;
}

.kpi-card .value {
  margin-top: 13px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.kpi-card .hint {
  color: #8b98aa;
  font-size: 12px;
  font-style: normal;
}

.toolbar {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.mini-button {
  min-height: 36px;
  border-radius: 7px;
  font-weight: 600;
}

.primary-button,
.segmented button.active {
  border-color: #3f7ee8;
  background: #3f7ee8;
  color: #fff;
  box-shadow: 0 8px 18px rgba(63, 126, 232, 0.18);
}

.primary-button:hover,
.segmented button.active:hover {
  background: #346ed1;
}

.secondary-button,
.icon-button,
.mini-button {
  border-color: var(--line-strong);
  background: #fff;
  color: #344055;
  box-shadow: none;
}

.secondary-button:hover,
.icon-button:hover,
.mini-button:hover {
  border-color: #9bbbea;
  color: var(--blue);
}

.danger-button {
  background: #fff;
  border-color: #f2c1c1;
  color: var(--red);
}

.select,
.input,
.textarea {
  min-height: 36px;
  border-color: var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.segmented {
  border-color: var(--line);
  border-radius: 7px;
  background: #fff;
}

.segmented button {
  min-height: 34px;
  color: var(--muted);
  font-weight: 600;
}

.table-wrap {
  border-top: 0;
  overflow-x: auto;
}

table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.compact-table {
  min-width: 560px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
}

th {
  background: #f8fafc;
  color: #687385;
  font-size: 12px;
  font-weight: 650;
}

td {
  color: #344055;
  font-size: 13px;
  line-height: 1.45;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #f8fbff;
}

.name-cell span,
.stack span {
  color: var(--muted);
}

.pill {
  min-height: 24px;
  border-radius: 999px;
  font-weight: 650;
}

.pill.green {
  background: #e9f8ef;
  color: #2f8c5a;
}

.pill.blue,
.pill.teal {
  background: #eaf3ff;
  color: var(--blue);
}

.pill.yellow {
  background: #fff5db;
  color: #9a6c12;
}

.pill.red {
  background: #fff0f0;
  color: var(--red);
}

.pill.gray {
  background: #eef2f7;
  color: #657386;
}

.scope-banner,
.logistics-api-banner {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.bar-track,
.progress-track {
  background: #edf2f7;
}

.bar-fill,
.progress-fill {
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.activity-icon,
.workspace-icon {
  background: #eef6ff;
  color: var(--blue);
}

.empty {
  border-color: var(--line-strong);
  background: #fbfdff;
}

.modal-backdrop {
  background: rgba(37, 48, 68, 0.34);
}

.modal {
  box-shadow: 0 24px 72px rgba(37, 48, 68, 0.22);
}

.toast {
  background: #253044;
  box-shadow: 0 14px 34px rgba(37, 48, 68, 0.18);
}

@media (max-width: 1180px) {
  .sidebar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 18px 0;
  }

  .brand {
    min-width: 0;
    margin-right: 0;
  }

  .nav-button {
    min-height: 48px;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar {
    top: 111px;
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box {
    width: min(100%, 520px);
  }

  .grid.kpi-grid,
  .grid.three-col,
  .grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .sidebar {
    padding: 10px 12px 0;
  }

  .topbar {
    top: 101px;
    padding: 14px 12px;
  }

  .content {
    padding: 14px 12px;
  }

  .nav-button {
    padding: 0 12px;
    font-size: 13px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .search-box,
  .login-switcher,
  .quick-prompts,
  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .grid.kpi-grid,
  .grid.three-col,
  .grid.two-col,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: auto;
    grid-column: auto;
  }
}

/* Numeric typography refinement */
body {
  font-family:
    "Inter var", Inter, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body,
button,
input,
select,
textarea {
  font-variant-numeric: tabular-nums;
}

h1 {
  font-size: 24px;
  font-weight: 680;
  letter-spacing: 0;
}

h2,
h3 {
  font-weight: 660;
  letter-spacing: 0;
}

.nav-button,
.brand strong,
.panel-header h3,
.toolbar,
.secondary-button,
.primary-button,
.mini-button {
  letter-spacing: 0;
}

.kpi-card {
  padding: 18px 19px;
}

.kpi-card .label {
  color: #7f8b9b;
  font-size: 13px;
  font-weight: 620;
}

.kpi-card .value {
  font-family:
    "DIN Alternate", "SF Pro Display", "Inter var", Inter, "PingFang SC", system-ui,
    sans-serif;
  margin-top: 12px;
  color: #253044;
  font-size: 31px;
  font-weight: 680;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums lining-nums;
}

.kpi-card .hint {
  margin-top: 10px;
  color: #8d98a8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.money,
td:nth-child(n + 4):not(.name-cell),
.bar-row strong,
.progress-head strong {
  font-family:
    "DIN Alternate", "SF Pro Text", "Inter var", Inter, "PingFang SC", system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
}

.money {
  color: #263244;
  font-weight: 560;
}

th {
  color: #728092;
  font-size: 12px;
  font-weight: 620;
}

td {
  color: #344055;
  font-size: 13px;
  font-weight: 430;
}

td strong,
.name-cell strong,
.stack strong {
  color: #263244;
  font-weight: 620;
}

.name-cell span,
.stack span {
  color: #7e8a9a;
  font-size: 12px;
  font-weight: 430;
}

.pill {
  font-size: 12px;
  font-weight: 620;
}

.topbar .eyebrow,
.panel-header p,
.scope-banner span,
.logistics-api-banner span {
  font-weight: 450;
}

.topbar-actions .select {
  font-weight: 560;
}

.search-box input::placeholder {
  color: #9aa6b6;
  font-weight: 420;
}

.table-wrap {
  padding-right: 1px;
}

th:last-child,
td:last-child {
  padding-right: 18px;
}

td.money,
td:nth-child(3):has(+ td.money),
td:nth-child(4):has(+ td.money),
td:nth-child(5):has(+ td.money),
.compact-table td:nth-child(n + 2) {
  text-align: right;
}

.compact-table th:nth-child(n + 2) {
  text-align: right;
}

.kpi-card .value,
.money,
.bar-row strong,
.progress-head strong {
  text-wrap: nowrap;
}

.grid.three-col .table-wrap {
  overflow-x: hidden;
}

.grid.three-col .compact-table {
  min-width: 0;
  table-layout: fixed;
}

.grid.three-col .compact-table th,
.grid.three-col .compact-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.grid.three-col .compact-table .name-cell strong,
.grid.three-col .compact-table .name-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid.three-col .compact-table .pill {
  max-width: 100%;
}

.sales-center-risk {
  border-color: rgba(194, 79, 91, 0.28);
  background: #fff7f8;
}

.sales-center-safe {
  border-color: rgba(69, 173, 232, 0.28);
  background: #f6fbff;
}

.panel a.primary-button {
  text-decoration: none;
}

.sales-subnav-panel {
  position: sticky;
  top: 89px;
  z-index: 6;
  margin-bottom: 16px;
  overflow: hidden;
}

.sales-subnav-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fbfdff;
  padding: 0 16px;
}

.sales-subnav-wrap > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.sales-subnav {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sales-subnav::-webkit-scrollbar {
  display: none;
}

.sales-subnav button {
  position: relative;
  flex: 0 0 auto;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: #5d6675;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 620;
}

.sales-subnav button:hover {
  color: var(--blue);
}

.sales-subnav button.active {
  color: var(--blue);
  font-weight: 720;
}

.sales-subnav button.active::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.purchase-bridge-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid #d8e6f6;
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 14px 16px;
  box-shadow: 0 8px 22px rgba(52, 107, 179, 0.08);
}

.purchase-bridge-banner.ready {
  border-color: rgba(31, 122, 120, 0.28);
  background: #f4fbfa;
}

.purchase-bridge-banner.syncing {
  border-color: rgba(52, 107, 179, 0.32);
  background: #f3f7ff;
}

.purchase-bridge-banner.mock {
  border-color: rgba(182, 129, 19, 0.24);
  background: #fffaf0;
}

.purchase-bridge-banner strong,
.purchase-bridge-banner span {
  display: block;
}

.purchase-bridge-banner strong {
  color: var(--ink);
  font-size: 15px;
}

.purchase-bridge-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.purchase-dashboard {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: calc(100vh - 126px);
  border: 1px solid rgba(77, 170, 255, 0.34);
  border-radius: 16px;
  background:
    linear-gradient(rgba(4, 9, 20, 0.84), rgba(4, 9, 20, 0.9)),
    radial-gradient(circle at 22% 18%, rgba(33, 143, 255, 0.34), transparent 30%),
    radial-gradient(circle at 76% 24%, rgba(79, 226, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #050914, #081a36 48%, #050914);
  padding: 18px;
  box-shadow: 0 28px 72px rgba(3, 8, 20, 0.42);
}

.purchase-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(58, 170, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 170, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 44%, rgba(0, 0, 0, 0.88), transparent 72%);
}

.purchase-dashboard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(74, 190, 255, 0.16), transparent) 0 74px / 100% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(74, 190, 255, 0.14), transparent) 50% 0 / 1px 100% no-repeat;
}

@keyframes purchaseGridSweep {
  0% {
    transform: translateY(-18%);
    opacity: 0.18;
  }

  50% {
    opacity: 0.42;
  }

  100% {
    transform: translateY(118%);
    opacity: 0.18;
  }
}

@keyframes purchaseStageEnter {
  0% {
    opacity: 0;
    transform: scale(0.985);
    filter: brightness(0.72) blur(2px);
  }

  62% {
    opacity: 1;
    filter: brightness(1.12) blur(0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1) blur(0);
  }
}

@keyframes purchaseFrameEnter {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
    box-shadow: 0 0 0 rgba(20, 142, 255, 0);
  }

  72% {
    opacity: 1;
    transform: translateY(0) scale(1.012);
    box-shadow: 0 0 70px rgba(83, 222, 255, 0.28);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes purchasePanelEnter {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes purchaseNodePulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(44, 137, 255, 0.18);
  }

  50% {
    box-shadow: 0 0 28px rgba(86, 239, 255, 0.42);
  }
}

@keyframes purchaseStreamIn {
  0% {
    opacity: 0.58;
    transform: translateX(14px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.purchase-dashboard > * {
  position: relative;
}

.purchase-screen-frame {
  display: grid;
  gap: 14px;
  overflow: hidden;
  border: 2px solid rgba(91, 172, 255, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 35, 84, 0.68), rgba(3, 11, 30, 0.9)),
    rgba(4, 12, 30, 0.86);
  padding: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(85, 211, 255, 0.12),
    inset 0 0 60px rgba(20, 108, 255, 0.12),
    0 0 42px rgba(20, 142, 255, 0.18);
}

.purchase-screen-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(57, 174, 255, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent, rgba(35, 125, 255, 0.2), transparent),
    rgba(2, 16, 47, 0.74);
  padding: 16px 18px;
  box-shadow: inset 0 0 24px rgba(35, 139, 255, 0.16);
}

.purchase-screen-hero h2 {
  margin: 8px 0 6px;
  color: #6de8ff;
  font-size: 30px;
  font-weight: 680;
  text-shadow: 0 0 18px rgba(70, 216, 255, 0.5);
}

.purchase-screen-hero p,
.purchase-status-strip span,
.purchase-screen-panel p {
  margin: 0;
  color: #8db4d7;
  font-size: 13px;
}

.purchase-screen-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.purchase-screen-user {
  display: grid;
  gap: 2px;
  min-width: 138px;
  border: 1px solid rgba(90, 190, 255, 0.42);
  border-radius: 4px;
  background: rgba(5, 23, 61, 0.74);
  padding: 8px 12px;
}

.purchase-screen-user span {
  color: #8db4d7;
  font-size: 12px;
}

.purchase-screen-user strong {
  color: #e7f8ff;
  font-size: 15px;
}

.purchase-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(60, 174, 255, 0.36);
  border-radius: 4px;
  background: rgba(3, 18, 48, 0.78);
  padding: 12px 14px;
  box-shadow: inset 0 0 22px rgba(34, 135, 255, 0.12);
}

.purchase-status-strip strong {
  display: block;
  color: #e7f8ff;
  font-size: 15px;
}

.purchase-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.purchase-big-metric {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  border: 1px solid rgba(64, 184, 255, 0.42);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(21, 92, 178, 0.34), transparent 62%),
    rgba(4, 20, 58, 0.86);
  padding: 13px 14px;
  box-shadow:
    inset 0 0 18px rgba(61, 179, 255, 0.13),
    0 0 18px rgba(20, 108, 255, 0.1);
}

.purchase-big-metric::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 52px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2c72ff, #52edff);
  box-shadow: 0 0 10px rgba(82, 237, 255, 0.72);
}

.purchase-big-metric span {
  display: block;
  color: #8db4d7;
  font-size: 13px;
  font-weight: 620;
}

.purchase-big-metric strong {
  display: block;
  margin-top: 9px;
  color: #f7fdff;
  font-size: 26px;
  font-weight: 720;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(82, 237, 255, 0.35);
}

.purchase-big-metric em {
  display: block;
  margin-top: 8px;
  color: #7fa9ca;
  font-size: 12px;
  font-style: normal;
}

.purchase-big-metric.green::after {
  background: linear-gradient(90deg, #29a36a, #58c1bc);
}

.purchase-big-metric.cyan::after {
  background: linear-gradient(90deg, #3f7ee8, #32b8d0);
}

.purchase-big-metric.amber::after {
  background: linear-gradient(90deg, #e0a226, #58c1bc);
}

.purchase-big-metric.violet::after {
  background: linear-gradient(90deg, #7d8cff, #58c1bc);
}

.purchase-screen-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 1.35fr) minmax(240px, 0.9fr);
  grid-template-areas:
    "rank core funnel"
    "risk core funnel";
  gap: 14px;
}

.purchase-screen-panel {
  overflow: hidden;
  border: 1px solid rgba(64, 184, 255, 0.42);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(7, 34, 86, 0.82), rgba(3, 14, 42, 0.88)),
    rgba(4, 20, 58, 0.86);
  box-shadow:
    inset 0 0 24px rgba(38, 143, 255, 0.13),
    0 0 20px rgba(20, 108, 255, 0.1);
}

.rank-panel {
  grid-area: rank;
}

.funnel-panel {
  grid-area: funnel;
}

.risk-panel {
  grid-area: risk;
}

.purchase-screen-panel > header,
.purchase-screen-panel > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(64, 184, 255, 0.28);
  background: linear-gradient(90deg, rgba(30, 100, 220, 0.2), transparent);
  padding: 12px 14px;
}

.leader-sort-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.leader-sort-tabs button {
  position: relative;
  min-height: 34px;
  border: 1px solid rgba(83, 205, 255, 0.46);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(8, 40, 98, 0.96), rgba(3, 17, 52, 0.96)),
    rgba(4, 16, 45, 0.96);
  color: #b3d9ee;
  cursor: pointer;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 700;
  box-shadow:
    inset 0 0 18px rgba(37, 120, 255, 0.18),
    0 0 14px rgba(19, 93, 184, 0.18);
}

.leader-sort-tabs button:hover,
.leader-sort-tabs button.active {
  border-color: rgba(91, 241, 255, 0.95);
  background:
    linear-gradient(180deg, rgba(22, 112, 187, 0.94), rgba(6, 48, 116, 0.98)),
    rgba(7, 57, 130, 0.98);
  color: #78f4ff;
  text-shadow: 0 0 12px rgba(91, 241, 255, 0.72);
  box-shadow:
    inset 0 0 22px rgba(91, 241, 255, 0.24),
    0 0 18px rgba(91, 241, 255, 0.34);
}

.leader-sort-tabs button.active::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 2px;
  border-radius: 999px;
  background: #5bf1ff;
  box-shadow: 0 0 10px rgba(91, 241, 255, 0.88);
}

.purchase-screen-panel h3 {
  margin: 0 0 5px;
  color: #7beaff;
  font-size: 17px;
  font-weight: 680;
  text-shadow: 0 0 12px rgba(82, 237, 255, 0.35);
}

.purchase-screen-core {
  grid-area: core;
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 458px;
  border: 1px solid rgba(64, 184, 255, 0.32);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 42%, rgba(55, 161, 255, 0.25), transparent 42%),
    radial-gradient(circle at 50% 42%, rgba(68, 230, 255, 0.14), transparent 58%),
    rgba(3, 13, 38, 0.52);
  padding: 18px;
  box-shadow: inset 0 0 44px rgba(33, 122, 255, 0.12);
}

.purchase-core-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 16px;
  overflow: hidden;
  min-height: 232px;
  border: 1px solid rgba(82, 237, 255, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(17, 78, 170, 0.38), transparent 64%),
    radial-gradient(circle at 32% 50%, rgba(71, 184, 255, 0.18), transparent 42%),
    rgba(3, 16, 48, 0.78);
  padding: 26px;
  box-shadow:
    inset 0 0 34px rgba(44, 114, 255, 0.16),
    0 0 24px rgba(44, 114, 255, 0.12);
}

.purchase-core-card::before,
.purchase-core-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.purchase-core-card::before {
  inset: 18px;
  border: 1px solid rgba(82, 237, 255, 0.18);
}

.purchase-core-card::after {
  right: -58px;
  bottom: -62px;
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(82, 237, 255, 0.28);
  box-shadow:
    0 0 0 18px rgba(82, 237, 255, 0.035),
    0 0 0 42px rgba(44, 114, 255, 0.035);
}

.purchase-core-main,
.purchase-core-ratio {
  position: relative;
  z-index: 1;
}

.purchase-core-main {
  display: grid;
  align-content: center;
  gap: 12px;
}

.purchase-core-main span,
.purchase-core-main em,
.purchase-core-ratio span {
  color: #8db4d7;
  font-size: 13px;
  font-style: normal;
}

.purchase-core-main strong {
  color: #ffe768;
  font-size: 52px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255, 231, 104, 0.48);
}

.purchase-core-ratio {
  display: grid;
  place-items: center;
  align-self: center;
  aspect-ratio: 1;
  border: 1px solid rgba(82, 237, 255, 0.34);
  border-radius: 50%;
  background:
    conic-gradient(#52edff 0 100%, rgba(82, 237, 255, 0.12) 0),
    rgba(4, 20, 58, 0.8);
  box-shadow: inset 0 0 0 16px rgba(3, 16, 48, 0.92), 0 0 18px rgba(82, 237, 255, 0.22);
}

.purchase-core-ratio strong {
  color: #7beaff;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.purchase-leaderboard,
.purchase-funnel,
.purchase-risk-grid,
.purchase-grade-bars {
  padding: 14px 16px;
}

.purchase-leaderboard {
  display: grid;
  gap: 10px;
}

.purchase-leaderboard article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.leader-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(82, 237, 255, 0.35);
  background: rgba(18, 75, 164, 0.54);
  color: #7beaff;
  font-weight: 720;
}

.leader-main {
  display: grid;
  gap: 7px;
}

.leader-main > div:first-child,
.leader-money {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.leader-main strong,
.leader-money strong {
  color: #e7f8ff;
  font-size: 14px;
}

.leader-main span,
.leader-money span {
  color: #86add0;
  font-size: 12px;
}

.leader-profit span {
  color: #8db4d7;
  font-size: 12px;
}

.leader-track,
.funnel-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(90, 153, 220, 0.18);
}

.leader-track i,
.funnel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2c72ff, #52edff);
  box-shadow: 0 0 10px rgba(82, 237, 255, 0.55);
}

.purchase-funnel {
  display: grid;
  gap: 14px;
}

.purchase-funnel article {
  display: grid;
  gap: 8px;
}

.funnel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.funnel-head span {
  color: #8db4d7;
  font-size: 13px;
}

.funnel-head strong {
  color: #f7fdff;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.purchase-funnel em,
.purchase-risk-grid em {
  color: #7fa9ca;
  font-size: 12px;
  font-style: normal;
}

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

.purchase-risk-grid article {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(64, 184, 255, 0.32);
  border-radius: 4px;
  background: rgba(5, 24, 66, 0.74);
  padding: 12px;
}

.purchase-risk-grid span {
  color: #8db4d7;
  font-size: 12px;
}

.purchase-risk-grid strong {
  color: #ffe768;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 231, 104, 0.38);
}

.purchase-grade-bars {
  padding-top: 0;
}

.data-stream-panel .table-wrap {
  max-height: 520px;
}

.data-stream-panel .purchase-center-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #071a40;
}

.purchase-dashboard .ai-chip {
  border-color: rgba(82, 237, 255, 0.42);
  background: rgba(14, 72, 168, 0.42);
  color: #7beaff;
}

.purchase-dashboard .input,
.purchase-dashboard .secondary-button,
.purchase-dashboard .mini-button {
  border-color: rgba(86, 185, 255, 0.46);
  background: rgba(5, 24, 66, 0.74);
  color: #e7f8ff;
  box-shadow: inset 0 0 14px rgba(44, 114, 255, 0.12);
}

.purchase-dashboard .secondary-button:hover,
.purchase-dashboard .mini-button:hover {
  border-color: rgba(123, 234, 255, 0.78);
  color: #7beaff;
}

.purchase-dashboard .pill {
  border: 1px solid rgba(82, 237, 255, 0.28);
  background: rgba(16, 77, 166, 0.52);
  color: #b9f4ff;
}

.purchase-dashboard .pill.green {
  border-color: rgba(89, 235, 175, 0.42);
  background: rgba(31, 133, 101, 0.32);
  color: #80ffd0;
}

.purchase-dashboard .pill.yellow {
  border-color: rgba(255, 231, 104, 0.44);
  background: rgba(177, 123, 21, 0.32);
  color: #ffe768;
}

.purchase-dashboard .pill.blue {
  color: #7beaff;
}

.purchase-dashboard .pill.gray {
  border-color: rgba(139, 169, 202, 0.34);
  background: rgba(52, 71, 104, 0.38);
  color: #b7c8dc;
}

.purchase-dashboard .bar-row {
  color: #8db4d7;
}

.purchase-dashboard .bar-row strong {
  color: #e7f8ff;
}

.purchase-dashboard .bar-track {
  background: rgba(90, 153, 220, 0.18);
}

.purchase-dashboard .bar-fill {
  background: linear-gradient(90deg, #2c72ff, #52edff);
  box-shadow: 0 0 10px rgba(82, 237, 255, 0.5);
}

.purchase-dashboard .empty {
  color: #8db4d7;
}

.purchase-dashboard .purchase-center-table {
  border-collapse: separate;
  border-spacing: 0;
}

.purchase-dashboard .purchase-center-table th,
.purchase-dashboard .purchase-center-table td {
  border-bottom-color: rgba(67, 132, 204, 0.24);
}

.purchase-dashboard .purchase-center-table th {
  color: #7fa9ca;
  font-weight: 620;
}

.purchase-dashboard .purchase-center-table td {
  color: #d8eaff;
  background: rgba(4, 16, 45, 0.4);
}

.purchase-dashboard .purchase-center-table tr:hover td {
  background: rgba(14, 55, 121, 0.46);
}

.purchase-dashboard .name-cell strong,
.purchase-dashboard .stack strong,
.purchase-dashboard td strong {
  color: #f0fbff;
}

.purchase-dashboard .name-cell span,
.purchase-dashboard .stack span,
.purchase-dashboard .quality-cell,
.purchase-dashboard .purchase-estimate-cell span,
.purchase-dashboard .purchase-profit-cell span {
  color: #8db4d7;
}

.purchase-dashboard .money,
.purchase-dashboard .purchase-estimate-cell strong,
.purchase-dashboard .purchase-profit-cell strong {
  color: #7beaff;
}

.purchase-dashboard .purchase-profit-cell.good strong {
  color: #80ffd0;
}

.purchase-dashboard .purchase-profit-cell.warning strong {
  color: #ffe768;
}

.purchase-dashboard .purchase-profit-cell.danger strong {
  color: #ff8c99;
}

.purchase-entry-mode .main {
  background:
    radial-gradient(circle at 50% 24%, rgba(56, 157, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #f5f9ff 0%, #edf4fb 100%);
}

.purchase-entry-mode .content {
  display: grid;
  min-height: calc(100vh - 108px);
  place-items: center;
}

.purchase-center-entry {
  display: grid;
  width: min(980px, 100%);
  place-items: center;
}

.purchase-center-entry.is-hidden {
  display: none;
}

.purchase-entry-card {
  position: relative;
  overflow: hidden;
  width: min(820px, 100%);
  border: 1px solid rgba(54, 130, 220, 0.28);
  border-radius: 12px;
  background:
    radial-gradient(circle at 86% 10%, rgba(85, 232, 255, 0.28), transparent 30%),
    radial-gradient(circle at 15% 90%, rgba(43, 117, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f4f9ff 48%, #eef6ff 100%);
  padding: 48px;
  box-shadow: 0 24px 80px rgba(37, 76, 130, 0.18);
}

.purchase-entry-card::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(63, 140, 230, 0.18);
  pointer-events: none;
}

.purchase-entry-card h2 {
  position: relative;
  margin: 18px 0 10px;
  color: #15243a;
  font-size: 42px;
  font-weight: 760;
  letter-spacing: 0;
}

.purchase-entry-card p {
  position: relative;
  margin: 0;
  max-width: 560px;
  color: #66758b;
  font-size: 16px;
  line-height: 1.7;
}

.purchase-entry-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0;
}

.purchase-entry-stats article {
  border: 1px solid rgba(68, 139, 220, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.purchase-entry-stats span {
  display: block;
  color: #687a91;
  font-size: 13px;
}

.purchase-entry-stats strong {
  display: block;
  margin-top: 8px;
  color: #1763d4;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.purchase-entry-button {
  position: relative;
  min-height: 48px;
  padding-inline: 28px;
  font-size: 16px;
}

.purchase-fullscreen-stage {
  display: none;
}

.purchase-fullscreen-stage.is-active {
  display: block;
}

.purchase-fullscreen-mode {
  display: block;
  width: 100vw;
  min-height: 100vh;
  background: #030918;
}

.purchase-fullscreen-mode .sidebar,
.purchase-fullscreen-mode .topbar,
.purchase-fullscreen-mode .system-workbar {
  display: none;
}

.purchase-fullscreen-mode .main {
  display: block;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  background: #030918;
}

.purchase-fullscreen-mode .content {
  display: block;
  width: 100vw;
  min-height: 100vh;
  padding: 0;
}

.purchase-fullscreen-mode .purchase-fullscreen-stage,
.purchase-fullscreen-mode .purchase-dashboard {
  width: 100vw;
  min-width: 100vw;
}

.purchase-fullscreen-mode .purchase-fullscreen-stage {
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: auto;
  background: #030918;
  transform-origin: center;
  animation: purchaseStageEnter 620ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.purchase-fullscreen-mode .purchase-dashboard {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: clamp(12px, 1.2vw, 18px);
}

.purchase-fullscreen-mode .purchase-screen-frame {
  animation: purchaseFrameEnter 780ms cubic-bezier(0.2, 0.9, 0.2, 1) 80ms both;
}

.purchase-fullscreen-mode .purchase-screen-hero,
.purchase-fullscreen-mode .purchase-status-strip,
.purchase-fullscreen-mode .purchase-screen-panel,
.purchase-fullscreen-mode .purchase-screen-core {
  animation: purchasePanelEnter 620ms ease-out both;
}

.purchase-fullscreen-mode .purchase-status-strip {
  animation-delay: 140ms;
}

.purchase-fullscreen-mode .purchase-screen-core {
  animation-delay: 220ms;
}

.purchase-fullscreen-mode .purchase-screen-panel {
  animation-delay: 260ms;
}

.purchase-fullscreen-stage:fullscreen {
  overflow: auto;
  background: #030918;
}

.purchase-fullscreen-stage:fullscreen .purchase-dashboard {
  min-height: 100vh;
}

.purchase-screen-exit {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
  border: 1px solid rgba(103, 235, 255, 0.44);
  border-radius: 999px;
  background: rgba(4, 16, 45, 0.72);
  color: #dffaff;
  cursor: pointer;
  padding: 10px 18px;
  box-shadow: 0 0 22px rgba(44, 137, 255, 0.22);
}

.purchase-screen-exit:hover {
  border-color: rgba(103, 235, 255, 0.8);
  color: #69f3ff;
}

.purchase-dashboard .purchase-screen-grid {
  grid-template-columns: 360px minmax(560px, 1fr) 360px;
  grid-template-areas:
    "rank core funnel"
    "metrics core risk";
  gap: 16px;
}

.purchase-dashboard .metrics-panel {
  grid-area: metrics;
}

.purchase-dashboard .purchase-screen-core {
  position: relative;
  overflow: hidden;
  align-content: stretch;
  min-height: 560px;
  padding: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(55, 161, 255, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(4, 22, 62, 0.56), rgba(1, 8, 28, 0.78));
}

.purchase-dashboard .purchase-screen-core::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 11%;
  bottom: 13%;
  border: 1px solid rgba(100, 230, 255, 0.18);
  clip-path: polygon(13% 0, 87% 0, 100% 50%, 87% 100%, 13% 100%, 0 50%);
  background: linear-gradient(90deg, transparent, rgba(72, 210, 255, 0.08), transparent);
}

.purchase-dashboard .purchase-screen-core::after {
  content: "";
  position: absolute;
  inset: -30% 0 auto;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(89, 232, 255, 0.11), transparent);
  pointer-events: none;
  animation: purchaseGridSweep 4.6s linear infinite;
}

.purchase-core-lines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 13%, rgba(90, 211, 255, 0.16) 13.1% 13.22%, transparent 13.34% 86.6%, rgba(90, 211, 255, 0.16) 86.7% 86.82%, transparent 87%),
    linear-gradient(180deg, transparent 0 20%, rgba(90, 211, 255, 0.11) 20.1% 20.24%, transparent 20.34% 76%, rgba(90, 211, 255, 0.11) 76.1% 76.24%, transparent 76.34%);
  pointer-events: none;
}

.purchase-core-center {
  position: absolute;
  left: 50%;
  top: 45%;
  display: grid;
  place-items: center;
  width: 430px;
  height: 430px;
  transform: translate(-50%, -50%);
}

.purchase-core-center::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(103, 235, 255, 0.38);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(42, 126, 255, 0.04),
    0 0 0 56px rgba(103, 235, 255, 0.028),
    inset 0 0 42px rgba(103, 235, 255, 0.12);
}

.purchase-core-center::after {
  content: "";
  position: absolute;
  inset: 38px;
  border: 2px solid transparent;
  border-top-color: #58f4ff;
  border-right-color: #2e79ff;
  border-left-color: rgba(88, 244, 255, 0.34);
  border-radius: 50%;
  filter: drop-shadow(0 0 14px rgba(88, 244, 255, 0.55));
  animation: purchaseCoreSpin 8s linear infinite;
}

.purchase-dashboard .purchase-core-main {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.purchase-dashboard .purchase-core-main span {
  display: block;
  color: #a4cce6;
  font-size: 22px;
  font-weight: 700;
}

.purchase-dashboard .purchase-core-main strong {
  display: block;
  margin: 22px 0 16px;
  color: #fff;
  font-size: 132px;
  font-weight: 900;
  line-height: 0.88;
  text-shadow: 0 0 32px rgba(103, 235, 255, 0.6);
}

.purchase-dashboard .purchase-core-main em {
  display: block;
  color: #ffe960;
  font-size: 28px;
  font-style: normal;
  text-shadow: 0 0 18px rgba(255, 233, 96, 0.52);
}

.purchase-core-node {
  position: absolute;
  z-index: 2;
  min-width: 130px;
  border: 1px solid rgba(94, 218, 255, 0.38);
  background: rgba(8, 44, 110, 0.72);
  padding: 11px 15px;
  box-shadow: 0 0 18px rgba(44, 137, 255, 0.16);
  animation: purchaseNodePulse 3.2s ease-in-out infinite;
}

.purchase-core-node span {
  display: block;
  color: #8bbada;
  font-size: 12px;
}

.purchase-core-node strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.purchase-core-node.node-a {
  left: 78px;
  top: 82px;
}

.purchase-core-node.node-b {
  right: 78px;
  top: 82px;
}

.purchase-core-node.node-c {
  left: 80px;
  top: 320px;
}

.purchase-core-node.node-d {
  right: 80px;
  top: 320px;
}

.purchase-profit-band {
  position: absolute;
  right: 90px;
  bottom: 42px;
  left: 90px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 16px;
}

.purchase-profit-band article {
  border: 1px solid rgba(89, 198, 255, 0.38);
  background: rgba(5, 25, 70, 0.74);
  padding: 18px 20px;
  box-shadow: inset 0 0 24px rgba(48, 145, 255, 0.1);
}

.purchase-profit-band span {
  color: #8cb8d5;
  font-size: 14px;
}

.purchase-profit-band strong {
  display: block;
  margin-top: 9px;
  color: #ffe960;
  font-size: 38px;
  text-shadow: 0 0 18px rgba(255, 233, 96, 0.44);
}

.purchase-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.purchase-focus-grid article {
  border: 1px solid rgba(87, 197, 255, 0.35);
  background: rgba(6, 31, 85, 0.66);
  padding: 15px;
}

.purchase-focus-grid span,
.purchase-focus-grid em {
  display: block;
  color: #8cb8d5;
  font-size: 13px;
  font-style: normal;
}

.purchase-focus-grid strong {
  display: block;
  margin: 8px 0;
  color: #ffe960;
  font-size: 30px;
}

.purchase-dashboard .purchase-risk-grid {
  grid-template-columns: repeat(2, 1fr);
  padding: 16px;
}

.purchase-stream-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 16px;
}

.purchase-stream-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(87, 197, 255, 0.32);
  background: rgba(5, 25, 70, 0.68);
  padding: 13px 14px;
  animation: purchaseStreamIn 1.8s ease-in-out infinite alternate;
}

.purchase-stream-item strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-stream-item span {
  display: block;
  margin-top: 4px;
  color: #8cb8d5;
  font-size: 12px;
}

.purchase-stream-item em {
  color: #63f4cf;
  font-size: 18px;
  font-style: normal;
}

.purchase-data-details {
  border-top: 1px solid rgba(87, 197, 255, 0.24);
}

.purchase-data-details summary {
  cursor: pointer;
  color: #8db4d7;
  padding: 10px 16px;
}

.compact-date {
  width: 150px;
  min-height: 38px;
}

.quality-cell {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.purchase-center-table {
  min-width: 1180px;
}

.purchase-center-table td:nth-child(n + 3) {
  text-align: left;
}

.purchase-center-table td.money {
  text-align: right;
}

.purchase-estimate-cell,
.purchase-profit-cell {
  display: grid;
  gap: 5px;
  min-width: 132px;
}

.purchase-estimate-cell strong,
.purchase-profit-cell strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.purchase-estimate-cell span,
.purchase-profit-cell span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.purchase-profit-cell.good strong {
  color: var(--green-dark);
}

.purchase-profit-cell.warning strong {
  color: #9b6808;
}

.purchase-profit-cell.danger strong {
  color: var(--red);
}

.purchase-report-summary {
  display: grid;
  gap: 16px;
}

.report-summary-head {
  display: grid;
  gap: 6px;
}

.report-summary-head strong {
  color: var(--ink);
  font-size: 20px;
}

.report-summary-head span {
  color: var(--muted);
}

.purchase-report-summary article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
  padding: 14px;
}

.purchase-report-summary article span,
.quality-note span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.purchase-report-summary article strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
}

.quality-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.quality-note p {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.7;
}

.sales-exec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sales-exec-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 14px;
}

.sales-exec-card span,
.sales-exec-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sales-exec-card strong {
  color: var(--ink);
  font-size: 26px;
  font-weight: 680;
  line-height: 1;
}

.sales-exec-card.yellow {
  border-color: rgba(183, 132, 27, 0.24);
  background: #fffaf0;
}

.sales-exec-card.blue {
  border-color: rgba(63, 126, 232, 0.2);
  background: #f6faff;
}

.sales-exec-card.teal {
  border-color: rgba(69, 184, 197, 0.22);
  background: #f3fcfd;
}

.sales-exec-card.red {
  border-color: rgba(224, 90, 90, 0.22);
  background: #fff7f8;
}

.rule-center-shell {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.rule-summary-panel {
  overflow: hidden;
}

.rule-summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(63, 126, 232, 0.08), transparent 52%),
    var(--panel);
}

.rule-summary-main h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.rule-summary-main p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rule-summary-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.rule-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rule-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rule-metrics-grid.compact {
  margin-top: 14px;
}

.rule-metric {
  display: grid;
  gap: 8px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 15px;
  box-shadow: var(--shadow);
}

.rule-metric span,
.rule-metric small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.rule-metric strong {
  color: var(--ink);
  font-size: 25px;
  font-weight: 680;
  line-height: 1;
}

.rule-metric.safe {
  border-color: rgba(33, 159, 122, 0.24);
  background: linear-gradient(135deg, rgba(33, 159, 122, 0.08), rgba(255, 255, 255, 0.92));
}

.rule-metric.warning {
  border-color: rgba(183, 132, 27, 0.28);
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.13), rgba(255, 255, 255, 0.92));
}

.rule-metric.info {
  border-color: rgba(63, 126, 232, 0.22);
  background: linear-gradient(135deg, rgba(63, 126, 232, 0.08), rgba(255, 255, 255, 0.92));
}

.rule-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.simple-rule-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.simple-rule-list .rule-step {
  grid-template-columns: 36px minmax(0, 0.8fr) minmax(0, 1.3fr) auto;
  align-items: center;
  min-height: auto;
}

.simple-rule-list .rule-step::after {
  display: none;
}

.simple-rule-list .rule-step p {
  font-size: 13px;
}

.simple-rule-list .rule-step em {
  align-self: center;
  text-align: right;
}

.rule-step {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 14px;
}

.rule-step::after {
  content: "";
  position: absolute;
  top: 32px;
  right: -11px;
  width: 11px;
  height: 1px;
  background: var(--line-strong);
}

.rule-step:last-child::after {
  display: none;
}

.rule-step-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 24px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.rule-step strong {
  font-size: 15px;
  font-weight: 660;
}

.rule-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.rule-step em {
  align-self: end;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 620;
}

.rule-step.safe {
  border-color: rgba(33, 159, 122, 0.2);
}

.rule-step.info {
  border-color: rgba(63, 126, 232, 0.22);
}

.rule-step.warning {
  border-color: rgba(183, 132, 27, 0.28);
}

.rule-step.danger {
  border-color: rgba(224, 90, 90, 0.28);
  background: #fff8f8;
}

.rule-stack {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.rule-stop-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.rule-stop-list article {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(224, 90, 90, 0.18);
  border-radius: var(--radius);
  background: #fffafa;
  padding: 13px 14px;
}

.rule-stop-list strong {
  color: #9f3f48;
  font-size: 14px;
  font-weight: 660;
}

.rule-stop-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 13px 14px;
}

.rule-row div {
  display: grid;
  gap: 4px;
}

.rule-row strong {
  font-size: 14px;
  font-weight: 660;
}

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

.rule-coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rule-coverage-grid article {
  display: grid;
  gap: 8px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 14px;
}

.rule-coverage-grid strong {
  font-size: 14px;
  font-weight: 660;
}

.rule-coverage-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.rule-formula-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(63, 126, 232, 0.2);
  border-radius: var(--radius);
  background: #f6faff;
  padding: 13px 14px;
}

.rule-formula-strip strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 660;
}

.rule-formula-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.markdown-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  padding-top: 0;
}

.markdown-rule-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 15px;
  box-shadow: var(--shadow);
}

.markdown-rule-head,
.markdown-rule-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.markdown-rule-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.markdown-rule-card strong {
  font-size: 15px;
  font-weight: 660;
}

.markdown-rule-rate {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 10px;
}

.markdown-rule-rate span {
  color: var(--muted);
  font-size: 12px;
}

.markdown-rule-rate b {
  color: var(--blue);
  font-size: 20px;
  font-weight: 680;
}

.markdown-rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.zz-ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.zz-ops-table-wrap {
  margin-top: 16px;
}

.zz-ops-table-wrap table {
  min-width: 1120px;
}

.zz-ops-table-wrap td:nth-child(7) {
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 1181px) {
  :root {
    --desktop-nav-height: 64px;
  }

  .app-shell:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: var(--desktop-nav-height) auto;
    align-content: start;
    min-height: 100vh;
  }

  .sidebar {
    box-sizing: border-box;
    height: var(--desktop-nav-height);
    min-height: var(--desktop-nav-height);
    max-height: var(--desktop-nav-height);
    align-items: center;
    overflow: hidden;
  }

  .brand,
  .nav-list,
  .sidebar-footer {
    height: 100%;
    align-items: center;
  }

  .nav-list {
    min-height: 0;
    overflow-y: hidden;
  }

  .nav-button {
    height: var(--desktop-nav-height);
    min-height: var(--desktop-nav-height);
  }

  .main {
    min-height: calc(100vh - var(--desktop-nav-height));
  }

  .topbar {
    top: var(--desktop-nav-height);
  }
}

@media (min-width: 681px) and (max-width: 1180px) {
  :root {
    --desktop-nav-height: 64px;
  }

  .app-shell:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: var(--desktop-nav-height) auto;
    align-content: start;
    min-height: 100vh;
  }

  .sidebar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0;
    box-sizing: border-box;
    height: var(--desktop-nav-height);
    min-height: var(--desktop-nav-height);
    max-height: var(--desktop-nav-height);
    align-items: center;
    overflow: hidden;
    padding: 0 18px;
  }

  .brand {
    min-width: 156px;
    height: 100%;
    margin: 0 18px 0 0;
    align-items: center;
  }

  .nav-list {
    height: 100%;
    min-height: 0;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .nav-button {
    height: var(--desktop-nav-height);
    min-height: var(--desktop-nav-height);
  }

  .sidebar-footer {
    display: none;
  }

  .main {
    min-height: calc(100vh - var(--desktop-nav-height));
  }

  .topbar {
    top: var(--desktop-nav-height);
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    padding: 16px 18px;
  }

  .topbar-actions {
    width: auto;
    flex-wrap: nowrap;
  }

  .search-box {
    width: min(32vw, 320px);
    min-width: 220px;
  }

  .grid.kpi-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
  }
}

@media (max-width: 1180px) {
  .purchase-dashboard .purchase-screen-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "core"
      "rank"
      "metrics"
      "funnel"
      "risk";
  }

  .purchase-stream-list {
    grid-template-columns: 1fr;
  }

  .rule-summary-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .rule-metrics-grid,
  .rule-focus-grid,
  .rule-coverage-grid,
  .markdown-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .simple-rule-list .rule-step {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .simple-rule-list .rule-step p,
  .simple-rule-list .rule-step em {
    grid-column: 2;
    text-align: left;
  }

  .rule-flow {
    grid-template-columns: repeat(6, minmax(180px, 1fr));
  }
}

@media (max-width: 680px) {
  .purchase-entry-card {
    padding: 28px;
  }

  .purchase-entry-card h2 {
    font-size: 32px;
  }

  .purchase-entry-stats {
    grid-template-columns: 1fr;
  }

  .purchase-dashboard {
    padding: 12px;
  }

  .purchase-screen-frame {
    padding: 12px;
  }

  .purchase-screen-hero,
  .purchase-status-strip,
  .purchase-screen-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-screen-panel > header,
  .purchase-screen-panel > div:first-child {
    flex-direction: column;
  }

  .leader-sort-tabs {
    justify-content: flex-start;
  }

  .purchase-screen-hero h2 {
    font-size: 26px;
  }

  .purchase-dashboard .purchase-risk-grid,
  .purchase-focus-grid,
  .purchase-profit-band {
    grid-template-columns: 1fr;
  }

  .purchase-big-metric {
    min-height: 118px;
  }

  .purchase-dashboard .purchase-screen-core {
    min-height: 520px;
  }

  .purchase-core-node {
    display: none;
  }

  .purchase-core-center {
    width: 320px;
    height: 320px;
  }

  .purchase-dashboard .purchase-core-main strong {
    font-size: 88px;
  }

  .purchase-big-metric strong {
    font-size: 28px;
  }

  .rule-metrics-grid,
  .rule-focus-grid,
  .rule-coverage-grid,
  .markdown-rule-grid {
    grid-template-columns: 1fr;
  }

  .rule-formula-strip,
  .rule-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Final app layout: primary navigation is a left sidebar. */
@media (min-width: 681px) {
  .app-shell:not([hidden]) {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-content: stretch;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 236px;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    padding: 18px 14px;
    overflow: hidden;
  }

  .brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    height: auto;
    margin: 0 0 18px;
    padding: 0 6px;
  }

  .brand-mark,
  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .nav-list {
    display: grid;
    align-items: start;
    gap: 4px;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
  }

  .nav-list::-webkit-scrollbar {
    display: initial;
    width: 6px;
  }

  .nav-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(120, 137, 160, 0.28);
  }

  .nav-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: 42px;
    border-radius: var(--radius);
    color: #5d6675;
    padding: 0 11px;
    text-align: left;
  }

  .nav-button svg {
    display: block;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
  }

  .nav-button:hover,
  .nav-button.active {
    background: #f0f6ff;
    color: var(--blue);
  }

  .nav-button.active {
    box-shadow: inset 3px 0 0 var(--blue);
    font-weight: 700;
  }

  .nav-button.active::after {
    display: none;
  }

  .sidebar-footer {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    height: auto;
    margin: auto 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f6f9fd;
    padding: 10px 12px;
  }

  .main {
    min-width: 0;
    min-height: 100vh;
  }

  .topbar {
    top: 0;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    padding: 18px 24px;
  }

  .sales-subnav-panel {
    top: 89px;
  }
}

@media (max-width: 680px) {
  .app-shell:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar {
    max-height: none;
  }

  .sales-subnav-panel {
    position: static;
  }
}

/* 统一驭长风子系统顶栏：一点通，尺寸对齐天眼系统 */
.main > .topbar {
  position: static;
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid #dfeaf7;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 18px;
  backdrop-filter: blur(14px);
}

.main > .topbar > .visually-hidden {
  position: static;
  order: 0;
  flex: 1;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.main > .topbar > .visually-hidden .eyebrow {
  display: none;
}

.main > .topbar > .visually-hidden h1 {
  margin: 0;
  color: rgba(18, 28, 45, 0.68);
  font-size: 13px;
  font-weight: 720;
  line-height: 36px;
}

.main > .topbar .system-link-tabs {
  display: flex;
  align-items: stretch;
  order: 1;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.main > .topbar .system-link-tab {
  min-width: 0;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #26364f;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 780;
}

.main > .topbar .system-link-tab:first-child {
  border-left: 1px solid transparent;
}

.main > .topbar .system-link-tab:hover {
  border-color: #cfe3ff;
  background: #eef6ff;
  color: var(--blue);
}

.main > .topbar .system-user-segment {
  display: inline-flex;
  align-items: stretch;
  align-self: center;
  order: 2;
  margin-left: 8px;
  height: 38px;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #cfe1f5;
  border-radius: 999px;
  background: #f8fbff;
  box-shadow: 0 6px 16px rgba(20, 38, 62, 0.08);
  white-space: nowrap;
}

.main > .topbar .system-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  background: #fff;
}

.main > .topbar .system-user-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #1fb9df, #0ca6c1);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.main > .topbar .system-user-text {
  display: grid;
  gap: 3px;
  line-height: 1;
}

.main > .topbar .system-user-text strong {
  max-width: 92px;
  overflow: hidden;
  color: #26364f;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
}

.main > .topbar .system-user-text em {
  max-width: 112px;
  overflow: hidden;
  color: #71809a;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
}

.main > .topbar .system-segment-button {
  min-width: 54px;
  border: 0;
  border-left: 1px solid #cfe1f5;
  border-radius: 0;
  background: #eef6ff;
  color: #2266b2;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 820;
}

.main > .topbar #mainBackToPlatformBtn {
  min-width: 86px;
}

.main > .topbar .system-segment-button.muted {
  background: #fff;
  color: #66758c;
}

.main > .system-workbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.72);
  padding: 12px 28px;
}

@media (max-width: 760px) {
  .main > .topbar {
    position: static;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px;
  }

  .main > .topbar .system-link-tabs,
  .main > .topbar .system-user-segment,
  .main > .system-workbar {
    width: 100%;
  }

  .main > .topbar .system-link-tab,
  .main > .topbar .system-segment-button {
    min-width: 0;
    flex: 1;
    font-size: 16px;
  }

  .main > .topbar .system-user-pill {
    flex: 1;
    min-width: 0;
  }

  .main > .system-workbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 14px;
  }
}

/* Final workspace identity placement: top-right of the workspace content area. */
.workspace-screen .workspace-user-panel {
  position: fixed;
  top: 28px;
  right: 28px;
  margin-left: 0;
  align-self: auto;
  z-index: 6;
  width: auto;
  min-height: 38px;
  transform: none;
}

.workspace-screen .workspace-user-pill {
  min-height: 38px;
}

.workspace-screen .workspace-logout-button {
  min-width: 54px;
  min-height: 38px;
}

.label-print-card {
  width: min(100%, 430px);
  border: 1px solid #d6d6d6;
  border-radius: 18px;
  background: #fff;
  color: #111;
  margin: 0 auto;
  padding: 16px 20px 14px;
}

.label-print-code {
  color: #111;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: 1px;
  line-height: 1;
  padding: 8px 0 0;
  text-align: center;
}

.label-print-name {
  min-height: 28px;
  color: #111;
  font-size: 20px;
  font-weight: 520;
  line-height: 1.2;
  text-align: center;
}

.label-print-barcode {
  display: block;
  width: min(100%, 360px);
  height: 92px;
  margin: 10px auto 0;
  shape-rendering: crispEdges;
}

/* Keep the Argus portal entry aligned with the in-app brand mark. */
.workspace-card[data-workspace="argus"] .workspace-icon {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #7c3aed 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.28);
}

.workspace-card[data-workspace="argus"] .workspace-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
