* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.auth-footer {
  display: none;
}

body {
  --login-bg-image: none;
  --menu-bg-image: none;
  margin: 0;
  color: #17202a;
  background: #f4f7fb;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

button {
  height: 38px;
  border: 1px solid #1f6feb;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: #1f6feb;
  cursor: pointer;
  font-weight: 700;
}

.secondary-button {
  color: #1f6feb;
  background: #fff;
}

.icon-button {
  width: auto;
  height: 24px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.icon-button img {
  display: block;
  height: 12px;
  width: auto;
  margin: 0 auto;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 24px auto;
}

.toolbar,
.section-heading,
.account-bar,
.pagination,
.result-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.toolbar {
  align-items: center;
  margin-bottom: 16px;
}

.account-bar,
.pagination,
.result-meta {
  align-items: center;
}

.batch-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  --logo-size: 86px;
  --title-size: calc(var(--logo-size) * 0.5);
}

.brand-block > div {
  min-width: 0;
}

.brand-logo {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  flex: 0 0 auto;
}

.toolbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 128px;
  white-space: nowrap;
}

.language-select span {
  display: inline;
  margin-bottom: 0;
  color: #17202a;
  font-size: inherit;
  font-weight: 400;
  flex: 0 0 auto;
}

.language-select .language-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #17202a;
}

.language-select .language-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-select select {
  width: 96px;
  flex: 0 0 auto;
}

.language-links {
  display: none;
}

.toolbar-actions .language-select select {
  display: inline-block;
}

.toolbar-actions .language-select .language-links {
  display: none;
}

.toolbar-actions .language-select span,
.toolbar-actions #currentUserText {
  font-size: 14px;
}

.account-bar {
  gap: 10px;
}

.account-avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #1677ff, #0f3f9f);
  background-position: center;
  background-size: cover;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.22);
  cursor: pointer;
}

.account-avatar:hover {
  transform: translateY(-1px);
}

#currentUserText {
  display: inline-flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
}

#currentUserText .account-name {
  color: #17202a;
  font-size: 14px;
  font-weight: 700;
}

#currentUserText .account-role {
  margin-top: 2px;
  color: #5b6776;
  font-size: 12px;
  font-weight: 500;
}

:root {
  --profile-panel-right: 24px;
  --profile-panel-width: min(400px, calc(100vw - 340px));
  --profile-panel-gap: 18px;
  --profile-password-width: min(308px, calc(100vw - 48px));
}

.user-profile-popover {
  position: fixed;
  top: 86px;
  right: var(--profile-panel-right);
  z-index: 120;
  width: var(--profile-panel-width);
  max-height: calc(100vh - 112px);
  overflow: auto;
  border: 1px solid #e8eef7;
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.user-profile-popover::before {
  display: none;
}

.profile-modal-title {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  margin: 0;
}

.profile-modal-title .profile-close-button {
  margin-left: auto;
}

.profile-modal-title h2,
.profile-password-head h2 {
  margin: 0;
  color: #17202a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-modal-title p {
  margin: 4px 0 0;
  color: #7a8798;
  font-size: 12px;
  font-weight: 600;
}

.profile-close-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #4b5870;
  background: transparent;
  box-shadow: none;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.profile-close-button:hover {
  color: #1769ff;
  background: #eef4ff;
  transform: none;
}

.profile-popover-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 2px 40px 12px 0;
}

.profile-avatar-large {
  position: relative;
  display: inline-flex;
  width: 82px;
  height: 82px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #1677ff, #0f3f9f);
  background-position: center;
  background-size: cover;
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.22);
  cursor: pointer;
}

.profile-camera-badge {
  position: absolute;
  right: 6px;
  bottom: 10px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #1769ff;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.18);
}

.profile-camera-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-title-block strong {
  color: #17202a;
  font-size: 19px;
  line-height: 1.1;
}

.profile-user-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-title-block > span,
.profile-user-line > span,
.profile-login-line {
  overflow: hidden;
  color: #677489;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  color: #1769ff !important;
  background: #edf4ff;
  font-size: 12px !important;
  font-weight: 700;
}

.profile-login-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.language-en #profileLastLoginText {
  font-size: 13px;
}

.profile-password-entry {
  display: inline-flex;
  width: fit-content;
  height: 32px;
  align-items: center;
  gap: 8px;
  border: 1px solid #8fb3ff;
  border-radius: 8px;
  padding: 0 12px;
  color: #2f65d9;
  background: #fff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.profile-password-entry:hover {
  background: #f4f7ff;
  transform: none;
}

.profile-info-card {
  margin-top: 8px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  padding: 12px 13px 13px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(19, 39, 71, 0.05);
}

.profile-info-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  color: #17202a;
  font-size: 14px;
  font-weight: 800;
}

.profile-info-card h3 span {
  color: #1769ff;
  font-size: 18px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding-top: 0;
}

.profile-form-grid label {
  min-width: 0;
}

.profile-form-grid input,
.profile-form-grid select {
  width: 100%;
  height: 32px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.profile-form-grid label > span,
.profile-password-fields label > span {
  margin-bottom: 5px;
  color: #4d5a70;
  font-size: 12px;
  font-weight: 700;
}

.profile-form-grid input:focus,
.profile-form-grid select:focus,
.profile-password-fields input:focus {
  border-color: #1769ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12);
}

.profile-password-panel {
  position: fixed;
  top: 150px;
  right: calc(var(--profile-panel-right) + var(--profile-panel-width) + var(--profile-panel-gap));
  z-index: 130;
  width: var(--profile-password-width);
  border: 1px solid #e8eef7;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

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

.profile-password-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 0;
}

.profile-password-fields label {
  position: relative;
}

.profile-password-fields input {
  width: 100%;
  height: 34px;
  border: 1px solid #d8e1ef;
  border-radius: 9px;
  padding: 0 42px 0 10px;
  background: #fff;
}

.profile-password-strength {
  display: grid;
  gap: 5px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
}

.profile-password-strength > span,
.profile-password-strength > strong {
  display: inline;
}

.profile-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.profile-strength-bars span {
  height: 6px;
  border-radius: 999px;
  background: #e5eaf3;
}

.profile-password-strength.weak {
  color: #ef4444;
}

.profile-password-strength.medium {
  color: #f59e0b;
}

.profile-password-strength.strong {
  color: #22c55e;
}

.profile-password-strength.weak .profile-strength-bars span:first-child {
  background: #ef4444;
}

.profile-password-strength.medium .profile-strength-bars span:nth-child(-n+2) {
  background: #f59e0b;
}

.profile-password-strength.strong .profile-strength-bars span {
  background: #22c55e;
}

.profile-password-hints {
  margin: 0;
  color: #68bd76;
  font-size: 10px;
  font-weight: 700;
}

.profile-password-hints {
  display: grid;
  gap: 3px;
}

.profile-password-hints p,
.profile-password-rule {
  margin: 0;
}

.profile-password-strength.weak .profile-password-hints,
.profile-password-rule {
  color: #ef4444;
}

.profile-password-strength.medium .profile-password-hints {
  color: #f59e0b;
}

.profile-password-strength.strong .profile-password-hints {
  color: #22c55e;
}

.profile-password-rule {
  font-size: 10px;
  font-weight: 700;
}

.profile-password-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 6px;
}

.profile-password-actions button {
  height: 36px;
}

.profile-password-eye {
  top: auto;
  right: 8px;
  bottom: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: none;
}

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

.profile-actions button {
  height: 34px;
  padding: 0 14px;
}

.notification-button {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #344054;
  background: transparent;
  box-shadow: none;
}

.notification-button:hover {
  color: #1677ff;
  background: #eef5ff;
  transform: none;
}

.notification-button.has-notification {
  color: #1677ff;
}

.notification-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 4px;
  color: #fff;
  background: #ea5506;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

.toolbar h1,
.panel h2 {
  margin: 0 0 6px;
}

.toolbar h1 {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: var(--logo-size);
  font-size: var(--title-size);
  line-height: 1.25;
}

.language-en .toolbar h1 {
  --title-size: calc(var(--logo-size) * 0.35);
  font-size: var(--title-size);
}

.language-en select {
  height: 38px;
}

.language-en .inline-check input {
  width: 16px;
  height: 16px;
}

.language-en .language-select select {
  width: 96px;
}

.language-en .result-page-size select {
  width: 76px;
}

.toolbar p,
.hint,
.section-heading p,
.message {
  margin: 0;
  color: #5b6776;
}

.admin-panel .section-heading h2,
.module-management-panel .section-heading h2,
.exchange-rate-panel .section-heading h2,
.import-panel .section-heading h2,
.cart-panel .section-heading h2 {
  font-size: 18px;
}

.admin-panel .section-heading p,
.module-management-panel .section-heading p,
.exchange-rate-panel .section-heading p,
.import-panel .section-heading p,
.cart-panel .section-heading p {
  font-size: 12px;
}

.panel {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  background: #fff;
}

body:not(.auth-mode) {
  min-height: 100vh;
  background: #f5f7fb;
}

body:not(.auth-mode) .app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

body:not(.auth-mode) .toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  margin: 0 0 0 280px;
  padding: 0 28px 0 32px;
  border-bottom: 1px solid #e7edf5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

body:not(.auth-mode) .brand-logo {
  display: none;
}

body:not(.auth-mode) .brand-block {
  gap: 0;
}

body:not(.auth-mode) .toolbar h1 {
  color: #111827;
  font-size: 24px;
  font-weight: 700;
}

body:not(.auth-mode) .toolbar-actions {
  gap: 14px;
}

body:not(.auth-mode) #appPanel {
  min-height: calc(100vh - 72px);
  margin-left: 280px;
  padding: 24px 28px 36px;
}

body:not(.auth-mode) #appPanel[data-view="quote"] {
  display: grid;
  grid-template-columns: minmax(320px, 30%) minmax(0, 1fr);
  gap: 14px 18px;
  align-items: start;
}

body:not(.auth-mode) #appPanel[data-view="quote"] .quote-builder-panel {
  grid-column: 1;
  grid-row: 1 / span 5;
}

body:not(.auth-mode) #appPanel[data-view="quote"] .cart-panel,
body:not(.auth-mode) #appPanel[data-view="quote"] .query-panel {
  grid-column: 2;
  margin: 0;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  width: 280px;
  height: 100vh;
  flex-direction: column;
  padding: 0 16px 20px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(6, 27, 58, 0.74), rgba(3, 14, 31, 0.84)),
    var(--menu-bg-image),
    url("assets/sidebar-bg.png"),
    linear-gradient(180deg, rgba(7, 20, 38, 0.96), rgba(8, 44, 103, 0.96)),
    #061b3a;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 18px 0 45px rgba(3, 14, 31, 0.28);
}

.sidebar-brand {
  display: flex;
  height: 120px;
  flex: 0 0 120px;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0 -16px 20px;
  padding: 0 28px;
}

.sidebar-logo-image {
  display: block;
  width: 204px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.sidebar-menu-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 12px;
  color: #b8c7da;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-menu-label::before {
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #1677ff;
  content: "";
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 18px;
  color: #d5e3f2;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.sidebar-nav-button::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 17px;
  height: 17px;
  background-image: radial-gradient(circle, #1677ff 2px, transparent 2px);
  background-position: 0 0;
  background-size: 7px 7px;
  opacity: 0.5;
  transform: translateY(-50%);
  content: "";
  transition: opacity 0.3s ease;
}

.sidebar-nav-button:hover {
  color: #fff;
  background: rgba(22, 119, 255, 0.15);
  transform: none;
}

.sidebar-nav-button.active {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  background: linear-gradient(90deg, #1677ff, #0057d9);
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.35);
  transform: none;
}

.sidebar-nav-button.active::after {
  opacity: 1;
}

.sidebar-nav-button .nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: flex;
  height: 132px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  color: #8fa6bf;
  background:
    linear-gradient(180deg, rgba(6, 27, 58, 0.18), rgba(3, 14, 31, 0.92)),
    url("assets/factory-dark.png"),
    rgba(3, 14, 31, 0.42);
  background-position: center;
  background-size: cover;
  font-size: 12px;
  line-height: 1.6;
}

.sidebar-footer strong {
  color: #8fa6bf;
  font-size: 12px;
}

body:not(.auth-mode) .panel,
body:not(.auth-mode) .table-wrap,
body:not(.auth-mode) .result-meta {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

body:not(.auth-mode) .panel {
  padding: 20px;
}

body:not(.auth-mode) .section-heading h2 {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

body:not(.auth-mode) .section-heading p {
  color: #64748b;
}

body:not(.auth-mode) .filters {
  padding: 20px;
}

body:not(.auth-mode) .result-meta {
  padding: 14px 18px;
}

body:not(.auth-mode) .product-library-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open {
  grid-template-columns: 240px minmax(0, 1fr) 300px;
}

body:not(.auth-mode) #appPanel[data-view="quote"] .product-library-layout {
  grid-column: 2;
  display: block;
}

body:not(.auth-mode) .product-query-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body:not(.auth-mode) #appPanel[data-view="quote"] .product-query-stack {
  gap: 14px;
}

body:not(.auth-mode) .product-query-stack > .query-panel {
  grid-column: auto;
  margin: 0;
}

body:not(.auth-mode) #appPanel[data-view="product"] .category-filter-field {
  display: none;
}

body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel label,
body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel .filter-actions {
  min-width: 0;
}

