:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f2;
  --ink: #18212b;
  --muted: #65717f;
  --line: #d8dee6;
  --primary: #176b5d;
  --primary-dark: #0f4f45;
  --accent: #bf6b2c;
  --warning: #9a6a06;
  --danger: #b53b36;
  --blue: #315f8f;
  --purple: #6250a0;
  --green-soft: #dcebe7;
  --orange-soft: #f3e3d2;
  --red-soft: #f5dddd;
  --shadow: 0 12px 30px rgba(24, 33, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.locked .app-header,
body.locked main {
  display: none;
}

body:not(.locked) .login-screen {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

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

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  place-items: center;
  padding: clamp(28px, 8vh, 76px) 24px;
  background:
    radial-gradient(ellipse at 5% 67%, rgba(255, 255, 255, 0.62) 0 7%, rgba(255, 255, 255, 0.34) 15%, transparent 31%),
    radial-gradient(ellipse at 18% 72%, rgba(255, 255, 255, 0.72) 0 8%, rgba(255, 255, 255, 0.36) 17%, transparent 34%),
    radial-gradient(ellipse at 36% 78%, rgba(255, 255, 255, 0.58) 0 7%, rgba(255, 255, 255, 0.28) 17%, transparent 35%),
    radial-gradient(ellipse at 64% 78%, rgba(255, 255, 255, 0.54) 0 8%, rgba(255, 255, 255, 0.3) 18%, transparent 35%),
    radial-gradient(ellipse at 82% 70%, rgba(255, 255, 255, 0.7) 0 8%, rgba(255, 255, 255, 0.34) 17%, transparent 33%),
    radial-gradient(ellipse at 96% 66%, rgba(255, 255, 255, 0.58) 0 7%, rgba(255, 255, 255, 0.3) 16%, transparent 31%),
    linear-gradient(180deg, #9ed8f2 0%, #dff3fb 48%, #f9fbff 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 50%;
  z-index: 0;
  width: min(980px, 118vw);
  aspect-ratio: 1.75;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, transparent 58%, rgba(255, 255, 255, 0.42) 58.2% 58.45%, transparent 58.7%),
    radial-gradient(ellipse at center, transparent 73%, rgba(255, 255, 255, 0.34) 73.2% 73.45%, transparent 73.7%);
  opacity: 0.9;
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% -12%;
  z-index: 0;
  height: min(560px, 56vh);
  background:
    radial-gradient(ellipse at 2% 62%, rgba(255, 255, 255, 0.98) 0 12%, rgba(255, 255, 255, 0.62) 22%, transparent 39%),
    radial-gradient(ellipse at 13% 38%, rgba(255, 255, 255, 0.96) 0 13%, rgba(255, 255, 255, 0.58) 24%, transparent 42%),
    radial-gradient(ellipse at 26% 55%, rgba(255, 255, 255, 0.94) 0 16%, rgba(255, 255, 255, 0.55) 29%, transparent 48%),
    radial-gradient(ellipse at 42% 41%, rgba(255, 255, 255, 0.9) 0 13%, rgba(255, 255, 255, 0.5) 25%, transparent 44%),
    radial-gradient(ellipse at 56% 63%, rgba(255, 255, 255, 0.96) 0 19%, rgba(255, 255, 255, 0.6) 31%, transparent 52%),
    radial-gradient(ellipse at 72% 45%, rgba(255, 255, 255, 0.92) 0 14%, rgba(255, 255, 255, 0.52) 27%, transparent 46%),
    radial-gradient(ellipse at 88% 58%, rgba(255, 255, 255, 0.98) 0 17%, rgba(255, 255, 255, 0.62) 30%, transparent 50%),
    radial-gradient(ellipse at 100% 38%, rgba(255, 255, 255, 0.95) 0 13%, rgba(255, 255, 255, 0.52) 26%, transparent 43%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.62) 42%, rgba(255, 255, 255, 0.94) 72%, #ffffff 100%);
  filter: blur(9px);
  pointer-events: none;
}

.login-clouds {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.login-cloud {
  position: absolute;
  display: block;
  width: clamp(330px, 34vw, 690px);
  height: clamp(126px, 14vw, 230px);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 9% 68%, rgba(255, 255, 255, 0.9) 0 15%, transparent 40%),
    radial-gradient(ellipse at 24% 46%, rgba(255, 255, 255, 0.98) 0 20%, transparent 46%),
    radial-gradient(ellipse at 42% 62%, rgba(255, 255, 255, 0.94) 0 23%, transparent 50%),
    radial-gradient(ellipse at 62% 42%, rgba(255, 255, 255, 0.9) 0 18%, transparent 44%),
    radial-gradient(ellipse at 81% 64%, rgba(255, 255, 255, 0.96) 0 18%, transparent 46%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.74) 43%, rgba(255, 255, 255, 0.98) 100%);
  filter: blur(3px);
  opacity: 0.86;
}

.login-cloud::after {
  content: "";
  position: absolute;
  inset: 42% 2% 6%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 56px rgba(145, 174, 192, 0.16);
}

.login-cloud-left {
  left: -4vw;
  bottom: 16%;
}

.login-cloud-mid {
  left: 50%;
  bottom: 5%;
  width: clamp(430px, 44vw, 860px);
  height: clamp(132px, 15vw, 250px);
  transform: translateX(-50%) scaleX(1.15);
  opacity: 0.7;
}

.login-cloud-right {
  right: -5vw;
  bottom: 15%;
  transform: scaleX(-1);
}

.login-card {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: stretch;
  gap: 14px;
  width: min(100%, 360px);
  border: 1px solid rgba(89, 157, 190, 0.34);
  border-radius: 22px;
  padding: 31px 31px 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.92));
  box-shadow:
    0 26px 64px rgba(61, 96, 123, 0.22),
    0 8px 20px rgba(27, 43, 54, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(222, 248, 255, 0.54), transparent 48%);
  pointer-events: none;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-logo {
  justify-self: center;
  width: min(100%, 224px);
  height: auto;
}

