:root {
  --ink: #12212f;
  --muted: #627487;
  --line: #d9e4ea;
  --paper: #f7faf7;
  --panel: #ffffff;
  --blue: #0b4a7a;
  --blue-2: #0e6ea8;
  --cyan: #8bd8d0;
  --yellow: #f1c40f;
  --amber: #ffdc70;
  --green: #1f8a5b;
  --red: #c94f4f;
  --shadow: 0 20px 48px rgba(20, 48, 70, 0.12);
  --radius: 8px;
  --font-zh: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-vi: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(139, 216, 208, 0.22), transparent 30%),
    linear-gradient(315deg, rgba(241, 196, 15, 0.18), transparent 26%),
    var(--paper);
  font-family: var(--font-zh);
  letter-spacing: 0;
}

html[lang="vi"] body,
body.lang-vi {
  font-family: var(--font-vi);
}

html[lang="zh-CN"] body,
body.lang-zh {
  font-family: var(--font-zh);
}

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

button {
  cursor: pointer;
}

body.read-only-mode form:not(#login-form):not(#login-change-password-form):not(#forced-change-password-form) button[type="submit"],
body.read-only-mode .file-button,
body.read-only-mode button.danger,
body.read-only-mode button.success,
body.read-only-mode [data-export-csv],
body.read-only-mode [data-action="preview-import-draft"],
body.read-only-mode [data-action="prelaunch-clear-business"],
body.read-only-mode [data-action="reset-demo"],
body.read-only-mode [data-action^="edit-"],
body.read-only-mode [data-action^="toggle-"],
body.read-only-mode [data-action="order-advance"],
body.read-only-mode [data-action="order-cancel"],
body.read-only-mode [data-action="confirm-inbound-movement"],
body.read-only-mode [data-action="complete-opening-data"],
body.read-only-mode [data-action="unlock-opening-data"],
body.read-only-mode [data-action="send-campaign-real"],
body.read-only-mode [data-action="mark-campaign-sent"],
body.read-only-mode [data-action="clear-zalo-api-config"] {
  display: none !important;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(11, 74, 122, 0.94), rgba(6, 47, 78, 0.98)),
    var(--blue);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.brand {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}

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

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

.brand small {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4px;
}

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

.nav button {
  min-height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.nav button .count {
  min-width: 28px;
  padding: 2px 7px;
  color: #0d3b5e;
  border-radius: 999px;
  background: var(--yellow);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.sidebar-foot strong {
  color: #fff;
}

.workspace {
  min-width: 0;
  padding: 22px 24px 36px;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue-2);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}

h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.top-actions,
.button-row,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.full-button {
  width: 100%;
  justify-content: center;
}

.standalone-form {
  max-width: 560px;
  margin: 32px auto;
}

.login-form.standalone-form {
  position: relative;
  top: auto;
  right: auto;
  width: min(560px, 100%);
  transform: none;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.login-form.standalone-form h2,
.login-form.standalone-form label,
.login-form.standalone-form .muted,
.login-form.standalone-form .small-note {
  color: var(--ink);
}

.login-form.standalone-form input {
  color: var(--ink);
  background: #fff;
  border-color: #cbdde5;
}

.auth-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--blue);
  background: #eef8fb;
  border: 1px solid #c9e6ef;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(58px, 1fr));
  padding: 3px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #c9e6ef;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 26px rgba(11, 74, 122, 0.08);
}

.language-switch button {
  min-height: 32px;
  padding: 5px 10px;
  color: var(--blue);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.language-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0c8fb0);
  box-shadow: 0 8px 18px rgba(5, 70, 119, 0.22);
}

