:root {
  --bg: #eef2f7;
  --bg-elevated: #f7f9fc;
  --panel: #ffffff;
  --panel-alt: #f6f9fc;
  --line: #dce4ee;
  --line-strong: #c9d4e1;
  --text: #1f2f46;
  --muted: #6f8197;
  --muted-strong: #55667b;
  --rail: #1a2233;
  --rail-soft: #253149;
  --primary: #4f92ff;
  --primary-deep: #2d6fdd;
  --primary-soft: #eaf3ff;
  --success: #2f9e64;
  --warning: #d38b2d;
  --danger: #d34e43;
  --shadow: 0 14px 32px rgba(21, 39, 63, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
}

a {
  color: inherit;
}

.login-body,
.erp-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(79, 146, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #f4f7fb 0%, #eef2f7 42%, #edf1f6 100%);
}

.erp-body {
  --erp-rail-width: 76px;
}

.eyebrow,
.section-tag,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.login-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 24px;
}

.login-copy,
.login-card,
.panel,
.page-toolbar {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-copy {
  padding: 32px;
  background:
    linear-gradient(145deg, rgba(28, 39, 57, 0.98), rgba(34, 49, 76, 0.96)),
    linear-gradient(180deg, #1a2233, #253149);
  color: #f3f7fd;
  overflow: hidden;
}

.login-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.login-copy p {
  margin: 0;
  color: rgba(243, 247, 253, 0.8);
  line-height: 1.75;
  font-size: 14px;
}

.login-features {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.login-features article {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.login-features strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.login-features span {
  color: rgba(243, 247, 253, 0.76);
  font-size: 13px;
  line-height: 1.7;
}

.login-card {
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.login-register-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.login-register-line a {
  color: var(--primary-deep);
  text-decoration: none;
  font-weight: 700;
}

.login-card-head h2 {
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.login-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.login-body {
  background: #ffffff;
}

.login-shell-split {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.login-stage-split {
  min-height: 100vh;
  grid-template-columns: minmax(420px, 36vw) minmax(0, 1fr);
  gap: 0;
}

.login-copy-split,
.login-card-split {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.login-copy-split {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 30px 42px 34px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.2), transparent 24%),
    radial-gradient(circle at 74% 8%, rgba(66, 236, 188, 0.9), rgba(66, 236, 188, 0.9) 1.2%, transparent 1.4%),
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #1f63f6 0%, #1f5cf1 100%);
  color: #f8fbff;
  overflow: hidden;
}

.login-copy-split::before {
  content: "";
  position: absolute;
  inset: auto -12% -10% -12%;
  height: 56%;
  background:
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.12) calc(100% - 1px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 68px);
  transform: perspective(960px) rotateX(72deg);
  transform-origin: center top;
  opacity: 0.7;
}

.lx-role-console {
  display: grid;
  grid-template-columns: clamp(250px, 20vw, 300px) minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 188px);
}

.lx-role-sidebar,
.lx-role-main {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.lx-role-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.lx-role-sidebar-head {
  display: grid;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #eef2f6;
}

.lx-role-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lx-role-sidebar-title h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 700;
  color: #151d29;
}

.lx-role-create-trigger {
  min-width: 72px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.lx-role-search-field .lx-search-field,
.lx-role-search-field {
  width: 100%;
}

.lx-role-search-field input {
  min-height: 32px;
  padding-left: 12px;
}

.lx-role-list {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 0;
  max-height: calc(100vh - 244px);
  overflow: auto;
  padding: 8px 8px 10px;
}

.lx-role-node {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  border-radius: 6px;
  background: transparent;
  min-width: 0;
  overflow: hidden;
}

.lx-role-node.active {
  background: #edf3ff;
}

.lx-role-node-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  text-align: left;
  color: #2f3948;
  overflow: hidden;
}

.lx-role-node-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.lx-role-node-tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lx-role-node-tags em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(225, 151, 49, 0.36);
  border-radius: 4px;
  background: rgba(254, 246, 232, 0.88);
  color: #c57a10;
  font-size: 10px;
  font-style: normal;
}

.lx-role-node-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lx-role-node-actions .text-btn {
  font-size: 11px;
  font-weight: 600;
}

.lx-role-node-actions .text-btn:disabled {
  color: #a8b4c4;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

.lx-role-main {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 14px 14px;
  min-width: 0;
}

.lx-role-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(71, 125, 228, 0.36);
  border-radius: 6px;
  background: #eef5ff;
  color: #445872;
  font-size: 12px;
  line-height: 1.6;
}

.lx-role-notice[hidden] {
  display: none;
}

.lx-role-notice-close {
  border: none;
  background: transparent;
  color: #7d8da3;
  font-size: 12px;
  line-height: 1;
}

.lx-role-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 2px 2px 0;
}

.lx-role-context-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lx-role-context-copy strong {
  color: #253345;
  font-size: 14px;
  line-height: 1.2;
}

.lx-role-context-copy span {
  color: #7a8799;
  font-size: 12px;
  line-height: 1.4;
}

.lx-role-context-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lx-role-main-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 0 2px;
  border-bottom: 1px solid #ebf0f6;
}

.lx-role-main-tabs button {
  min-height: 31px;
  padding: 0 16px;
  margin-bottom: -1px;
  border: 1px solid #e9edf3;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #f5f7fb;
  color: #56657a;
  font-size: 12px;
}

.lx-role-main-tabs button.active {
  border-color: #d8e3f8;
  background: #ffffff;
  color: #1d63f0;
  font-weight: 700;
}

.lx-role-data-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lx-role-data-tabs button {
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid #e3e8f1;
  border-radius: 6px;
  background: #f7f9fc;
  color: #59687d;
  font-size: 12px;
}

.lx-role-data-tabs button.active {
  border-color: #6ea2ff;
  background: #f4f8ff;
  color: #1d63f0;
  font-weight: 700;
}

.lx-role-view {
  display: none;
  gap: 12px;
}

.lx-role-view.active {
  display: grid;
}

.lx-role-members-toolbar {
  min-height: 44px;
  padding: 0 2px;
  border: none;
  background: transparent;
}

.lx-role-member-search {
  min-width: 208px;
}

.lx-role-members-table {
  min-width: 620px;
}

.lx-role-card {
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #fff;
}

.lx-role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lx-role-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #232f3e;
  font-size: 13px;
}

.lx-role-platform-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lx-role-platform-tabs button {
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid #d8e3f8;
  border-radius: 6px;
  background: #eef5ff;
  color: #1d63f0;
  font-size: 12px;
  font-weight: 700;
}

.lx-function-layout {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.lx-function-nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 8px 0;
}

.lx-function-nav button {
  min-height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #49576b;
  text-align: left;
  font-size: 12px;
}

.lx-function-nav button.active {
  background: #edf3ff;
  color: #1d63f0;
  font-weight: 700;
}

.lx-function-table-shell {
  min-width: 0;
}

.lx-role-matrix-table {
  min-width: 760px;
}

.lx-role-matrix-table thead th {
  background: #f0f4fa;
}

.lx-role-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: #2e3b4d;
}

.lx-role-check-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1px solid #c6d0df;
  border-radius: 2px;
  appearance: none;
  background: #fff;
}

.lx-role-check-row input[type="checkbox"]:checked {
  border-color: #3b7cff;
  background: #3b7cff;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.lx-role-radio-table {
  min-width: 700px;
}

.lx-role-radio-table thead th {
  background: #f8fafc;
}

.lx-role-radio-table th,
.lx-role-radio-table td {
  text-align: center;
}

.lx-role-radio-table th:first-child,
.lx-role-radio-table td:first-child,
.lx-role-radio-table th:nth-child(2),
.lx-role-radio-table td:nth-child(2) {
  text-align: left;
}

.lx-role-dot-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
}

.lx-role-dot-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lx-role-dot-choice span {
  width: 15px;
  height: 15px;
  border: 1px solid #c6d0df;
  border-radius: 999px;
  background: #fff;
}

.lx-role-dot-choice input[type="radio"]:checked + span {
  border-color: #3b7cff;
  box-shadow: inset 0 0 0 4px #3b7cff;
}

.lx-role-data-card {
  gap: 14px;
}

.lx-role-data-content {
  display: grid;
  gap: 12px;
}

.lx-role-data-panel {
  display: grid;
  gap: 12px;
}

.lx-role-data-bullets {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 16px;
  color: #7a8698;
  font-size: 12px;
  line-height: 1.65;
}

.lx-role-data-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1f2c3d;
  font-size: 13px;
  font-weight: 700;
}

.lx-role-data-title span {
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: #1d63f0;
}

.lx-role-data-copy {
  display: grid;
  gap: 4px;
  margin-left: 20px;
}

.lx-role-data-copy p {
  margin: 0;
  color: #7a8698;
  font-size: 12px;
  line-height: 1.7;
}

.lx-role-scope-grid {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-left: 20px;
}

.lx-role-inline-field {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.lx-role-inline-field > span {
  padding-top: 8px;
  color: #5e6c80;
  font-size: 12px;
}

.lx-role-inline-field select,
.lx-role-meta-form input,
.lx-role-meta-form textarea {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d6dfeb;
  border-radius: 6px;
  background: #fff;
  color: #2b3a4e;
  font: inherit;
}

.lx-role-meta-form textarea {
  min-height: 108px;
  padding: 10px 12px;
  resize: vertical;
}

.lx-department-picker {
  border: 1px solid #d6dfeb;
  border-radius: 6px;
  background: #fff;
}

.lx-department-picker-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #eef2f6;
  background: #fafbfd;
}

.lx-department-picker-toolbar .lx-search-field input {
  min-height: 28px;
}

.lx-department-chip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 52px;
  padding: 10px 12px;
}

.lx-department-chip-list.empty {
  color: #97a4b5;
  font-size: 12px;
}

.lx-department-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #dde5f0;
  border-radius: 4px;
  background: #f6f9fc;
  color: #344358;
  font-size: 12px;
}

.lx-department-chip strong {
  color: #8fa0b6;
  font-size: 11px;
}

.lx-department-option-list {
  display: none;
  max-height: 188px;
  overflow: auto;
  border-top: 1px solid #eef2f6;
  padding: 4px 0;
}

.lx-department-option-list.active {
  display: grid;
}

.lx-department-option,
.lx-role-transfer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  color: #344358;
  font-size: 12px;
}

.lx-department-option:hover,
.lx-role-transfer-row:hover {
  background: #f7faff;
}

.lx-department-option input,
.lx-role-transfer-row input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.lx-department-option-empty,
.lx-role-transfer-empty {
  padding: 12px;
  color: #97a4b5;
  font-size: 12px;
}

.lx-role-data-table-wrap {
  max-width: 860px;
  margin-left: 20px;
}

.lx-role-data-table {
  min-width: 540px;
}

.lx-role-data-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

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

.lx-modal-close {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a0b0;
  font-size: 14px;
  line-height: 1;
}

.lx-modal-close:hover {
  background: #f5f8fc;
  color: #305fb9;
}

.lx-modal-head h3 {
  margin: 0;
  font-size: 22px;
  color: #202c3c;
}

.lx-role-meta-dialog {
  width: min(560px, calc(100vw - 40px));
  display: grid;
  gap: 16px;
}

.lx-role-meta-form {
  display: grid;
  gap: 14px;
}

.lx-role-meta-form label {
  display: grid;
  gap: 8px;
}

.lx-role-meta-form label > span {
  color: #5c6a7d;
  font-size: 12px;
  font-weight: 600;
}

.lx-role-modal-actions {
  justify-content: flex-end;
}

.lx-role-transfer-dialog {
  display: grid;
  gap: 16px;
}

.lx-role-transfer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lx-role-transfer-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.lx-role-transfer-title {
  color: #344358;
  font-size: 13px;
  font-weight: 600;
}

.lx-role-transfer-list {
  min-height: 380px;
  max-height: 540px;
  overflow: auto;
  border: 1px solid #d8e1eb;
  border-radius: 6px;
  background: #fff;
}

.lx-role-transfer-actions {
  display: grid;
  align-content: center;
  gap: 10px;
}

.lx-role-transfer-actions .ghost-btn {
  min-width: 42px;
  min-height: 30px;
  padding: 0;
}

.lx-role-console .mini-btn,
.lx-role-main .primary-btn,
.lx-role-main .ghost-btn,
.lx-role-main .text-btn,
.lx-role-transfer-dialog .primary-btn,
.lx-role-transfer-dialog .ghost-btn,
.lx-role-meta-dialog .primary-btn,
.lx-role-meta-dialog .ghost-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .lx-role-console {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }

  .lx-function-layout {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .lx-role-console,
  .lx-function-layout,
  .lx-role-transfer-grid {
    grid-template-columns: 1fr;
  }

  .lx-role-list {
    max-height: none;
  }

  .lx-role-main {
    padding: 12px;
  }

  .lx-role-scope-grid,
  .lx-role-data-table-wrap,
  .lx-role-data-copy {
    margin-left: 0;
  }
}

.login-copy-split::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 90%, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(circle at 72% 76%, rgba(255, 255, 255, 0.12), transparent 28%);
  pointer-events: none;
}

.login-brand-stack,
.login-slogan-grid,
.login-copy-lead,
.login-visual {
  position: relative;
  z-index: 1;
}

.login-brand-stack {
  display: grid;
  gap: 8px;
}

.login-brand-row {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.login-slogan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 20px 36px;
  margin-top: 72px;
  color: #ffffff;
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.login-copy-lead {
  max-width: 450px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.8;
}

.login-visual {
  flex: 1;
  min-height: 420px;
  margin-top: 20px;
}

.login-visual-floor {
  position: absolute;
  inset: auto -10% 4% -8%;
  height: 58%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 66px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 66px);
  transform: perspective(920px) rotateX(74deg);
  transform-origin: center top;
  opacity: 0.65;
}

.login-visual-screen-frame {
  position: absolute;
  left: 14%;
  bottom: 24%;
  width: 280px;
  height: 220px;
  border: 2px solid rgba(255, 154, 137, 0.9);
  border-radius: 18px;
  transform: rotate(-30deg) skewY(-7deg);
  box-shadow: 0 0 28px rgba(255, 154, 137, 0.18);
}

.login-visual-screen {
  position: absolute;
  left: 20%;
  bottom: 20%;
  width: 296px;
  height: 236px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(138, 212, 255, 0.42), rgba(100, 160, 255, 0.16));
  backdrop-filter: blur(6px);
  box-shadow: 0 22px 48px rgba(11, 35, 126, 0.28);
  transform: rotate(-30deg) skewY(-7deg);
  overflow: hidden;
}

.login-visual-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 34%, rgba(255, 255, 255, 0.08) 58%, transparent 78%);
}

.login-screen-bars {
  position: absolute;
  left: 28px;
  bottom: 30px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  width: 98px;
  height: 120px;
}

.login-screen-bars .bar {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #74f7d3 0%, #5de3bd 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.login-screen-bars .bar-1 {
  height: 46%;
}

.login-screen-bars .bar-2 {
  height: 62%;
}

.login-screen-bars .bar-3 {
  height: 78%;
}