.login-mark {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(205, 217, 226, 0.76);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  color: #252a31;
  box-shadow: 0 8px 18px rgba(42, 66, 82, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-mark svg,
.login-field-icon,
.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.login-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.login-card h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-copy p:not(.eyebrow) {
  max-width: 286px;
  margin: 0;
  color: #5f6975;
  font-size: 14px;
  line-height: 1.42;
}

.login-fields {
  display: grid;
  gap: 10px;
  margin-top: 7px;
}

.login-input-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 35px;
  border: 1px solid rgba(224, 230, 237, 0.8);
  border-radius: 9px;
  background: rgba(239, 244, 249, 0.88);
  color: #717b87;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.login-input-row:focus-within {
  border-color: rgba(49, 95, 143, 0.34);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(49, 95, 143, 0.12);
}

.login-input-row input {
  min-height: 33px;
  border: 0;
  border-radius: inherit;
  padding: 7px 12px 7px 32px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  outline: 0;
}

.login-input-row input::placeholder {
  color: #747f8b;
}

.login-input-row input:focus {
  outline: 0;
}

.login-field-icon {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}

.login-input-row:has(.password-toggle) input {
  padding-right: 38px;
}

.forgot-link {
  justify-self: end;
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #101820;
  font-size: 12px;
  font-weight: 600;
}

.forgot-link:hover,
.forgot-link:focus-visible {
  color: var(--primary);
}

.password-toggle {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  color: #6e7782;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-visible {
  background: rgba(23, 107, 93, 0.1);
  color: var(--primary);
}

.password-toggle svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.login-submit {
  min-height: 36px;
  border: 1px solid #10131a;
  border-radius: 9px;
  padding: 8px 18px;
  background: linear-gradient(180deg, #30323b 0%, #151820 50%, #07080c 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 20px rgba(8, 10, 14, 0.2);
}

.login-submit:hover,
.login-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 13px 24px rgba(8, 10, 14, 0.24);
}

.demo-logins {
  width: 100%;
  border-top: 1px dashed rgba(126, 145, 160, 0.28);
  padding-top: 9px;
  color: #687482;
  font-size: 12px;
  text-align: center;
}

.demo-logins summary {
  cursor: pointer;
  list-style: none;
}

.demo-logins summary::-webkit-details-marker {
  display: none;
}

.demo-logins[open] {
  display: grid;
  gap: 5px;
}

.demo-logins span {
  display: block;
}

@media (max-width: 520px) {
  .login-screen {
    padding: 18px;
  }

  .login-card {
    padding: 28px 22px 24px;
  }

  .login-copy p:not(.eyebrow) {
    font-size: 13px;
  }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 249, 0.96);
  backdrop-filter: blur(10px);
}

.nav-side .app-header {
  height: 0;
  min-height: 0;
  margin-left: 0;
  border-bottom: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  overflow: visible;
}

.nav-side .app-brand {
  visibility: hidden;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-brand-logo {
  width: clamp(164px, 18vw, 224px);
  height: auto;
  flex: 0 0 auto;
}

.app-header h1,
.panel-heading h2,
.print-sheet h2 {
  margin: 0;
  letter-spacing: 0;
}

.app-header h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nav-group {
  position: relative;
}

.nav-group[hidden] {
  display: none !important;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  border: 1px solid rgba(216, 222, 230, 0.9);
  border-radius: 8px;
  padding: 8px 11px 8px 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-group-toggle::-webkit-details-marker {
  display: none;
}

.nav-group-toggle::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.78;
}

.nav-group[open] .nav-group-toggle::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.nav-group.active > .nav-group-toggle,
.nav-group[open] > .nav-group-toggle {
  border-color: rgba(23, 107, 93, 0.22);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 107, 93, 0.16);
}

.nav-group.active > .nav-group-toggle::after,
.nav-group[open] > .nav-group-toggle::after {
  color: #ffffff;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 5px;
  width: max-content;
  min-width: 236px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(24, 33, 43, 0.14);
}

.nav-menu .nav-button {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.nav-direct {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.nav-group-toggle::before,
.nav-button::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid currentColor;
  opacity: 0.82;
}

.nav-menu .nav-button::before {
  background: transparent;
}

.side-nav-logo {
  display: none;
}

[data-nav-icon="dashboard"]::before {
  border-radius: 4px;
  box-shadow: inset 6px 0 0 currentColor, inset 0 6px 0 currentColor;
}

[data-nav-icon="documents"]::before,
[data-nav-icon="invoice"]::before {
  border-radius: 3px;
  box-shadow: inset 0 -4px 0 currentColor;
}

[data-nav-icon="document"]::before {
  border-radius: 3px;
  box-shadow: inset 5px 0 0 currentColor, inset 0 -3px 0 currentColor;
}

[data-nav-icon="create-order"]::before {
  border-radius: 3px;
  box-shadow: inset 0 -4px 0 currentColor;
}

[data-nav-icon="return"]::before {
  border-radius: 50%;
  border-style: solid;
  border-left-color: transparent;
}

[data-nav-icon="orders"]::before,
[data-nav-icon="assignment"]::before {
  border-radius: 3px;
  box-shadow: inset 0 5px 0 currentColor;
}

[data-nav-icon="worker"]::before,
[data-nav-icon="users"]::before {
  border-radius: 999px 999px 4px 4px;
}

.nav-button[data-nav-icon="users"]::before,
.nav-group-toggle[data-nav-icon="customers"]::before {
  border-width: 0;
  border-radius: 0;
  background: currentColor;
  mask: url("assets/icons/group.png") center / contain no-repeat;
  -webkit-mask: url("assets/icons/group.png") center / contain no-repeat;
}

.nav-button[data-nav-icon="customer"]::before {
  border-width: 0;
  border-radius: 0;
  background: currentColor;
  mask: url("assets/icons/user.png") center / contain no-repeat;
  -webkit-mask: url("assets/icons/user.png") center / contain no-repeat;
}

[data-nav-icon="picking"]::before {
  transform: rotate(-45deg);
  border-radius: 4px;
}

[data-nav-icon="packing"]::before,
[data-nav-icon="articles"]::before,
[data-nav-icon="stock"]::before {
  border-radius: 3px;
  box-shadow: inset 0 -5px 0 currentColor;
}

[data-nav-icon="inventory"]::before {
  border-width: 1px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 1.5px,
    transparent 1.5px 3px,
    currentColor 3px 4.5px,
    transparent 4.5px 7px
  );
}

[data-nav-icon="places"]::before {
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px currentColor;
}