body:not(.auth-mode) .product-detail-panel {
  position: sticky;
  top: 84px;
  margin-top: var(--product-detail-offset, 0px);
  min-height: 520px;
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

@media (min-width: 1366px) {
  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .product-query-stack {
    display: contents;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .product-category-sidebar {
    grid-column: 1;
    grid-row: 1 / span 5;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .cart-panel {
    grid-column: 2 / 4;
    grid-row: 1;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .filters.query-panel {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .result-meta {
    grid-column: 2 / 4;
    grid-row: 3;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .result-wrap {
    grid-column: 2;
    grid-row: 4;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .pagination {
    grid-column: 2;
    grid-row: 5;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open .product-detail-panel {
    grid-column: 3;
    grid-row: 4 / span 2;
    margin-top: 0;
  }
}

body:not(.auth-mode) .product-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

body:not(.auth-mode) .product-detail-model-tag {
  max-width: 220px;
  padding: 5px 10px;
  overflow: hidden;
  color: #2d6fd5;
  background: #edf4ff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.auth-mode) .product-detail-head {
  flex-wrap: nowrap;
}

body:not(.auth-mode) .product-detail-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

body:not(.auth-mode) .product-detail-status-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

body:not(.auth-mode) .product-detail-status-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body:not(.auth-mode) .product-detail-status-switch .product-detail-status-track {
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  padding: 0;
  overflow: visible;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: .15s;
}

body:not(.auth-mode) .product-detail-status-switch .product-detail-status-track::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: .15s;
}

body:not(.auth-mode) .product-detail-status-switch input:checked + .product-detail-status-track {
  background: #1677e8;
}

body:not(.auth-mode) .product-detail-status-switch input:checked + .product-detail-status-track::after {
  transform: translateX(14px);
}

body:not(.auth-mode) .product-detail-status-switch input:disabled + .product-detail-status-track {
  cursor: wait;
  opacity: .65;
}

body:not(.auth-mode) .product-detail-status-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

body:not(.auth-mode) .product-detail-status-badge.active {
  color: #128f4f;
  background: #e8faf0;
}

body:not(.auth-mode) .product-detail-status-badge.inactive {
  color: #b45309;
  background: #fff7ed;
}

body:not(.auth-mode) .product-detail-close {
  width: 28px;
  height: 28px;
  padding: 0;
  color: #94a3b8;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  font-size: 20px;
}

body:not(.auth-mode) .product-detail-close:hover {
  color: #2563eb;
  background: #eff6ff;
  transform: none;
}

body:not(.auth-mode) .product-detail-panel h3 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

body:not(.auth-mode) .product-detail-category {
  margin: 0 0 18px;
  color: #64748b;
  font-size: 13px;
}

body:not(.auth-mode) .product-detail-price {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

body:not(.auth-mode) .product-detail-price span,
body:not(.auth-mode) .product-detail-section > span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

body:not(.auth-mode) .product-detail-price strong {
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

body:not(.auth-mode) .product-detail-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px dashed #c7ddf5;
  border-radius: 20px;
  background: #eaf4ff;
}

body:not(.auth-mode) .product-detail-image img {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}

body:not(.auth-mode) .product-detail-image-placeholder {
  display: grid;
  place-items: center;
  gap: 30px;
  width: 100%;
  height: 100%;
  padding: 32px;
  color: #020617;
  text-align: center;
}

body:not(.auth-mode) .product-detail-image-placeholder strong {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

body:not(.auth-mode) .product-detail-image-placeholder span {
  font-size: 13px;
  font-weight: 500;
}

body:not(.auth-mode) .product-detail-image-dropzone {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

body:not(.auth-mode) .product-detail-image-dropzone.has-image {
  display: grid;
  place-items: center;
}

body:not(.auth-mode) .product-detail-document-field {
  display: grid;
  gap: 6px;
}

body:not(.auth-mode) .product-detail-document-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}

body:not(.auth-mode) .product-document-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0;
  cursor: pointer;
  font-size: 12px;
}

body:not(.auth-mode) .product-document-file-name {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.auth-mode) .product-detail-document-tools button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

body:not(.auth-mode) .product-detail-resource-center {
  display: grid;
  gap: 12px;
}

body:not(.auth-mode) .product-detail-resource-center h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

body:not(.auth-mode) .product-detail-resource-list {
  display: grid;
  gap: 12px;
}

body:not(.auth-mode) .product-detail-resource-card {
  height: 100px;
  padding: 18px 20px;
  display: grid;
  grid-template-rows: auto 18px 1fr;
  align-content: start;
  gap: 4px;
  background: #fff;
  border: 1px solid #d7e8ff;
  border-radius: 16px;
}

body:not(.auth-mode) .product-detail-resource-card-multi {
  height: auto;
  min-height: 100px;
  grid-template-rows: auto auto auto;
}

body:not(.auth-mode) .product-detail-resource-card:hover {
  border-color: #4095ff;
  box-shadow: 0 0 0 2px rgba(64, 149, 255, 0.1);
}

body:not(.auth-mode) .product-detail-resource-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

body:not(.auth-mode) .product-detail-resource-file {
  display: block;
  min-height: 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.auth-mode) .product-detail-resource-file-list {
  display: grid;
  gap: 2px;
  min-height: 18px;
  overflow: visible;
}

body:not(.auth-mode) .product-detail-resource-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 16px;
}

body:not(.auth-mode) .product-detail-resource-file-name {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.auth-mode) .product-detail-resource-name-input {
  width: 100%;
  min-height: 18px;
  padding: 0;
  overflow: hidden;
  color: #64748b;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
}

body:not(.auth-mode) .product-detail-resource-name-input:focus {
  outline: 0;
  color: #0f172a;
  border-bottom: 1px solid #93c5fd;
}

body:not(.auth-mode) .product-detail-resource-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-self: end;
  gap: 14px;
  margin-top: 0;
  white-space: nowrap;
}

body:not(.auth-mode) .resource-action {
  padding: 0;
  color: #0f172a;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

body:not(.auth-mode) .resource-action:hover {
  color: #2563eb;
}

body:not(.auth-mode) .resource-action.disabled,
body:not(.auth-mode) .resource-action:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

body:not(.auth-mode) .product-detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #f1f5f9;
}

body:not(.auth-mode) .product-detail-tabs button {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  color: #64748b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

body:not(.auth-mode) .product-detail-tabs button.active {
  color: #fff;
  background: #2563eb;
}

body:not(.auth-mode) .product-detail-tab-body {
  min-height: 250px;
}

body:not(.auth-mode) .product-detail-section-title {
  margin: 0 0 10px;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

body:not(.auth-mode) .product-detail-form {
  display: grid;
  gap: 10px;
}

body:not(.auth-mode) .product-detail-field {
  display: grid;
  gap: 5px;
}

body:not(.auth-mode) .product-detail-field span,
body:not(.auth-mode) .product-detail-row span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

body:not(.auth-mode) .product-detail-field input,
body:not(.auth-mode) .product-detail-field textarea,
body:not(.auth-mode) .product-detail-field select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  color: #1f2937;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  outline: none;
}

body:not(.auth-mode) .product-detail-field textarea {
  min-height: 76px;
  resize: vertical;
}

body:not(.auth-mode) .product-detail-field input:focus,
body:not(.auth-mode) .product-detail-field textarea:focus,
body:not(.auth-mode) .product-detail-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body:not(.auth-mode) .product-detail-field input[readonly],
body:not(.auth-mode) .product-detail-field textarea[readonly],
body:not(.auth-mode) .product-detail-field select:disabled {
  color: #334155;
  background: #f8fafc;
}

body:not(.auth-mode) .product-detail-row {
  min-height: 40px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf2f7;
}

body:not(.auth-mode) .product-detail-row strong {
  min-width: 0;
  color: #1f2937;
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

body:not(.auth-mode) .product-detail-message {
  min-height: 18px;
  margin-top: 8px;
  color: #ea5506;
  font-size: 12px;
  font-weight: 700;
}

body:not(.auth-mode) .product-detail-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

body:not(.auth-mode) .product-detail-primary {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: #2f6fd3;
}

body:not(.auth-mode) .product-detail-primary:disabled {
  background: #93b4e6;
  cursor: default;
}

body:not(.auth-mode) .result-wrap tbody tr {
  cursor: pointer;
}

body:not(.auth-mode) .result-wrap td.inline-editable-cell {
  cursor: text;
}

body:not(.auth-mode) .result-wrap td.inline-editing {
  padding: 4px;
  background: #fff;
  box-shadow: none;
}

body:not(.auth-mode) .result-wrap .inline-product-input {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 8px;
  color: #102033;
  background: #eef5ff;
  font-size: 14px;
  text-align: inherit;
  outline: none;
}

body:not(.auth-mode) .result-wrap .inline-product-input:focus {
  box-shadow: none;
}

body:not(.auth-mode) .result-wrap td.number .inline-product-input {
  text-align: right;
}

body:not(.auth-mode) .result-wrap td.inventory-cell {
  text-align: center;
}

body:not(.auth-mode) .inventory-breakdown-button {
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body:not(.auth-mode) .inventory-breakdown-button:not(:disabled) {
  cursor: pointer;
}

body:not(.auth-mode) .inventory-breakdown-button:hover,
body:not(.auth-mode) .inventory-breakdown-button:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
  transform: none;
}

body:not(.auth-mode) .inventory-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 54px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

body:not(.auth-mode) .inventory-badge i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: currentColor;
}

body:not(.auth-mode) .inventory-high {
  color: #45b878;
}

body:not(.auth-mode) .inventory-medium {
  color: #f2a12b;
}

body:not(.auth-mode) .inventory-low {
  color: #ef4444;
}

.inventory-breakdown-popover {
  position: fixed;
  z-index: 1100;
  padding: 12px;
  color: #17202a;
  background: #fff;
  border: 1px solid #d8e4f3;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 31, 53, 0.18);
}

.inventory-breakdown-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}

.inventory-breakdown-head strong {
  color: #10233b;
  font-size: 14px;
}

.inventory-breakdown-head span {
  color: #6b7d94;
  font-size: 12px;
}

.inventory-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f0f4f8;
}

.inventory-breakdown-row:last-child {
  border-bottom: 0;
}

.inventory-breakdown-row span {
  min-width: 0;
  overflow: hidden;
  color: #43546b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-breakdown-row strong {
  color: #1769ff;
  font-size: 13px;
}

body:not(.auth-mode) .result-wrap tbody tr.result-row-selected td {
  background: #e8f2ff;
}

.product-category-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
  min-height: calc(100vh - 124px);
  align-content: start;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.product-category-sidebar h2 {
  margin: 0 0 4px;
  color: #66758c;
  font-size: 14px;
  font-weight: 800;
}

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

.product-category-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: #5f6f86;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.product-category-list button:hover {
  color: #1f66d1;
  background: #f3f7fd;
  transform: none;
}

.product-category-list button.active {
  color: #1769ff;
  background: #eaf2ff;
}

.product-category-list span {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-category-list strong {
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
}

.auth-mode {
  --auth-card-width: 400px;
  --auth-content-width: 320px;
  --auth-horizontal-padding: 40px;
  min-height: 100vh;
  background-color: #071426;
  background-image: var(--login-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.auth-mode .app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 60% 40%;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.auth-mode .app-shell::before {
  content: none;
}

.auth-mode .toolbar {
  display: none;
  width: auto;
  margin: 0;
  margin-bottom: 0;
  padding: 0;
}

.auth-mode .brand-block {
  display: none;
}

.auth-mode .language-select span {
  color: #1a1a1a;
}

.auth-mode .language-select > span:first-child {
  display: none;
}

.auth-mode .language-select {
  position: static;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #1a1a1a;
  font-size: 14px;
}

.auth-mode .language-select select {
  display: none;
}

.auth-mode .language-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9aa7b8;
}

.language-links button {
  height: auto;
  border: 0;
  padding: 0;
  color: #1a1a1a;
  background: transparent;
  font-size: 14px;
  font-weight: 400;
}

.language-links button.active {
  color: #1769ff;
  font-weight: 700;
}

.auth-card-stage {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  justify-self: end;
  width: var(--auth-card-width);
  height: 620px;
  margin-right: clamp(48px, 9.375vw, 180px);
}

.auth-view {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.auth-view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.login-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
}

.auth-card-top {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 170px;
  padding: 28px var(--auth-horizontal-padding) 14px;
  background: transparent;
}

.auth-card-logo {
  display: block;
  width: 180px;
  height: auto;
}

.auth-card-top::after {
  content: "";
  display: block;
  flex: 0 0 3px;
  width: 50px;
  height: 3px;
  border-radius: 999px;
  background: #1769ff;
  box-shadow: none;
}

.auth-card-logo {
  object-fit: contain;
}

.auth-card-title {
  margin: 0;
  color: #1a1a1a;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  text-shadow: none;
}

.auth-card-title,
.auth-mode #registerPanel h2 {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
}

.language-en .auth-card-title {
  font-size: 20px;
  line-height: 1.16;
  max-width: var(--auth-content-width);
  text-align: center;
  white-space: normal;
}

#loginPanel .auth-card-title {
  font-size: 24px;
}

.auth-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 18px var(--auth-horizontal-padding) 12px;
}

.auth-mode #loginPanel h2 {
  display: none;
}

.auth-mode .login-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: var(--auth-content-width);
}

.auth-mode .login-row label span {
  display: none;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 400;
}

.auth-mode .login-row input {
  height: 52px;
  padding: 0 48px 0 46px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: #1a1a1a;
  background: #fff;
  font-size: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-mode .login-row input::placeholder {
  color: #9aa7b8;
  transition: color 0.18s ease, transform 0.18s ease;
}

.auth-mode .login-row input:focus,
.auth-mode .register-row input:focus,
.auth-mode .register-row select:focus {
  outline: none;
  border-color: #1769ff;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.14);
}

.auth-mode .login-row label,
.auth-mode .register-row label {
  position: relative;
}

.auth-mode .login-row label::before,
.auth-mode .register-row label::before {
  position: absolute;
  left: 17px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #9aa7b8;
  font-size: 18px;
}

.auth-mode .login-row label:nth-child(1)::before,
.auth-mode .register-row label:nth-child(1)::before {
  content: "👤";
}

.auth-mode .login-row label:nth-child(2)::before,
.auth-mode .register-row label:nth-child(3)::before {
  content: "🔒";
}

.auth-mode #loginButton {
  width: var(--auth-content-width);
  height: 54px;
  margin-top: 0;
  border-color: #1769ff;
  border-radius: 8px;
  background: #1769ff;
  box-shadow: none;
  font-size: 20px;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.auth-mode #loginButton:hover,
.auth-mode #registerButton:hover,
.auth-mode #showRegisterButton:hover,
.auth-mode #showLoginButton:hover {
  filter: brightness(1.08);
  transform: scale(1.02);
}

.auth-mode #loginButton:disabled,
.auth-mode #registerButton:disabled {
  cursor: wait;
  filter: saturate(0.85);
  transform: none;
}

.auth-switch {
  margin-top: 20px;
  width: var(--auth-content-width);
}

.auth-switch button {
  width: var(--auth-content-width);
  height: 50px;
  border: 1px solid #1769ff;
  border-radius: 8px;
  padding: 0 18px;
  color: #1769ff;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--auth-content-width);
  height: 24px;
  margin-top: 12px;
  color: #677489;
  font-size: 14px;
}

.remember-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remember-name input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: #1f6feb;
}

.remember-name span {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
}

.forgot-password-link {
  color: #1769ff;
  cursor: pointer;
}

.password-reset-note {
  color: #b45309;
  font-size: 14px;
}

.auth-language-slot {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-top: 0;
  min-height: 40px;
  width: var(--auth-content-width);
}

.auth-language-slot .language-select {
  width: 100%;
  justify-content: center;
}

.auth-language-shared {
  position: absolute;
  left: var(--auth-horizontal-padding);
  bottom: 12px;
  z-index: 5;
  margin-top: 0;
}

.auth-mode .message {
  margin-top: 12px;
  color: #ea5506;
  font-size: 14px;
}

.auth-mode .auth-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  display: block;
  color: #aaa;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