.login-screen-bars .bar-4 {
  height: 92%;
}

.login-screen-pie {
  position: absolute;
  right: 34px;
  top: 26px;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: conic-gradient(#63f0da 0 42%, #ff8e8e 42% 68%, rgba(255, 255, 255, 0.22) 68% 100%);
  box-shadow: 0 0 30px rgba(99, 240, 218, 0.16);
}

.login-screen-lines {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 12px;
  width: 112px;
}

.login-screen-lines .line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77, 234, 226, 0.92), rgba(255, 165, 143, 0.92));
}

.login-screen-lines .line-1 {
  width: 100%;
}

.login-screen-lines .line-2 {
  width: 84%;
}

.login-screen-lines .line-3 {
  width: 92%;
}

.login-visual-console {
  position: absolute;
  left: 52%;
  bottom: 4%;
  width: 82px;
  height: 162px;
  border-radius: 18px 18px 16px 16px;
  background: linear-gradient(180deg, rgba(80, 236, 219, 0.96), rgba(35, 109, 255, 0.74));
  box-shadow: 0 16px 36px rgba(16, 44, 132, 0.28);
  transform: rotate(-10deg);
}

.console-screen {
  position: absolute;
  inset: 18px 14px auto;
  height: 64px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    linear-gradient(140deg, rgba(36, 88, 236, 0.72), rgba(53, 232, 213, 0.42));
}

.console-screen::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 8px;
  background:
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.16) calc(100% - 1px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 16px);
}

.login-visual-accent {
  position: absolute;
  width: 30px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(61, 239, 220, 0.96), rgba(255, 92, 180, 0.88));
  box-shadow: 0 0 16px rgba(255, 92, 180, 0.18);
}

.login-visual-accent.accent-top {
  right: 22%;
  top: 18%;
}

.login-visual-accent.accent-bottom {
  left: 20%;
  bottom: 0;
}

.login-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 36px 48px;
  background: #ffffff;
}

.login-card-split {
  width: min(100%, 404px);
  padding: 10px 0 0;
  display: grid;
  gap: 18px;
  align-content: start;
  background: transparent;
}

.login-card-head-split {
  display: grid;
  gap: 12px;
}

.login-card-head-split .tag {
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(42, 106, 255, 0.08);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 700;
}

.login-card-head-split h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.login-card-head-split p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.login-field {
  gap: 8px;
}

.login-field span {
  font-size: 13px;
  color: var(--muted-strong);
  font-weight: 600;
}

.login-field input {
  min-height: 54px;
  border-radius: 14px;
  border-color: #d5e1f4;
  background: #f7faff;
  box-shadow: none;
  font-size: 16px;
}

.login-field input:focus {
  background: #ffffff;
}

.login-submit-btn {
  min-height: 54px;
  margin-top: 2px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
}

.login-inline-message {
  width: 100%;
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.login-inline-message.is-visible {
  opacity: 1;
}

.login-inline-message.success {
  color: #1d9b5c;
}

.login-inline-message.error {
  color: #df4f67;
}

.login-inline-message.info {
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.multi-select {
  min-height: 176px;
  padding: 8px;
}

.multi-select option {
  padding: 8px 10px;
  border-radius: 6px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(79, 146, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(79, 146, 255, 0.14);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.text-btn {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 146, 255, 0.2);
}

.ghost-btn {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.danger-btn {
  color: var(--danger);
  background: rgba(211, 78, 67, 0.08);
  border-color: rgba(211, 78, 67, 0.18);
}

.text-btn {
  min-height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-deep);
}

.text-btn.danger {
  color: var(--danger);
}

.wide-btn {
  width: 100%;
}

.message-box {
  flex: 1 1 360px;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-box.success {
  color: var(--success);
  border-color: rgba(47, 158, 100, 0.2);
  background: rgba(47, 158, 100, 0.08);
}

.message-box.error {
  color: var(--danger);
  border-color: rgba(211, 78, 67, 0.2);
  background: rgba(211, 78, 67, 0.08);
}

.message-box.muted {
  color: var(--muted);
  background: #f8fafc;
}

.message-box.is-plain-status {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.message-box.is-plain-status.muted,
.message-box.is-plain-status.info {
  background: transparent;
}

.app-shell-erp {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--erp-rail-width) minmax(0, 1fr);
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  padding: 10px 4px 12px;
  background:
    linear-gradient(180deg, #1a2233 0%, #1e2940 50%, #1a2233 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.rail-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 50px;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  box-shadow: none;
}

.rail-brand-logo {
  display: block;
  width: 62px;
  height: auto;
  max-height: 30px;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

.rail-brand:hover .rail-brand-logo {
  transform: translateY(-1px);
  opacity: 0.96;
}

.rail-brand-text,
.rail-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #f7fbff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(79, 146, 255, 0.12);
}

.rail-brand-text {
  position: relative;
  flex-direction: column;
  gap: 4px;
}

.rail-brand-text::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(127, 182, 255, 0.95), rgba(255, 255, 255, 0.12));
}

.rail-brand-text span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
}

.brand-cn {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-ai {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.92;
  transform: translateX(1px);
}

.side-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
}

.side-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 60px;
  padding: 10px 2px 9px;
  border-radius: 14px;
  color: #aeb8cb;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transition:
    background 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.side-link:hover {
  background: transparent;
  color: #f3f7fd;
}

.side-link.active {
  color: #ffffff;
}

.side-link.muted {
  color: #94a3ba;
}

.side-icon {
  display: block;
  position: relative;
  width: 16px;
  height: 16px;
  opacity: 0.92;
}

.side-icon::before,
.side-icon::after {
  content: "";
  position: absolute;
}

.side-icon-home::before {
  inset: 6px 2px 1px;
  border: 1.8px solid currentColor;
  border-top: none;
  border-radius: 2px 2px 3px 3px;
}

.side-icon-home::after {
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-top: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.side-icon-store::before {
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-top: none;
  border-radius: 0 0 3px 3px;
}

.side-icon-store::after {
  left: 1px;
  top: 2px;
  width: 13px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  background:
    linear-gradient(currentColor, currentColor) center 1px / 100% 1.8px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 100% / 1.8px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 9px 100% / 1.8px 5px no-repeat;
}

.side-icon-company::before {
  left: 2px;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 3px 3px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 3px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 3px 7px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 7px / 2px 2px no-repeat;
}

.side-icon-company::after {
  left: 6px;
  bottom: 1px;
  width: 3px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  background: #1a2233;
}

.side-icon-report::before {
  inset: 2px 1px 1px 2px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 2px;
}

.side-icon-report::after {
  left: 4px;
  bottom: 3px;
  width: 2px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    4px -2px 0 0 currentColor,
    7px -4px 0 0 currentColor;
}

.side-icon-replenishment::before {
  inset: 1px;
  border: 1.8px solid currentColor;
  border-radius: 4px;
  background:
    linear-gradient(currentColor, currentColor) center 3px / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center 6px / 8px 2px no-repeat;
}

.side-icon-replenishment::after {
  left: 4px;
  top: 7px;
  width: 6px;
  height: 3px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg);
}

.side-icon-selection::before {
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.side-icon-selection::after {
  left: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transform: rotate(45deg);
}

.side-icon-brand::before {
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  transform: rotate(45deg);
}

.side-icon-brand::after {
  left: 6px;
  top: 6px;
  width: 3px;
  height: 3px;
  border: 1.4px solid currentColor;
  border-radius: 999px;
  background: #1a2233;
}

.side-icon-images::before {
  left: 1px;
  top: 2px;
  width: 13px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.side-icon-images::after {
  left: 3px;
  top: 5px;
  width: 9px;
  height: 5px;
  background:
    radial-gradient(circle at 7px 1px, currentColor 0 1.4px, transparent 1.5px),
    linear-gradient(140deg, transparent 0 28%, currentColor 29% 63%, transparent 64%),
    linear-gradient(40deg, transparent 0 18%, currentColor 19% 55%, transparent 56%);
}

.side-icon-ads::before {
  left: 2px;
  bottom: 2px;
  width: 2px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    4px -2px 0 0 currentColor,
    8px -5px 0 0 currentColor;
}

.side-icon-ads::after {
  left: 1px;
  top: 1px;
  width: 12px;
  height: 12px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  border-radius: 0 0 0 3px;
}

.side-icon-finance::before {
  left: 1px;
  right: 1px;
  top: 2px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.side-icon-finance::after {
  left: 3px;
  right: 3px;
  top: 5px;
  height: 1.8px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.side-icon-settings::before {
  inset: 3px;
  border: 1.8px solid currentColor;
  border-radius: 999px;
}

.side-icon-settings::after {
  inset: -1px;
  background:
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
  opacity: 0.72;
}

.side-label {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.secondary-rail-overlay {
  position: fixed;
  inset: 0 auto 0 var(--erp-rail-width);
  z-index: 30;
  width: 154px;
  pointer-events: none;
}

.secondary-rail {
  position: absolute;
  top: 0;
  left: 0;
  width: 146px;
  height: 100vh;
  max-height: 100vh;
  padding: 18px 0;
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow:
    12px 0 28px rgba(17, 30, 53, 0.08);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.secondary-rail-open .secondary-rail {
  opacity: 1;
  transform: translateX(0);
}

.secondary-rail-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 8px 12px 20px;
}

.secondary-group + .secondary-group {
  margin-top: 24px;
}

.secondary-group h3 {
  margin: 0 0 12px;
  padding-left: 16px;
  color: #9ba8bb;
  font-size: 12px;
  font-weight: 600;
}

.secondary-links {
  display: grid;
  gap: 3px;
}

.secondary-link {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  color: #485569;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease;
}

.secondary-link span {
  display: inline-block;
  padding-left: 16px;
}

.secondary-link:hover {
  background: #f5f8fd;
  color: #2f3a4b;
}

.secondary-link.active {
  background: transparent;
  color: #2f3a4b;
  box-shadow: none;
}

.workspace-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.workspace-tabbar {
  display: flex;
  align-items: flex-end;
  align-self: flex-end;
  gap: 0;
  flex: 1 1 auto;
  min-height: 40px;
  padding: 0 8px 0 14px;
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  border-radius: 0;
}

.workspace-history-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  min-height: 31px;
  margin-top: 5px;
  padding: 0 20px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 140ms ease;
}

.workspace-history-tab:not(.active):hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
}

.workspace-history-title {
  display: inline-flex;
  align-items: center;
}

.workspace-history-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #bac4d4;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, color 120ms ease;
}

.workspace-history-tab:hover .workspace-history-close,
.workspace-history-tab.active .workspace-history-close {
  opacity: 1;
  pointer-events: auto;
}

.workspace-history-close:hover {
  background: transparent;
  color: #8d98ac;
}

.workspace-history-tab.active {
  background: #ffffff;
  color: #1e2430;
  box-shadow: none;
  margin-bottom: 0;
  z-index: 3;
}

.workspace-history-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: #ffffff;
  pointer-events: none;
}

.workspace-tabbar::-webkit-scrollbar {
  display: none;
}

.workspace-history-tab.active .workspace-history-close {
  color: #b6c0d0;
}

.workspace-tabbar-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
  width: 42px;
  min-height: 31px;
  margin-top: 5px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease;
}

.workspace-tabbar-add::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.workspace-tabbar-add:hover {
  color: #ffffff;
  background: transparent;
}

.workspace-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px 0 0;
  background: #252d3a;
  border-bottom: none;
}

.workspace-bar::after {
  display: none;
}

.workspace-user {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.workspace-status-message {
  flex: 0 1 220px;
  min-width: 0;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-status-message:empty {
  display: none;
}

.workspace-mini-btn {
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.workspace-mini-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-mini-link:hover {
  background: #f4f8fd;
  color: var(--primary-deep);
}

.workspace-mini-link.active {
  background: #edf4ff;
  color: var(--primary-deep);
}

.workspace-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #d8dee8;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.workspace-user-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
}

.workspace-user-copy strong {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-user-copy small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-user-link {
  color: inherit;
}

.workspace-user-link:hover {
  color: var(--primary-deep);
}

.toolbar-logout {
  min-width: 52px;
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

.content-shell {
  display: grid;
  gap: 0;
  padding: 0 18px 18px;
  min-width: 0;
  min-height: 0;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
}

.page-toolbar-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-toolbar-copy strong {
  font-size: 19px;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.utility-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.utility-link {
  color: var(--primary-deep);
}

.page-content,
.report-stage {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
  min-height: 0;
}

.report-stage {
  gap: 10px;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
}

.panel {
  padding: 16px;
}

.section-head,
.dashboard-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h3,
.dashboard-toolbar h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.15;
}

.section-head p,
.dashboard-toolbar p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.filter-grid,
.form-grid {
  display: grid;
  gap: 12px;
}

.filter-grid {
  grid-template-columns: repeat(5, minmax(112px, 1fr)) minmax(220px, 1.4fr);
}

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

.field-keyword {
  min-width: 0;
}

.filter-actions,
.connector-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.compact-report-panel {
  padding: 10px 12px;
  overflow: visible;
}

.report-toolbar-strip {
  display: flex;
  align-items: center;
  gap: 10px 8px;
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 0;
}

.toolbar-tag {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.toolbar-inline-field {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
  flex-wrap: nowrap;
}

.toolbar-inline-field > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.toolbar-inline-field input,
.toolbar-inline-field select {
  min-width: 136px;
  min-height: 36px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 10px;
  background: #fff;
}

.toolbar-inline-date-range {
  min-width: 0;
}

.field-date-range {
  display: grid;
  gap: 8px;
}

.date-range-picker {
  position: relative;
  display: inline-flex;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
}

.date-range-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: fit-content;
  min-width: 0;
  min-height: 36px;
  padding: 0 11px 0 13px;
  border: 1px solid #9aaece;
  border-radius: 10px;
  background: #fff;
  color: #1f2f46;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}


/* 统一所有页面日期范围筛选框尺寸，避免和普通筛选框高度/宽度不一致 */
.toolbar-inline-field .date-range-picker,
.field-date-range .date-range-picker,
.date-range-picker {
  align-items: center;
}

.date-range-trigger {
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  line-height: 34px;
}

.toolbar-inline-field .date-range-trigger,
.toolbar-inline-date-range .date-range-trigger,
.field-date-range .date-range-trigger {
  height: 36px;
  min-height: 36px;
}

.date-range-trigger-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  font-size: 13px;
}

.date-range-trigger-caret {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.date-range-trigger-caret::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid #97a7bc;
  border-radius: 4px;
}

.date-range-trigger-caret::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  border-top: 2px solid #97a7bc;
}

.date-range-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: grid;
  align-items: start;
  grid-template-columns: 74px minmax(540px, 1fr);
  width: min(760px, calc(100vw - 20px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(21, 39, 63, 0.09);
  overflow: hidden;
}

.date-range-popover[hidden],
.store-dropdown-panel[hidden],
.column-settings-panel[hidden],
.report-field-filter-section[hidden],
.secondary-rail-overlay[hidden] {
  display: none !important;
}

.date-range-shortcuts {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 6px 4px;
  background: #fff;
  border-right: 1px solid #e4edf7;
}

.date-range-shortcut {
  min-height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #43566f;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.date-range-shortcut:hover,
.date-range-shortcut.active {
  background: #eef4ff;
  color: var(--primary-deep);
  font-weight: 700;
}

.date-range-panel {
  display: grid;
  align-self: start;
}

.date-range-calendars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.date-range-calendar-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 4px;
  border-bottom: 1px solid #eef3f9;
}

.date-range-calendar-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.date-range-title-select select {
  min-width: 68px;
  height: 28px;
  padding: 0 22px 0 8px;
  border: 1px solid #d8e3f0;
  border-radius: 7px;
  background-position: right 8px center;
  background-size: 9px;
  color: #253a59;
  font-size: 12px;
  font-weight: 700;
}

.date-range-title-select-month select {
  min-width: 56px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.date-range-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.date-range-nav-right {
  justify-content: flex-end;
}

.date-range-nav-btn,
.date-range-nav-spacer {
  width: 20px;
  height: 20px;
}

.date-range-nav-btn {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #7b8ca3;
  font-size: 15px;
  cursor: pointer;
}

.date-range-nav-btn:hover {
  background: #edf4ff;
  color: var(--primary-deep);
}

.date-range-weekdays,
.date-range-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  padding: 0 8px;
}

.date-range-weekdays {
  padding-top: 4px;
  padding-bottom: 2px;
}

.date-range-weekdays span {
  text-align: center;
  color: #6c7f97;
  font-size: 11px;
  font-weight: 700;
}

.date-range-grid {
  padding-bottom: 6px;
}

.date-range-day {
  min-height: 32px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #263955;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.date-range-day:hover {
  background: #eef3fb;
}

.date-range-day.muted {
  color: #b0bccd;
}

.date-range-day.in-range {
  background: #eef2f8;
}

.date-range-day.is-start,
.date-range-day.is-end {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
}

.lx-date-range-picker {
  min-width: 0;
}

.date-range-calendar + .date-range-calendar {
  border-left: 1px solid #eef3f9;
}

@media (max-width: 1100px) {
  .date-range-popover {
    grid-template-columns: 1fr;
    width: min(700px, calc(100vw - 20px));
  }

  .date-range-shortcuts {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    border-right: none;
    border-bottom: 1px solid #e4edf7;
  }
}

.toolbar-inline-field input::placeholder {
  font-size: 13px;
}

.toolbar-inline-mini select {
  min-width: 94px;
}

.toolbar-inline-mini {
  min-width: 148px;
}

.toolbar-inline-mid select {
  min-width: 110px;
  max-width: 148px;
}

.toolbar-inline-mid {
  min-width: 166px;
}

.toolbar-inline-store {
  width: 276px;
  min-width: 276px;
}

.toolbar-inline-product input {
  min-width: 148px;
  max-width: 188px;
}

.toolbar-inline-product {
  min-width: 236px;
}

.stores-directory-toolbar {
  gap: 8px;
}

.stores-directory-toolbar .toolbar-inline-field input,
.stores-directory-toolbar .toolbar-inline-field select {
  min-width: 108px;
}

.stores-directory-toolbar .stores-toolbar-input {
  min-width: 188px;
}

.stores-directory-toolbar .stores-toolbar-input input {
  min-width: 132px;
  max-width: 188px;
}

.stores-directory-toolbar .stores-toolbar-search {
  min-width: 256px;
}

.stores-directory-toolbar .stores-toolbar-search input {
  min-width: 176px;
  max-width: 232px;
}

.stores-directory-toolbar .ghost-btn,
.stores-directory-toolbar .primary-btn {
  min-height: 36px;
}

.listing-toolbar {
  gap: 8px;
}

.listing-toolbar .toolbar-inline-field input,
.listing-toolbar .toolbar-inline-field select {
  min-width: 104px;
}

.listing-toolbar .listing-toolbar-input {
  min-width: 188px;
}

.listing-toolbar .listing-toolbar-input input {
  min-width: 128px;
  max-width: 186px;
}

.listing-toolbar .listing-toolbar-search {
  min-width: 264px;
}

.listing-toolbar .listing-toolbar-search input {
  min-width: 176px;
  max-width: 236px;
}

.listing-column-settings-shell {
  position: relative;
}

.forecast-toolbar-strip {
  gap: 8px;
}

.toolbar-inline-copy-field {
  min-width: 188px;
  max-width: 260px;
}

.toolbar-inline-copy-field .toolbar-inline-copy {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.forecast-toolbar-strip .toolbar-inline-store {
  width: 248px;
  min-width: 248px;
}

.forecast-toolbar-strip .toolbar-inline-mini {
  min-width: 138px;
}

.forecast-toolbar-strip .toolbar-inline-sm {
  min-width: 154px;
}

.forecast-toolbar-strip .toolbar-inline-field input,
.forecast-toolbar-strip .toolbar-inline-field select {
  min-width: 104px;
}

.forecast-toolbar-strip .toolbar-inline-product {
  min-width: 228px;
}

.forecast-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.dashboard-store-pill {
  min-width: 0;
  width: fit-content;
}

.dashboard-date-field {
  min-width: 0;
  width: fit-content;
}

.dashboard-date-field .date-range-picker {
  min-width: 0;
  width: fit-content;
}

.dashboard-date-field .date-range-trigger {
  min-height: 36px;
  padding: 0 11px 0 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
}

.dashboard-date-field .date-range-trigger-value {
  font-size: 13px;
  font-weight: 400;
}

.dashboard-date-field .date-range-trigger-caret {
  width: 18px;
  height: 18px;
}

.dashboard-store-pill .toolbar-select-btn {
  width: 228px;
  min-width: 228px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
}

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

.module-snapshot-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e2e9f3;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.98), rgba(245, 248, 253, 0.96));
}

.module-snapshot-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.module-snapshot-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.module-snapshot-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

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

.home-todo-column {
  display: grid;
  gap: 12px;
  min-height: 280px;
  padding: 16px;
  border: 1px solid #e2e9f3;
  border-radius: 16px;
  background: #fbfdff;
}

.home-todo-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-todo-column header strong {
  font-size: 15px;
}

.home-todo-column header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.store-dropdown {
  position: relative;
}

.store-dropdown.is-open {
  z-index: 80;
}

.toolbar-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 220px;
  min-width: 220px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-inline-store .toolbar-select-btn,
.toolbar-inline-store .store-dropdown {
  width: 100%;
  min-width: 0;
}

.toolbar-inline-store .store-dropdown {
  flex: 1 1 auto;
}

.toolbar-inline-store .toolbar-select-btn {
  width: 100%;
  min-width: 0;
}

.toolbar-select-btn:hover {
  border-color: var(--line-strong);
}

.toolbar-select-btn span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.toolbar-caret {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: -5px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 120ms ease, margin-top 120ms ease;
}

.toolbar-select-static {
  justify-content: flex-start;
  cursor: default;
}

.store-dropdown.is-open .toolbar-caret {
  margin-top: 2px;
  transform: rotate(-135deg);
}

.store-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 90;
}

.store-dropdown-search input {
  min-height: 32px;
}

.store-dropdown-list {
  display: grid;
  gap: 4px;
  max-height: 248px;
  margin-top: 6px;
  overflow: auto;
}

.store-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--panel-alt);
  cursor: pointer;
}

