@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+2074,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-tint: #eef4ff;
  --line: #e4eaf2;
  --line-strong: #d4deea;
  --text: #0e1b2e;
  --text-soft: #33445b;
  --muted: #647387;
  --nav: #0c1626;
  --nav-2: #152941;
  --nav-line: rgba(255,255,255,.10);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbe7ff;
  --accent: #0ea371;
  --warning: #b7791f;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15,27,46,.06),0 1px 3px rgba(15,27,46,.05);
  --shadow: 0 10px 30px -12px rgba(15,27,46,.18),0 2px 6px rgba(15,27,46,.05);
  --shadow-lg: 0 24px 60px -20px rgba(15,27,46,.30);
  --ring: 0 0 0 3px rgba(37,99,235,.18);
  --font: "Inter","Segoe UI",system-ui,-apple-system,Arial,sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

html {
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}


.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px,4vw,30px);
  background: linear-gradient(120deg,var(--nav) 0%,var(--nav-2) 100%);
  color: #fff;
  border-bottom: 1px solid var(--nav-line);
  box-shadow: 0 10px 30px -18px rgba(7,15,28,.9);
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.top-brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: contain;
  background: #0a1320;
  padding: 5px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.top-brand .brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-brand strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
}

.top-brand span {
  margin-top: 1px;
  color: #9fb2c8;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--nav-line);
  color: #fff;
}

.nav-toggle:hover {
  background: rgba(255,255,255,.16);
}

.nav-toggle .icon {
  width: 22px;
  height: 22px;
}

.top-tools {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav {
  order: 3;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-logout-form {
  display: contents;
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  color: #cdd9e8;
  background: transparent;
  text-decoration: none;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .1px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s ease,color .16s ease,border-color .16s ease;
}

.nav-link .icon {
  width: 18px;
  height: 18px;
  opacity: .85;
}

.nav-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: none;
}

.nav-link.active {
  background: rgba(255,255,255,.13);
  color: #fff;
  border-color: rgba(255,255,255,.16);
}

.nav-link.active .icon {
  opacity: 1;
}

.nav-link.nav-logout {
  color: #f3b4b4;
}

.nav-link.nav-logout:hover {
  background: rgba(220,38,38,.22);
  color: #fff;
}


.notice-bell-wrap {
  position: relative;
  display: inline-flex;
}

.notice-bell {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--nav-line);
  color: #fff;
  cursor: pointer;
  transition: background .16s ease,border-color .16s ease;
}

.notice-bell:hover,
.notice-bell.is-open {
  background: rgba(255,255,255,.18);
}

.notice-bell .icon {
  width: 21px;
  height: 21px;
  opacity: .9;
}

.notice-bell.has-unread {
  border-color: rgba(239,68,68,.55);
}

.notice-bell.has-unread .icon {
  opacity: 1;
  transform-origin: 50% 15%;
  animation: bell-ring 2.4s ease-in-out 2 .5s;
}

.notice-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--nav),0 0 0 6px rgba(239,68,68,.22);
}

.notice-bell.has-unread .notice-badge {
  display: inline-flex;
}

@keyframes bell-ring {
  0%,60%,100% {
    transform: rotate(0);
  }
  5%,25% {
    transform: rotate(13deg);
  }
  15%,35% {
    transform: rotate(-13deg);
  }
  45% {
    transform: rotate(6deg);
  }
  52% {
    transform: rotate(-4deg);
  }
}


.main {
  width: min(1180px,calc(100% - clamp(28px,7vw,72px)));
  margin: 0 auto;
  padding: 28px 0 56px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.page-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

h1 {
  margin: 0;
  font-size: clamp(24px,3vw,31px);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.12;
  color: #0c1a2c;
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

p {
  margin: 8px 0;
}


.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}

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

.toolbar {
  margin-bottom: 18px;
}

.push-right {
  margin-left: auto;
}

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

.actions {
  margin-top: 16px;
}

.actions form,
.icon-actions form {
  margin: 0;
  display: inline-flex;
}


.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font: 600 14px/1.1 var(--font);
  white-space: nowrap;
  max-width: 100%;
  transition: background .16s ease,border-color .16s ease,transform .12s ease,box-shadow .16s ease,color .16s ease;
}

.btn span,
button span {
  min-width: 0;
}

.btn:hover,
button:hover {
  background: var(--surface-soft);
  border-color: #c2cedd;
  transform: translateY(-1px);
}

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

.btn:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn.primary,
button.primary {
  background: linear-gradient(180deg,#2f6ef0,var(--primary));
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(37,99,235,.6);
}

.btn.primary:hover,
button.primary:hover {
  background: linear-gradient(180deg,#2563eb,var(--primary-dark));
  border-color: var(--primary-dark);
}

.btn.tinted,
button.tinted {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary-dark);
}

.btn.tinted:hover,
button.tinted:hover {
  background: #cddffd;
}

.btn.ghost,
button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-soft);
}

.btn.ghost:hover,
button.ghost:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.btn.danger,
button.danger {
  background: var(--danger);
  border-color: var(--danger-dark);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(220,38,38,.6);
}

.btn.danger:hover,
button.danger:hover {
  background: var(--danger-dark);
}

.btn.soft-danger,
button.soft-danger {
  background: #fdeaea;
  border-color: transparent;
  color: var(--danger-dark);
}

.btn.soft-danger:hover,
button.soft-danger:hover {
  background: #fadcdc;
}

.btn.small,
button.small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 13px;
}

.icon-only {
  width: 40px;
  padding: 0;
}