[data-nav-icon="pricing"]::before {
  content: "$";
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

[data-nav-icon="admin"]::before,
[data-nav-icon="settings"]::before {
  content: "\2699";
  display: inline-grid;
  place-items: center;
  border-width: 0;
  border-radius: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

[data-nav-icon="reports"]::before,
[data-nav-icon="audit"]::before,
[data-nav-icon="imports"]::before {
  border-radius: 3px;
  box-shadow: inset 0 -4px 0 currentColor, inset 0 4px 0 currentColor;
}

.nav-submenu-label {
  margin: 4px 4px 2px;
  border-top: 1px solid var(--line);
  padding: 10px 8px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-subitem {
  padding-left: 26px;
}

.nav-menu .nav-button:hover,
.nav-menu .nav-button:focus-visible {
  background: var(--surface-soft);
}

.nav-menu .nav-button.active {
  background: var(--primary);
  color: #ffffff;
}

.nav-menu .nav-button.active::before {
  opacity: 1;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 8px 12px 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.admin-tab.active {
  border-bottom-color: var(--primary);
  color: var(--ink);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.session-box {
  min-width: 150px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.session-box strong {
  display: block;
  color: var(--ink);
}

.nav-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
}

.nav-button {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.nav-direct.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.nav-button.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.nav-layout-toggle {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-layout-toggle-drawer {
  display: none;
}

.nav-toggle-icon {
  display: none;
  position: relative;
  width: 22px;
  height: 16px;
  flex: 0 0 auto;
}

.nav-toggle-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.nav-toggle-icon span:nth-child(1) {
  top: 0;
}

.nav-toggle-icon span:nth-child(2) {
  top: 7px;
}

.nav-toggle-icon span:nth-child(3) {
  top: 14px;
}

.nav-layout-toggle.is-open .nav-toggle-icon span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.nav-layout-toggle.is-open .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.35);
}

.nav-layout-toggle.is-open .nav-toggle-icon span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--primary-dark);
}

.secondary-button {
  background: var(--surface-soft);
  color: var(--ink);
  border-color: var(--line);
}

.ghost-button {
  background: transparent;
  color: var(--primary);
  border-color: var(--line);
}

.danger-button {
  background: var(--red-soft);
  color: var(--danger);
  border-color: #edc2c0;
}

.icon-button {
  min-width: 38px;
  padding: 8px;
  background: var(--surface);
  border-color: var(--line);
}

main {
  padding: 18px clamp(16px, 4vw, 48px) 48px;
}

.nav-side main {
  margin-left: 324px;
}

.nav-side .header-actions {
  position: fixed;
  top: 14px;
  left: 14px;
  bottom: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 286px;
  height: calc(100dvh - 28px);
  min-height: calc(100vh - 28px);
  border: 1px solid #141c25;
  border-radius: 8px;
  padding: 18px 18px 86px;
  background: #141c25;
  box-shadow: 0 18px 48px rgba(24, 33, 43, 0.14);
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-side .top-nav {
  position: static;
  z-index: auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.nav-side .side-nav-logo {
  display: block;
  width: auto;
  height: 76px;
  margin: 0 0 16px;
  border-radius: 14px;
}

.nav-side .session-box {
  width: 100%;
  min-width: 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
  color: rgba(255, 255, 255, 0.66);
  text-align: left;
}

.nav-side .session-box strong {
  color: #ffffff;
}

.nav-side #logoutButton {
  width: 100%;
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-side .nav-layout-toggle-header {
  display: none;
}

.nav-side .nav-layout-toggle-drawer {
  display: inline-flex;
  order: 4;
  width: 100%;
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-side .nav-group,
.nav-side .nav-group-toggle {
  width: 100%;
}

.nav-side .nav-group-toggle {
  min-height: 46px;
  border-color: transparent;
  background: transparent;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.88);
}

.nav-side .nav-menu {
  position: static;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 4px 0 10px 12px;
  background: transparent;
  box-shadow: none;
}

.nav-side .nav-group.active > .nav-group-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
}

.nav-side .nav-group[open] > .nav-group-toggle {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.nav-side .nav-group.active[open] > .nav-group-toggle {
  background: rgba(23, 107, 93, 0.85);
  color: #ffffff;
}

.nav-side .nav-menu .nav-button {
  min-height: 38px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.nav-side .nav-menu .nav-button::before {
  opacity: 0.76;
}

.nav-side .nav-menu .nav-button.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.nav-side .nav-menu .nav-button.active::before {
  opacity: 1;
}

.nav-side .nav-group-toggle:hover,
.nav-side .nav-group-toggle:focus-visible,
.nav-side .nav-direct:hover,
.nav-side .nav-direct:focus-visible,
.nav-side .nav-menu .nav-button:hover,
.nav-side .nav-menu .nav-button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-side .nav-group.active[open] > .nav-group-toggle:hover,
.nav-side .nav-group.active[open] > .nav-group-toggle:focus-visible,
.nav-side .nav-direct.active:hover,
.nav-side .nav-direct.active:focus-visible {
  background: rgba(23, 107, 93, 0.85);
}

.nav-side .nav-menu .nav-button.active:hover,
.nav-side .nav-menu .nav-button.active:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.nav-side .nav-direct {
  position: relative;
  justify-content: center;
  width: 100%;
  padding-right: 54px;
  padding-left: 54px;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.88);
}

.nav-side .nav-direct::before {
  position: absolute;
  left: 18px;
}

.nav-side .nav-direct.active {
  background: rgba(23, 107, 93, 0.85);
  color: #ffffff;
}

.nav-side .nav-submenu-label {
  border-top-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  position: relative;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(24, 33, 43, 0.05);
  overflow: hidden;
}

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

.metric:nth-child(2)::before {
  background: var(--blue);
}

.metric:nth-child(3)::before {
  background: var(--accent);
}

.metric:nth-child(4)::before {
  background: var(--danger);
}

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

.dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 252, 0.94)),
    repeating-linear-gradient(90deg, rgba(49, 95, 143, 0.07) 0 1px, transparent 1px 76px);
  box-shadow: var(--shadow);
}

.dashboard-title {
  display: grid;
  gap: 4px;
}

.dashboard-toolbar h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.dashboard-title > p:last-child {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-weight: 650;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: 150px 150px minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

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

.dashboard-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 800;
}

.range-button.active,
.range-button:hover,
.range-button:focus-visible {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 0;
}

.dashboard-kpi {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--primary);
}

.dashboard-kpi-blue::before {
  background: var(--blue);
}

.dashboard-kpi-orange::before {
  background: var(--accent);
}

.dashboard-kpi-purple::before {
  background: var(--purple);
}

.dashboard-kpi-red::before {
  background: var(--danger);
}

.dashboard-kpi strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.dashboard-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.kpi-trend {
  align-self: end;
  width: fit-content;
  border-radius: 8px;
  padding: 5px 8px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.kpi-trend.positive {
  background: var(--green-soft);
  color: var(--primary-dark);
}

.kpi-trend.negative,
.kpi-trend.warning {
  background: var(--orange-soft);
  color: var(--warning);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr) minmax(280px, 0.85fr);
  gap: 14px;
}

.dashboard-card {
  min-height: 286px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-main-card {
  min-height: 332px;
}

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

.dashboard-chart,
.rank-list,
.dashboard-status-panel,
.dashboard-alert-list,
.dashboard-recent-list,
.dashboard-return-list {
  padding: 0 18px 18px;
}

.dashboard-chart {
  min-height: 238px;
}

.dashboard-chip {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.dashboard-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 238px;
  color: var(--blue);
  overflow: visible;
}

.dashboard-chart svg.chart-orange {
  color: var(--accent);
}

.dashboard-chart text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-chart .chart-max-label {
  fill: currentColor;
}

.chart-grid line {
  stroke: #dce3ea;
  stroke-width: 1;
}

.chart-area {
  color: inherit;
}

.chart-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-line-orange {
  stroke: var(--accent);
}

.chart-point {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 3;
}

.chart-point-orange {
  stroke: var(--accent);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-row strong {
  font-size: 18px;
  text-align: right;
}

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

.rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
}

.rank-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-button,
.text-button {
  display: inline;
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
  text-align: left;
}

.rank-button:hover,
.rank-button:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  outline-offset: 3px;
}

.rank-row > span {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.rank-track {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf0;
}

.rank-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--blue));
}

