:root {
  --navy: #0a2e5a;
  --navy-deep: #071e3d;
  --navy-mid: #163a6b;
  --orange: #f5821f;
  --orange-hot: #ff9a3c;
  --ink: #0a2e5a;
  --muted: #5b6b82;
  --line: #dce3ee;
  --paper: #ffffff;
  --mist: #f4f7fb;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(10, 46, 90, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.test-env-banner {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #7a1f1f;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 8px 12px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(245, 130, 31, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 20%, rgba(10, 46, 90, 0.08), transparent 55%),
    var(--paper);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 22px;
  font-weight: 800;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 52ch;
}

h1 + .lead,
h2 + .lead {
  margin-top: 14px;
}

.accent {
  color: var(--orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  border-radius: 16px;
  padding: 12px 20px;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(2px) scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid rgba(245, 130, 31, 0.45);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn--lg {
  padding: 15px 24px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(245, 130, 31, 0.28);
}

.btn--primary:hover {
  background: var(--orange-hot);
}

.btn--primary:active {
  background: #e07012;
  box-shadow: 0 2px 8px rgba(245, 130, 31, 0.3);
}

.btn--ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--navy);
  background: var(--mist);
}

.btn--ghost:active {
  background: #e8eef6;
  box-shadow: inset 0 2px 5px rgba(10, 46, 90, 0.1);
}

.btn--navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 46, 90, 0.22);
}

.btn--navy:hover {
  background: var(--navy-mid);
}

.btn--navy:active {
  background: var(--navy-deep);
  box-shadow: 0 2px 8px rgba(10, 46, 90, 0.28);
}

.btn--white {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(10, 46, 90, 0.1);
}

.btn--white:hover {
  filter: brightness(0.98);
}

.btn--white:active {
  box-shadow: 0 2px 8px rgba(10, 46, 90, 0.12);
}

.role-switch__btn,
.trade-tabs button,
.cat-chips button,
.catalog-pager button,
.admin-tabs button,
.admin-kinds button,
.qty-ctrl button,
.circ-plus,
.chip,
.burger,
.spec-cancel,
.auth-link,
.auth-back {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.role-switch__btn:hover,
.trade-tabs button:hover,
.cat-chips button:hover,
.catalog-pager button:hover:not(:disabled),
.admin-tabs button:hover,
.admin-kinds button:hover,
.chip:hover {
  transform: translateY(-1px);
}

.role-switch__btn:active,
.trade-tabs button:active,
.cat-chips button:active,
.catalog-pager button:active:not(:disabled),
.admin-tabs button:active,
.admin-kinds button:active,
.qty-ctrl button:active,
.circ-plus:active,
.chip:active,
.burger:active,
.spec-cancel:active {
  transform: translateY(2px) scale(0.96);
}

.auth-link,
.auth-back {
  display: inline-block;
}

.auth-link:active,
.auth-back:active {
  transform: scale(0.97);
  opacity: 0.72;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .role-switch__btn,
  .trade-tabs button,
  .cat-chips button,
  .catalog-pager button,
  .admin-tabs button,
  .admin-kinds button,
  .qty-ctrl button,
  .circ-plus,
  .chip,
  .burger,
  .spec-cancel,
  .auth-link,
  .auth-back {
    transition: none;
  }

  .btn:hover,
  .btn:active,
  .role-switch__btn:hover,
  .role-switch__btn:active,
  .trade-tabs button:hover,
  .trade-tabs button:active,
  .cat-chips button:hover,
  .cat-chips button:active,
  .catalog-pager button:hover,
  .catalog-pager button:active,
  .admin-tabs button:hover,
  .admin-tabs button:active,
  .admin-kinds button:hover,
  .admin-kinds button:active,
  .qty-ctrl button:active,
  .circ-plus:active,
  .chip:hover,
  .chip:active,
  .burger:active,
  .spec-cancel:active,
  .auth-link:active,
  .auth-back:active {
    transform: none;
  }
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(10, 46, 90, 0.08);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__mobile-login {
  display: none;
}

.app-scan {
  padding: 88px 0;
  scroll-margin-top: 96px;
}

.app-scan__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.app-scan .lead {
  margin: 12px 0 24px;
}

.app-scan__url {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  word-break: break-all;
}

.app-scan__qr {
  margin: 0;
  justify-self: end;
  background: #fff;
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 46, 90, 0.06);
  text-align: center;
  width: min(100%, 320px);
}

.app-scan__qr a {
  display: block;
}

.app-scan__qr svg,
.app-scan__qr img {
  width: 100%;
  height: auto;
  display: block;
}

.app-scan__qr figcaption {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.app-gate {
  padding: 72px 0 96px;
}

.app-gate__inner {
  max-width: 720px;
}

.app-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 8px;
}

.cabinet-intro__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.cabinet-intro__grid article {
  background: var(--mist);
  border-radius: var(--radius);
  padding: 24px 22px 28px;
}

.cabinet-intro__grid p {
  color: var(--muted);
  margin-top: 8px;
}

.cabinet-intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.cabinet-intro__actions p {
  color: var(--muted);
  max-width: 42ch;
}

.cabinet-auth {
  padding: 56px 0 72px;
}

.cabinet-auth__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}

.cabinet-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.cabinet-points li {
  padding-left: 18px;
  position: relative;
}

.cabinet-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

.form--auth {
  margin-top: 8px;
}

.form--auth form {
  display: grid;
  gap: 16px;
}

#login-panel,
#register-panel {
  display: grid;
  gap: 14px;
}

.form--auth form[hidden],
#register-form [data-for][hidden],
#login-panel[hidden],
#register-panel[hidden],
#forgot-panel[hidden],
#reset-panel[hidden] {
  display: none !important;
}

.auth-link,
.auth-back {
  border: 0;
  background: none;
  padding: 4px 0;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  text-align: center;
}

.auth-back {
  text-align: left;
  color: var(--orange);
}

.register-cats-block {
  display: grid;
  gap: 6px;
}

.register-cats-block .form__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.register-cats-block .form__note {
  margin: 0;
}

.register-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 2px;
}

.cat-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cat-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.cat-check__name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
  pointer-events: none;
}

.cat-check:hover {
  border-color: var(--orange);
}

.cat-check:has(:focus-visible) {
  box-shadow: 0 0 0 3px rgba(245, 130, 31, 0.18);
}

