:root {
  --hy-primary: #12384b;
  --hy-primary-strong: #0c2938;
  --hy-primary-soft: #e9f0f3;
  --hy-accent: #b48646;
  --hy-accent-soft: #f6efe4;
  --hy-graphite: #303941;
  --hy-page: #f3f5f7;
  --hy-panel: #ffffff;
  --hy-border: #d9e0e5;
  --hy-border-strong: #c5cfd6;
  --hy-text: #202b33;
  --hy-muted: #687781;
  --hy-success: #2e7552;
  --hy-success-soft: #e8f3ed;
  --hy-warning: #a96d1e;
  --hy-warning-soft: #fbf0dc;
  --hy-danger: #ae4646;
  --hy-danger-soft: #f9eaea;
  --hy-info: #2c6585;
  --hy-info-soft: #e7f0f5;
  --hy-radius: 8px;
  --hy-radius-sm: 6px;
  --hy-shadow-sm: 0 1px 2px rgba(20, 39, 50, 0.06);
  --hy-shadow: 0 8px 24px rgba(22, 43, 55, 0.07);
  --hy-duration: 180ms;
  --hy-sidebar-width: 248px;
  --hy-sidebar-collapsed-width: 76px;
  --hy-topbar-height: 64px;
  --bs-primary: var(--hy-primary);
  --bs-primary-rgb: 18, 56, 75;
  --bs-success: var(--hy-success);
  --bs-warning: var(--hy-warning);
  --bs-danger: var(--hy-danger);
  --bs-body-color: var(--hy-text);
  --bs-body-bg: var(--hy-page);
  --bs-border-color: var(--hy-border);
  --bs-link-color: #15516d;
  --bs-link-hover-color: #0d3b51;
  --bs-font-sans-serif: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  background: var(--hy-page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--hy-text);
  background: var(--hy-page);
  font-family: var(--bs-font-sans-serif);
  font-size: 14px;
  line-height: 1.55;
}

a,
button,
input,
select,
textarea,
.panel,
.toast,
.modal-content,
.product-thumb {
  transition:
    color var(--hy-duration) ease,
    background-color var(--hy-duration) ease,
    border-color var(--hy-duration) ease,
    box-shadow var(--hy-duration) ease,
    transform var(--hy-duration) ease;
}

a {
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(180, 134, 70, 0.42);
  outline-offset: 2px;
  box-shadow: none !important;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  display: flex;
  width: var(--hy-sidebar-width);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: #dbe7ec;
  background: var(--hy-primary-strong);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: width var(--hy-duration) ease, transform var(--hy-duration) ease;
}

.sidebar-brand {
  display: flex;
  min-height: var(--hy-topbar-height);
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  color: #fff8ec;
  background: var(--hy-accent);
  border-radius: var(--hy-radius-sm);
  font-size: 15px;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.brand-edition {
  display: block;
  margin-top: 1px;
  color: #9fb5c0;
  font-size: 11px;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 10px 18px;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scrollbar-width: thin;
}

.nav-section + .nav-section {
  margin-top: 14px;
}

.nav-section-label {
  margin: 0 10px 5px;
  overflow: hidden;
  color: #829ba7;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-nav-link {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  color: #cbdbe2;
  text-decoration: none;
  border-radius: var(--hy-radius-sm);
  white-space: nowrap;
}

.app-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.app-nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--hy-accent);
}

.app-nav-icon {
  display: inline-flex;
  width: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.app-nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  color: #8fa6b1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  white-space: nowrap;
}

.sidebar-footer .bi {
  flex: 0 0 auto;
  color: var(--hy-accent);
  font-size: 15px;
}

.app-main-shell {
  width: auto;
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--hy-sidebar-width);
  transition: margin-left var(--hy-duration) ease;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1025;
  display: flex;
  min-width: 0;
  min-height: var(--hy-topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--hy-border);
  box-shadow: var(--hy-shadow-sm);
}

.topbar-leading,
.topbar-actions,
.topbar-user {
  display: flex;
  min-width: 0;
  align-items: center;
}

.topbar-leading {
  gap: 12px;
}

.topbar-actions {
  flex: 0 0 auto;
  gap: 7px;
}

.topbar-user {
  max-width: 270px;
  gap: 10px;
  padding: 4px 9px 4px 6px;
  color: var(--hy-text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--hy-radius-sm);
}

.topbar-user:hover,
.topbar-user[aria-expanded="true"] {
  color: var(--hy-text);
  background: #f7f9fa;
  border-color: var(--hy-border);
}

.user-avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--hy-primary);
  border-radius: 50%;
  font-size: 16px;
}

.user-copy {
  min-width: 0;
  text-align: left;
}

.user-real-name,
.user-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-real-name {
  font-size: 13px;
  font-weight: 700;
}

.user-meta {
  color: var(--hy-muted);
  font-size: 11px;
}

.topbar-title {
  min-width: 0;
}

.topbar-eyebrow,
.topbar-page-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-eyebrow {
  color: var(--hy-muted);
  font-size: 11px;
}

.topbar-page-name {
  font-size: 15px;
  font-weight: 700;
}

.icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--hy-graphite);
  background: #ffffff;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius-sm);
}

.icon-button:hover {
  color: var(--hy-primary);
  background: var(--hy-primary-soft);
  border-color: #b8cbd4;
}

.mobile-sidebar-toggle {
  display: none;
}

.mobile-sidebar-close {
  display: none;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1035;
  display: none;
  background: rgba(19, 34, 43, 0.46);
}