.store-option:hover {
  background: #eef5ff;
}

.store-option input {
  appearance: auto;
  -webkit-appearance: checkbox;
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  accent-color: var(--primary-deep);
  vertical-align: middle;
}

.store-option-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.store-option-copy strong {
  font-size: 11px;
  line-height: 1.25;
}

.store-option-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.inventory-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card {
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.summary-card strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card span {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

.summary-card-primary {
  box-shadow: inset 4px 0 0 #5b97ff, var(--shadow);
}

.summary-card-success {
  box-shadow: inset 4px 0 0 #2faa69, var(--shadow);
}

.summary-card-warning {
  box-shadow: inset 4px 0 0 #de922e, var(--shadow);
}

.summary-card-info {
  box-shadow: inset 4px 0 0 #31a7c8, var(--shadow);
}

.inventory-table-panel {
  gap: 8px;
}

.inventory-message-inline {
  margin-bottom: 4px;
}

.store-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.store-dropdown-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.store-confirm-btn {
  min-height: 26px;
  padding: 0 9px;
  font-size: 11px;
  box-shadow: none;
}

.store-dropdown-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toolbar-action-btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.toolbar-popover {
  position: relative;
  flex: 0 0 auto;
}

.icon-btn {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.column-settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 392px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 90;
}

.column-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.column-settings-head strong {
  font-size: 12px;
}

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

.column-settings-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  max-height: 300px;
  overflow: auto;
}

.column-settings-section {
  display: grid;
  gap: 8px;
}

.column-settings-section + .column-settings-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.column-settings-section-head {
  display: grid;
  gap: 4px;
}

.column-settings-section-head strong {
  font-size: 12px;
}

.column-settings-section-head span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.metric-settings-list {
  max-height: 200px;
}

.column-settings-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 8px;
  background: var(--panel-alt);
  font-size: 11px;
}

.column-settings-option input {
  width: 15px;
  min-height: 15px;
  margin: 0;
}

.column-settings-option span {
  font-size: 11px;
  line-height: 1.35;
}

.toolbar-message {
  flex: 1 0 100%;
  min-width: 0;
  margin-left: 0;
  margin-top: 4px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 10px;
}

.report-field-filter-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.field-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.field-filter-head strong {
  font-size: 13px;
}

.field-filter-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.field-filter-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #e7edf6;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
}

.field-filter-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.field-filter-item input {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 8px;
}

.report-toolbar-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-hero-grid,
.dashboard-main-grid,
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 12px;
}

.dashboard-hero-grid-single,
.dashboard-main-grid-single {
  grid-template-columns: 1fr;
}

.dashboard-side-stack {
  display: grid;
  gap: 12px;
}

.dashboard-hero-card {
  position: relative;
  overflow: hidden;
}

.dashboard-overview-card {
  background:
    radial-gradient(circle at top right, rgba(69, 122, 255, 0.16), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
}

.dashboard-ai-card {
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.14), transparent 24%),
    linear-gradient(180deg, #fbfefb 0%, #f4fbf6 100%);
}

.dashboard-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.dashboard-hero-head h2 {
  margin: 6px 0 0;
  font-size: 26px;
  line-height: 1.05;
}

.dashboard-scope-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d7e5fb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #45607f;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-executive-summary,
.dashboard-ai-brief,
.dashboard-signal-list,
.dashboard-action-list {
  display: grid;
  gap: 12px;
}

.dashboard-summary-copy strong,
.dashboard-ai-brief-main strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

.dashboard-summary-copy p,
.dashboard-ai-brief-main p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.75;
}

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

.dashboard-mini-metric {
  padding: 14px 12px;
  border: 1px solid #dce7f6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.dashboard-mini-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-mini-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
}

.dashboard-ai-points {
  display: grid;
  gap: 10px;
}

.dashboard-ai-point,
.dashboard-signal-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.dashboard-ai-point span,
.dashboard-signal-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-ai-point strong,
.dashboard-signal-head strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
}

.dashboard-ai-point.good,
.dashboard-signal-card.good {
  border-color: rgba(22, 163, 74, 0.24);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.96));
}

.dashboard-ai-point.warn,
.dashboard-signal-card.warn {
  border-color: rgba(217, 119, 6, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96));
}

.dashboard-ai-point.danger,
.dashboard-signal-card.danger {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.96));
}

.dashboard-signal-card p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

.dashboard-action-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d7e5fb;
  background: linear-gradient(180deg, #f9fbff, #f4f8ff);
}

.dashboard-action-box-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.dashboard-action-box-head strong {
  font-size: 16px;
}

.dashboard-action-box-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-action-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.dashboard-action-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-action-item p {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.dashboard-bi-hero-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
}

.dashboard-decision-card {
  background:
    radial-gradient(circle at top right, rgba(244, 166, 42, 0.16), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fff8ed 100%);
}

.dashboard-decision-list,
.dashboard-risk-list,
.dashboard-ranked-list {
  display: grid;
  gap: 10px;
}

.dashboard-decision-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.dashboard-decision-item > span,
.dashboard-ranked-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-decision-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.dashboard-decision-item p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.dashboard-decision-item b {
  align-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5fb;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-decision-item.good,
.dashboard-risk-card.good,
.dashboard-insight-card.good {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.96));
}

.dashboard-decision-item.warn,
.dashboard-risk-card.warn,
.dashboard-insight-card.warn {
  border-color: rgba(217, 119, 6, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96));
}

.dashboard-decision-item.danger,
.dashboard-risk-card.danger,
.dashboard-insight-card.danger {
  border-color: rgba(220, 38, 38, 0.2);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.96));
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-insight-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.dashboard-insight-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-insight-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-insight-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

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

.dashboard-risk-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.dashboard-risk-card strong {
  font-size: 14px;
}

.dashboard-risk-card span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-risk-card p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.dashboard-ranked-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(210px, 0.9fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-alt);
}

.dashboard-ranked-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ranked-copy p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ranked-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.dashboard-ranked-metrics span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

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

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

.cockpit-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  align-items: start;
}

.report-ai-summary-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(79, 146, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.report-ai-summary-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.report-ai-summary-head strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.1;
}

.report-ai-summary-head p {
  margin: 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: right;
}

.report-ai-summary-content {
  display: grid;
  gap: 12px;
}

.report-ai-summary-meta {
  display: block;
}

.ai-scope-shell {
  display: grid;
  gap: 12px;
}

.ai-scope-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ai-scope-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(201, 212, 225, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.ai-scope-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ai-scope-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-ai-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(72vw, calc(100vw - 24px));
}

.report-ai-drawer[hidden] {
  display: none;
}

.report-ai-drawer-backdrop {
  background: rgba(19, 31, 49, 0.18);
}