.cat-check:has(:checked) {
  background: #fff4ea;
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: 0 8px 18px rgba(245, 130, 31, 0.12);
}

.cat-check:has(:checked) .cat-check__name::before {
  content: "✓ ";
  font-weight: 800;
}

@media (max-width: 640px) {
  .register-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-mode__btn {
  height: 42px;
  border: 0;
  background: #fff;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}

.auth-mode__btn.is-active {
  background: var(--navy);
  color: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form__label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cat-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
}

.form__title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}

.form__error {
  margin: 0;
  color: #b42318;
  font-weight: 700;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 10px;
}

.role-switch__btn {
  height: 46px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
}

.role-switch__btn.is-active {
  border-color: var(--orange);
  background: #fff4ea;
  color: var(--orange);
}

.cabinet-app {
  padding: 36px 0 72px;
}

.cabinet-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 22px;
}

.cabinet-head__who {
  min-width: 0;
}

.cabinet-head__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.cabinet-head__name .sync-pill {
  flex-shrink: 0;
}

.cabinet-head h1 {
  margin: 4px 0 6px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: none;
}

.cabinet-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 4px 0 6px;
}

.cabinet-title h1 {
  margin: 0;
}

.plan-mark {
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #0a2e5a 0%, #163e73 58%, #f5821f 160%);
  box-shadow: 0 8px 18px rgba(10, 46, 90, 0.16);
}

.plan-mark--plus {
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #f5821f 0%, #f6a03a 46%, #0a2e5a 165%);
  box-shadow: 0 8px 18px rgba(245, 130, 31, 0.22);
}

.plan-mark[hidden] {
  display: none !important;
}

.cabinet-head__meta {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.cabinet-nav-main {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
}

.cabinet-nav-main__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  padding: 14px 12px;
  border-radius: 16px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease;
}

.cabinet-nav-main__item:hover {
  background: var(--mist);
  transform: translateY(-1px);
}

.cabinet-nav-main__item:active {
  transform: translateY(1px) scale(0.98);
}

.cabinet-nav-main__item.is-on {
  background: var(--navy);
  color: #fff;
}

.cabinet-nav-main__item.is-on:hover {
  background: var(--navy);
}

.cabinet-nav-main__icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 22px;
}

.cabinet-nav-main__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.cabinet-nav-main__count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cabinet-nav-main__item.is-on .cabinet-nav-main__count {
  background: #fff;
  color: var(--navy);
}

.cabinet-nav-main__item.is-alert {
  background: #fff4e8;
  box-shadow: 0 0 0 2px rgba(245, 130, 31, 0.55);
  animation: nav-alert-pulse 1.7s ease-in-out infinite;
}

.cabinet-nav-main__item.is-alert:hover {
  background: #ffe8cc;
}

.cabinet-nav-main__item.is-alert.is-on {
  background: var(--navy);
  animation: none;
  box-shadow: 0 0 0 2px #f5821f, 0 10px 22px rgba(245, 130, 31, 0.28);
}

.cabinet-nav-main__item.is-alert.is-on:hover {
  background: var(--navy);
}

@keyframes nav-alert-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(245, 130, 31, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(245, 130, 31, 0.14); }
}

