:root {
  --ink: #343434;
  --ink-2: #3e3e3e;
  --muted: #7e7e7e;
  --line: #e4e4e4;
  --line-strong: #d4d4d4;
  --surface: #ffffff;
  --canvas: #f6f6f6;
  --lime: #2a77ed;
  --lime-dark: #256bd7;
  --blue: #2a77ed;
  --blue-soft: #eef4ff;
  --beige: #a38c76;
  --beige-soft: #f4f1eb;
  --orange: #ff9e57;
  --red: #e95757;
  --green: #278966;
  --sidebar: #343434;
  --sidebar-2: #3e3e3e;
  --shadow: 0 18px 50px rgba(52, 52, 52, 0.12);
  --shadow-soft: 0 8px 28px rgba(52, 52, 52, 0.06);
  --radius: 6px;
  --radius-sm: 4px;
  --sidebar-width: 264px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  font-size: 15.4px;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  padding-left: var(--sidebar-width);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 6%, rgba(200, 242, 74, 0.13), transparent 26%),
    var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--ink);
  background: var(--lime);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 18.7px;
  letter-spacing: -0.025em;
}

.brand-copy span {
  margin-top: 2px;
  color: #8390a7;
  font-size: 11.0px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-label {
  padding: 8px 12px;
  color: #697790;
  font-size: 11.0px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.nav-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 12px;
  color: #aab4c5;
  font-weight: 650;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--ink);
  background: var(--lime);
}

.nav-item .icon {
  width: 19px;
  height: 19px;
}

.nav-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #8d99ad;
  background: rgba(255, 255, 255, 0.08);
  font-size: 9.9px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--sidebar-2);
}

.sidebar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dce3ed;
  font-size: 13.2px;
  font-weight: 700;
}

.tariff-pill {
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--lime);
  font-size: 9.9px;
  font-weight: 900;
}

.usage-line {
  height: 5px;
  margin: 12px 0 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #2c3a50;
}

.usage-line i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.sidebar-card small {
  color: #718097;
  font-size: 11.0px;
}

.user-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 8px 2px;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  background: #26354d;
  font-size: 13.2px;
  font-weight: 800;
}

.user-copy strong,
.user-copy span {
  display: block;
  max-width: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 12.1px;
}

.user-copy span {
  margin-top: 3px;
  color: #718097;
  font-size: 9.9px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(22px, 4vw, 48px);
  border-bottom: 1px solid rgba(221, 227, 233, 0.85);
  background: rgba(243, 245, 247, 0.91);
  backdrop-filter: blur(18px);
}

.page-title h1 {
  margin: 0;
  font-size: clamp(23.1px, 2vw, 30.8px);
  letter-spacing: -0.04em;
}

.page-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.1px;
}

.top-actions,
.action-row,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 30px clamp(22px, 4vw, 48px) 56px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  background: transparent;
  font-size: 13.2px;
  font-weight: 800;
  transition: 160ms ease;
}

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

.button.primary {
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 8px 18px rgba(166, 211, 41, 0.19);
}

.button.primary:hover {
  background: #d4f96b;
}

.button.dark {
  color: #fff;
  background: var(--ink);
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink-2);
  background: #fff;
}

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

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

.button.ghost {
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
}

.button.small {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11.0px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink-2);
  background: #fff;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: #f8fafb;
}

.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.stat-card {
  position: relative;
  min-height: 132px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-card.accent {
  border-color: var(--ink);
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(200, 242, 74, 0.23), transparent 36%),
    var(--ink);
}

.stat-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
}

.accent .stat-icon {
  color: var(--ink);
  background: var(--lime);
}

.stat-card span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 11.0px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.accent span {
  color: #8d99ad;
}

.stat-card strong {
  display: block;
  font-size: clamp(26.4px, 3vw, 35.2px);
  letter-spacing: -0.055em;
}

.stat-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.0px;
}

.accent small {
  color: #95a0b2;
}

.section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.section-head h3 {
  margin: 0;
  letter-spacing: -0.025em;
}

.section-head h2 {
  font-size: 17.6px;
}

.section-head h3 {
  font-size: 15.4px;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.0px;
}

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

.search {
  position: relative;
  min-width: min(320px, 42vw);
}

.search .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  color: #9aa6b7;
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 12.1px;
}

.search input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.compact-input:focus {
  border-color: #87a7fb;
  box-shadow: 0 0 0 3px rgba(53, 103, 233, 0.1);
}

.filter-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  background: #fff;
  font-size: 11.0px;
  font-weight: 800;
}

.filter-chip.active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.offers-list {
  padding: 8px;
}

.offer-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.6fr) minmax(130px, 0.8fr) minmax(120px, 0.65fr) minmax(130px, 0.72fr) 64px;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 13px;
  transition: 150ms ease;
}

.offer-row + .offer-row {
  border-top: 1px solid #edf0f3;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.offer-row:hover {
  background: #f8fafb;
}

.offer-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.offer-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(200, 242, 74, 0.35), transparent 27%),
    linear-gradient(135deg, #1b2a42, #364c6e);
}

.offer-main h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13.2px;
  white-space: nowrap;
}

.offer-main p,
.offer-cell span {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.0px;
}

.offer-cell strong,
.offer-cell span {
  display: block;
}

.offer-cell strong {
  color: var(--ink-2);
  font-size: 12.1px;
}

.status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 9.9px;
  font-weight: 850;
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status.draft {
  color: #7a8798;
  background: #eff2f5;
}

.status.sent {
  color: #3567e9;
  background: #edf2ff;
}

.status.opened {
  color: #278966;
  background: #e8f7f1;
}

.status.expired {
  color: #b16d30;
  background: #fff2e7;
}

.status.accepted {
  color: #147552;
  background: #ddf5ea;
}

.status.paid,
.status.sold {
  color: #fff;
  background: #16805c;
}

.status.cancelled {
  color: #b04444;
  background: #fdeaea;
}

.status-select {
  width: max-content;
  min-width: 126px;
  height: 30px;
  padding: 0 28px 0 11px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  cursor: pointer;
  color: #7a8798;
  background: #eff2f5;
  font-family: inherit;
  font-size: 9.9px;
  font-weight: 850;
}

.status-select.sent {
  color: #3567e9;
  background-color: #edf2ff;
}

.status-select.opened,
.status-select.accepted {
  color: #147552;
  background-color: #e8f7f1;
}

.status-select.paid,
.status-select.sold {
  color: #fff;
  background-color: #16805c;
}

.status-select.cancelled {
  color: #b04444;
  background-color: #fdeaea;
}

.status-select.expired {
  color: #b16d30;
  background-color: #fff2e7;
}

.offer-status-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12.1px;
  font-weight: 700;
}

.empty-state {
  padding: 70px 24px;
  text-align: center;
}

.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 20px;
  color: var(--blue);
  background: var(--blue-soft);
}

.empty-state h3 {
  margin: 0 0 7px;
}

.empty-state p {
  max-width: 420px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 12.1px;
  line-height: 1.7;
}

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

.catalog-count {
  color: var(--muted);
  font-size: 12.1px;
}

.catalog-more {
  display: flex;
  justify-content: center;
  padding: 24px 0 4px;
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: 170ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f1f3f5;
}

.product-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.product-category {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.83);
  backdrop-filter: blur(8px);
  font-size: 8.8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-card .icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.product-body {
  padding: 15px;
}

.product-sku {
  margin-bottom: 7px;
  color: #8a97a9;
  font-size: 8.8px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product-body h3 {
  min-height: 36px;
  margin: 0;
  font-size: 13.2px;
  line-height: 1.5;
}

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

.product-price strong,
.product-price span {
  display: block;
}

.product-price strong {
  font-size: 16.5px;
  letter-spacing: -0.035em;
}

.product-price span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.8px;
}

.editor-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: start;
  gap: 20px;
}

.editor-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.autosave {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 9.9px;
  font-weight: 750;
}

.autosave::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(39, 137, 102, 0.1);
  content: "";
}

.editor-section {
  padding: 22px;
}

.editor-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}

.step-number {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: var(--lime);
  font-size: 11.0px;
  font-weight: 900;
}

.editor-section-title h2 {
  margin: 0;
  font-size: 16.5px;
}

.editor-section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9.9px;
}

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

.field {
  display: grid;
  gap: 7px;
}

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

.field label {
  color: #56647a;
  font-size: 9.9px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.field label b {
  color: #dc3f45;
}

.required-note {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border-left: 3px solid var(--blue);
  color: #435168;
  background: #f3f7ff;
}

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

.required-note strong {
  font-size: 11.0px;
}

.required-note span {
  color: var(--muted);
  font-size: 9.9px;
}

.field input,
.field textarea,
.field select,
.compact-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 12.1px;
  transition: 150ms ease;
}

.field input,
.field select {
  height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.group-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.group-card + .group-card {
  margin-top: 12px;
}

.group-card.split-selected {
  border-color: #78a9f2;
  box-shadow: 0 0 0 2px rgba(47, 124, 238, 0.08);
}

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.drag-handle {
  color: #aab4c2;
  cursor: grab;
}

.split-group-check,
.split-item-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #315f9f;
  font-size: 9.9px;
  font-weight: 750;
  white-space: nowrap;
}

.split-group-check input,
.split-item-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
  accent-color: var(--blue);
}

.split-group-check input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.group-name {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.3px;
  font-weight: 800;
}

.group-total {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 14.3px;
  font-weight: 850;
}

.items-table {
  width: 100%;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 11px;
  padding: 14px;
}

.item-row.split-enabled {
  grid-template-columns: 26px minmax(0, 1fr) 36px;
}

.item-row.split-enabled .item-controls {
  grid-column: 2 / 3;
}