.auth-mode #registerPanel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: #1a1a1a;
  background: #fff;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
}

.register-card-top {
  position: relative;
  display: flex;
  flex: 0 0 170px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 28px var(--auth-horizontal-padding) 14px;
}

.register-card-top::after {
  content: "";
  display: block;
  flex: 0 0 3px;
  width: 50px;
  height: 3px;
  border-radius: 999px;
  background: #1769ff;
  box-shadow: none;
}

.auth-mode #registerPanel h2 {
  margin: 0;
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.language-en #registerPanel h2 {
  font-size: 24px;
}

.register-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 12px var(--auth-horizontal-padding);
}

.auth-mode .register-row label span {
  display: none;
}

.auth-mode .register-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: var(--auth-content-width);
}

.auth-mode .register-row input,
.auth-mode .register-row select {
  height: 52px;
  padding: 0 48px 0 46px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: #1a1a1a;
  background: #fff;
  font-size: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-mode .register-row input::placeholder {
  color: #9aa7b8;
}

.auth-mode .register-row select {
  padding-right: 18px;
  color: #677489;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #677489;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  line-height: 32px;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: #1769ff;
  background: #eef4ff;
}

.profile-password-fields .profile-password-eye {
  top: auto;
  right: 8px;
  bottom: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: none;
}

.auth-mode .register-row label:nth-child(2)::before {
  content: "▦";
}

.auth-mode .register-row label:nth-child(3)::before,
.auth-mode #toggleRegisterPasswordButton {
  top: 26px;
}

.register-password-strength {
  gap: 2px;
  margin-top: 4px;
  font-size: 11px;
}

.auth-mode .register-row .register-password-strength span {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.register-password-strength .profile-strength-bars {
  gap: 3px;
}

.register-password-strength .profile-strength-bars span {
  display: block;
  height: 4px;
}

.auth-mode #registerButton,
.auth-mode #showLoginButton {
  width: var(--auth-content-width);
  height: 54px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.auth-mode #registerButton {
  border-color: #1769ff;
  background: #1769ff;
  box-shadow: none;
}

.auth-mode #showLoginButton {
  margin-top: 10px;
  border-color: #1769ff;
  color: #1769ff;
  background: transparent;
}

.auth-mode #registerMessage {
  display: flex;
  width: var(--auth-content-width);
  min-height: 40px;
  max-height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
}

.login-grid,
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.login-row {
  grid-template-columns: minmax(220px, 280px) minmax(220px, 280px) 120px;
  align-items: end;
}

.register-row {
  grid-template-columns: minmax(180px, 240px) minmax(180px, 220px) minmax(180px, 240px) 150px;
  align-items: end;
}

.register-entry-button {
  margin-top: 14px;
}

.back-login-button {
  margin-top: 14px;
}

.import-row {
  display: block;
}

.import-template-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.import-control-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.import-template-actions button,
.import-control-row button {
  width: 132px;
  min-height: 36px;
  justify-content: center;
}

.import-file-label {
  min-width: 0;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.file-picker span {
  display: inline;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: 400;
}

#loginBackgroundFileNameText,
#menuBackgroundFileNameText {
  color: #5b6776;
  font-size: 14px;
}

#chooseLoginBackgroundButton,
#uploadLoginBackgroundButton,
#clearLoginBackgroundButton,
#importPricesButton,
#clearPricesButton {
  font-size: 14px;
  line-height: 1;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: #4f5d6f;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

input,
select {
  height: 38px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.cart-tools .inline-check {
  font-size: 14px;
}

.result-wrap input[type="checkbox"] {
  width: 21px;
  height: 21px;
  padding: 0;
  margin: 0;
}

.language-en .result-wrap input[type="checkbox"] {
  width: 21px;
  height: 21px;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-conversion-hint {
  padding: 7px 10px;
  color: #526a84;
  background: #f4f8fc;
  border: 1px solid #d6e2ef;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
}

.cart-actions .inline-check {
  margin-left: 4px;
}

.cart-actions #exportButton,
.cart-actions #clearCartButton {
  width: 132px;
  min-height: 36px;
  justify-content: center;
}

.cart-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

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

.quote-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.quote-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  color: #12233d;
  font-size: 16px;
  font-weight: 800;
}

.quote-card-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #2f6fd6;
  background: #eef5ff;
  font-size: 14px;
}

.quote-card input,
.quote-card textarea {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #f3f6fa;
  color: #17202a;
}

.quote-card input {
  height: 42px;
}

.quote-card textarea {
  min-height: 86px;
  padding: 12px;
  resize: vertical;
}

.quote-terms-card {
  gap: 10px;
}

.quote-terms-card > label {
  display: none;
}

.quote-terms-list {
  display: grid;
  gap: 0;
  color: #111827;
  font-size: 14px;
}

.quote-terms-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid #e3e8f0;
  padding: 5px 0;
}

.quote-terms-list div:last-child {
  border-bottom: 0;
}

.quote-terms-list strong {
  color: #4f5d6f;
  font-size: 14px;
  font-weight: 700;
}

.quote-terms-list span {
  color: #4f5d6f;
  font-size: 14px;
  line-height: 1.45;
}

.quote-terms-list span[contenteditable="true"] {
  cursor: text;
}

.quote-terms-list span[contenteditable="true"]:focus {
  border-radius: 4px;
  outline: 1px solid #2f6fd6;
  background: #f5f8ff;
}

.quote-summary-card {
  gap: 14px;
}

.quote-summary-row,
.quote-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #4f5d6f;
  font-size: 14px;
}

.quote-summary-row strong {
  color: #111827;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.quote-summary-input {
  width: 88px;
  min-width: 88px;
  flex: 0 0 88px;
  height: 32px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 0 10px;
  color: #111827;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 14px;
  text-align: right;
  background: #fff;
}

.quote-summary-input:focus {
  border-color: #2f6fd6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 214, 0.12);
}

.quote-summary-total {
  border-top: 2px solid #2f6fd6;
  padding-top: 14px;
  color: #12233d;
  font-weight: 800;
}

.quote-summary-total strong {
  color: #2f6fd6;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 20px;
}

.quote-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quote-action-grid button,
.quote-submit-button {
  height: 44px;
  border-radius: 12px;
}

.quote-submit-button {
  width: 100%;
  border-color: #0f1f33;
  background: #0f1f33;
}

.quote-history-heading,
.quote-history-tabs,
.quote-history-item > div {
  display: flex;
  align-items: center;
}

.quote-history-heading {
  justify-content: space-between;
  gap: 10px;
}

.quote-history-heading h3 {
  margin: 0;
}

.quote-history-tabs {
  gap: 6px;
}

.quote-history-tabs button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
}

.quote-history-tabs button.active {
  color: #fff;
  background: #2f6fd6;
}

.quote-history-list {
  max-height: 320px;
  display: grid;
  gap: 8px;
  overflow: auto;
  color: #718096;
  font-size: 12px;
}

.quote-records-panel {
  max-width: 1180px;
  padding: 24px;
  background: #f4f7fb;
}