.sidebar-collapsed .app-sidebar {
  width: var(--hy-sidebar-collapsed-width);
}

.sidebar-collapsed .app-main-shell {
  margin-left: var(--hy-sidebar-collapsed-width);
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .app-nav-label,
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .sidebar-footer span {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .app-nav-link,
.sidebar-collapsed .sidebar-footer {
  justify-content: center;
}

.sidebar-collapsed .app-nav-link {
  padding-inline: 8px;
}

.sidebar-collapsed .app-nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(180, 134, 70, 0.52);
}

.app-content {
  width: 100%;
  min-width: 0;
  max-width: 1680px;
  margin: 0 auto;
  padding: 22px;
  overflow-x: hidden;
}

.app-content > .d-flex.align-items-center.justify-content-between {
  flex-wrap: wrap;
  gap: 12px;
}

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

.page-header-copy {
  min-width: 0;
}

.page-title {
  margin: 0;
  color: var(--hy-primary-strong);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.25;
}

.page-subtitle {
  margin-top: 5px;
  color: var(--hy-muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.panel {
  min-width: 0;
  padding: 18px;
  background: var(--hy-panel);
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow-sm);
}

.panel-title {
  margin: 0 0 14px;
  color: var(--hy-primary-strong);
  font-size: 16px;
  font-weight: 700;
}

.panel-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-subtitle {
  color: var(--hy-muted);
  font-size: 11px;
}

.panel-link {
  flex: 0 0 auto;
  color: var(--hy-primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.interactive-card {
  transition:
    border-color var(--hy-duration) ease,
    box-shadow var(--hy-duration) ease,
    transform var(--hy-duration) ease;
}

.interactive-card:hover {
  transform: translateY(-2px);
  border-color: var(--hy-border-strong);
  box-shadow: var(--hy-shadow);
}

.text-muted-soft {
  color: var(--hy-muted) !important;
}

.dropdown-menu {
  padding: 6px;
  border-color: var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow);
}

.dropdown-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border-radius: var(--hy-radius-sm);
  font-size: 13px;
}

.dropdown-item:active {
  color: var(--hy-text);
  background: var(--hy-primary-soft);
}

.btn {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--hy-radius-sm);
  font-size: 13px;
  font-weight: 650;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 12px;
}

.btn-primary {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: var(--hy-primary);
  --bs-btn-border-color: var(--hy-primary);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--hy-primary-strong);
  --bs-btn-hover-border-color: var(--hy-primary-strong);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #071f2b;
  --bs-btn-active-border-color: #071f2b;
  --bs-btn-disabled-bg: #718691;
  --bs-btn-disabled-border-color: #718691;
}

.btn-success {
  --bs-btn-bg: var(--hy-success);
  --bs-btn-border-color: var(--hy-success);
  --bs-btn-hover-bg: #245f43;
  --bs-btn-hover-border-color: #245f43;
}

.btn-outline-primary {
  --bs-btn-color: var(--hy-primary);
  --bs-btn-border-color: #9fb4be;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--hy-primary);
  --bs-btn-hover-border-color: var(--hy-primary);
}

.btn-outline-secondary,
.btn-outline-dark {
  --bs-btn-color: var(--hy-graphite);
  --bs-btn-border-color: var(--hy-border-strong);
  --bs-btn-hover-color: var(--hy-text);
  --bs-btn-hover-bg: #edf1f3;
  --bs-btn-hover-border-color: #aebbc3;
}

.btn-outline-success {
  --bs-btn-color: var(--hy-success);
  --bs-btn-border-color: #8fb7a1;
  --bs-btn-hover-bg: var(--hy-success);
  --bs-btn-hover-border-color: var(--hy-success);
}

.btn-outline-warning {
  --bs-btn-color: #805417;
  --bs-btn-border-color: #d7b77f;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--hy-warning);
  --bs-btn-hover-border-color: var(--hy-warning);
}

.btn-outline-info {
  --bs-btn-color: var(--hy-info);
  --bs-btn-border-color: #9ebdce;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--hy-info);
  --bs-btn-hover-border-color: var(--hy-info);
}

.btn-danger,
.btn-outline-danger {
  --bs-btn-bg: var(--hy-danger);
  --bs-btn-border-color: var(--hy-danger);
}

.btn.is-loading {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.form-label {
  margin-bottom: 5px;
  color: #36444d;
  font-size: 12px;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 39px;
  color: var(--hy-text);
  background-color: #ffffff;
  border-color: var(--hy-border-strong);
  border-radius: var(--hy-radius-sm);
  font-size: 13px;
}

textarea.form-control {
  min-height: 92px;
}

.form-control:hover,
.form-select:hover {
  border-color: #9dafb9;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--hy-primary);
  box-shadow: 0 0 0 3px rgba(18, 56, 75, 0.12);
}

.form-check-input {
  border-color: #9dafb9;
}

.form-check-input:checked {
  background-color: var(--hy-primary);
  border-color: var(--hy-primary);
}

.form-text {
  color: var(--hy-muted);
  font-size: 11px;
}

.invalid-feedback {
  color: var(--hy-danger);
  font-size: 12px;
}

.filter-panel {
  background: #f9fafb;
  border-color: #dce3e7;
}

.filter-panel .form-label {
  color: #4e5c65;
}

.form-section {
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--hy-border);
}

.form-section:first-child {
  padding-top: 0;
}

.form-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.form-section-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  color: var(--hy-primary);
  background: var(--hy-primary-soft);
  border-radius: var(--hy-radius-sm);
  font-size: 15px;
}