.item-row.split-selected {
  background: #f4f8ff;
}

.split-item-check {
  align-self: start;
  justify-content: center;
  padding-top: 18px;
}

.item-row + .item-row {
  border-top: 1px solid #edf0f3;
}

.split-offer-toolbar {
  position: sticky;
  z-index: 8;
  top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bcd4f8;
  border-radius: 10px;
  background: rgba(244, 248, 255, 0.96);
  box-shadow: 0 10px 24px rgba(35, 72, 121, 0.1);
  backdrop-filter: blur(8px);
}

.split-offer-toolbar > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.split-offer-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.split-offer-toolbar [hidden] {
  display: none !important;
}

.split-offer-toolbar strong {
  font-size: 11px;
}

.split-offer-toolbar span {
  overflow: hidden;
  color: #61738c;
  font-size: 9.9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-modal-summary,
.split-safe-note {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 9px;
}

.split-modal-summary {
  color: #244f88;
  background: #edf4ff;
}

.split-safe-note {
  margin: 16px 0 0;
  color: #326449;
  background: #edf8f2;
}

.split-modal-summary span,
.split-safe-note span {
  font-size: 11px;
  line-height: 1.5;
}

.item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.item-thumb {
  width: 55px;
  height: 55px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #eef1f4;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.item-main strong,
.item-main span {
  display: block;
}

.item-main strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13.2px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-main span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.0px;
}

.item-main > span:last-child {
  min-width: 0;
  flex: 1;
}

.item-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 145px minmax(120px, 1fr) 105px minmax(125px, auto);
  align-items: end;
  gap: 10px;
  padding-top: 2px;
}

.item-control {
  min-width: 0;
}

.table-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.9px;
  font-weight: 600;
}

.compact-input {
  height: 40px;
  padding: 0 10px;
  font-size: 13.2px;
}

.item-sum {
  text-align: right;
}

.item-sum strong {
  display: block;
  min-height: 40px;
  padding-top: 11px;
  font-size: 14.3px;
  font-weight: 700;
  white-space: nowrap;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 40px minmax(50px, 1fr) 40px;
}

.qty-stepper button {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  color: var(--blue);
  background: var(--blue-soft);
  transition: 150ms ease;
}

.qty-stepper button:first-child {
  border-radius: 4px 0 0 4px;
}

.qty-stepper button:last-child {
  border-radius: 0 4px 4px 0;
}

.qty-stepper button:hover {
  color: #fff;
  background: var(--blue);
}

.qty-stepper .compact-input {
  position: relative;
  z-index: 1;
  padding: 0 5px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.qty-stepper .compact-input::-webkit-inner-spin-button,
.qty-stepper .compact-input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.remove-item {
  width: 36px;
  height: 36px;
  padding: 0;
}

.remove-item {
  color: #a0aaba;
}

.add-product-row {
  padding: 11px 14px;
  border-top: 1px dashed var(--line-strong);
  background: #fbfcfd;
}

.add-product-row button {
  width: 100%;
  min-height: 40px;
  border: 1px dashed #bdc7d4;
  border-radius: 9px;
  cursor: pointer;
  color: #58677c;
  background: #fff;
  font-size: 12.1px;
  font-weight: 800;
}

.empty-group {
  padding: 22px 14px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 11.0px;
}

.add-group {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px dashed #b9c4d1;
  border-radius: 13px;
  cursor: pointer;
  color: #435168;
  background: rgba(255, 255, 255, 0.5);
  font-size: 11.0px;
  font-weight: 850;
}

.summary-card {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(200, 242, 74, 0.18), transparent 31%),
    var(--ink);
  box-shadow: var(--shadow);
}

.summary-card-head {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-card-head h3 {
  margin: 0;
  font-size: 15.4px;
}

.summary-card-head p {
  margin: 6px 0 0;
  color: #8996a9;
  font-size: 9.9px;
}

.summary-body {
  padding: 10px 20px 20px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  color: #9ba7b8;
  font-size: 9.9px;
}

.summary-line strong {
  color: #fff;
  font-size: 11.0px;
}

.summary-total {
  margin-top: 7px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.summary-total span {
  color: #8c99ac;
  font-size: 9.9px;
}

.summary-total strong {
  margin-top: 5px;
  color: var(--lime);
  font-size: 27.5px;
  letter-spacing: -0.055em;
}

.summary-card .button {
  width: 100%;
  margin-top: 15px;
}

.summary-card .button.secondary {
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.toggle-list {
  display: grid;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

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

.toggle-row strong {
  font-size: 11.0px;
}

.toggle-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.8px;
}

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #cbd3dc;
  transition: 180ms ease;
}

.switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 26, 43, 0.25);
  transition: 180ms ease;
  content: "";
}

.switch input:checked + i {
  background: var(--blue);
}

.switch input:checked + i::after {
  transform: translateX(16px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 14, 25, 0.58);
  backdrop-filter: blur(5px);
  animation: fade-in 160ms ease;
}

.modal {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(8, 14, 25, 0.25);
  animation: modal-in 200ms ease;
}

.modal.wide {
  width: min(880px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 18.7px;
  letter-spacing: -0.035em;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11.0px;
}

.modal-body {
  max-height: calc(100vh - 200px);
  overflow: auto;
  padding: 22px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

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

.picker-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  transition: 150ms ease;
}

.picker-card:hover {
  border-color: #8aa9f8;
  transform: translateY(-2px);
}

.picker-card.added {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.picker-card img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: contain;
  padding: 8px;
  background: #eef1f4;
}

.picker-copy {
  display: block;
  flex: 1;
  padding: 10px;
}

.picker-copy strong,
.picker-copy span {
  display: block;
}

.picker-copy strong {
  min-height: 31px;
  font-size: 9.9px;
  line-height: 1.55;
}

.picker-copy span {
  margin-top: 6px;
  color: var(--blue);
  font-size: 11.0px;
  font-weight: 850;
}

.picker-copy small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8.8px;
  line-height: 1.4;
}

.picker-card.added .picker-copy small {
  color: var(--green);
  font-weight: 700;
}

.picker-plus {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 119, 237, 0.3);
  border-radius: 50%;
  cursor: pointer;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 22px rgba(52, 52, 52, 0.16);
  transition: 150ms ease;
}

.picker-plus:hover {
  color: #fff;
  background: var(--blue);
  transform: scale(1.06);
}

.picker-plus.added {
  color: #fff;
  background: var(--blue);
}

.picker-plus .icon {
  width: 16px;
  height: 16px;
}

.picker-plus b {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 8.8px;
  line-height: 1;
  box-shadow: 0 3px 9px rgba(52, 52, 52, 0.18);
}

.picker-selection-summary {
  margin-right: auto;
  color: var(--muted);
  font-size: 11.0px;
  font-weight: 600;
}

.picker-limit {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  background: #fafbfc;
  font-size: 9.9px;
  line-height: 1.6;
  text-align: center;
}

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

.import-summary article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
}

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

.import-summary strong {
  font-size: 20.9px;
  letter-spacing: -0.04em;
}

.import-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8.8px;
  line-height: 1.45;
}

.import-note,
.import-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 9.9px;
  line-height: 1.65;
}

.import-note {
  color: #385073;
  background: #eef4ff;
}

.import-warning {
  color: #8a4519;
  background: #fff5e8;
}

.import-preview {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.import-preview-head,
.import-preview-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
}

.import-preview-head {
  color: var(--muted);
  background: #f5f7fa;
  font-size: 8.8px;
  font-weight: 850;
  text-transform: uppercase;
}

.import-preview-row {
  border-top: 1px solid var(--line);
  font-size: 9.9px;
}

.import-preview-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visually-hidden {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.file-drop {
  position: relative;
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed #b9c4d1;
  border-radius: 13px;
  color: var(--muted);
  background: #fafbfc;
  text-align: center;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-drop strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-2);
  font-size: 11.0px;
}

.file-drop span {
  font-size: 9.9px;
}

#toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 230px;
  padding: 13px 15px;
  border-radius: 11px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11.0px;
  font-weight: 700;
  animation: toast-in 200ms ease;
}

.public-page {
  min-height: 100vh;
  color: #162035;
  background: #f4f2ec;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(24px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(17, 26, 43, 0.08);
  background: rgba(244, 242, 236, 0.88);
  backdrop-filter: blur(18px);
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.public-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.public-container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.proposal-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 22px;
  align-items: end;
  padding: 68px 0 46px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #6e5d26;
  background: #f2e8bd;
  font-size: 9.9px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.proposal-hero h1 {
  max-width: 740px;
  margin: 20px 0 18px;
  font-size: clamp(46.2px, 6vw, 85.8px);
  line-height: 0.98;
  letter-spacing: -0.072em;
}

.proposal-hero .intro {
  max-width: 680px;
  margin: 0;
  color: #6f746f;
  font-size: clamp(14.3px, 1.5vw, 17.6px);
  line-height: 1.75;
}

.hero-card {
  padding: 26px;
  border-radius: 23px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(200, 242, 74, 0.27), transparent 30%),
    var(--ink);
  box-shadow: 0 22px 55px rgba(17, 26, 43, 0.16);
}

.hero-card-label {
  color: #8490a2;
  font-size: 9.9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 11px 0 21px;
  font-size: clamp(26.4px, 3vw, 37.4px);
  letter-spacing: -0.05em;
}

.hero-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #91a0b4;
  font-size: 11.0px;
}

.hero-card-line strong {
  color: #fff;
  font-size: 12.1px;
}

.public-section {
  padding: 58px 0;
}

.public-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.public-section-head h2 {
  margin: 0;
  font-size: clamp(30.8px, 4vw, 52.8px);
  letter-spacing: -0.06em;
}