.login-language-switch {
  justify-self: start;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.login-language-switch button {
  color: #e8f7ff;
}

.login-language-switch button.active {
  color: #092338;
  background: linear-gradient(135deg, #ffffff, #d7f4ff);
}

.primary,
.ghost,
.danger,
.success,
.mini,
.soft {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  font-weight: 700;
}

.primary {
  color: #fff;
  background: var(--blue);
}

.success {
  color: #fff;
  background: var(--green);
}

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

.ghost,
.soft {
  color: var(--blue);
  background: #fff;
  border-color: var(--line);
}

.soft {
  color: var(--ink);
  background: #f4f8fa;
}

.mini {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--blue);
  background: #eef8fb;
  border-color: #c9e6ef;
}

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

.mini.success {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.app {
  display: grid;
  gap: 18px;
}

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

body.login-mode {
  background: linear-gradient(135deg, #021928, #0a4d7c 48%, #07121b);
  overflow: hidden;
}

.login-mode .sidebar {
  display: none;
}

.login-mode .workspace {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 34px;
}

.login-mode .topbar {
  display: none;
}

.login-stage {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.38);
}

.login-bg,
.login-bg img {
  position: absolute;
  inset: 0;
}

.login-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.login-bg::before,
.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.login-bg::before {
  background:
    linear-gradient(90deg, rgba(2, 15, 24, 0.88), rgba(6, 48, 76, 0.56) 46%, rgba(2, 15, 24, 0.76)),
    linear-gradient(0deg, rgba(2, 15, 24, 0.86), rgba(2, 15, 24, 0.12) 48%, rgba(255, 255, 255, 0.12));
}

.login-bg::after {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, transparent, rgba(6, 27, 42, 0.56));
  mix-blend-mode: screen;
  opacity: 0.48;
  animation: frostSweep 9s linear infinite;
}

.frost-line {
  position: absolute;
  z-index: 2;
  left: -16%;
  width: 132%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155, 230, 240, 0.82), rgba(255, 224, 112, 0.55), transparent);
  box-shadow: 0 0 26px rgba(139, 216, 208, 0.55);
  transform: rotate(-9deg);
  animation: lineGlide 7.6s ease-in-out infinite;
}

.frost-line.line-a {
  top: 25%;
}

.frost-line.line-b {
  top: 52%;
  animation-delay: -2.6s;
}

.frost-line.line-c {
  top: 78%;
  animation-delay: -4.8s;
}

.login-glass-shell {
  position: relative;
  z-index: 3;
  width: min(1080px, calc(100% - 42px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.82fr);
  gap: 0;
  min-height: 590px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px) saturate(126%);
  overflow: hidden;
}

.login-brand-pane {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 34px;
  min-height: 590px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.04)),
    rgba(3, 27, 43, 0.3);
}

.login-brand-pane::after {
  content: "";
  position: absolute;
  inset: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  border-radius: 8px;
  opacity: 0.18;
  pointer-events: none;
}

.login-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.login-hero-copy p {
  margin: 0;
  color: var(--amber);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-hero-copy h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  text-wrap: balance;
}

.login-hero-copy span {
  width: fit-content;
  padding: 8px 12px;
  color: #eaf8ff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-weight: 800;
}

.login-stat-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-stat-strip span {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.login-stat-strip b {
  color: #fff;
  font-size: 15px;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12)),
    rgba(245, 251, 255, 0.13);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(26px) saturate(142%);
}

.login-logo-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.login-logo-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

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

.login-logo-row strong {
  font-size: 20px;
  color: #fff;
}

.login-logo-row span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-form h2 {
  margin-bottom: 0;
  color: #fff;
  font-size: 36px;
  line-height: 1.1;
}

.login-form .muted {
  color: rgba(236, 248, 255, 0.74);
}

.login-form label {
  font-weight: 800;
  color: rgba(244, 251, 255, 0.82);
}

.login-form input {
  margin-top: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-form input::placeholder {
  color: rgba(238, 248, 255, 0.58);
}

.login-form input:focus {
  border-color: rgba(139, 216, 208, 0.86);
  box-shadow: 0 0 0 3px rgba(139, 216, 208, 0.2), 0 12px 30px rgba(0, 0, 0, 0.16);
}

.login-submit {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  background: linear-gradient(90deg, #0c5c92, #0f8db4, #f1c40f);
  box-shadow: 0 18px 42px rgba(3, 49, 77, 0.34);
}

.login-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-120%);
  animation: buttonSheen 3.4s ease-in-out infinite;
}

.small-note {
  font-size: 12px;
}

.login-error {
  padding: 10px 12px;
  color: #fff;
  background: rgba(201, 79, 79, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  font-weight: 700;
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(-0.6%, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(0.8%, -0.8%, 0);
  }
}

@keyframes frostSweep {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 120px 0, 0 0;
  }
}

@keyframes lineGlide {
  0%,
  100% {
    transform: translateX(-6%) rotate(-9deg);
    opacity: 0.28;
  }
  45% {
    transform: translateX(6%) rotate(-9deg);
    opacity: 0.82;
  }
}