.form-section-title {
  margin: 0;
  color: var(--hy-primary-strong);
  font-size: 15px;
  font-weight: 750;
}

.table-responsive {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border-radius: var(--hy-radius-sm);
}

.sticky-table-shell {
  max-height: min(58vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
}

.sticky-table-shell .table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px 0 var(--hy-border-strong);
}

.table {
  --bs-table-color: var(--hy-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--hy-border);
  --bs-table-hover-bg: #f3f7f8;
  margin-bottom: 0;
  font-size: 13px;
}

.table-text-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  min-width: 92px;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.table-action-dropdown {
  display: inline-flex;
}

.table-action-menu {
  width: 31px;
  height: 31px;
  min-height: 31px;
  flex-basis: 31px;
  color: var(--hy-muted);
}

.table-action-dropdown .dropdown-menu {
  min-width: 144px;
}

.money-value {
  color: var(--hy-primary-strong);
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.table > :not(caption) > * > * {
  padding: 10px 11px;
}

.table > thead > tr > th,
.table .table-light > * {
  color: #44535c;
  background: #edf1f3;
  border-bottom-width: 1px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.table > tbody > tr {
  transition: background-color var(--hy-duration) ease;
}

.table > tbody > tr:hover > * {
  background: #f3f7f8;
}

.table a:not(.btn) {
  font-weight: 650;
  text-decoration: none;
}

.table .btn + .btn,
.table .btn + form,
.table form + .btn,
.table form + form {
  margin-left: 3px;
}

.empty-state-cell {
  height: 140px;
  color: var(--hy-muted) !important;
  background: #fbfcfc !important;
  font-size: 13px;
}

.empty-state-cell::before {
  display: block;
  margin-bottom: 8px;
  color: #9aabb4;
  font-family: bootstrap-icons;
  font-size: 24px;
  content: "\f47b";
}

.rich-empty-state::before {
  display: none;
}

.empty-state-content {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  color: var(--hy-muted);
  text-align: center;
}

.empty-state-content strong {
  color: var(--hy-text);
  font-size: 14px;
}

.empty-state-content .btn {
  margin-top: 7px;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-neutral {
  color: #58656d;
  background: #edf0f2;
  border-color: #d6dde1;
}

.status-info {
  color: #245a76;
  background: var(--hy-info-soft);
  border-color: #c5dbe7;
}

.status-warning {
  color: #805417;
  background: var(--hy-warning-soft);
  border-color: #edd4a8;
}

.status-success {
  color: #246043;
  background: var(--hy-success-soft);
  border-color: #c5dfd0;
}

.status-danger {
  color: #8c3838;
  background: var(--hy-danger-soft);
  border-color: #ebc8c8;
}

.badge {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.text-bg-primary {
  color: #245a76 !important;
  background: var(--hy-info-soft) !important;
}

.text-bg-success {
  color: #246043 !important;
  background: var(--hy-success-soft) !important;
}

.text-bg-warning {
  color: #805417 !important;
  background: var(--hy-warning-soft) !important;
}

.text-bg-secondary {
  color: #58656d !important;
  background: #edf0f2 !important;
}

.pagination {
  gap: 4px;
}

.page-link {
  min-width: 35px;
  color: var(--hy-primary);
  text-align: center;
  border-color: var(--hy-border);
  border-radius: var(--hy-radius-sm) !important;
  font-size: 12px;
}

.page-item.active .page-link {
  color: #ffffff;
  background: var(--hy-primary);
  border-color: var(--hy-primary);
}

.alert {
  border-radius: var(--hy-radius);
  font-size: 13px;
}

.alert-success {
  color: #245f43;
  background: var(--hy-success-soft);
  border-color: #bfddcb;
}

.alert-warning {
  color: #7c531b;
  background: var(--hy-warning-soft);
  border-color: #ead0a3;
}

.alert-danger {
  color: #873838;
  background: var(--hy-danger-soft);
  border-color: #e9c5c5;
}

.toast-container {
  z-index: 1090;
  width: min(380px, calc(100vw - 24px));
}

.app-toast {
  overflow: hidden;
  color: var(--hy-text);
  background: #ffffff;
  border: 1px solid var(--hy-border);
  border-left-width: 4px;
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow);
}

.app-toast.toast-success {
  border-left-color: var(--hy-success);
}

.app-toast.toast-error {
  border-left-color: var(--hy-danger);
}

.app-toast.toast-warning {
  border-left-color: var(--hy-warning);
}

.app-toast.toast-info {
  border-left-color: var(--hy-info);
}

.toast-header {
  color: var(--hy-text);
  background: #ffffff;
  border-bottom-color: #edf0f2;
}

.toast-body {
  padding: 11px 13px 13px;
  font-size: 13px;
}

.modal-content {
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow);
}

.modal-header,
.modal-footer {
  border-color: var(--hy-border);
}

.description-list dt,
dl.row dt {
  padding-block: 8px;
  color: var(--hy-muted);
  font-size: 12px;
  font-weight: 650;
}

.description-list dd,
dl.row dd {
  margin-bottom: 0;
  padding-block: 8px;
  border-bottom: 1px solid #edf0f2;
}

.description-list dd:last-child,
dl.row dd:last-child {
  border-bottom: 0;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 18px;
}

.dashboard-brand {
  color: var(--hy-accent);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-heading h1 {
  margin: 3px 0 0;
  color: var(--hy-primary-strong);
  font-size: 27px;
  font-weight: 780;
}

.dashboard-date {
  color: var(--hy-muted);
  font-size: 12px;
}

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

.metric-card {
  display: flex;
  min-width: 0;
  min-height: 112px;
  align-items: center;
  gap: 13px;
  padding: 16px;
  color: var(--hy-text);
  background: var(--hy-panel);
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow-sm);
  text-decoration: none;
}

.metric-card:hover {
  color: var(--hy-text);
  transform: translateY(-2px);
  border-color: var(--hy-border-strong);
  box-shadow: var(--hy-shadow);
}

.metric-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  color: var(--hy-info);
  background: var(--hy-info-soft);
  border-radius: var(--hy-radius-sm);
  font-size: 19px;
}

.metric-warning .metric-icon {
  color: var(--hy-warning);
  background: var(--hy-warning-soft);
}

.metric-danger .metric-icon {
  color: var(--hy-danger);
  background: var(--hy-danger-soft);
}

.metric-success .metric-icon {
  color: var(--hy-success);
  background: var(--hy-success-soft);
}

.metric-copy,
.metric-label,
.metric-note {
  display: block;
  min-width: 0;
}

.metric-copy {
  overflow: hidden;
}

.metric-label {
  color: var(--hy-muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.metric-value {
  display: block;
  margin-top: 1px;
  color: var(--hy-primary-strong);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.2;
}

.metric-note {
  margin-top: 3px;
  overflow: hidden;
  color: var(--hy-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 14px;
}

.dashboard-panel {
  min-height: 330px;
}

.dashboard-document-table {
  min-width: 610px;
}

.document-primary {
  display: block;
  color: var(--hy-primary);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.document-kind {
  display: block;
  margin-top: 2px;
  color: var(--hy-muted);
  font-size: 10px;
  white-space: nowrap;
}

.warning-list {
  border-top: 1px solid var(--hy-border);
}

.warning-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  color: var(--hy-text);
  border-bottom: 1px solid var(--hy-border);
  text-decoration: none;
}

.warning-item:hover {
  color: var(--hy-primary);
  background: #fafcfc;
}

.warning-product,
.warning-qty,
.warning-product strong,
.warning-product span,
.warning-qty strong,
.warning-qty span {
  display: block;
  min-width: 0;
}

.warning-product {
  overflow: hidden;
}

.warning-product strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-product span,
.warning-qty span {
  color: var(--hy-muted);
  font-size: 10px;
  white-space: nowrap;
}

.warning-qty {
  flex: 0 0 auto;
  color: var(--hy-danger);
  text-align: right;
}

.warning-qty strong {
  font-size: 15px;
}

.dashboard-empty {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--hy-muted);
  text-align: center;
}

.dashboard-empty .bi {
  color: #9aabb4;
  font-size: 25px;
}

.dashboard-empty-success .bi {
  color: var(--hy-success);
}

.workspace-section + .workspace-section {
  margin-top: 20px;
}

.workspace-section-compact {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
}

.quick-group + .quick-group {
  margin-top: 13px;
}

.workspace-section-title {
  margin: 0 0 9px 2px;
  color: var(--hy-muted);
  font-size: 11px;
  font-weight: 750;
}

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

.workspace-link {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--hy-text);
  background: var(--hy-panel);
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow-sm);
  text-decoration: none;
}

.workspace-link:hover {
  color: var(--hy-primary);
  transform: translateY(-2px);
  border-color: #b5c6ce;
  box-shadow: var(--hy-shadow);
}

.workspace-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  color: var(--hy-primary);
  background: var(--hy-primary-soft);
  border-radius: var(--hy-radius-sm);
  font-size: 15px;
}