.cabinet-sub {
  display: grid;
  grid-template-columns: repeat(var(--sub-cols, 3), minmax(0, 1fr));
  gap: 0;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.cabinet-sub__item {
  appearance: none;
  border: 0;
  background: transparent;
  margin: 0;
  padding: 14px 10px 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.cabinet-sub__item:hover {
  color: var(--navy);
}

.cabinet-sub__item.is-on {
  color: var(--navy);
  border-bottom-color: var(--orange);
}

.cabinet-sub__item.is-alert {
  color: var(--navy);
}

.cabinet-sub__item.is-alert:not(.is-on) {
  border-bottom-color: rgba(245, 130, 31, 0.55);
  background: linear-gradient(180deg, transparent 55%, #fff4e8 100%);
}

.cabinet-sub__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.cabinet-sub__item:active {
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .cabinet-nav-main__item.is-alert {
    animation: none;
  }
}

.cabinet-head__meta #logout-btn {
  flex-shrink: 0;
  align-self: center;
}

.sync-pill {
  margin: 0;
  background: #eef6ee;
  color: #1f6b3a;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 999px;
}

.sync-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(120deg, var(--navy) 0%, #1a4a86 55%, var(--orange) 140%);
  color: #fff;
  border-radius: 24px;
  padding: 24px 28px;
  margin: 28px 0 0;
}

.sync-banner p {
  opacity: 0.86;
  margin-top: 10px;
  max-width: 62ch;
}

.sync-banner__apps {
  font-weight: 800;
  white-space: nowrap;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dash-stats article {
  background: var(--mist);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.dash-stats strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
}

.dash-stats span {
  color: var(--muted);
}

.dash-table,
.device-card {
  background: var(--mist);
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 18px;
}

.dash-table__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-table ul,
.device-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.dash-table li,
.device-list li {
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dash-table .lot-id {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tag {
  background: #fff4ea;
  color: var(--orange);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag--navy {
  background: #e8eef6;
  color: var(--navy);
}

.tag--mute {
  background: #eef1f5;
  color: var(--muted);
}

.device-card p {
  color: var(--muted);
  margin: 8px 0 16px;
}

.device-list span {
  color: var(--muted);
  font-size: 14px;
}

.device-list li {
  flex-wrap: wrap;
}

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 20px;
  min-height: 80px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.logo img {
  height: 66px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  background: transparent;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 8px;
  white-space: nowrap;
  line-height: 1;
}

.nav a.nav__mobile-login,
.nav button.nav__mobile-login {
  display: none;
}

.nav a:hover {
  color: var(--orange);
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 10px 9px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--navy);
}

.hero {
  padding: 72px 0 40px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero__copy h1 {
  margin-bottom: 18px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 36px;
}

.hero__stats {
  display: flex;
  gap: 28px;
  padding: 0;
  list-style: none;
}

.hero__stats strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

.hero__stats span {
  color: var(--muted);
  font-size: 14px;
}

.hero__visual {
  min-height: 460px;
  pointer-events: none;
}

.mosaic {
  position: relative;
  height: 480px;
}

.tile {
  position: absolute;
  border-radius: 28px;
}

.tile--navy { background: var(--navy); }
.tile--navy-mid { background: var(--navy-mid); }
.tile--orange { background: linear-gradient(145deg, #ff9a3c, var(--orange)); }
.tile--grad { background: linear-gradient(135deg, var(--navy), var(--orange)); }
.tile--soft { background: #e8eef6; }

.tile--a { width: 92px; height: 92px; left: 8px; bottom: 70px; }
.tile--b { width: 64px; height: 64px; left: 92px; bottom: 178px; }
.tile--c { width: 150px; height: 150px; right: 18px; top: 18px; display: grid; place-items: center; }
.tile--d { width: 78px; height: 78px; right: 148px; top: 118px; }
.tile--e { width: 54px; height: 54px; left: 36px; top: 86px; }

.tile__mark {
  width: 72px;
  height: 72px;
}

.auction-card {
  position: absolute;
  left: 48px;
  right: 36px;
  bottom: 24px;
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 46, 90, 0.06);
}

.auction-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.live {
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(245, 130, 31, 0.6);
  animation: pulse 1.6s infinite;
}

.lot-id, .timer {
  color: var(--muted);
}

.auction-card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.auction-card p {
  color: var(--muted);
  margin-bottom: 14px;
}

.auction-card__bar {
  height: 8px;
  border-radius: 99px;
  background: #edf2f8;
  overflow: hidden;
  margin-bottom: 12px;
}

.auction-card__fill {
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--orange));
}

.auction-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(245, 130, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 130, 31, 0); }
}

.about, .how, .audience, .plans, .contact {
  padding: 88px 0;
  scroll-margin-top: 96px;
}

.about {
  background: var(--mist);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about p + p {
  margin-top: 14px;
  color: var(--muted);
}

.about .lead,
.about p {
  font-size: 17px;
}

.pillars {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}

.pillars li {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 8px 24px rgba(10, 46, 90, 0.05);
}

.pillars__num {
  display: block;
  color: var(--orange);
  font-weight: 800;
  margin-bottom: 6px;
}

.pillars p {
  color: var(--muted);
  margin-top: 6px;
}

.section-head {
  margin-bottom: 36px;
}

.section-head p {
  margin-top: 14px;
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  counter-reset: none;
}

.steps li {
  background: var(--mist);
  border-radius: var(--radius);
  padding: 22px 16px 24px;
}

.steps h3 {
  font-size: 18px;
}

.steps__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  margin-bottom: 16px;
}

.steps__icon--accent {
  background: var(--orange);
}

.steps p {
  color: var(--muted);
  margin-top: 8px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.split__card {
  border-radius: 28px;
  padding: 32px;
  color: #fff;
  min-height: 320px;
}

.split__card--navy {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy-mid));
}

.split__card--orange {
  background: linear-gradient(160deg, #e06e12, var(--orange-hot));
}

.split__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 12px;
}

.split__card h3 {
  margin-bottom: 18px;
}

.split__card ul {
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.split__cta {
  margin-top: 22px;
}

.plans {
  background: var(--mist);
}

.plans .lead {
  margin-top: 10px;
}

.plans__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.plan-card {
  background: #fff;
  border-radius: 28px;
  padding: 28px 26px 30px;
  box-shadow: 0 8px 24px rgba(10, 46, 90, 0.05);
  border: 1px solid rgba(10, 46, 90, 0.06);
  display: flex;
  flex-direction: column;
}

.plan-card--plus {
  border: 2px solid var(--orange);
  box-shadow: 0 18px 40px rgba(245, 130, 31, 0.16);
}

.plan-card__mark {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 8px;
}

.plan-card .tariff-list {
  flex: none;
}

.plans__hint {
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.plans__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.plans__note {
  color: var(--muted);
  max-width: 46ch;
  margin: 0;
}

.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, #1a4a86 48%, var(--orange) 130%);
  color: #fff;
}

.cta-band__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 56px 0;
}

.cta-band p {
  opacity: 0.86;
  margin-top: 12px;
}

.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}

.contacts {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.contacts span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contacts a, .contacts p {
  font-size: 20px;
  font-weight: 800;
}

.form {
  background: var(--mist);
  border-radius: 28px;
  padding: 28px;
  display: grid;
  gap: 16px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.form input,
.form select,
.form textarea {
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.form textarea {
  height: auto;
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(245, 130, 31, 0.35);
  border-color: var(--orange);
}

.form__note {
  font-size: 12px;
  color: var(--muted);
}

.form__note a {
  color: var(--navy);
  font-weight: 700;
}

.form__ok {
  margin: 12px 0 0;
  color: #1f6b3a;
  font-weight: 700;
}

.form--auth .form__note a {
  color: var(--navy);
  font-weight: 700;
}

.totp-qr {
  width: 180px;
  margin: 4px 0 8px;
}

.totp-qr svg {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.totp-secret {
  margin: 0 0 10px;
  font-size: 12px;
  font-family: ui-monospace, Consolas, monospace;
  word-break: break-all;
  color: var(--navy);
}

.check-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.check-agree input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--orange);
}

.check-agree a {
  color: var(--navy);
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer__links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.footer__links a:hover {
  color: var(--navy);
}

.logo--footer img {
  height: 44px;
}

.footer p {
  color: var(--muted);
  font-size: 14px;
}

.legal {
  padding: 48px 0 88px;
}

.legal__inner {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.legal h2 {
  margin-top: 36px;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.3;
  scroll-margin-top: 96px;
}

.legal p {
  margin-top: 12px;
  color: var(--muted);
}

.legal p strong {
  color: var(--navy);
  font-weight: 700;
}

.legal a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal__meta {
  margin-top: 16px;
  font-size: 14px;
}

.legal__toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.legal__toc a {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.legal__toc a:hover {
  border-color: var(--orange);
  color: var(--navy);
}

@media (max-width: 1100px) {
  .steps,
  .cabinet-intro__grid,
  .plans__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cabinet-auth__grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .cabinet-head,
  .sync-banner,
  .dash-table__head,
  .app-scan__grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .app-scan__qr {
    justify-self: start;
  }

  .sync-banner__apps {
    white-space: normal;
  }
}

@media (max-width: 960px) {
  .hero__grid,
  .about__grid,
  .steps,
  .split,
  .contact__grid,
  .cta-band__inner,
  .footer__inner,
  .cabinet-intro__grid,
  .plans__grid,
  .dash-stats {
    grid-template-columns: 1fr;
    display: grid;
  }

  .header__cta,
  .header__actions {
    display: none;
  }

  .header__inner {
    grid-template-columns: 1fr auto;
    min-height: 72px;
  }

  .nav a.nav__mobile-login,
  .nav button.nav__mobile-login {
    display: flex;
  }

  .nav button.nav__mobile-login[hidden] {
    display: none !important;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    padding: 8px 0 12px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(10, 46, 90, 0.08);
  }

  .nav a,
  .nav button.nav__mobile-login {
    justify-content: flex-start;
    height: 48px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .nav button.nav__mobile-login {
    width: 100%;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav.is-open {
    display: flex;
  }

  .burger {
    display: block;
  }

  .hero__visual {
    min-height: 420px;
  }

  .cta-band__inner {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 24px));
  }

  .hero {
    padding-top: 36px;
  }

  .hero__stats {
    flex-direction: column;
    gap: 12px;
  }

  .mosaic {
    height: 420px;
  }

  .auction-card {
    left: 8px;
    right: 8px;
  }

  .logo img {
    height: 56px;
    max-width: none;
  }

  .dash-table li,
  .device-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

.trade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

.trade-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-family: inherit;
  color: var(--navy);
  cursor: pointer;
}

.trade-tabs button.is-on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.trade-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(10, 46, 90, 0.06);
}

article.trade-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 22px 22px 24px;
}

.trade-card h3 {
  font-size: 18px;
  margin: 6px 0;
}

article.trade-card h3 {
  margin: 0;
}

article.trade-card > .btn,
article.trade-card > .trade-pill,
article.trade-card > .clar-badge,
article.trade-card > .tag,
article.trade-card > .cat-chips {
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
}

.scan-files {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.scan-file {
  display: grid;
  gap: 6px;
}

.scan-file__picked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.scan-file__name {
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

article.trade-card > strong {
  line-height: 1.35;
}

.trade-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ship-lanes {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.ship-lane {
  --ship-color: #007aff;
  background: linear-gradient(180deg, #fff, var(--mist));
  border: 1px solid var(--line);
  border-left: 4px solid var(--ship-color);
  border-radius: 16px;
  padding: 10px 12px 12px;
}

.ship-lane[data-ship-status="new"] { --ship-color: #007aff; }
.ship-lane[data-ship-status="packing"] { --ship-color: #ff9500; }
.ship-lane[data-ship-status="on_the_way"] { --ship-color: #5856d6; }
.ship-lane[data-ship-status="delivered"] { --ship-color: #34c759; }

.ship-lane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.ship-lane__who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.ship-now {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--ship-color);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.ship-now::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.ship-lane[data-ship-status="new"] .ship-now::before,
.ship-lane[data-ship-status="packing"] .ship-now::before,
.ship-lane[data-ship-status="on_the_way"] .ship-now::before {
  animation: ship-pulse 1.6s ease-in-out infinite;
}

.ship-track {
  display: flex;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  width: 100%;
}

.ship-track__step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ship-track__step::before,
.ship-track__step::after {
  content: "";
  position: absolute;
  top: 5px;
  height: 2px;
  background: #dce3ee;
  z-index: 0;
}

.ship-track__step::before {
  left: 0;
  right: 50%;
}

.ship-track__step::after {
  left: 50%;
  right: 0;
}

.ship-track__step:first-child::before,
.ship-track__step:last-child::after {
  display: none;
}

.ship-track__step.is-done::before,
.ship-track__step.is-done::after,
.ship-track__step.is-now::before {
  background: var(--ship-color);
}

.ship-track__dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dce3ee;
  box-shadow: 0 0 0 3px #fff;
}

.ship-track__step.is-done .ship-track__dot,
.ship-track__step.is-now .ship-track__dot {
  background: var(--ship-color);
}

.ship-track__step.is-now .ship-track__dot {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(88, 86, 214, 0.18);
}

.ship-lane[data-ship-status="new"] .ship-track__step.is-now .ship-track__dot {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0, 122, 255, 0.18);
}

.ship-lane[data-ship-status="packing"] .ship-track__step.is-now .ship-track__dot {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(255, 149, 0, 0.2);
}

.ship-lane[data-ship-status="delivered"] .ship-track__step.is-now .ship-track__dot {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(52, 199, 89, 0.2);
}

.ship-track__label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.ship-track__step.is-done .ship-track__label {
  color: var(--navy);
}

.ship-track__step.is-now .ship-track__label {
  color: var(--ship-color);
  font-weight: 800;
}

@keyframes ship-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.72); }
}

@media (max-width: 420px) {
  .ship-lane__head {
    flex-wrap: wrap;
  }

  .ship-track__label {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ship-now::before {
    animation: none !important;
  }
}

.archive-filters {
  display: grid;
  gap: 12px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--mist));
}

.archive-filters__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.archive-filters__top strong {
  font-size: 15px;
}

.archive-period {
  margin: 0;
}

.archive-filters__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.archive-filters__grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.archive-filters__grid input,
.archive-filters__grid select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
}

.archive-filters__search {
  grid-column: 1 / -1;
}

.archive-filters__sum {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.delivered-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
}

article.trade-card.delivered-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.delivered-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 8px 6px;
  border-radius: 16px;
  background: #eef6ee;
  color: #1f7a3a;
  text-align: center;
  line-height: 1.15;
}

.delivered-date__day {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.delivered-date__mon {
  font-size: 12px;
  font-weight: 800;
  text-transform: lowercase;
}

.delivered-date__time {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #2f6b45;
}

.delivered-card__body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.delivered-card__body h3 {
  margin: 0;
  font-size: 17px;
}

@media (max-width: 560px) {
  .archive-filters__grid {
    grid-template-columns: 1fr;
  }

  .delivered-card {
    grid-template-columns: 64px 1fr;
    gap: 10px;
  }

  article.trade-card.delivered-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}

.trade-card-meta .clar-badge,
.trade-card-meta .unread-badge {
  margin-left: 0;
}

article.trade-card > .trade-row:first-child {
  border-top: 0;
  padding-top: 0;
}

article.trade-card.trade-card--empty {
  text-align: center;
  align-items: center;
}

.order-note-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 860px;
  padding: 14px 16px !important;
}

.order-note-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.order-note {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  max-height: 120px;
  margin: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
  font-family: inherit;
  color: var(--navy);
  resize: vertical;
}

.order-note:focus {
  border-color: var(--navy);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(10, 46, 90, 0.12);
}

.trade-card--click {
  cursor: pointer;
}

.trade-card--unread {
  background: #fff7ed;
  border-color: #ffd4a3;
  box-shadow: 6px 0 0 var(--orange) inset, 0 10px 28px rgba(245, 130, 31, 0.12);
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
}

.trade-card--unread .unread-badge {
  margin: 6px 0 8px;
}

.trade-card--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-card--warn {
  background: #fff6ec;
  border-color: #ffd7a8;
}

.trade-card--warn .btn {
  margin-top: 8px;
  align-self: flex-start;
}

.contract-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1e4;
  color: var(--orange);
  vertical-align: middle;
}

.trade-card input[type="file"] {
  display: block;
  margin: 10px 0;
  max-width: 100%;
  font-size: 13px;
}

.contract-tag--ok {
  background: #e8f8ee;
  color: #1f6b3a;
}

.contract-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contract-doc {
  gap: 10px;
}

.contract-body {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: var(--navy);
}

@media (max-width: 720px) {
  .contract-parties {
    grid-template-columns: 1fr;
  }
}

.trade-muted {
  color: var(--muted);
  font-size: 13px;
}

.duration-heading {
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
}

.order-code {
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #0a2e5a;
  font-size: 16px;
}

.trade-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.market-row--new {
  background: #fff7ed;
  border-color: transparent;
  border-radius: 12px;
  margin: 6px 0;
  padding: 10px;
}

.market-row--new .unread-badge {
  margin-left: 6px;
}

.trade-row > span:first-child {
  min-width: 0;
  flex: 1;
}

.trade-row > .bid-check,
.bid-row .bid-check,
.bid-pick .bid-check {
  flex: 0 0 26px;
  flex-grow: 0;
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  height: 26px;
  box-sizing: border-box;
}

.trade-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.trade-search {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
}

.trade-head-line {
  margin: 0;
}

.bid-timer {
  text-align: left;
  margin: 4px 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bid-timer-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted, #6b7280);
}

.bid-timer-value {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--navy);
}

.bid-timer-until {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted, #6b7280);
}

.bid-timer.is-urgent {
  border: 0;
  background: transparent;
}

.bid-timer.is-urgent .bid-timer-value {
  color: var(--orange);
}

.bid-timer.is-ended {
  border: 0;
  background: transparent;
}

.bid-timer.is-ended .bid-timer-value {
  font-size: 16px;
  font-weight: 700;
  color: #8e8e93;
}

.bid-timer-compact {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--navy);
}

.bid-timer-compact.is-urgent {
  color: var(--orange);
}

.bid-timer-compact.is-ended {
  font-weight: 700;
  color: #8e8e93;
}

.bid-pick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.bid-pick-main {
  min-width: 0;
  flex: 1;
}

.bid-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #d0d5dd;
  background: #fff;
  color: transparent;
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.bid-row--best {
  background: #e8f8ee;
  margin: 6px -10px 0;
  padding: 10px;
  border-radius: 12px;
  border-top: 0;
}

.bid-row--best .bid-check {
  border-color: #12b76a;
  background: #12b76a;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.28);
}

.bid-row--chosen:not(.bid-row--best) .bid-check {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.bid-best-tag,
.bid-chosen-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.bid-best-tag {
  color: #067647;
  background: #b6f0cb;
}

.bid-chosen-tag {
  color: var(--navy);
  background: #dbe7f4;
}

.bid-tie-note {
  margin: 8px 0 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
}

.trade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.trade-actions:empty {
  display: none;
}

.print-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
  overflow: auto;
}

.print-overlay[hidden] {
  display: none !important;
}

.print-overlay__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: #f4f7fb;
  border-bottom: 1px solid var(--line);
}

.print-overlay__sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  color: var(--navy);
}