.public-section-head p {
  max-width: 420px;
  margin: 0;
  color: #767b77;
  font-size: 12.1px;
  line-height: 1.7;
}

.room-block {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #dedbd2;
  border-radius: 22px;
  background: #fff;
}

.room-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px;
  border-bottom: 1px solid #e8e5dc;
}

.room-block-head h3 {
  margin: 0;
  font-size: 18.7px;
  letter-spacing: -0.035em;
}

.room-block-head strong {
  font-size: 16.5px;
}

.public-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #e8e5dc;
}

.public-product {
  padding: 16px;
  background: #fff;
}

.public-product img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: contain;
  padding: 8px;
  border-radius: 14px;
  background: #eff0ec;
}

.public-product h4 {
  min-height: 39px;
  margin: 14px 0 5px;
  font-size: 12.1px;
  line-height: 1.55;
}

.public-product .sku {
  color: #969c97;
  font-size: 8.8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-product-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #eceae4;
}

.public-product-meta span,
.public-product-meta strong {
  display: block;
}

.public-product-meta span {
  color: #8b918d;
  font-size: 8.8px;
}

.public-product-meta strong {
  margin-top: 3px;
  font-size: 13.2px;
}

.public-product-sum {
  text-align: right;
}

.proposal-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: stretch;
  padding: 34px;
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 0, rgba(200, 242, 74, 0.2), transparent 28%),
    var(--ink);
}

.proposal-summary h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(33.0px, 4vw, 57.2px);
  letter-spacing: -0.065em;
  line-height: 1.06;
}

.proposal-summary p {
  max-width: 540px;
  margin: 15px 0 0;
  color: #8f9bad;
  font-size: 12.1px;
  line-height: 1.75;
}

.proposal-total-panel {
  align-self: end;
  padding: 23px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.proposal-total-panel span {
  color: #8e9aac;
  font-size: 9.9px;
  font-weight: 800;
  text-transform: uppercase;
}

.proposal-total-panel strong {
  display: block;
  margin: 8px 0 18px;
  color: var(--lime);
  font-size: clamp(33.0px, 4vw, 52.8px);
  letter-spacing: -0.06em;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  grid-template-rows: repeat(2, 230px);
  gap: 12px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  color: #fff;
  background: #2d405f;
}

.portfolio-item:first-child {
  grid-row: 1 / 3;
}

.portfolio-item::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 20, 31, 0.8));
  content: "";
}