.workspace-label {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-thumb,
.product-thumb-placeholder {
  width: 76px;
  height: 76px;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius-sm);
  background: #ffffff;
}

.product-thumb {
  display: block;
  padding: 4px;
  object-fit: contain;
}

a:hover .product-thumb {
  transform: scale(1.035);
  border-color: #a9bcc5;
  box-shadow: 0 5px 14px rgba(19, 53, 69, 0.12);
}

.product-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  color: var(--hy-muted);
  font-size: 11px;
  text-align: center;
}

.product-identity {
  min-width: 220px;
}

.product-name-link {
  display: block;
  overflow: hidden;
  color: var(--hy-primary-strong);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-code {
  display: block;
  margin-top: 3px;
  color: var(--hy-muted);
  font-family: Consolas, "Microsoft YaHei UI", sans-serif;
  font-size: 11px;
}

.product-data-table {
  min-width: 1380px;
}

.product-image-column {
  width: 98px;
}

.product-main-column {
  min-width: 240px;
}

.product-variant-column {
  min-width: 160px;
}

.product-variant {
  min-width: 145px;
}

.product-variant-separator {
  margin-inline: 5px;
  color: #a2afb6;
}

.supplier-name {
  width: 170px;
}

.quotation-data-table {
  min-width: 900px;
}

.quotation-customer {
  min-width: 170px;
  font-weight: 700;
}

.inventory-safety-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: #315064;
  background: var(--hy-info-soft);
  border: 1px solid #c7dce7;
  border-radius: var(--hy-radius-sm);
  font-size: 12px;
}

.inventory-safety-note .bi {
  flex: 0 0 auto;
  font-size: 16px;
}

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

.inventory-metric {
  position: relative;
  min-width: 0;
  padding: 14px 15px;
  overflow: hidden;
  background: var(--hy-panel);
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow-sm);
}