.psheet-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.psheet-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.psheet-brand span {
  color: var(--orange);
}

.psheet-meta {
  text-align: right;
}

.psheet-meta h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.p-muted {
  color: #5b6b7c;
  font-size: 12px;
}

.psheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

.p-party {
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  padding: 12px 14px;
}

.p-party h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6b7c;
}

.p-party p {
  margin: 0 0 4px;
}

.psheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.psheet-table th,
.psheet-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #d7e0ea;
  text-align: left;
  vertical-align: top;
}

.psheet-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b6b7c;
}

.psheet-table td:nth-child(1),
.psheet-table th:nth-child(1) {
  width: 36px;
}

.psheet-table td:nth-child(3),
.psheet-table td:nth-child(4),
.psheet-table td:nth-child(5),
.psheet-table th:nth-child(3),
.psheet-table th:nth-child(4),
.psheet-table th:nth-child(5) {
  text-align: right;
  white-space: nowrap;
}

.psheet-table tfoot td {
  border-bottom: 0;
  font-weight: 800;
  font-size: 16px;
  padding-top: 14px;
}

.psheet-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #f4f7fb;
  border-radius: 12px;
}

.psheet-signs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 36px;
}

.psheet-signs p {
  margin: 0 0 28px;
  color: #5b6b7c;
}