.report-ai-drawer-panel {
  height: 100vh;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px 26px 32px;
  border-left: 1px solid rgba(205, 216, 230, 0.92);
  background:
    radial-gradient(circle at top right, rgba(79, 146, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  box-shadow: -20px 0 50px rgba(17, 31, 54, 0.16);
}

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

.report-ai-drawer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-ai-drawer-head strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.1;
}

.report-ai-drawer-intro {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.ai-analysis-meta-line {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.ai-analysis-meta-line span {
  display: block;
}

.ai-analysis-meta-line.is-warning {
  color: #9a6b16;
}

.ai-analysis-meta-line.is-error {
  color: #b64b42;
}

.ai-analysis-empty {
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgba(220, 104, 92, 0.18);
  background: linear-gradient(180deg, #fffefe 0%, #fff8f7 100%);
}

.ai-analysis-empty strong {
  font-size: 22px;
  line-height: 1.25;
  color: #24364e;
}

.ai-analysis-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.ai-report-hero-panel {
  gap: 18px;
}

.ai-report-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ai-report-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.ai-report-form-panel,
.ai-report-output-panel {
  display: grid;
  gap: 18px;
}

.ai-report-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-report-output-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ai-report-output-block > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ai-report-output-block > header strong {
  font-size: 15px;
}

.ai-report-output-block > header span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-report-summary-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(79, 146, 255, 0.16);
}

.ai-report-summary-card p,
.ai-report-signal-card p,
.ai-report-action-card p {
  margin: 0;
  color: #425268;
  line-height: 1.7;
}

.ai-report-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.ai-report-signal-card,
.ai-report-action-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.ai-report-action-list {
  display: grid;
  gap: 12px;
}

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

.ai-report-action-head strong {
  font-size: 14px;
  line-height: 1.5;
}

.ai-report-action-head span,
.ai-report-action-card small,
.ai-report-board-card p {
  color: var(--muted);
}

.ai-report-board-card {
  gap: 8px;
}

.ai-report-board-card b {
  font-size: 22px;
  color: #183153;
  line-height: 1.1;
}

.ai-summary-status {
  display: inline-grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.ai-summary-status strong {
  font-size: 12px;
  line-height: 1.4;
}

.ai-summary-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ai-summary-status.is-pending {
  border-color: rgba(79, 146, 255, 0.26);
}

.ai-summary-status.is-model {
  border-color: rgba(47, 158, 100, 0.24);
}

.ai-summary-status.is-fallback {
  border-color: rgba(211, 139, 45, 0.26);
}

.ai-summary-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid rgba(45, 111, 221, 0.14);
  background:
    linear-gradient(135deg, rgba(22, 50, 92, 0.98), rgba(34, 73, 129, 0.95)),
    linear-gradient(180deg, #213a63, #2b548d);
  color: #f4f8ff;
}

.ai-summary-hero.is-pending {
  border-color: rgba(90, 153, 255, 0.28);
}

.ai-summary-pending-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-summary-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-summary-pending-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8bd0ff;
  box-shadow: 0 0 0 rgba(139, 208, 255, 0.6);
  animation: aiPulse 1.6s ease-in-out infinite;
}

.ai-summary-pending-clock {
  color: rgba(244, 248, 255, 0.8);
  font-size: 13px;
  line-height: 1.6;
}

.ai-summary-pending-clock b {
  color: #ffffff;
  font-size: 15px;
}

.ai-summary-pending-steps {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-summary-pending-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.ai-summary-pending-steps span.is-active {
  background: rgba(139, 208, 255, 0.16);
  border: 1px solid rgba(139, 208, 255, 0.22);
}

.ai-summary-hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.ai-summary-eyebrow {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-summary-hero strong {
  position: relative;
  z-index: 1;
  font-size: clamp(24px, 2.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-summary-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(244, 248, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.ai-summary-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.ai-summary-card-head span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--panel-alt);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-summary-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.ai-summary-card li,
.ai-summary-card p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-summary-card.navy {
  border-color: rgba(79, 146, 255, 0.22);
}

.ai-summary-card.green {
  border-color: rgba(47, 158, 100, 0.22);
}

.ai-summary-card.amber {
  border-color: rgba(211, 139, 45, 0.26);
}

.ai-summary-card.rose {
  border-color: rgba(211, 78, 67, 0.2);
}

.report-ai-diagnostics,
.report-ai-rankings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.ai-diagnostic-panel,
.ai-ranking-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  align-content: start;
  align-self: start;
  min-width: 0;
}

.ai-diagnostic-list,
.ai-ranking-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.ai-diagnostic-item,
.ai-ranking-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-alt);
  border: 1px solid rgba(201, 212, 225, 0.7);
  min-width: 0;
}

.ai-diagnostic-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ai-diagnostic-main strong,
.ai-ranking-head strong {
  font-size: 16px;
  line-height: 1.5;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-ranking-copy strong {
  display: -webkit-box;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.ai-diagnostic-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-diagnostic-item p,
.ai-ranking-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.ai-ranking-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-diagnostic-metrics,
.ai-ranking-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.ai-diagnostic-metrics span,
.ai-ranking-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  line-height: 1.45;
  text-align: left;
}

.ai-ranking-item {
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas:
    "index copy"
    ". metrics";
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
}

.ai-ranking-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  grid-area: index;
  flex-shrink: 0;
}

@keyframes aiPulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(139, 208, 255, 0.55);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(139, 208, 255, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(139, 208, 255, 0);
  }
}

.ai-ranking-copy {
  display: grid;
  gap: 6px;
  grid-area: copy;
  min-width: 0;
}

.ai-ranking-metrics {
  grid-area: metrics;
}

.ai-ranking-head,
.ai-diagnostic-head {
  min-width: 0;
}

.ai-ranking-panel.navy {
  border-color: rgba(79, 146, 255, 0.22);
}

.ai-ranking-panel.green {
  border-color: rgba(47, 158, 100, 0.22);
}

.ai-ranking-panel.amber {
  border-color: rgba(211, 139, 45, 0.26);
}

.ai-ranking-panel.rose {
  border-color: rgba(211, 78, 67, 0.2);
}

.kpi-grid {
  display: grid;
  gap: 6px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 98px;
  padding: 12px 11px 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  align-self: start;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent, var(--primary));
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin: 8px 0 0;
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.asin-link {
  display: inline-block;
  max-width: 100%;
  color: var(--primary-deep);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asin-link:hover {
  text-decoration: underline;
}

.kpi-card.navy {
  --card-accent: #4f92ff;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.kpi-card.green {
  --card-accent: #2f9e64;
  background: linear-gradient(180deg, #ffffff 0%, #f5fcf8 100%);
}

.kpi-card.amber {
  --card-accent: #d38b2d;
  background: linear-gradient(180deg, #ffffff 0%, #fff9f1 100%);
}

.kpi-card.rose {
  --card-accent: #d66a7f;
  background: linear-gradient(180deg, #ffffff 0%, #fff6f8 100%);
}

.kpi-card.teal {
  --card-accent: #2c9fb0;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfc 100%);
}

.kpi-card.slate {
  --card-accent: #7a8da8;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

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

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

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

.trend-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.trend-stat-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.trend-stat-card p,
.metric-caption {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.metric-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.metric-delta.positive {
  color: var(--success);
}

.metric-delta.negative {
  color: var(--danger);
}

.metric-delta.neutral {
  color: var(--muted);
}

.trend-chart {
  min-height: 360px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(79, 146, 255, 0.03), rgba(79, 146, 255, 0) 36%),
    #fff;
}

.trend-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.trend-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.trend-chart-shell {
  display: grid;
  gap: 10px;
}

.chart-svg {
  width: 100%;
  height: 320px;
  display: block;
}

.chart-caption-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.chart-caption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  font-weight: 700;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  background: #fbfdff;
}

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

.dimension-panel,
.status-card,
.mapping-hint,
.empty-block,
.batch-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-alt);
}

.dimension-panel {
  padding: 14px;
}

.dimension-panel header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.dimension-panel h4 {
  margin: 0;
  font-size: 16px;
}

.dimension-panel header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dimension-list {
  display: grid;
  gap: 10px;
}

.dimension-row {
  display: grid;
  gap: 6px;
}

.dimension-row-head,
.dimension-row-meta,
.status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dimension-row-head strong {
  font-size: 13px;
  line-height: 1.45;
}

.dimension-row-head span,
.dimension-row-meta span,
.status-line span {
  color: var(--muted);
  font-size: 12px;
}

.dimension-row-meta strong,
.status-line strong {
  font-size: 12px;
  font-weight: 700;
}

.dimension-bar {
  height: 8px;
  border-radius: 999px;
  background: #e9eff6;
  overflow: hidden;
}

.dimension-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f92ff, #78b0ff);
}

.report-tip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.report-tip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f4f8fd;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.check-pill input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.connector-form {
  display: grid;
  gap: 14px;
}

.status-card {
  margin-top: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mapping-hint {
  padding: 14px 16px;
}

.mapping-hint summary {
  cursor: pointer;
  font-weight: 700;
}

.mapping-hint p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.batch-card {
  padding: 14px;
}

.batch-main strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.batch-main span,
.batch-meta span {
  color: var(--muted);
  font-size: 12px;
}

.batch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 14px;
}

.batch-actions {
  display: flex;
  justify-content: flex-end;
}

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

.data-table {
  width: max(100%, 1200px);
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.55;
  white-space: nowrap;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f7fafc;
  color: var(--muted-strong);
  font-weight: 700;
}

.data-table tbody tr:hover td {
  background: #fbfdff;
}

.data-table tbody tr.summary-row td {
  background: #f6faff;
  font-weight: 700;
}

.ranking-table {
  width: max(100%, 1020px);
}

.replenishment-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.replenishment-ai-grid {
  align-items: start;
}

.replenishment-row-ai-panel {
  min-height: 100%;
}

.replenishment-row-ai-shell {
  display: grid;
  gap: 14px;
}

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

.module-hero-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.module-hero-card strong {
  display: block;
  font-size: 16px;
}

.module-hero-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.import-inline-form input[type="text"],
.import-inline-form select {
  min-height: 38px;
}

.table-input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: inherit;
}

.table-textarea {
  min-height: 62px;
  resize: vertical;
}

.check-cell {
  text-align: center;
}

.check-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.import-preview {
  max-width: 420px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
}

.table-empty-cell {
  padding: 28px 14px !important;
  text-align: center !important;
  color: var(--muted);
}

.logistics-import-form,
.carrier-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.logistics-import-form {
  margin-bottom: 14px;
}

.logistics-toolbar-panel {
  overflow: visible;
}

.logistics-modal-meta {
  margin-bottom: 16px;
}

.logistics-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.logistics-overview-card {
  padding: 18px;
  border: 1px solid #d8e5f5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.logistics-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.logistics-card-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.logistics-import-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 0;
}

.logistics-import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logistics-selected-file {
  min-height: 42px;
  padding: 11px 14px;
  border: 1px dashed #cdd9ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
}

.logistics-rules-entry-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.logistics-rules-entry-btn {
  min-width: 120px;
}

.logistics-head.compact {
  margin-bottom: 12px;
}

.compact-meta {
  color: var(--muted);
  font-size: 13px;
}

.logistics-summary-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.logistics-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.logistics-summary-card span,
.logistics-summary-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.logistics-summary-card strong {
  font-size: 28px;
  line-height: 1;
  color: #184986;
}

.logistics-filter-bar {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
}

.logistics-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(112px, 1fr));
  gap: 6px;
}

.logistics-search-field input {
  min-width: 0;
}

.logistics-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.logistics-inline-check {
  min-height: 32px;
}

.logistics-rule-summary {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.logistics-rule-summary-modal {
  margin-bottom: 18px;
}

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

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

.logistics-channel-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.logistics-channel-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d7e3f5;
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  cursor: pointer;
}

.logistics-channel-tab.active {
  border-color: #7fa9df;
  background: #eaf3ff;
  color: #174a8b;
}

.logistics-total-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid #d8e5f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fafcff 0%, #f3f8ff 100%);
}

.logistics-total-card strong {
  font-size: 28px;
  color: #174a8b;
  line-height: 1;
}

.logistics-total-card small {
  color: var(--muted);
  line-height: 1.6;
}

.logistics-stage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.logistics-stage-chip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
  padding: 14px;
  border: 1px solid #d7e3f5;
  border-radius: 16px;
  background: #fbfdff;
}

.logistics-stage-chip-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.logistics-stage-chip-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logistics-stage-chip-input em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.logistics-stage-chip-input input {
  width: 100%;
}

.logistics-stage-chip-input input {
  max-width: 100px;
}

.logistics-stage-chip-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.logistics-table-wrap {
  max-height: calc(100vh - 430px);
}

.logistics-data-table {
  width: max(100%, 2050px);
}

.logistics-data-table td,
.logistics-data-table th {
  max-width: none;
  vertical-align: top;
}

.logistics-data-table th:nth-child(1),
.logistics-data-table td:nth-child(1) {
  min-width: 150px;
}

.logistics-data-table th:nth-child(2),
.logistics-data-table td:nth-child(2),
.logistics-data-table th:nth-child(3),
.logistics-data-table td:nth-child(3),
.logistics-data-table th:nth-child(4),
.logistics-data-table td:nth-child(4),
.logistics-data-table th:nth-child(5),
.logistics-data-table td:nth-child(5),
.logistics-data-table th:nth-child(6),
.logistics-data-table td:nth-child(6),
.logistics-data-table th:nth-child(7),
.logistics-data-table td:nth-child(7) {
  min-width: 220px;
}

.logistics-data-table th:nth-child(8),
.logistics-data-table td:nth-child(8),
.logistics-data-table th:nth-child(9),
.logistics-data-table td:nth-child(9) {
  min-width: 170px;
}

.logistics-data-table th:nth-child(10),
.logistics-data-table td:nth-child(10) {
  min-width: 290px;
}

.logistics-data-row.is-exception td {
  background: rgba(255, 248, 244, 0.88);
}

.logistics-data-row.is-signed td {
  background: rgba(247, 251, 255, 0.72);
}

.logistics-cell-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.logistics-cell-stack strong,
.logistics-cell-stack p,
.logistics-followup-cell small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.logistics-cell-stack strong {
  font-size: 14px;
  line-height: 1.55;
}

.logistics-cell-stack p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.logistics-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.logistics-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  border: 1px solid rgba(205, 217, 236, 0.9);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.logistics-chip.info {
  background: rgba(79, 146, 255, 0.1);
  color: #215ea7;
  border-color: rgba(79, 146, 255, 0.16);
}

.logistics-chip.warning {
  background: rgba(233, 169, 57, 0.12);
  color: #9e6a14;
  border-color: rgba(233, 169, 57, 0.16);
}

.logistics-chip.danger {
  background: rgba(219, 95, 82, 0.1);
  color: #b45146;
  border-color: rgba(219, 95, 82, 0.16);
}

.logistics-chip.success {
  background: rgba(47, 158, 100, 0.1);
  color: #1f8b58;
  border-color: rgba(47, 158, 100, 0.16);
}

.logistics-chip.slate {
  background: rgba(111, 129, 151, 0.1);
  color: #5b6d84;
  border-color: rgba(111, 129, 151, 0.16);
}

.logistics-inline-select {
  width: 100%;
  min-height: 40px;
  padding-right: 34px;
}

.logistics-followup-cell {
  display: grid;
  gap: 8px;
}

.logistics-followup-note {
  min-height: 92px;
  resize: vertical;
}

.logistics-followup-cell small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.carrier-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-select,
.filter-input {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: inherit;
  font-size: 12px;
}

.filter-input {
  min-width: 180px;
}

.carrier-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.carrier-summary-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.carrier-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.carrier-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  color: var(--text);
}

.carrier-table-wrap {
  max-height: calc(100vh - 360px);
}

.carrier-data-table {
  width: max(100%, 1440px);
}

.carrier-action-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.text-btn-danger,
.ghost-btn-danger {
  color: #c94f4f;
}

.is-row-deleting td {
  background: #fff7f8 !important;
  color: #9f5d69;
}

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

.replenishment-status-board {
  display: grid;
  gap: 10px;
}

.replenishment-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.replenishment-status-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.replenishment-status-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1;
}