.portfolio-item:nth-child(1) {
  background:
    radial-gradient(circle at 66% 35%, #f6d7a8 0 4%, transparent 5%),
    linear-gradient(125deg, #596a5c, #b5a68f 48%, #4c5960);
}

.portfolio-item:nth-child(2) {
  background: linear-gradient(145deg, #d5c6ad, #775d4e);
}

.portfolio-item:nth-child(3) {
  background: linear-gradient(145deg, #aeb8c3, #3c4b5b);
}

.portfolio-item:nth-child(4) {
  background: linear-gradient(145deg, #cbbca4, #6c7a68);
}

.portfolio-item:nth-child(5) {
  background: linear-gradient(145deg, #8f7869, #d8cab6);
}

.portfolio-item span {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 1;
  font-size: 11.0px;
  font-weight: 800;
}

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

.review-card {
  padding: 22px;
  border: 1px solid #dedbd2;
  border-radius: 18px;
  background: #fff;
}

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

.review-card-head > span {
  color: #8d938f;
  font-size: 9.35px;
}

.stars {
  color: #e6b343;
  letter-spacing: 0.1em;
}

.review-card p {
  min-height: 76px;
  margin: 15px 0 18px;
  color: #555e59;
  font-size: 11.0px;
  line-height: 1.75;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-author .avatar {
  color: var(--ink);
  background: var(--lime);
}

.review-author strong,
.review-author span {
  display: block;
}

.review-author strong {
  font-size: 11.0px;
}

.review-author span {
  margin-top: 3px;
  color: #8d938f;
  font-size: 8.8px;
}

.reviews-source-link {
  width: fit-content;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  margin: 18px 0 0 auto;
  padding: 10px 14px 10px 10px;
  border: 1px solid #dedbd2;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.reviews-source-link > span:not(.social-mark),
.reviews-source-link strong,
.reviews-source-link small {
  display: block;
}

.reviews-source-link strong {
  font-size: 11px;
}

.reviews-source-link small {
  margin-top: 3px;
  color: #7f8781;
  font-size: 8.8px;
}

.reviews-source-link > svg {
  width: 18px;
  height: 18px;
}

.public-footer {
  margin-top: 50px;
  padding: 34px 0;
  border-top: 1px solid #dedbd2;
}

.public-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #858c87;
  font-size: 9.9px;
}

.expired-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  color: #fff;
  background: var(--ink);
}

.expired-card {
  width: min(500px, 100%);
  text-align: center;
}

.expired-card .brand-mark {
  margin: 0 auto 24px;
}

.expired-card h1 {
  margin: 0;
  font-size: clamp(37.4px, 6vw, 63.8px);
  letter-spacing: -0.06em;
}

.expired-card p {
  margin: 17px auto 0;
  color: #97a3b5;
  line-height: 1.8;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

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

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

  .editor-page {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .item-row {
    grid-template-columns: minmax(0, 1fr) 36px;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 78px;
  }

  .sidebar {
    padding: 22px 12px 14px;
  }

  .brand {
    justify-content: center;
    padding: 0 0 25px;
  }

  .brand-copy,
  .sidebar-label,
  .nav-item span,
  .nav-badge,
  .sidebar-card,
  .user-copy {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .user-block {
    justify-content: center;
    margin-top: auto;
    padding: 15px 0 0;
  }

  .editor-page {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .offer-row {
    grid-template-columns: minmax(210px, 1.6fr) minmax(120px, 0.8fr) minmax(115px, 0.7fr) 55px;
  }

  .offer-row .offer-cell:nth-of-type(3) {
    display: none;
  }

  .proposal-hero {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 540px;
  }

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

  .proposal-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 66px;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    box-shadow: 0 -10px 35px rgba(17, 26, 43, 0.18);
  }

  .brand,
  .user-block {
    display: none;
  }

  .nav-list {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .nav-item {
    min-height: 48px;
  }

  .nav-item:nth-child(5) {
    display: none;
  }

  .app-shell {
    padding-bottom: 72px;
  }

  .topbar {
    min-height: 66px;
    align-items: flex-start;
    padding: 13px 16px;
  }

  .page-title p,
  .top-actions .button.secondary,
  .top-actions .button span {
    display: none;
  }

  .top-actions .button {
    width: 40px;
    padding: 0;
  }

  .page {
    padding: 20px 15px 38px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 115px;
    padding: 15px;
  }

  .stat-icon {
    width: 29px;
    height: 29px;
  }

  .stat-card strong {
    font-size: 25.3px;
  }

  .section-head,
  .catalog-top {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .offers-list {
    padding: 7px;
  }

  .offer-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .offer-row .offer-cell {
    display: none;
  }

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

  .product-body {
    padding: 12px;
  }

  .product-body h3 {
    font-size: 11.0px;
  }

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

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

  .editor-section {
    padding: 16px;
  }

  .split-offer-toolbar,
  .split-offer-toolbar > div {
    align-items: stretch;
    flex-direction: column;
  }

  .split-offer-toolbar > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .split-offer-toolbar span {
    white-space: normal;
  }

  .split-group-check span {
    display: none;
  }

  .item-row {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 10px;
    padding: 12px;
  }

  .item-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .qty-control,
  .item-sum {
    grid-column: 1 / -1;
  }

  .item-sum {
    text-align: left;
  }

  .item-sum strong {
    min-height: 0;
    padding-top: 0;
    font-size: 14.3px;
  }

  .remove-item {
    width: 36px;
    height: 36px;
  }

  .item-main span {
    white-space: normal;
  }

  .group-total {
    display: none;
  }

  .modal-body {
    padding: 17px;
  }

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

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

  .import-preview-head,
  .import-preview-row {
    grid-template-columns: 82px minmax(0, 1fr) 86px;
    gap: 8px;
    padding-inline: 10px;
  }

  .public-nav {
    padding: 11px 16px;
  }

  .public-nav-actions .button.secondary,
  .public-nav-actions .button span {
    display: none;
  }

  .public-nav-actions .button {
    width: 40px;
    padding: 0;
  }

  .public-container {
    width: min(100% - 28px, 1160px);
  }

  .proposal-hero {
    min-height: 0;
    padding: 42px 0 30px;
  }

  .proposal-hero h1 {
    font-size: 46.2px;
  }

  .public-section {
    padding: 38px 0;
  }

  .public-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-products {
    grid-template-columns: 1fr;
  }

  .public-product {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    column-gap: 13px;
  }

  .public-product img {
    grid-row: 1 / 5;
    aspect-ratio: 1;
  }

  .public-product h4 {
    min-height: 0;
    margin-top: 0;
  }

  .public-product-meta {
    margin-top: 7px;
  }

  .proposal-summary {
    padding: 23px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 180px);
  }

  .portfolio-item:first-child {
    grid-column: 1 / 3;
    grid-row: 1;
  }

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

  .review-card p {
    min-height: 0;
  }
}

@media (max-width: 430px) {
  .modal-footer {
    flex-wrap: wrap;
  }

  .picker-selection-summary {
    width: 100%;
    margin: 0 0 2px;
  }

  .modal-footer .button {
    flex: 1;
    padding-inline: 14px;
  }

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

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

  .stat-card:nth-child(4) {
    display: none;
  }

  .stat-card:first-child {
    grid-column: 1 / -1;
  }

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

  .import-preview-head,
  .import-preview-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .import-preview-head span:last-child,
  .import-preview-row span:last-child {
    display: none;
  }
}

.template-variant-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
}

.template-variant-tabs {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 3px;
}

.template-variant-tab {
  position: relative;
  display: grid;
  min-width: 170px;
  gap: 4px;
  padding: 13px 15px;
  color: var(--muted);
  text-align: left;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.template-variant-tab span {
  font-size: 14.3px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.template-variant-tab strong {
  color: var(--ink);
  font-size: 16.5px;
}

.template-variant-tab em {
  position: absolute;
  top: -8px;
  right: 8px;
  padding: 3px 7px;
  color: white;
  font-size: 11.0px;
  font-style: normal;
  font-weight: 800;
  background: #31a46c;
  border-radius: 20px;
}

.template-variant-tab.active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, white);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent);
}

.variant-settings {
  margin-bottom: 18px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.variant-empty {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: #fbfcfe;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
}

.variant-empty strong {
  color: var(--ink);
}

.danger-text {
  margin-top: 10px;
  color: #c2414b;
}

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

  .template-variant-tab {
    min-width: 145px;
  }
}

/* Visual proposal template editor */
.visual-editor-section {
  overflow: hidden;
}

.visual-editor-preview {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 230px;
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visual-preview-company {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.visual-preview-logo {
  min-height: 110px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.visual-preview-logo img {
  width: 100%;
  max-height: 125px;
  object-fit: contain;
}

.visual-preview-company strong,
.visual-preview-company span {
  display: block;
}

.visual-preview-company strong {
  margin-bottom: 7px;
  font-size: 15.4px;
}

.visual-preview-company span {
  color: var(--muted);
  font-size: 11.0px;
  line-height: 1.65;
}

.visual-preview-cover {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: #f3f3f1;
}

.visual-preview-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-placeholder {
  color: var(--muted);
  font-size: 11.0px;
  text-transform: uppercase;
}

.cover-fixture-placeholder,
.cover-fixtures {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #fff, #f1f1ee);
}

.cover-fixture-placeholder i,
.cover-fixtures i {
  position: absolute;
  top: -20%;
  width: 8px;
  height: 118%;
  border-radius: 999px;
  background: linear-gradient(#c5c0b8, #363636);
  box-shadow: 0 4px 13px rgba(0, 0, 0, 0.12);
  transform: rotate(12deg);
}

.cover-fixture-placeholder i:nth-child(1),
.cover-fixtures i:nth-child(1) { left: 18%; }
.cover-fixture-placeholder i:nth-child(2),
.cover-fixtures i:nth-child(2) { left: 45%; width: 5px; background: #ad967e; transform: none; }
.cover-fixture-placeholder i:nth-child(3),
.cover-fixtures i:nth-child(3) { left: 68%; background: #202020; transform: rotate(-28deg); }
.cover-fixture-placeholder i:nth-child(4),
.cover-fixtures i:nth-child(4) { left: 86%; width: 3px; background: #aaa; transform: rotate(18deg); }

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

.visual-image-field {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.visual-image-head,
.visual-brands-head,
.visual-brand-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visual-image-head strong,
.visual-image-head span,
.visual-brands-head strong,
.visual-brands-head span {
  display: block;
}

.visual-image-head strong,
.visual-brands-head strong {
  font-size: 12.1px;
}

.visual-image-head span,
.visual-brands-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.9px;
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.visual-company-fields {
  margin-top: 4px;
}

.visual-brands-head {
  margin: 23px 0 13px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

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

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

.visual-brand-image {
  min-height: 105px;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  background: #f7f7f5;
}

.visual-brand-image img {
  width: 100%;
  height: 85px;
  object-fit: contain;
}

.visual-brand-image strong {
  font-size: 23.1px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.visual-brand-image span {
  color: var(--muted);
  font-size: 8.8px;
}

.visual-brand-card label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8.8px;
}

/* Branded client proposal */
.public-custom-logo {
  width: 62px;
  height: 34px;
  object-fit: contain;
}

.company-cover {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: stretch;
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid #e0e0de;
  background: #fff;
}

.company-cover-details {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(230px, 1fr);
  align-items: center;
  gap: 38px;
  padding: 58px 54px 82px;
}

.company-cover-logo img,
.company-cover-logo .brand-mark {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
}

.company-cover-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(19.8px, 2.15vw, 34.1px);
  font-weight: 400;
  line-height: 1.17;
}

.company-cover-copy p,
.company-cover-copy a {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: clamp(13.2px, 1.4vw, 20.9px);
  line-height: 1.55;
}

.company-cover-art {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: #f4f4f1;
}

.company-cover-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-fixtures b {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #353535;
}

.cover-fixtures b:nth-of-type(1) { top: 25%; left: 9%; }
.cover-fixtures b:nth-of-type(2) { top: 34%; right: 28%; width: 52px; height: 52px; }
.cover-fixtures b:nth-of-type(3) { right: 8%; bottom: 18%; width: 64px; height: 64px; background: #626262; }

.company-cover-links {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.75), #fff);
}

.company-social-button {
  min-width: 220px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  padding: 10px 14px 10px 10px;
  border: 1px solid #dddeda;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 36, 32, .08);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.company-social-button:hover {
  transform: translateY(-2px);
  border-color: #c5c8c2;
  box-shadow: 0 12px 30px rgba(30, 36, 32, .13);
}

.company-social-button > span:not(.social-mark) {
  min-width: 0;
}

.company-social-button strong,
.company-social-button small {
  display: block;
}

.company-social-button strong {
  font-size: 12.1px;
  line-height: 1.25;
}

.company-social-button small {
  margin-top: 3px;
  color: #7b837e;
  font-size: 9.35px;
}

.company-social-button > svg {
  width: 18px;
  height: 18px;
  color: #858c87;
}

.social-mark,
.social-mark svg {
  width: 42px;
  height: 42px;
  display: block;
}

.social-mark svg {
  overflow: visible;
}

.company-presentation {
  margin-top: 24px;
  padding: clamp(30px, 5vw, 64px) clamp(34px, 8vw, 108px);
  color: #f4f4f2;
  background: #3c3c39;
  font-size: clamp(16.5px, 2vw, 26.4px);
  font-style: italic;
  line-height: 1.45;
  white-space: pre-line;
}

.public-order-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  padding: 24px 7%;
  background: #fff;
}

.public-order-meta div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
}

.public-order-meta span {
  color: var(--muted);
}

.public-order-meta strong {
  font-weight: 500;
}

.proposal-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 36px;
  align-items: end;
  padding: 52px 7% 36px;
  background: #fff;
}

.proposal-overview h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  color: var(--ink);
  font-size: clamp(35.2px, 5vw, 68.2px);
  font-weight: 350;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}

.proposal-overview p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.proposal-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #dadad7;
  border: 1px solid #dadad7;
}

.proposal-overview-stats div {
  padding: 18px 14px;
  background: #f7f7f6;
}

.proposal-overview-stats span,
.proposal-overview-stats strong {
  display: block;
}

.proposal-overview-stats span {
  color: var(--muted);
  font-size: 8.8px;
  text-transform: uppercase;
}

.proposal-overview-stats strong {
  margin-top: 7px;
  font-size: 15.4px;
}

.public-variants {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 24px;
}

.public-variant-tab {
  position: relative;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  color: #a7a7a4;
  background: #f2f2f1;
  border: 1px solid transparent;
}

.public-variant-tab span {
  font-size: 17.6px;
  font-weight: 600;
}

.public-variant-tab strong {
  font-size: 15.4px;
}

.public-variant-tab.active {
  color: var(--ink);
  background: #fff;
  border-color: #d6d6d3;
  box-shadow: 0 10px 30px rgba(52, 52, 52, 0.1);
}

.public-variant-tab em {
  position: absolute;
  top: 7px;
  right: 8px;
  color: #2f845f;
  font-size: 8.8px;
  font-style: normal;
}

.public-brand-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: center;
  gap: 28px;
  margin: 34px 0 20px;
  padding: 54px 7%;
  background: #fff;
}

.public-brand-logo {
  min-height: 90px;
  display: grid;
  place-items: center;
  padding: 12px;
}

.public-brand-logo img {
  width: 100%;
  max-height: 88px;
  object-fit: contain;
}

.public-brand-logo strong {
  font-size: clamp(24.2px, 3vw, 44.0px);
  font-weight: 450;
  letter-spacing: 0.07em;
}

@media (max-width: 900px) {
  .visual-editor-preview,
  .company-cover {
    grid-template-columns: 1fr;
  }

  .visual-preview-cover,
  .company-cover-art {
    min-height: 260px;
  }

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

  .proposal-overview {
    grid-template-columns: 1fr;
  }

  .company-cover-details {
    padding: 42px 32px 70px;
  }
}

@media (max-width: 620px) {
  .visual-preview-company,
  .company-cover-details,
  .visual-editor-grid,
  .visual-brands-grid {
    grid-template-columns: 1fr;
  }

  .visual-preview-company,
  .company-cover-details {
    gap: 18px;
    padding: 28px 22px 68px;
  }

  .visual-preview-logo,
  .company-cover-logo {
    max-width: 160px;
  }

  .company-cover-links {
    position: static;
    flex-direction: column;
    padding: 14px 18px 18px;
  }

  .company-social-button {
    width: 100%;
    min-width: 0;
  }

  .reviews-source-link {
    width: 100%;
  }

  .company-presentation {
    padding: 28px 22px;
    font-size: 15.4px;
  }

  .public-order-meta {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .public-order-meta div {
    grid-template-columns: 105px 1fr;
  }

  .public-variant-tab {
    min-width: 170px;
  }
}

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

  body,
  .public-page {
    color: #111;
    background: #fff;
  }

  .public-nav,
  .public-footer,
  .no-print {
    display: none !important;
  }

  .public-container {
    width: 100%;
  }

  .proposal-hero {
    min-height: 0;
    grid-template-columns: 1.2fr 0.8fr;
    padding: 0 0 20px;
  }

  .proposal-hero h1 {
    font-size: 37.4px;
  }

  .hero-card,
  .proposal-summary {
    color: #fff !important;
    background: #111a2b !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .public-section {
    padding: 22px 0;
  }

  .public-section-head h2 {
    font-size: 27.5px;
  }

  .room-block,
  .public-product,
  .review-card,
  .proposal-summary {
    break-inside: avoid;
  }

  .public-products {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid {
    display: none;
  }

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

/* Templates */
.template-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px;
  margin-bottom: 22px;
  background: linear-gradient(120deg, #f4f5ef 0%, #eef2ed 55%, #e8eee8 100%);
  border-color: #dce5db;
}

.template-guide h2 { margin: 4px 0 7px; font-size: 27.5px; }
.template-guide p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
.template-toolbar { margin-bottom: 18px; }
.template-toolbar .search { min-width: min(460px, 100%); }

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

.template-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(38, 47, 42, .055);
  transition: transform .18s ease, box-shadow .18s ease;
}

.template-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(38, 47, 42, .1); }
.template-preview { position: relative; min-height: 188px; padding: 24px; background: linear-gradient(145deg, #303332, #4b514e); color: #fff; }
.template-preview::after { content: ""; position: absolute; right: -38px; top: -64px; width: 180px; height: 180px; border-radius: 50%; background: rgba(190, 216, 67, .16); }
.template-preview-logo { display: block; transform: scale(.7); transform-origin: left top; }
.template-preview-title { display: block; max-width: 250px; margin-top: 15px; font-size: 22.0px; font-weight: 760; line-height: 1.2; }
.template-preview-lines { display: grid; gap: 6px; width: 64%; margin: 16px 0; }
.template-preview-lines i { display: block; height: 4px; border-radius: 99px; background: rgba(255,255,255,.22); }
.template-preview-lines i:nth-child(2) { width: 82%; }
.template-preview-lines i:nth-child(3) { width: 58%; }
.template-preview > strong { position: absolute; right: 22px; bottom: 22px; color: var(--accent); font-size: 18.7px; }
.template-card-body { padding: 20px 21px 16px; }
.template-card-kicker { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.1px; text-transform: uppercase; letter-spacing: .08em; }
.template-card-kicker span { color: #68753c; font-weight: 800; }
.template-card-kicker em { font-style: normal; text-transform: none; letter-spacing: 0; }
.template-card h3 { margin: 10px 0 7px; font-size: 22.0px; }
.template-card p { min-height: 42px; margin: 0; color: var(--muted); font-size: 14.3px; line-height: 1.55; }
.template-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.template-meta span { padding: 6px 9px; border-radius: 999px; background: var(--surface-soft); color: #5b625e; font-size: 12.1px; font-weight: 700; }
.template-card-actions { display: flex; align-items: center; gap: 7px; padding: 14px 16px 17px; border-top: 1px solid var(--line); }
.template-card-actions .button { flex: 1; }
.template-summary { align-self: start; }
.template-empty { grid-column: 1 / -1; }

/* Authentication */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr); background: #f6f7f3; }
.auth-brand-panel { position: relative; overflow: hidden; padding: clamp(38px, 5vw, 76px); color: #fff; background: linear-gradient(145deg, #292c2b 0%, #3c413e 72%, #505851 100%); }
.auth-brand-panel::before { content: ""; position: absolute; width: 520px; height: 520px; right: -190px; bottom: -210px; border-radius: 50%; background: rgba(190, 216, 67, .14); }
.auth-brand-panel::after { content: ""; position: absolute; width: 220px; height: 220px; right: 8%; top: 12%; border-radius: 50%; border: 1px solid rgba(255,255,255,.11); }
.auth-brand-panel > div { position: relative; z-index: 1; min-height: calc(100vh - clamp(76px, 10vw, 152px)); display: flex; flex-direction: column; }
.auth-logo { display: inline-flex; align-items: center; gap: 14px; width: fit-content; color: #fff; text-decoration: none; }
.auth-logo .brand-mark { transform: scale(1.1); }
.auth-logo > span { display: grid; gap: 2px; }
.auth-logo strong { font-size: 22.0px; }
.auth-logo small { color: rgba(255,255,255,.6); }
.auth-promise { margin: auto 0; max-width: 650px; }
.auth-promise > span, .auth-kicker { color: var(--accent); text-transform: uppercase; font-size: 13.2px; font-weight: 850; letter-spacing: .14em; }
.auth-promise h1 { max-width: 620px; margin: 16px 0 20px; font-size: clamp(41.8px, 5vw, 72.6px); line-height: 1.02; letter-spacing: -.045em; }
.auth-promise p { max-width: 580px; margin: 0; color: rgba(255,255,255,.7); font-size: 18.7px; line-height: 1.65; }
.auth-feature-row { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-feature-row span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: rgba(255,255,255,.78); font-size: 13.2px; }
.auth-feature-row .icon { width: 15px; height: 15px; color: var(--accent); }
.auth-form-panel { display: grid; place-items: center; padding: 38px; }
.auth-form-wrap { width: min(440px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(39, 48, 43, .09); }
.auth-form-wrap h2 { margin: 8px 0 8px; font-size: 34.1px; letter-spacing: -.03em; }
.auth-lead { margin: 0 0 26px; color: var(--muted); }
.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form label > span { color: #505854; font-size: 13.2px; font-weight: 780; }
.auth-form input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #d7ddd9; border-radius: 11px; background: #fafbf9; font: inherit; }
.auth-form input:focus { outline: 3px solid rgba(190, 216, 67, .18); border-color: #9bad41; background: #fff; }
.auth-password-field { position: relative; display: block; color: inherit !important; font-size: inherit !important; font-weight: inherit !important; }
.auth-password-field input { padding-right: 54px; }
.auth-password-key { position: absolute; top: 50%; right: 8px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; transform: translateY(-50%); border-radius: 9px; color: #52606c; background: #eef2f5; cursor: pointer; }
.auth-password-key:hover, .auth-password-key:focus-visible { color: #fff; background: var(--blue); outline: none; }
.auth-password-key .icon { width: 19px; height: 19px; }
.auth-remember { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 10px !important; color: #505854; cursor: pointer; }
.auth-form .auth-remember input { width: 19px; min-height: 19px; height: 19px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.auth-remember span { font-size: 13.2px !important; font-weight: 650 !important; }
.auth-password-note { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0 0; color: #7e8782; font-size: 12.1px; line-height: 1.45; }
.auth-password-note .icon { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; color: var(--blue); }
.auth-name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-submit { width: 100%; min-height: 49px; margin-top: 4px; }
.auth-error { padding: 10px 12px; border-radius: 9px; background: #fff0ee; color: #a83f34; font-size: 14.3px; }
.auth-switch { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 14.3px; }
.auth-switch a { color: #48571a; font-weight: 800; }
.auth-help { margin: 12px 0 0; color: #9aa19d; text-align: center; font-size: 12.1px; }
.sidebar-logout { display: flex; align-items: center; gap: 9px; width: calc(100% - 28px); margin: 10px 14px 18px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: rgba(255,255,255,.68); background: transparent; cursor: pointer; font: inherit; font-size: 13.2px; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-logout .icon { width: 16px; height: 16px; }

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

@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 350px; padding: 34px 26px; }
  .auth-brand-panel > div { min-height: 282px; }
  .auth-promise h1 { font-size: 41.8px; }
  .auth-promise p { font-size: 15.4px; }
  .auth-feature-row { display: none; }
  .auth-form-panel { padding: 24px 16px 42px; }
  .auth-form-wrap { padding: 28px 22px; }
  .template-guide { align-items: flex-start; flex-direction: column; }
  .templates-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .auth-brand-panel { min-height: 300px; }
  .auth-brand-panel > div { min-height: 232px; }
  .auth-promise h1 { font-size: 35.2px; }
  .auth-name-grid { grid-template-columns: 1fr; }
  .template-card-actions { flex-wrap: wrap; }
}

/* K15 visual system */

body {
  font-weight: 400;
}

.sidebar {
  padding: 30px 20px 20px;
  background:
    radial-gradient(circle at 108% 4%, rgba(163, 140, 118, 0.28), transparent 26%),
    radial-gradient(circle at -12% 78%, rgba(42, 119, 237, 0.18), transparent 30%),
    var(--sidebar);
}

.brand {
  gap: 11px;
  padding: 0 6px 34px;
}

.brand-mark.brand-mark-k15 {
  width: 66px;
  height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border-radius: 0;
  color: inherit;
  background: transparent;
  letter-spacing: 0;
}

.brand-mark-k15 b {
  color: var(--ink);
  font-size: 20.9px;
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1;
}

.brand-mark-k15 i {
  min-width: 27px;
  padding: 5px 7px 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 9.9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

.sidebar .brand-mark-k15 b,
.expired-screen .brand-mark-k15 b {
  color: #fff;
}

.brand-copy strong {
  font-size: 17.6px;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-copy span {
  max-width: 132px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 8.8px;
  font-weight: 500;
  line-height: 1.3;
}

.sidebar-label {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 600;
}

.nav-item {
  min-height: 48px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: var(--blue);
}

.nav-badge {
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-card {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.tariff-pill,
.usage-line i {
  color: #fff;
  background: var(--blue);
}

.avatar {
  border-radius: 50%;
  background: var(--blue);
}

.mobile-brand {
  display: none;
}

.topbar {
  min-height: 82px;
  border-bottom-color: rgba(52, 52, 52, 0.09);
  background: rgba(246, 246, 246, 0.9);
}

.page-title h1 {
  font-weight: 400;
  letter-spacing: -0.025em;
}

.page-title p {
  color: var(--muted);
}

.button {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 40px;
  font-weight: 600;
}

.button.small {
  border-radius: 40px;
}

.button.primary,
.button.blue {
  color: #fff;
  background: var(--blue);
  box-shadow: none;
}

.button.primary:hover,
.button.blue:hover {
  color: #fff;
  background: #256bd7;
  box-shadow: 0 8px 28px -12px #256bd7;
}

.button.dark {
  background: var(--ink);
}

.button.secondary {
  border-color: var(--line);
}

.icon-button,
.search input,
.filter-chip,
.field input,
.field textarea,
.field select,
.compact-input {
  border-radius: 4px;
}

.search input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.compact-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 119, 237, 0.1);
}

.filter-chip {
  font-weight: 600;
}

.filter-chip.active {
  border-color: var(--blue);
  background: var(--blue);
}

.section-card,
.stat-card,
.product-card,
.group-card,
.modal,
.picker-card,
.import-summary article,
.import-preview,
.file-drop {
  border-radius: 6px;
}

.stat-card,
.section-card,
.product-card {
  box-shadow: none;
}

.stat-card.accent {
  border-color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(163, 140, 118, 0.36), transparent 34%),
    var(--ink);
}

.accent .stat-icon,
.step-number,
.review-author .avatar {
  color: #fff;
  background: var(--blue);
}

.stat-card span,
.section-head h2,
.section-head h3,
.editor-section-title h2,
.field label,
.group-name,
.product-category {
  font-weight: 600;
}

.offer-thumb {
  border-radius: 4px;
  background:
    radial-gradient(circle at 78% 18%, rgba(163, 140, 118, 0.42), transparent 28%),
    linear-gradient(135deg, #343434, #59514a);
}

.offer-row,
.product-category,
.product-card .icon-button,
.item-thumb,
.toggle-row,
.add-product-row button,
.add-group,
.import-note,
.import-warning,
.toast {
  border-radius: 4px;
}

.product-card:hover {
  border-color: #d6d0ca;
  box-shadow: 0 14px 34px rgba(52, 52, 52, 0.09);
}

.product-art {
  background: #f0f0f0;
}

.product-price strong,
.picker-copy span {
  color: var(--blue);
}

.summary-card {
  border-radius: 6px;
  background:
    radial-gradient(circle at 100% 0, rgba(163, 140, 118, 0.34), transparent 32%),
    var(--ink);
}

.summary-total strong {
  color: #fff;
}

.switch input:checked + i {
  background: var(--blue);
}

.public-page {
  color: var(--ink);
  background: #f6f6f6;
}

.public-nav {
  border-bottom-color: rgba(52, 52, 52, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.public-brand {
  font-weight: 500;
  letter-spacing: 0;
}

.public-brand .brand-mark.brand-mark-k15 {
  width: 66px;
  height: 36px;
}

.proposal-hero {
  isolation: isolate;
  min-height: 470px;
  align-items: center;
  margin-top: 30px;
  padding: 58px;
  border-radius: 4px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(52, 52, 52, 0.94), rgba(52, 52, 52, 0.68)),
    linear-gradient(135deg, #4a4642 0%, #8a796a 100%);
  overflow: hidden;
}

.proposal-hero::before,
.proposal-hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.proposal-hero::before {
  top: -190px;
  right: -100px;
  width: 430px;
  height: 430px;
  background: rgba(163, 140, 118, 0.36);
}

.proposal-hero::after {
  bottom: -220px;
  left: -130px;
  width: 430px;
  height: 430px;
  background: rgba(42, 119, 237, 0.18);
}

.hero-kicker {
  padding: 0;
  color: #e7d7c7;
  background: transparent;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.proposal-hero h1 {
  max-width: 680px;
  margin: 24px 0 22px;
  color: #fff;
  font-size: clamp(41.8px, 5.3vw, 72.6px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.proposal-hero .intro {
  color: rgba(255, 255, 255, 0.82);
}

.hero-card {
  border-radius: 4px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.hero-card-label {
  color: var(--beige);
  font-weight: 600;
}

.hero-card h2,
.hero-card-line strong {
  color: var(--ink);
}

.hero-card-line {
  border-top-color: rgba(52, 52, 52, 0.12);
  color: var(--muted);
}

.public-section-head h2,
.proposal-summary h2 {
  font-weight: 300;
  letter-spacing: 0;
  text-transform: uppercase;
}

.room-block,
.public-product img,
.proposal-summary,
.proposal-total-panel,
.portfolio-item,
.review-card {
  border-radius: 4px;
}

.room-block {
  border-color: #e1ddd8;
}

.room-block-head {
  border-bottom-color: #e9e5e0;
}

.proposal-summary {
  background:
    radial-gradient(circle at 82% 0, rgba(163, 140, 118, 0.32), transparent 30%),
    var(--ink);
}

.proposal-total-panel strong {
  color: #fff;
}

.portfolio-item:nth-child(1) {
  background: #4c5960 url("https://k15group.ru/image/catalog/home-landing/project-1.jpg") center / cover;
}

.portfolio-item:nth-child(2) {
  background: #775d4e url("https://k15group.ru/image/catalog/home-landing/project-2.jpg") center / cover;
}

.portfolio-item:nth-child(3) {
  background: #3c4b5b url("https://k15group.ru/image/catalog/home-landing/project-3.jpg") center / cover;
}

.portfolio-item:nth-child(4) {
  background: #6c7a68 url("https://k15group.ru/image/catalog/home-landing/project-4_.jpg") center / cover;
}

.portfolio-item:nth-child(5) {
  background: #8f7869 url("https://k15group.ru/image/catalog/home-landing/project-5.jpg") center / cover;
}

.stars {
  color: var(--beige);
}

.expired-screen {
  background:
    radial-gradient(circle at 84% 5%, rgba(163, 140, 118, 0.28), transparent 28%),
    radial-gradient(circle at 6% 92%, rgba(42, 119, 237, 0.18), transparent 30%),
    var(--ink);
}

.expired-card .brand-mark.brand-mark-k15 {
  width: max-content;
  margin: 0 auto 26px;
}

@media (max-width: 960px) {
  .sidebar .brand-mark.brand-mark-k15 {
    width: 54px;
    justify-content: center;
  }

  .sidebar .brand-mark-k15 b {
    font-size: 17.6px;
  }

  .sidebar .brand-mark-k15 i {
    min-width: 23px;
    padding-inline: 5px;
  }

  .proposal-hero {
    padding: 46px;
  }
}

@media (max-width: 760px) {
  .mobile-brand {
    display: flex;
    align-items: center;
  }

  .mobile-brand .brand-mark.brand-mark-k15 {
    width: 64px;
  }

  .topbar {
    align-items: center;
    gap: 10px;
  }

  .page-title {
    min-width: 0;
    flex: 1;
  }

  .page-title h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .proposal-hero {
    margin-top: 14px;
    padding: 34px 24px 24px;
  }

  .proposal-hero h1 {
    font-size: 37.4px;
  }
}

@media print {
  .proposal-hero,
  .hero-card,
  .proposal-summary {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .proposal-hero {
    margin-top: 0;
    padding: 22px;
    color: #fff;
    background: #343434 !important;
  }

  .proposal-hero h1 {
    color: #fff;
  }
}

/* Compact vertical product list in proposal preview */

.public-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: #fff;
}

.public-product {
  min-height: 108px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(260px, 0.7fr);
  grid-template-areas:
    "image title meta"
    "image sku meta";
  align-items: center;
  column-gap: 16px;
  padding: 12px 16px;
  background: #fff;
}

.public-product + .public-product {
  border-top: 1px solid #e9e5e0;
}

.public-product img {
  grid-area: image;
  width: 82px;
  height: 82px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  background: transparent;
}

.public-product h4 {
  grid-area: title;
  align-self: end;
  min-height: 0;
  margin: 0 0 6px;
  font-size: 15.4px;
  line-height: 1.4;
}

.public-product .sku {
  grid-area: sku;
  align-self: start;
  font-size: 9.9px;
}

.public-product-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  border-top: 0;
}

.public-product-meta span {
  font-size: 11.0px;
  line-height: 1.45;
}

.public-product-meta strong {
  margin-top: 4px;
  font-size: 14.3px;
}

.public-product-sum strong {
  font-size: 16.5px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .public-product {
    min-height: 0;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas:
      "image title"
      "image sku"
      "meta meta";
    column-gap: 12px;
    padding: 11px 12px;
  }

  .public-product img {
    width: 68px;
    height: 68px;
    grid-row: auto;
  }

  .public-product h4 {
    margin-bottom: 4px;
    font-size: 14.3px;
  }

  .public-product-meta {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #eceae4;
  }
}

@media print {
  .public-products {
    grid-template-columns: 1fr;
  }

  .public-product {
    min-height: 88px;
    grid-template-columns: 78px minmax(0, 1fr) 220px;
    padding: 8px 10px;
  }

  .public-product img {
    width: 68px;
    height: 68px;
  }
}

/* Product sets and team access */

.user-copy em {
  display: inline-block;
  margin-top: 5px;
  color: #a9b6c8;
  font-size: 8.8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-switcher {
  display: grid;
  gap: 5px;
  padding: 10px 8px 0;
}

.user-switcher span {
  color: #718097;
  font-size: 8.8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-switcher select {
  width: 100%;
  min-height: 35px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #fff;
  background: #454545;
  font-size: 9.9px;
}

.manager-filter {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-size: 11.0px;
}

.offer-manager {
  display: block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 8.8px;
  font-style: normal;
  font-weight: 750;
}

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

.group-actions button {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.manager-readonly,
.summary-manager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manager-readonly {
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8f8f8;
}

.manager-readonly .avatar,
.summary-manager .avatar,
.team-row .avatar,
.manager-contact-card .avatar {
  color: #fff;
  background: var(--ink);
}

.manager-readonly strong,
.manager-readonly small {
  display: block;
}

.manager-readonly small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.9px;
}

.summary-manager {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.summary-manager small,
.summary-manager strong {
  display: block;
}

.summary-manager small {
  color: var(--muted);
  font-size: 8.8px;
  text-transform: uppercase;
}

.summary-manager strong {
  margin-top: 3px;
  font-size: 12.1px;
}

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

.product-set-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.product-set-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.set-kicker {
  color: var(--blue);
  font-size: 8.8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-group-card {
  border-color: #d7ddd2;
  box-shadow: 0 12px 34px rgba(46, 57, 48, .06);
}

.library-group-card .set-kicker {
  color: #5f762f;
}

.group-library-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #765c1a;
  background: #fff6d8;
  font-size: 9.35px;
  line-height: 1.4;
}

.group-library-note .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.product-set-card h3,
.offer-set-option h3 {
  margin: 6px 0 0;
  font-size: 16.5px;
}

.product-set-card p,
.offer-set-option p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.0px;
  line-height: 1.55;
}

.set-items {
  max-height: 310px;
  overflow: auto;
  padding: 4px 16px;
}

.set-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.set-item + .set-item {
  border-top: 1px solid #ededed;
}

.set-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
}

.set-item strong,
.set-item small {
  display: block;
}

.set-item strong {
  font-size: 11.0px;
  line-height: 1.35;
}

.set-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.8px;
}

.product-set-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.product-set-card > footer > span {
  color: var(--muted);
  font-size: 9.9px;
}

.product-set-card > footer > div {
  display: flex;
  gap: 6px;
}

.offer-set-list {
  display: grid;
  gap: 10px;
}

.offer-set-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.team-list {
  display: grid;
  padding: 5px 12px 14px;
}

.team-row {
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) 120px 90px 86px 120px;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
}

.team-row + .team-row {
  border-top: 1px solid var(--line);
}

.avatar.large {
  width: 44px;
  height: 44px;
}

.team-person strong,
.team-person small,
.team-person em,
.team-offers strong,
.team-offers small {
  display: block;
}

.team-person strong {
  font-size: 12.1px;
}

.team-person small,
.team-person em,
.team-offers small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.8px;
  font-style: normal;
}

.role-pill,
.employee-status {
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 8.8px;
  font-weight: 850;
}

.role-pill.admin {
  color: #2a5ec7;
  background: #eaf1ff;
}

.role-pill.manager {
  color: #6f5c49;
  background: var(--beige-soft);
}

.role-pill.sales_head {
  color: #147552;
  background: #e1f5eb;
}

.employee-status {
  color: var(--green);
  background: #e8f7f1;
}

.employee-status.inactive {
  color: var(--muted);
  background: #ededed;
}

.access-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 17px 20px;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: var(--blue-soft);
}

.access-note span {
  color: var(--muted);
  font-size: 11.0px;
  line-height: 1.6;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafafa;
}

.check-field input {
  width: auto;
  height: auto;
}

.manager-contact-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  padding: 17px 20px;
  border: 1px solid #e5e1dc;
  border-radius: 6px;
  background: #fff;
}

.manager-contact-card span,
.manager-contact-card h3,
.manager-contact-card p {
  margin: 0;
}

.manager-contact-card > div > span {
  color: var(--beige);
  font-size: 8.8px;
  font-weight: 850;
  text-transform: uppercase;
}

.manager-contact-card h3 {
  margin-top: 4px;
  font-size: 16.5px;
}

.manager-contact-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.9px;
}

.manager-links {
  display: grid;
  gap: 5px;
  text-align: right;
}

.manager-links a {
  color: var(--blue);
  font-size: 11.0px;
  font-weight: 750;
}

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

  .team-row {
    grid-template-columns: 48px minmax(160px, 1fr) 110px 80px 110px;
  }

  .team-row .employee-status {
    display: none;
  }
}

@media (max-width: 760px) {
  .group-actions {
    grid-template-columns: 1fr;
  }

  .offer-set-option,
  .product-set-card > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .team-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .team-row .role-pill,
  .team-row .team-offers {
    display: none;
  }

  .manager-contact-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .manager-links {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Finance ledger */
.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-summary-grid article {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.finance-summary-grid article.profit {
  color: #fff;
  border-color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(42, 119, 237, 0.45), transparent 42%),
    var(--ink);
}

.finance-summary-grid span,
.finance-summary-grid small {
  color: var(--muted);
  font-size: 9.9px;
}

.finance-summary-grid article.profit span,
.finance-summary-grid article.profit small {
  color: rgba(255, 255, 255, 0.64);
}

.finance-summary-grid strong {
  margin: 9px 0 5px;
  font-size: clamp(19.8px, 2vw, 29.7px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.finance-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.finance-toolbar h2,
.finance-toolbar p {
  margin: 0;
}

.finance-toolbar h2 {
  font-size: 15.4px;
  font-weight: 600;
}

.finance-toolbar p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.9px;
}

.finance-toolbar > label {
  min-width: 190px;
  display: grid;
  gap: 5px;
}

.finance-toolbar > label span {
  color: var(--muted);
  font-size: 8.8px;
  font-weight: 700;
  text-transform: uppercase;
}

.finance-toolbar select,
.finance-deal-date input,
.finance-purchase-row > input,
.finance-purchase-row > select,
.finance-money-input input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 11.0px;
}

.finance-toolbar select,
.finance-deal-date input,
.finance-purchase-row > input,
.finance-purchase-row > select {
  width: 100%;
  padding: 0 11px;
}

.finance-deals {
  display: grid;
  gap: 14px;
}

.finance-deal-card {
  overflow: hidden;
  border: 1px solid #dedbd6;
  border-radius: 6px;
  background: #fff;
}

.finance-deal-card.negative {
  border-color: #e7b6b6;
}

.finance-deal-head {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr) 155px 155px;
  align-items: center;
  gap: 17px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.finance-deal-date,
.finance-deal-name,
.finance-deal-revenue,
.finance-deal-margin {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.finance-deal-head span {
  color: var(--muted);
  font-size: 8.8px;
  font-weight: 700;
  text-transform: uppercase;
}

.finance-deal-name a,
.finance-deal-name strong,
.finance-deal-revenue strong,
.finance-deal-margin strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14.3px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-deal-name a:hover {
  color: var(--blue);
}

.finance-deal-name small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-deal-margin {
  padding-left: 15px;
  border-left: 1px solid var(--line);
}

.finance-deal-margin strong {
  color: #147552;
}

.finance-deal-card.negative .finance-deal-margin strong {
  color: #b04444;
}

.finance-deal-margin em {
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: #147552;
  background: #e5f6ee;
  font-size: 8.8px;
  font-style: normal;
  font-weight: 800;
}

.finance-deal-card.negative .finance-deal-margin em {
  color: #b04444;
  background: #fdeaea;
}

.finance-deal-body {
  display: grid;
  grid-template-columns: minmax(400px, 0.95fr) minmax(560px, 1.3fr);
}

.finance-manual-panel,
.finance-costs-panel {
  padding: 18px;
}

.finance-manual-panel {
  border-right: 1px solid var(--line);
  background: #f3faf6;
}

.finance-costs-panel {
  background: #fffdf7;
}

.finance-panel-title {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.finance-panel-title span {
  color: var(--muted);
  font-size: 7.7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-panel-title h3 {
  margin: 4px 0 0;
  font-size: 13.2px;
  font-weight: 650;
}

.finance-revenue-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 15px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #cfe7d9;
  border-radius: 4px;
  background: #fff;
}

.finance-revenue-row span,
.finance-revenue-row em {
  color: var(--muted);
  font-size: 8.8px;
  font-style: normal;
}

.finance-revenue-row strong {
  grid-row: span 2;
  font-size: 14.3px;
}

.finance-purchases {
  display: grid;
  gap: 7px;
}

.finance-purchase-row {
  display: grid;
  grid-template-columns: 24px 110px minmax(120px, 1fr) minmax(120px, 1fr) 120px 34px;
  align-items: center;
  gap: 7px;
}

.purchase-number {
  color: var(--muted);
  font-size: 9.9px;
  text-align: center;
}

.finance-purchase-row .icon-button {
  width: 34px;
  height: 34px;
  color: #b04444;
}

.finance-purchase-empty {
  padding: 24px 12px;
  border: 1px dashed #bdd9c9;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 9.9px;
  text-align: center;
}

.finance-money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.finance-money-input input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 8px;
}

.finance-money-input span {
  color: var(--muted);
  font-size: 9.9px;
  text-align: center;
}

.finance-panel-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #cfe7d9;
}

.finance-panel-total span {
  color: var(--muted);
  font-size: 9.9px;
}

.finance-panel-total strong {
  font-size: 15.4px;
}

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

.finance-auto-field,
.finance-expense-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.finance-auto-field {
  align-content: space-between;
  border-color: #cfddf5;
  background: #edf4ff;
}

.finance-expense-field.manual-field {
  border-color: #cfe7d9;
  background: #edf8f2;
}

.finance-expense-field.tax-field {
  border-color: #eadca7;
  background: #fff8df;
}

.finance-auto-field > div,
.finance-expense-field > div {
  min-height: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.finance-auto-field span,
.finance-expense-field > div > span {
  color: #59677b;
  font-size: 8.8px;
  line-height: 1.25;
}

.finance-auto-field em {
  padding: 3px 5px;
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  font-size: 7.7px;
  font-style: normal;
  font-weight: 800;
}

.finance-auto-field strong {
  font-size: 14.3px;
}

.finance-percent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #b8cff4;
  border-radius: 999px;
  cursor: pointer;
  color: var(--blue);
  background: #fff;
  font-weight: 800;
}

.finance-percent-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--blue);
}

.finance-percent-toggle span {
  color: var(--blue);
  font-size: 8.8px;
}

.finance-expense-field.manual-field.disabled {
  opacity: 0.48;
}

.finance-expense-field.manual-field.disabled input {
  cursor: not-allowed;
}

.finance-expense-field > div > button {
  padding: 3px 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #7d6729;
  background: #fff;
  font-size: 7.7px;
  font-weight: 800;
}

.finance-result-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #cad7e7;
  border-radius: 4px;
  background: #cad7e7;
}

.finance-result-strip > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #edf4ff;
}

.finance-result-strip span {
  color: var(--muted);
  font-size: 8.8px;
}

.finance-result-strip strong {
  font-size: 14.3px;
}

.finance-profit-total {
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 0 auto;
  padding: 18px 22px;
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
}

.finance-profit-total span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11.0px;
}

.finance-profit-total strong {
  font-size: 22.0px;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .finance-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-deal-head {
    grid-template-columns: 140px minmax(220px, 1fr) 145px 145px;
  }

  .finance-deal-body {
    grid-template-columns: 1fr;
  }

  .finance-manual-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  }

  .nav-item[href="#/clients"],
  .nav-item[href="#/settings"] {
    display: none;
  }

  .finance-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .finance-summary-grid article {
    min-height: 104px;
    padding: 14px;
  }

  .finance-toolbar,
  .finance-panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-toolbar > label {
    min-width: 0;
  }

  .finance-deal-head {
    grid-template-columns: 1fr 1fr;
  }

  .finance-deal-name {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .finance-deal-date {
    grid-column: 1 / -1;
  }

  .finance-deal-margin {
    padding-left: 10px;
  }

  .finance-manual-panel,
  .finance-costs-panel {
    padding: 14px;
  }

  .finance-purchase-row {
    grid-template-columns: 22px minmax(0, 1fr) 34px;
  }

  .finance-purchase-row > input[type="date"] {
    grid-column: 2;
  }

  .finance-purchase-row > select,
  .finance-purchase-row .finance-money-input {
    grid-column: 2 / 4;
  }

  .finance-purchase-row .icon-button {
    grid-column: 3;
    grid-row: 1;
  }

  .finance-cost-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .finance-profit-total {
    max-width: none;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .finance-summary-grid,
  .finance-cost-grid,
  .finance-deal-head {
    grid-template-columns: 1fr;
  }

  .finance-deal-name,
  .finance-deal-date {
    grid-column: auto;
  }

  .finance-deal-margin {
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .nav-list {
    display: flex;
    width: 100%;
    gap: 3px;
  }

  .nav-item,
  .nav-item:nth-child(5) {
    min-width: 0;
    flex: 1 1 0;
  }

  .nav-item:nth-child(5) {
    display: flex;
  }
}

/* K15 AI voice draft and manager review */
.button.ai-primary { color:#fff; border-color:#6254d8; background:linear-gradient(135deg,#6254d8,#8a5bd8); box-shadow:0 10px 24px rgba(98,84,216,.2); }
.ai-kicker { display:block; margin-bottom:5px; color:#6254d8; font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.voice-command-body { display:grid; gap:18px; }
.voice-security-note { display:grid; gap:5px; padding:15px 17px; border:1px solid #ddd8ff; border-radius:14px; color:#433c7c; background:#f7f5ff; }
.voice-security-note span,.voice-command-tools small { color:#6d6a7d; line-height:1.45; }
.voice-command-field { display:grid; gap:8px; font-weight:700; }
.voice-command-field textarea { min-height:170px; resize:vertical; }
.voice-command-tools { display:flex; align-items:center; gap:14px; }
.voice-record-button.recording { color:#fff; border-color:#d64545; background:#d64545; animation:voice-pulse 1.25s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow:0 0 0 8px rgba(214,69,69,.12); } }
.modal.extra-wide { width:min(1180px,100%); }
.ai-recognition-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:18px; }
.ai-recognition-summary>span { display:grid; gap:4px; padding:13px 15px; border:1px solid #e7e7ec; border-radius:12px; background:#fafafd; }
.ai-recognition-summary small { color:#85828e; }
.ai-recognition-summary strong { overflow-wrap:anywhere; }
.ai-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.ai-review-category { overflow:hidden; border:1px solid #e4e3e8; border-radius:15px; background:#fff; }
.ai-review-category>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border-bottom:1px solid #ecebf0; background:#f8f8fa; }
.ai-review-category.found>header { background:#f1faf5; }
.ai-review-category.automatic>header { background:#f3f6ff; }
.ai-review-category.recommended>header { background:#fff9ec; }
.ai-review-category.confirmation>header { background:#fff2f0; }
.ai-review-category h3 { margin:0 0 2px; font-size:11px; }
.ai-review-category p { margin:0; color:#777480; font-size:9px; }
.ai-review-category>header>span { display:grid; place-items:center; min-width:28px; height:28px; border-radius:999px; background:#fff; font-weight:800; }
.ai-review-item { display:grid; grid-template-columns:25px 52px minmax(0,1fr) 74px; gap:10px; align-items:center; padding:12px 14px; border-bottom:1px solid #efeff2; opacity:.72; }
.ai-review-item:last-child { border-bottom:0; }
.ai-review-item.selected { opacity:1; background:#fcfcff; }
.ai-review-item>img { width:52px; height:52px; border-radius:9px; object-fit:cover; background:#f2f2f4; }
.ai-review-select input { width:18px; height:18px; accent-color:#6254d8; }
.ai-review-copy { display:grid; gap:3px; min-width:0; }
.ai-review-copy strong { font-size:10px; }
.ai-review-copy span,.ai-review-copy small { color:#777480; font-size:8.5px; line-height:1.35; }
.ai-qty { display:grid; gap:4px; font-size:8px; color:#777480; }
.ai-qty input { min-width:0; padding:8px; }
.ai-item-actions { grid-column:3/-1; display:flex; gap:5px; justify-content:flex-end; }
.ai-warning-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:#b13d32; background:#fee8e4; font-weight:900; }
.ai-empty-category { padding:20px 16px; color:#9996a0; text-align:center; }
.ai-review-footer label { display:flex; align-items:center; gap:9px; margin-right:auto; font-size:9px; font-weight:700; }
.ai-review-footer select { min-width:190px; }
.ai-replacement-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ai-replacement-card { display:grid; grid-template-columns:58px 1fr; gap:12px; align-items:center; padding:10px; border:1px solid #e5e4e9; border-radius:12px; text-align:left; background:#fff; }
.ai-replacement-card:hover { border-color:#6254d8; background:#f8f7ff; }
.ai-replacement-card img { width:58px; height:58px; border-radius:9px; object-fit:cover; }
.ai-replacement-card span { display:grid; gap:4px; }
.ai-replacement-card small { color:#777480; }
@media (max-width:800px) {
  .voice-command-tools,.ai-review-footer,.ai-review-footer label { align-items:stretch; flex-direction:column; }
  .ai-recognition-summary,.ai-review-grid,.ai-replacement-grid { grid-template-columns:1fr; }
  .ai-review-item { grid-template-columns:25px 46px minmax(0,1fr); }
  .ai-review-item>img { width:46px; height:46px; }
  .ai-qty,.ai-item-actions { grid-column:3; }
  .ai-item-actions { justify-content:flex-start; }
  .ai-review-footer label { margin-right:0; }
}

.pdf-ready-card,
.pdf-device-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 17px;
  border: 1px solid #dce4dd;
  border-radius: 14px;
  background: #f5faf6;
}

.pdf-ready-card .icon { width: 30px; height: 30px; flex: 0 0 auto; color: #5f762f; }
.pdf-ready-card div,
.pdf-device-note { display: grid; gap: 5px; }
.pdf-ready-card span,
.pdf-device-note span { color: #6f766f; line-height: 1.45; }
.pdf-device-note { margin-top: 12px; border-color: #e5e2d9; background: #fbfaf6; }
.pdf-ready-actions { flex-wrap: wrap; }
.pdf-ready-actions .button { min-height: 42px; }

@media (max-width: 680px) {
  .pdf-ready-actions { display: grid; grid-template-columns: 1fr; }
  .pdf-ready-actions .button { width: 100%; justify-content: center; }
}

/* Offer-only product naming */
.item-main .item-catalog-copy {
  min-width: 0;
  flex: 1;
}
.item-name-control {
  grid-column: 1 / -1;
  padding: 11px 12px 10px;
  border: 1px solid rgba(42, 119, 237, 0.24);
  border-radius: 10px;
  background: rgba(42, 119, 237, 0.045);
}
.item-name-control .table-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 750;
}
.item-name-control .table-label svg {
  width: 14px;
  height: 14px;
  color: var(--blue);
}
.item-name-input {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  color: var(--ink-2);
  background: #fff;
  font: inherit;
  font-size: 13.2px;
  font-weight: 750;
  line-height: 1.35;
}
.item-name-input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(42, 119, 237, 0.12);
}
.item-name-control small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9.9px;
  font-weight: 600;
}