.psheet-signs b {
  display: block;
  margin-top: 6px;
  border-top: 1px solid var(--navy);
  padding-top: 6px;
  font-weight: 600;
}

.psheet-foot {
  margin-top: 28px;
  color: #5b6b7c;
  font-size: 11px;
}

@media (max-width: 700px) {
  .psheet-grid,
  .psheet-signs {
    grid-template-columns: 1fr;
  }

  .psheet-meta {
    text-align: left;
  }
}

@media print {
  @page { margin: 12mm; size: A4; }

  html.is-printing .header,
  html.is-printing .footer,
  html.is-printing main,
  html.is-printing .page-bg,
  html.is-printing .print-overlay__bar,
  html.is-printing .test-env-banner {
    display: none !important;
  }

  html.is-printing .print-overlay {
    position: static;
    inset: auto;
    overflow: visible;
    background: #fff;
  }

  html.is-printing .print-overlay__sheet {
    max-width: none;
    padding: 0;
  }
}

.store-place {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-ctrl button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  background: #e8eef6;
}

.qty-ctrl .qty-plus,
.circ-plus {
  background: var(--orange);
  color: #fff;
}

.qty-ctrl__input {
  width: 4.6em;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
  min-width: 0;
  color: var(--navy);
  background: #fff;
}

.qty-ctrl__input:focus {
  outline: 2px solid rgba(10, 46, 90, 0.18);
  border-color: var(--navy);
}

.qty-ctrl__unit {
  font-size: 13px;
  margin: 0 2px 0 0;
  white-space: nowrap;
}