.dashboard-status-panel,
.dashboard-alert-list,
.dashboard-recent-list,
.dashboard-return-list {
  display: grid;
  gap: 10px;
}

.status-row,
.alert-row,
.recent-order-row {
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

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

.status-row > div:first-child,
.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-row strong {
  font-size: 18px;
}

.status-track {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #e7ebf0;
}

.status-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--primary));
}

.alert-row > div,
.recent-order-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.alert-row strong,
.recent-order-row strong,
.recent-order-row span {
  overflow-wrap: anywhere;
}

.recent-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(120px, 0.45fr);
  align-items: center;
  gap: 10px;
}

.recent-order-row > strong {
  text-align: right;
}

.positive-state {
  border-color: #c9ded8;
  background: #f2f8f6;
  color: var(--primary-dark);
}

.dashboard-table-panel {
  margin-top: 14px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.workspace-grid,
.database-grid,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.tool-panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 18px;
}

.table-panel {
  margin-top: 18px;
  overflow: hidden;
}

.database-grid {
  margin-top: 18px;
}

.database-grid .table-panel {
  margin-top: 0;
}

.database-grid .table-panel.admin-section.active {
  grid-column: 1 / -1;
}

.workspace-grid:not(:has(.admin-section.active)),
.database-grid:not(:has(.admin-section.active)) {
  display: none;
}

.split-layout .table-panel {
  margin-top: 0;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.tool-panel > .panel-heading {
  padding: 0 0 18px;
}

.panel-heading.compact {
  padding-top: 0;
}

.panel-heading h2 {
  font-size: 19px;
  line-height: 1.2;
}

.report-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.form-grid label,
.inline-form label,
.order-line-builder label,
.document-toolbar label,
.pick-row label,
.station-scan label,
.problem-form label,
.package-grid label,
.pack-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-field {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  color: var(--ink) !important;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.field-label-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-info-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: #ffffff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.field-info-button:hover,
.field-info-button:focus-visible {
  border-color: var(--primary);
  background: var(--green-soft);
}

.delivery-address-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.delivery-address-fields.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.pricing-manager {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  overflow: hidden;
}

.pricing-section {
  grid-column: 1 / -1;
}

.pricing-section .pricing-manager {
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pricing-section .pricing-manager > .panel-heading {
  padding: 18px;
}

.pricing-manager .panel-heading {
  padding: 14px 14px 0;
}

.pricing-manager .data-form {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.3fr) minmax(120px, 0.6fr) repeat(2, minmax(130px, 0.6fr)) auto;
  align-items: end;
  padding: 14px;
}

.pricing-manager .table-wrap {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.pricing-cleanup {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.pricing-cleanup-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.35fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
}

.pricing-cleanup-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-subheading {
  margin-bottom: 12px;
}

.section-subheading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(23, 107, 93, 0.2);
  outline-offset: 1px;
}

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

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

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

.search-input {
  max-width: 380px;
}

.customer-workbench {
  padding: 0 18px 18px;
}

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

.customer-toolbar .search-input {
  flex: 1 1 260px;
  max-width: none;
}

.customer-editor {
  display: none;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.customer-editor.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

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

.numeric {
  text-align: right;
}

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

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

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

.import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

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

.import-card > div,
.import-result {
  display: grid;
  gap: 5px;
}

.import-card a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.import-result {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-soft);
}

.import-result:empty {
  display: none;
}

.order-import-result {
  margin: 12px 0 0;
}

.import-result ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.status-pill,
.location-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-ok {
  background: var(--green-soft);
  color: var(--primary-dark);
}

.status-warning {
  background: var(--orange-soft);
  color: var(--warning);
}

.status-danger {
  background: var(--red-soft);
  color: var(--danger);
}

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

.location-pill {
  background: #edf2f7;
  color: #344256;
}

.order-form {
  padding: 0 18px 18px;
}

.document-mode-tabs,
.order-subtabs,
.return-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.document-mode-tabs {
  border-top: 1px solid var(--line);
}

.document-mode-tabs,
.order-subtabs {
  display: none;
}

.subtab-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px 11px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-section,
.return-section,
.document-mode-panel,
.settings-section {
  display: none;
}

.order-section.active,
.return-section.active,
.document-mode-panel.active,
.settings-section.active {
  display: block;
}

.invoice-line-builder,
.return-line-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 140px 130px auto;
  align-items: end;
  gap: 10px;
}

.return-line-builder {
  grid-template-columns: minmax(260px, 1fr) 140px 140px 130px auto;
}

.return-article-field {
  min-width: 0;
}

.return-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.6fr) 180px;
  gap: 12px;
  padding: 0 18px 18px;
}