@keyframes buttonSheen {
  0%,
  42% {
    transform: translateX(-120%);
  }
  72%,
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg img,
  .login-bg::after,
  .frost-line,
  .login-submit::after {
    animation: none;
  }
}

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

.stacked-panels {
  display: grid;
  gap: 18px;
}

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

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

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

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

.panel,
.metric,
.table-wrap,
.form-panel,
.notice,
.kanban,
.product-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel,
.form-panel,
.notice,
.kanban {
  padding: 16px;
}

.sub-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compact-warning {
  margin: 12px 0;
  border-color: rgba(241, 196, 15, 0.42);
  background: linear-gradient(135deg, rgba(255, 244, 191, 0.82), rgba(255, 255, 255, 0.9));
}

.compact-warning p {
  margin-bottom: 0;
}

.opening-entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  border-color: rgba(12, 143, 176, 0.26);
  background: linear-gradient(135deg, rgba(238, 248, 251, 0.95), rgba(255, 255, 255, 0.92));
}

.opening-entry-card p {
  margin-bottom: 8px;
}

.opening-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.opening-entry-meta span {
  padding: 4px 8px;
  border: 1px solid #c9e6ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.metric {
  min-height: 108px;
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.metric small {
  color: var(--muted);
  font-weight: 700;
}

.metric strong {
  font-size: 28px;
  line-height: 1;
}

.metric.blue {
  color: #fff;
  border-color: rgba(11, 74, 122, 0.24);
  background: linear-gradient(135deg, var(--blue), #1474a4);
}

.metric.yellow {
  color: #173b56;
  border-color: rgba(241, 196, 15, 0.5);
  background: linear-gradient(135deg, #fff4bf, var(--yellow));
}

.metric.green {
  color: #fff;
  background: linear-gradient(135deg, #1f8a5b, #36b47b);
}

.compact-metrics {
  margin-top: -4px;
}

.customer-summary {
  margin-bottom: 14px;
}

.soft-metric {
  min-height: 82px;
  background: rgba(255, 255, 255, 0.82);
}

.soft-metric strong {
  font-size: 22px;
}

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

.check-pass-card {
  display: grid;
  gap: 12px;
  min-height: 148px;
  align-content: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(31, 138, 91, 0.08), rgba(255, 255, 255, 0.9)),
    #fff;
  border: 1px dashed rgba(31, 138, 91, 0.28);
  border-radius: var(--radius);
}

.check-pass-card .button-row {
  margin-top: 2px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  width: min(260px, 100%);
}

.file-button {
  position: relative;
  width: fit-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(233, 246, 251, 0.86), rgba(255, 255, 255, 0.94)),
    #fff;
  border: 1px dashed #9fc9d9;
  border-radius: var(--radius);
}

.upload-card.compact,
.upload-card.backup-upload {
  grid-template-columns: 76px minmax(0, 1fr);
  margin-top: 14px;
}

.upload-card strong {
  display: block;
  margin-bottom: 4px;
}

.upload-card p {
  margin-bottom: 10px;
}

.upload-preview {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  background: #f8fbfc;
  border: 1px solid #e2edf2;
  border-radius: var(--radius);
}

.upload-preview img {
  max-width: 86px;
  max-height: 86px;
  object-fit: contain;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: var(--blue);
  background: #e9f6fb;
  border: 1px solid #cce7f0;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
}

.link-mini {
  text-decoration: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cad9e0;
  border-radius: 6px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(14, 110, 168, 0.12);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

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

.form-grid .wide {
  grid-column: span 2;
}

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

.order-lines-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-lines-header,
.order-line-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(112px, 0.7fr) minmax(150px, 0.9fr) minmax(190px, 1fr) 78px;
  gap: 10px;
  align-items: end;
}

.order-lines-header {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-line-list {
  display: grid;
  gap: 8px;
}

.order-line-row {
  padding: 10px;
  background: #fff;
  border: 1px solid #e0edf2;
  border-radius: 8px;
}

.order-line-meta,
.order-line-amount {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  color: var(--ink);
  background: #eef7fb;
  border: 1px solid #d6e8ef;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.order-line-amount {
  display: grid;
  gap: 6px;
  justify-content: flex-end;
  text-align: right;
}

.order-line-amount label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.order-line-amount input {
  min-width: 120px;
}

.order-line-amount span {
  color: var(--ink);
}

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

.freezer-stock-hint,
.freezer-customer-preview {
  display: grid;
  gap: 4px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #f2f8fb;
  border: 1px solid #d7e8ef;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.freezer-customer-preview span {
  color: var(--muted);
  font-weight: 700;
  white-space: normal;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7eef2;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f2f7f9;
  font-size: 12px;
  text-transform: uppercase;
}

td.wrap {
  white-space: normal;
  min-width: 220px;
}

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

.summary-row td {
  background: #f8fbfd;
  border-bottom: 1px solid #cfe1ea;
  font-weight: 800;
}

.summary-row .muted {
  font-weight: 700;
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag,
.status,
.risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag {
  color: var(--blue);
  background: #e9f6fb;
}

.status {
  color: #274c5c;
  background: #ecf1f4;
}

.status.good {
  color: #12603f;
  background: #def4ea;
}

.status.warn {
  color: #7d5600;
  background: #fff0bd;
}

.status.bad {
  color: #8a2e2e;
  background: #ffe1e1;
}

.risk {
  color: #8a2e2e;
  background: #ffe9e9;
}

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

.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title p {
  margin-bottom: 0;
  color: var(--muted);
}

.section-title.compact {
  align-items: center;
  margin-bottom: 6px;
}

.section-title.compact h3 {
  margin-bottom: 3px;
  font-size: 18px;
}

.stock-bar {
  width: 140px;
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f4;
}

.stock-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: linear-gradient(90deg, var(--green), var(--yellow));
}

.customer-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.customer-card strong {
  font-size: 16px;
}

.product-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.product-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: #f8fbfc;
  border: 1px solid #e6eef2;
  border-radius: var(--radius);
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.order-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.order-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.order-lines {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e7eef2;
}

.timeline time {
  color: var(--blue);
  font-weight: 800;
}

.chart-row {
  display: grid;
  grid-template-columns: 180px 1fr 120px;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.bar-track {
  height: 14px;
  border-radius: 99px;
  background: #e9f0f3;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.maintenance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tabbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tabbar button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
}

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

.sub-tabbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sub-tabbar button {
  min-height: 34px;
  padding: 7px 12px;
  color: var(--blue);
  background: #eef8fb;
  border: 1px solid #c9e6ef;
  border-radius: 999px;
  font-weight: 800;
}

.sub-tabbar button.active,
.sub-tabbar button:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.api-status-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #f6fafc;
  border: 1px solid #c9e6ef;
  border-radius: var(--radius);
}

.api-status-card strong {
  color: var(--blue);
}

.api-status-card span {
  color: var(--muted);
  font-size: 13px;
}

.muted-box {
  min-height: 48px;
  padding: 12px;
  color: var(--muted);
  background: #f6fafc;
  border: 1px dashed #c9e6ef;
  border-radius: var(--radius);
}

.password-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.password-inline input {
  min-width: 0;
}

.permission-matrix .check-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

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

.policy-list,
.permission-grid {
  display: grid;
  gap: 10px;
}

.policy-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.policy-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.policy-card p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.permission-grid span {
  padding: 12px;
  background: #f5f9fb;
  border: 1px solid #e0ebf0;
  border-radius: 6px;
}

.region-tags {
  padding-top: 4px;
}

.muted-row {
  opacity: 0.58;
}

.selected-row td {
  background: #eef8ff;
}

.bad-row td {
  background: #fff8f8;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: 520px;
  padding: 12px 14px;
  color: #fff;
  background: rgba(18, 33, 47, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 0.18s ease;
  white-space: pre-line;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.order-card-main {
  cursor: pointer;
  border-radius: var(--radius);
}

.order-card-main:hover {
  background: rgba(229, 246, 255, 0.42);
}

.order-detail-toolbar {
  align-items: flex-start;
  gap: 12px;
}

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

.detail-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.detail-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.detail-box dl {
  display: grid;
  grid-template-columns: minmax(86px, 0.34fr) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.detail-box dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-box dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-note {
  margin-top: 12px;
}

.print-sheet {
  display: none;
}

.print-header,
.print-meta,
.print-two-col,
.print-total,
.signature-grid {
  display: grid;
  gap: 12px;
}

.print-header {
  grid-template-columns: 1fr auto;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 2px solid #0b4f80;
}

.print-company {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: start;
  gap: 12px;
}

.print-company-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.print-header h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.print-company-name {
  font-weight: 800;
}

.print-header p,
.print-meta,
.print-note {
  color: #43566a;
}

.print-meta,
.print-total {
  margin: 14px 0;
}

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

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

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

.print-two-col {
  margin-bottom: 16px;
}

.print-two-col h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.print-two-col p {
  margin: 4px 0;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
}

.print-table th,
.print-table td {
  padding: 9px 8px;
  border: 1px solid #b7c7d4;
  text-align: left;
}

.print-total {
  justify-items: end;
  padding: 10px 0;
}

.print-warning {
  align-self: center;
  color: #a15c00;
  font-size: 13px;
  font-weight: 800;
}

.signature-grid {
  margin-top: 34px;
}

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

.signature-grid > div {
  min-height: 110px;
  padding: 14px;
  border: 1px solid #9fb4c5;
}

.signature-grid span {
  display: block;
  height: 54px;
  border-bottom: 1px solid #1f3445;
}

.signature-grid small {
  color: #43566a;
}

.print-only {
  display: none;
}

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
  }

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

  .workspace {
    padding: 16px;
  }

  .grid.cols-5,
  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .order-lines-header {
    display: none;
  }

  .order-line-row {
    grid-template-columns: minmax(220px, 1fr) minmax(110px, 0.5fr);
  }

  .order-line-meta,
  .order-line-amount {
    justify-content: flex-start;
    text-align: left;
  }

  .detail-grid,
  .print-two-col,
  .signature-grid {
    grid-template-columns: 1fr;
  }

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

  .opening-entry-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions button {
    flex: 1;
  }

  .top-actions .language-switch {
    width: 100%;
  }

  .top-actions .language-switch button {
    flex: none;
  }

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

  .grid.cols-5,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .section-title.compact {
    align-items: stretch;
    flex-direction: column;
  }

  .order-line-row {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  body.login-mode {
    overflow: auto;
  }

  .login-mode .workspace {
    padding: 12px;
  }

  .login-stage {
    min-height: calc(100vh - 24px);
  }

  .login-glass-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    width: calc(100% - 16px);
  }

  .login-brand-pane {
    min-height: 300px;
    padding: 22px;
  }

  .login-hero-copy h2 {
    font-size: 30px;
  }

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

  .login-form {
    padding: 24px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }

  .login-logo-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .login-logo-row img {
    width: 54px;
    height: 54px;
  }

  .upload-card,
  .upload-card.compact,
  .upload-card.backup-upload {
    grid-template-columns: 1fr;
  }

  .maintenance-hero {
    align-items: stretch;
    flex-direction: column;
  }

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

body.login-mode {
  background: #032337;
}

.login-mode .workspace {
  align-content: stretch;
  padding: 22px;
}

.login-stage {
  min-height: calc(100vh - 44px);
  display: block;
  isolation: isolate;
}

.login-bg img {
  object-position: center;
  transform: scale(1.01);
  filter: saturate(1.08) contrast(1.04);
  animation: heroDriftClear 18s ease-in-out infinite alternate;
}

.login-bg::before {
  background:
    linear-gradient(90deg, rgba(2, 21, 34, 0.24), rgba(2, 21, 34, 0.04) 48%, rgba(2, 21, 34, 0.36)),
    linear-gradient(0deg, rgba(2, 15, 24, 0.56), rgba(2, 15, 24, 0.06) 44%, rgba(255, 255, 255, 0.08));
}

.login-bg::after {
  opacity: 0.3;
}

.login-glass-shell {
  position: absolute;
  inset: 0;
  width: auto;
  min-height: 0;
  display: block;
  margin: 0;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  pointer-events: none;
}

.login-brand-pane {
  position: absolute;
  left: 30px;
  bottom: 30px;
  width: min(500px, 44vw);
  min-height: 0;
  display: grid;
  gap: 22px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)),
    rgba(4, 32, 50, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px) saturate(125%);
  pointer-events: auto;
}

.login-brand-pane::after {
  opacity: 0.1;
}

.login-hero-copy h2 {
  font-size: clamp(28px, 3.4vw, 46px);
  max-width: 460px;
}

.login-stat-strip span {
  min-height: 56px;
  background: rgba(255, 255, 255, 0.12);
}

.login-form {
  position: absolute;
  top: 50%;
  right: 40px;
  width: min(430px, calc(100% - 80px));
  min-height: auto;
  transform: translateY(-50%);
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.09)),
    rgba(4, 38, 58, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px) saturate(145%);
  pointer-events: auto;
}

.login-form .muted,
.login-form label,
.login-form .small-note {
  color: rgba(255, 255, 255, 0.82);
}

.login-form input {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.login-form input:focus {
  border-color: rgba(255, 226, 96, 0.86);
  box-shadow: 0 0 0 3px rgba(255, 226, 96, 0.13);
}

@keyframes heroDriftClear {
  from {
    transform: scale(1.01) translate3d(-0.3%, 0, 0);
  }
  to {
    transform: scale(1.035) translate3d(0.45%, -0.45%, 0);
  }
}

.import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.import-file-status {
  margin-top: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--muted);
  background: #f6fafc;
  border: 1px dashed #afcad8;
  border-radius: var(--radius);
}

.import-file-status.ready {
  color: var(--ink);
  background: #edf9f4;
  border-color: #9fd8bd;
}

.region-card-list,
.admin-province-grid {
  display: grid;
  gap: 10px;
}

.region-card-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.region-card,
.admin-province-grid article {
  padding: 12px;
  background: #f8fbfc;
  border: 1px solid #e0edf2;
  border-radius: var(--radius);
}

.region-card {
  display: grid;
  gap: 4px;
}

.region-card span,
.admin-province-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-province-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 920px) {
  body.login-mode {
    overflow: auto;
  }

  .login-mode .workspace {
    padding: 12px;
  }

  .login-stage {
    min-height: calc(100vh - 24px);
  }

  .login-bg img {
    object-position: center top;
  }

  .login-glass-shell {
    position: relative;
    inset: auto;
    min-height: calc(100vh - 24px);
    display: grid;
    align-content: end;
    padding: 12px;
  }

  .login-brand-pane {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    padding: 16px;
  }

  .login-stat-strip {
    display: none;
  }

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

  .login-form {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    transform: none;
    margin-top: 12px;
    padding: 22px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  body.printing-order {
    color: #12212f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing-order * {
    visibility: hidden !important;
  }

  body.printing-order .print-sheet,
  body.printing-order .print-sheet * {
    visibility: visible !important;
  }

  body.printing-order .print-sheet {
    display: block !important;
    position: absolute;
    inset: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    font-size: 11px;
    line-height: 1.25;
    color: #12212f;
    background: #fff;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  body.printing-order .print-header {
    grid-template-columns: 1fr auto !important;
    gap: 8px;
    padding-bottom: 7px;
    border-bottom-width: 1.5px;
  }

  body.printing-order .print-company {
    grid-template-columns: 38px 1fr !important;
    gap: 7px;
  }

  body.printing-order .print-company-logo {
    width: 34px;
    height: 34px;
  }

  body.printing-order .print-header h1 {
    margin-bottom: 2px;
    font-size: 21px;
    line-height: 1.08;
  }

  body.printing-order .print-header p {
    margin: 0;
    font-size: 9.5px;
    line-height: 1.18;
  }

  body.printing-order .print-header strong {
    font-size: 14px;
  }

  body.printing-order .print-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
    margin: 7px 0;
  }

  body.printing-order .print-total {
    gap: 6px;
    margin: 7px 0;
  }

  body.printing-order .print-two-col {
    gap: 8px;
    margin-bottom: 8px;
  }

  body.printing-order .print-two-col h2 {
    margin: 0 0 4px;
    font-size: 13px;
  }

  body.printing-order .print-two-col p {
    margin: 2px 0;
  }

  body.printing-order .print-table {
    table-layout: fixed;
    font-size: 10px;
    line-height: 1.18;
  }

  body.printing-order .print-table th,
  body.printing-order .print-table td {
    padding: 4px 5px;
    vertical-align: top;
  }

  body.printing-order .print-table th:nth-child(1),
  body.printing-order .print-table td:nth-child(1) {
    width: 24px;
    text-align: center;
  }

  body.printing-order .print-table th:nth-child(2),
  body.printing-order .print-table td:nth-child(2) {
    width: 74px;
    word-break: break-all;
  }

  body.printing-order .print-table th:nth-child(4),
  body.printing-order .print-table td:nth-child(4),
  body.printing-order .print-table th:nth-child(5),
  body.printing-order .print-table td:nth-child(5) {
    width: 52px;
    text-align: right;
  }

  body.printing-order .print-product-name {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
  }

  body.printing-order .print-total {
    grid-template-columns: repeat(3, auto);
    justify-content: end;
    padding: 5px 0;
    font-size: 11px;
  }

  body.printing-order .print-note {
    margin: 5px 0 0;
    font-size: 10px;
  }

  body.printing-order .signature-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    margin-top: 10px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-order .signature-grid > div {
    min-height: 62px;
    padding: 7px 9px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-order .signature-grid span {
    height: 30px;
  }

  body.printing-order .signature-grid small {
    font-size: 9px;
  }

  body.printing-order .print-dense-compact {
    font-size: 10px;
    line-height: 1.18;
  }

  body.printing-order .print-dense-compact .print-header h1 {
    font-size: 19px;
  }

  body.printing-order .print-dense-compact .print-company {
    grid-template-columns: 34px 1fr !important;
  }

  body.printing-order .print-dense-compact .print-company-logo {
    width: 30px;
    height: 30px;
  }

  body.printing-order .print-dense-compact .print-meta,
  body.printing-order .print-dense-compact .print-total {
    margin: 5px 0;
  }

  body.printing-order .print-dense-compact .print-two-col {
    margin-bottom: 6px;
  }

  body.printing-order .print-dense-compact .print-table {
    font-size: 9.5px;
  }

  body.printing-order .print-dense-compact .print-table th,
  body.printing-order .print-dense-compact .print-table td {
    padding: 3px 4px;
  }

  body.printing-order .print-dense-compact .signature-grid {
    margin-top: 7px;
  }

  body.printing-order .print-dense-compact .signature-grid > div {
    min-height: 54px;
  }

  body.printing-order .print-dense-ultra {
    font-size: 9.2px;
    line-height: 1.12;
  }

  body.printing-order .print-dense-ultra .print-header {
    padding-bottom: 5px;
  }

  body.printing-order .print-dense-ultra .print-header h1 {
    font-size: 17px;
  }

  body.printing-order .print-dense-ultra .print-company {
    grid-template-columns: 30px 1fr !important;
    gap: 5px;
  }

  body.printing-order .print-dense-ultra .print-company-logo {
    width: 26px;
    height: 26px;
  }

  body.printing-order .print-dense-ultra .print-header p,
  body.printing-order .print-dense-ultra .print-note {
    font-size: 8.6px;
  }

  body.printing-order .print-dense-ultra .print-meta,
  body.printing-order .print-dense-ultra .print-total {
    margin: 4px 0;
    gap: 4px;
  }

  body.printing-order .print-dense-ultra .print-two-col {
    gap: 6px;
    margin-bottom: 5px;
  }

  body.printing-order .print-dense-ultra .print-two-col h2 {
    font-size: 11px;
  }

  body.printing-order .print-dense-ultra .print-two-col p {
    margin: 1px 0;
  }

  body.printing-order .print-dense-ultra .print-table {
    font-size: 8.7px;
    line-height: 1.08;
  }

  body.printing-order .print-dense-ultra .print-table th,
  body.printing-order .print-dense-ultra .print-table td {
    padding: 2px 3px;
  }

  body.printing-order .print-dense-ultra .signature-grid {
    margin-top: 5px;
  }

  body.printing-order .print-dense-ultra .signature-grid > div {
    min-height: 46px;
    padding: 5px 7px;
  }

  body.printing-order .print-dense-ultra .signature-grid span {
    height: 22px;
  }

  body.printing-order .print-dense-ultra .signature-grid small {
    font-size: 8px;
  }

  body.printing-order .shell,
  body.printing-order .workspace,
  body.printing-order .panel {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  .sidebar,
  .topbar,
  .form-panel,
  .button-row,
  .toast {
    display: none !important;
  }

  .shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .panel,
  .table-wrap,
  .metric {
    box-shadow: none;
  }

  .print-only {
    display: block;
  }
}