.inventory-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--hy-info);
  content: "";
}

.inventory-metric-success::before {
  background: var(--hy-success);
}

.inventory-metric-warning::before {
  background: var(--hy-warning);
}

.inventory-metric-danger::before {
  background: var(--hy-danger);
}

.inventory-metric-label {
  display: block;
  color: var(--hy-muted);
  font-size: 11px;
  font-weight: 650;
}

.inventory-metric-value {
  display: block;
  margin-top: 2px;
  color: var(--hy-primary-strong);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.metric-scope-note {
  margin: 5px 2px 14px;
  color: var(--hy-muted);
  font-size: 10px;
}

.inventory-data-table {
  min-width: 1080px;
}

.stock-quantity {
  display: inline-block;
  min-width: 76px;
  color: var(--hy-success);
  font-size: 17px;
  font-weight: 800;
  text-align: right;
}

.stock-quantity.is-low {
  color: var(--hy-warning);
}

.stock-quantity.is-zero {
  color: var(--hy-danger);
}

.stock-warning-qty {
  color: var(--hy-muted);
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.product-overview {
  padding: 20px 0 22px;
  border-top: 1px solid var(--hy-border);
  border-bottom: 1px solid var(--hy-border);
}

.detail-image-frame {
  position: relative;
  display: flex;
  width: min(100%, 390px);
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
}

.detail-image-button {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  background: transparent;
  border: 0;
  border-radius: var(--hy-radius);
}

.detail-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
}

.image-zoom-hint {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(12, 41, 56, 0.84);
  border-radius: var(--hy-radius-sm);
  font-size: 11px;
  pointer-events: none;
}

.detail-image-placeholder {
  color: var(--hy-muted);
  text-align: center;
}

.detail-image-placeholder .bi {
  display: block;
  margin-bottom: 8px;
  color: #a2b0b7;
  font-size: 32px;
}

.price-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  overflow: hidden;
  background: #f8fafb;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
}

.price-item {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--hy-border);
}

.price-item:last-child {
  border-right: 0;
}

.price-label {
  color: var(--hy-muted);
  font-size: 11px;
  font-weight: 650;
}

.price-value {
  margin-top: 3px;
  overflow: hidden;
  color: var(--hy-primary-strong);
  font-size: 22px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-item:first-child .price-value {
  color: #8a5b1d;
}

.product-image-preview {
  display: flex;
  width: min(100%, 300px);
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  padding: 9px;
  object-fit: contain;
}

.product-image-preview-placeholder {
  color: var(--hy-muted);
  font-size: 13px;
}

.product-upload-zone {
  min-height: 170px;
  padding: 18px;
  background: #fafbfb;
  border: 1px dashed #9cafb8;
  border-radius: var(--hy-radius);
}

.product-upload-zone.is-dragover {
  background: var(--hy-primary-soft);
  border-color: var(--hy-primary);
  box-shadow: inset 0 0 0 1px var(--hy-primary);
}

.form-save-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--hy-sidebar-width);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--hy-border-strong);
  box-shadow: 0 -8px 22px rgba(22, 43, 55, 0.07);
  transition: left var(--hy-duration) ease;
}

.sidebar-collapsed .form-save-bar {
  left: var(--hy-sidebar-collapsed-width);
}

.has-form-save-bar .app-content {
  padding-bottom: 96px;
}

.save-state {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--hy-muted);
  font-size: 12px;
}

.save-state-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #9aa7ae;
  border-radius: 50%;
}

.form-save-bar.is-dirty .save-state {
  color: #805417;
  font-weight: 700;
}

.form-save-bar.is-dirty .save-state-indicator {
  background: var(--hy-warning);
  box-shadow: 0 0 0 3px var(--hy-warning-soft);
}

.form-save-bar.is-submitting .save-state {
  color: var(--hy-info);
}

.form-save-bar.is-submitting .save-state-indicator {
  background: var(--hy-info);
  box-shadow: 0 0 0 3px var(--hy-info-soft);
}

.form-save-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.upload-zone-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--hy-primary);
  font-size: 13px;
  font-weight: 700;
}

.product-image-modal {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  object-fit: contain;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 440px);
  place-content: center;
  padding: 24px;
  background: var(--hy-page);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--hy-primary-strong);
}

.auth-brand-title {
  display: block;
  font-size: 17px;
  font-weight: 800;
}

.auth-brand-subtitle {
  display: block;
  color: var(--hy-muted);
  font-size: 11px;
}

.auth-card {
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  box-shadow: var(--hy-shadow);
}

.auth-card h1 {
  margin: 0 0 5px;
  color: var(--hy-primary-strong);
  font-size: 23px;
  font-weight: 780;
}

.auth-card label {
  display: block;
  margin: 15px 0 5px;
  color: #36444d;
  font-size: 12px;
  font-weight: 700;
}

.auth-card input {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  color: var(--hy-text);
  background: #ffffff;
  border: 1px solid var(--hy-border-strong);
  border-radius: var(--hy-radius-sm);
}

.auth-card button[type="submit"] {
  width: 100%;
  margin-top: 20px;
}

.auth-note {
  margin: 0 0 18px;
  color: var(--hy-muted);
  font-size: 12px;
}

.document-eyebrow {
  margin-bottom: 3px;
  color: var(--hy-accent);
  font-size: 11px;
  font-weight: 750;
}

.sales-order-data-table {
  min-width: 1080px;
}

.outbound-order-data-table {
  min-width: 1120px;
}