.document-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.75fr) minmax(220px, 0.9fr) repeat(2, minmax(130px, 0.42fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 0 18px 12px;
}

.document-toolbar .search-input {
  max-width: none;
}

.document-scope-note {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.document-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.document-pagination:empty {
  display: none;
}

.document-pagination strong {
  color: var(--ink);
  font-size: 13px;
}

.return-source-lines {
  display: grid;
  gap: 10px;
}

.return-source-heading {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.return-source-list {
  display: grid;
  gap: 8px;
}

.return-source-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.return-source-line > div {
  display: grid;
  gap: 2px;
}

.compact-line-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-line-field input {
  width: 112px;
}

.invoice-totals {
  display: grid;
  gap: 8px;
  max-width: 360px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.settings-section > .form-grid,
.settings-section > .data-form {
  padding: 18px;
}

.data-form {
  padding: 0 18px 18px;
}

.order-line-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  align-items: end;
  gap: 10px;
}

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

.line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.order-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.assignment-board {
  padding: 0 18px 18px;
}

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

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

.assignment-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.assignment-alert {
  border-left: 4px solid var(--accent);
}

.assignment-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.worker-stock-panel {
  margin-top: 18px;
}

.order-card {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  text-align: left;
}

.order-card.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

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

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

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #fbfcfd;
  color: var(--muted);
}

.pick-lines,
.pack-lines {
  display: grid;
  gap: 12px;
}

.pick-row,
.pack-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.pick-row header,
.pack-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pick-go-to {
  color: var(--danger);
  font-weight: 850;
}

.pick-go-to strong {
  color: inherit;
  font-weight: 900;
}

.pick-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  align-items: end;
}

.pick-handover {
  border: 1px solid #e8cda7;
  border-left: 4px solid #c27803;
  border-radius: 8px;
  padding: 14px;
  background: #fff8ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pick-handover div {
  display: grid;
  gap: 4px;
}

.pick-handover span,
.document-note {
  color: var(--muted);
}

.operations-report {
  margin: 0 0 18px;
}

.ops-report {
  display: grid;
  gap: 12px;
}

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

.ops-kpi {
  min-height: 94px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.ops-kpi strong {
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ops-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.ops-kpi-ok {
  border-left-color: var(--primary);
}

.ops-kpi-warning {
  border-left-color: var(--warning);
}

.ops-kpi-danger {
  border-left-color: var(--danger);
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 12px;
}

.ops-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.ops-section-wide {
  grid-column: span 2;
}

.ops-section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.ops-section-header h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.ops-chip {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 6px 9px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ops-empty {
  padding: 16px;
  color: var(--muted);
  background: #fff;
}

.ops-table {
  display: grid;
}

.ops-table-head,
.ops-table-row {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) 110px 80px 96px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
}

.ops-table-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #fff;
}

.ops-table-row {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.ops-table-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ops-list {
  display: grid;
}

.ops-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.ops-list-row:first-child {
  border-top: 0;
}

.ops-list-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ops-list-row span {
  color: var(--muted);
}

.ops-list-row b {
  white-space: nowrap;
}

.ops-list.compact .ops-list-row {
  padding-block: 10px;
}

.problem-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.65fr) minmax(130px, 0.65fr) 110px minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.problem-instruction {
  grid-column: 1 / -1;
  border: 1px solid #edcfae;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff8ef;
  color: var(--ink);
}

.problem-instruction:empty {
  display: none;
}

.return-scan {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: min(100%, 360px);
}

.return-scan input {
  min-width: 220px;
}

.return-receive-panel {
  display: grid;
  gap: 12px;
}

.return-receive-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.return-receive-card header,
.return-receive-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 180px;
  align-items: end;
  gap: 10px;
}

.return-receive-card header {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
}

.return-receive-lines {
  display: grid;
  gap: 8px;
}

.return-receive-line {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.return-doc-heading {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.qr-code {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf0;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
}

.station-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 14px;
}

.pack-controls {
  max-width: 190px;
}

.package-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

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

.document-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

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

.address-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.message-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.message-card {
  border: 1px solid #edcfae;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff8ef;
}

.message-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.message-card strong {
  color: var(--ink);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 33, 43, 0.38);
  backdrop-filter: blur(6px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  border: 1px solid rgba(216, 222, 230, 0.98);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 33, 43, 0.22);
}

.customs-declaration-card {
  border-top: 5px solid var(--warning);
}

.pick-complete-card {
  border-top: 5px solid var(--primary);
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--warning);
  font-size: 24px;
  font-weight: 900;
}

.modal-icon-success {
  background: var(--green-soft);
  color: var(--primary-dark);
  font-size: 16px;
}

.modal-icon-info {
  background: var(--green-soft);
  color: var(--primary-dark);
  font-size: 20px;
}

.modal-copy {
  display: grid;
  gap: 6px;
}

.modal-copy h2,
.modal-copy p,
.modal-note {
  margin: 0;
}

.modal-copy h2 {
  font-size: 22px;
  line-height: 1.2;
}

.modal-copy p,
.modal-note {
  color: var(--muted);
  line-height: 1.45;
}

.modal-summary {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr);
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.modal-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.fedex-service-info-card {
  width: min(100%, 720px);
  max-height: min(86vh, 760px);
  overflow: auto;
  border-top: 5px solid var(--primary);
}

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

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

.fedex-service-card header {
  display: grid;
  gap: 8px;
}

.fedex-service-card strong,
.fedex-service-card b {
  color: var(--ink);
}

.fedex-service-card span,
.fedex-service-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fedex-service-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
}

@media (max-width: 760px) {
  .fedex-service-list {
    grid-template-columns: 1fr;
  }
}

.label-preview {
  display: grid;
  gap: 8px;
  max-width: 360px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
}

