:root {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: #14213d;
  background:
    radial-gradient(circle at top left, rgba(22, 119, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 24%),
    linear-gradient(180deg, #f5f9ff 0%, #eaf2ff 100%);
}

/* First-round ERP layout adjustments: dense, neutral, and stable for daily use. */
.jsh-shell {
  background: #f4f6f8;
}

.jsh-sider {
  width: 104px;
  background: #0f6fc5;
}

.brand-mark {
  min-height: 76px;
  padding: 14px 10px;
}

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

.brand-mark span {
  font-size: 11px;
  line-height: 1.35;
}

.group-nav-item {
  min-height: 60px;
  font-size: 14px;
}

.group-nav-label {
  font-size: 14px;
}

.mega-panel {
  left: 104px;
  width: min(920px, calc(100vw - 124px));
  padding: 16px;
  background: #fff;
  border: 1px solid #d9e0e8;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.14);
}

.mega-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #edf0f3;
}

.mega-col-title {
  font-size: 14px;
  color: #667085;
}

.mega-item {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 14px;
  border-radius: 4px;
}

.top-tabs {
  height: 38px;
  padding: 4px 12px 0;
  background: #fff;
  border-bottom: 1px solid #e4e7ec;
}

.top-tab-item,
.top-tab-home {
  height: 30px;
  border-radius: 4px 4px 0 0;
}

.top-tab-item {
  min-width: 112px;
  max-width: 210px;
  padding: 0 9px;
}

.top-tab-pin {
  margin-right: 5px;
  color: #1677ff;
  font-size: 8px;
}

.jsh-header {
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #e4e7ec;
}

.jsh-header-title .ant-typography {
  font-size: 16px;
}

.jsh-user-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  color: #344054;
}

.jsh-content {
  padding: 18px;
  background: #f4f6f8;
}

.page-shell {
  width: 100%;
  min-width: 0;
}

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

.page-header-copy h1 {
  margin: 0;
  color: #1d2939;
  font-size: 22px;
  line-height: 1.35;
}