.replenishment-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.replenishment-status-card.critical {
  background: linear-gradient(180deg, #fff7f8 0%, #fff 100%);
}

.replenishment-status-card.urgent {
  background: linear-gradient(180deg, #fff9f1 0%, #fff 100%);
}

.replenishment-status-card.watch {
  background: linear-gradient(180deg, #f7fbff 0%, #fff 100%);
}

.replenishment-status-card.healthy {
  background: linear-gradient(180deg, #f5fcf8 0%, #fff 100%);
}

.replenishment-table-wrap {
  height: calc(100vh - 386px);
}

.replenishment-table {
  width: max(100%, 1460px);
}

.replenishment-table tr.is-active td {
  background: rgba(79, 146, 255, 0.05);
}

.replenishment-qty-cell {
  color: var(--primary-deep);
  font-weight: 700;
}

.replenishment-ai-row-btn {
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.critical {
  background: #fff1f4;
  color: #c94b68;
}

.status-pill.urgent {
  background: #fff5e6;
  color: #bb7720;
}

.status-pill.watch {
  background: #edf5ff;
  color: #3e7bcb;
}

.status-pill.healthy {
  background: #edf9f1;
  color: #278455;
}

.status-pill.is-add {
  background: #eaf3ff;
  color: #2c6bd9;
}

.status-pill.is-edit {
  background: #fff5e6;
  color: #bb7720;
}

.status-pill.is-delete {
  background: #fff1f4;
  color: #c94b68;
}

.status-pill.is-confirm {
  background: #edf9f1;
  color: #278455;
}

.report-panel,
.report-table-shell,
.report-table-wrap {
  min-width: 0;
}

.report-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px;
}

.report-table-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fafcff 0%, #f4f8fd 100%);
}

.report-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

.report-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 5px;
  border-top: 1px solid rgba(207, 215, 230, 0.75);
}

.report-pager-summary,
.report-pager-state {
  color: #6d7a90;
  font-size: 12px;
  white-space: nowrap;
}

.report-pager-controls,
.report-page-size-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-page-size-field {
  color: #6d7a90;
  font-size: 12px;
}

.report-page-size-field input {
  width: 72px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  background: #fff;
  color: #1f2f46;
  font-size: 12px;
}

@media (max-width: 900px) {
  .report-pager,
  .report-pager-controls {
    align-items: flex-start;
    flex-direction: column;
  }
}

.report-table th:first-child,
.report-table td:first-child {
  position: sticky;
  left: 0;
}

.report-table thead th:first-child {
  z-index: 5;
}

.report-table tbody td:first-child {
  z-index: 2;
  background: #fbfdff;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .logistics-overview-grid {
    grid-template-columns: 1fr;
  }

  .logistics-rule-summary {
    grid-template-columns: 1fr;
  }
}

.report-table-wrap {
  position: relative;
  flex: 1 1 auto;
  max-width: 100%;
  height: calc(100vh - 274px);
  min-height: 520px;
  max-height: none;
  overflow: auto;
  border: none;
  padding-bottom: 6px;
  scrollbar-gutter: stable both-edges;
}

.report-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.report-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(122, 141, 168, 0.5);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.report-table-wrap::-webkit-scrollbar-track {
  background: rgba(220, 228, 238, 0.6);
}

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

.stores-overview-main {
  grid-column: 1 / -1;
}

.store-company-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.store-company-principle {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.store-company-principle span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecf4ff;
  color: #2f5f9e;
  font-size: 11px;
  font-weight: 700;
}

.store-company-principle h3 {
  margin: 14px 0 8px;
  font-size: 20px;
}

.store-company-principle p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

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

.brands-overview-main {
  grid-column: 1 / -1;
}

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

.brand-compliance-overview-main {
  grid-column: 1 / -1;
}

.stores-directory-table .table-input,
.stores-groups-table .table-input {
  min-width: 88px;
}

.brands-directory-table .table-input,
.companies-directory-table .table-input,
.companies-tax-table .table-input,
.companies-erp-table .table-input,
.brands-matrix-table .table-input,
.brands-coverage-table .table-input,
.brands-health-table .table-input,
.brand-compliance-records-table .table-input {
  min-width: 92px;
}

.stores-ownership-table .table-input,
.stores-health-table .table-input {
  min-width: 88px;
}

.stores-ownership-editor-panel .report-toolbar-strip {
  align-items: center;
}

.stores-ownership-editor-table .check-cell {
  width: 54px;
  text-align: center;
}

.stores-ownership-editor-table tbody tr.is-selected-row td {
  background: #f5faff;
}

.stores-ownership-editor-table tbody tr.is-selected-row td:first-child {
  background: #eef6ff;
}

.stores-directory-table .table-textarea {
  min-width: 180px;
  min-height: 34px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eff5fb;
  color: #46607d;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.store-badge.is-active {
  background: #edf9f1;
  color: #278455;
}

.store-badge.is-key {
  background: #fff4df;
  color: #a86a00;
}

.store-badge.is-warn {
  background: #fff6e8;
  color: #b26b00;
}

.store-badge.is-alert {
  background: #ffedf0;
  color: #c33d55;
}

.store-badge.is-muted {
  background: #f3f6fa;
  color: #7b8ca3;
}

.store-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.store-stack.compact {
  min-width: 120px;
}

.store-stack span {
  color: #6a7a91;
  font-size: 12px;
  line-height: 1.45;
}

.store-stack strong {
  color: #22354b;
  font-weight: 700;
}

.stores-ownership-table th,
.stores-ownership-table td,
.stores-ownership-editor-table th,
.stores-ownership-editor-table td,
.stores-ownership-issues-table th,
.stores-ownership-issues-table td,
.companies-directory-table th,
.companies-directory-table td,
.companies-tax-table th,
.companies-tax-table td,
.companies-erp-table th,
.companies-erp-table td,
.store-company-matrix-table th,
.store-company-matrix-table td,
.operating-company-table th,
.operating-company-table td,
.store-company-directory-table th,
.store-company-directory-table td,
.stores-health-table th,
.stores-health-table td,
.listing-management-table th,
.listing-management-table td,
.brand-compliance-overview-table th,
.brand-compliance-overview-table td,
.brand-compliance-records-table th,
.brand-compliance-records-table td {
  max-width: 220px;
}

.listing-management-table td {
  vertical-align: top;
}

.listing-thumb {
  width: 38px;
  height: 38px;
  border: 1px solid #d9e5f2;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.stores-ownership-editor-table td:nth-child(2) {
  min-width: 180px;
}

.stores-health-table td:nth-child(5),
.stores-health-table td:nth-child(6),
.companies-directory-table td:nth-child(9),
.companies-directory-table td:nth-child(12),
.companies-tax-table td:nth-child(2),
.companies-tax-table td:nth-child(10),
.companies-erp-table td:nth-child(10),
.companies-erp-table td:nth-child(12),
.store-company-matrix-table td:nth-child(5),
.store-company-matrix-table td:nth-child(6),
.store-company-matrix-table td:nth-child(7),
.operating-company-table td:nth-child(5),
.operating-company-table td:nth-child(6),
.operating-company-table td:nth-child(7),
.store-company-directory-table td:nth-child(5),
.store-company-directory-table td:nth-child(6),
.store-company-directory-table td:nth-child(7),
.stores-ownership-table td:last-child {
  min-width: 170px;
}

.brands-coverage-table td:nth-child(2),
.brands-health-table td:nth-child(3),
.brands-health-table td:nth-child(5),
.brand-compliance-overview-table td:nth-child(2),
.brand-compliance-overview-table td:nth-child(8),
.brand-compliance-records-table td:nth-child(2) {
  min-width: 170px;
}

.brands-monitoring-table th,
.brands-monitoring-table td {
  max-width: 260px;
  vertical-align: top;
}

.brands-monitoring-table td:nth-child(4),
.brands-monitoring-table td:nth-child(5),
.brands-monitoring-table td:nth-child(6),
.brands-monitoring-table td:nth-child(7) {
  min-width: 220px;
}

.brands-monitoring-table .store-stack .table-input {
  min-width: 180px;
}

.report-table tbody tr.summary-row td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #eef5ff;
  border-top: 1px solid #d9e5f3;
  box-shadow: none;
}

.report-table tbody tr.summary-row td:first-child {
  z-index: 6;
  background: #e8f1ff;
  border-top: 1px solid #d9e5f3;
}

.report-table tbody tr.summary-row:hover td {
  background: #eef5ff;
}

.report-table tbody tr.summary-row:hover td:first-child {
  background: #e8f1ff;
}

.inventory-table-wrap {
  height: calc(100vh - 264px);
  min-height: 620px;
}

.inventory-table {
  width: max-content;
  min-width: 100%;
}

.inventory-table th,
.inventory-table td {
  max-width: 168px;
}

.empty-row {
  padding: 48px 16px !important;
  color: var(--muted);
  text-align: center !important;
}

.summary-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.transit-loss-stage {
  gap: 16px;
}

.transit-loss-head.compact h3,
.transit-loss-head h3 {
  margin-bottom: 0;
}

.transit-loss-hero {
  padding-bottom: 18px;
}

.transit-loss-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.risk-tree-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.risk-tree-card-wide {
  grid-column: span 1;
}

.risk-tree-card h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.risk-tree-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.risk-tree-card li span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.transit-loss-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.transit-loss-table {
  width: max(100%, 1180px);
}

.transit-loss-table .section-header td {
  background: #f0f5ff;
  color: #1a3a6b;
  font-size: 14px;
  padding: 10px 12px;
  border-bottom: 2px solid #d0dff5;
}

.transit-loss-table .total-row td {
  background: #e8f5e9;
  font-size: 14px;
  font-weight: 600;
  border-top: 2px solid #a5d6a7;
  padding: 12px;
}

.transit-loss-table .total-row td div {
  margin: 2px 0;
  font-weight: 500;
  font-size: 13px;
}

.cell-yes {
  color: #2e7d32;
  font-weight: 600;
  text-align: center;
  background: #e8f5e9;
}

.cell-no {
  color: #c62828;
  font-weight: 600;
  text-align: center;
  background: #ffebee;
}

.cell-partial {
  color: #e65100;
  font-weight: 600;
  text-align: center;
  background: #fff3e0;
}

.cell-conditional {
  color: #6a1b9a;
  font-weight: 600;
  text-align: center;
  background: #f3e5f5;
}

.cell-summary {
  text-align: left;
  vertical-align: top;
}

.cell-summary div {
  margin: 2px 0;
  font-size: 13px;
  font-weight: 500;
}

.transit-loss-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.image-requests-stage {
  gap: 16px;
}

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

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

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

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field-wide {
  grid-column: span 3;
}

.compact-head {
  margin-bottom: 14px;
}

.image-request-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.image-request-list,
.image-request-detail {
  min-width: 0;
}

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

.request-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.request-card:hover,
.request-card.active {
  border-color: #c6d8f3;
  box-shadow: 0 12px 28px rgba(21, 39, 63, 0.06);
  transform: translateY(-1px);
}

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

.request-card-head strong {
  font-size: 16px;
  line-height: 1.4;
}

.request-status-text {
  flex: 0 0 auto;
  color: #4b5f7a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.request-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.request-card p {
  margin: 12px 0 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.image-request-detail {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.detail-head {
  margin-bottom: 12px;
}

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

.danger-ghost,
.danger-text {
  color: var(--danger);
}

.attachment-list {
  display: grid;
  gap: 10px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attachment-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attachment-copy a {
  color: var(--primary-deep);
  font-weight: 700;
  text-decoration: none;
}

.attachment-copy span {
  color: var(--muted);
  font-size: 12px;
}

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

.landing-column {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.landing-column h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.selection-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.selection-summary-card span {
  color: var(--muted);
  font-size: 12px;
}

.selection-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: var(--primary-deep);
}

.selection-summary-card p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.selection-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 6px;
  margin-bottom: 10px;
  align-items: end;
  padding: 8px;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
}

.selection-toolbar .form-field span {
  font-size: 10px;
}

.selection-toolbar .form-field input,
.selection-toolbar .form-field select {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
}

.selection-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
}

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

.selection-detail-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.selection-detail-block h5 {
  margin: 0 0 12px;
  font-size: 14px;
}

.selection-detail-metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.selection-detail-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.selection-detail-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.selection-keyvals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
}

.selection-keyvals span {
  color: var(--muted);
  font-size: 12px;
}

.selection-keyvals strong {
  text-align: right;
  font-size: 13px;
  line-height: 1.6;
}

.selection-action-row {
  margin-top: 16px;
}

.selection-events {
  display: grid;
  gap: 12px;
}

.selection-event-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.selection-event-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selection-event-item strong {
  text-transform: capitalize;
}

.selection-event-item span,
.selection-event-item time {
  color: var(--muted);
  font-size: 12px;
}