.icon-only.small {
  width: 34px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.flash {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  background: #e7f7ee;
  color: #11603a;
  border: 1px solid #bde6cd;
  font-weight: 600;
}

.flash.error {
  background: #fdecec;
  color: #9b1c1c;
  border-color: #f4c6c6;
}

.toast-host {
  position: fixed;
  top: 84px;
  right: 18px;
  z-index: 1000;
  display: grid;
  gap: 10px;
  width: min(390px,calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 13px 14px 13px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .24s ease both;
}

.toast.is-hiding {
  animation: toast-out .18s ease both;
}

.toast-mark {
  width: 10px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary);
}

.toast.success .toast-mark {
  background: var(--accent);
}

.toast.info .toast-mark {
  background: var(--primary);
}

.toast.error .toast-mark {
  background: var(--danger);
}

.toast-text {
  font-weight: 750;
  font-size: 14px;
  line-height: 1.35;
}

.toast.success .toast-text {
  color: #0f6a41;
}

.toast.info .toast-text {
  color: var(--primary-dark);
}

.toast.error .toast-text {
  color: #9b1c1c;
}

.toast-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
}

.toast-close:hover {
  color: var(--text);
  background: #e9eef6;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(.98);
  }
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10,20,35,.48);
  backdrop-filter: blur(5px);
  animation: confirm-backdrop-in .16s ease both;
}

.confirm-backdrop.is-closing {
  animation: confirm-backdrop-out .14s ease both;
}

.confirm-dialog {
  width: min(430px,100%);
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 70px -24px rgba(8,18,32,.55);
  animation: confirm-dialog-in .18s ease both;
}

.confirm-backdrop.is-closing .confirm-dialog {
  animation: confirm-dialog-out .14s ease both;
}

.confirm-head {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.confirm-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #fde2e2;
  color: var(--danger-dark);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
}

.confirm-dialog h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: 0;
}

.confirm-dialog p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.partner-notice-pop {
  position: absolute;
  top: calc(100% + 13px);
  right: 0;
  z-index: 1250;
  width: min(370px,calc(100vw - 28px));
}

.partner-notice-pop::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 15px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 3px 0 0 0;
  transform: rotate(45deg);
}

.partner-notice-dialog {
  position: relative;
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: 0 26px 60px -22px rgba(8,18,32,.55);
  animation: confirm-dialog-in .16s ease both;
}

.idle-countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 2px;
  color: var(--text);
}

.idle-countdown strong {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.idle-countdown span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.partner-notice-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-notice-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff3d8;
  color: #a45b00;
  font-size: 20px;
  font-weight: 950;
}

.partner-notice-head h2 {
  margin: 0;
  font-size: 16px;
}

.partner-notice-body {
  max-height: 46vh;
  overflow: auto;
  padding: 13px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 650;
  line-height: 1.55;
  white-space: normal;
}

.partner-notice-actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes confirm-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes confirm-backdrop-out {
  to {
    opacity: 0;
  }
}

@keyframes confirm-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confirm-dialog-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(.98);
  }
}


.form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13.5px;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 13.5px;
}

.field-control {
  position: relative;
  display: block;
  width: 100%;
}

.field-control>.icon {
  position: absolute;
  left: 14px;
  top: 13px;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transition: color .16s ease;
}

.field-control:focus-within>.icon {
  color: var(--primary);
}

.form .field-control input,
.form .field-control select,
.form .field-control textarea,
.login-card .field-control input,
.profile-inline-form .field-control input,
.search .field-control input {
  padding-left: 43px;
}

.field-control.textarea-control>.icon {
  top: 14px;
}

.form input,
.form select,
.form textarea,
.search input,
.login-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: #fff;
  color: var(--text);
  font: 500 15px/1.3 var(--font);
  outline: none;
  transition: border-color .16s ease,box-shadow .16s ease;
}