.circ-plus {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(245, 130, 31, 0.28);
}

.trade-section-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
}

.chip {
  display: inline-block;
  margin: 0 6px 6px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}

.chip.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.spec-group {
  padding: 0 16px 16px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: visible;
}

.spec-group.is-invalid {
  border-color: #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.10);
}

.spec-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -16px 16px;
  padding: 16px 16px 16px 0;
  background: linear-gradient(180deg, #fff7ef 0%, #ffefdf 100%);
  border-bottom: 1px solid #ffd7b0;
  overflow: visible;
  position: relative;
  z-index: 4;
  border-radius: 17px 17px 0 0;
}

.spec-nomen {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.spec-nomen__mark {
  width: 8px;
  flex-shrink: 0;
  background: var(--orange);
  border-radius: 0 8px 8px 0;
}

.spec-nomen__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.spec-nomen__kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.2;
}

.spec-nomen__kicker .spec-req {
  margin-left: 4px;
}

.spec-nomen__select {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 40px 0 14px;
  border: 2px solid var(--orange);
  border-radius: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 6.2 8 10l3.8-3.8' stroke='%230a2e5a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  cursor: text;
  text-align: left;
}

input.spec-nomen__select::placeholder {
  color: var(--muted);
  font-weight: 700;
}

button.spec-nomen__select {
  display: flex;
  align-items: center;
}

button.spec-nomen__select span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-nomen__select:focus {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(245, 130, 31, 0.22);
}

.spec-nomen__select:not(.is-on) {
  color: var(--muted);
  font-weight: 700;
  font-size: 16px;
  border-style: dashed;
}

.spec-nomen__select.field-invalid {
  background-color: #ffe5e5;
  border-color: #d64545;
}

.spec-group.is-picked .spec-group__head {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 70%, #1e5088 100%);
  border-bottom-color: transparent;
}

.spec-group.is-picked .spec-nomen__kicker {
  color: rgba(255, 255, 255, 0.72);
}

.spec-group.is-picked .spec-nomen__kicker .spec-req {
  color: #ffb36b;
}

.spec-group.is-picked .spec-nomen__select {
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.spec-cancel--nomen {
  align-self: center;
}

.spec-group.is-picked .spec-cancel--nomen {
  background: rgba(255, 255, 255, 0.14);
  color: #ffd0d0;
}

.spec-group.is-picked .spec-cancel--nomen:hover {
  background: rgba(255, 255, 255, 0.24);
}

.spec-group__hint {
  margin: 10px 0 12px;
}

.spec-group .spec-wait {
  margin-top: 0;
}

.spec-group .spec-block {
  background: var(--mist);
}

.spec-group .spec-block:first-of-type {
  margin-top: 0;
}

.spec-group [data-add-name] {
  margin-top: 4px;
}

@media (max-width: 720px) {
  .spec-group__head {
    flex-wrap: wrap;
    padding-right: 12px;
  }

  .spec-nomen {
    width: 100%;
  }

  .spec-cancel--nomen {
    margin-left: auto;
  }
}

.publish-group__cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #9a4a08;
  background: #fff1e3;
  border-radius: 8px;
  padding: 3px 8px;
  margin: 12px 0 8px;
}

.publish-group:first-child .publish-group__cat {
  margin-top: 0;
}

.spec-block {
  padding: 16px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.spec-block:first-of-type {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 16px;
}

.spec-block.invalid {
  margin: 0 0 12px;
  padding: 16px;
  border-top: 1.5px solid #d64545;
  border-radius: 16px;
  background: #fff5f5;
  border: 1.5px solid #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.10);
}

.spec-need {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffe5e5;
  color: #9b1c1c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.publish-err {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffe5e5;
  border: 1px solid #ffb4b0;
  color: #9b1c1c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.line-brand.field-invalid,
.line-note.field-invalid {
  background: #ffe5e5 !important;
  box-shadow: inset 0 0 0 1.5px #d64545;
}

.spec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.spec-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.spec-form {
  max-width: 860px;
}

.spec-form .line-brand,
.spec-form .line-note,
.spec-form .name-pick__btn,
.spec-form .qty-ctrl__input,
.spec-form .compose-unit {
  background: #fff;
  border: 1.5px solid var(--line);
}

.spec-form .line-brand:focus,
.spec-form .line-note:focus,
.spec-form .name-pick__btn:focus,
.spec-form .name-pick__q:focus,
.spec-form .qty-ctrl__input:focus,
.spec-form .compose-unit:focus {
  border-color: var(--navy);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(10, 46, 90, 0.12);
}

.spec-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px 20px;
  align-items: start;
}

.spec-layout__main,
.spec-layout__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.spec-layout .spec-field {
  margin-top: 0;
}

.spec-layout__side .spec-chip-row {
  margin-top: 0;
}

.spec-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-top: 12px;
}

.spec-grid .spec-field {
  margin-top: 0;
}

.spec-field--full {
  grid-column: 1 / -1;
}

.spec-field .spec-label {
  margin: 0;
}

.spec-field .line-brand,
.spec-field .line-note,
.spec-field .name-pick__btn {
  margin-top: 0;
}

.name-pick {
  position: relative;
  z-index: 2;
}

.name-pick.is-open {
  z-index: 12;
}

.spec-cat-pick.is-open {
  z-index: 16;
}

.name-pick__opt.is-off,
.name-pick__opt:disabled {
  opacity: 0.45;
  cursor: default;
  color: var(--muted);
}

.name-pick__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  text-align: left;
  cursor: text;
  color: var(--navy);
  font-weight: 600;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 6.2 8 10l3.8-3.8' stroke='%230a2e5a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.name-pick__btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-pick__btn:not(.is-on) {
  color: #8a94a6;
}

.name-pick__btn::placeholder {
  color: #8a94a6;
  font-weight: 600;
}

.name-pick__drop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(10, 46, 90, 0.16);
  overflow: hidden;
}

.name-pick__q {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  padding: 10px 12px;
  font: inherit;
  color: var(--navy);
}

.name-pick__list {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}