.document-customer {
  min-width: 150px;
  font-weight: 700;
}

.document-date-cell {
  min-width: 132px;
  white-space: nowrap;
}

.document-date-cell span,
.document-date-cell small {
  display: block;
}

.document-date-cell small {
  margin-top: 2px;
  color: var(--hy-muted);
  font-size: 10px;
}

.compact-progress {
  min-width: 168px;
}

.compact-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--hy-muted);
  font-size: 10px;
  white-space: nowrap;
}

.compact-progress-heading strong {
  color: var(--hy-primary);
  font-size: 11px;
}

.compact-progress small {
  display: block;
  margin-top: 4px;
  color: var(--hy-muted);
  font-size: 10px;
  white-space: nowrap;
}

.quantity-progress {
  position: relative;
  width: 100%;
  height: 7px;
  overflow: hidden;
  background: #e3e8eb;
  border-radius: 999px;
}

.quantity-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--hy-success);
  border-radius: inherit;
  transition: width var(--hy-duration) ease;
}

.quantity-progress-large {
  height: 10px;
}

.progress-percentage {
  color: var(--hy-success);
  font-size: 20px;
  line-height: 1;
}

.document-overview-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.document-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px -18px;
  border-top: 1px solid var(--hy-border);
  border-bottom: 1px solid var(--hy-border);
}

.document-stat {
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid var(--hy-border);
}

.document-stat:last-child {
  border-right: 0;
}

.document-stat span,
.document-stat strong {
  display: block;
  min-width: 0;
}

.document-stat span {
  margin-bottom: 3px;
  color: var(--hy-muted);
  font-size: 11px;
}

.document-stat strong {
  overflow: hidden;
  color: var(--hy-primary-strong);
  font-size: 18px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.document-meta-grid > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f3;
}

.document-meta-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.document-meta-grid dt {
  color: var(--hy-muted);
  font-size: 12px;
  font-weight: 650;
}

.document-meta-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.status-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-timeline-step {
  position: relative;
  min-width: 0;
  padding-top: 24px;
  color: var(--hy-muted);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.status-timeline-step::after {
  position: absolute;
  top: 8px;
  right: -50%;
  left: 50%;
  z-index: 0;
  height: 2px;
  background: var(--hy-border-strong);
  content: "";
}

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

.status-timeline-marker {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 1;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  background: #ffffff;
  border: 2px solid var(--hy-border-strong);
  border-radius: 50%;
}

.status-timeline-step.is-complete {
  color: var(--hy-success);
}

.status-timeline-step.is-complete::after {
  background: #9fc7b0;
}

.status-timeline-step.is-complete .status-timeline-marker {
  background: var(--hy-success);
  border-color: var(--hy-success);
}

.status-timeline-step.is-current {
  color: var(--hy-primary);
  font-weight: 750;
}

.status-timeline-step.is-current .status-timeline-marker {
  background: #ffffff;
  border-color: var(--hy-primary);
  box-shadow: 0 0 0 4px var(--hy-primary-soft);
}

.status-timeline-step.is-danger {
  color: var(--hy-danger);
  font-weight: 750;
}

.status-timeline-step.is-danger .status-timeline-marker {
  background: var(--hy-danger);
  border-color: var(--hy-danger);
  box-shadow: 0 0 0 4px var(--hy-danger-soft);
}

.document-detail-table {
  min-width: 980px;
}

.linked-document-table {
  min-width: 760px;
}

.quantity-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.remaining-quantity {
  color: var(--hy-success);
}

.remaining-quantity.has-remaining {
  color: var(--hy-warning);
}

.outbound-quantity {
  color: var(--hy-primary-strong);
  font-size: 14px;
}

.document-status-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: var(--hy-radius);
  font-size: 12px;
}

.document-status-note .bi {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 16px;
}

.status-note-info {
  color: #245a76;
  background: var(--hy-info-soft);
  border-color: #c5dbe7;
}

.status-note-success {
  color: #246043;
  background: var(--hy-success-soft);
  border-color: #c5dfd0;
}

.status-note-danger {
  color: #8c3838;
  background: var(--hy-danger-soft);
  border-color: #ebc8c8;
}

.document-context-panel {
  padding-block: 14px;
}

.document-context-primary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-context-primary > div {
  min-width: 0;
  padding: 2px 16px;
  border-right: 1px solid var(--hy-border);
}

.document-context-primary > div:first-child {
  padding-left: 0;
}

.document-context-primary > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.document-context-primary span,
.document-context-primary strong {
  display: block;
  min-width: 0;
}

.document-context-primary span {
  margin-bottom: 2px;
  color: var(--hy-muted);
  font-size: 10px;
}

.document-context-primary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outbound-form-table {
  min-width: 980px;
}

.outbound-qty-field {
  min-width: 170px;
}

.form-row-error > * {
  background: #fff8f8 !important;
}

.confirm-action-detail {
  max-height: min(48vh, 340px);
  overflow: auto;
  padding: 11px 12px;
  background: #f8fafb;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius-sm);
}

.confirm-summary p {
  margin: 0 0 8px;
  color: var(--hy-text);
  font-size: 12px;
}

.confirm-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hy-border);
}

.confirm-summary li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hy-border);
  font-size: 11px;
}

.confirm-summary li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-summary li strong {
  flex: 0 0 auto;
  color: var(--hy-danger);
  font-variant-numeric: tabular-nums;
}

.confirm-summary small {
  display: block;
  margin-top: 8px;
  color: var(--hy-muted);
  font-size: 10px;
}