.form input::placeholder,
.search input::placeholder,
.login-card input::placeholder {
  color: #9aa7b8;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.search input:focus,
.login-card input:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.form textarea {
  min-height: 104px;
  resize: vertical;
}

.form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #647387 50%),
    linear-gradient(135deg, #647387 50%, transparent 50%);
  background-repeat: no-repeat;
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-size:
    5px 5px,
    5px 5px;
  padding-right: 38px;
}

.form .check-field {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.form .check-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.form .check-field span {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.form .check-field strong {
  font-size: 14px;
}

.form .check-field small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.combo {
  position: relative;
  display: block;
  width: 100%;
}

.combo::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.combo input {
  padding-right: 40px;
}

.field-control .combo input {
  padding-left: 43px;
}

.combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 80;
  display: grid;
  gap: 4px;
  max-height: 236px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.combo-option {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  white-space: normal;
  text-align: left;
  font: 650 13.5px/1.25 var(--font);
}

.combo-option:hover,
.combo-option.is-active {
  background: var(--surface-tint);
  color: var(--primary-dark);
  transform: none;
}

.econt-suggest-field {
  position: relative;
}

.econt-suggest-menu {
  z-index: 90;
}

.econt-suggest-option {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-height: 42px;
}

.econt-suggest-title {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.econt-suggest-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.econt-suggest-option:hover .econt-suggest-meta,
.econt-suggest-option.is-active .econt-suggest-meta {
  color: var(--primary-dark);
}

.combo-empty {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

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

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

.col-2 {
  grid-column: span 2;
}

.search {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  margin-bottom: 20px;
}

.search input {
  min-height: 46px;
}

.search .field-control>.icon {
  top: 14px;
}

.invoice-filter {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px 14px;
  margin-bottom: 20px;
}

.invoice-filter .wide {
  grid-column: 1/-1;
}

.invoice-filter label {
  margin: 0;
}

.invoice-filter-actions {
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.invoice-filter-toggle {
  display: none;
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}

.mobile-only {
  display: none!important;
}

.filter-count {
  color: var(--muted);
  font-weight: 700;
  margin-left: 4px;
}


.form-intro {
  margin: -2px 0 4px;
}

.form-intro h2 {
  margin: 0 0 3px;
}

.form-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}


.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  border-radius: 999px;
  padding: 5px 11px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1;
}

.badge .icon {
  width: 14px;
  height: 14px;
}

.badge.neutral {
  background: #eef2f7;
  color: #3a4a5e;
}

.badge.success {
  background: #dcf5e8;
  color: #0f6a41;
}

.badge.info {
  background: #dde9ff;
  color: #1d4ed8;
}

.badge.warning {
  background: #fdf0d3;
  color: #90631a;
}

.badge.danger {
  background: #fde2e2;
  color: #b91c1c;
}

.badge.note {
  background: #fdeed1;
  color: #8a5b12;
}

.badge.master {
  background: linear-gradient(180deg,#fff2d0,#ffe7ad);
  color: #8a5b12;
  box-shadow: inset 0 0 0 1px rgba(180,130,30,.25);
}


.section-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 30px 0 14px;
}

.section-head h2 {
  margin: 0;
}

.section-head .section-sub {
  margin-left: 2px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.section-count {
  min-width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
}


.cards-list {
  display: grid;
  gap: 14px;
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(330px,100%),1fr));
  gap: 16px;
}

.offer-list {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(360px,100%),1fr));
  gap: 16px;
}

.object-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: border-color .16s ease,box-shadow .16s ease,transform .12s ease;
}

.object-card:hover {
  border-color: #cfdcec;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.object-card-head,
.offer-card-main,
.room-card-head,
.offer-summary-main,
.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.offer-card h2 {
  margin: 2px 0 9px;
  font-size: 19px;
  font-weight: 700;
}

.offer-card h2 a {
  color: #123a78;
  text-decoration: none;
}

.offer-card h2 a:hover {
  color: var(--primary);
}

.meta-row,
.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-soft);
  font-size: 14px;
}

.oc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.oc-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.oc-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(140deg,#e7f0ff,#d8e6ff);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
}

.oc-mark .icon {
  width: 23px;
  height: 23px;
}

.object-card h2 {
  margin: 0 0 13px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.object-card h2 a {
  color: #102a4d;
  text-decoration: none;
}

.object-card h2 a:hover {
  color: var(--primary);
}

.object-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text-soft);
  font-size: 13.5px;
}