.selection-event-item p {
  margin: 8px 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.data-table tr.is-active {
  background: rgba(45, 111, 221, 0.06);
}

@media (max-width: 1200px) {
  .selection-summary-grid,
  .selection-toolbar,
  .landing-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selection-detail-layout,
  .selection-detail-grid {
    grid-template-columns: 1fr;
  }
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sort-btn.is-active {
  color: var(--primary-deep);
}

.sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 14px;
  position: relative;
}

.sort-indicator::before,
.sort-indicator::after {
  content: "";
  position: absolute;
  left: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.sort-indicator::before {
  top: 0;
  border-bottom: 5px solid #b8c3d1;
}

.sort-indicator::after {
  bottom: 0;
  border-top: 5px solid #b8c3d1;
}

.sort-btn.is-active.asc .sort-indicator::before {
  border-bottom-color: var(--primary-deep);
}

.sort-btn.is-active.desc .sort-indicator::after {
  border-top-color: var(--primary-deep);
}

.report-table [data-column-key="department"] {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.report-table [data-column-key="site"] {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.report-table [data-column-key="brand"] {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.report-table [data-column-key="parent_asin"],
.report-table [data-column-key="asin"] {
  width: 138px;
  min-width: 138px;
  max-width: 138px;
}

.report-table [data-column-key="product_name"] {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
}

.report-table [data-column-key="model"] {
  width: 145px;
  min-width: 145px;
  max-width: 145px;
}

.report-table [data-column-key="sales_amount"],
.report-table [data-column-key="ad_spend"],
.report-table [data-column-key="gross_profit"],
.report-table [data-column-key="avg_price"],
.report-table [data-column-key="total_inventory_value"] {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}

.report-table [data-column-key="sales_units"],
.report-table [data-column-key="avg_daily_sales"],
.report-table [data-column-key="ad_cost_ratio"],
.report-table [data-column-key="gross_margin"],
.report-table [data-column-key="total_inventory"],
.report-table [data-column-key="turnover_days"],
.report-table [data-column-key="roi"],
.report-table [data-column-key="row_count"] {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.report-table .truncate-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-stage {
  display: grid;
  gap: 16px;
}

.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-subnav {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 12px;
}

.settings-subnav-link {
  display: grid;
  gap: 4px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: var(--muted-strong);
  transition: 180ms ease;
}

.settings-subnav-link strong {
  font-size: 14px;
}

.settings-subnav-link span {
  font-size: 12px;
  color: var(--muted);
}

.settings-subnav-link:hover {
  border-color: rgba(45, 111, 221, 0.25);
  background: #f7faff;
}

.settings-subnav-link.active {
  border-color: rgba(45, 111, 221, 0.28);
  background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
  box-shadow: inset 3px 0 0 var(--accent);
}

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

.settings-shell-single {
  grid-template-columns: 1fr;
}

.settings-stage .settings-shell {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-stage .settings-detail {
  padding: 0;
}

.lx-user-shell {
  display: grid;
  gap: 0;
  min-height: calc(100vh - 250px);
  background: #f4f6fa;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  overflow: hidden;
}

.lx-user-view {
  display: none;
}

.lx-user-view.active {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
}

.lx-filter-bar,
.lx-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
  border: 1px solid #e6ebf2;
  border-radius: 12px;
}

.lx-filter-group,
.lx-filter-actions,
.lx-action-left,
.lx-action-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.lx-filter-group,
.lx-action-left,
.lx-action-right {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  white-space: nowrap;
}

.lx-filter-group .lx-inline-check {
  gap: 5px;
  margin-left: 2px;
}

.lx-filter-group select,
.lx-filter-group input,
.lx-search-field,
.lx-action-bar .ghost-btn,
.lx-action-bar .primary-btn {
  min-height: 26px;
}

.lx-filter-group select,
.lx-filter-group input,
.lx-search-field input,
.lx-user-form input,
.lx-user-form select,
.lx-category-box textarea {
  padding: 0 10px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  background: #fff;
  color: #1f2f46;
  font-size: 11px;
}

.lx-filter-group select,
.lx-filter-group input {
  flex: 0 0 auto;
  width: 92px;
  min-width: 92px;
}

.lx-search-field {
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  width: 188px;
  min-width: 188px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.lx-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
}

.lx-search-field .ghost-btn {
  border: none;
  border-left: 1px solid #e4e8f0;
  border-radius: 0;
}

.lx-more-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  background: #fff;
  border-bottom: 1px solid #e6ebf2;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.lx-selected-summary {
  color: #8a97ab;
  font-size: 12px;
}

.lx-user-view > .message-box {
  flex: 0 0 auto;
  min-height: 28px;
  margin: 0 8px 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.lx-table-shell {
  padding: 0 8px 8px;
}

.lx-user-table {
  width: max(100%, 1560px);
  background: #fff;
}

.lx-user-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.lx-user-table th,
.lx-user-table td {
  height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid #e9edf4;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  vertical-align: middle;
}

.lx-user-table tbody tr.selected {
  background: #edf4ff;
}

.lx-check-col {
  width: 30px;
  min-width: 30px;
  text-align: center;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.lx-check-col input,
#lxSelectAll,
[data-select-user] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  border: 1px solid #b7c3d6;
  border-radius: 2px;
  background: #fff;
  position: relative;
  cursor: pointer;
  flex: 0 0 12px;
  box-shadow: none;
}

.lx-check-col input:checked,
#lxSelectAll:checked,
[data-select-user]:checked {
  border-color: #2d6fdd;
  background: #2d6fdd;
}

.lx-check-col input:checked::after,
#lxSelectAll:checked::after,
[data-select-user]:checked::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.lx-operation-col,
.lx-operation-cell {
  width: 118px;
  min-width: 118px;
}

.lx-operation-cell {
  overflow: visible !important;
}

.lx-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  min-height: 38px;
}

.lx-dropdown.row {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lx-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #d8e1ee;
  border-radius: 6px;
  background: #f7f9fd;
  font-size: 12px;
  font-weight: 600;
}

.lx-status-pill.active {
  border-color: #7bd38d;
  color: #22a146;
  background: #f7fff8;
}

.lx-status-pill.inactive {
  border-color: #cfd6e4;
  color: #45546b;
  background: #f7f9fc;
}

.lx-status-pill.pending {
  border-color: #ffcf8b;
  color: #c67600;
  background: #fff9ef;
}

.lx-dropdown {
  position: relative;
}

.lx-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 112px;
  padding: 6px 0;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(21, 39, 63, 0.08);
  z-index: 30;
}

.lx-dropdown-menu button {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #24364c;
  text-align: left;
  font-size: 12px;
}

.lx-filter-actions .ghost-btn,
.lx-filter-actions .primary-btn,
.lx-action-right .ghost-btn,
.lx-action-right .primary-btn,
.lx-editor-actions .ghost-btn,
.lx-editor-actions .primary-btn {
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.lx-dropdown-menu button:hover {
  background: #f5f8fd;
}

.lx-row-menu {
  left: auto;
  right: 0;
  min-width: 132px;
}

.lx-dropdown-menu[hidden],
.lx-row-menu[hidden] {
  display: none !important;
}

.lx-editor-head {
  padding: 8px 14px;
  border-bottom: 1px solid #e6ebf2;
  background: #fff;
}

.lx-editor-head h3 {
  margin: 0;
  font-size: 15px;
}

.lx-editor-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  min-height: 480px;
}

.lx-editor-sidebar,
.lx-editor-main {
  min-width: 0;
}

.lx-editor-card,
.lx-editor-main {
  height: 100%;
  border: 1px solid #e4e9f1;
  background: #fff;
}

.lx-editor-card {
  padding: 12px;
}

.lx-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lx-section-title span {
  width: 2px;
  height: 18px;
  background: #2d6fdd;
  border-radius: 999px;
}

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

.lx-section-title-sub {
  margin-top: 18px;
}

.lx-user-form {
  display: grid;
  gap: 10px;
}

.lx-user-form label {
  display: grid;
  gap: 6px;
}

.lx-user-form label > span,
.lx-radio-group > span,
.lx-category-box label > span {
  color: #4e5f76;
  font-size: 12px;
}

.lx-user-form em,
.lx-radio-group em {
  color: #d34e43;
  font-style: normal;
}

.lx-user-form input,
.lx-user-form select {
  min-height: 28px;
}

.lx-radio-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lx-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lx-radio-group input[type="radio"] {
  width: 12px;
  height: 12px;
  margin: 0;
}

.lx-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5d6f86;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

.lx-inline-check input[type="checkbox"],
.lx-inline-check input[type="radio"],
.lx-role-item input,
.lx-module-item input {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  margin: 0;
  padding: 0;
  flex: 0 0 12px;
  box-shadow: none;
}

.lx-inline-check input[type="checkbox"] {
  border: 1px solid #b7c3d6;
  border-radius: 2px;
  background: #fff;
  position: relative;
  cursor: pointer;
}

.lx-inline-check input[type="checkbox"]:checked {
  border-color: #2d6fdd;
  background: #2d6fdd;
}

.lx-inline-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.lx-inline-check input[type="radio"],
.lx-role-item input,
.lx-module-item input {
  border: 1px solid #b7c3d6;
  border-radius: 999px;
  background: #fff;
  position: relative;
  cursor: pointer;
}

.lx-inline-check input[type="radio"]:checked,
.lx-role-item input:checked,
.lx-module-item input:checked {
  border-color: #2d6fdd;
}

.lx-inline-check input[type="radio"]:checked::after,
.lx-role-item input:checked::after,
.lx-module-item input:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: #2d6fdd;
}

.lx-role-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  height: 32px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}

.lx-role-tabs button {
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #2a3c54;
  font-size: 12px;
}

.lx-role-tabs button.active {
  color: #2563eb;
  font-weight: 700;
}

.lx-role-panel {
  display: none;
  padding: 12px;
}

.lx-role-panel.active {
  display: block;
}

.lx-role-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.lx-role-hint {
  color: #8a97ab;
  font-size: 12px;
  line-height: 1.4;
}

.lx-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px 14px;
  align-content: start;
}

.lx-role-item,
.lx-module-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2b3b52;
  font-size: 12px;
  line-height: 1.2;
}

.lx-role-item em {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #fff4e5;
  color: #d68516;
  font-size: 11px;
  font-style: normal;
}

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

.lx-category-box textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

.lx-editor-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #e4e9f1;
  background: #fff;
}

.lx-editor-footer .message-box {
  flex: 1;
}

.lx-editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lx-dept-shell {
  display: grid;
  min-height: calc(100vh - 250px);
  background: #f4f6fa;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  overflow: hidden;
}

.lx-dept-view {
  display: none;
}

.lx-dept-view.active {
  display: grid;
  align-content: start;
}

.lx-dept-list-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 250px);
}

.lx-dept-tree-pane {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border-right: 1px solid #e5eaf2;
  background: #fff;
}

.lx-dept-main-pane {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  background: #f4f6fa;
}

.lx-dept-tree-head,
.lx-dept-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lx-dept-tree-head {
  padding: 2px 2px 0;
}

.lx-dept-tree-head h3,
.lx-dept-main-head h3 {
  margin: 0;
  font-size: 15px;
}

.lx-dept-tree-head p,
.lx-dept-main-head p,
.lx-resource-note {
  margin: 4px 0 0;
  color: #7f8ca1;
  font-size: 12px;
  line-height: 1.5;
}

.lx-dept-tree-tools {
  display: grid;
  gap: 8px;
}

.lx-dept-tree-search {
  width: 100%;
  min-width: 0;
}

.lx-dept-tree-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #7e8aa0;
  font-size: 12px;
}

.lx-dept-tree-list {
  display: grid;
  gap: 4px;
  align-content: start;
  max-height: calc(100vh - 340px);
  overflow: auto;
}

.lx-dept-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px 8px calc(10px + var(--dept-depth, 0) * 18px);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #24364c;
  text-align: left;
}

.lx-dept-node:hover {
  background: #f6f9ff;
}

.lx-dept-node.active {
  border-color: #c8dafd;
  background: #eef4ff;
}

.lx-dept-node-main,
.lx-dept-node-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lx-dept-node-main strong,
.lx-dept-node-main small,
.lx-dept-node-meta small,
.lx-dept-node-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lx-dept-node-main small,
.lx-dept-node-meta small {
  color: #7f8ca1;
  font-size: 11px;
}

.lx-dept-node-meta {
  justify-items: end;
}

.lx-dept-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0 8px;
}

.lx-dept-kpi {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  background: #fff;
}

.lx-dept-kpi span {
  color: #6e7c92;
  font-size: 12px;
}

.lx-dept-kpi strong {
  color: #23344c;
  font-size: 22px;
  line-height: 1;
}

.lx-dept-kpi small {
  color: #8a97ab;
  font-size: 12px;
  line-height: 1.45;
}

.lx-dept-main-head,
.lx-filter-bar,
.lx-pager {
  padding-left: 8px;
  padding-right: 8px;
}

.lx-dept-main-head {
  padding-top: 10px;
}

.lx-dept-main-actions,
.lx-dept-editor-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lx-dept-member-table {
  width: max(100%, 1440px);
}

.lx-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
}

.lx-pager-summary,
.lx-pager-state {
  color: #6d7a90;
  font-size: 12px;
}

.lx-pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lx-pager-controls select {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  background: #fff;
  color: #1f2f46;
  font-size: 12px;
}

.lx-dept-editor-head {
  align-items: center;
}

.lx-dept-editor-body {
  min-height: 560px;
}

.lx-dept-editor-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.lx-resource-tabs {
  border-bottom: 1px solid #e8edf4;
}

.lx-resource-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 470px;
}

.lx-resource-groups {
  border-right: 1px solid #e8edf4;
  background: #fbfcff;
}

.lx-resource-group-head {
  padding: 12px 14px 8px;
  color: #4f5f76;
  font-size: 12px;
  font-weight: 600;
}

.lx-resource-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-top: 1px solid #eef2f8;
  background: transparent;
  color: #283b52;
  font-size: 12px;
}

.lx-resource-group-item.active {
  background: #eef4ff;
  color: #2259c0;
  font-weight: 700;
}

.lx-resource-content {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 14px;
  min-width: 0;
}

.lx-resource-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}

.lx-resource-sections {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.lx-resource-section {
  border: 1px solid #e7edf5;
  border-radius: 10px;
  background: #fff;
}

.lx-resource-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f8;
}

.lx-resource-section header strong {
  font-size: 13px;
}

.lx-resource-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 12px;
}

.lx-resource-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: #24364c;
  font-size: 12px;
}

.lx-resource-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  min-width: 12px;
  margin: 2px 0 0;
  border: 1px solid #b7c3d6;
  border-radius: 2px;
  background: #fff;
  position: relative;
}

.lx-resource-check input[type="checkbox"]:checked {
  border-color: #2d6fdd;
  background: #2d6fdd;
}

.lx-resource-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.lx-resource-check-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lx-resource-check-copy strong,
.lx-resource-check-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lx-resource-check-copy small {
  color: #8a97ab;
}

.lx-dept-assign-dialog {
  width: min(1260px, calc(100vw - 48px));
}

.lx-modal-pager {
  padding-top: 10px;
  padding-bottom: 0;
}

@media (max-width: 1380px) {
  .lx-dept-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lx-resource-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .lx-dept-list-layout,
  .lx-resource-layout,
  .lx-editor-body,
  .lx-dept-editor-body {
    grid-template-columns: 1fr;
  }

  .lx-dept-tree-pane {
    border-right: none;
    border-bottom: 1px solid #e5eaf2;
  }

  .lx-resource-groups {
    border-right: none;
    border-bottom: 1px solid #e8edf4;
  }

  .lx-dept-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .lx-dept-summary,
  .lx-resource-check-grid {
    grid-template-columns: 1fr;
  }

  .lx-pager,
  .lx-editor-footer,
  .lx-dept-main-head,
  .lx-dept-tree-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .lx-dept-main-actions,
  .lx-dept-editor-head-actions,
  .lx-pager-controls {
    width: 100%;
    flex-wrap: wrap;
  }
}

.admin-console-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 220px);
}

.admin-console-shell-compact {
  gap: 14px;
}

.admin-console-shell-wide {
  grid-template-columns: minmax(0, 1.55fr) 360px;
}

.admin-console-shell-users {
  grid-template-columns: 1fr;
}

.admin-side-pane,
.admin-main-panel,
.admin-editor-pane,
.admin-main-pane {
  min-width: 0;
}