.confirm-summary-danger p,
.confirm-summary-danger li strong {
  color: var(--hy-danger);
}

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

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

  .app-content {
    padding: 18px;
  }
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: 82vw;
    max-width: 320px;
    transform: translateX(-100%);
    box-shadow: var(--hy-shadow);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .app-main-shell,
  .sidebar-collapsed .app-main-shell {
    margin-left: 0;
  }

  .sidebar-collapsed .app-sidebar {
    width: 82vw;
    max-width: 320px;
  }

  .sidebar-collapsed .brand-copy,
  .sidebar-collapsed .app-nav-label,
  .sidebar-collapsed .nav-section-label,
  .sidebar-collapsed .sidebar-footer span {
    width: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-collapsed .sidebar-brand,
  .sidebar-collapsed .app-nav-link,
  .sidebar-collapsed .sidebar-footer {
    justify-content: flex-start;
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-overlay {
    display: block;
  }

  .mobile-sidebar-close {
    position: absolute;
    top: 13px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #dbe7ec;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--hy-radius-sm);
  }

  .mobile-sidebar-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
  }

  .sidebar-brand {
    padding-right: 58px;
  }

  .desktop-sidebar-toggle {
    display: none;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .app-topbar {
    padding-inline: 14px;
  }

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

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

  .dashboard-panel {
    min-height: 0;
  }

  .product-overview {
    padding-top: 16px;
  }

  .document-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-stat:nth-child(2) {
    border-right: 0;
  }

  .document-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--hy-border);
  }

  .document-context-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-context-primary > div:nth-child(2) {
    border-right: 0;
  }

  .document-context-primary > div:nth-child(-n + 2) {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hy-border);
  }

  .document-context-primary > div:nth-child(n + 3) {
    padding-top: 10px;
  }
}

@media (max-width: 767.98px) {
  .app-content {
    padding: 14px;
  }

  .app-topbar {
    min-height: 58px;
  }

  .topbar-actions > .btn,
  .user-copy,
  .topbar-eyebrow {
    display: none;
  }

  .topbar-user {
    padding: 3px;
  }

  .page-header,
  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .panel {
    padding: 15px;
  }

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

  .form-save-bar {
    left: 0;
    padding: 11px 15px;
  }

  .price-strip {
    grid-template-columns: 1fr 1fr;
  }

  .price-item {
    border-bottom: 1px solid var(--hy-border);
  }

  .price-item:nth-child(2n) {
    border-right: 0;
  }

  .price-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .table > :not(caption) > * > * {
    padding: 9px;
  }

  .document-meta-grid {
    grid-template-columns: 1fr;
  }

  .document-meta-grid > div:nth-last-child(2) {
    border-bottom: 1px solid #edf1f3;
  }

  .status-timeline {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .status-timeline-step {
    min-height: 30px;
    padding: 5px 0 5px 29px;
    text-align: left;
  }

  .status-timeline-step::after {
    top: 20px;
    right: auto;
    bottom: -12px;
    left: 7px;
    width: 2px;
    height: auto;
  }

  .status-timeline-marker {
    top: 7px;
    left: 7px;
    transform: none;
  }
}

@media (max-width: 575.98px) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

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

  .workspace-link {
    min-height: 54px;
  }

  .price-item,
  .price-item:nth-child(2n),
  .price-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--hy-border);
  }

  .price-item:last-child {
    border-bottom: 0;
  }

  .page-actions .btn,
  .page-actions form {
    flex: 1 1 auto;
  }

  .page-actions form .btn {
    width: 100%;
  }

  .form-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .has-form-save-bar .app-content {
    padding-bottom: 142px;
  }

  .form-save-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
  }

  .form-save-actions .btn {
    width: 100%;
  }

  .auth-shell {
    padding: 14px;
  }

  .auth-card {
    padding: 21px;
  }

  .document-stat-strip {
    grid-template-columns: 1fr;
  }

  .document-stat,
  .document-stat:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--hy-border);
  }

  .document-stat:last-child {
    border-bottom: 0;
  }

  .document-context-primary {
    grid-template-columns: 1fr;
  }

  .document-context-primary > div,
  .document-context-primary > div:first-child,
  .document-context-primary > div:last-child,
  .document-context-primary > div:nth-child(n + 3) {
    padding: 9px 0;
    border-right: 0;
    border-bottom: 1px solid var(--hy-border);
  }

  .document-context-primary > div:last-child {
    border-bottom: 0;
  }

  .document-meta-grid > div {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .app-sidebar,
  .app-topbar,
  .sidebar-overlay,
  .toast-container {
    display: none !important;
  }

  .app-main-shell {
    margin-left: 0 !important;
  }

  .app-content {
    max-width: none;
    padding: 0;
    overflow: visible;
  }

  .panel {
    box-shadow: none;
  }
}

/* Retail quick sale */
.retail-sale-safety-note strong,
.retail-sale-safety-note span {
  display: block;
}

.retail-sale-safety-note strong {
  margin-bottom: 2px;
}

.retail-sale-table-shell {
  max-width: 100%;
  border: 1px solid var(--hy-border);
  border-radius: var(--hy-radius);
  overflow: auto;
}

.retail-sale-table {
  min-width: 980px;
  table-layout: fixed;
}

.retail-sale-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.retail-sale-table th:nth-child(1) {
  width: 31%;
}

.retail-sale-table th:nth-child(2) {
  width: 12%;
}

.retail-sale-table th:nth-child(3) {
  width: 16%;
}