.object-meta span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.object-meta .icon {
  color: var(--muted);
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.oc-rooms {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.oc-rooms b {
  color: var(--text);
  font-weight: 750;
}

.oc-rooms .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.object-card .actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}


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

.summary-item {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.summary-item .icon {
  color: var(--primary);
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.summary-item strong {
  font-size: 16px;
  word-break: break-word;
}

.summary-item.wide {
  grid-column: span 2;
}

.notes-box {
  display: flex;
  gap: 11px;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: #fffaf0;
  border: 1px solid #f1dca8;
  color: #5a4518;
}

.notes-box.compact {
  margin-top: 14px;
}

.notes-box .icon {
  color: #b07d18;
  flex: 0 0 auto;
}


.room-form {
  position: relative;
  z-index: 10;
}

.room-form:focus-within {
  z-index: 90;
}

.room-form.is-editing {
  border-color: rgba(37,99,235,.4);
  box-shadow: var(--ring),var(--shadow-sm);
}

.room-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.room-card-head h3 {
  margin: 0 0 8px;
}

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

.room-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 10px;
  margin-top: 16px;
}

.room-facts div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  min-width: 0;
}

.room-facts span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.room-facts strong {
  display: block;
  word-break: break-word;
  font-weight: 650;
}

.muted-line {
  color: var(--text-soft);
}

.empty-state {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 34px 20px;
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.object-grid>.empty-state,
.offer-list>.empty-state,
.room-grid>.empty-state,
.user-grid>.empty-state {
  grid-column: 1/-1;
}


.offer-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: border-color .16s ease,box-shadow .16s ease,transform .12s ease;
}

.offer-card:hover {
  border-color: #cfdcec;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.offer-card .oc-top {
  align-items: flex-start;
}

.offer-card h2 {
  margin: 2px 0 12px;
  font-size: 18px;
}

.offer-card .object-meta {
  font-size: 13.5px;
}

.offer-card .note-flag {
  margin-top: 12px;
}

.offer-summary h2 {
  margin: 4px 0 10px;
  font-size: 23px;
}

.eyebrow {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.total-panel,
.offer-total {
  flex: 0 0 auto;
  min-width: 158px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg,#152941,#0c1626);
  color: #fff;
  text-align: right;
  box-shadow: 0 12px 26px -16px rgba(12,22,38,.9);
}

.total-panel span,
.offer-total span {
  display: block;
  color: #9fb2c8;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.total-panel strong,
.offer-total strong {
  display: block;
  margin-top: 3px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.offer-card .actions {
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.offer-paper {
  overflow: auto;
}

.offer-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
}

.offer-table th,
.offer-table td {
  border: 1px solid #d7deea;
  padding: 9px 10px;
  vertical-align: middle;
}

.offer-table th {
  background: #102136;
  color: #fff;
  text-align: center;
  font-weight: 700;
  border-color: #22344c;
}

.offer-table .text {
  text-align: left;
  white-space: normal;
}

.offer-table .center {
  text-align: center;
  white-space: nowrap;
}

.offer-table .num {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.offer-table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

.offer-table tfoot td {
  font-weight: 700;
  background: #f1f5fa;
  text-align: right;
}

.offer-table tfoot tr:last-child td {
  background: #e9eef6;
}

.offer-notes {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #f1dca8;
  border-radius: var(--radius-sm);
  background: #fffaf0;
  line-height: 1.55;
}


.inv-doc {
  background: #fff;
  padding: 28px 32px;
  max-width: 820px;
  margin: 0 auto;
  color: #1f2937;
  font-size: 12px;
}

.inv-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.inv-title {
  font-size: 22px;
  font-weight: 800;
  color: #1f2937;
  margin: 0;
  line-height: 1.1;
}

.inv-title small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #8b94a3;
  margin-top: 2px;
}

.inv-brand {
  font-size: 16px;
  font-weight: 800;
  color: #4a9f1a;
  letter-spacing: .4px;
  white-space: nowrap;
}

.inv-brand img {
  display: block;
  width: 245px;
  height: auto;
  max-width: 100%;
}

.inv-meta {
  display: flex;
  gap: 28px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #374151;
}

.inv-meta b {
  color: #8b94a3;
  font-weight: 600;
  margin-right: 6px;
}

.inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.inv-party {
  border: 1px solid #d6dde6;
  border-radius: 6px;
  overflow: hidden;
}

.inv-party h4 {
  margin: 0;
  padding: 6px 10px;
  background: #f0f3f7;
  font-size: 12px;
  color: #1f2937;
}

.inv-party .inv-name {
  padding: 8px 10px 2px;
  font-weight: 700;
  font-size: 12px;
  color: #1f2937;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inv-party dl {
  display: grid;
  grid-template-columns: 86px minmax(0,1fr);
  gap: 2px 8px;
  padding: 2px 10px 8px;
  margin: 0;
  align-items: start;
}

.inv-party dt {
  font-size: 10px;
  text-transform: uppercase;
  color: #8b94a3;
  font-weight: 600;
  align-self: start;
  padding-top: 1px;
  min-width: 0;
}

.inv-party dd {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.28;
  color: #1f2937;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 6px 0;
}

.inv-table th {
  background: #f0f3f7;
  color: #1f2937;
  font-weight: 700;
  padding: 5px 8px;
  text-align: left;
  white-space: nowrap;
  border: 1px solid #c7d0db;
}

.inv-table td {
  padding: 4px 8px;
  border: 1px solid #c7d0db;
  line-height: 1.25;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inv-table tbody tr:nth-child(even) {
  background: #f7fafc;
}

.inv-table .r {
  text-align: right;
  white-space: nowrap;
}

.inv-table .c {
  text-align: center;
  white-space: nowrap;
}

.inv-lines {
  font-size: 12px;
  color: #374151;
  margin: 3px 0;
}

.inv-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin: 12px 0;
  font-size: 12px;
}

.inv-totals .grand {
  font-weight: 800;
  border-top: 1px solid #d6dde6;
  padding-top: 5px;
  margin-top: 3px;
  font-size: 14px;
}

.inv-pay {
  font-size: 12px;
  margin: 12px 0;
}

.inv-foot-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-top: 22px;
}

.inv-foot-box {
  border: 1px solid #d6dde6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
}

.inv-foot-box .lbl {
  color: #8b94a3;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
}

.inv-foot-box .val {
  color: #1f2937;
  font-size: 12px;
  margin: 1px 0 6px;
}

.inv-foot-box .sig {
  border-top: 1px solid #d6dde6;
  margin-top: auto;
  padding-top: 5px;
  color: #8b94a3;
  font-size: 9px;
}

.inv-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}

.inv-pager .btn {
  min-width: 40px;
  justify-content: center;
}

.inv-pager .cur {
  padding: 8px 14px;
  font-weight: 700;
  color: #1f2937;
}

@page {
  margin: 0;
}

@media print {
  .top,
  .toolbar,
  .page-titlebar {
    display: none!important;
  }
  .inv-doc {
    padding: 14mm;
    max-width: none;
    box-shadow: none;
    border: 0;
  }
  .inv-doc,
  .inv-doc * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


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

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  background: var(--surface-soft);
  transition: border-color .16s ease,background .16s ease;
}

.file-row:hover {
  border-color: var(--primary);
  background: var(--surface-tint);
}

.file-row small {
  color: var(--muted);
  white-space: nowrap;
}


.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1100px 540px at 15% -10%,rgba(37,99,235,.30),transparent 60%),
    radial-gradient(900px 500px at 110% 110%,rgba(14,163,113,.22),transparent 55%),
    linear-gradient(135deg,#0a1422,#16293f);
}

.login-card {
  width: min(100%,420px);
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 34px 30px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
}

.login-wordmark {
  width: 210px;
  height: auto;
  max-height: 92px;
}

.login-card h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.login-card .form-sub {
  margin: -4px 0 6px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.login-card label {
  font-weight: 600;
  color: var(--text-soft);
  font-size: 13.5px;
  margin-bottom: -4px;
}

.login-card .login-field {
  display: grid;
  gap: 7px;
}

.login-card .btn {
  margin-top: 6px;
  min-height: 46px;
}

.login-card .check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 2px 0 0;
  font-weight: 500;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
}

.login-card .check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--primary);
  cursor: pointer;
}