.quote-records-panel .quote-history-list {
  max-height: none;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.appearance-workbench { grid-template-columns: 220px minmax(420px, 1fr); }

@media (max-width: 820px) {
  .quote-records-panel { padding: 14px; }
  .quote-records-panel .quote-history-list { grid-template-columns: 1fr; }
}

.quote-history-item {
  padding: 10px;
  display: grid;
  gap: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.quote-history-item > div {
  justify-content: space-between;
  gap: 8px;
}

.quote-history-item strong,
.quote-history-item b {
  color: #16335b;
}

.quote-history-item button {
  min-height: 34px;
  font-size: 11px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  background: #fff;
}

.result-wrap table {
  min-width: 1480px;
  table-layout: fixed;
}

.cart-table {
  min-width: 1840px;
}

.cart-table th,
.cart-table td,
.cart-table input,
.result-wrap th,
.result-wrap td,
.result-wrap input {
  font-size: 14px;
}

.result-wrap th,
.result-wrap td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-wrap th {
  text-align: center;
}

.result-wrap td {
  text-align: center;
}

.result-wrap th[data-column="select"],
.result-wrap td[data-column="select"] {
  width: 52px;
  padding-inline: 6px;
  text-align: center;
}

.result-wrap th[data-column="rowNumber"],
.result-wrap td[data-column="rowNumber"] {
  width: 54px;
  padding-inline: 6px;
}

.result-wrap th[data-column="category"],
.result-wrap td[data-column="category"] {
  width: 108px;
}

.result-wrap th[data-column="productName"],
.result-wrap td[data-column="productName"] {
  width: 188px;
}

.result-wrap th[data-column="productModel"],
.result-wrap td[data-column="productModel"] {
  width: 126px;
}

.result-wrap th[data-column="sapCode"],
.result-wrap td[data-column="sapCode"] {
  width: 124px;
}

.result-wrap th[data-column="inventoryQuantity"],
.result-wrap td[data-column="inventoryQuantity"] {
  width: 86px;
  text-align: center;
}

.result-wrap th[data-column="productSpecSize"],
.result-wrap td[data-column="productSpecSize"] {
  width: 180px;
}

.result-wrap th[data-column="price1To49"],
.result-wrap td[data-column="price1To49"],
.result-wrap th[data-column="price50To199"],
.result-wrap td[data-column="price50To199"],
.result-wrap th[data-column="price200Plus"],
.result-wrap td[data-column="price200Plus"],
.result-wrap th[data-column="untaxedCostPrice"],
.result-wrap td[data-column="untaxedCostPrice"] {
  width: 132px;
  text-align: right;
}

.result-wrap th[data-column="price1To49"],
.result-wrap th[data-column="price50To199"],
.result-wrap th[data-column="price200Plus"],
.result-wrap th[data-column="untaxedCostPrice"] {
  overflow: visible;
  white-space: normal;
  line-height: 1.25;
}

.result-price-heading,
.result-stacked-heading {
  display: inline-grid;
  gap: 2px;
  justify-items: end;
  line-height: 1.2;
}

.result-stacked-heading {
  justify-items: center;
}

.result-wrap th[data-column="material"],
.result-wrap td[data-column="material"] {
  width: 116px;
}

.result-wrap th[data-column="cartonQuantity"],
.result-wrap td[data-column="cartonQuantity"],
.result-wrap th[data-column="cartonGrossWeight"],
.result-wrap td[data-column="cartonGrossWeight"] {
  width: 88px;
  text-align: center;
}

.result-wrap th[data-column="cartonSize"],
.result-wrap td[data-column="cartonSize"] {
  width: 126px;
}

.cart-table th:nth-child(1),
.cart-table th:nth-child(2),
.cart-table td {
  text-align: center;
}

.cart-table th {
  text-align: center;
}

.cart-table th:nth-child(6),
.cart-table td:nth-child(6),
.cart-table td:nth-child(7),
.cart-table td:nth-child(8),
.cart-table td:nth-child(9) {
  text-align: right;
}

th,
td {
  border-bottom: 1px solid #e7edf4;
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: #425066;
  background: #eef3f8;
  font-size: 13px;
}

.number {
  text-align: right;
}

.center {
  text-align: center;
}

.cart-quantity,
.cart-price {
  width: 88px;
  text-align: right;
}

.price-cell {
  line-height: 1.7;
  min-width: 170px;
}

.cart-remark-column {
  display: none;
}

.cart-remark {
  width: 220px;
}

.user-editor {
  display: grid;
  gap: 12px;
}

.user-editor-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.user-editor-top label {
  width: min(320px, 100%);
}

.user-editor-panel {
  display: grid;
  gap: 12px;
}

.super-admin-note {
  font-size: 14px;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.permission-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.permission-box .inline-check {
  font-size: 14px;
}

.system-settings-panel,
.module-management-panel {
  margin-bottom: 10px;
}

.system-settings-panel .section-heading h2,
.module-management-panel .section-heading h2 {
  font-size: 18px;
}

.system-settings-panel .section-heading p,
.module-management-panel .section-heading p {
  font-size: 12px;
}

.system-setting-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.system-setting-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.system-setting-card > div:first-child span {
  color: #5b6776;
  font-size: 12px;
}

.system-setting-card .file-picker {
  grid-column: 2 / 3;
  grid-row: 1;
  align-self: center;
}

.system-setting-actions {
  grid-column: 3 / 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.quote-template-language-field,
.quote-template-form-grid label,
.quote-template-column-grid label,
.quote-template-history-row label,
.quote-template-terms-field {
  display: grid;
  gap: 6px;
  color: #4d5a70;
  font-size: 13px;
  font-weight: 700;
}

.quote-template-language-field select {
  min-width: 180px;
  height: 38px;
}

.quote-template-editor-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  padding: 18px;
}

.quote-template-editor-card .file-picker,
.quote-template-editor-card .system-setting-actions {
  grid-column: auto;
  grid-row: auto;
}

.quote-template-editor-card h3 {
  margin: 0;
  color: #12233d;
}

.quote-template-upload-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px dashed #9bb8df;
  border-radius: 12px;
  background: #f8fbff;
}

.quote-template-upload-box p,
.quote-template-placeholder-help p {
  margin: 5px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.quote-template-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quote-template-placeholder-help {
  padding: 12px 14px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  color: #31445f;
  background: #fff;
}

.quote-template-placeholder-help summary {
  cursor: pointer;
  font-weight: 700;
}

.quote-template-placeholder-help code {
  color: #0754b4;
  font-family: Consolas, monospace;
  overflow-wrap: anywhere;
}

.quote-template-status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #315078;
  background: #f3f7fd;
}

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

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

.quote-template-form-grid .wide {
  grid-column: 1 / -1;
}

.quote-template-form-grid input,
.quote-template-column-grid input,
.quote-template-history-row select,
.quote-template-terms-field textarea,
.quote-template-language-field select {
  width: 100%;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 8px 10px;
  color: #172033;
  background: #fff;
}

.quote-template-form-grid input,
.quote-template-column-grid input {
  height: 38px;
}

.quote-template-form-grid input[type="color"] {
  padding: 3px;
}

.quote-template-terms-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.quote-template-history-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.quote-template-actions {
  flex-wrap: wrap;
}

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

@media (max-width: 620px) {
  .quote-template-form-grid,
  .quote-template-column-grid,
  .quote-template-assets-grid,
  .quote-template-history-row {
    grid-template-columns: 1fr;
  }

  .quote-template-status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.module-management-card {
  grid-template-columns: minmax(320px, 1fr) auto;
}

.module-management-options {
  display: grid;
  grid-column: 1 / 2;
  grid-row: 1;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px 14px;
}

.module-option {
  margin: 0;
  color: #17202a;
  font-size: 14px;
  white-space: nowrap;
}

.module-placeholder-panel {
  min-height: 220px;
}

.module-placeholder-panel .section-heading {
  min-height: 160px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.exchange-rate-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 200px auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.exchange-rate-panel {
  margin-bottom: 10px;
  padding: 10px 14px;
}

.exchange-rate-panel .section-heading {
  margin-bottom: 5px;
}

.exchange-rate-panel .section-heading h2 {
  margin-bottom: 2px;
}

.exchange-rate-panel .section-heading p {
  font-size: 12px;
  line-height: 1.25;
}

.exchange-rate-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exchange-rate-copy span {
  color: #5b6776;
  font-size: 12px;
}

.exchange-rate-field {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 8px;
}

.exchange-rate-field span {
  display: inline;
  margin-bottom: 0;
}

.exchange-rate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exchange-rate-field input,
.exchange-rate-actions button {
  height: 32px;
}

.danger-button {
  border-color: #b42318;
  background: #b42318;
}

.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: #6a7686;
}

.result-meta,
.pagination {
  margin: 12px 0;
}

.result-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.result-page-size {
  justify-self: end;
}

.result-count-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.result-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #17202a;
  font-weight: 400;
}

.result-page-size span {
  display: inline;
  margin-bottom: 0;
  color: #17202a;
  font-size: inherit;
  font-weight: 400;
}

.result-page-size select {
  width: 76px;
}

.page-info-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}

.page-icon-button {
  width: 42px;
  padding: 0;
}

@media (min-width: 901px) and (max-width: 1500px) {
  :root {
    --profile-panel-right: 24px;
    --profile-panel-width: min(360px, calc(100vw - 340px));
    --profile-panel-gap: 14px;
    --profile-password-width: 252px;
  }

  .user-profile-popover {
    top: 78px;
  }

  .profile-password-panel {
    top: 138px;
    padding: 24px;
  }
}

@media (max-width: 900px) {
  body:not(.auth-mode) .product-library-layout {
    display: block;
  }

  body:not(.auth-mode) .product-detail-panel {
    display: none;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-category-sidebar {
    display: none;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .category-filter-field {
    display: grid;
  }

  .auth-mode .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-card-stage {
    grid-column: 1;
    justify-self: center;
    width: min(var(--auth-card-width), calc(100vw - 32px));
    margin-right: 0;
  }

  .user-profile-popover,
  .profile-password-panel {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 92px);
    overflow: auto;
    padding: 22px;
  }

  .profile-password-panel {
    z-index: 140;
  }

  .profile-popover-head {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
  }

  .profile-avatar-large {
    width: 96px;
    height: 96px;
  }

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

  body:not(.auth-mode) .toolbar {
    margin-left: 0;
    height: auto;
    min-height: 72px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px 12px;
  }

  body:not(.auth-mode) #appPanel {
    margin-left: 0;
    padding: 12px 14px 28px;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] {
    display: block;
  }

  .app-sidebar {
    display: none;
  }

  .module-management-card,
  .system-setting-card {
    grid-template-columns: 1fr;
  }

  .module-management-options,
  .system-setting-card .file-picker,
  .system-setting-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .module-management-options {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .toolbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .brand-block {
    --logo-size: 65px;
  }

  body:not(.auth-mode) .brand-block {
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  body:not(.auth-mode) .brand-logo {
    display: block;
    width: 38px;
    height: 38px;
  }

  body:not(.auth-mode) .toolbar h1 {
    min-height: 0;
    font-size: 18px;
    line-height: 1.25;
  }

  body:not(.auth-mode) .toolbar-actions {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 8px;
    border-top: 1px solid #edf1f6;
    padding-top: 8px;
  }

  body:not(.auth-mode) .notification-button {
    flex: 0 0 34px;
  }

  body:not(.auth-mode) .account-bar {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
    gap: 8px;
  }

  body:not(.auth-mode) #currentUserText {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.auth-mode) #logoutButton {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 10px;
  }

  .toolbar-actions {
    align-items: center;
  }

  .language-select,
  .mobile-hide-filter,
  .result-count-group .inline-check,
  .page-info-group .page-icon-button {
    display: none;
  }

  .auth-mode .toolbar {
    align-items: center;
    flex-direction: row;
  }

  .auth-mode .language-select {
    display: inline-flex;
  }

  .auth-mode .app-shell {
    padding-bottom: 78px;
  }

  .auth-mode .auth-footer {
    left: 14px;
    right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
    word-break: keep-all;
  }

  .result-page-size span {
    font-size: inherit;
  }

  .result-meta {
    grid-template-columns: auto auto auto;
    gap: 8px;
    font-size: clamp(11px, 3.2vw, 14px);
    overflow: hidden;
  }

  .result-count-group,
  .page-info-group,
  .result-page-size {
    min-width: 0;
    white-space: nowrap;
  }

  .result-page-size {
    gap: 4px;
  }

  .result-page-size select {
    width: 58px;
    height: 32px;
    padding: 0 6px;
    font-size: inherit;
  }

  .result-count-group {
    gap: 4px;
  }

  .login-grid,
  .import-row,
  .filters {
    grid-template-columns: 1fr;
  }

  .import-control-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .import-template-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .user-editor-top {
    align-items: stretch;
    flex-direction: column;
  }

  .exchange-rate-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .exchange-rate-actions {
    flex-wrap: wrap;
  }

  .user-editor-top label {
    width: 100%;
  }

  .user-actions {
    justify-content: flex-start;
  }

  .import-panel,
  .exchange-rate-panel,
  .system-settings-panel,
  .cart-panel,
  .result-wrap th:first-child,
  .result-wrap td:first-child {
    display: none;
  }

  .result-row-selected td {
    background: #fff1a8;
  }
}

@media (pointer: coarse) {
  .system-settings-panel {
    display: none !important;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .brand-block {
    --title-size: calc(var(--logo-size) * 0.4);
  }

  .toolbar {
    align-items: center;
    flex-direction: row;
  }

  .toolbar-actions {
    align-items: center;
    flex-direction: row;
  }

  .language-en .app-shell {
    width: min(100% - 28px, 1440px);
    margin: 18px auto;
  }

  .language-en .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .language-en .brand-block {
    align-items: center;
    flex: 1 1 auto;
    gap: 12px;
    min-width: 0;
  }

  .language-en .toolbar h1 {
    --title-size: calc(var(--logo-size) * 0.4);
    font-size: var(--title-size);
    line-height: 1.2;
    white-space: nowrap;
  }

  .language-en .toolbar p {
    display: none;
  }

  .language-en .toolbar-actions {
    align-items: center;
    justify-content: flex-end;
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }

  .language-en .language-select {
    display: inline-flex;
    min-width: 128px;
  }

  .language-en .account-bar {
    display: inline-flex;
    justify-content: flex-end;
    white-space: nowrap;
  }

  .language-en .section-heading {
    align-items: flex-start;
    flex-direction: row;
  }

  .language-en .login-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .language-en .register-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .language-en .filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .language-en .mobile-hide-filter {
    display: block;
  }

  .language-en .result-count-group .inline-check,
  .language-en .page-info-group .page-icon-button {
    display: inline-flex;
  }

  .language-en .result-meta {
    grid-template-columns: minmax(170px, 1fr) auto minmax(120px, 1fr);
    font-size: 13px;
  }

  .language-en .cart-panel,
  .language-en .import-panel,
  .language-en .exchange-rate-panel {
    display: block;
  }

  .language-en .cart-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .language-en .cart-actions button {
    padding: 0 10px;
  }

  .language-en .import-row {
    grid-template-columns: 1fr;
  }

  .language-en .import-control-row {
    justify-content: flex-start;
  }

  .language-en .exchange-rate-card {
    grid-template-columns: minmax(180px, 1fr) 180px auto;
  }

  .language-en .result-wrap th:first-child,
  .language-en .result-wrap td:first-child {
    display: table-cell;
  }
}

@media (min-width: 1025px) and (max-width: 1366px) and (orientation: landscape) {
  .brand-block {
    --title-size: calc(var(--logo-size) * 0.4);
  }

  .toolbar {
    align-items: center;
  }

  .toolbar-actions {
    align-items: center;
  }

  .language-en .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .language-en .brand-block {
    align-items: center;
    min-width: 0;
  }

  .language-en .toolbar h1 {
    --title-size: calc(var(--logo-size) * 0.4);
    font-size: var(--title-size);
    line-height: 1.2;
    white-space: nowrap;
  }

  .language-en .toolbar p {
    display: none;
  }

  .language-en .toolbar-actions {
    align-items: center;
    justify-content: flex-end;
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }

  .language-en .account-bar {
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 1440px);
    margin: 12px auto;
  }

  .toolbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .brand-block {
    gap: 10px;
  }

  .brand-block {
    --logo-size: 54px;
  }

  .toolbar h1 {
    font-size: 20px;
    line-height: 1.25;
  }

  .toolbar p {
    font-size: 12px;
    line-height: 1.45;
  }

  .account-bar {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5em;
    width: 100%;
  }

  .auth-mode .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    width: min(100% - 28px, 390px);
    min-height: 100svh;
    margin: 0 auto;
    padding: 14px 0 78px;
  }

  .auth-mode .toolbar {
    display: none;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .auth-mode .brand-block {
    display: none;
  }

  .auth-mode .language-select {
    min-width: auto;
    padding: 6px 8px;
  }

  .auth-mode .language-select span {
    font-size: 12px;
  }

  .auth-card-stage {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    margin: 0;
  }

  .auth-view {
    height: auto;
    align-self: stretch;
  }

  .login-card {
    border-radius: 18px;
  }

  .auth-mode #registerPanel {
    border-radius: 18px;
  }

  .register-card-top {
    flex-basis: auto;
    padding: 32px 24px 18px;
  }

  .auth-mode #registerPanel h2 {
    font-size: 22px;
  }

  .language-en #registerPanel h2 {
    font-size: 24px;
  }

  .register-card-body {
    display: flex;
    padding: 20px 22px 26px;
  }

  .auth-card-top {
    height: auto;
    gap: 12px;
    padding: 28px 22px 14px;
  }

  .auth-card-logo {
    width: min(150px, 48vw);
    height: auto;
  }

  .auth-card-title {
    font-size: 22px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  #loginPanel .auth-card-title {
    font-size: 22px;
  }

  .language-en .auth-card-title {
    font-size: 20px;
  }

  .auth-card-body {
    display: flex;
    padding: 20px 22px 26px;
  }

  .auth-language-slot {
    width: 100%;
    min-height: 40px;
  }

  .auth-language-shared {
    left: 22px;
    bottom: 26px;
    width: calc(100% - 44px);
  }

  .auth-mode .login-row {
    width: 100%;
    gap: 16px;
  }

  .auth-mode #loginButton {
    width: 100%;
    height: 52px;
    font-size: 18px;
  }

  .auth-switch,
  .auth-switch button,
  .auth-extra-row {
    width: 100%;
  }

  .auth-switch {
    margin-top: 16px;
  }

  .auth-extra-row {
    margin-top: 10px;
    font-size: 13px;
  }

  .auth-mode .register-row,
  .auth-mode #registerButton,
  .auth-mode #showLoginButton {
    width: 100%;
  }

  .auth-mode #showLoginButton {
    margin-top: 10px;
  }

  .auth-mode #registerMessage {
    min-height: 0;
    max-height: none;
    flex-basis: auto;
    margin-top: 8px;
    overflow: visible;
  }

  .auth-mode .auth-footer {
    bottom: calc(10px + env(safe-area-inset-bottom));
    font-size: 11px;
    line-height: 1.45;
  }
}
/* User management */
#settingsNavButton.active{background:#0b3b82}.user-management-heading{margin-bottom:18px}.user-management-heading h2{font-size:27px!important}.user-management-heading p{font-size:14px!important}.user-management-heading-actions{display:flex;gap:12px}.user-management-layout{display:grid;grid-template-columns:minmax(0,1fr) 288px;align-items:start;gap:18px}.user-management-main{min-width:0;display:grid;gap:14px}.user-summary{display:grid;grid-template-columns:repeat(4,1fr);min-height:92px;background:#fff;border:1px solid #d6e0eb;border-radius:6px}.user-summary>div{padding:16px 18px;display:grid;align-content:center;gap:8px}.user-summary>div+div{border-left:1px solid #d6e0eb}.user-summary span{color:#6b7d94;font-size:12px}.user-summary strong{color:#122138;font-size:22px}.user-management-filters{padding:10px;display:grid;grid-template-columns:130px 140px minmax(220px,1fr) 90px;gap:8px;background:#fff;border:1px solid #d6e0eb;border-radius:6px}.user-management-filters select,.user-management-filters input,.user-management-filters button{height:38px;min-width:0}.user-table-shell{overflow-x:auto;background:#fff;border:1px solid #d6e0eb;border-radius:6px}.user-management-table{width:100%;border-collapse:collapse}.user-management-table th{height:48px;padding:0 10px;color:#6b7d94;background:#f7fafc;font-size:12px;text-align:left}.user-management-table td{height:58px;padding:0 10px;color:#6b7d94;border-top:1px solid #d6e0eb;font-size:12px;white-space:nowrap}.user-management-table td strong{color:#122138}.user-management-table tr.selected td{background:#e8f5ff}.user-edit-link{padding:4px 8px;color:#0a75cf;background:transparent;border:0;font-size:12px}.user-status{font-weight:500}.user-status-active{color:#179c67}.user-status-pending{color:#b7791f}.user-status-disabled{color:#64748b}.user-alert-rail{padding:18px 20px;background:#fff;border:1px solid #d6e0eb;border-radius:6px}.user-alert-rail h3{margin:0 0 8px;color:#122138;font-size:16px}.user-alert-rail article{padding:14px 0;display:grid;gap:7px;border-top:1px solid #d6e0eb}.user-alert-rail article strong{color:#122138;font-size:13px}.user-alert-rail article span{color:#6b7d94;font-size:12px;line-height:1.5}.user-detail-card{padding:16px;background:#fff;border:1px solid #d6e0eb;border-radius:6px}.user-detail-heading{margin-bottom:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.user-detail-heading>div:first-child{display:grid;gap:4px}.user-detail-heading strong{color:#122138;font-size:15px}.user-detail-heading span{color:#6b7d94;font-size:11px}.admin-panel>.message{margin-top:10px}.sidebar-subnav-button{padding-left:34px!important}.sidebar-subnav-button .nav-icon{width:16px;height:16px}.sidebar-subnav-button.active{box-shadow:inset 4px 0 #1aa1ff}
@media(max-width:1100px){.user-management-layout{grid-template-columns:1fr}.user-alert-rail{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.user-alert-rail h3{grid-column:1/-1}.user-management-filters{grid-template-columns:1fr 1fr}.user-management-filters input{grid-column:1/-1}}
@media(max-width:760px){.user-summary{grid-template-columns:1fr 1fr}.user-summary>div:nth-child(3){border-left:0;border-top:1px solid #d6e0eb}.user-summary>div:nth-child(4){border-top:1px solid #d6e0eb}.user-management-filters{grid-template-columns:1fr}.user-management-filters input{grid-column:auto}.user-alert-rail{grid-template-columns:1fr}.user-alert-rail h3{grid-column:auto}.user-detail-heading{flex-direction:column}}

.user-management-layout{grid-template-columns:minmax(0,1fr)}.user-edit-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 48px);padding:22px;background:#fff;border:1px solid #d6e0eb;border-radius:8px;box-shadow:0 20px 60px rgba(15,35,58,.22)}.user-edit-dialog::backdrop{background:rgba(5,38,64,.38)}.user-edit-dialog .user-detail-heading{padding-bottom:14px;border-bottom:1px solid #d6e0eb}.user-edit-dialog .user-actions{margin:14px 0;justify-content:flex-start}.user-edit-dialog .user-editor-panel{max-height:50vh;overflow:auto}.user-edit-dialog #adminUserDialogClose{width:34px;height:34px;padding:0;font-size:20px}

/* Document template management */
.exchange-rate-panel{padding:24px;background:#f4f7fb}.exchange-rate-heading{margin-bottom:16px}.exchange-rate-heading h2{margin:0;color:#122138;font-size:27px}.exchange-rate-heading p{margin:5px 0 0;color:#6b7d94;font-size:14px}.exchange-rate-layout{display:grid;grid-template-columns:minmax(560px,1fr) 280px;align-items:start;gap:16px}.exchange-rate-main{display:grid;gap:14px}.exchange-rate-summary{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border:1px solid #d6e0eb;border-radius:6px}.exchange-rate-summary>div{padding:16px 18px;display:grid;gap:9px}.exchange-rate-summary>div+div{border-left:1px solid #d6e0eb}.exchange-rate-summary span{color:#6b7d94;font-size:11px}.exchange-rate-summary strong{color:#122138;font-size:14px}.exchange-rate-summary .rate-active-text{color:#128f4f}.exchange-rate-table-card,.exchange-rate-rail{background:#fff;border:1px solid #d6e0eb;border-radius:6px}.exchange-rate-table-title{padding:16px 18px;border-bottom:1px solid #d6e0eb}.exchange-rate-table-title>div{display:grid;gap:5px}.exchange-rate-table-title strong{color:#122138;font-size:16px}.exchange-rate-table-title span{color:#6b7d94;font-size:11px}.exchange-rate-table-head,.exchange-rate-table-row{display:grid;grid-template-columns:90px 1fr 180px 90px;align-items:center;gap:12px;padding:0 16px}.exchange-rate-table-head{height:46px;color:#6b7d94;background:#f7fafc;font-size:12px}.exchange-rate-table-row{min-height:64px;color:#6b7d94;border-top:1px solid #d6e0eb;font-size:13px}.exchange-rate-table-row strong{color:#122138}.exchange-rate-table-row input{width:150px;height:38px}.rate-status-badge{justify-self:start;padding:5px 10px;color:#128f4f;background:#e8faf0;border-radius:4px;font-size:11px;font-weight:700}.exchange-rate-rail{padding:18px}.exchange-rate-rail h3{margin:0 0 10px;color:#122138;font-size:16px}.exchange-rate-rail article{padding:14px 0;display:grid;gap:7px;border-top:1px solid #d6e0eb}.exchange-rate-rail article strong{color:#122138;font-size:13px}.exchange-rate-rail article span{color:#6b7d94;font-size:12px;line-height:1.6}.exchange-rate-rail>.message{display:block;margin-top:8px}@media(max-width:1050px){.exchange-rate-layout{grid-template-columns:1fr}.exchange-rate-rail{display:grid;grid-template-columns:1fr 1fr;gap:12px}.exchange-rate-rail h3,.exchange-rate-rail>.message{grid-column:1/-1}}@media(max-width:720px){.exchange-rate-panel{padding:14px}.exchange-rate-summary{grid-template-columns:1fr 1fr}.exchange-rate-summary>div:nth-child(3){border-left:0;border-top:1px solid #d6e0eb}.exchange-rate-summary>div:nth-child(4){border-top:1px solid #d6e0eb}.exchange-rate-table-card{overflow-x:auto}.exchange-rate-table-head,.exchange-rate-table-row{min-width:620px}.exchange-rate-rail{grid-template-columns:1fr}}


/* Document template management */
.category-column-rules-panel{padding:24px;background:#f4f7fb}.category-rules-heading{margin-bottom:16px}.category-rules-heading h2{margin:0;color:#152238;font-size:27px}.category-rules-heading p{margin:5px 0 0;color:#788ba5;font-size:14px}.category-rules-actions{display:flex;gap:10px}.category-rules-workspace{display:grid;grid-template-columns:500px minmax(0,1fr);gap:14px}.category-rules-list,.category-rules-editor{background:#fff;border:1px solid #d5e0ec;border-radius:7px}.category-rules-list{padding:12px;display:grid;align-content:start;gap:6px}.category-rules-list button{min-height:40px;padding:0 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;color:#5f6f86;background:transparent;border:0;border-radius:7px;box-shadow:none;text-align:left;font-size:13px;font-weight:700}.category-rules-list button:hover{color:#2479c8;background:#f3f8fd;transform:none}.category-rules-list button.active{color:#2479c8;background:#eaf4fc}.category-rules-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.category-rules-list strong{font-size:11px}.category-rules-editor{padding:18px}.category-rules-editor-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:16px;border-bottom:1px solid #d5e0ec}.category-rules-editor-head>div{display:grid;gap:4px}.category-rules-editor-head strong{color:#152238;font-size:16px}.category-rules-editor-head span{color:#788ba5;font-size:12px}.category-rule-columns{padding-top:16px;display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:10px}.category-rule-column{min-height:42px;padding:0 12px;display:flex;align-items:center;gap:10px;color:#152238;background:#f8fafd;border:1px solid #d5e0ec;border-radius:7px;font-size:13px;font-weight:700}.category-rule-column input{width:16px;height:16px}.category-rules-editor>.message{display:block;margin-top:14px}@media(max-width:900px){.category-rules-workspace{grid-template-columns:1fr}.category-rule-columns{grid-template-columns:1fr 1fr}.category-rules-heading{align-items:flex-start;flex-direction:column}.category-rules-actions{width:100%;justify-content:flex-end}}@media(max-width:600px){.category-column-rules-panel{padding:14px}.category-rule-columns{grid-template-columns:1fr}.category-rules-actions{display:grid;grid-template-columns:1fr 1fr}}
.system-dictionary-panel{padding:24px;background:#f4f7fb}.dictionary-heading{margin-bottom:16px}.dictionary-heading h2{margin:0;color:#152238;font-size:27px}.dictionary-heading p{margin:5px 0 0;color:#788ba5;font-size:14px}.dictionary-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px}.dictionary-type-list,.dictionary-editor{background:#fff;border:1px solid #d5e0ec;border-radius:7px}.dictionary-type-list{padding:12px;display:grid;align-content:start;gap:6px}.dictionary-type-list button{min-height:40px;padding:0 12px;color:#5f6f86;background:transparent;border:0;border-radius:7px;text-align:left;font-size:13px;font-weight:700}.dictionary-type-list button:hover{color:#2479c8;background:#f3f8fd;transform:none}.dictionary-type-list button.active{color:#2479c8;background:#eaf4fc}.dictionary-editor{padding:18px}.dictionary-editor-head{display:grid;gap:14px;padding-bottom:16px;border-bottom:1px solid #d5e0ec}.dictionary-editor-head>div:first-child{display:grid;gap:4px}.dictionary-editor-head strong{color:#152238;font-size:16px}.dictionary-editor-head span{color:#788ba5;font-size:12px}.dictionary-add-row{display:grid;grid-template-columns:1fr 1fr auto;gap:10px}.dictionary-add-row input{height:38px}.dictionary-table-wrap{margin-top:16px;max-height:560px;overflow:auto;border:1px solid #d5e0ec;border-radius:7px}.dictionary-table{width:100%;border-collapse:collapse;background:#fff}.dictionary-table th,.dictionary-table td{padding:10px 12px;border-bottom:1px solid #edf2f7;text-align:left;font-size:13px}.dictionary-table th{color:#50627a;background:#eef3f8;font-weight:700}.dictionary-table input{width:100%;height:34px;border:1px solid #d5e0ec;border-radius:6px;padding:0 10px}.dictionary-table td:last-child{width:100px;text-align:center}.dictionary-remove-button{height:32px;padding:0 12px}.dictionary-empty{text-align:center!important;color:#788ba5}@media(max-width:900px){.dictionary-workspace{grid-template-columns:1fr}.dictionary-add-row{grid-template-columns:1fr 1fr}.dictionary-add-row button{grid-column:1/-1}}@media(max-width:600px){.system-dictionary-panel{padding:14px}.dictionary-add-row{grid-template-columns:1fr}.dictionary-table-wrap{max-height:none}}
.dictionary-filter-row{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dictionary-filter-row input{width:min(260px,100%);height:36px;border:1px solid #d5e0ec;border-radius:7px;padding:0 12px;color:#152238;background:#fff;font-size:13px}.dictionary-filter-row input:focus{border-color:#1677ff;outline:none;box-shadow:0 0 0 3px rgba(22,119,255,.12)}.dictionary-filter-row span{color:#788ba5;font-size:12px;white-space:nowrap}@media(max-width:600px){.dictionary-filter-row{align-items:stretch;flex-direction:column}.dictionary-filter-row input{width:100%}.dictionary-filter-row span{align-self:flex-end}}
.module-management-panel{padding:24px;background:#f4f7fb}.module-management-heading{margin-bottom:16px}.module-management-heading h2{margin:0;color:#152238;font-size:27px}.module-management-heading p{margin:5px 0 0;color:#788ba5;font-size:14px}.module-management-summary{margin-bottom:14px;display:grid;grid-template-columns:repeat(3,1fr);background:#fff;border:1px solid #d5e0ec;border-radius:7px}.module-management-summary>div{padding:16px 20px;display:grid;gap:7px}.module-management-summary>div+div{border-left:1px solid #d5e0ec}.module-management-summary span{color:#788ba5;font-size:12px}.module-management-summary strong{color:#152238;font-size:22px}.module-management-workspace{display:block!important;padding:0!important;overflow:hidden}.module-management-toolbar{padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #d5e0ec}.module-management-toolbar>div{display:grid;gap:4px}.module-management-toolbar strong{color:#152238;font-size:16px}.module-management-toolbar span{color:#788ba5;font-size:11px}.module-management-toolbar input{width:min(320px,45%);height:38px}.module-management-options{padding:16px 20px!important;display:grid!important;grid-template-columns:repeat(2,minmax(260px,1fr))!important;gap:10px!important}.module-option-card{min-height:82px;padding:14px;display:grid;grid-template-columns:42px minmax(0,1fr) 40px;align-items:center;gap:12px;background:#fff;border:1px solid #d5e0ec;border-radius:7px}.module-option-card:hover{border-color:#9fc3e5;background:#fbfdff}.module-option-icon{width:42px;height:42px;display:grid;place-items:center;color:#2479c8;background:#eaf4fc;border-radius:8px;font-size:16px;font-weight:800}.module-option-card>div:nth-child(2){min-width:0;display:grid;gap:3px}.module-option-card strong{color:#152238;font-size:14px}.module-option-card code{color:#2479c8;font-size:10px}.module-option-card span{color:#788ba5;font-size:11px}.module-toggle{position:relative;width:38px;height:22px}.module-toggle input{position:absolute;opacity:0}.module-toggle i{display:block;width:38px;height:22px;border-radius:999px;background:#dce5ee;cursor:pointer}.module-toggle i::after{content:"";display:block;width:18px;height:18px;margin:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.24);transition:.15s}.module-toggle input:checked+i{background:#26975a}.module-toggle input:checked+i::after{transform:translateX(16px)}.module-management-workspace>.message{display:block;padding:0 20px 16px}.module-option-card[hidden]{display:none!important}@media(max-width:900px){.module-management-options{grid-template-columns:1fr!important}.module-management-toolbar{align-items:stretch;flex-direction:column}.module-management-toolbar input{width:100%}}@media(max-width:600px){.module-management-panel{padding:14px}.module-management-summary{grid-template-columns:1fr}.module-management-summary>div+div{border-left:0;border-top:1px solid #d5e0ec}}

/* Document template management */
.appearance-workbench{grid-template-columns:200px minmax(360px,1fr)}

/* Document template management */
:root{--appearance-accent:#2479c8}.appearance-page{min-width:0;padding:24px;background:#f4f7fb}.appearance-header{min-height:76px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.appearance-header h2{margin:0;color:#152238;font-size:27px}.appearance-header p,.appearance-editor>section>p,.appearance-preview>p{margin:5px 0 0;color:#788ba5;font-size:12px}.appearance-header-actions{display:flex;gap:10px}.appearance-workbench{display:grid;grid-template-columns:220px minmax(420px,1fr) 310px;gap:12px;min-height:680px}.appearance-categories,.appearance-editor,.appearance-preview{padding:18px;background:#fff;border:1px solid #d5e0ec;border-radius:7px}.appearance-categories{display:flex;flex-direction:column;gap:6px}.appearance-categories>strong{padding:0 4px 12px;border-bottom:1px solid #d5e0ec;font-size:15px}.appearance-categories>button{height:64px;padding:10px 14px;display:grid;gap:4px;text-align:left;color:#152238;background:transparent;border:0;border-left:4px solid transparent;border-radius:6px}.appearance-categories>button b{font-size:13px}.appearance-categories>button span{color:#788ba5;font-size:10px}.appearance-categories>button.active{color:var(--appearance-accent);background:#eaf4fc;border-left-color:var(--appearance-accent)}.appearance-tip{margin-top:30px;padding:14px;display:grid;gap:7px;color:#788ba5;background:#f8fafd;border:1px solid #d5e0ec;border-radius:6px;font-size:11px;line-height:1.5}.appearance-tip b{color:var(--appearance-accent)}.appearance-editor h3,.appearance-preview h3{margin:0;color:#152238;font-size:18px}.appearance-editor>section>p{padding-bottom:18px;border-bottom:1px solid #d5e0ec}.appearance-form-grid{margin-top:22px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.appearance-form-grid label{display:grid;gap:7px;color:#788ba5;font-size:12px}.appearance-form-grid .wide{grid-column:1/-1}.appearance-form-grid input{width:100%;height:42px}.appearance-upload-card{margin-top:24px;padding:18px;display:grid;grid-template-columns:minmax(150px,1fr) auto auto auto;align-items:center;gap:9px;background:#f8fafd;border:1px solid #d5e0ec;border-radius:7px}.appearance-upload-card>div{display:grid;gap:5px}.appearance-upload-card span{color:#788ba5;font-size:11px}.appearance-field-label{margin:24px 0 10px;display:block;color:#152238;font-size:13px;font-weight:700}.appearance-colors{display:flex;gap:12px}.appearance-colors button{width:44px;height:44px;padding:0;border:2px solid transparent;border-radius:7px;background:var(--swatch);box-shadow:none}.appearance-colors button.active{border-color:#fff;outline:2px solid var(--appearance-accent)}.appearance-mode{display:grid;grid-template-columns:132px 132px;gap:12px}.appearance-mode button{height:40px;color:#788ba5;background:#fff;border:1px solid #d5e0ec}.appearance-mode button.active{color:var(--appearance-accent);background:#eaf4fc;border-color:var(--appearance-accent)}.appearance-preview>p{padding-bottom:18px;border-bottom:1px solid #d5e0ec}.appearance-browser-preview{position:relative;height:350px;margin-top:22px;overflow:hidden;background:#eef3f8;border:1px solid #d5e0ec;border-radius:7px}.preview-browser-bar{height:34px;padding:13px 10px;display:flex;gap:5px;background:#fff}.preview-browser-bar i{width:7px;height:7px;border-radius:50%;background:#f06a6a}.preview-browser-bar i:nth-child(2){background:#f5b84b}.preview-browser-bar i:nth-child(3){background:#4bbf75}.preview-mini-sidebar{position:absolute;top:34px;bottom:0;left:0;width:76px;padding:18px 10px;display:grid;align-content:start;gap:25px;color:#dce9f5;background:#072c46;font-size:9px}.preview-mini-sidebar b{color:#fff;font-size:20px}.preview-mini-sidebar em{padding:9px 7px;color:#fff;background:var(--appearance-accent);border-radius:4px;font-style:normal}.preview-mini-content{margin-left:76px;padding:14px 12px;display:grid;gap:14px;color:#152238;background:#eef3f8;font-size:9px}.preview-mini-content article{padding:14px;display:grid;gap:15px;background:#fff;border:1px solid #d5e0ec;border-radius:5px}.preview-mini-content article span{color:#788ba5}.preview-mini-content>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}.preview-mini-content small{padding:12px;color:#788ba5;background:#fff;border:1px solid #d5e0ec;border-radius:5px}.preview-mini-content small b{display:inline-block;margin-top:12px;color:var(--appearance-accent);font-size:12px}@media(max-width:1180px){.appearance-workbench{grid-template-columns:190px minmax(400px,1fr)}.appearance-preview{grid-column:1/-1}.appearance-browser-preview{max-width:420px}}@media(max-width:820px){.appearance-page{padding:14px}.appearance-header{flex-direction:column;margin-bottom:14px}.appearance-workbench{grid-template-columns:1fr}.appearance-categories{display:grid;grid-template-columns:1fr 1fr}.appearance-categories>strong,.appearance-tip{grid-column:1/-1}.appearance-upload-card{grid-template-columns:1fr 1fr}.appearance-form-grid{grid-template-columns:1fr}.appearance-form-grid .wide{grid-column:auto}}

/* Document template management */
#settingsNavButton::after{display:none}.sidebar-submenu-chevron{width:16px;height:16px;margin-left:auto;fill:none;stroke:currentColor;stroke-width:2;transition:transform .18s ease}.submenu-expanded .sidebar-submenu-chevron{transform:rotate(180deg)}

/* Document template management */
.sidebar-subnav-button{width:calc(100% - 24px)!important;height:42px!important;margin:-1px 0 1px 24px!important;padding:0 14px 0 16px!important;gap:10px!important;border-radius:8px!important;color:#b9cbe0;font-size:13px!important;font-weight:600}.sidebar-subnav-button::after{display:none}.sidebar-subnav-button .nav-icon{width:16px!important;height:16px!important;flex-basis:16px!important}.sidebar-subnav-button:hover{background:rgba(22,119,255,.11)}.sidebar-subnav-button.active{border-color:rgba(77,163,255,.4);background:#0d4f9d;box-shadow:inset 3px 0 #29a3ff}

.category-rule-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;border-radius:7px}.category-rules-list .category-rule-select{min-width:0}.category-rule-list-row.active .category-rule-select{color:#2479c8;background:#eaf4fc}.category-order-controls{display:flex;gap:4px}.category-rules-list .category-order-controls button{min-height:28px;height:28px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;color:#2479c8;background:#fff;border:1px solid #b8d5ef;border-radius:6px;box-shadow:none;font-size:11px;font-weight:700;white-space:nowrap}.category-rules-list .category-order-controls button:hover:not(:disabled){background:#eaf4fc;transform:none}.category-rules-list .category-order-controls button:disabled{color:#a7b4c4;background:#f4f7fb;border-color:#d5e0ec;cursor:not-allowed}@media(max-width:600px){.category-rule-list-row{grid-template-columns:1fr}.category-order-controls{justify-content:flex-end}}
.category-add-control{display:flex;align-items:center;gap:8px}.category-add-control input{width:160px;height:34px;padding:0 10px;color:#152238;background:#fff;border:1px solid #b8d5ef;border-radius:6px;font-size:13px;outline:none}.category-add-control input:focus{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.12)}@media(max-width:600px){.category-add-control{grid-column:1/-1}.category-add-control input{width:100%}}
.category-column-rules-panel .category-rules-workspace{grid-template-columns:500px minmax(0,1fr)}@media(max-width:900px){.category-column-rules-panel .category-rules-workspace{grid-template-columns:1fr}}

/* Document template management */
.user-table-action{height:30px;padding:0 10px;border:1px solid #d8e1ec;border-radius:5px;background:#fff;box-shadow:none;font-size:12px;font-weight:600}.user-table-action:hover{transform:none}.user-reset-action.has-request{border-color:#1677e8;color:#fff;background:#1677e8}.user-delete-action{border-color:#efb7b7;color:#c93838}.user-table-action:disabled{border-color:#e2e8f0;color:#9aa6b5;background:#f1f5f9;cursor:not-allowed;opacity:1}
.user-password-actions{min-width:184px;display:flex;align-items:center;gap:6px}.user-password-actions .user-table-action{min-width:82px;white-space:nowrap}.user-cancel-reset-action{border-color:#b8c7d9;color:#526a84;background:#f8fafc}.user-cancel-reset-action:hover{border-color:#7f96af;color:#2f4d6b;background:#eef4fa}
.user-log-card{margin-top:14px;padding:16px;background:#fff;border:1px solid #d6e0eb;border-radius:6px}.user-log-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}.user-log-heading strong{color:#122138;font-size:16px}.user-log-heading span{color:#6b7d94;font-size:12px}.user-log-table-shell{overflow-x:auto;border:1px solid #d6e0eb;border-radius:6px}.user-log-table{width:100%;border-collapse:collapse}.user-log-table th{height:42px;padding:0 10px;color:#6b7d94;background:#f7fafc;font-size:12px;text-align:left}.user-log-table td{height:44px;padding:0 10px;color:#42526b;border-top:1px solid #d6e0eb;font-size:12px;white-space:nowrap}.user-log-table td span{display:block;margin-top:2px;color:#8a9ab0;font-size:10px}.user-log-table-shell .empty-state{padding:20px}

/* Document template management */
.user-summary{grid-template-columns:repeat(5,1fr)}
@media(max-width:760px){.user-summary{grid-template-columns:1fr 1fr}.user-summary>div:nth-child(5){border-left:0;border-top:1px solid #d6e0eb}}

/* Document template management */
.user-inline-select{width:112px;height:32px;padding:0 28px 0 9px;border:1px solid #d6e0eb;border-radius:5px;color:#334155;background-color:#fff;font:inherit;cursor:pointer}.user-inline-select:hover,.user-inline-select:focus{border-color:#0a75cf;outline:none;box-shadow:0 0 0 2px rgba(10,117,207,.12)}.user-inline-select:disabled{cursor:wait;opacity:.65}.user-inline-status-active{color:#138a5b}.user-inline-status-pending{color:#a56716}.user-inline-status-disabled{color:#64748b}
.user-inline-role{width:96px}.user-inline-department{width:104px}
.user-permission-switch{position:relative;display:inline-flex;width:34px;height:20px;vertical-align:middle}.user-permission-switch input{position:absolute;width:1px;height:1px;opacity:0}.user-permission-switch span{width:34px;height:20px;border-radius:999px;background:#cbd5e1;cursor:pointer;transition:.15s}.user-permission-switch span::after{content:"";display:block;width:16px;height:16px;margin:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.25);transition:.15s}.user-permission-switch input:checked+span{background:#1677e8}.user-permission-switch input:checked+span::after{transform:translateX(14px)}.user-permission-switch input:focus-visible+span{outline:2px solid #78b7ff;outline-offset:2px}.user-permission-switch input:disabled+span{cursor:not-allowed;opacity:.55}

/* Document template management */
.document-type-toolbar{height:68px;padding:0 24px 0 20px;display:flex;align-items:center;gap:16px;background:#fff;border-bottom:1px solid #d9e2ee}.document-type-toolbar .document-type-tabs{height:100%;padding:12px 0 0;flex:1;border-bottom:0}.document-type-toolbar>input{width:240px;height:36px;flex:0 0 240px}
.template-match-rule{margin:0;padding:8px 12px;color:#075bb8;background:#f8fafd;border:1px solid #d9e2ee;border-radius:6px;font-size:11px;white-space:nowrap}.sidebar-nav-button.parent-active{background:#0b3b82;color:#fff}.document-template-list-pane{display:flex;flex-direction:column}.document-template-list{flex:1}.document-template-pagination{padding:12px 8px 0;display:flex;align-items:center;justify-content:flex-end;gap:7px;color:#64748b;font-size:10px;border-top:1px solid #edf2f7}.document-template-pagination>span:first-child{margin-right:auto}.document-template-pagination button{width:28px;height:28px;padding:0}.preview-toolbar{justify-content:flex-start!important;padding:10px 16px!important;height:58px!important}.preview-toolbar-spacer{flex:1}.preview-toolbar #documentPreviewPublish{min-width:104px}.document-template-list-item{min-height:96px!important}.document-template-workbench{grid-template-columns:300px minmax(437px,1fr) 320px!important}.document-template-property-pane{width:auto}.property-tabs button{font-weight:500}.document-preview-stage{padding:20px;background:#edf2f8}
.template-company{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569!important}
@media(max-width:1320px){.template-match-rule{display:none}}
@media(max-width:760px){.document-type-toolbar{height:auto;padding:8px 10px;align-items:stretch;flex-wrap:wrap}.document-type-toolbar .document-type-tabs{width:100%;height:48px;padding:0;flex-basis:100%}.document-type-toolbar>input{width:100%;height:36px;flex:1 1 100%}}
.sidebar-subnav-button{margin-left:18px;width:calc(100% - 18px);font-size:13px}.document-template-page{min-width:0;background:#f4f7fb;border-radius:12px;overflow:hidden}.document-template-header{height:84px;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #d9e2ee}.document-template-header h2{margin:0;color:#172033;font-size:24px}.document-template-header p{margin:4px 0 0;color:#64748b;font-size:12px}.document-template-header-actions{display:flex;gap:12px}.document-type-tabs{height:68px;padding:12px 20px 0;display:flex;align-items:flex-start;gap:8px;background:#fff;border-bottom:1px solid #d9e2ee;overflow-x:auto}.document-type-tabs button{height:44px;padding:0 14px;color:#172033;background:transparent;border:0;border-radius:7px 7px 0 0;white-space:nowrap}.document-type-tabs button span{margin-left:7px;color:#64748b;font-size:11px}.document-type-tabs button.active{color:#075bb8;background:#eaf3fe;box-shadow:inset 0 -3px #075bb8}.document-template-workbench{display:grid;grid-template-columns:minmax(278px,328px) minmax(420px,1fr) minmax(310px,360px);height:calc(100vh - 235px);min-height:650px}.document-template-list-pane,.document-template-property-pane{background:#fff;min-width:0;overflow:auto}.document-template-list-pane{padding:20px 12px;border-right:1px solid #d9e2ee}.template-pane-heading{padding:0 10px 14px;display:flex;align-items:center;gap:10px}.template-pane-heading strong{font-size:16px}.template-pane-heading span{color:#64748b;font-size:11px}.document-template-list-pane>input{width:calc(100% - 20px);margin:0 10px 10px}.template-filters{padding:0 10px 12px;display:grid;grid-template-columns:1fr 1fr;gap:7px}.template-filters input{grid-column:1/-1}.template-filters select,.template-filters input{min-width:0;height:34px;padding:0 8px;font-size:12px}.document-template-list{display:grid;gap:3px}.document-template-list-item{position:relative;width:100%;min-height:104px;padding:12px 9px;display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;text-align:left;color:#172033;background:#fff;border:1px solid transparent;border-radius:7px}.document-template-list-item:hover{background:#f8fafd}.document-template-list-item.active{background:#eaf3fe;border-color:#075bb8}.template-thumbnail{width:44px;height:60px;padding:7px 5px;display:grid;align-content:start;gap:6px;background:#fff;border:1px solid #cbd5e1;border-radius:2px}.template-thumbnail i{display:block;height:2px;background:#ced8e4}.template-thumbnail i:first-child{height:7px;background:#075bb8}.template-list-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.template-list-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.template-list-copy small{color:#64748b;font-size:10px}.template-list-copy em{font-style:normal;font-size:11px}.status-published{color:#179c67}.status-draft{color:#b7791f}.status-disabled{color:#64748b}.default-badge{margin-left:8px;padding:2px 7px;color:#179c67;background:#e9f8f1;border-radius:10px;font-size:10px}.document-template-list-item time{position:absolute;right:10px;bottom:10px;color:#94a3b8;font-size:9px}.template-list-loading,.template-list-empty{padding:32px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;color:#64748b;text-align:center;font-size:12px}.document-template-preview-pane{min-width:0;overflow:auto;background:#edf2f8}.preview-toolbar{position:sticky;z-index:3;top:0;height:54px;padding:8px 12px;display:flex;align-items:center;justify-content:center;gap:7px;background:#fff;border-bottom:1px solid #d9e2ee}.preview-toolbar button,.preview-toolbar select{height:34px;padding:0 10px;font-size:11px}.preview-toolbar span{color:#475569;font-size:11px}.document-preview-stage{min-height:100%;padding:28px;display:flex;justify-content:center;align-items:flex-start;overflow:auto}.document-preview-empty{margin-top:120px;color:#64748b}.document-a4-frame{--preview-zoom:.7;width:210mm;height:297mm;flex:0 0 auto;border:0;background:#fff;box-shadow:0 8px 30px rgba(19,45,84,.16);transform:scale(var(--preview-zoom));transform-origin:top center;margin-bottom:calc((var(--preview-zoom) - 1) * 297mm)}.document-template-property-pane{border-left:1px solid #d9e2ee}.property-tabs{position:sticky;z-index:2;top:0;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-bottom:1px solid #d9e2ee}.property-tabs button{height:48px;padding:0 4px;color:#64748b;background:#fff;border:0;border-bottom:2px solid transparent;font-size:11px}.property-tabs button.active{color:#075bb8;border-bottom-color:#075bb8}.template-property-form{padding:18px}.template-property-form label{margin-bottom:13px;display:grid;gap:6px;color:#475569;font-size:12px}.template-property-form input,.template-property-form select,.template-property-form textarea{width:100%;min-width:0}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.property-help{padding:10px;color:#475569;background:#f8fafd;border-radius:6px;font-size:11px;line-height:1.6}.template-property-actions{position:sticky;bottom:0;padding:12px 18px;display:flex;gap:8px;background:#fff;border-top:1px solid #d9e2ee}.template-property-actions button{flex:1}.document-template-property-pane>.message{padding:0 18px 12px}.message.error{color:#c53030}.upload-progress{height:34px;position:relative;overflow:hidden;background:#edf2f7;border-radius:5px}.upload-progress i{position:absolute;inset:0;transform-origin:left;background:linear-gradient(90deg,#eaf3fe,#b9dcff);animation:template-upload 1.2s infinite}.upload-progress span{position:relative;z-index:1;padding:8px;display:block;font-size:11px}@keyframes template-upload{0%{transform:scaleX(.1)}70%{transform:scaleX(.8)}100%{transform:scaleX(1)}}.dynamic-field-list,.template-version-list{display:grid;gap:8px;margin-top:12px}.dynamic-field-list article,.template-version-list article{position:relative;padding:10px;display:grid;gap:4px;background:#f8fafd;border:1px solid #d9e2ee;border-radius:6px}.dynamic-field-list article div,.template-version-list article div{display:flex;justify-content:space-between;gap:8px}.dynamic-field-list span,.dynamic-field-list small,.template-version-list span,.template-version-list small{color:#64748b;font-size:10px}.dynamic-field-list code{color:#075bb8;font-size:11px}.dynamic-field-list b{position:absolute;right:8px;bottom:8px;color:#b7791f;font-size:9px}.dynamic-field-list button{justify-self:start;padding:2px 7px;font-size:10px}.template-version-list p{margin:3px 0;color:#475569;font-size:11px}.template-version-list button{justify-self:start;font-size:10px}
@media(max-width:1180px){.document-template-workbench{grid-template-columns:270px minmax(390px,1fr)}.document-template-property-pane{position:fixed;z-index:20;right:0;top:80px;bottom:0;width:360px;box-shadow:-8px 0 24px rgba(15,23,42,.15)}.document-template-page[hidden] .document-template-property-pane{display:none}}
@media(max-width:760px){.document-template-header{height:auto;align-items:flex-start;gap:10px}.document-template-header-actions{flex-direction:column}.document-template-workbench{grid-template-columns:1fr;height:auto}.document-template-list-pane{max-height:430px}.document-template-preview-pane{min-height:650px}.document-template-property-pane{position:static;width:auto}.document-a4-frame{--preview-zoom:.45}.preview-toolbar{justify-content:flex-start;overflow-x:auto}.document-type-tabs{padding-left:10px}}
.appearance-workbench{grid-template-columns:220px minmax(420px,1fr)}
@media(max-width:820px){.appearance-workbench{grid-template-columns:1fr}}
.message{font-size:12px!important}
.sap-inventory-status-card .message{white-space:pre-line;line-height:1.7}
.department-dialog{width:min(980px,calc(100vw - 32px))}.department-create-row{display:flex;gap:10px;margin-bottom:14px}.department-create-row input{flex:1}.department-list{display:grid;gap:8px;max-height:55vh;overflow:auto}.department-row{display:grid;grid-template-columns:minmax(150px,1fr) auto auto auto auto 150px auto;gap:8px;align-items:center;padding:10px;background:#f8fafd;border:1px solid #d6e0eb;border-radius:6px}.department-row input,.department-row select,.department-row button{height:34px;min-width:0}.department-order-button{padding-inline:10px}@media(max-width:760px){.department-row{grid-template-columns:1fr 1fr}.department-row input,.department-row select{grid-column:1/-1}}

@media (min-width: 700px) and (max-width: 1180px) {
  .app-sidebar {
    display: flex;
    width: 220px;
    padding: 0 10px 14px;
  }

  .sidebar-brand {
    height: 96px;
    flex-basis: 96px;
    margin: 0 -10px 12px;
    padding: 0 24px;
  }

  .sidebar-logo-image {
    width: 170px;
  }

  .sidebar-menu-label {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .sidebar-nav {
    min-height: 0;
    flex: 1 1 auto;
    gap: 3px;
    overflow-y: auto;
  }

  .sidebar-nav-button {
    height: 44px;
    gap: 10px;
    padding: 0 12px;
    font-size: 13px;
  }

  .sidebar-subnav-button {
    margin-left: 12px;
    width: calc(100% - 12px);
  }

  .sidebar-footer {
    display: none;
  }

  body:not(.auth-mode) .toolbar {
    height: auto;
    min-height: 64px;
    margin-left: 220px;
    padding: 10px 18px;
  }

  body:not(.auth-mode) #appPanel {
    margin-left: 220px;
    padding: 16px 18px 28px;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] .quote-builder-panel {
    margin-bottom: 14px;
  }

  body:not(.auth-mode) .product-library-layout,
  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-category-sidebar,
  body:not(.auth-mode) .product-detail-panel {
    display: none;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .category-filter-field {
    display: grid;
  }

  body:not(.auth-mode) .filters.query-panel,
  body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  body:not(.auth-mode) .filters.query-panel label,
  body:not(.auth-mode) .filters.query-panel .filter-actions,
  body:not(.auth-mode) .filters.query-panel input,
  body:not(.auth-mode) .filters.query-panel select,
  body:not(.auth-mode) .filters.query-panel button {
    width: 100%;
  }

  body:not(.auth-mode) .filters.query-panel .filter-actions {
    display: grid;
  }

  .mobile-hide-filter,
  .cart-panel {
    display: block;
  }

  .cart-panel .section-heading {
    align-items: flex-start;
    flex-direction: row;
  }

  .cart-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .cart-actions button {
    padding-inline: 10px;
  }

  .table-wrap,
  .result-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.data-backup-panel {
  padding: 18px;
}

.data-backup-heading {
  margin-bottom: 14px;
}

.data-backup-heading h2 {
  font-size: 27px;
}

.data-backup-heading p {
  color: #6b7d94;
  font-size: 12px;
}

.data-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
}

.data-backup-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(20, 44, 80, 0.06);
}

.data-backup-card h3 {
  margin: 0 0 8px;
  color: #122138;
  font-size: 16px;
}

.data-backup-card p {
  margin: 0;
  color: #6b7d94;
  font-size: 12px;
  line-height: 1.6;
}

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

.data-backup-file-name {
  color: #788ba5;
  font-size: 12px;
}

.sap-inventory-panel {
  padding: 22px;
  background: #f4f7fb;
  border: 0;
  box-shadow: none;
}

.sap-inventory-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.sap-inventory-title-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.sap-inventory-title-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #2563eb;
  background: #fff;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
  font-size: 24px;
  font-weight: 700;
}

.sap-inventory-title-icon svg,
.sap-card-heading svg,
.sap-action-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sap-inventory-title-group h2 {
  margin: 0;
  color: #0f1f35;
  font-size: 26px;
  line-height: 1.2;
}

.sap-inventory-title-group p {
  margin: 6px 0 0;
  color: #6a7a90;
  font-size: 13px;
}

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

.sap-inventory-actions button {
  min-width: 116px;
  height: 42px;
  border-radius: 8px;
  font-weight: 700;
}

.sap-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sap-action-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.sap-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  color: #0f8b4d;
  background: #e8f8ef;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.sap-status-pill i {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
}

.sap-inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.sap-inventory-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  background: #fff;
  border: 1px solid #dfe8f4;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 31, 53, 0.08);
}

.sap-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sap-card-heading > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #2563eb;
  background: #eef4ff;
  border-radius: 9px;
  font-size: 16px;
}

.sap-inventory-card h3 {
  margin: 0;
  color: #10233b;
  font-size: 18px;
}

.sap-inventory-card label {
  min-width: 0;
}

.sap-api-fields,
.sap-sql-fields {
  display: grid;
  gap: 14px;
}

.sap-api-fields[hidden],
.sap-sql-fields[hidden] {
  display: none;
}

.sap-inventory-card input,
.sap-inventory-card select,
.sap-warehouse-dropdown-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background-color: #fff;
}

.sap-inventory-card label > span:not(.sap-switch-row span) {
  color: #2d3d54;
  font-size: 13px;
  font-weight: 700;
}

.sap-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.sap-switch-row > .sap-switch-copy {
  display: grid;
  gap: 3px;
}

.sap-switch-row strong {
  color: #1d2d43;
  font-size: 13px;
}

.sap-switch-row small {
  color: #75859a;
  font-size: 12px;
}

.sap-switch-control {
  flex: 0 0 auto;
}

.sap-warehouse-dropdown-field {
  position: relative;
}

.sap-warehouse-dropdown {
  position: relative;
}

.sap-warehouse-dropdown-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 34px 0 12px;
  color: #26364b;
  font-size: 13px;
  text-align: left;
}

.sap-warehouse-dropdown-button::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #6b7d94;
  border-bottom: 1.5px solid #6b7d94;
  transform: translateY(-65%) rotate(45deg);
}

.sap-warehouse-dropdown-menu {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  padding: 10px;
  background: #fff;
  border: 1px solid #c9d8eb;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(20, 44, 80, 0.16);
}

.sap-warehouse-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sap-warehouse-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: #f8fbff;
  color: #314158;
  font-size: 12px;
}

.sap-warehouse-check input {
  width: auto;
}

.sap-warehouse-check span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.sap-warehouse-check strong {
  color: #1769ff;
  font-size: 12px;
}

.sap-warehouse-help {
  margin: -2px 0 0;
  color: #6b7d94;
  font-size: 12px;
  line-height: 1.5;
}

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

.sap-frequency-presets button {
  height: 36px;
  color: #667891;
  background: #fff;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.sap-frequency-presets button.active {
  color: #1769ff;
  border-color: #1769ff;
  background: #eff5ff;
}

.sap-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e5edf5;
}

.sap-inventory-status-card .sap-card-heading + .sap-status-line {
  border-top: 0;
}

.sap-inventory-status-card span {
  color: #6b7d94;
  font-size: 13px;
}

.sap-inventory-status-card strong {
  color: #122138;
  font-size: 14px;
}

.sap-state-tag {
  padding: 4px 11px;
  color: #0f8b4d !important;
  background: #e8f8ef;
  border-radius: 999px;
  font-size: 12px !important;
}

.sap-sync-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 4px 0;
  border: 1px solid #e0e8f2;
  border-radius: 10px;
}

.sap-sync-summary div {
  display: grid;
  gap: 6px;
  padding: 16px 10px;
  text-align: center;
  border-left: 1px solid #e0e8f2;
}

.sap-sync-summary div:first-child {
  border-left: 0;
}

.sap-sync-summary strong {
  font-size: 18px;
}

.sap-sync-summary .success {
  color: #16a34a;
}

.sap-sync-summary .danger {
  color: #ef4444;
}

.sap-inventory-status-card p {
  margin: 0;
  color: #6b7d94;
  font-size: 12px;
  line-height: 1.6;
}

.sap-sync-log-card {
  margin-top: 16px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #dfe8f4;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 31, 53, 0.08);
}

.sap-sync-log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5edf5;
}

.sap-sync-log-heading h3 {
  margin: 0;
  color: #10233b;
  font-size: 18px;
}

.sap-log-more-button,
.sap-log-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  min-height: 0;
  padding: 0;
  color: #1769ff;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.sap-log-more-button {
  color: #667891;
}

.sap-log-more-button:hover,
.sap-log-detail-button:hover {
  color: #0057d9;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: none;
}

.sap-sync-log-table-wrap {
  overflow-x: auto;
}

.sap-sync-log-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.sap-sync-log-table th {
  height: 44px;
  padding: 0 14px;
  color: #667891;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.sap-sync-log-table td {
  height: 48px;
  padding: 0 14px;
  color: #314158;
  border-top: 1px solid #e7edf5;
  font-size: 13px;
  white-space: nowrap;
}

.sap-sync-log-table .sap-log-result-cell {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sap-log-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sap-log-status-success {
  color: #16834a;
  background: #e8f8ef;
}

.sap-log-status-partial {
  color: #b56a00;
  background: #fff1dc;
}

.sap-log-status-failed {
  color: #ef4444;
  background: #fff1f2;
}

.sap-log-success {
  color: #14934f !important;
  font-weight: 700;
}

.sap-log-danger {
  color: #ef4444 !important;
  font-weight: 700;
}

.sap-log-empty {
  height: 72px !important;
  color: #8a98aa !important;
  text-align: center;
}

.sap-log-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 22, 39, 0.42);
}

.sap-log-detail-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce7f5;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 31, 53, 0.22);
}

.sap-log-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #e8eef6;
}

.sap-log-detail-head h3 {
  margin: 0;
  color: #10233b;
  font-size: 20px;
}

.sap-log-detail-head p {
  margin: 6px 0 0;
  color: #6b7d94;
  font-size: 13px;
  line-height: 1.5;
}

.sap-log-detail-close {
  width: 32px;
  height: 32px;
  padding: 0;
  color: #637389;
  background: #f4f7fb;
  border: 1px solid #dfe8f4;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.sap-log-detail-close:hover {
  color: #1769ff;
  background: #eef4ff;
}

.sap-log-detail-content {
  display: grid;
  gap: 12px;
  padding: 18px 24px;
  overflow-y: auto;
}

.sap-log-detail-card {
  padding: 14px 16px;
  background: #f8fbff;
  border: 1px solid #dfe8f4;
  border-radius: 12px;
}

.sap-log-detail-card h4 {
  margin: 0 0 10px;
  color: #26364b;
  font-size: 14px;
}

.sap-log-detail-value {
  color: #10233b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.sap-log-detail-muted {
  color: #7b8da3;
  font-size: 13px;
  line-height: 1.6;
}

.sap-log-code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sap-log-code-list span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  color: #24456f;
  background: #fff;
  border: 1px solid #d6e3f3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sap-log-detail-error {
  color: #b42318;
  background: #fff5f5;
  border-color: #ffd4d4;
}

.sap-log-detail-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 24px 20px;
  border-top: 1px solid #e8eef6;
}

.sap-log-detail-footer button {
  min-width: 92px;
}

.danger-button {
  color: #fff;
  background: #b72f22;
  border-color: #b72f22;
}

.danger-button:hover {
  background: #a1261b;
  border-color: #a1261b;
}

@media (max-width: 980px) {
  .data-backup-grid,
  .sap-inventory-grid {
    grid-template-columns: 1fr;
  }

  .sap-warehouse-check-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 699px) {
  body:not(.auth-mode) .filters.query-panel .product-name-filter-field {
    display: none;
  }

  body:not(.auth-mode) .filters.query-panel,
  body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  body:not(.auth-mode) .filters.query-panel label,
  body:not(.auth-mode) .filters.query-panel .filter-actions,
  body:not(.auth-mode) .filters.query-panel input,
  body:not(.auth-mode) .filters.query-panel select,
  body:not(.auth-mode) .filters.query-panel button {
    width: 100%;
  }

  body:not(.auth-mode) .filters.query-panel .filter-actions {
    display: grid;
  }
}

/* Responsive business layout: keep small laptops and iPad views compact without page-level horizontal overflow. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body:not(.auth-mode) #appPanel,
body:not(.auth-mode) .toolbar,
body:not(.auth-mode) .panel,
body:not(.auth-mode) .table-wrap,
body:not(.auth-mode) .result-meta,
body:not(.auth-mode) .product-library-layout,
body:not(.auth-mode) .product-query-stack {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body:not(.auth-mode) .table-wrap,
body:not(.auth-mode) .result-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1599px) and (min-width: 1366px) {
  .app-sidebar {
    width: 248px;
    padding-inline: 12px;
  }

  .sidebar-brand {
    height: 104px;
    flex-basis: 104px;
    margin-inline: -12px;
    padding-inline: 24px;
  }

  .sidebar-logo-image {
    width: 182px;
  }

  .sidebar-nav-button {
    height: 52px;
    padding-inline: 14px;
    font-size: 14px;
  }

  .sidebar-nav-button .nav-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  body:not(.auth-mode) .toolbar {
    height: 64px;
    margin-left: 248px;
    padding: 0 22px;
  }

  body:not(.auth-mode) .toolbar h1 {
    font-size: 21px;
  }

  body:not(.auth-mode) #appPanel {
    margin-left: 248px;
    padding: 18px 22px 30px;
  }

  body:not(.auth-mode) .panel {
    padding: 16px;
  }

  body:not(.auth-mode) .product-library-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 12px;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open {
    grid-template-columns: 190px minmax(0, 1fr) 280px;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] {
    grid-template-columns: minmax(280px, 28%) minmax(0, 1fr);
    gap: 12px;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel {
    grid-template-columns: repeat(5, minmax(96px, 1fr)) auto;
  }

  .cart-table th,
  .cart-table td,
  .cart-table input,
  .result-wrap th,
  .result-wrap td,
  .result-wrap input {
    font-size: 13px;
  }

  table {
    min-width: 1180px;
  }

  .result-wrap table {
    min-width: 1320px;
  }

  .cart-table {
    min-width: 1540px;
  }

  th,
  td {
    padding: 8px;
  }
}

@media (max-width: 1365px) and (min-width: 1024px) {
  .app-sidebar {
    width: 208px;
    padding: 0 10px 14px;
  }

  .sidebar-brand {
    height: 92px;
    flex-basis: 92px;
    margin: 0 -10px 10px;
    padding: 0 20px;
  }

  .sidebar-logo-image {
    width: 158px;
  }

  .sidebar-menu-label {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .sidebar-nav {
    min-height: 0;
    flex: 1 1 auto;
    gap: 3px;
    overflow-y: auto;
  }

  .sidebar-nav-button {
    height: 42px;
    gap: 9px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .sidebar-nav-button .nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .sidebar-subnav-button {
    width: calc(100% - 12px) !important;
    height: 34px !important;
    margin-left: 12px !important;
    font-size: 11px !important;
  }

  .sidebar-footer {
    display: none;
  }

  body:not(.auth-mode) .toolbar {
    height: 58px;
    min-height: 58px;
    margin-left: 208px;
    padding: 0 16px;
  }

  body:not(.auth-mode) .toolbar h1 {
    max-width: 46vw;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.auth-mode) .toolbar-actions {
    gap: 8px;
  }

  body:not(.auth-mode) .language-select select,
  body:not(.auth-mode) #logoutButton {
    height: 34px;
    padding-inline: 10px;
  }

  body:not(.auth-mode) #appPanel {
    min-height: calc(100vh - 58px);
    margin-left: 208px;
    padding: 14px 16px 24px;
  }

  body:not(.auth-mode) .panel,
  body:not(.auth-mode) .result-meta {
    border-radius: 10px;
  }

  body:not(.auth-mode) .panel,
  body:not(.auth-mode) .filters {
    padding: 14px;
  }

  body:not(.auth-mode) .section-heading h2 {
    font-size: 16px;
  }

  body:not(.auth-mode) .section-heading p {
    font-size: 11px;
  }

  body:not(.auth-mode) .product-library-layout,
  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 10px;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-category-sidebar {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .category-filter-field {
    display: none;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
    gap: 8px;
  }

  body:not(.auth-mode) .product-detail-panel {
    position: fixed;
    z-index: 90;
    top: 70px;
    right: 16px;
    bottom: 18px;
    display: block;
    width: min(330px, calc(100vw - 248px));
    margin-top: 0;
    min-height: 0;
    max-height: none;
    padding: 14px;
    box-shadow: -12px 0 30px rgba(15, 23, 42, 0.16);
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] .quote-builder-panel {
    margin-bottom: 12px;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] .product-library-layout {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] .filters.query-panel {
    grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  }

  .import-template-actions,
  .cart-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .currency-conversion-hint {
    width: 100%;
    white-space: normal;
    text-align: right;
  }

  .import-template-actions button,
  .cart-actions button {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .cart-actions #exportButton,
  .cart-actions #clearCartButton {
    width: 118px;
  }

  .cart-table th,
  .cart-table td,
  .cart-table input,
  .result-wrap th,
  .result-wrap td,
  .result-wrap input {
    font-size: 12px;
  }

  table {
    min-width: 1040px;
  }

  .result-wrap table {
    min-width: 1180px;
  }

  .cart-table {
    min-width: 1360px;
  }

  th,
  td {
    padding: 7px;
  }
}

@media (max-width: 1023px) and (min-width: 700px) {
  .app-sidebar {
    display: flex;
    width: 184px;
    padding: 0 8px 12px;
  }

  .sidebar-brand {
    height: 82px;
    flex-basis: 82px;
    margin: 0 -8px 8px;
    padding: 0 16px;
  }

  .sidebar-logo-image {
    width: 138px;
  }

  .sidebar-menu-label {
    margin: 0 4px 6px;
    font-size: 11px;
  }

  .sidebar-nav {
    gap: 2px;
    overflow-y: auto;
  }

  .sidebar-nav-button {
    height: 38px;
    gap: 8px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 11px;
  }

  .sidebar-nav-button::after {
    display: none;
  }

  .sidebar-nav-button .nav-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .sidebar-subnav-button {
    width: calc(100% - 10px) !important;
    height: 32px !important;
    margin-left: 10px !important;
    padding-inline: 10px !important;
    font-size: 10px !important;
  }

  .sidebar-footer {
    display: none;
  }

  body:not(.auth-mode) .toolbar {
    min-height: 56px;
    height: auto;
    margin-left: 184px;
    padding: 8px 12px;
  }

  body:not(.auth-mode) .toolbar h1 {
    max-width: 42vw;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.auth-mode) .toolbar-actions {
    gap: 6px;
  }

  body:not(.auth-mode) #appPanel {
    margin-left: 184px;
    padding: 12px 12px 22px;
  }

  body:not(.auth-mode) .panel,
  body:not(.auth-mode) .filters {
    padding: 12px;
  }

  body:not(.auth-mode) .product-library-layout,
  body:not(.auth-mode) #appPanel[data-view="product"] .product-library-layout.detail-open,
  body:not(.auth-mode) #appPanel[data-view="quote"] .product-library-layout {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .product-category-sidebar {
    display: none;
  }

  body:not(.auth-mode) #appPanel[data-view="product"] .category-filter-field {
    display: grid;
  }

  body:not(.auth-mode) .filters.query-panel,
  body:not(.auth-mode) #appPanel[data-view="product"] .filters.query-panel,
  body:not(.auth-mode) #appPanel[data-view="quote"] .filters.query-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    align-items: end;
    gap: 8px;
  }

  body:not(.auth-mode) .filters.query-panel .filter-actions {
    display: flex;
    align-items: end;
  }

  body:not(.auth-mode) .filters.query-panel label,
  body:not(.auth-mode) .filters.query-panel .filter-actions,
  body:not(.auth-mode) .filters.query-panel input,
  body:not(.auth-mode) .filters.query-panel select,
  body:not(.auth-mode) .filters.query-panel button {
    width: 100%;
  }

  body:not(.auth-mode) .product-detail-panel {
    position: fixed;
    z-index: 90;
    top: 68px;
    right: 12px;
    bottom: 14px;
    display: block;
    width: min(320px, calc(100vw - 220px));
    margin-top: 0;
    min-height: 0;
    max-height: none;
    padding: 12px;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] {
    display: block;
  }

  body:not(.auth-mode) #appPanel[data-view="quote"] .quote-builder-panel {
    margin-bottom: 12px;
  }

  .mobile-hide-filter,
  .cart-panel {
    display: block;
  }

  .section-heading,
  .cart-panel .section-heading {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
  }

  .import-template-actions,
  .cart-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .import-template-actions button,
  .cart-actions button {
    min-height: 32px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .cart-actions #exportButton,
  .cart-actions #clearCartButton {
    width: 108px;
  }

  .result-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .page-info-group {
    justify-self: end;
  }

  .cart-table th,
  .cart-table td,
  .cart-table input,
  .result-wrap th,
  .result-wrap td,
  .result-wrap input {
    font-size: 12px;
  }

  table {
    min-width: 960px;
  }

  .result-wrap table {
    min-width: 1080px;
  }

  .cart-table {
    min-width: 1260px;
  }

  th,
  td {
    padding: 7px;
  }
}

@media (pointer: coarse) and (min-width: 700px) {
  body:not(.auth-mode) .system-settings-panel:not([hidden]) {
    display: block !important;
  }

  body:not(.auth-mode) .system-settings-panel[hidden] {
    display: none !important;
  }
}

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

.batch-maintenance-panel[hidden] {
  display: none !important;
}

.batch-maintenance-tabs {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  gap: 4px;
  border-radius: 10px;
  background: #eef3f9;
}

.batch-maintenance-tabs button {
  min-width: 132px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #53657b;
  font-size: 13px;
  font-weight: 700;
}

.batch-maintenance-tabs button.active {
  background: #2f6fe4;
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 111, 228, 0.22);
}

.batch-maintenance-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.batch-maintenance-filters label,
.batch-operation-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.batch-maintenance-filters input,
.batch-maintenance-filters select,
.batch-operation-grid input,
.batch-operation-grid select,
.batch-operation-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  color: #102033;
  font-size: 13px;
}

.batch-maintenance-filters input,
.batch-maintenance-filters select,
.batch-operation-grid input,
.batch-operation-grid select {
  height: 36px;
  padding: 0 10px;
}

.batch-operation-grid textarea {
  min-height: 70px;
  padding: 8px 10px;
  resize: vertical;
}

.batch-maintenance-filters button,
.batch-operation-grid button {
  height: 36px;
  white-space: nowrap;
}

.batch-maintenance-targets,
.batch-operation-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e3eaf4;
  border-radius: 12px;
  background: #fff;
}

.batch-target-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #4d5f76;
  font-size: 13px;
}

.batch-target-meta strong {
  color: #102033;
}

.batch-table-wrap {
  overflow: auto;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
}

.batch-product-table {
  width: 100%;
  min-width: 2100px;
  border-collapse: collapse;
}

.batch-product-table th,
.batch-product-table td {
  height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid #e9eef6;
  text-align: center;
  font-size: 13px;
}

.batch-product-table th {
  background: #edf2f7;
  color: #34465d;
  font-weight: 800;
  line-height: 1.25;
}

.batch-product-table .batch-header-text {
  display: inline-block;
  white-space: pre;
}

.batch-product-table td {
  color: #102033;
}

.batch-product-table td:nth-child(10),
.batch-product-table td:nth-child(11),
.batch-product-table td:nth-child(12),
.batch-product-table td:nth-child(13) {
  text-align: right;
}

.batch-product-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.batch-empty-state {
  height: 72px !important;
  color: #7c8da3 !important;
  text-align: center !important;
}

.batch-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.batch-pagination button {
  width: 38px;
  height: 32px;
}

.batch-operation-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.batch-asset-grid {
  grid-template-columns: minmax(160px, 220px) minmax(180px, 240px) auto minmax(160px, 1fr) auto;
}

.batch-asset-file-name {
  align-self: center;
  min-width: 0;
  overflow: hidden;
  color: #65758c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-help {
  margin: 0;
  color: #708199;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1365px) {
  .batch-maintenance-filters {
    grid-template-columns: repeat(5, minmax(110px, 1fr)) auto;
  }

  .batch-operation-grid,
  .batch-asset-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .batch-maintenance-tabs {
    width: 100%;
  }

  .batch-maintenance-tabs button {
    flex: 1;
    min-width: 0;
  }

  .batch-maintenance-filters,
  .batch-operation-grid,
  .batch-asset-grid {
    grid-template-columns: 1fr;
  }
}

.sidebar-collapse-button {
  position: absolute;
  top: 76px;
  right: -15px;
  z-index: 2;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #2769ba;
  background: #fff;
  border: 1px solid #c8d7e8;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(3, 22, 48, 0.2);
}

.sidebar-collapse-button:hover {
  color: #fff;
  background: #1677e8;
  border-color: #1677e8;
  transform: none;
}

.sidebar-collapse-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

@media (min-width: 700px) {
  body.sidebar-collapsed .app-sidebar {
    width: 64px !important;
    padding-inline: 8px !important;
    box-shadow: 8px 0 24px rgba(3, 14, 31, 0.2);
    transition: width 0.2s ease;
  }

  body.sidebar-collapsed .sidebar-brand,
  body.sidebar-collapsed .sidebar-menu-label,
  body.sidebar-collapsed .sidebar-nav,
  body.sidebar-collapsed .sidebar-footer {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  body.sidebar-collapsed .sidebar-collapse-button svg {
    transform: rotate(180deg);
  }

  body:not(.auth-mode).sidebar-collapsed .toolbar,
  body:not(.auth-mode).sidebar-collapsed #appPanel {
    margin-left: 64px !important;
  }
}