.name-pick__opt {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.name-pick__opt[hidden],
.name-pick__empty[hidden] {
  display: none !important;
}

.name-pick__opt:hover {
  background: #eef3fa;
}

.name-pick__opt.is-on {
  background: var(--navy);
  color: #fff;
}

.name-pick__empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.spec-qty {
  height: 44px;
}

.spec-qty button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

.spec-qty .qty-ctrl__input {
  height: 44px;
  width: 88px;
}

.spec-qty .compose-unit {
  height: 44px;
  min-width: 72px;
}

.spec-chip-row {
  margin-top: 12px;
}

.spec-chip-row .spec-label {
  margin-top: 0;
  margin-bottom: 8px;
}

.spec-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-chip-wrap .chip {
  margin: 0;
}

.spec-wait {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mist);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.spec-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.spec-form-actions .btn--primary {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 800;
}

.spec-extra {
  margin-top: 12px;
}

.spec-list {
  display: grid;
  gap: 0;
}

@media (max-width: 720px) {
  .spec-form,
  .order-note-card {
    max-width: none;
  }

  .spec-layout {
    grid-template-columns: 1fr;
  }

  .spec-qty {
    flex-wrap: wrap;
    height: auto;
  }
}

.spec-cat {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4ea;
  color: var(--orange);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
}

.spec-form-cat {
  margin: 8px 0 6px;
  font-size: 14px;
}

.spec-form-cat strong {
  color: var(--navy);
}

.spec-cancel {
  flex-shrink: 0;
  border: 0;
  background: var(--mist);
  color: #d64545;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}

.spec-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin: 8px 0 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec-req {
  color: var(--orange);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 800;
}

.spec-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef3fa;
  color: var(--navy);
  margin: 0 4px 4px 0;
}

.spec-tags {
  margin-top: 8px;
}

.line-note,
.line-brand {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
}

select.line-brand {
  appearance: auto;
}

.line-note {
  min-height: 36px;
  resize: vertical;
}

.spec-warn {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4e8;
  border: 1px solid #ffd7b0;
  color: #8a4b12;
  font-size: 13px;
  line-height: 1.45;
}

.spec-hint {
  font-size: 12px;
  color: var(--orange);
  margin: 6px 0 4px;
  line-height: 1.4;
  font-weight: 700;
}

.spec-line-note {
  margin-top: 6px;
  font-style: italic;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.cat-chips button,
.cat-chips .tag {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  font-family: inherit;
}

.cat-chips button {
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.cat-chips .tag {
  background: #fff4ea;
  color: var(--orange);
  cursor: default;
}

.cat-chips .tag.tag--navy {
  background: #e8eef6;
  color: var(--navy);
}

.cat-chips button.is-on {
  background: var(--navy);
  color: #fff;
}

.bid-line {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.bid-line input {
  flex: 1;
  min-width: 140px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font: inherit;
}

.bid-line-sum {
  min-width: 7.2em;
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

.bid-sum {
  text-align: right;
  flex-shrink: 0;
}

.order-totals-row {
  border: 0;
  padding: 0;
}

.order-totals-sum {
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

article.trade-card.order-totals {
  background: var(--mist);
  border-color: #c9d6e8;
  box-shadow: 4px 0 0 var(--navy-mid) inset, 0 8px 20px rgba(10, 46, 90, 0.04);
  gap: 8px;
  padding: 16px 18px 16px 20px;
}

.order-totals__label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-mid);
  line-height: 1.3;
}

article.trade-card.order-totals > .trade-muted {
  margin: 0;
  font-size: 12px;
}

.bid-sent {
  margin: 10px 0 0;
  color: #1f6b3a;
  font-weight: 800;
}

.btn--sent {
  background: #34c759;
  pointer-events: none;
}

.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.clar-block {
  padding: 14px;
  margin-bottom: 12px;
}

.clar-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.clar-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.clar-q {
  font-size: 15px;
  margin: 6px 0;
  line-height: 1.45;
  color: var(--navy);
  font-weight: 600;
}

.clar-a {
  margin-top: 8px;
  padding: 10px 12px;
  background: #e8f7ef;
  border-radius: 12px;
  font-size: 14px;
  color: #145c3a;
  line-height: 1.45;
}

.clar-pending {
  font-size: 13px;
  color: var(--orange);
  margin-top: 6px;
  font-weight: 700;
}

.clar-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.clar-form--ask {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(10, 46, 90, 0.08);
}

.clar-input,
.clar-select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--navy);
}

.clar-input {
  min-height: 72px;
  resize: vertical;
}

.clar-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d64545;
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}

.tariff-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin: 4px 0 10px;
}

.tariff-price span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.tariff-list {
  margin: 4px 0 8px;
  padding-left: 18px;
  color: var(--navy);
  line-height: 1.55;
  display: grid;
  gap: 6px;
  align-content: start;
}

.pro-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0a2e5a, #f5821f);
  color: #fff;
}

.renew-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 6px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.renew-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.publish-ok {
  margin: 0 0 12px;
  color: #1f6b3a;
  font-weight: 700;
}

.one-c-url {
  display: block;
  font-size: 12px;
  word-break: break-all;
  color: var(--navy);
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.team-row:first-of-type {
  border-top: 0;
}

.team-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(10, 46, 90, 0.08);
  display: grid;
  gap: 10px;
}

.team-form .clar-input {
  margin-top: 0;
}

.team-form .btn,
.clar-form .btn {
  justify-self: start;
  margin-top: 2px;
}

#cabinet-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#cabinet-workspace > .btn {
  align-self: flex-start;
}

.publish-review {
  gap: 12px;
  padding: 16px 18px;
}

.publish-line {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.publish-group .publish-line:first-of-type {
  padding-top: 2px;
  border-top: 0;
}

.publish-line__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.publish-line__head strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
}

.publish-line__head span {
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.publish-line__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.publish-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: var(--mist);
  border-radius: 8px;
  padding: 4px 8px;
}

.publish-chip__k {
  color: var(--muted);
  font-weight: 700;
  font-style: normal;
}

.publish-note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

#cabinet-workspace > .trade-card,
#cabinet-workspace article.trade-card {
  margin-bottom: 0;
}

#cabinet-workspace > .trade-search,
#cabinet-workspace > .cat-chips,
#cabinet-workspace > .catalog-pager,
#cabinet-workspace > .trade-muted,
#cabinet-workspace > .duration-heading,
#cabinet-workspace > .archive-filters {
  margin: 0;
}

.cabinet-app .device-card {
  margin-top: 32px;
}

.cabinet-auth .lead {
  margin-top: 14px;
  margin-bottom: 8px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 8px 0 16px;
}

.admin-kinds {
  flex: 1 1 100%;
  margin: 0;
}