.login-card .forgot-link {
  margin-top: 2px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.login-card .forgot-link:hover {
  text-decoration: underline;
}

.lock-card {
  align-items: center;
  text-align: center;
}

.lock-timer {
  width: 100%;
  padding: 18px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg,#0f1d31,#1f3b60);
  color: #fff;
  font-size: 44px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}

.lock-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}


.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg,#0c1626,#1b3253);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.profile-hero .hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-hero .hero-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  font-size: 22px;
  font-weight: 750;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.profile-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.profile-hero .hero-sub {
  margin-top: 3px;
  color: #9fb2c8;
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 6px;
}

.stat {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
}

.stat .stat-top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.stat .stat-top .icon {
  color: var(--primary);
}

.stat span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.stat strong {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1;
}


.bonus-stat-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
  margin-bottom: 6px;
}

.bonus-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.bonus-stat .stat-top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.bonus-stat .stat-top .icon {
  width: 20px;
  height: 20px;
}

.bonus-stat span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.bonus-stat strong {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bonus-stat.is-added .stat-top .icon,
.bonus-stat.is-added strong {
  color: var(--accent);
}

.bonus-stat.is-removed .stat-top .icon,
.bonus-stat.is-removed strong {
  color: var(--danger);
}

.bonus-stat.is-balance .stat-top .icon,
.bonus-stat.is-balance strong {
  color: var(--primary);
}

.bonus-ledger {
  padding: 0;
  overflow: hidden;
}

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

.bonus-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

.bonus-table th,
.bonus-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.bonus-table th {
  background: #102136;
  color: #fff;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bonus-table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

.bonus-table tbody tr:hover td {
  background: var(--surface-tint);
}

.bonus-table .bonus-amount {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bonus-table .bonus-amount.positive {
  color: var(--accent);
}

.bonus-table .bonus-amount.negative {
  color: var(--danger);
}

.bonus-table .bonus-note {
  min-width: 220px;
  color: var(--text-soft);
}


.table-card {
  padding: 0;
  overflow: hidden;
}

.responsive-table {
  overflow: auto;
}

.orders-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

.orders-table th,
.orders-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.orders-table th {
  background: #102136;
  color: #fff;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.orders-table tbody tr.order-row-main > td {
  border-top: 2px solid #94a3b8;
  padding-top: 16px;
}

.orders-table tbody tr.order-row-main:first-child > td {
  border-top: none;
}

.orders-table tbody tr.order-row-main:hover > td {
  background: var(--surface-tint);
}

.orders-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.orders-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.text-link {
  display: inline-flex;
  margin-left: 8px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

.danger-text {
  color: var(--danger)!important;
}

.order-items {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

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

.order-items-head h3 {
  margin: 0;
  font-size: 16px;
}

.order-item-row {
  display: grid;
  grid-template-columns: minmax(180px,1.4fr) 92px 88px 112px 100px 40px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.order-item-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-item-row input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.order-item-row input:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  outline: none;
}

.order-items-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 56px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--primary);
  background: #eef5ff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.order-items-trigger:hover,
.order-items-trigger:focus-visible {
  color: #fff;
  background: var(--primary);
  outline: none;
}

.order-items-trigger span {
  font-size: 11px;
  line-height: 1;
}

.order-items-source {
  display: none;
}

.order-items-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 27, 46, .48);
  animation: confirm-backdrop-in .16s ease both;
}

.order-items-backdrop.is-closing {
  animation: confirm-backdrop-out .14s ease both;
}

.order-items-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(216, 224, 236, .92);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 27, 46, .28);
}

.order-items-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
}

.order-items-modal-head h2 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.order-track-headings {
  min-width: 0;
}

.order-track-dest {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.order-items-modal-head .icon-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: #fff;
  font-size: 18px;
  font-weight: 850;
  cursor: pointer;
}

.order-items-modal-head .icon-close:hover,
.order-items-modal-head .icon-close:focus-visible {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
  outline: none;
}

.order-items-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

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

.order-items-modal-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-items-modal-row > .product-thumb:first-child + strong {
  min-width: 0;
}

.order-items-modal-row strong {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.order-items-modal-row span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.order-items-modal-row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-track-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-track-loading {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}

.order-track-timeline {
  display: grid;
  gap: 0;
  padding: 4px 6px;
}

.order-track-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding: 0 0 22px;
}

.order-track-step:last-child {
  padding-bottom: 2px;
}

.order-track-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px #fff;
}

.order-track-pin .icon {
  width: 15px;
  height: 15px;
  stroke: #fff;
  fill: none;
}

.order-track-step:not(:last-child) .order-track-pin::after {
  content: '';
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 4px);
  background: var(--line);
}

.order-track-step.is-current .order-track-pin {
  background: var(--primary);
}

.order-track-step-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.order-track-step-body strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.order-track-step-row time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.order-track-step.is-current .order-track-step-body strong {
  color: var(--primary);
}

.order-track-step.is-current .order-track-step-row time {
  color: var(--primary);
}