.admin-side-pane,
.admin-editor-pane {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-side-pane-compact {
  gap: 12px;
  padding: 14px;
}

.admin-main-pane {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.admin-main-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-side-head,
.admin-role-head,
.admin-panel-head,
.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-side-head h3,
.admin-role-head h3 {
  margin: 6px 0 0;
  font-size: 20px;
  line-height: 1.15;
}

.admin-role-head p,
.admin-panel-head span {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-search-field {
  margin: 0;
}

.admin-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-side-list,
.department-tree {
  display: grid;
  gap: 6px;
  align-content: start;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: 4px;
}

.admin-side-item,
.department-tree-node {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.admin-side-item span,
.department-tree-node span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-side-item small,
.department-tree-node strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-side-item:hover,
.department-tree-node:hover {
  background: #f6f9fc;
  border-color: var(--line);
}

.admin-side-item.active,
.department-tree-node.active {
  background: #eef4ff;
  border-color: rgba(45, 111, 221, 0.18);
  color: var(--primary-deep);
}

.department-tree-node {
  padding-left: calc(12px + var(--dept-depth, 0) * 18px);
}

.admin-side-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.admin-side-item-main strong {
  font-size: 13px;
  line-height: 1.3;
}

.admin-side-item-main small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.admin-side-item-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex-shrink: 0;
}

.admin-side-item-meta small,
.admin-side-item-meta strong {
  font-size: 11px;
}

.department-tree-node .admin-side-item-main strong {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
}

.department-tree-node .admin-side-item-meta strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-toolbar {
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-toolbar-copy {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.admin-toolbar-copy strong {
  font-size: 14px;
}

.admin-toolbar-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-toolbar-filters,
.admin-toolbar-actions,
.admin-toolbar-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-toolbar-filters input,
.admin-toolbar-filters select {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.admin-toolbar-filters input {
  min-width: 180px;
}

.admin-tab-btn {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.admin-tab-btn.active {
  border-color: rgba(45, 111, 221, 0.2);
  background: #eef4ff;
  color: var(--primary-deep);
}

.admin-tab-panel {
  display: none;
  gap: 14px;
  margin-top: 16px;
}

.admin-tab-panel.active {
  display: grid;
}

.admin-toolbar-sub {
  padding: 0;
  border: none;
  background: transparent;
}

.role-subtabbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-subtab-btn {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.role-subtab-btn.active {
  border-color: rgba(45, 111, 221, 0.2);
  background: #eef4ff;
  color: var(--primary-deep);
}

.role-data-panel {
  display: none;
  gap: 14px;
}

.role-data-panel.active {
  display: grid;
}

.role-data-scope {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.role-data-scope select[multiple] {
  min-height: 92px;
  padding: 6px 8px;
}

.role-radio-table th,
.role-radio-table td {
  text-align: center;
}

.role-radio-table th:first-child,
.role-radio-table td:first-child,
.role-radio-table th:nth-child(2),
.role-radio-table td:nth-child(2) {
  text-align: left;
}

.role-radio-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
}

.role-radio-cell input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-radio-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 52px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.role-radio-cell input[type="radio"]:checked + span {
  border-color: rgba(45, 111, 221, 0.22);
  background: #eef4ff;
  color: var(--primary-deep);
}

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

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

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

.admin-table-shell {
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

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

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 30, 49, 0.38);
}

.form-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(19, 31, 52, 0.18);
}

.form-modal-dialog-wide {
  width: min(1120px, calc(100vw - 48px));
}

body.modal-open {
  overflow: hidden;
}

.workspace-user-link {
  color: inherit;
  text-decoration: none;
}

.workspace-user-link:hover {
  color: var(--primary-deep);
}

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

.register-grid .field-wide,
.account-form-grid .field-wide {
  grid-column: 1 / -1;
}

.register-form textarea {
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: vertical;
  font: inherit;
  color: var(--text);
}

.account-panel {
  padding: 18px;
}

.account-panel-compact {
  padding: 14px 16px;
}

.account-center-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.account-hero-card,
.account-side-card {
  padding: 16px;
}

.account-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.account-access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

.account-form-grid-compact {
  gap: 12px;
}

.account-form-grid-compact .settings-field input,
.account-form-grid-compact .settings-field select {
  min-height: 36px;
  font-size: 13px;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  margin-bottom: 18px;
}

.account-profile-card,
.account-meta-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-alt);
}

.account-profile-card-compact {
  padding: 14px;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.account-profile-copy,
.account-meta-card {
  flex-direction: column;
  align-items: flex-start;
}

.account-profile-copy strong,
.account-meta-card strong {
  font-size: 18px;
}

.account-profile-copy span,
.account-profile-copy small,
.account-meta-card span,
.account-meta-card small {
  color: var(--muted);
}

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

.admin-table-wrap {
  max-height: calc(100vh - 340px);
  min-height: 220px;
  overflow: auto;
}

.admin-grid-table {
  width: max(100%, 1080px);
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-summary-grid-compact {
  margin-top: 0;
}

.admin-stat-card {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.admin-stat-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-stat-card strong {
  font-size: 18px;
  line-height: 1.1;
  color: var(--text-strong);
}

.admin-stat-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.admin-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
  margin-top: 14px;
}

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

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

.compact-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(143, 160, 182, 0.22);
}

.compact-meta-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.compact-meta-row span {
  color: var(--muted);
  font-size: 12px;
}

.compact-meta-row strong {
  color: var(--text-strong);
  font-size: 12px;
  text-align: right;
}

.compact-empty-text {
  color: var(--muted);
  font-size: 12px;
}

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

.compact-hint-list span {
  padding: 9px 10px;
  border: 1px dashed rgba(143, 160, 182, 0.24);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.admin-pathline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.admin-pathline span {
  color: var(--muted);
  font-size: 12px;
}

.admin-pathline strong {
  font-size: 12px;
  color: var(--text-strong);
  text-align: right;
}

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

.permission-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.permission-toggle:hover {
  border-color: rgba(45, 111, 221, 0.18);
  background: #fafcff;
}

.permission-toggle.active {
  border-color: rgba(45, 111, 221, 0.22);
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(45, 111, 221, 0.08);
}

.permission-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.permission-toggle-copy strong {
  font-size: 12px;
}

.permission-toggle-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.permission-toggle-state {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(143, 160, 182, 0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.permission-toggle.active .permission-toggle-state {
  background: rgba(45, 111, 221, 0.12);
  color: var(--primary-deep);
}

.table-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.mini-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.admin-console-shell .primary-btn,
.admin-console-shell .ghost-btn,
.admin-console-shell .danger-btn,
.form-modal .primary-btn,
.form-modal .ghost-btn,
.form-modal .danger-btn {
  min-height: 32px;
  padding: 0 12px;
  box-shadow: none;
}

.admin-console-shell .message-box,
.form-modal .message-box {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.admin-console-shell .settings-field > span,
.form-modal .settings-field > span {
  font-size: 12px;
}

.admin-console-shell .settings-field input,
.admin-console-shell .settings-field select,
.form-modal .settings-field input,
.form-modal .settings-field select {
  min-height: 36px;
  font-size: 13px;
}

.entity-tags-compact {
  gap: 6px;
}

.entity-tags-compact span {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.empty-block {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.selection-stage {
  display: grid;
  gap: 16px;
}

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

.selection-tabbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.selection-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.selection-tab.active {
  border-color: rgba(45, 111, 221, 0.28);
  background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
  color: var(--accent);
}

.selection-console .module-panel {
  display: none;
}

.selection-console .module-panel.active {
  display: grid;
  gap: 16px;
}

.status-pill.warning {
  background: rgba(255, 163, 26, 0.14);
  color: #c67700;
}

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

.settings-admin-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}

.settings-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-alt);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-card-head strong {
  display: block;
  font-size: 16px;
}

.settings-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.llm-compact-page {
  display: grid;
  gap: 14px;
}

.llm-compact-head {
  margin-bottom: 0;
}

.llm-settings-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.settings-tab-btn {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.settings-tab-btn.active {
  background: #fff;
  color: var(--primary-deep);
  box-shadow: 0 6px 14px rgba(31, 47, 70, 0.08);
}

.settings-tab-panel[hidden] {
  display: none !important;
}

.llm-compact-card {
  padding: 14px;
  border-radius: 8px;
}

.llm-provider-inline-form {
  display: grid;
  grid-template-columns: minmax(140px, 1.15fr) 96px minmax(132px, 1fr) minmax(190px, 1.4fr) minmax(160px, 1.15fr) 70px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.llm-provider-inline-form input,
.llm-provider-inline-form select {
  min-width: 0;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.llm-inline-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: var(--muted-strong);
}

.llm-inline-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2d6fdd;
}

.llm-table-host {
  min-width: 0;
}

.llm-table-wrap {
  border-radius: 8px;
}

.llm-provider-table,
.llm-binding-table {
  width: max(100%, 1120px);
}

.llm-provider-table {
  width: max(100%, 920px);
}

.llm-provider-table th,
.llm-provider-table td,
.llm-binding-table th,
.llm-binding-table td {
  padding: 8px;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
}

.llm-provider-table .table-input,
.llm-binding-table .table-input {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 12px;
}

.llm-prompt-input {
  width: 320px;
  min-height: 46px;
}

.llm-note-input {
  width: 220px;
  min-height: 40px;
}

.llm-table-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-strong);
  font-size: 12px;
  white-space: nowrap;
}

.llm-provider-table .table-input.field-empty {
  border-color: #f0c795;
  background: #fffbf4;
}

.llm-provider-table .table-input.field-empty::placeholder {
  color: #d38b2d;
  font-weight: 600;
  font-size: 11px;
}

.llm-provider-table .table-input.field-filled {
  border-color: #b8d8c0;
  background: #f6fdf7;
}

.llm-provider-table .table-input.field-filled::placeholder {
  color: #2f9e64;
  font-size: 11px;
}

.llm-binding-table td:first-child strong,
.llm-binding-table td:first-child small,
.llm-binding-table td:nth-child(4) small {
  display: block;
}

.llm-binding-table td:first-child small,
.llm-binding-table td:nth-child(4) small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.llm-provider-table .table-actions-cell,
.llm-binding-table .table-actions-cell {
  white-space: nowrap;
}

.settings-card-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.settings-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.settings-option-rich {
  align-items: flex-start;
}

.important-reference-panel,
.important-reference-detail-panel {
  display: grid;
  gap: 14px;
}

.important-reference-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.important-reference-tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.important-reference-tab-link:hover {
  border-color: rgba(45, 111, 221, 0.26);
  background: #f8fbff;
  color: var(--primary-deep);
}

.important-reference-tab-link.active {
  border-color: rgba(45, 111, 221, 0.3);
  background: #eef4ff;
  color: var(--primary-deep);
  box-shadow: inset 0 0 0 1px rgba(45, 111, 221, 0.06);
}

.important-reference-stat-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.important-reference-stat-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.4;
}

.important-reference-table {
  width: max(100%, 1440px);
}

.important-reference-table th,
.important-reference-table td {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.important-reference-table-wrap {
  max-width: 100%;
}

.important-reference-wrap-cell {
  white-space: normal !important;
}

.important-reference-group-cell {
  min-width: 200px;
  background: #f9fbff;
}

.important-reference-cell-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.important-reference-cell-stack strong,
.important-reference-cell-stack p,
.important-reference-cell-stack small {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.important-reference-cell-stack strong {
  font-size: 13px;
  line-height: 1.5;
}

.important-reference-cell-stack p,
.important-reference-cell-stack small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.important-reference-wrap-cell code {
  display: block;
  padding: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.important-reference-user-table,
.important-reference-asin-table {
  width: max(100%, 1560px);
}

.settings-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.settings-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-option-copy strong {
  font-size: 13px;
}

.settings-option-copy small {
  color: var(--muted);
  font-size: 12px;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-field {
  display: grid;
  gap: 8px;
}

.settings-field > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-strong);
}

.settings-field input,
.settings-field select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-strong);
  font-size: 14px;
}

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

.settings-checkline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted-strong);
}

.settings-entity-list {
  display: grid;
  gap: 10px;
}

.entity-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.entity-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.entity-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.entity-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entity-title-row strong {
  font-size: 15px;
}

.entity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(45, 111, 221, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.entity-badge.system {
  background: rgba(33, 160, 102, 0.12);
  color: #1f8c59;
}

.entity-badge.inactive {
  background: rgba(222, 90, 90, 0.12);
  color: #d14e4e;
}

.entity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entity-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.entity-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.settings-field textarea,
.finance-builder-table input,
.finance-builder-table select,
.finance-builder-table textarea,
.finance-dynamic-table input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-strong);
  font: inherit;
}

.settings-field textarea {
  resize: vertical;
}

.finance-stage {
  display: grid;
  gap: 16px;
}

.finance-hero-panel,
.finance-workspace-panel {
  display: grid;
  gap: 16px;
}

.finance-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-console .module-panel.active {
  display: grid;
  gap: 16px;
}

.finance-request-form {
  gap: 16px;
}

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

.finance-schema-card {
  gap: 12px;
}

.finance-dynamic-fields {
  display: grid;
  gap: 14px;
}

.finance-dynamic-section {
  gap: 12px;
}

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

.finance-dynamic-grid .field-wide,
.finance-dynamic-grid .finance-table-field {
  grid-column: 1 / -1;
}

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

.finance-required {
  margin-left: 4px;
  color: #d14e4e;
  font-style: normal;
}

.finance-inner-table-wrap {
  padding-bottom: 4px;
}

.finance-dynamic-table {
  width: max(100%, 760px);
}

.finance-form-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.finance-config-shell {
  min-height: auto;
}

.finance-builder-table {
  width: max(100%, 1240px);
}

.finance-builder-table th,
.finance-builder-table td {
  vertical-align: top;
}

.finance-check-cell {
  text-align: center;
}

.finance-check-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 12px;
}

.finance-static-approver {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.finance-tabbar .selection-tab {
  cursor: pointer;
}

.finance-tabbar button.selection-tab {
  font: inherit;
}

.ghost-btn.danger {
  color: #c94f4f;
}

.sales-table {
  width: max(100%, 1220px);
}

.sales-table th:nth-child(8),
.sales-table td:nth-child(8),
.sales-table th:nth-child(9),
.sales-table td:nth-child(9),
.sales-table th:nth-child(10),
.sales-table td:nth-child(10) {
  min-width: 140px;
  white-space: normal;
}

.ranking-table-wrap {
  max-width: 100%;
}

.sales-query-panel,
.report-filter-panel,
.cockpit-filter-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.sales-hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.06fr) minmax(0, 0.94fr);
  gap: 16px;
}

.sales-amount-card {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(45, 111, 221, 0.18);
  background:
    linear-gradient(135deg, rgba(45, 111, 221, 1) 0%, rgba(79, 146, 255, 1) 100%);
  color: #fff;
  box-shadow: 0 18px 32px rgba(47, 111, 221, 0.16);
}

.sales-amount-card .section-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.sales-amount-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.sales-amount-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.sales-amount-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.65;
}

.currency-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.empty-cell {
  text-align: center !important;
  color: var(--muted);
  padding: 24px !important;
}

.empty-block {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 1420px) {
  .cockpit-kpi-grid,
  .dashboard-insight-grid,
  .report-summary-grid,
  .ai-scope-grid,
  .ai-summary-grid,
  .report-ai-diagnostics,
  .report-ai-rankings {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .trend-metric-grid,
  .sales-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-filter-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .logistics-summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logistics-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .logistics-search-field {
    grid-column: 1 / -1;
  }
}

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

  .toolbar-message {
    flex-basis: 100%;
    min-width: 100%;
    margin-left: 0;
  }

  .toolbar-inline-store,
  .date-range-picker,
  .toolbar-select-btn,
  .toolbar-inline-field input,
  .toolbar-inline-field select {
    min-width: 0;
  }

  .dimension-grid,
  .layout-two,
  .dashboard-hero-grid,
  .dashboard-insight-grid,
  .dashboard-main-grid,
  .dashboard-bottom-grid,
  .home-module-grid,
  .home-todo-grid,
  .sales-hero-grid,
  .two-col-grid,
  .ai-report-hero-grid,
  .settings-admin-grid,
  .settings-layout,
  .settings-option-grid,
  .admin-summary-grid,
  .account-center-grid,
  .account-access-grid,
  .admin-info-grid,
  .permission-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero-grid-single,
  .dashboard-bi-hero-grid,
  .dashboard-main-grid-single {
    grid-template-columns: 1fr;
  }

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

  .field-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .logistics-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .page-toolbar,
  .section-head,
  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-description {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .report-ai-drawer {
    grid-template-columns: 1fr;
  }

  .store-company-principles,
  .stores-overview-grid {
    grid-template-columns: 1fr;
  }

  .brands-overview-grid,
  .brand-compliance-overview-grid {
    grid-template-columns: 1fr;
  }

  .report-ai-drawer-panel {
    padding: 18px 16px 28px;
  }

  .ai-summary-pending-top {
    align-items: flex-start;
  }

  .ai-summary-grid,
  .report-ai-diagnostics,
  .report-ai-rankings {
    grid-template-columns: 1fr;
  }

  .app-shell-erp {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .workspace-bar {
    padding: 0 12px;
  }

  .secondary-rail-overlay {
    inset: 0 auto 0 70px;
    width: 150px;
  }

  .secondary-rail {
    width: 142px;
  }

  .workspace-status-message {
    display: none;
  }

  .content-shell {
    padding: 12px;
  }

  .page-toolbar-copy {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-grid,
  .cockpit-kpi-grid,
  .report-summary-grid,
  .dashboard-hero-grid,
  .dashboard-insight-grid,
  .dashboard-main-grid,
  .dashboard-bottom-grid,
  .logistics-summary-row,
  .selection-summary-grid,
  .trend-metric-grid,
  .replenishment-content-grid,
  .replenishment-module-grid,
  .home-module-grid,
  .home-todo-grid,
  .dimension-grid,
  .layout-two,
  .sales-hero-grid,
  .ai-report-hero-grid,
  .ai-report-chip-grid,
  .sales-meta-grid,
  .two-col-grid,
  .finance-stat-grid,
  .finance-core-grid,
  .finance-dynamic-grid,
  .settings-admin-grid,
  .settings-layout,
  .admin-summary-grid,
  .admin-metric-strip,
  .account-center-grid,
  .account-access-grid,
  .admin-info-grid,
  .permission-toggle-grid,
  .settings-option-grid,
  .selection-toolbar,
  .selection-detail-layout,
  .selection-detail-grid,
  .field-filter-grid,
  .logistics-filter-grid {
    grid-template-columns: 1fr;
  }

  .settings-inline-fields,
  .entity-card {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .dashboard-summary-metrics,
  .dashboard-module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-decision-item,
  .dashboard-ranked-item {
    grid-template-columns: 1fr;
  }

  .dashboard-ranked-metrics {
    justify-content: flex-start;
  }

  .chart-svg {
    height: 280px;
  }

  .chart-caption-row {
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  }

  .admin-side-item,
  .department-tree-node,
  .account-hero-head,
  .compact-meta-row,
  .admin-pathline,
  .dashboard-hero-head,
  .dashboard-action-box-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-side-item-meta {
    justify-items: start;
  }

  .entity-actions {
    justify-content: flex-start;
  }

  .toolbar-inline-field {
    width: 100%;
  }

  .report-stage {
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .report-ai-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-ai-drawer {
    grid-template-columns: 1fr;
  }

  .report-ai-drawer-backdrop {
    display: none;
  }

  .report-ai-drawer-panel {
    width: 100%;
    border-left: none;
    box-shadow: none;
  }

  .report-ai-summary-meta {
    justify-content: stretch;
  }

  .ai-summary-status {
    width: 100%;
  }

  .report-ai-summary-head p {
    max-width: none;
    text-align: left;
  }

  .logistics-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-report-action-row,
  .ai-report-output-block > header,
  .ai-report-action-head {
    flex-direction: column;
    align-items: stretch;
  }

  .report-table-wrap {
    height: auto;
    min-height: 420px;
  }

  .toolbar-inline-field input,
  .toolbar-inline-field select,
  .date-range-trigger,
  .toolbar-select-btn,
  .store-dropdown,
  .toolbar-inline-store {
    width: 100%;
  }

  .forecast-toolbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .date-range-popover {
    grid-template-columns: 1fr;
    width: min(100vw - 110px, 420px);
  }

  .date-range-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: none;
    border-bottom: 1px solid #e4edf7;
  }

  .store-dropdown-panel {
    width: min(100vw - 110px, 340px);
  }

  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-stage-split {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-copy-split {
    min-height: 520px;
    padding: 26px 28px 30px;
  }

  .login-slogan-grid {
    margin-top: 40px;
  }

  .login-panel {
    min-height: auto;
    padding: 28px 24px 30px;
  }

}

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

  .side-rail {
    position: static;
    height: auto;
    grid-template-rows: none;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 10px 12px;
  }

  .side-menu {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 8px;
    gap: 6px;
  }

  .side-menu::-webkit-scrollbar {
    display: none;
  }

  .side-link {
    min-width: 56px;
    min-height: 42px;
  }

  .secondary-rail-overlay {
    position: static;
    inset: auto;
    width: 100%;
    pointer-events: auto;
  }

  .secondary-rail {
    position: static;
    width: auto;
    max-height: none;
    margin: 0 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    transform: none;
    opacity: 1;
    box-shadow: var(--shadow);
  }

  .secondary-group + .secondary-group {
    margin-top: 18px;
  }

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

  .workspace-bar {
    flex-wrap: wrap;
    gap: 8px;
    min-height: auto;
    padding: 8px 12px;
  }

  .workspace-user {
    width: 100%;
    justify-content: flex-end;
  }

  .workspace-mini-link {
    margin-right: auto;
  }

  .page-toolbar-actions,
  .filter-actions,
  .connector-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .message-box {
    flex-basis: 100%;
  }

  .column-settings-panel {
    width: min(100vw - 120px, 420px);
  }

  .column-settings-list,
  .metric-settings-list {
    grid-template-columns: 1fr;
  }

  .login-shell {
    width: min(100%, calc(100% - 24px));
    padding: 20px 0;
  }

  .login-copy,
  .login-card,
  .panel,
  .page-toolbar {
    border-radius: 14px;
  }

  .login-shell-split {
    width: 100%;
    padding: 0;
  }

  .login-copy-split,
  .login-card-split {
    border-radius: 0;
  }

  .login-copy-split {
    min-height: 420px;
    padding: 24px 20px 26px;
  }

  .login-brand-row {
    font-size: 21px;
  }

  .login-slogan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    font-size: clamp(24px, 8.8vw, 34px);
  }

  .login-copy-lead {
    max-width: none;
    margin-top: 22px;
  }

  .login-visual {
    min-height: 280px;
    margin-top: 12px;
  }

  .login-visual-screen-frame {
    left: 6%;
    bottom: 26%;
    width: 206px;
    height: 164px;
  }

  .login-visual-screen {
    left: 13%;
    bottom: 23%;
    width: 220px;
    height: 176px;
  }

  .login-screen-bars {
    left: 22px;
    bottom: 24px;
    width: 82px;
    height: 92px;
    gap: 10px;
  }

  .login-screen-pie {
    top: 22px;
    right: 24px;
    width: 60px;
    height: 60px;
  }

  .login-screen-lines {
    right: 22px;
    bottom: 22px;
    width: 88px;
    gap: 9px;
  }

  .login-visual-console {
    left: 60%;
    width: 68px;
    height: 132px;
  }

  .login-panel {
    padding: 20px 18px 24px;
  }

  .login-card-split {
    width: 100%;
  }

  .login-card-head-split h2 {
    font-size: 32px;
  }
}

/* 首页极速加载骨架态 */
.dashboard-loading-block {
  position: relative;
  overflow: hidden;
}
.dashboard-loading-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: dashboard-loading-shimmer 1.35s infinite;
  pointer-events: none;
}
@keyframes dashboard-loading-shimmer {
  100% { transform: translateX(100%); }
}

/* 20260426-lx-shell-final：按领星风格优化首页标签栏与一级栏目衔接 */
.erp-body {
  --erp-rail-width: 74px;
  --erp-topbar-height: 42px;
  background: #eef2f7;
}

.app-shell-erp {
  grid-template-columns: var(--erp-rail-width) minmax(0, 1fr);
  background: #eef2f7;
}

.side-rail {
  z-index: 35;
  padding: 8px 5px 12px;
  background: linear-gradient(180deg, #202837 0%, #252d3a 42%, #202837 100%);
  border-right: none;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.rail-brand {
  width: 64px;
  height: var(--erp-topbar-height);
}

.rail-brand-logo {
  width: 60px;
  max-height: 28px;
}

.side-menu {
  gap: 2px;
  padding-top: 4px;
}

.side-link {
  position: relative;
  min-height: 58px;
  border-radius: 10px;
  color: #a9b3c5;
}

.side-link:hover,
.side-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.side-link.active::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #4f92ff;
}

.workspace-shell {
  background: #eef2f7;
}

.workspace-bar {
  min-height: var(--erp-topbar-height);
  padding: 0 12px 0 0;
  background: #252d3a;
  box-shadow: none;
}

.workspace-tabbar {
  min-height: var(--erp-topbar-height);
  padding: 0 8px 0 12px;
}

.workspace-history-tab {
  min-height: 32px;
  margin-top: 6px;
  padding: 0 18px;
  border-radius: 8px 8px 0 0;
  color: rgba(238, 243, 250, 0.78);
  font-size: 12px;
  font-weight: 500;
}

.workspace-history-tab:not(.active):hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.workspace-history-tab.active {
  background: #eef2f7;
  color: #1f2937;
  font-weight: 700;
}

.workspace-history-tab.active::before,
.workspace-history-tab.active::after {
  content: none;
  display: none;
}

.workspace-history-tab.active::before {
  display: none;
}

.workspace-history-tab.active::after {
  display: none;
}

.workspace-history-close {
  color: #8d99aa;
}

.workspace-history-tab.active .workspace-history-close {
  color: #9aa5b6;
}

.workspace-tabbar-add {
  min-height: 32px;
  margin-top: 6px;
  color: rgba(238, 243, 250, 0.86);
}

.workspace-user {
  min-height: var(--erp-topbar-height);
  color: #d8e0ec;
}

.workspace-mini-link {
  color: #c6cfdd;
}

.workspace-mini-link:hover,
.workspace-mini-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace-user-avatar {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.workspace-user-copy small {
  color: #aeb8c8;
}

.workspace-user-link:hover {
  color: #ffffff;
}

.toolbar-logout {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8edf5;
}

.toolbar-logout:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.content-shell {
  padding: 14px 18px 18px;
  background: #eef2f7;
}

.secondary-rail-overlay {
  inset: 0 auto 0 var(--erp-rail-width);
  width: 160px;
}

.secondary-rail {
  top: 0;
  width: 152px;
  height: 100vh;
  padding: 12px 0;
  background: #ffffff;
  border-right: 1px solid #e7edf5;
  box-shadow: 12px 0 24px rgba(31, 45, 66, 0.08);
}

.secondary-rail-scroll {
  padding: 6px 10px 18px;
}

.secondary-group h3 {
  margin-bottom: 8px;
  padding-left: 10px;
  color: #98a5b8;
  font-size: 11px;
}

.secondary-link {
  min-height: 32px;
  border-radius: 6px;
  color: #4b5565;
}

.secondary-link span {
  padding-left: 8px;
}

.secondary-link:hover,
.secondary-link.active {
  background: #eef4ff;
  color: #1d63f0;
  font-weight: 700;
}

@media (max-width: 900px) {
  .erp-body { --erp-rail-width: 60px; }
  .workspace-bar { padding-right: 10px; }
  .content-shell { padding: 12px; }
  .secondary-rail-overlay { left: var(--erp-rail-width); }
}

@media (max-width: 720px) {
  .side-rail { border-right: none; }
  .workspace-bar { padding: 8px 12px; }
  .workspace-history-tab.active::before,
  .workspace-history-tab.active::after { display: none; }
  .content-shell { padding: 12px; }
  .secondary-rail-overlay { inset: auto; width: 100%; }
  .secondary-rail { height: auto; width: auto; }
}

/* Lingxing shell polish: top tabbar / first-level rail connection */
.erp-body {
  --erp-rail-width: 76px;
  background: #f3f5f8;
}

.erp-body .app-shell-erp {
  background: #f3f5f8;
}

.erp-body .side-rail,
.erp-body .workspace-bar {
  background: #252d3a;
}

.erp-body .side-rail {
  z-index: 35;
  padding-top: 8px;
  border-right: none;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.erp-body .rail-brand {
  height: 42px;
  margin-bottom: 4px;
}

.erp-body .side-menu {
  gap: 2px;
}

.erp-body .side-link {
  min-height: 58px;
  border-radius: 0;
  color: rgba(221, 228, 238, 0.72);
}

.erp-body .side-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
}

.erp-body .side-link.active {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.erp-body .side-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #4f92ff;
}

.erp-body .workspace-shell {
  background: #f3f5f8;
}

.erp-body .workspace-bar {
  min-height: 40px;
  padding-right: 12px;
  box-shadow: none;
}

.erp-body .workspace-tabbar {
  min-height: 40px;
  padding-left: 0;
  align-items: flex-end;
}

.erp-body .workspace-history-tab {
  min-height: 32px;
  margin-top: 8px;
  padding: 0 18px;
  border-radius: 8px 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.erp-body .workspace-history-tab:not(.active):hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
}

.erp-body .workspace-history-tab.active {
  background: #f3f5f8;
  color: #1f2f46;
  font-weight: 700;
}

.erp-body .workspace-history-tab.active::after {
  content: none;
  display: none;
}

.erp-body .workspace-tabbar-add {
  min-height: 32px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.erp-body .content-shell {
  padding: 14px 18px 18px;
  background: #f3f5f8;
}

.erp-body .secondary-rail-overlay {
  inset: 0 auto 0 var(--erp-rail-width);
  z-index: 32;
}

.erp-body .secondary-rail {
  height: 100vh;
  max-height: 100vh;
  padding: 12px 0 18px;
  border-right: 1px solid #e4e9f1;
  border-radius: 0 0 12px 0;
  box-shadow: 10px 10px 26px rgba(17, 30, 53, 0.08);
}

.erp-body .secondary-rail-scroll {
  padding-top: 6px;
}

.erp-body .workspace-user,
.erp-body .workspace-user-copy strong,
.erp-body .workspace-user-copy small,
.erp-body .workspace-mini-link {
  color: rgba(255, 255, 255, 0.78);
}

.erp-body .workspace-mini-link:hover,
.erp-body .workspace-mini-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.erp-body .workspace-user-avatar {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.erp-body .toolbar-logout {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
}

.erp-body .toolbar-logout:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