.label-barcode {
  height: 58px;
  background:
    repeating-linear-gradient(
      90deg,
      #111 0 3px,
      #fff 3px 6px,
      #111 6px 8px,
      #fff 8px 12px
    );
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.print-sheet {
  display: none;
}

@media (max-width: 1240px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .panel-heading,
  .order-card-row,
  .pick-row header,
  .pack-row header {
    align-items: stretch;
    flex-direction: column;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .app-header {
    align-items: center;
    gap: 12px;
    padding: 14px clamp(16px, 4vw, 24px);
    z-index: 80;
    backdrop-filter: none;
  }

  .app-brand {
    flex: 1;
  }

  .nav-side .app-brand {
    visibility: visible;
  }

  body.mobile-nav-open .app-brand {
    visibility: visible;
  }

  .app-brand-logo {
    width: auto;
    height: auto;
    max-width: min(184px, calc(100vw - 92px));
  }

  .nav-side .app-header,
  .nav-side main {
    margin-left: 0;
  }

  .nav-side .app-header {
    height: auto;
    padding: 14px clamp(16px, 4vw, 24px);
    border-bottom: 1px solid var(--line);
    background: rgba(246, 247, 249, 0.96);
  }

  .header-actions,
  .nav-side .header-actions {
    position: fixed;
    inset: 0;
    z-index: 60;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    padding: 24px 18px 96px;
    background: #141c25;
    color: #ffffff;
    opacity: 0;
    overflow-y: auto;
    pointer-events: none;
    transform: translateX(18px) scale(0.985);
    transition: opacity 0.22s ease, transform 0.24s ease;
  }

  body.mobile-nav-open .header-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }

  body.mobile-nav-open .side-nav-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(250px, calc(100vw - 64px));
    margin: 0 auto 16px;
    border-radius: 14px;
  }

  .top-nav,
  .nav-side .top-nav {
    position: static;
    order: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-side .top-nav::before {
    display: none;
  }

  .top-nav,
  .nav-group,
  .nav-group-toggle {
    width: 100%;
  }

  .nav-direct,
  .nav-group-toggle,
  .nav-menu .nav-button {
    color: rgba(255, 255, 255, 0.86);
  }

  .nav-direct,
  .nav-group-toggle {
    min-height: 52px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
  }

  body.mobile-nav-open .nav-direct {
    position: relative;
    justify-content: center;
    padding-right: 54px;
    padding-left: 54px;
  }

  body.mobile-nav-open .nav-direct::before {
    position: absolute;
    left: 18px;
  }

  .nav-direct.active,
  .nav-group.active > .nav-group-toggle,
  .nav-group[open] > .nav-group-toggle {
    border-color: rgba(23, 107, 93, 0.65);
    background: rgba(23, 107, 93, 0.82);
    color: #ffffff;
    box-shadow: none;
  }

  .nav-menu {
    position: static;
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: 6px 0 10px 12px;
    background: transparent;
    box-shadow: none;
  }

  .nav-layout-toggle,
  .nav-side .nav-layout-toggle {
    order: 1;
    position: relative;
    z-index: 80;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border-color: rgba(20, 28, 37, 0.92);
    background: #141c25;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(20, 28, 37, 0.18);
  }

  .nav-side .nav-layout-toggle-header {
    display: inline-flex;
  }

  .nav-side .nav-layout-toggle-drawer {
    display: none;
  }

  .nav-toggle-icon {
    display: block;
  }

  .nav-toggle-text {
    display: none;
  }

  .session-box {
    order: 2;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 16px;
    color: rgba(255, 255, 255, 0.66);
    text-align: left;
  }

  .session-box strong {
    color: #ffffff;
  }

  #logoutButton {
    order: 3;
    width: 100%;
    min-height: 48px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  body.mobile-nav-open .nav-layout-toggle-header {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    width: auto;
    min-width: 0;
  }

  .metrics-strip,
  .dashboard-toolbar,
  .dashboard-filters,
  .dashboard-kpi-grid,
  .ops-kpi-grid,
  .workspace-grid,
  .database-grid,
  .split-layout,
  .dashboard-grid,
  .ops-layout,
  .recent-order-row {
    grid-template-columns: 1fr;
  }

  .dashboard-wide,
  .ops-section-wide {
    grid-column: auto;
  }

  .dashboard-chip,
  .recent-order-row > strong {
    text-align: left;
  }

  .form-grid,
  .pricing-manager .data-form,
  .pricing-cleanup-controls,
    .order-line-builder,
    .invoice-line-builder,
    .return-line-builder,
    .return-toolbar,
    .document-toolbar,
    .pick-controls,
  .problem-form,
  .station-scan,
  .package-grid,
  .assignment-grid,
  .stock-tools-grid,
  .return-receive-card header,
  .return-receive-line,
  .address-columns {
    grid-template-columns: 1fr;
  }

  .ops-table-head {
    display: none;
  }

  .ops-table-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .search-input {
    max-width: none;
  }
}

@media print {
  body > *:not(.print-active) {
    display: none !important;
  }

  .print-active {
    display: block !important;
  }

  .print-sheet {
    width: 100%;
    padding: 32px;
    color: #000000;
    font-family: Arial, sans-serif;
  }

  .print-sheet header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 2px solid #000000;
    padding-bottom: 18px;
    margin-bottom: 24px;
  }

  .print-sheet table {
    margin-top: 18px;
  }

  .print-sheet th,
  .print-sheet td {
    border: 1px solid #000000;
  }

  .modern-invoice-sheet {
    max-width: 210mm;
    margin: 0 auto;
    padding: 0 !important;
    color: #06152b;
    font-family: Inter, Arial, sans-serif;
    background: #ffffff;
  }

  .modern-invoice-sheet > header {
    display: none !important;
  }

  .modern-invoice {
    padding: 20mm 14mm 13mm;
  }

  .modern-invoice-hero {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr;
    gap: 18mm;
    border-bottom: 0 !important;
    margin: 0 0 12mm !important;
    padding: 0 !important;
  }

  .modern-invoice-title h1 {
    margin: 16mm 0 0;
    color: #06152b;
    font-size: 36pt;
    line-height: 0.95;
    text-transform: uppercase;
  }

  .modern-invoice-title > strong {
    display: block;
    margin-top: 5mm;
    color: #0b5ed7;
    font-size: 32pt;
    line-height: 1;
  }

  .modern-invoice-logo img {
    width: 62mm;
    height: auto;
  }

  .modern-invoice-meta {
    display: grid;
    gap: 8mm;
    border-left: 1px solid #d7e1ef;
    padding-left: 13mm;
  }

  .modern-invoice-meta-item {
    display: grid;
    grid-template-columns: 7mm 1fr;
    gap: 5mm;
    align-items: start;
  }

  .modern-invoice-meta-item span,
  .modern-info-item span,
  .modern-payment-row span {
    color: #5c6d83;
    font-size: 10pt;
  }

  .modern-invoice-meta-item strong {
    display: block;
    margin-top: 1.5mm;
    color: #06152b;
    font-size: 12pt;
    font-weight: 700;
  }

  .modern-invoice-meta-item strong.accent {
    color: #0b5ed7;
    font-size: 16pt;
  }

  .modern-rule {
    height: 1.6pt;
    margin: 0 0 12mm;
    background: #0b5ed7;
  }

  .modern-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8mm;
    margin-bottom: 10mm;
  }

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

  .modern-invoice-card {
    min-height: 55mm;
    border: 1px solid #d9e3f0;
    border-radius: 7px;
    padding: 8mm 7mm;
    box-shadow: 0 12px 30px rgba(6, 21, 43, 0.04);
  }

  .modern-card-heading {
    display: flex;
    align-items: center;
    gap: 5mm;
    margin-bottom: 7mm;
  }

  .modern-card-heading h3 {
    margin: 0;
    color: #0b5ed7;
    font-size: 10pt;
    text-transform: uppercase;
  }

  .modern-invoice-card strong {
    display: block;
    margin-bottom: 3.5mm;
    font-size: 13pt;
  }

  .modern-invoice-card span {
    display: block;
    margin-top: 2.3mm;
    color: #06152b;
    font-size: 10.5pt;
  }

  .modern-card-icon {
    display: inline-grid;
    place-items: center;
    width: 10mm;
    height: 10mm;
    border-radius: 50%;
    background: #0b5ed7;
    color: #ffffff;
  }

  .modern-card-icon .modern-invoice-icon-svg {
    width: 5mm;
    height: 5mm;
  }

  .modern-email-row {
    display: flex;
    align-items: center;
    gap: 4mm;
    margin: 0 0 9mm;
    color: #06152b;
    font-size: 10.5pt;
  }

  .modern-email-row strong,
  .modern-info-item strong,
  .modern-payment-row strong {
    color: #0b5ed7;
  }

  .modern-invoice-table {
    width: 100%;
    margin: 0 0 11mm !important;
    border: 1px solid #d9e3f0;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 7px;
    overflow: hidden;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .modern-invoice-table th,
  .modern-invoice-table td {
    border: 0 !important;
    border-right: 1px solid #d9e3f0 !important;
    padding: 6mm 4mm;
    color: #06152b;
    font-size: 9.5pt;
    text-align: left;
    vertical-align: middle;
  }

  .modern-invoice-table th:last-child,
  .modern-invoice-table td:last-child {
    border-right: 0 !important;
  }

  .modern-invoice-table th {
    background: #0050c7 !important;
    color: #ffffff;
    border-right-color: rgba(255, 255, 255, 0.22) !important;
    font-size: 9pt;
    font-weight: 800;
    print-color-adjust: exact;
    text-transform: uppercase;
    -webkit-print-color-adjust: exact;
  }

  .modern-invoice-table .numeric {
    text-align: center;
  }

  .modern-money {
    display: inline-grid;
    gap: 1mm;
    text-align: center;
  }

  .modern-money strong {
    color: #06152b;
    font-size: 8.5pt;
  }

  .modern-invoice-bottom {
    display: grid;
    grid-template-columns: 0.88fr 1fr;
    gap: 22mm;
    align-items: start;
    margin-top: 2mm;
  }

  .modern-summary-list {
    display: grid;
    gap: 0;
  }

  .modern-info-item {
    display: grid;
    grid-template-columns: 8mm 1fr;
    gap: 4mm;
    padding: 4mm 0;
    border-bottom: 1px solid #d9e3f0;
  }

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

  .modern-info-item strong {
    display: block;
    margin-bottom: 1.2mm;
    color: #0050c7;
    font-size: 10pt;
  }

  .modern-info-item span:not(.modern-info-icon) {
    color: #06152b;
    font-size: 10pt;
  }

  .modern-total-card {
    min-height: 45mm;
    border: 1px solid #9fc3f5;
    border-radius: 7px;
    padding: 8mm;
    background: #f7fbff;
  }

  .modern-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8mm;
    border-bottom: 1px solid #cbd9ea;
    padding-bottom: 7mm;
  }

  .modern-total-row > span {
    color: #0050c7;
    font-size: 12pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .modern-total-row strong {
    color: #0050c7;
    font-size: 26pt;
    line-height: 1;
    white-space: nowrap;
  }

  .modern-total-row small {
    font-size: 14pt;
  }

  .modern-payment-row {
    display: grid;
    grid-template-columns: 7mm 1fr;
    gap: 4mm;
    margin-top: 7mm;
  }

  .modern-payment-row strong {
    display: block;
    margin-bottom: 1.2mm;
    color: #0050c7;
  }

  .modern-invoice-footer {
    display: flex;
    justify-content: space-between;
    gap: 10mm;
    border-top: 1.6pt solid #0b5ed7;
    margin-top: 20mm;
    padding-top: 8mm;
    color: #0b5ed7;
    font-size: 10pt;
  }

  .modern-invoice-footer span,
  .modern-inline-icon {
    display: inline-flex !important;
    align-items: center;
    gap: 3mm;
  }

  .modern-invoice-icon-svg {
    width: 5mm;
    height: 5mm;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .modern-meta-icon,
  .modern-info-icon {
    color: #0050c7;
  }

  .modern-meta-icon .modern-invoice-icon-svg,
  .modern-info-icon .modern-invoice-icon-svg {
    width: 5.2mm;
    height: 5.2mm;
  }

  .modern-invoice .document-note {
    border: 1px solid #f0c27a;
    border-radius: 6px;
    margin: 0 0 8mm;
    padding: 4mm;
    color: #7a4a00;
    background: #fff8ec;
  }

  .modern-delivery-sheet {
    max-width: 210mm;
    margin: 0 auto;
    padding: 0 !important;
    color: #06152b;
    font-family: Inter, Arial, sans-serif;
    background: #ffffff;
  }

  .modern-delivery-sheet > header {
    display: none !important;
  }

  .modern-delivery-note {
    display: flex;
    flex-direction: column;
    min-height: 270mm;
    padding: 16mm 14mm 12mm;
    color: #06152b;
  }

  .modern-delivery-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14mm;
    margin-bottom: 17mm;
  }

  .modern-delivery-logo,
  .modern-delivery-printed-at,
  .modern-delivery-email,
  .modern-delivery-package,
  .modern-delivery-footer > div {
    display: flex;
    align-items: center;
  }

  .modern-delivery-logo {
    gap: 6mm;
  }

  .modern-delivery-logo img {
    width: 62mm;
    height: auto;
  }

  .modern-delivery-logo strong {
    color: #061f48;
    font-size: 23pt;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .modern-delivery-printed-at {
    gap: 3mm;
    margin-top: 6mm;
    color: #667085;
    font-size: 11pt;
    white-space: nowrap;
  }

  .modern-delivery-printed-at .modern-invoice-icon-svg {
    color: #0b8d85;
  }

  .modern-delivery-hero {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr;
    gap: 17mm;
    align-items: start;
    border-bottom: 0 !important;
    margin: 0 0 7mm !important;
    padding: 0 !important;
  }

  .modern-delivery-title h1 {
    margin: 13mm 0 0;
    color: #061f48;
    font-size: 28pt;
    line-height: 1.08;
  }

  .modern-delivery-title span {
    display: block;
    width: 25mm;
    height: 1.2mm;
    border-radius: 99px;
    margin-top: 8mm;
    background: #0b8d85;
  }

  .modern-delivery-meta {
    display: grid;
    border-radius: 8px;
    padding: 5mm 6mm;
    background: #f2f5f9;
  }

  .modern-delivery-meta-item {
    display: grid;
    grid-template-columns: 9mm 1fr;
    gap: 5mm;
    align-items: center;
    min-height: 14mm;
    border-bottom: 1px solid #cad3df;
    padding: 2.5mm 0;
  }

  .modern-delivery-meta-item:last-child {
    border-bottom: 0;
  }

  .modern-delivery-meta-icon,
  .modern-delivery-card-icon,
  .modern-delivery-package > span {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
  }

  .modern-delivery-meta-icon {
    width: 8.5mm;
    height: 8.5mm;
    color: #ffffff;
    background: #062b60;
  }

  .modern-delivery-meta-icon .modern-invoice-icon-svg {
    width: 4.5mm;
    height: 4.5mm;
  }

  .modern-delivery-meta-item strong {
    color: #1d2433;
    font-size: 10.5pt;
    font-weight: 500;
  }

  .modern-delivery-meta-item strong.is-strong {
    color: #06152b;
    font-size: 11pt;
    font-weight: 800;
  }

  .modern-delivery-rule {
    height: 1.6pt;
    margin: 0 0 9mm;
    background: #061f48;
  }

  .modern-delivery-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7mm;
    margin-bottom: 6mm;
  }

  .modern-delivery-card {
    display: grid;
    grid-template-columns: 20mm 1fr;
    gap: 7mm;
    align-items: center;
    min-height: 48mm;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    padding: 7mm;
    background: #ffffff;
  }

  .modern-delivery-card-wide {
    grid-column: 1 / -1;
    min-height: 37mm;
  }

  .modern-delivery-card-icon {
    width: 18mm;
    height: 18mm;
    color: #0b8d85;
    background: #edf6f5;
  }

  .modern-delivery-card-icon .modern-invoice-icon-svg {
    width: 9mm;
    height: 9mm;
  }

  .modern-delivery-card h3 {
    margin: 0 0 4mm;
    color: #0b8d85;
    font-size: 9.5pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .modern-delivery-card strong {
    display: block;
    margin-bottom: 2mm;
    color: #061f48;
    font-size: 12pt;
  }

  .modern-delivery-card span:not(.modern-delivery-card-icon) {
    display: block;
    margin-top: 1.8mm;
    color: #1d2433;
    font-size: 10.5pt;
  }

  .modern-delivery-email {
    gap: 4mm;
    margin: 0 0 4mm;
    color: #1d2433;
    font-size: 10pt;
  }

  .modern-delivery-email .modern-invoice-icon-svg {
    width: 9mm;
    height: 9mm;
    border-radius: 50%;
    padding: 2mm;
    color: #ffffff;
    background: #062b60;
  }

  .modern-delivery-email strong,
  .modern-delivery-package strong {
    color: #0b8d85;
  }

  .modern-delivery-table {
    width: 100%;
    margin: 0 0 7mm !important;
    border: 1px solid #d2d9e4;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .modern-delivery-table th,
  .modern-delivery-table td {
    border: 0 !important;
    border-bottom: 1px solid #d2d9e4 !important;
    padding: 4.5mm 6mm;
    color: #1d2433;
    font-size: 10.5pt;
    text-align: left;
    vertical-align: middle;
  }

  .modern-delivery-table tr:last-child td {
    border-bottom: 0 !important;
  }

  .modern-delivery-table th {
    color: #ffffff;
    background: #062b60 !important;
    font-size: 9.5pt;
    font-weight: 900;
    text-transform: uppercase;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .modern-delivery-table .numeric {
    text-align: center;
    font-weight: 800;
  }

  .modern-delivery-package {
    gap: 5mm;
    border: 1px solid #cfdee0;
    border-radius: 7px;
    margin-bottom: 10mm;
    padding: 5mm 6mm;
    background: #eff7f7;
  }

  .modern-delivery-package > span {
    width: 12mm;
    height: 12mm;
    color: #ffffff;
    background: #0b8d85;
  }

  .modern-delivery-package p {
    margin: 0;
    color: #1d2433;
    font-size: 10.5pt;
  }

  .modern-delivery-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10mm;
    border-top: 1.6pt solid #0b8d85;
    margin-top: auto;
    padding-top: 6mm;
  }

  .modern-delivery-footer > div {
    gap: 4mm;
  }

  .modern-delivery-footer-icon .modern-invoice-icon-svg {
    width: 7mm;
    height: 7mm;
  }

  .modern-delivery-footer p {
    display: grid;
    gap: 1mm;
    margin: 0;
  }

  .modern-delivery-footer strong {
    color: #061f48;
    font-size: 9.5pt;
  }

  .modern-delivery-footer span {
    color: #667085;
    font-size: 8.5pt;
  }

  .modern-delivery-footer .modern-delivery-footer-icon {
    color: #0b8d85;
  }

  .modern-delivery-page {
    border-radius: 4px;
    padding: 2mm 5mm;
    color: #ffffff !important;
    background: #062b60;
    font-size: 12pt !important;
  }

  .modern-delivery-note .document-note {
    border: 1px solid #f0c27a;
    border-radius: 6px;
    margin: 0 0 5mm;
    padding: 4mm;
    color: #7a4a00;
    background: #fff8ec;
  }
}