.order-track-step-body small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.order-products {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.order-products-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.order-products-head h3 {
  margin: 0;
  font-size: 17px;
}

.order-products-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.order-product-search {
  width: min(320px, 100%);
  display: grid;
  gap: 6px;
}

.order-product-search input {
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 11px;
  font: inherit;
}

.order-product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.order-product-tab {
  min-height: 38px;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 9px;
  border-color: transparent;
  background: #fff;
  color: var(--text-soft);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.order-product-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-product-tab strong {
  min-width: 24px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.order-product-tab:hover {
  background: var(--surface-tint);
  border-color: var(--primary-soft);
  color: var(--primary-dark);
  transform: none;
}

.order-product-tab.is-active {
  background: #102136;
  border-color: #102136;
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(16,33,54,.55);
}

.order-product-tab.is-active strong {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.order-product-sections {
  display: grid;
  gap: 14px;
}

.order-product-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.order-product-section[hidden] {
  display: none!important;
}

.order-product-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg,#f8fbff,#f2f6fb);
}

.order-product-section-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
  color: var(--text);
}

.order-product-section-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.order-product-section .order-products-scroll {
  max-height: 430px;
  border: 0;
  border-radius: 0;
}

.order-product-section .order-products-table {
  min-width: 760px;
}

.order-product-no-results {
  margin: 0;
}

.order-products-totalbar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: #102136;
  color: #fff;
  box-shadow: 0 -10px 24px -18px rgba(16,33,54,.75);
}

.order-products-totalbar span {
  color: #cdd9e8;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.order-products-totalbar strong {
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.order-totalbar-copy {
  display: grid;
  gap: 2px;
}

.order-totalbar-copy small {
  color: #94a9c4;
  font-size: 12px;
  font-weight: 700;
}

.order-totalbar-amount {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.order-totalbar-amount small {
  color: #8fe3c3;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.order-products-head span.order-vat-note,
.order-vat-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 4px 10px 4px 8px;
  border: 1px solid rgba(14,163,113,.28);
  border-radius: 999px;
  background: #effcf7;
  color: #0b7a58;
  font-size: 12px;
  font-weight: 800;
}

.order-vat-note svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.order-grand {
  display: grid;
  gap: 1px;
  justify-items: end;
  min-width: 210px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: #102136;
  color: #fff;
  text-align: right;
  box-shadow: 0 10px 22px -14px rgba(16,33,54,.7);
}

.order-payment-total .order-grand span {
  display: block;
  color: #9db2cc;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.order-payment-total .order-grand b {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.order-shipping-summary.is-free .order-grand {
  background: #0b7a58;
  box-shadow: 0 10px 22px -14px rgba(11,122,88,.7);
}

.order-shipping-summary.is-free .order-grand span {
  color: #b9ecd9;
}

.order-shipping-summary {
  display: grid;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg,#ffffff,#f7faff);
  box-shadow: var(--shadow-sm);
}

.order-shipping-main,
.order-shipping-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-shipping-main strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
}

.order-shipping-main span,
.order-shipping-foot span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.order-shipping-main b,
.order-shipping-foot strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-shipping-foot b {
  font-size: 16px;
}

.order-payment-total {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.order-payment-choice {
  min-width: 230px;
  display: grid;
  gap: 6px;
  margin: 0;
}

.order-payment-choice .field-label {
  font-size: 12px;
  text-align: left;
}

.order-payment-choice .field-control {
  min-height: 40px;
  background: #fff;
}

.order-free-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf8;
  box-shadow: inset 0 0 0 1px rgba(15,27,46,.04);
}

.order-free-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--primary),var(--accent));
  transition: width .22s ease;
}

.order-shipping-summary.is-free {
  border-color: rgba(14,163,113,.35);
  background: linear-gradient(180deg,#ffffff,#effcf7);
}

.order-shipping-summary.is-error {
  border-color: rgba(220,38,38,.28);
  background: linear-gradient(180deg,#ffffff,#fff5f5);
}

.order-products-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.order-products-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.order-products-table th,
.order-products-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  vertical-align: middle;
}

.order-products-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f9;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.order-products-table tfoot th {
  position: sticky;
  bottom: 0;
  background: #102136;
  color: #fff;
  font-weight: 900;
}

.order-products-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.order-products-table tbody tr:hover td {
  background: #f2f7fd;
}

.order-products-table tbody tr.has-qty td {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.order-products-table tbody tr.has-qty td ~ td {
  box-shadow: none;
}

.order-products-table tbody tr.is-new-product td {
  background: #fffaf0;
}

.order-products-table tbody tr.is-new-product:nth-child(even) td {
  background: #fff7e6;
}

.order-products-table strong {
  color: var(--text);
}

.product-new-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

.product-stock-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

.product-stock-badge--limited {
  background: var(--warning);
}

.order-products-table tbody tr.is-out-of-stock td {
  opacity: .55;
}

.order-products-table tbody tr.is-out-of-stock .product-stock-badge {
  opacity: 1;
}

.order-products-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.price-changed {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.2;
}

.price-changed .price-old {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
}

.price-changed .price-new {
  color: var(--text);
  font-weight: 800;
}

.price-changed .price-delta {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.price-changed--up .price-delta {
  background: #fee2e2;
  color: #b91c1c;
}

.price-changed--down .price-delta {
  background: #dcfce7;
  color: #15803d;
}

.bank-pay-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
}

.bank-pay-steps li {
  line-height: 1.45;
}

.bank-pay-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: #fff;
}

.bank-pay-grid dt {
  color: var(--muted);
  font-size: 13px;
  align-self: center;
}

.bank-pay-grid dd {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.bank-pay-iban {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .02em;
}

.bank-pay-copy {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.bank-pay-copy:hover {
  background: #dbeafe;
}

.bank-pay-copy.is-copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.order-bank-row > td {
  padding: 0 12px 12px;
  background: #f8fbff;
}

.order-bank-details > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-weight: 700;
  color: #1d4ed8;
  list-style: none;
}

.order-bank-details > summary::-webkit-details-marker {
  display: none;
}

.order-bank-details > summary svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.order-bank-details[open] > summary {
  margin-bottom: 8px;
}

.order-bank-details .bank-pay-grid {
  max-width: 520px;
}

.order-products-table .code {
  width: 110px;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.order-products-table .product-image-cell {
  width: 54px;
  padding-left: 9px;
  padding-right: 7px;
}

.product-thumb {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  cursor: zoom-in;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.product-thumb:hover,
.product-thumb:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
  outline: none;
  transform: scale(1.08);
}

.product-thumb.is-empty {
  background: transparent;
  border-style: dashed;
  cursor: default;
}

.product-image-preview {
  position: fixed;
  z-index: 140;
  left: 0;
  top: 0;
  width: min(190px, calc(100vw - 28px));
  height: min(190px, calc(100vw - 28px));
  padding: 8px;
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(.96);
  border: 1px solid rgba(203, 213, 225, .95);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 27, 46, .24);
  transition: opacity .12s ease, transform .12s ease;
}

.product-image-preview.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.order-products-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-products-table .qty {
  width: 105px;
}

.order-products-table input {
  width: 86px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 7px 9px;
  text-align: right;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.order-products-table input:focus,
.order-product-search input:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  outline: none;
}

.empty-state.compact {
  min-height: 90px;
  padding: 22px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  margin-top: 18px;
}

.info-list {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0;
  margin: 0;
}

.info-list dt {
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dd {
  margin: 0;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 550;
  word-break: break-word;
}

.info-list dt:last-of-type,
.info-list dd:last-of-type {
  border-bottom: 0;
}

.info-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.info-label .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex: 0 0 16px;
}

.info-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.generated-details {
  margin-top: 12px;
}

.profile-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.profile-value-row>span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-edit-btn {
  flex: 0 0 auto;
  color: var(--primary-dark);
}

.profile-inline-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  margin-top: 10px;
  align-items: start;
}

.profile-inline-form input {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 14px;
}

.profile-inline-form input.is-invalid {
  border-color: var(--danger);
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220,38,38,.10);
}