.admin-search {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  flex: 1;
  min-width: 220px;
}

.admin-search input {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
}

.admin-actions {
  margin-top: 12px;
}

.admin-page .trade-card label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
}

.admin-page .trade-card textarea {
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  resize: vertical;
}

.admin-page .trade-card .btn--primary {
  margin-top: 10px;
  width: max-content;
}

.admin-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

#admin-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-page .dash-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-tabs,
.admin-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.admin-tabs button,
.admin-kinds button {
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
}

.admin-tabs button.is-on,
.admin-kinds button.is-on {
  border-color: var(--orange);
  background: #fff4ea;
  color: var(--orange);
}

.admin-kinds {
  margin: 0;
}

.admin-table-wrap {
  overflow-x: auto;
  background: var(--mist);
  border-radius: 24px;
  padding: 12px 12px 4px;
  margin-bottom: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 960px;
}

.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 12px 8px;
  white-space: nowrap;
}

.admin-table td {
  background: #fff;
  padding: 14px 12px;
  font-size: 14px;
  vertical-align: top;
}

.admin-table td:first-child {
  border-radius: 14px 0 0 14px;
  white-space: nowrap;
  font-weight: 700;
  color: var(--navy);
}

.admin-table td:nth-child(6),
.admin-table td:nth-child(7),
.admin-table td:nth-child(8) {
  white-space: nowrap;
}

.admin-table tbody tr[data-acc] {
  cursor: pointer;
}

.admin-table tbody tr[data-acc]:hover td {
  box-shadow: inset 0 0 0 1.5px #f5d3b3;
}

.admin-table tbody tr.is-open td {
  box-shadow: inset 0 0 0 1.5px var(--orange);
  background: #fff4ea;
}

.admin-table a {
  color: var(--navy);
  font-weight: 600;
}

.admin-table__detail td {
  background: #fff;
  border-radius: 14px !important;
  padding: 4px 16px 16px;
}

.admin-row-extra {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-count {
  margin: 0 0 8px;
}

@media (max-width: 960px) {
  .admin-page .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.catalog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
}

.catalog-pager button {
  min-height: 40px;
  min-width: 40px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.catalog-pager button.is-on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.catalog-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

.catalog-pager-gap {
  color: var(--muted, #8E8E93);
  padding: 0 2px;
}

.catalog-pager-count {
  margin-left: 4px;
  font-size: 13px;
}

.catalog-extra {
  margin-left: 8px;
  font-size: 12px;
}

.trade-card--row .qty-ctrl {
  flex-shrink: 0;
}

.catalog-compose-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.catalog-compose-row .qty-ctrl__input {
  width: 88px;
}

.compose-unit {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
}

.compose-added {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.catalog-missing {
  margin-top: 8px;
}

.catalog-missing-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.catalog-missing-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font: inherit;
}

.catalog-missing-ok {
  margin: 8px 0 0;
  color: #1f6b3a;
  font-weight: 700;
}

html.is-native-app .web-only,
html.is-native-app .test-env-banner {
  display: none !important;
}

html.is-native-app,
html.is-native-app body.cabinet-page {
  background: #fff;
}

html.is-native-app .page-bg,
html.is-native-app .header,
html.is-native-app .footer,
html.is-native-app .sync-banner,
html.is-native-app .cabinet-auth__grid > div:first-child {
  display: none !important;
}

html.is-native-app .cabinet-auth {
  padding: 20px 0 32px;
}

html.is-native-app .cabinet-auth__grid {
  display: block;
  gap: 0;
}

html.is-native-app .cabinet-app {
  padding-top: 8px;
}

html.is-native-app .cabinet-head h1 {
  font-size: 20px;
}

html.is-native-app .sync-pill {
  display: none;
}

@media (max-width: 1100px) {
  .cabinet-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .cabinet-head__name {
    flex-wrap: wrap;
    align-items: center;
  }

  .cabinet-head__name .sync-pill {
    margin-left: auto;
  }

  .cabinet-head__who {
    min-width: 0;
  }

  .cabinet-head h1 {
    max-width: none;
  }

  .cabinet-head__meta {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .cabinet-nav-main {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
    width: 100%;
  }

  .cabinet-nav-main__item {
    flex-direction: column;
    justify-content: flex-start;
    white-space: normal;
    text-align: center;
    padding: 8px 4px 6px;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
    min-width: 0;
    width: 100%;
    border-radius: 12px;
    line-height: 1.15;
  }

  .cabinet-nav-main__item:hover {
    transform: none;
  }

  .cabinet-nav-main__icon,
  .cabinet-nav-main__icon svg {
    width: 20px;
    height: 20px;
  }

  .cabinet-nav-main__icon {
    flex: 0 0 20px;
  }

  .cabinet-nav-main__label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
  }

  .cabinet-head__meta #logout-btn {
    margin-left: auto;
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
  }
}

html.is-native-app .cabinet-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

html.is-native-app .cabinet-head__who {
  min-width: 0;
}

html.is-native-app .cabinet-head h1 {
  max-width: none;
}

html.is-native-app .cabinet-head__meta {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
}

html.is-native-app .cabinet-nav-main {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
  width: 100%;
}

html.is-native-app .cabinet-nav-main__item {
  flex-direction: column;
  justify-content: flex-start;
  white-space: normal;
  text-align: center;
  padding: 8px 4px 6px;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  min-width: 0;
  width: 100%;
  border-radius: 12px;
  line-height: 1.15;
}

html.is-native-app .cabinet-nav-main__item:hover {
  transform: none;
}

html.is-native-app .cabinet-nav-main__icon,
html.is-native-app .cabinet-nav-main__icon svg {
  width: 20px;
  height: 20px;
}

html.is-native-app .cabinet-nav-main__icon {
  flex: 0 0 20px;
}

html.is-native-app .cabinet-nav-main__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
}

html.is-native-app .cabinet-head__meta #logout-btn {
  margin-left: auto;
  padding: 8px 12px;
  font-size: 14px;
  white-space: nowrap;
}

html.is-native-app .ship-lane {
  padding: 8px 10px 10px;
  border-radius: 14px;
}

html.is-native-app .ship-now {
  font-size: 11px;
}

html.is-native-app .ship-track__label {
  font-size: 9px;
}

html.is-native-app .archive-filters {
  padding: 12px;
  border-radius: 14px;
}

html.is-native-app .delivered-date__day {
  font-size: 22px;
}