.retail-sale-table th:nth-child(4) {
  width: 14%;
}

.retail-sale-table th:nth-child(5) {
  width: 22%;
}

.retail-sale-table th:nth-child(6) {
  width: 5%;
}

.retail-sale-table td {
  padding: 12px 10px;
  vertical-align: top;
}

.retail-product-search {
  width: 100%;
  font-weight: 650;
}

.retail-product-combobox {
  position: relative;
  min-width: 0;
}

.retail-product-listbox {
  position: fixed;
  z-index: 1085;
  max-width: calc(100vw - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--hy-border-strong);
  border-radius: var(--hy-radius);
  background: var(--hy-panel);
  box-shadow: var(--hy-shadow);
}

.retail-product-option {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  color: var(--hy-text);
  background: var(--hy-panel);
  cursor: pointer;
  transition:
    border-color var(--hy-duration) ease,
    background-color var(--hy-duration) ease;
}

.retail-product-option + .retail-product-option {
  border-top: 1px solid var(--hy-border);
}

.retail-product-option:hover,
.retail-product-option.is-active,
.retail-product-option[aria-selected="true"] {
  border-left-color: var(--hy-accent);
  background: var(--hy-primary-soft);
}

.retail-product-option-image,
.retail-product-option-image img,
.retail-product-image-placeholder {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: var(--hy-radius-sm);
}

.retail-product-option-image {
  display: block;
  overflow: hidden;
  border: 1px solid var(--hy-border);
  background: #fff;
}

.retail-product-option-image img {
  display: block;
  object-fit: contain;
}

.retail-product-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  color: var(--hy-muted);
  background: var(--hy-page);
}

.retail-product-image-placeholder .bi {
  font-size: 16px;
}

.retail-product-image-placeholder span {
  font-size: 8px;
  line-height: 1;
}

.retail-product-option-copy,
.retail-product-option-code,
.retail-product-option-name,
.retail-product-option-meta {
  display: block;
  min-width: 0;
}

.retail-product-option-copy {
  overflow: hidden;
}

.retail-product-option-code {
  overflow: hidden;
  color: var(--hy-primary-strong);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retail-product-option-name {
  overflow: hidden;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retail-product-option-meta {
  overflow: hidden;
  margin-top: 2px;
  color: var(--hy-muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retail-product-option-empty {
  padding: 14px 12px;
  color: var(--hy-muted);
  text-align: center;
  font-size: 12px;
}

.retail-product-meta {
  min-height: 18px;
  margin-top: 5px;
  font-size: 12px;
}

.retail-line-amount-cell strong,
.retail-line-amount-cell span {
  display: block;
}

.retail-line-amount-cell strong {
  padding-top: 7px;
  font-size: 15px;
}

.retail-line-amount-cell span {
  margin-top: 5px;
  font-size: 11px;
}

.retail-line-action {
  text-align: center;
}

.retail-delete-field {
  display: none;
}

.retail-sale-summary {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--hy-border);
}

.retail-sale-summary > div {
  min-width: 170px;
  padding: 12px 16px 0;
  text-align: right;
}

.retail-sale-summary span,
.retail-sale-summary strong {
  display: block;
}

.retail-sale-summary span {
  color: var(--hy-muted);
  font-size: 12px;
}

.retail-sale-summary strong {
  margin-top: 2px;
  color: var(--hy-primary-strong);
  font-size: 19px;
}

.retail-sale-save-bar {
  gap: 18px;
}

.retail-save-totals {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}

.retail-save-totals span {
  color: var(--hy-muted);
  font-size: 12px;
}

.retail-save-totals strong,
.retail-save-totals .money-value {
  color: var(--hy-primary-strong);
  font-size: 16px;
}

@media (max-width: 767.98px) {
  .retail-items-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .retail-items-heading .btn {
    width: 100%;
  }

  .retail-sale-table-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    overflow: visible;
  }

  .retail-sale-table,
  .retail-sale-table tbody,
  .retail-sale-table tr,
  .retail-sale-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .retail-sale-table {
    min-width: 0;
  }

  .retail-sale-table thead {
    display: none;
  }

  .retail-sale-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--hy-border);
  }

  .retail-sale-table tr:last-child {
    border-bottom: 0;
  }

  .retail-sale-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 7px 2px;
    border: 0;
  }

  .retail-sale-table td::before {
    padding-top: 8px;
    color: var(--hy-muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
  }

  .retail-sale-table .retail-product-cell {
    display: grid;
  }

  .retail-product-cell .retail-product-meta,
  .retail-product-cell .invalid-feedback {
    grid-column: 2;
  }

  .retail-product-combobox {
    width: 100%;
  }

  .retail-line-amount-cell strong {
    padding-top: 7px;
  }

  .retail-line-action {
    align-items: center;
    text-align: left;
  }

  .retail-sale-summary {
    justify-content: stretch;
  }

  .retail-sale-summary > div {
    min-width: 0;
    flex: 1 1 50%;
    padding-right: 8px;
    padding-left: 8px;
  }

  .retail-sale-save-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .retail-save-totals {
    justify-content: flex-end;
    gap: 10px;
    margin-left: 0;
  }

  .retail-sale-save-bar .form-save-actions {
    grid-column: 1 / -1;
  }

  .has-form-save-bar .app-content {
    padding-bottom: 154px;
  }
}

@media (max-width: 420px) {
  .retail-save-totals span:first-child {
    display: none;
  }

  .retail-sale-save-bar .save-state {
    font-size: 11px;
  }
}