.page-header-subtitle {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.page-header-extra {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-action-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 7px 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(8px);
}

@media (max-width: 960px) {
  .jsh-sider {
    width: 82px;
  }

  .mega-panel {
    left: 82px;
    width: calc(100vw - 94px);
  }

  .jsh-content {
    padding: 12px;
  }

  .page-header,
  .sticky-action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header-extra {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.dash-todo-card {
  margin-top: 14px;
}

.dash-todo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

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

.dash-todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #eaecf0;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-todo-item:hover {
  border-color: #b2ddff;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

.dash-todo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
}

.dash-todo-icon.orange { color: #b54708; background: #ffead5; }
.dash-todo-icon.blue { color: #175cd3; background: #d1e9ff; }
.dash-todo-icon.red { color: #b42318; background: #fee4e2; }
.dash-todo-icon.green { color: #027a48; background: #d1fadf; }

.dash-todo-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-todo-copy strong {
  color: #101828;
  font-size: 20px;
  line-height: 1.1;
}

.dash-todo-copy span {
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

@media (max-width: 560px) {
  .dash-todo-grid { grid-template-columns: 1fr; }
}

.route-loading {
  display: grid;
  min-height: 240px;
  place-items: center;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

.icp-footer {
  padding: 18px 12px 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

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

.jsh-shell {
  position: relative;
  background: #f3f6fb;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
}

.jsh-sider {
  width: 118px;
  min-height: 100vh;
  background: linear-gradient(180deg, #0a70d4 0%, #12a3e8 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  position: relative;
  z-index: 12;
}

.group-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0 14px;
}

.group-nav-item {
  border: 0;
  background: transparent;
  color: #f3f9ff;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.group-nav-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.group-nav-item.active {
  background: rgba(5, 24, 55, 0.26);
}

.group-nav-icon {
  font-size: 24px;
  line-height: 1;
}

.group-nav-label {
  font-size: 16px;
  letter-spacing: 0.08em;
}

.mega-panel {
  position: fixed;
  left: 118px;
  width: min(1080px, calc(100vw - 138px));
  background: #fff;
  border: 1px solid #dbe4f0;
  border-top: 3px solid #1890ff;
  box-shadow: 0 18px 45px rgba(20, 33, 61, 0.18);
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 0;
  z-index: 40;
}

.mega-col {
  border-right: 1px solid #eef3fa;
  padding: 18px 20px 20px;
}

.mega-col:last-child {
  border-right: 0;
}

.mega-col-title {
  font-size: 20px;
  font-weight: 700;
  color: #4b5d74;
  margin-bottom: 12px;
}

.mega-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 0;
  font-size: 17px;
  color: #1f2c3f;
  cursor: pointer;
  line-height: 1.2;
}

.mega-item:hover {
  color: #1784dd;
}

.jsh-main {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

.top-tabs {
  height: 42px;
  background: #eef1f5;
  border-bottom: 1px solid #d9dde4;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.top-tab-home {
  width: 44px;
  height: 42px;
  border: 0;
  border-right: 1px solid #d9dde4;
  background: #edf1f5;
  color: #5b6778;
  cursor: pointer;
}

.top-tab-home.active {
  background: #ffffff;
}

.top-tab-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  flex: 1;
}

.top-tab-item {
  height: 42px;
  border: 0;
  border-right: 1px solid #d9dde4;
  background: #eef1f5;
  color: #3d4958;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.top-tab-item.active {
  background: #ffffff;
  font-weight: 600;
}

.top-tab-title {
  font-size: 14px;
}

.top-tab-close {
  font-size: 11px;
  color: #8a95a3;
}

.top-tab-close:hover {
  color: #1677ff;
}

.jsh-header {
  background: rgba(240, 247, 255, 0.88);
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
  padding: 0 24px;
}

.jsh-content {
  padding: 24px;
}

.brand-mark {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px 12px;
  color: #f5f5f4;
}

.brand-mark strong {
  font-size: 19px;
  letter-spacing: 0.04em;
}

.brand-mark span {
  color: rgba(245, 245, 244, 0.72);
  font-size: 12px;
}

.page-card {
  background: rgba(250, 253, 255, 0.9);
  border: 1px solid rgba(20, 33, 61, 0.08);
  box-shadow: 0 18px 45px rgba(20, 33, 61, 0.08);
  backdrop-filter: blur(12px);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(560px, 1.08fr) minmax(420px, 0.92fr);
  background:
    radial-gradient(circle at 82% 14%, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(120deg, #f8fafc 0%, #eef5ff 100%);
}

.login-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(150deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 64, 175, 0.95) 58%, rgba(29, 78, 216, 0.92) 100%);
  color: #f8fafc;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(130deg, rgba(0, 0, 0, 0.8), transparent 70%);
  pointer-events: none;
}

.login-brand,
.login-metrics {
  position: relative;
  z-index: 1;
}

.login-brand {
  max-width: 680px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-version {
  display: block;
  margin-bottom: 14px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 13px;
}

.login-hero h1 {
  max-width: 640px;
  margin: 0 0 18px;
  font-size: 52px;
  line-height: 1.08;
  font-weight: 800;
}

.login-hero p {
  max-width: 520px;
  color: rgba(226, 232, 240, 0.84);
  font-size: 16px;
  line-height: 1.75;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.login-metrics > div {
  min-height: 112px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-metrics .anticon {
  color: #bfdbfe;
  font-size: 22px;
}

.login-metrics span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
}

.login-metrics strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.login-panel {
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(440px, 100%);
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.login-card-head h2 {
  margin: 4px 0 8px !important;
  color: #0f172a;
  font-size: 30px !important;
  line-height: 1.2 !important;
}

.login-card-eyebrow {
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-form .ant-form-item {
  margin-bottom: 18px;
}

.login-form .ant-input-affix-wrapper,
.login-form .ant-input {
  border-radius: 8px;
}

.login-submit {
  height: 44px;
  margin-top: 4px;
  border-radius: 8px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-panel {
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.82));
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.stat-panel h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #57534e;
  font-weight: 600;
}

.stat-panel strong {
  display: block;
  font-size: 30px;
  color: #0f172a;
}

.toolbar-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-row > * {
  min-width: 180px;
}

.list-toolbar-sticky {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.96), rgba(250, 253, 255, 0.84));
  backdrop-filter: blur(6px);
}

.sales-order-meta-grid > .ant-form-item:last-child {
  display: none;
}

.debt-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.debt-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.debt-stat-grid .ant-statistic {
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.debt-treemap {
  position: relative;
  width: 100%;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.debt-treemap-cell {
  position: absolute;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 10px;
  border: 2px solid #ffffff;
  color: #ffffff;
  overflow: hidden;
}

.debt-treemap-cell strong,
.debt-treemap-cell span,
.debt-treemap-cell em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
}

.debt-treemap-cell strong {
  font-size: 15px;
}

.debt-treemap-cell span {
  font-size: 13px;
}

.debt-treemap-cell em {
  font-size: 12px;
  font-style: normal;
  opacity: 0.86;
}

.debt-row-high > td {
  background: #fff1f0 !important;
}

.debt-row-medium > td {
  background: #fffbe6 !important;
}

.json-block {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
  max-height: 65vh;
}

.mall-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(22, 119, 255, 0.2), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.16), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eaf2ff 100%);
}

.mall-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: auto;
  line-height: normal;
  padding: 18px 28px;
  background: rgba(247, 251, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.mall-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mall-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.mall-brand strong {
  font-size: 22px;
}

.mall-brand span {
  font-size: 12px;
  color: #475569;
}

.mall-page-title-row,
.mall-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mall-nav {
  flex: 1;
  min-width: 220px;
  background: transparent;
  border-bottom: none;
}

.mall-page {
  padding: 28px 32px 36px;
}

.mall-hero {
  margin-bottom: 24px;
  padding: 36px 32px;
  border-radius: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  background:
    radial-gradient(circle at right top, rgba(30, 64, 175, 0.2), transparent 24%),
    linear-gradient(135deg, rgba(22, 119, 255, 0.16), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.mall-hero-copy {
  max-width: 720px;
}

.mall-hero-copy h1 {
  margin-bottom: 12px;
}

.mall-eyebrow {
  letter-spacing: 0.18em;
  color: #1677ff;
  font-weight: 700;
}

.mall-hero-actions {
  display: flex;
  justify-content: flex-end;
  width: min(420px, 42%);
  min-width: 260px;
}

.mall-home-carousel {
  width: 100%;
}

.mall-home-banner {
  position: relative;
  display: block;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: #0f172a;
  cursor: pointer;
  text-align: left;
}

.mall-home-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.mall-home-banner span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.5);
}

.mall-login-page {
  min-height: 100vh;
  padding: 28px clamp(20px, 5vw, 72px);
  background:
    radial-gradient(circle at 8% 12%, rgba(22, 119, 255, 0.2), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #eaf2ff 100%);
}

.mall-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.mall-login-brand .anticon {
  color: #1677ff;
  font-size: 24px;
}

.mall-login-hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
}

.mall-login-copy {
  max-width: 680px;
}

.mall-login-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.mall-login-copy .ant-typography {
  font-size: 17px;
  color: #475569;
}

.mall-welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
  max-width: 780px;
}

.mall-welcome-grid > div {
  min-height: 150px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mall-welcome-grid .anticon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 119, 255, 0.12);
  color: #1677ff;
  font-size: 20px;
}

.mall-welcome-grid strong {
  font-size: 16px;
  color: #0f172a;
}

.mall-welcome-grid span {
  color: #64748b;
  line-height: 1.7;
}

.mall-login-card {
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

.mall-admin-shell {
  min-height: 100vh;
  background: #f6f8fb;
}

.mall-admin-sider {
  background:
    linear-gradient(180deg, #111827 0%, #0f172a 58%, #111827 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.12);
}

.mall-admin-brand {
  padding: 28px 18px 22px;
  color: #f8fafc;
}

.mall-admin-brand strong {
  display: block;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0;
}

.mall-admin-brand span {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 13px;
}

.mall-admin-menu {
  background: transparent;
  color: #cbd5e1;
  border-inline-end: 0 !important;
  padding: 0 10px;
}

.mall-admin-menu .ant-menu-item {
  height: 42px;
  line-height: 42px;
  margin: 4px 0;
  width: 100%;
  border-radius: 8px;
  color: #cbd5e1;
}

.mall-admin-menu .ant-menu-item .anticon {
  color: #94a3b8;
  font-size: 16px;
}

.mall-admin-menu .ant-menu-item:hover {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #ffffff !important;
}

.mall-admin-menu .ant-menu-item:hover .anticon {
  color: #bbf7d0;
}

.mall-admin-menu .ant-menu-item-selected {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.24);
}

.mall-admin-menu .ant-menu-item-selected .anticon {
  color: #ffffff;
}

.mall-admin-erp-link {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  width: calc(100% - 36px);
  height: 40px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.42);
  color: #e2e8f0;
}

.mall-admin-erp-link:hover {
  border-color: rgba(34, 197, 94, 0.72) !important;
  background: rgba(22, 163, 74, 0.14) !important;
  color: #ffffff !important;
}

.mall-admin-header {
  height: auto;
  min-height: 82px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.mall-admin-content {
  padding: 24px;
}

.mall-admin-entry-card {
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.mall-admin-entry-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #dcfce7;
  color: #15803d;
  font-size: 22px;
}

.mall-admin-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.mall-admin-metric-card {
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.mall-admin-metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1;
  color: #111827;
}

.mall-admin-todo-row {
  width: 100%;
  min-height: 34px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
  cursor: pointer;
  text-align: left;
}

.mall-admin-todo-row:hover {
  border-color: #1677ff;
  background: #f8fbff;
}

.mall-admin-todo-row span,
.mall-ranking-row strong,
.mall-ranking-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mall-trend-grid {
  min-height: 280px;
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.mall-trend-item {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: 6px;
  text-align: center;
}

.mall-trend-bars {
  min-height: 160px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  align-items: end;
  padding: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 6px;
}

.mall-trend-bars i {
  display: block;
  border-radius: 4px 4px 0 0;
}

.mall-trend-bars .sales,
.mall-chart-legend .sales {
  background: #1677ff;
}

.mall-trend-bars .refund,
.mall-chart-legend .refund {
  background: #f97316;
}

.mall-trend-bars .count,
.mall-chart-legend .count {
  background: #16a34a;
}

.mall-trend-item span {
  color: #6b7280;
}

.mall-trend-item strong {
  font-size: 13px;
}

.mall-trend-item em {
  font-size: 12px;
  color: #6b7280;
  font-style: normal;
}

.mall-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  color: #6b7280;
}

.mall-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mall-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.mall-ranking-row {
  display: grid;
  grid-template-columns: 26px minmax(140px, 1fr) minmax(120px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
}

.mall-ranking-row > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef2ff;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.mall-ranking-row div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mall-ranking-row em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.mall-ranking-row > i {
  height: 8px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.mall-ranking-row > i b {
  display: block;
  height: 100%;
  background: #16a34a;
}

.mall-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mall-product-card {
  height: 100%;
  border: 1px solid rgba(20, 33, 61, 0.08);
  box-shadow: 0 14px 40px rgba(20, 33, 61, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.mall-product-card .ant-card-body {
  min-height: 260px;
}

.mall-product-buy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: end;
  gap: 12px;
}

.mall-product-cover,
.mall-product-fallback {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.mall-category-card {
  height: 100%;
}

.mall-detail-cover img,
.mall-detail-cover {
  border-radius: 18px;
}

.mall-detail-gallery .ant-card-body {
  padding: 14px;
}

.mall-detail-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mall-detail-thumb img,
.mall-detail-thumb {
  border-radius: 10px;
  object-fit: cover;
}

.mall-detail-price-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(150px, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.92), rgba(255, 255, 255, 0.9));
}

.mall-related-card {
  height: 100%;
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.mall-related-cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.mall-product-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1677ff, #1d4ed8);
}

.mall-cart-summary {
  position: sticky;
  top: 104px;
}

.dash-head-card,
.dash-metric-card,
.dash-chart-card {
  background: #f7f8fa;
  border: 1px solid #e4e7ee;
  box-shadow: none;
}

.dash-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

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

.dash-metric-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-metric-title {
  font-size: 32px;
  font-weight: 600;
  color: #43566d;
}

.dash-metric-value {
  font-size: 46px;
  font-weight: 500;
  line-height: 1.1;
  color: #43566d;
  margin-top: 12px;
}

.dash-metric-sub {
  margin-top: 8px;
  font-size: 18px;
  color: #6b7a8d;
}

.dash-quick-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}

.dash-quick-card {
  border: 1px solid #e4e7ee;
  background: #f7f8fa;
  min-height: 126px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.dash-quick-card:hover {
  border-color: #91caff;
  transform: translateY(-1px);
}

.dash-quick-icon {
  font-size: 40px;
}

.dash-quick-label {
  font-size: 28px;
}

.dash-quick-card.c1,
.dash-quick-card.c2 {
  color: #1677ff;
}

.dash-quick-card.c3,
.dash-quick-card.c4 {
  color: #16b364;
}

.dash-quick-card.c5,
.dash-quick-card.c6 {
  color: #f97316;
}

.dash-chart-card {
  margin-top: 10px;
}

.dash-chart-card-v2 {
  overflow: hidden;
}

.dash-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-chart-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.dash-chart-summary > div {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-chart-summary span {
  color: #64748b;
  font-size: 13px;
}

.dash-chart-summary strong {
  color: #0f172a;
  font-size: 19px;
}

.dash-analytics-chart {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  min-height: 340px;
}

.dash-y-axis {
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px 0 44px;
  color: #64748b;
  font-size: 12px;
}

.dash-bar-chart-v2 {
  min-width: 0;
  min-height: 320px;
  display: grid;
  gap: 8px;
  align-items: end;
  overflow-x: auto;
  padding: 8px 2px 0;
  border-left: 1px solid #e5e7eb;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 8px / 100% 70px,
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dash-bar-item-v2 {
  min-width: 44px;
  display: grid;
  grid-template-rows: 280px 20px 18px;
  gap: 4px;
  text-align: center;
}

.dash-bar-track-v2 {
  height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dash-bar-fill-v2,
.dash-stacked-bar-v2 {
  width: min(32px, 72%);
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}

.dash-bar-fill-v2 {
  background: linear-gradient(180deg, #60a5fa 0%, #1677ff 100%);
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.2);
}

.dash-stacked-bar-v2 {
  display: flex;
  flex-direction: column-reverse;
}

.dash-bar-item-v2 span {
  color: #334155;
  font-size: 12px;
}

.dash-bar-item-v2 em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.dash-ranking-list-v2 {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-ranking-row-v2 {
  display: grid;
  grid-template-columns: 38px minmax(110px, 190px) minmax(180px, 1fr) 70px 130px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.dash-bar-chart {
  margin-top: 14px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  height: 420px;
  display: grid;
  grid-template-columns: repeat(15, minmax(50px, 1fr));
  gap: 10px;
}

.dash-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.dash-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e5e7eb;
}

.dash-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #5bb7e3 0%, #3b9bcc 100%);
}

.dash-bar-date {
  margin-top: 8px;
  font-size: 13px;
  color: #4b5563;
}

.dash-bar-amount {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.dash-chart-legend {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #4b5563;
  font-size: 13px;
}

.dash-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.dash-stacked-bar {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
}

.dash-ranking-list {
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-ranking-row {
  display: grid;
  grid-template-columns: 38px minmax(110px, 180px) minmax(160px, 1fr) 70px 120px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.dash-ranking-index {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #e8f3ff;
  color: #1677ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.dash-ranking-name {
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-ranking-track {
  height: 18px;
  background: #eef2f7;
  border: 1px solid #dde5ef;
  overflow: hidden;
}

.dash-ranking-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b9bcc 0%, #5bb7e3 100%);
}

.dash-ranking-orders,
.dash-ranking-amount {
  color: #4b5563;
  white-space: nowrap;
  text-align: right;
}

.doc-page {
  width: 100%;
}

.doc-toolbar-card {
  background: #eef1f5;
  border: 1px solid #d5dbe5;
  box-shadow: none;
}

.doc-toolbar {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.doc-toolbar-title {
  margin: 0 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
}

.doc-section-card {
  background: #f2f4f7;
  border: 1px solid #d7dce5;
  box-shadow: none;
}

.doc-section-card .ant-card-head {
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid #d9dee6;
}

.doc-section-card .ant-card-head-title {
  padding: 10px 0;
  font-size: 20px;
  font-weight: 700;
}

.doc-section-card .ant-card-body {
  padding: 10px;
}

.doc-head-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 0;
  border-left: 1px solid #d7dce5;
  border-top: 1px solid #d7dce5;
  background: #fff;
}

.doc-head-grid .ant-form-item {
  margin-bottom: 0 !important;
  border-right: 1px solid #d7dce5;
  border-bottom: 1px solid #d7dce5;
}

.doc-head-grid .ant-form-item-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 46px;
}

.doc-head-grid .ant-form-item-label {
  padding: 0 !important;
  margin: 0 !important;
  background: #f5f7fa;
  border-right: 1px solid #d7dce5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-head-grid .ant-form-item-label > label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  width: 100%;
  height: 100% !important;
  margin: 0;
}

.doc-head-grid .ant-form-item-control {
  padding: 4px 8px;
}

.doc-head-grid .ant-form-item-control-input {
  min-height: 36px;
}

.doc-head-grid .ant-input,
.doc-head-grid .ant-select-selector,
.doc-head-grid .ant-input-number,
.doc-head-grid .ant-input-affix-wrapper {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.doc-table .ant-table-thead > tr > th {
  background: #f1f3f6;
  font-weight: 600;
  padding: 8px 8px;
  border-color: #d7dce5 !important;
}

.doc-table .ant-table-tbody > tr > td {
  border-color: #d7dce5 !important;
  padding: 6px 8px;
}

.doc-table .ant-table-summary > tr > td {
  background: #fafafa;
  border-color: #d7dce5 !important;
}

.doc-amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 0;
  border-left: 1px solid #d7dce5;
  border-top: 1px solid #d7dce5;
  background: #fff;
}

.doc-amount-grid .ant-form-item {
  margin-bottom: 0 !important;
  border-right: 1px solid #d7dce5;
  border-bottom: 1px solid #d7dce5;
}

.doc-amount-grid .ant-form-item-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 46px;
}

.doc-amount-grid .ant-form-item-label {
  padding: 0 !important;
  margin: 0 !important;
  background: #f5f7fa;
  border-right: 1px solid #d7dce5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-amount-grid .ant-form-item-control {
  padding: 4px 8px;
}

.doc-amount-grid .ant-form-item-label > label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100% !important;
  margin: 0;
}

.doc-amount-grid .ant-form-item-control-input {
  min-height: 36px;
}

.doc-amount-grid .ant-input,
.doc-amount-grid .ant-select-selector,
.doc-amount-grid .ant-input-number,
.doc-amount-grid .ant-input-affix-wrapper {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.doc-form .ant-btn {
  border-radius: 3px;
}

.doc-form .ant-btn-sm {
  min-width: 28px;
}

@media (max-width: 960px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-hero {
    padding: 32px 24px;
    min-height: auto;
    gap: 28px;
  }

  .login-hero h1 {
    font-size: 34px;
  }

  .login-hero p {
    font-size: 15px;
  }

  .login-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
  }

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

  .login-metrics > div {
    min-height: 84px;
  }

  .login-panel {
    padding: 24px;
    align-items: flex-start;
  }

  .login-card {
    padding: 2px;
  }

  .login-card-head h2 {
    font-size: 26px !important;
  }

  .mall-hero,
  .mall-page,
  .mall-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .mall-header-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .mall-hero {
    flex-direction: column;
  }

  .mall-hero-actions {
    width: 100%;
    min-width: 0;
  }

  .mall-login-hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 36px;
  }

  .mall-login-card {
    max-width: 520px;
    width: 100%;
  }

  .mall-welcome-grid {
    grid-template-columns: 1fr;
  }

  .mall-detail-price-panel {
    grid-template-columns: 1fr;
  }

  .jsh-sider {
    width: 88px;
  }

  .group-nav-label {
    font-size: 13px;
  }

  .mega-panel {
    left: 88px;
    width: calc(100vw - 96px);
    grid-template-columns: 1fr;
    max-height: 70vh;
    overflow: auto;
  }

  .mega-col {
    border-right: 0;
    border-bottom: 1px solid #eef3fa;
  }

  .mega-item {
    font-size: 22px;
  }

  .dash-metric-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .dash-quick-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .dash-bar-chart {
    overflow-x: auto;
  }

  .dash-chart-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .dash-analytics-chart {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dash-ranking-row-v2 {
    grid-template-columns: 34px minmax(90px, 140px) minmax(140px, 1fr);
  }

  .dash-ranking-row-v2 .dash-ranking-orders,
  .dash-ranking-row-v2 .dash-ranking-amount {
    display: none;
  }

  .doc-head-grid,
  .doc-amount-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

/* Keep the ERP shell readable after the legacy page styles. */
.jsh-shell { background: #f4f6f8; }
.jsh-sider { width: 104px; background: #0f6fc5; }
.group-nav-item { min-height: 60px; font-size: 14px; }
.group-nav-label { font-size: 14px; }
.mega-panel { left: 104px; width: min(920px, calc(100vw - 124px)); padding: 16px; background: #fff; border: 1px solid #d9e0e8; border-radius: 6px; box-shadow: 0 12px 30px rgba(31, 41, 55, 0.14); }
.mega-panel-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #edf0f3; }
.mega-col-title { font-size: 14px; color: #667085; }
.mega-item { min-height: 34px; padding: 7px 8px; font-size: 14px; border-radius: 4px; }
.top-tabs { height: 38px; padding: 4px 12px 0; background: #fff; border-bottom: 1px solid #e4e7ec; }
.top-tab-item, .top-tab-home { height: 30px; border-radius: 4px 4px 0 0; }
.top-tab-item { min-width: 112px; max-width: 210px; padding: 0 9px; }
.top-tab-pin { margin-right: 5px; color: #1677ff; font-size: 8px; }
.jsh-header { height: 48px; min-height: 48px; padding: 0 18px; background: #fff; border-bottom: 1px solid #e4e7ec; }
.jsh-header-inner { min-width: 0; }
.jsh-header-title { min-width: 0; }
.jsh-header-title .ant-typography-secondary { display: none; }
.jsh-header-inner > .ant-space { flex-shrink: 0; }
.jsh-header-inner > .ant-space > .ant-btn { height: 30px; padding-inline: 9px; }
.jsh-header-title .ant-typography { font-size: 16px; }
.jsh-content { padding: 18px; background: #f4f6f8; }
.page-shell { width: 100%; min-width: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.page-header-copy h1 { margin: 0; color: #1d2939; font-size: 22px; line-height: 1.35; }
.page-header-subtitle { margin-top: 4px; color: #667085; font-size: 13px; }
.page-header-extra { display: flex; align-items: center; gap: 8px; }
.sticky-action-bar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 7px 12px; margin-bottom: 12px; background: rgba(255, 255, 255, 0.96); border: 1px solid #dfe4ea; border-radius: 6px; box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06); backdrop-filter: blur(8px); }
.jsh-content .page-card,
.jsh-content .dash-head-card,
.jsh-content .dash-metric-card,
.jsh-content .dash-chart-card,
.jsh-content .list-toolbar-sticky,
.jsh-content .sticky-action-bar {
  background: #fff;
  backdrop-filter: none;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}
.sales-create-page > * + * { margin-top: 14px; }
.sales-orders-overview-page > * + * { margin-top: 14px; }
.sales-orders-overview-page .sales-orders-module > .page-card:first-child { display: none; }
.sales-create-toolbar .doc-toolbar { min-height: 28px; }
.sales-create-toolbar .doc-toolbar-title { font-size: 20px !important; }
.sales-bottom-summary { position: sticky; top: auto; bottom: 10px; z-index: 11; margin-top: 0; }
.sales-orders-table .ant-table-thead > tr > th { position: sticky; top: 0; z-index: 2; }
.sales-orders-module .module-row-actions { max-width: 232px; }
.sales-orders-module .module-row-actions .ant-btn { padding-inline: 7px; }
.sales-orders-module .list-toolbar-sticky { gap: 10px; }

.doc-form .ant-input:not([readonly]),
.doc-form .ant-input-number,
.doc-form .ant-select-selector,
.doc-form .ant-input-affix-wrapper,
.doc-form textarea {
  background: #fff !important;
  border-color: #cfd6df !important;
  box-shadow: none !important;
}

.doc-form .ant-input[readonly] {
  color: #667085;
  background: #f5f7fa !important;
  border-color: #e4e7ec !important;
}

.doc-form .ant-input[readonly]:focus {
  border-color: #e4e7ec !important;
  box-shadow: none !important;
}

@media (max-width: 960px) {
  .jsh-sider { width: 82px; }
  .mega-panel { left: 82px; width: calc(100vw - 94px); }
  .jsh-content { padding: 12px; }
  .page-header, .sticky-action-bar { align-items: stretch; flex-direction: column; }
  .page-header-extra { justify-content: flex-start; flex-wrap: wrap; }
}

/* Floating dock navigation: the collapsed rail stays out of the way and expands over content. */
.jsh-sider {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 64px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0f6fc5;
  box-shadow: 4px 0 16px rgba(16, 24, 40, 0.12);
  transition: width 0.18s ease;
}

.jsh-sider:hover,
.jsh-sider:focus-within {
  width: 220px;
}

.jsh-sider .brand-mark {
  width: 220px;
  min-height: 76px;
  padding: 14px 16px;
  overflow: hidden;
  white-space: nowrap;
}

.jsh-sider:not(:hover):not(:focus-within) .brand-mark strong {
  display: block;
  width: 32px;
  overflow: hidden;
  font-size: 15px;
}

.jsh-sider:not(:hover):not(:focus-within) .brand-mark span,
.jsh-sider:not(:hover):not(:focus-within) .group-nav-label {
  display: none;
}

.jsh-sider .group-nav-item {
  width: 220px;
  min-height: 60px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 20px;
  text-align: left;
}

.jsh-sider:not(:hover):not(:focus-within) .group-nav-item {
  width: 64px;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.jsh-sider .group-nav-icon {
  flex: 0 0 24px;
}

.jsh-main {
  width: calc(100% - 64px);
  margin-left: 64px;
  flex: 0 0 calc(100% - 64px);
}

.mega-panel {
  left: 220px;
  width: min(920px, calc(100vw - 236px));
}

@media (max-width: 960px) {
  .jsh-sider { width: 58px; }
  .jsh-sider:hover,
  .jsh-sider:focus-within { width: 190px; }
  .jsh-sider .brand-mark,
  .jsh-sider .group-nav-item { width: 190px; }
  .jsh-sider:not(:hover):not(:focus-within) .group-nav-item { width: 58px; }
  .jsh-main { width: calc(100% - 58px); margin-left: 58px; flex-basis: calc(100% - 58px); }
  .mega-panel { left: 190px; width: calc(100vw - 202px); }
}

/* The rail is fixed; only its menu surface floats above the workspace. */
.jsh-sider,
.jsh-sider:hover,
.jsh-sider:focus-within {
  position: fixed;
  inset: 0 auto 0 0;
  width: 104px;
  min-height: 100vh;
  overflow: hidden;
  background: #0f6fc5;
  box-shadow: 2px 0 10px rgba(16, 24, 40, 0.1);
  transition: none;
}

.jsh-sider .brand-mark,
.jsh-sider:hover .brand-mark,
.jsh-sider:focus-within .brand-mark {
  width: 104px;
  min-height: 76px;
  padding: 14px 10px;
  white-space: normal;
}

.jsh-sider .brand-mark strong,
.jsh-sider:hover .brand-mark strong,
.jsh-sider:focus-within .brand-mark strong {
  display: block;
  width: auto;
  overflow: visible;
  font-size: 16px;
}

.jsh-sider .brand-mark span,
.jsh-sider:hover .brand-mark span,
.jsh-sider:focus-within .brand-mark span,
.jsh-sider .group-nav-label,
.jsh-sider:hover .group-nav-label,
.jsh-sider:focus-within .group-nav-label {
  display: block;
}

.jsh-sider .group-nav-item,
.jsh-sider:hover .group-nav-item,
.jsh-sider:focus-within .group-nav-item {
  width: 104px;
  min-height: 60px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0;
  text-align: center;
}

.jsh-sider:not(:hover):not(:focus-within) .brand-mark strong {
  width: auto;
  overflow: visible;
  font-size: 16px;
}

.jsh-sider:not(:hover):not(:focus-within) .brand-mark span,
.jsh-sider:not(:hover):not(:focus-within) .group-nav-label {
  display: block;
}

.jsh-sider:not(:hover):not(:focus-within) .group-nav-item {
  width: 104px;
  min-height: 60px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0;
  text-align: center;
}

.jsh-main {
  width: calc(100% - 104px);
  margin-left: 104px;
  flex-basis: calc(100% - 104px);
}

.mega-panel {
  left: 104px;
  width: min(920px, calc(100vw - 120px));
}

.mega-panel-title {
  padding: 0 0 10px;
  margin: 0 16px 0;
  border-bottom: 1px solid #edf0f3;
  color: #344054;
}

@media (max-width: 960px) {
  .jsh-sider,
  .jsh-sider:hover,
  .jsh-sider:focus-within { width: 88px; }
  .jsh-sider .brand-mark,
  .jsh-sider:hover .brand-mark,
  .jsh-sider:focus-within .brand-mark,
  .jsh-sider .group-nav-item,
  .jsh-sider:hover .group-nav-item,
  .jsh-sider:focus-within .group-nav-item { width: 88px; }
  .jsh-main { width: calc(100% - 88px); margin-left: 88px; flex-basis: calc(100% - 88px); }
  .mega-panel { left: 88px; width: calc(100vw - 100px); }
}

.mega-panel {
  display: block;
  padding: 14px 0 8px;
  border-top-width: 2px;
}

.mega-panel-title {
  padding: 0 16px 10px;
  margin: 0;
}

.mega-direct-list {
  display: flex;
  flex-direction: column;
  padding: 6px 8px 0;
}

.mega-direct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  border-bottom: 1px solid #f0f2f5;
}

.mega-direct-row:last-child {
  border-bottom: 0;
}

.mega-direct-row .mega-item {
  flex: 1;
  min-width: 0;
  padding: 9px 8px;
  font-size: 14px;
  color: #344054;
}

.mega-direct-row .mega-item:hover {
  color: #1677ff;
  background: #f5f9ff;
}

.mega-create-button {
  flex: 0 0 auto;
  min-width: 54px;
  margin-right: 4px;
  background: #22a447;
  border-color: #22a447;
}

.mega-create-button:hover {
  background: #168a38 !important;
  border-color: #168a38 !important;
}

.mega-panel:not(.mega-panel-grouped) {
  width: min(360px, calc(100vw - 120px));
}

.mega-panel-grouped {
  width: min(760px, calc(100vw - 120px));
}

.mega-panel-grouped .mega-direct-list {
  display: none;
}

.mega-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 0;
  padding: 6px 8px 8px;
}

.mega-section-column {
  min-width: 0;
  padding: 8px 14px 12px;
  border-right: 1px solid #edf0f3;
}

.mega-section-column:last-child {
  border-right: 0;
}

.mega-section-title {
  margin-bottom: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.mega-section-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-section-item {
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #344054;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.mega-section-item:hover {
  background: #f5f9ff;
  color: #1677ff;
}

@media (max-width: 960px) {
  .mega-panel:not(.mega-panel-grouped) { width: min(330px, calc(100vw - 100px)); }
  .mega-panel-grouped { width: calc(100vw - 100px); }
  .mega-section-grid { grid-template-columns: 1fr; }
  .mega-section-column { border-right: 0; border-bottom: 1px solid #edf0f3; }
  .mega-section-column:last-child { border-bottom: 0; }
}

/* The primary rail stays fixed; secondary navigation appears only as a hover flyout. */
.jsh-sider,
.jsh-sider:hover,
.jsh-sider:focus-within {
  width: 96px;
  flex: 0 0 96px;
}

.jsh-sider .brand-mark,
.jsh-sider:hover .brand-mark,
.jsh-sider:focus-within .brand-mark,
.jsh-sider .group-nav-item,
.jsh-sider:hover .group-nav-item,
.jsh-sider:focus-within .group-nav-item {
  width: 96px;
}

.jsh-sider .brand-mark,
.jsh-sider .group-nav-item {
  min-height: 60px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0;
  text-align: center;
}

.jsh-main {
  width: calc(100% - 96px);
  margin-left: 96px;
  flex-basis: calc(100% - 96px);
}

.mega-panel,
.mega-panel.mega-panel-grouped {
  position: fixed;
  top: 86px;
  bottom: auto;
  left: 96px;
  width: 220px;
  max-width: 220px;
  max-height: calc(100vh - 98px);
  overflow-y: auto;
  border: 1px solid #dfe4ea;
  border-top: 2px solid #1677ff;
  border-left: 1px solid #e4e7ec;
  border-radius: 0 6px 6px 0;
  box-shadow: 8px 12px 28px rgba(16, 24, 40, 0.16);
  transform: none;
  animation: mega-panel-enter 0.12s ease-out;
}

@keyframes mega-panel-enter {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.mega-section-column {
  border-right: 0;
  border-bottom: 1px solid #edf0f3;
}

.mega-section-column:last-child {
  border-bottom: 0;
}

@media (max-width: 960px) {
  .jsh-sider,
  .jsh-sider:hover,
  .jsh-sider:focus-within {
    width: 88px;
    flex-basis: 88px;
  }

  .jsh-sider .brand-mark,
  .jsh-sider:hover .brand-mark,
  .jsh-sider:focus-within .brand-mark,
  .jsh-sider .group-nav-item,
  .jsh-sider:hover .group-nav-item,
  .jsh-sider:focus-within .group-nav-item {
    width: 88px;
  }

  .jsh-main {
    width: calc(100% - 88px);
    margin-left: 88px;
    flex-basis: calc(100% - 88px);
  }

  .mega-panel,
  .mega-panel.mega-panel-grouped {
    left: 88px;
    width: 200px;
    max-width: 200px;
  }
}