.profile-inline-form .btn {
  min-height: 38px;
}

.profile-field {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 800;
}

.profile-field>span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-field.has-error>span {
  color: var(--danger);
}

.field-error {
  display: block;
  margin-top: -1px;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 800;
}

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

.password-inline-form .btn {
  justify-self: start;
}

.masked-password {
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing: 2px;
}

.password-strength {
  display: grid;
  gap: 5px;
  margin: -2px 0 2px;
}

.strength-track {
  height: 7px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.strength-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #a0aec0;
  transition: width .16s ease,background .16s ease;
}

.password-strength small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.password-strength.weak .strength-track span {
  width: 25%;
  background: var(--danger);
}

.password-strength.fair .strength-track span {
  width: 50%;
  background: var(--warning);
}

.password-strength.good .strength-track span {
  width: 75%;
  background: var(--primary);
}

.password-strength.strong .strength-track span {
  width: 100%;
  background: var(--accent);
}

.generated {
  border-color: var(--primary);
  background: var(--surface-tint);
}

.generated code {
  font-size: 18px;
  background: #fff;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  display: inline-block;
  border: 1px solid var(--primary-soft);
  letter-spacing: 1px;
}


.user-master {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: linear-gradient(120deg,var(--surface-tint),#fff 60%);
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(290px,1fr));
  gap: 14px;
}

.user-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.user-card.is-inactive {
  opacity: .72;
}

.user-id {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.user-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 750;
}

.user-master .user-avatar {
  width: 54px;
  height: 54px;
  font-size: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--primary-soft);
}

.user-id-text {
  min-width: 0;
}

.user-id-text.master-user-id {
  flex: 0 1 240px;
}

.user-id-text .user-name {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.user-id-text h3 {
  margin: 0;
  font-size: 16.5px;
}

.user-master .user-id-text h3 {
  font-size: 19px;
}

.user-id-text .user-contact {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.user-master .user-meta {
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  flex: 1;
}

.user-meta .meta-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.user-meta .meta-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.user-meta .meta-cell strong {
  font-weight: 600;
  font-size: 13.5px;
}

.user-card .actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.user-card .module-access-form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px 10px;
  width: 100%;
}

.user-card .module-access-form .check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}

.user-card .module-access-form .btn {
  grid-column: 1 / -1;
  justify-content: center;
}

.user-master .user-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}


@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main>* {
  animation: rise .32s ease both;
}

.main>*:nth-child(2) {
  animation-delay: .03s;
}

.main>*:nth-child(3) {
  animation-delay: .06s;
}

.main>*:nth-child(4) {
  animation-delay: .09s;
}

.object-grid>*,
.offer-list>*,
.user-grid>*,
.room-grid>* {
  animation: rise .3s ease both;
}

@media (prefers-reduced-motion:reduce) {
  * {
    animation: none!important;
    transition: none!important;
  }
}


@media (max-width:860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .top {
    flex-wrap: wrap;
    position: relative;
  }
  .top-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--nav-line);
  }
  .top.nav-open .top-nav {
    display: flex;
    animation: rise .22s ease both;
  }
  .nav-link {
    height: 46px;
    width: 100%;
    justify-content: flex-start;
    font-size: 15px;
  }
  .nav-link .icon {
    width: 20px;
    height: 20px;
  }
  .notice-bell-wrap {
    position: static;
  }
  .partner-notice-pop {
    top: calc(100% + 10px);
    left: 14px;
    right: 14px;
    width: auto;
  }
  .partner-notice-pop::before {
    display: none;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width:760px) {
  .main {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
  .page-titlebar,
  .toolbar,
  .actions,
  .offer-list,
  .object-grid,
  .user-grid,
  .room-grid,
  .grid-form,
  .invoice-filter {
    min-width: 0;
    max-width: 100%;
  }
  .btn,
  button {
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
  .desktop-only,
  .invoice-card .actions>.btn:not(.mobile-download) {
    display: none!important;
  }
  .mobile-only {
    display: inline-flex!important;
  }
  .field-control,
  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
  }
  .order-shipping-main,
  .order-shipping-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .order-shipping-main b,
  .order-shipping-foot strong {
    white-space: normal;
  }
  .order-payment-total {
    width: 100%;
    justify-content: stretch;
  }
  .order-payment-choice {
    min-width: 0;
    width: 100%;
  }
  .order-grand {
    width: 100%;
    min-width: 0;
    justify-items: start;
    text-align: left;
  }
  .grid-form,
  .invoice-filter,
  .summary-grid,
  .room-grid,
  .stat-grid,
  .bonus-stat-grid {
    grid-template-columns: 1fr;
  }
  .order-item-row {
    grid-template-columns: minmax(170px,1fr) 88px 84px 104px 96px 40px;
  }
  .order-products-head {
    align-items: stretch;
    flex-direction: column;
  }
  .order-product-search {
    width: 100%;
  }
  .order-product-tabs {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .order-product-tab {
    width: 100%;
    justify-content: space-between;
  }
  .order-product-section-head {
    align-items: flex-start;
  }
  .order-products-totalbar {
    align-items: flex-start;
  }
  .summary-item.wide {
    grid-column: auto;
  }
  .offer-card-main,
  .offer-summary-main,
  .object-card-head,
  .room-card-head {
    flex-direction: column;
  }
  .offer-card,
  .object-card,
  .room-card,
  .user-card {
    min-width: 0;
    max-width: 100%;
  }
  .offer-card .oc-top {
    display: grid;
    grid-template-columns: 54px minmax(0,1fr);
    align-items: start;
    gap: 12px;
  }
  .offer-card .oc-mark {
    width: 46px;
    height: 46px;
  }
  .offer-card .offer-total {
    width: auto;
    max-width: 100%;
    min-width: 0;
    text-align: left;
  }
  .offer-card .actions .btn,
  .offer-card .actions form,
  .offer-card .actions button {
    flex: 1 1 140px;
  }
  .invoice-card .mobile-download {
    width: 100%;
    flex: 1 1 100%;
  }
  .total-panel,
  .offer-total {
    text-align: left;
    min-width: 0;
  }
  .object-meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .inv-doc {
    overflow-x: hidden;
  }
  .inv-topline,
  .inv-meta,
  .inv-pay {
    flex-wrap: wrap;
  }
  .inv-brand {
    white-space: normal;
  }
  .inv-parties,
  .inv-foot-grid {
    grid-template-columns: 1fr;
  }
  .inv-table {
    table-layout: fixed;
    font-size: 11px;
  }
  .inv-table th,
  .inv-table td,
  .inv-table .r,
  .inv-table .c {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .stat-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .invoice-filter-toggle {
    display: inline-flex;
  }
  .invoice-filter.is-collapsed {
    display: none;
  }
  .invoice-filter.is-open {
    display: grid;
    animation: rise .18s ease both;
  }
}

@media (max-width:560px) {
  body {
    font-size: 14px;
  }
  .toast-host {
    top: auto;
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
  }
  .toast {
    border-radius: 12px;
  }
  .confirm-backdrop {
    align-items: flex-end;
    padding: 14px;
  }
  .confirm-dialog {
    border-radius: 14px;
    padding: 18px;
  }
  .partner-notice-dialog {
    border-radius: 14px;
    padding: 16px;
  }
  .confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .partner-notice-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .confirm-actions .btn {
    width: 100%;
  }
  .partner-notice-actions .btn {
    width: 100%;
  }
  .order-items-backdrop {
    align-items: flex-end;
    padding: 14px;
  }
  .order-items-modal {
    width: 100%;
    max-height: calc(100vh - 28px);
    border-radius: 12px;
  }
  .order-items-modal-head {
    padding: 14px;
  }
  .order-items-modal-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .order-items-modal-row span,
  .order-items-modal-row b {
    white-space: normal;
  }
  .lock-timer {
    font-size: 38px;
  }
  .main {
    width: 100%;
    padding-top: 20px;
  }
  .card {
    padding: 16px;
  }
  .search {
    grid-template-columns: 1fr;
  }
  .room-facts {
    grid-template-columns: 1fr 1fr;
  }
  .order-item-row {
    grid-template-columns: 1fr 1fr;
  }
  .order-item-row label:first-child,
  .order-item-row .icon-only {
    grid-column: 1 / -1;
  }
  .order-item-row .icon-only {
    width: 100%;
  }
  .order-product-tabs {
    grid-template-columns: 1fr;
  }
  .order-product-section-head {
    padding: 12px 13px;
  }
  .order-products-totalbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }
  .col-2 {
    grid-column: auto;
  }
  .object-card .actions .btn,
  .object-card .actions form,
  .object-card .actions button {
    flex: 1;
  }
  .info-list {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .info-list dt {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .info-list dd {
    padding-top: 2px;
  }
  .user-meta {
    grid-template-columns: 1fr 1fr;
  }
}
