:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f4f6fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6fa;
}

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

.hidden {
  display: none !important;
}

.content {
  max-width: 720px;
  margin: auto;
  padding: 18px 15px 105px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f4f6faee;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 18px;
}

.top h1 {
  font-size: 27px;
  margin: 0;
  flex: 1;
}

.online {
  color: #07845b;
  background: #e9fbf3;
  border-radius: 99px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
}

.nav {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  overflow-x: auto;
  background: #fff;
  border-top: 1px solid #dde3ec;
  padding: 7px;
}

.nav button {
  min-width: 73px;
  flex: 1;
  border: 0;
  background: transparent;
  color: #667085;
  padding: 7px 2px;
  border-radius: 11px;
  font-size: 9px;
  font-weight: 750;
}

.nav span {
  display: block;
  font-size: 19px;
}

.nav .active {
  background: #eaf1ff;
  color: #2864e8;
}

.panel,
.record,
.stat {
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
  padding: 18px;
}

.section {
  margin-top: 16px;
}

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

.stat strong {
  font-size: 23px;
  display: block;
}

.stat small,
.muted,
small {
  color: #718096;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 15px;
}

.control {
  height: 47px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  padding: 0 13px;
}

.primary,
.secondary,
.danger {
  border-radius: 12px;
  min-height: 45px;
  padding: 0 16px;
  font-weight: 800;
}

.primary {
  border: 0;
  background: #5064a2;
  color: #fff;
}

.secondary {
  border: 1px solid #ccd5e8;
  background: #eef2ff;
  color: #42558e;
}

.danger {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #d92d20;
}

.wide {
  width: 100%;
  margin-top: 16px;
}

.products {
  display: grid;
  gap: 10px;
}

.product {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 17px;
  padding: 14px;
}

.product.low {
  border-color: #f4b323;
  background: #fffbeb;
}

.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #edf3ff;
  color: #2864e8;
  border-radius: 12px;
  font-size: 21px;
  overflow: hidden;
}

.icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

.qr-image {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
  background: #fff;
  border-radius: 12px;
}

.pill {
  padding: 7px 9px;
  border-radius: 99px;
  background: #eafaf2;
  color: #07845b;
  font-size: 11px;
  font-weight: 800;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #667085;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.field textarea {
  min-height: 78px;
}

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

.qty {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  gap: 8px;
}

.line,
.record {
  margin-top: 10px;
}

.line {
  border: 1px solid #d9e1ec;
  border-radius: 13px;
  padding: 11px;
}

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

.record-lines {
  border-top: 1px solid #e5e7eb;
  margin-top: 10px;
  padding-top: 9px;
  line-height: 1.6;
  color: #475569;
  font-size: 13px;
}

.tabs {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  margin-bottom: 13px;
}

.tabs button {
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
}

.tabs .active {
  background: #e8ecfa;
}

.reader {
  min-height: 320px;
  background: #101827;
  border-radius: 14px;
  overflow: hidden;
}

.overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: #101828a5;
  padding: 14px;
  display: flex;
  align-items: flex-end;
}

.modal {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  margin: auto;
  background: #f8f9fc;
  border-radius: 25px 25px 17px 17px;
  padding: 21px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.notice,
.error {
  padding: 11px 13px;
  border-radius: 11px;
  margin-top: 12px;
}

.notice {
  background: #ecfdf3;
  color: #027a48;
}

.error {
  background: #fff1f2;
  color: #b42318;
}

.login {
  max-width: 460px;
  margin: 8vh auto;
  padding: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.logo {
  width: 46px;
  height: 46px;
  background: #2864e8;
  color: #fff;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.login-card {
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 24px;
  padding: 26px;
}

.logout {
  border: 0;
  background: #fee2e2;
  color: #b42318;
  border-radius: 10px;
  padding: 8px;
}

.admin-only {
  display: none;
}

.admin .admin-only {
  display: initial;
}

#app:not(.admin) .admin-only,
#app:not(.admin) .nav-settings,
#app:not(.admin) [data-page="domain"],
#app:not(.admin) #domainPage,
#app:not(.admin) [data-history="reports"],
#app:not(.admin) [data-history="audit"] {
  display: none !important;
}
.user-row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-row > span:nth-child(2) > b {
  line-height: 1.3;
}

.user-row > span:nth-child(2) > small {
  line-height: 1.4;
}

.catalog-head,
.desktop-col {
  display: none;
}

.mobile-main b {
  font-size: 17px;
}

.mobile-main small {
  line-height: 1.5;
}

.chevron {
  color: #94a3b8;
  font-size: 24px;
}

.stock-box {
  background: #ecfdf3;
  border: 1px solid #c7f1d8;
  border-radius: 24px;
  padding: 8px 12px;
  color: #087443;
}

.stock-box.low {
  background: #fff3cd;
  border-color: #fbbf24;
  color: #92400e;
}

.stock-box small {
  font-size: 10px;
  color: inherit;
}

.price-grid {
  display: grid;
  grid-template-columns: 52px repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.currency,
.price-cell {
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
}

.currency {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.currency.pln {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.currency.eur {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.price-cell small {
  font-size: 9px;
}

.price-cell b {
  display: block;
  margin-top: 3px;
}

.detail-layout {
  display: grid;
  gap: 22px;
}

.detail-label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.detail-code {
  font-size: 28px;
  margin: 6px 0 18px;
}

.inventory-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 17px;
}

.inventory-box strong {
  font-size: 20px;
}

.detail-photo {
  height: 280px;
}

.catalog-head {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.suggest-wrap {
  position: relative;
}

.suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 13px;
  padding: 6px;
  box-shadow: 0 18px 40px #10182824;
  max-height: 280px;
  overflow: auto;
}

.suggestion {
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 9px;
  padding: 10px 11px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.suggestion:hover,
.suggestion:focus {
  background: #eef3ff;
}

.suggestion b {
  display: block;
}

.suggestion small {
  margin-top: 2px;
}

.suggest-stock {
  text-align: right;
  color: #087443;
  font-weight: 800;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .content {
    max-width: none;
    margin: 0;
    padding: 0 46px 55px 302px;
  }
  .top {
    padding: 27px 0 23px;
  }
  .top h1 {
    font-size: 35px;
  }
  .nav {
    top: 0;
    right: auto;
    width: 256px;
    bottom: 0;
    flex-direction: column;
    padding: 123px 16px 20px;
    background: #101827;
    border: 0;
  }
  .nav:before {
    content: "VSBR  СКЛАД";
    position: absolute;
    top: 42px;
    left: 27px;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
  }
  .nav button {
    min-width: 0;
    flex: 0;
    text-align: left;
    display: flex;
    gap: 13px;
    align-items: center;
    color: #cbd5e1;
    padding: 12px 15px;
    font-size: 14px;
  }
  .nav span {
    width: 24px;
    text-align: center;
  }
  .nav .active {
    background: #2d67e8;
    color: #fff;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 27px;
  }
  .overlay {
    align-items: center;
  }
  .modal {
    border-radius: 25px;
  }
  .history {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .history .record {
    margin: 0;
  }
  .catalog-head,
  .product.catalog-row {
    grid-template-columns:
      68px minmax(110px, 1.25fr) minmax(150px, 1.25fr) minmax(190px, 1.35fr)
      minmax(130px, 1.25fr) minmax(180px, 2fr) 25px;
    column-gap: 18px;
    padding-left: 26px;
    padding-right: 26px;
  }
  .catalog-head {
    display: grid;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: center;
  }
  .catalog-head span {
    text-align: center;
  }
  .product.catalog-row {
    min-height: 102px;
    padding-top: 14px;
    padding-bottom: 14px;
    align-items: center;
  }
  .catalog-row .desktop-col {
    display: block;
  }
  .catalog-row .mobile-main {
    display: none;
  }
  .catalog-row .icon {
    width: 68px;
    height: 68px;
  }
  .catalog-row .pill {
    justify-self: center;
  }
  .catalog-row .stock-box {
    justify-self: center;
    width: 100%;
    max-width: 245px;
  }
  .catalog-row .desc {
    color: #475569;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    text-align: center;
  }
  .catalog-row .code {
    font-size: 19px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }
  .catalog-row .price {
    font-size: 17px;
    font-weight: 750;
    text-align: center;
  }
  .catalog-head span,
  .catalog-row .desktop-col {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .catalog-head span {
    white-space: nowrap;
  }
  .detail-layout {
    grid-template-columns: 390px 1fr;
  }
  .detail-photo {
    height: 100%;
    min-height: 470px;
  }
  .modal.product-modal {
    width: min(920px, 100%);
  }
}

.shipping-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}

.shipping-hero .hero-copy {
  flex: 1;
}

.shipping-hero h2 {
  margin: 0 0 5px;
}

.ship-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 14px;
  margin-top: 26px;
}

.ship-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
}

.ship-stat strong {
  display: block;
  font-size: 20px;
}

.ship-stat small {
  font-size: 11px;
}

.ship-modal {
  width: min(940px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0;
}

.modal-head .secondary {
  margin-left: auto;
}

.ship-add {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}

.ship-add-grid {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) 230px 150px 145px;
  gap: 12px;
  align-items: end;
}
.segment {
  display: flex;
  border: 1px solid #aeb8c8;
  border-radius: 12px;
  overflow: hidden;
  height: 47px;
}

.segment button {
  flex: 1;
  border: 0;
  background: #fff;
  color: #344054;
  font-weight: 750;
}

.segment button.active {
  background: #e6eafd;
  color: #3d4f88;
}

.counter {
  display: flex;
  align-items: center;
  gap: 7px;
}

.counter button {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 50%;
  font-size: 19px;
}

.counter button.plus {
  background: #e7ebfb;
  border: 0;
}

.counter input {
  width: 62px;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px;
}

.ship-box {
  display: grid;
  grid-template-columns: 1fr 210px 110px 205px 150px;
  align-items: center;
  gap: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 14px;
}

.ship-line {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 13px;
  margin-top: 9px;
}

.ship-line-main {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 145px 145px 160px 42px;
  align-items: center;
  gap: 10px;
}

.remove-line {
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #f1f4f8;
  color: #7c8799;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.remove-line:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
  transform: scale(1.04);
}

.remove-line:active {
  transform: scale(0.96);
}

.ship-line-tax {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #edf0f5;
  margin-top: 10px;
  padding-top: 10px;
}

.ship-summary {
  font-size: 13px;
  font-weight: 800;
}

.receipt {
  margin-top: 24px;
}

.receipt-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receipt-title b {
  letter-spacing: 0.8px;
}

.receipt-title small {
  margin-left: auto;
}

.receipt-head,
.receipt-row {
  display: grid;
  grid-template-columns: 4fr 3fr 3fr 2fr;
  gap: 12px;
  align-items: start;
}

.receipt-head {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  padding: 14px 0 8px;
}

.receipt-row {
  border-top: 1px solid #e2e8f0;
  padding: 13px 0;
  font-size: 12px;
  font-weight: 700;
}

.receipt-row span:last-child {
  text-align: right;
}

.receipt-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 13px;
  font-weight: 800;
  margin-top: 12px;
}

.receipt-total strong {
  font-size: 22px;
}

.ship-empty {
  padding: 24px;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #94a3b8;
}

.vat-badge {
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 899px) {
  .ship-add-grid,
  .ship-box,
  .ship-line-main {
    display: grid;
    grid-template-columns: 1fr;
  }
  .ship-stats {
    grid-template-columns: 1fr;
  }
  .shipping-hero {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .remove-line {
    justify-self: end;
  }
}

.reserve-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reserve-hero .hero-copy {
  flex: 1;
}

.reserve-hero h2 {
  margin: 0 0 5px;
}

.purple-icon {
  background: #f3e8ff;
  color: #7c3aed;
}

.purple-button {
  background: #7c3aed;
}

.reservation-card {
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
  margin-top: 12px;
  overflow: hidden;
}

.reservation-head {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 48px 1fr auto 28px;
  gap: 13px;
  align-items: center;
  text-align: left;
}

.reservation-card.inactive .reservation-head {
  background: #f8fafc;
}

.reservation-state {
  padding: 6px 10px;
  border-radius: 99px;
  background: #f3e8ff;
  color: #7c3aed;
  font-size: 11px;
  font-weight: 800;
}

.reservation-card.inactive .reservation-state {
  background: #e2e8f0;
  color: #64748b;
}

.reservation-details {
  border-top: 1px solid #e2e8f0;
  padding: 8px 22px 18px;
}

.reservation-product {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f5;
}

.reservation-product span:last-child {
  text-align: right;
}

.reservation-empty {
  height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
}

.reserve-add-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 230px 205px 170px;
  gap: 12px;
  align-items: end;
}

.reserve-line {
  display: grid;
  grid-template-columns: 1fr 210px 44px;
  gap: 12px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
}

.qr-toolbar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
}

.qr-toolbar button {
  border: 1px solid #aeb8c8;
  background: #fff;
  padding: 11px 16px;
  font-weight: 750;
}

.qr-toolbar button:first-child {
  border-radius: 12px 0 0 12px;
}

.qr-toolbar button:last-child {
  border-radius: 0 12px 12px 0;
}

.qr-toolbar button.active {
  background: #e8ecfa;
  color: #3d4f88;
}

.qr-table-head,
.qr-list-row {
  display: grid;
  grid-template-columns: 76px 2fr 2fr 2fr 2fr 3fr 40px;
  gap: 14px;
  align-items: center;
}

.qr-table-head {
  padding: 14px 20px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.qr-list-row {
  width: 100%;
  border: 1px solid #d9e1ec;
  background: #fff;
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 10px;
  text-align: left;
}

.qr-list-row .qr-image {
  width: 52px;
  height: 52px;
  border: 1px solid #e2e8f0;
  padding: 4px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px;
}

.qr-card {
  border: 1px solid #d9e1ec;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
}

.qr-card .qr-image {
  width: 150px;
  height: 150px;
  padding: 8px;
  border: 1px solid #e2e8f0;
}

.qr-card b {
  display: block;
  margin-top: 12px;
  font-size: 16px;
}

.qr-detail {
  text-align: center;
}

.qr-detail .qr-image {
  width: 270px;
  height: 270px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 1200px) and (min-width: 900px) {
  .qr-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 899px) {
  .qr-table-head {
    display: none;
  }
  .qr-list-row {
    grid-template-columns: 62px 1fr 30px;
  }
  .qr-list-row .qr-desktop {
    display: none;
  }
  .qr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.return-hero {
  display: flex;
  align-items: center;
  gap: 20px;
}

.return-hero .hero-copy {
  flex: 1;
}

.return-hero h2 {
  margin: 0 0 5px;
}

.green-icon {
  background: #ecfdf5;
  color: #059669;
}

.green-button {
  background: #059669;
}

.return-form-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 250px 205px;
  gap: 14px;
  align-items: end;
}

.history {
  display: block !important;
}

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

.history-card {
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 17px;
  margin-top: 12px;
  overflow: hidden;
}

.history-head {
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr auto 28px;
  gap: 14px;
  align-items: center;
  border: 0;
  background: #fff;
  padding: 17px 21px;
  text-align: left;
}

.history-detail {
  padding: 0 22px 20px;
}

.calendar {
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 17px;
  padding: 20px;
  margin-top: 14px;
}

.calendar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-title strong {
  flex: 1;
  text-align: center;
  font-size: 17px;
}

.calendar-week,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-week {
  margin: 14px 0 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.calendar-day {
  height: 42px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  font-weight: 650;
}

.calendar-day.has-sales {
  font-weight: 900;
}

.calendar-day.red {
  background: #fee2e2;
  color: #b91c1c;
}

.calendar-day.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.calendar-day.yellow {
  background: #fef3c7;
  color: #b45309;
}

.calendar-day.selected {
  outline: 2px solid #0f172a;
}

.calendar-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: #64748b;
  font-size: 11px;
}

.legend-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 6px;
}

.return-history-row,
.audit-row {
  display: grid;
  grid-template-columns: 48px 2fr 1fr 1.2fr 1.5fr;
  gap: 15px;
  align-items: center;
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 16px;
  padding: 17px 21px;
  margin-bottom: 11px;
}

.audit-row {
  grid-template-columns: 44px 2fr 3fr 1fr;
  align-items: start;
}

.audit-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 13px;
  padding: 13px 16px;
  margin-bottom: 14px;
  font-weight: 700;
}

.report-card {
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 17px;
  padding: 23px;
  margin-bottom: 14px;
}

.report-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.report-title > span:nth-child(2) {
  flex: 1;
}

.weekly-metrics {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.weekly-metric,
.report-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 15px;
}

.report-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  margin-top: 18px;
}

.report-section h3 {
  margin: 0 0 12px;
}

.report-section .report-line {
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 10px 0;
}

.empty-history {
  height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 899px) {
  .return-history-row,
  .audit-row {
    grid-template-columns: 44px 1fr;
  }
  .return-history-row > *:nth-child(n + 3),
  .audit-row > *:nth-child(n + 3) {
    grid-column: 2;
  }
  .receipt-head,
  .receipt-row {
    grid-template-columns: 2fr 1fr;
  }
  .receipt-head span:nth-child(n + 3),
  .receipt-row span:nth-child(n + 3) {
    display: none;
  }
}

/* История — визуально как в настольной программе */
#historyPage {
  max-width: 1000px;
  padding-top: 18px;
}

#historyPage > .tabs {
  margin: 0 0 20px;
  padding: 4px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d9e1ec;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

#historyPage > .tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  color: #43506a;
  font-size: 13px;
  font-weight: 800;
}

#historyPage > .tabs button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

#historyPage > .tabs button.active {
  background: #e8ecfa;
  color: #3e518d;
  box-shadow: 0 2px 8px rgba(57, 75, 132, 0.12);
}

.history-tools {
  min-height: 50px;
}

.history-tools .secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  background: #eef2ff;
}

.history-tools .secondary svg {
  width: 19px;
  height: 19px;
}

.history-count {
  font-size: 13px;
  font-weight: 650;
}

.history-card {
  border-color: #dfe5ef;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.history-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 11px 30px rgba(15, 23, 42, 0.07);
}

.history-head {
  min-height: 76px;
  padding: 14px 20px;
  cursor: pointer;
}

.history-entry-icon,
.history-row-icon,
.history-empty-icon,
.report-main-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
}

.history-entry-icon {
  width: 44px;
  height: 44px;
  background: #eff6ff;
  color: #2563eb;
}

.history-entry-icon svg,
.history-row-icon svg,
.report-main-icon svg {
  width: 23px;
  height: 23px;
}

.history-head-copy {
  min-width: 0;
}

.history-head-copy b {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-head-copy small {
  display: block;
  margin-top: 5px;
}

.history-amount {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.history-chevron {
  width: 22px;
  height: 22px;
  color: #64748b;
  transition: transform 0.18s ease;
}
.history-card.open .history-chevron {
  transform: rotate(180deg);
}

.history-detail {
  border-top: 1px solid #edf0f5;
  padding: 4px 22px 20px;
}

.history-detail .receipt-row span > small {
  display: block;
  margin-top: 4px;
}

.calendar {
  border-color: #dfe5ef;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

.calendar-title .secondary {
  width: 42px;
  min-height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}

.calendar-title .secondary svg {
  width: 20px;
  height: 20px;
}

.calendar-day {
  cursor: pointer;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease;
}

.calendar-day:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 11px rgba(15, 23, 42, 0.09);
}

.history-row-icon {
  width: 46px;
  height: 46px;
}

.history-row-icon.return {
  background: #ecfdf5;
  color: #059669;
}

.history-row-icon.audit {
  width: 42px;
  height: 42px;
  background: #f1f5f9;
  color: #475569;
}

.return-history-row,
.audit-row {
  border-color: #dfe5ef;
  box-shadow: 0 7px 22px rgba(15, 23, 42, 0.04);
}

.return-history-row b,
.audit-row b {
  color: #0f172a;
}

.audit-notice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-notice svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.report-card {
  padding: 24px;
  border-color: #dfe5ef;
  box-shadow: 0 8px 27px rgba(15, 23, 42, 0.045);
}

.report-main-icon {
  width: 44px;
  height: 44px;
  background: #eff6ff;
  color: #2563eb;
}

.report-title-copy {
  flex: 1;
}

.report-title-copy b {
  display: block;
  font-size: 16px;
}

.report-title-copy small {
  display: inline-flex;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}

.report-title-copy small.current {
  color: #047857;
}

.report-total {
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.weekly-metric {
  min-height: 56px;
  align-items: center;
}

.weekly-metric span {
  color: #56647a;
}

.weekly-metric b {
  color: #0f172a;
}

.report-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.report-section-title svg {
  width: 21px;
  height: 21px;
}

.report-section-title.people {
  color: #7c3aed;
}

.report-section-title.best {
  color: #059669;
}

.report-section-title.quiet {
  color: #dc2626;
}

.report-section-title span {
  color: #0f172a;
}

.history-empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  background: #f1f5f9;
  color: #94a3b8;
}

.history-empty-icon svg {
  width: 31px;
  height: 31px;
}

.empty-history h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

@media (max-width: 899px) {
  #historyPage {
    padding-top: 10px;
  }
  #historyPage > .tabs {
    max-width: 100%;
    overflow-x: auto;
  }
  .history-head {
    grid-template-columns: 44px minmax(0, 1fr) 22px;
  }
  .history-amount {
    grid-column: 2;
  }
  .history-chevron {
    grid-column: 3;
    grid-row: 1/3;
  }
  .report-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .report-total {
    margin-left: 57px;
  }
  .return-history-row,
  .audit-row {
    padding: 15px;
  }
  .calendar {
    padding: 15px;
  }
}

.settings-block {
  padding: 4px 0 26px;
}

.settings-block + .settings-block {
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
}

.settings-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.settings-title h2 {
  margin: 0;
  font-size: 18px;
}

.settings-description {
  color: #64748b;
  font-size: 13px;
  margin: 8px 0 18px;
}

.settings-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 10px;
}

.user-row > span:nth-child(2) {
  flex: 1;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.user-avatar.admin {
  background: #dbeafe;
  color: #2563eb;
}

.user-avatar.employee {
  background: #ecfdf5;
  color: #059669;
}

.exchange-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 230px)) auto;
  gap: 12px;
  align-items: end;
}

.exchange-rate-card {
  position: relative;
}

.exchange-rate-card > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: #56647a;
  font-size: 11.5px;
  font-weight: 800;
}

.exchange-rate-card input {
  padding-right: 80px;
}

.exchange-rate-card .rate-suffix {
  position: absolute;
  right: 13px;
  bottom: 14px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.settings-title .icon svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 899px) {
  .exchange-rate-grid {
    grid-template-columns: 1fr;
  }
  .exchange-rate-grid .primary {
    width: 100%;
  }
}

/* Единый визуальный слой веб-версии */
body {
  background: radial-gradient(circle at 78% -10%, #eaf0ff 0, transparent 31%), #f4f6fa;
}

.panel,
.record,
.history-card,
.reservation-card,
.report-card,
.qr-card,
.qr-list-row,
.return-history-row,
.audit-row {
  border-color: #dfe5ef;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.045);
}

.panel {
  border-radius: 20px;
}

.primary,
.secondary,
.danger,
.control {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.primary:hover,
.secondary:hover,
.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(39, 60, 116, 0.13);
}

.primary:active,
.secondary:active,
.danger:active {
  transform: translateY(0);
}

.primary {
  background: linear-gradient(135deg, #5369aa, #465a96);
  box-shadow: 0 6px 14px rgba(70, 90, 150, 0.18);
}

.field input,
.field select,
.field textarea,
.counter input {
  border-color: #d3dae7;
  outline: none;
  transition:
    border-color 0.17s ease,
    box-shadow 0.17s ease,
    background 0.17s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #aebbd0;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.counter input:focus {
  border-color: #6075b5;
  box-shadow: 0 0 0 4px rgba(80, 100, 162, 0.12);
}

.overlay {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(7px);
  animation: overlayIn 0.16s ease;
}

.modal {
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal > h2 {
  margin: 0 0 20px;
  font-size: 22px;
}

.modal-head {
  margin: -2px -2px 22px;
  padding: 0 2px 18px;
}

.suggestions {
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  padding: 7px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
  animation: menuIn 0.14s ease;
}

.suggestion {
  border-radius: 11px;
  transition:
    background 0.13s ease,
    transform 0.13s ease;
}

.suggestion:hover {
  transform: translateX(2px);
}

.segment {
  border-color: #cbd4e2;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.segment button {
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.segment button.active {
  background: linear-gradient(135deg, #e8ecfb, #dfe6fb);
  color: #354a88;
}

.tabs {
  gap: 0;
  width: max-content;
  padding: 4px;
  background: #fff;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.tabs button {
  border: 0;
  background: transparent;
  border-radius: 10px;
  margin: 0;
  padding: 10px 14px;
}

.tabs .active {
  background: #e8ecfa;
  color: #3e518d;
  box-shadow: 0 2px 8px rgba(57, 75, 132, 0.12);
}

.pretty-select {
  position: relative;
  min-width: 190px;
}

.pretty-select-button {
  height: 50px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d5ddea;
  border-radius: 14px;
  background: #fff;
  padding: 0 12px;
  color: #344054;
  font-weight: 750;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.pretty-select-button:hover {
  border-color: #aebbd0;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.pretty-select-button .select-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #eef2ff;
  color: #5064a2;
  display: grid;
  place-items: center;
}

.pretty-select-button .select-label {
  flex: 1;
  text-align: left;
}

.pretty-select-button .select-arrow {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f4f6fa;
  display: grid;
  place-items: center;
  transition: transform 0.18s ease;
}

.pretty-select.open .select-arrow {
  transform: rotate(180deg);
}

.pretty-select-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  padding: 7px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
  animation: menuIn 0.15s ease;
}

.pretty-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 11px 12px;
  color: #344054;
  text-align: left;
  font-weight: 650;
  transition:
    background 0.13s ease,
    color 0.13s ease;
}

.pretty-select-option:hover {
  background: #f0f4ff;
  color: #304b93;
}

.pretty-select-option.active {
  background: #e8efff;
  color: #2458c6;
}

.pretty-select-option .check {
  width: 18px;
  color: #2563eb;
}

.user-row,
.ship-line,
.reserve-line,
.inventory-box,
.ship-add,
.ship-box {
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.user-row:hover,
.ship-line:hover,
.reserve-line:hover {
  border-color: #c4cfdf;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.05);
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

input[type="file"] {
  padding: 6px;
  background: #fff;
  color: #667085;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 10px;
  background: #eef2ff;
  color: #41568f;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
  margin-right: 12px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #dde6ff;
  color: #244ca5;
}

.role-picker {
  width: 100%;
  box-shadow: inset 0 0 0 1px #d8e0ec;
}

.role-picker button {
  min-height: 46px;
}

.notifications-wrap {
  position: relative;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: #fff;
  color: #455475;
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.notification-button:hover {
  transform: translateY(-1px);
  border-color: #aebbd0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.notification-badge {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #f4f6fa;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.notification-panel {
  position: absolute;
  z-index: 35;
  right: 0;
  top: calc(100% + 10px);
  width: min(390px, calc(100vw - 30px));
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid #dfe5ef;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(12px);
  animation: menuIn 0.16s ease;
}

.notification-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 11px 12px;
}

.notification-title b {
  font-size: 16px;
}

.notification-title small {
  color: #b45309;
  font-weight: 800;
}

.notification-item {
  width: 100%;
  border: 0;
  border-top: 1px solid #edf0f5;
  background: transparent;
  border-radius: 11px;
  padding: 11px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 11px;
  align-items: center;
  text-align: left;
  color: #253047;
  cursor: pointer;
}

.notification-item:hover {
  background: #fff8e7;
}

.notification-warning {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff1dc;
  color: #e05b16;
  display: grid;
  place-items: center;
  font-size: 19px;
}

.notification-item b,
.notification-item small {
  display: block;
}

.notification-item small {
  margin-top: 3px;
  color: #7b879c;
}

.notification-stock {
  color: #a54b0a !important;
  font-weight: 850;
  text-align: right;
}

.notification-empty {
  padding: 24px 12px;
  text-align: center;
  color: #758198;
}

.top .logout {
  min-height: 42px;
}

/* Точная геометрия значков в круглых кнопках */
.counter button,
.remove-line {
  position: relative;
  padding: 0;
  font-size: 0;
  line-height: 0;
}

.counter button::before,
.counter button.plus::after,
.remove-line::before,
.remove-line::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.counter button.plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.remove-line::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.remove-line::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nav-icon {
  width: 21px;
  height: 21px;
  display: block;
  overflow: visible;
  flex: 0 0 21px;
  color: currentColor;
}

.nav button {
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.nav button:hover {
  background: #1a2637;
  color: #fff;
}

.nav button:active {
  transform: scale(0.985);
}

.nav button.active .nav-icon {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.nav-brand,
.nav-account {
  display: none;
}

@media (min-width: 900px) {
  .nav {
    padding-bottom: 112px;
  }
  .nav:before {
    content: none;
  }
  .nav-brand {
    position: absolute;
    left: 19px;
    top: 37px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
  }
  .nav-brand img {
    width: 43px;
    height: 43px;
    object-fit: contain;
  }
  .nav-brand span,
  .nav-brand b,
  .nav-brand small {
    display: block;
    width: auto;
    text-align: left;
  }
  .nav-brand b {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.2px;
  }
  .nav-brand small {
    margin-top: 2px;
    color: #9eabbf;
    font-size: 10px;
    font-weight: 500;
  }
  .nav-settings {
    margin-top: auto !important;
    position: relative;
  }
  .nav-settings::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 1px;
    background: #263244;
  }
  .nav-account {
    position: fixed;
    z-index: 12;
    left: 16px;
    bottom: 16px;
    width: 224px;
    min-height: 64px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: center;
    padding: 10px 10px 10px 12px;
    border: 1px solid #253145;
    border-radius: 14px;
    background: #1b2638;
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  }
  .nav-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #2d67e8;
    color: #fff;
    font-weight: 850;
  }
  .nav-user-copy {
    min-width: 0;
  }
  .nav-user-copy b,
  .nav-user-copy small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-user-copy b {
    font-size: 13px;
  }
  .nav-user-copy small {
    margin-top: 3px;
    color: #9eabbf;
    font-size: 10px;
  }
  .nav-logout {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #9eabbf;
    cursor: pointer;
    transition:
      background 0.16s ease,
      color 0.16s ease;
  }
  .nav-logout:hover {
    background: #28364b;
    color: #fff;
  }
  .nav-logout svg {
    width: 19px;
    height: 19px;
  }
  .top .logout {
    display: none;
  }
}

.nav-section-label {
  display: none;
}

@media (min-width: 900px) {
  .nav-section-label {
    display: block;
    margin: 0 2px 12px;
    color: #7e8a9e;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.35px;
  }
  .nav > button[data-page] {
    min-height: 46px;
    margin-bottom: 7px;
    padding: 11px 15px;
    border-radius: 13px;
    background: #172234;
    color: #c7d0df;
    font-size: 14px;
    font-weight: 650;
  }
  .nav > button[data-page]:hover {
    background: #202d40;
    color: #fff;
  }
  .nav > button[data-page].active {
    background: #2d67e8;
    color: #fff;
    box-shadow: 0 8px 20px rgba(45, 103, 232, 0.22);
  }
  .nav > button[data-page] span {
    width: 24px;
  }
  .nav > button[data-page] .nav-icon {
    width: 20px;
    height: 20px;
  }
  .nav-settings {
    margin-bottom: 0 !important;
  }
  .nav-brand b {
    line-height: 1.05;
  }
  .nav-brand small {
    line-height: 1.25;
  }
}

@media (min-width: 900px) and (min-height: 1000px) {
  .nav {
    padding-top: 268px;
  }
  .nav-brand {
    top: 194px;
  }
}

.home-dashboard {
  max-width: 1100px;
}

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

.home-stat {
  min-height: 88px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 17px;
  padding: 16px 20px;
  box-shadow: 0 7px 24px rgba(15, 23, 42, 0.035);
}

.home-stat-icon,
.home-report-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.home-stat-icon svg,
.home-report-icon svg,
.home-section-icon svg {
  width: 22px;
  height: 22px;
}

.home-stat strong {
  font-size: 22px;
  line-height: 1.1;
}

.home-stat small {
  display: block;
  margin-top: 5px;
  color: #748197;
}

.tone-blue {
  background: #eaf0ff;
  color: #2f6df6;
}

.tone-green {
  background: #e8f8f1;
  color: #08a678;
}

.tone-orange {
  background: #fff2e5;
  color: #f18a23;
}

.tone-purple {
  background: #f1eaff;
  color: #8b45e8;
}

.home-report-card {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.home-report-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
}

.home-report-head h2 {
  margin: 0;
  font-size: 18px;
}

.home-report-head small {
  display: block;
  margin-top: 5px;
}

.home-report-icon {
  background: #eaf0ff;
  color: #2f6df6;
}

.home-auto {
  padding: 8px 13px;
  border-radius: 99px;
  background: #e9faf2;
  color: #08875f;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.home-metrics {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.home-metric {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #dce3ee;
  border-radius: 14px;
  padding: 13px 17px;
}

.home-metric small {
  font-size: 10px;
}

.home-metric b {
  margin-top: 7px;
  font-size: 16px;
}

.home-metric.total {
  background: #edf5ff;
  border-color: #9bc5ff;
  color: #245bd8;
}

.home-report-section {
  margin-top: 22px;
  background: #f8fafc;
  border: 1px solid #dce3ee;
  border-radius: 15px;
  padding: 17px 19px;
}

.home-report-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 15px;
}

.home-section-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.home-report-section.best .home-section-icon {
  color: #08a678;
}

.home-report-section.quiet .home-section-icon {
  color: #e28a20;
}

.home-report-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid #d9e0ea;
}
.home-report-row:last-child {
  border-bottom: 0;
}

.home-report-row span,
.home-report-row b,
.home-report-row small {
  display: block;
}

.home-report-row > span {
  min-width: 0;
}

.home-report-row > span > b {
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-report-row small {
  margin-top: 3px;
  font-size: 10px;
}

.home-report-row > b {
  align-self: center;
  white-space: nowrap;
}

.home-empty {
  margin: 8px 0 0;
  color: #7b8799;
  font-size: 12px;
}

@media (max-width: 600px) {
  .home-stats {
    grid-template-columns: 1fr;
  }
  .home-report-card {
    padding: 20px 16px;
  }
  .home-report-head {
    grid-template-columns: 44px 1fr;
  }
  .home-auto {
    grid-column: 1/-1;
    justify-self: start;
  }
}

.qr-mobile {
  display: none;
}

.qr-list-row .qr-desktop small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 899px) {
  .qr-mobile {
    display: block;
    margin-top: 4px;
  }
}

small,
.muted {
  color: #56647a;
}

small {
  font-size: calc(0.833em + 0.5px);
}

.content .field label,
.content .detail-label,
.content .settings-description {
  color: #56647a;
}

.content .field label {
  font-size: 11.5px;
}

.content .detail-label {
  font-size: 10.5px;
}

.content .settings-description {
  font-size: 13.5px;
}

.content .ship-stat small {
  font-size: 11.5px;
}

.content .home-metric small {
  font-size: 10.5px;
}

.nav-brand small {
  font-size: 12px;
  color: #aeb9ca;
}

.shipping-overview {
  max-width: 1000px;
  margin-top: 38px;
  padding: 30px;
}

.shipping-overview .shipping-hero,
.shipping-overview .ship-stats {
  max-width: 688px;
}

.shipping-hero-icon,
.ship-stat-icon {
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eaf0ff;
  color: #2f6df6;
  flex: 0 0 auto;
}

.shipping-hero-icon {
  width: 54px;
  height: 54px;
}

.shipping-hero-icon svg {
  width: 28px;
  height: 28px;
}

.shipping-overview .shipping-hero h2 {
  font-size: 22px;
}

.shipping-overview .shipping-hero small {
  font-size: 13px;
}

.shipping-overview .shipping-hero .primary {
  min-width: 162px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.shipping-overview .shipping-hero .primary svg {
  width: 20px;
  height: 20px;
}

.shipping-overview .ship-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.shipping-overview .ship-stat {
  min-height: 78px;
  background: #f8fafc;
  border-color: #dce3ee;
  padding: 15px 17px;
}

.ship-stat-icon {
  width: 44px;
  height: 44px;
}

.ship-stat-icon svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 899px) {
  .shipping-overview {
    margin-top: 24px;
    padding: 20px;
  }
  .shipping-overview .shipping-hero,
  .shipping-overview .ship-stats {
    max-width: none;
  }
  .shipping-overview .shipping-hero .primary {
    width: 100%;
  }
}

.reservation-overview,
#reservations {
  max-width: 1000px;
}

.reservation-overview {
  padding: 28px;
}

.reservation-overview .reserve-hero {
  padding: 0;
}

.reservation-hero-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #f2e7ff;
  color: #8138ed;
}

.reservation-hero-icon svg {
  width: 28px;
  height: 28px;
}

.reservation-overview .reserve-hero h2 {
  font-size: 22px;
}

.reservation-overview .reserve-hero small {
  font-size: 13px;
}

.purple-button {
  background: linear-gradient(135deg, #8b3ff3, #7630e7);
  color: #fff;
  box-shadow: 0 7px 17px rgba(124, 58, 237, 0.22);
}

.reservation-overview .purple-button {
  min-width: 174px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reservation-overview .purple-button svg {
  width: 18px;
  height: 18px;
}

.reservation-card {
  border-color: #dce3ee;
  border-radius: 17px;
  box-shadow: 0 7px 24px rgba(15, 23, 42, 0.035);
}

.reservation-head {
  grid-template-columns: 42px minmax(0, 1fr) auto 24px;
  padding: 17px 21px;
}

.reservation-person-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2e7ff;
  color: #8138ed;
}

.reservation-person-icon svg {
  width: 20px;
  height: 20px;
}

.reservation-head b {
  font-size: 15px;
}

.reservation-head small {
  display: block;
  margin-top: 5px;
}

.reservation-state {
  padding: 7px 11px;
  background: #f2e4ff;
  color: #8237ed;
}

.reservation-chevron {
  width: 22px;
  height: 22px;
  color: #657493;
  transition: transform 0.18s ease;
}

.reservation-card.open .reservation-chevron {
  transform: rotate(180deg);
}

.reservation-details {
  padding: 8px 21px 18px;
}

.reservation-product {
  grid-template-columns: minmax(0, 1fr) 150px;
  padding: 14px 0;
}

.reservation-product span:last-child {
  text-align: right;
}

.reservation-product small {
  display: block;
  margin-top: 4px;
}

.release-reservation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.release-reservation svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 899px) {
  .reservation-overview {
    padding: 20px;
  }
  .reservation-overview .reserve-hero {
    display: flex;
  }
  .reservation-overview .purple-button {
    width: 100%;
  }
  .reservation-head {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
  }
  .reservation-state {
    grid-column: 2;
    justify-self: start;
  }
  .reservation-chevron {
    grid-column: 3;
    grid-row: 1/3;
  }
  .reservation-product {
    grid-template-columns: 1fr 110px;
  }
}
/* Полноширинная компоновка разделов как в настольной версии */
@media (min-width: 900px) {
  #homePage,
  #shippingPage,
  #reservationsPage,
  #scanPage,
  #qrPage,
  #returnsPage,
  #containerPage,
  #historyPage,
  #settingsPage {
    width: 100%;
    max-width: none !important;
  }

  .container-upload {
    padding: 28px;
  }

  .container-upload h2 {
    margin: 0;
    color: #0f172a;
    font-size: 23px;
  }

  .container-upload-subtitle {
    display: block;
    margin-top: 7px;
    color: #56647a;
    font-size: 14px;
  }

  .container-dropzone {
    margin-top: 22px;
    min-height: 260px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1.5px dashed #aebdd6;
    border-radius: 18px;
    background: #f7f9fd;
    transition:
      border-color 0.16s ease,
      background 0.16s ease,
      transform 0.16s ease;
  }

  .container-dropzone.dragging {
    border-color: #2f6fed;
    background: #eef4ff;
    transform: scale(1.003);
  }

  .container-dropzone.selected {
    border-color: #68c9a5;
    background: #f0fdf7;
  }

  .container-upload-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #eaf1ff;
    color: #2f6fed;
  }

  .container-dropzone.selected .container-upload-icon {
    background: #ddf8ec;
    color: #079669;
  }

  .container-upload-icon svg {
    width: 31px;
    height: 31px;
  }

  .container-dropzone h3 {
    margin: 16px 0 5px;
    color: #0f172a;
    font-size: 16px;
  }

  .container-dropzone p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
  }

  .container-file-button {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .container-file-button svg {
    width: 18px;
    height: 18px;
  }

  @media (max-width: 899px) {
    .container-upload {
      padding: 20px;
    }
    .container-dropzone {
      min-height: 230px;
      padding: 25px;
    }
  }

  .container-progress {
    width: min(440px, 90%);
    height: 8px;
    margin-top: 18px;
    background: #dfe7f3;
    border-radius: 99px;
    overflow: hidden;
  }

  .container-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f6fed, #6d8eff);
    transition: width 0.2s ease;
  }

  .container-result {
    margin-top: 20px;
  }

  .container-result-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
  }

  .container-result-head h2 {
    margin: 0;
    flex: 1;
    font-size: 22px;
  }

  .container-result-head small {
    display: block;
    margin-top: 4px;
  }

  .container-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 11px;
    margin-bottom: 18px;
  }

  .container-summary-card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #dce4f0;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
  }

  .container-summary-card small {
    display: block;
  }

  .container-summary-card b {
    display: block;
    margin-top: 5px;
    font-size: 17px;
    color: #0f172a;
  }

  .container-list-head,
  .container-product-main {
    display: grid;
    grid-template-columns: 82px minmax(180px, 1.5fr) minmax(135px, 1fr) 130px 110px 115px 38px;
    gap: 14px;
    align-items: center;
  }

  .container-list-head {
    padding: 0 18px 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
  }

  .container-product {
    margin-bottom: 11px;
    background: #fff;
    border: 1px solid #dce4f0;
    border-radius: 17px;
    overflow: hidden;
    box-shadow: 0 7px 23px rgba(15, 23, 42, 0.04);
  }

  .container-product-main {
    min-height: 100px;
    padding: 12px 18px;
  }

  .container-photo {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef3fb;
  }

  .container-photo-empty {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eaf1ff;
    color: #2f6fed;
  }

  .container-photo-empty svg {
    width: 29px;
    height: 29px;
  }

  .container-product-copy b,
  .container-code {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
  }

  .container-product-copy small {
    display: block;
    margin-top: 5px;
    line-height: 1.35;
  }

  .container-price b,
  .container-places b,
  .container-pln b {
    display: block;
    color: #0f172a;
  }

  .container-price small,
  .container-places small,
  .container-pln small {
    display: block;
    margin-top: 4px;
    font-size: 10px;
  }

  .container-pln b {
    color: #667085;
    font-size: 12px;
  }

  .container-more {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
  }

  .container-more svg {
    width: 18px;
    height: 18px;
    transition: transform 0.16s ease;
  }

  .container-result-head > span:nth-child(2) {
    flex: 1;
  }

  .container-number-field {
    width: 180px;
    padding: 10px 12px;
    border: 1px solid #cdd9ec;
    border-radius: 13px;
    background: #fff;
  }

  .container-number-field small {
    margin: 0 0 5px;
    font-size: 10px;
    font-weight: 900;
    color: #64748b;
  }

  .container-number-field span {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .container-number-field input {
    width: 100%;
    padding: 3px 4px;
    border: 0;
    outline: 0;
    font-size: 18px;
    font-weight: 900;
  }

  .container-history {
    margin-top: 22px;
  }

  .container-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .container-history-head h2 {
    margin: 0;
    color: #0f172a;
  }

  .container-history-head small {
    display: block;
    margin-top: 5px;
  }

  .container-history-empty,
  .container-report-card {
    padding: 20px;
    border: 1px solid #dce4f0;
    border-radius: 18px;
    background: #fff;
  }

  .container-report-card {
    margin-bottom: 14px;
  }

  .container-report-card > header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
  }

  .container-report-card > header small {
    display: block;
    margin-top: 4px;
  }

  .container-report-card > header > strong {
    color: #087f5b;
    font-size: 18px;
  }

  .container-report-card > header > strong.incomplete {
    color: #b45309;
    font-size: 13px;
  }

  .container-report-number {
    min-width: 58px;
    padding: 11px;
    border-radius: 12px;
    background: #eaf1ff;
    color: #2f6fed;
    text-align: center;
    font-weight: 900;
  }

  .container-report-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    margin-top: 17px;
  }

  .container-report-metrics > span {
    padding: 12px;
    border-radius: 12px;
    background: #f7f9fd;
  }

  .container-report-metrics small,
  .container-report-metrics b {
    display: block;
  }

  .container-report-metrics b {
    margin-top: 5px;
  }

  .container-report-card details {
    margin-top: 14px;
    border-top: 1px solid #e5eaf2;
    padding-top: 13px;
  }

  .container-report-card summary {
    cursor: pointer;
    font-weight: 800;
  }

  .container-report-products {
    margin-top: 10px;
  }

  .container-report-product {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(105px, 0.7fr));
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #edf0f5;
  }

  .container-report-product small,
  .container-report-product b {
    display: block;
  }

  .container-report-warning {
    margin: 12px 0 0;
    color: #b45309;
    font-size: 12px;
  }
}
/* Полноширинная компоновка разделов как в настольной версии */
@media (min-width: 900px) {
  .container-product.open .container-more svg {
    transform: rotate(180deg);
  }

  .container-details {
    display: none;
    padding: 17px 20px 20px;
    border-top: 1px solid #edf0f5;
    background: #fbfcfe;
  }

  .container-product.open .container-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
  }

  .container-detail {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
  }

  .container-detail small {
    display: block;
  }

  .container-detail b {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.35;
  }

  .container-source-name {
    grid-column: span 2;
  }

  .container-error {
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 12px;
    background: #fff1f2;
    color: #b42318;
    font-weight: 700;
  }

  .container-warehouse-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 18px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #d9e3f0;
    border-radius: 17px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  }

  .container-warehouse-actions > span {
    flex: 1;
  }

  .container-warehouse-actions b {
    display: block;
    color: #0f172a;
    font-size: 17px;
  }

  .container-warehouse-actions small {
    display: block;
    margin-top: 5px;
  }

  .container-warehouse-actions button {
    min-width: 210px;
  }

  .container-warehouse-actions svg {
    width: 18px;
    height: 18px;
    vertical-align: -4px;
    margin-right: 7px;
  }

  @media (max-width: 1250px) {
    .container-list-head,
    .container-product-main {
      grid-template-columns: 76px minmax(180px, 1fr) 135px 105px 38px;
    }
    .container-list-head > *:nth-child(4),
    .container-product-main > *:nth-child(4) {
      display: none;
    }
    .container-list-head > *:nth-child(6),
    .container-product-main > *:nth-child(6) {
      display: none;
    }
    .container-summary {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 899px) {
    .container-summary {
      grid-template-columns: 1fr 1fr;
    }
    .container-list-head {
      display: none;
    }
    .container-product-main {
      grid-template-columns: 70px 1fr 38px;
    }
    .container-product-main > *:nth-child(3),
    .container-product-main > *:nth-child(4),
    .container-product-main > *:nth-child(5),
    .container-product-main > *:nth-child(6) {
      display: none;
    }
    .container-product.open .container-details {
      grid-template-columns: 1fr 1fr;
    }
    .container-source-name {
      grid-column: span 2;
    }
    .container-warehouse-actions {
      align-items: stretch;
      flex-direction: column;
      gap: 14px;
    }
    .container-warehouse-actions button {
      width: 100%;
    }
  }

  .container-list-head,
  .container-product-main {
    grid-template-columns: 76px minmax(175px, 1.35fr) 125px 105px 86px 195px 105px 38px;
  }

  .container-receive {
    padding: 8px 9px;
    border: 1px solid #d9e2ef;
    border-radius: 13px;
    background: #f8fafc;
    text-align: center;
    transition:
      background 0.15s ease,
      border-color 0.15s ease;
  }

  .container-receive-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .container-receive button {
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid #cbd6e6;
    border-radius: 50%;
    background: #fff;
    color: #334155;
    font-size: 17px;
    font-weight: 800;
  }

  .container-receive input {
    width: 43px;
    height: 31px;
    border: 1px solid #cbd6e6;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    font-weight: 850;
    color: #0f172a;
  }

  .container-receive input::-webkit-inner-spin-button {
    appearance: none;
  }

  .container-receive strong {
    display: block;
    margin-top: 5px;
    color: #334155;
    font-size: 11px;
  }

  .container-receive small {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 750;
  }

  .container-receive.partial {
    border-color: #f4c66c;
    background: #fffbeb;
  }

  .container-receive.partial small {
    color: #a16207;
  }

  .container-receive.complete {
    border-color: #86d8b8;
    background: #ecfdf5;
  }

  .container-receive.complete small {
    color: #047857;
  }

  .container-receive.extra {
    border-color: #f5a3aa;
    background: #fff1f2;
  }

  .container-receive.extra small {
    color: #be123c;
  }

  .container-summary-card.received.partial {
    border-color: #f4c66c;
    background: #fffbeb;
  }

  .container-summary-card.received.complete {
    border-color: #86d8b8;
    background: #ecfdf5;
  }

  .container-summary-card.received.extra {
    border-color: #f5a3aa;
    background: #fff1f2;
  }

  @media (max-width: 1400px) {
    .container-list-head,
    .container-product-main {
      grid-template-columns: 76px minmax(175px, 1fr) 125px 86px 195px 38px;
    }
    .container-list-head > *:nth-child(4),
    .container-product-main > *:nth-child(4),
    .container-list-head > *:nth-child(7),
    .container-product-main > *:nth-child(7) {
      display: none;
    }
    .container-list-head > *:nth-child(6),
    .container-product-main > *:nth-child(6) {
      display: block;
    }
  }

  @media (max-width: 899px) {
    .container-product-main {
      grid-template-columns: 70px minmax(150px, 1fr) 180px 38px;
    }
    .container-product-main > *:nth-child(3),
    .container-product-main > *:nth-child(4),
    .container-product-main > *:nth-child(5),
    .container-product-main > *:nth-child(7) {
      display: none;
    }
    .container-product-main > *:nth-child(6) {
      display: block;
    }
  }

  .home-dashboard {
    width: 100%;
    max-width: none;
  }
}
/* Полноширинная компоновка разделов как в настольной версии */
@media (min-width: 900px) {
  .home-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-report-card {
    width: 100%;
  }

  .shipping-overview {
    width: 100%;
    max-width: none;
  }

  .shipping-overview .shipping-hero,
  .shipping-overview .ship-stats {
    width: 100%;
    max-width: none;
  }

  .shipping-overview .ship-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reservation-overview,
  #reservations {
    width: 100%;
    max-width: none;
  }

  .reservation-product {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  #scanPage > .panel,
  #returnsPage > .panel,
  #settingsPage > .panel {
    width: 100%;
  }

  .qr-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .return-history-row {
    grid-template-columns: 48px minmax(180px, 2fr) minmax(130px, 1fr) minmax(170px, 1.2fr) minmax(
        220px,
        1.5fr
      );
  }

  .audit-row {
    grid-template-columns: 42px minmax(180px, 1fr) minmax(260px, 1.6fr) 180px;
    column-gap: 20px;
    align-items: center;
    min-height: 84px;
    padding: 18px 21px;
  }

  .audit-row .audit-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }

  .audit-row .audit-copy b,
  .audit-row .audit-copy small {
    display: block;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .audit-row .audit-copy small {
    font-size: 13px;
  }

  .audit-row .audit-time {
    justify-self: end;
    align-self: center;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.45;
  }
}
@media (min-width: 900px) and (max-width: 1250px) {
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Календарь: дни всегда остаются ровными кругами даже на широком экране */
.calendar-day {
  width: 42px;
  height: 42px;
  min-width: 42px;
  justify-self: center;
  align-self: center;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  line-height: 1;
  aspect-ratio: 1/1;
}

.calendar-day.red {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
  box-shadow: 0 3px 9px rgba(185, 28, 28, 0.08);
}

.calendar-day.blue {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
  box-shadow: 0 3px 9px rgba(29, 78, 216, 0.08);
}

.calendar-day.yellow {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
  box-shadow: 0 3px 9px rgba(180, 83, 9, 0.08);
}

.calendar-day.selected {
  outline: 0;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #334155;
}

.calendar-day:not(.has-sales):hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.item-modal-title {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #0f172a;
}

.item-modal-title-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf0ff;
  color: #2f6df6;
  box-shadow: 0 5px 14px rgba(47, 109, 246, 0.1);
}

.item-modal-title-icon svg {
  width: 22px;
  height: 22px;
}

.item-modal-title b {
  font-size: 16px;
  font-weight: 850;
}

.product-modal > .between {
  align-items: center;
}

.product-modal > .between > .secondary {
  width: 46px;
  min-height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
}

.reservation-state.fulfilled {
  background: #dcfce7 !important;
  color: #047857 !important;
}

.reservation-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b3ff3, #6d28d9);
  color: #fff;
  border: 0;
}

.reservation-send svg {
  width: 18px;
  height: 18px;
}

.reservation-history-row {
  display: grid;
  grid-template-columns: 48px minmax(170px, 1.5fr) minmax(150px, 1.2fr) minmax(135px, 0.9fr) minmax(
      170px,
      1fr
    );
  gap: 15px;
  align-items: center;
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  padding: 17px 21px;
  margin-bottom: 11px;
  box-shadow: 0 7px 22px rgba(15, 23, 42, 0.04);
}

.reservation-history-status {
  display: inline-flex;
  width: max-content;
  padding: 7px 11px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.reservation-history-status.fulfilled {
  background: #dcfce7;
  color: #047857;
}

@media (max-width: 899px) {
  .reservation-history-row {
    grid-template-columns: 44px 1fr;
  }
  .reservation-history-row > *:nth-child(n + 3) {
    grid-column: 2;
  }
}

#settingsPage .settings-block:first-of-type .settings-actions {
  align-items: flex-end;
}

#settingsPage .settings-save-button {
  height: 47px;
  min-height: 47px;
  margin: 0;
}

.pretty-select-button .select-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.product-toolbar-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  min-height: 50px;
}

.product-toolbar-button svg {
  width: 19px;
  height: 19px;
  display: block;
  flex: 0 0 auto;
}

/* Оформление отправки — аккуратные элементы и ровная сетка */
.ship-mode-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ship-mode-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.recipient-combo-wrap {
  position: relative;
}

.recipient-combo-wrap > input {
  padding-right: 48px;
}

.recipient-dropdown-toggle {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #f1f4fa;
  color: #526389;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.recipient-dropdown-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.16s ease;
}

.recipient-combo-wrap.open .recipient-dropdown-toggle svg {
  transform: rotate(180deg);
}

.recipient-history {
  top: calc(100% + 7px);
  z-index: 45;
}

.recipient-history-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 5px;
  align-items: center;
  border-radius: 11px;
}

.recipient-history-row:hover {
  background: #eef3ff;
}

.recipient-history-option {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: transparent;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #253047;
  text-align: left;
  font-weight: 750;
}

.recipient-history-option:hover {
  color: #304b93;
}

.recipient-history-option svg {
  width: 18px;
  height: 18px;
  color: #6173aa;
}

.recipient-delete {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #a6afbf;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.recipient-delete:hover {
  background: #fff1f2;
  color: #e11d48;
}

.recipient-delete svg {
  width: 18px;
  height: 18px;
}

.recipient-history-empty {
  padding: 12px;
  color: #64748b;
  font-size: 12px;
}

.ship-box {
  grid-template-columns: 200px 145px 105px 205px 150px;
  justify-content: start;
  gap: 18px;
  min-height: 96px;
  padding-left: 24px;
  padding-right: 40px;
}

.ship-box-name {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.ship-box-name-copy b,
.ship-box-name-copy small {
  display: block;
}

.ship-box-name-copy b {
  font-size: 18px;
  line-height: 1.1;
}

.ship-box-name-copy small {
  margin-top: 6px;
  color: #6b7280;
  font-size: 11px;
}

.ship-box-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fff3cd;
  color: #b7791f;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 5px 14px rgba(180, 83, 9, 0.08);
}

.ship-box-icon svg {
  width: 24px;
  height: 24px;
}

.ship-box-counter > small {
  display: none;
}

.ship-box-counter .counter {
  justify-content: flex-start;
}

.ship-box > .vat-badge,
.ship-box > .segment,
.ship-box > #boxTotal {
  align-self: center;
}

.ship-box > #boxTotal {
  text-align: left;
  white-space: nowrap;
}

.ship-line-main {
  grid-template-columns: minmax(145px, 1fr) 145px 145px 145px minmax(155px, 1fr) 42px;
  align-items: center;
  gap: 13px;
}

.ship-product-copy {
  min-width: 0;
}

.ship-product-copy b,
.ship-product-copy small {
  display: block;
}

.ship-product-copy b {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-product-copy small {
  margin-top: 5px;
}

.ship-quantity-control > small,
.ship-price-control > small {
  display: block;
  height: 17px;
  margin-bottom: 4px;
  line-height: 17px;
}

.ship-price-control input {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
  text-align: center;
  font-weight: 750;
}
.ship-price-control input:focus {
  outline: none;
  border-color: #6075b5;
  box-shadow: 0 0 0 4px rgba(80, 100, 162, 0.12);
}

.ship-line-total small,
.ship-line-total b {
  display: block;
}

.ship-line-total b {
  margin-top: 5px;
  line-height: 1.35;
}

.ship-line-tax {
  min-height: 48px;
}

.ship-modal {
  width: min(1080px, 100%);
}

@media (max-width: 899px) {
  .ship-box,
  .ship-line-main {
    grid-template-columns: 1fr;
  }
  .ship-box {
    padding: 16px;
  }
  .ship-box-counter .counter {
    justify-content: flex-start;
  }
  .ship-box > #boxTotal {
    text-align: left;
  }
  .ship-quantity-control > small,
  .ship-price-control > small {
    height: auto;
  }
  .ship-line-tax {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.purchase-cost-card {
  display: grid;
  grid-template-columns: 46px 1fr 190px;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  margin-bottom: 20px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #fff7ed;
}

.purchase-cost-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #ffedd5;
  color: #c2410c;
  display: grid;
  place-items: center;
}

.purchase-cost-icon svg {
  width: 23px;
  height: 23px;
}

.purchase-cost-copy h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.purchase-cost-copy small {
  line-height: 1.35;
}

.purchase-cost-field label {
  color: #9a3412 !important;
}

.item-cost-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
}

.item-cost-card .purchase-cost-icon {
  width: 44px;
  height: 44px;
}

.item-cost-card b,
.item-cost-card small {
  display: block;
}

.item-cost-card b {
  font-size: 16px;
}

.item-cost-card small {
  margin-top: 4px;
}

.item-cost-profit {
  text-align: right;
}

.item-cost-profit strong {
  display: block;
  color: #047857;
  font-size: 16px;
}

.profit-metric {
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
}

.profit-metric b {
  color: #047857 !important;
}

.profit-metric.cost {
  border-color: #fed7aa !important;
  background: #fff7ed !important;
}

.profit-metric.cost b {
  color: #c2410c !important;
}

.profit-note {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
}

.weekly-profit-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.weekly-profit-strip .weekly-metric {
  display: block;
}

.weekly-profit-strip .weekly-metric span,
.weekly-profit-strip .weekly-metric b {
  display: block;
}

.weekly-profit-strip .weekly-metric b {
  margin-top: 5px;
  font-size: 17px;
}

@media (max-width: 899px) {
  .purchase-cost-card {
    grid-template-columns: 44px 1fr;
  }
  .purchase-cost-field {
    grid-column: 1/-1;
  }
  .item-cost-card {
    grid-template-columns: 44px 1fr;
  }
  .item-cost-profit {
    grid-column: 2;
    text-align: left;
  }
  .weekly-profit-strip {
    grid-template-columns: 1fr;
  }
}

/* Карточка товара и внутреннее подтверждение действий */
.detail-photo {
  object-fit: contain !important;
  object-position: center;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.item-description,
#itemBody .detail-label.section + p {
  margin: 8px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #334155;
  line-height: 1.6;
}

.product-description-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

.product-description-grid.has-admin {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.product-description-panel,
.product-admin-panel {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
}

.product-description-heading,
.product-admin-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.product-description-heading svg,
.product-admin-heading svg {
  width: 20px;
  height: 20px;
}

.product-description-heading svg {
  color: #2563eb;
}

.product-description-heading b,
.product-admin-heading b {
  display: block;
  font-size: 15px;
}

.product-description-panel p {
  min-height: 48px;
  margin: 0;
  color: #26364d;
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.product-admin-panel {
  border-color: #fed7aa;
  background: #fff7ed;
}

.product-admin-heading {
  color: #c2410c;
}

.product-admin-heading span {
  min-width: 0;
  flex: 1;
}

.product-admin-heading small {
  display: block;
  margin-top: 2px;
  color: #9a3412;
  font-size: 9px;
  font-weight: 750;
}

.product-admin-edit {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border-color: #fdba74;
  background: #fff;
  color: #9a3412;
  font-size: 12px;
}

.admin-info-modal .modal {
  width: min(760px, 100%);
}

.admin-info-form-intro {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 4px 0 20px;
  padding: 15px 16px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
}

.admin-info-form-intro > span:last-child {
  min-width: 0;
}

.admin-info-form-intro b,
.admin-info-form-intro small {
  display: block;
}

.admin-info-form-intro b {
  color: #7c2d12;
  font-size: 15px;
}

.admin-info-form-intro small {
  margin-top: 4px;
  color: #9a5a31;
  line-height: 1.45;
}

.admin-info-fields {
  gap: 14px;
}

.product-admin-rows {
  display: grid;
  gap: 8px;
}

.product-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid #fed7aa;
}

.product-admin-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.product-admin-row small {
  color: #9a5a31;
  line-height: 1.35;
}

.product-admin-row b {
  text-align: right;
  color: #7c2d12;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.product-admin-empty {
  margin: 0;
  color: #9a5a31;
  font-size: 13px;
}

.item-primary-details {
  min-width: 0;
}

.item-actions {
  margin-top: 18px;
}

@media (max-width: 899px) {
  .product-description-grid.has-admin {
    grid-template-columns: 1fr;
  }
  .product-description-panel p {
    font-size: 16px;
  }
}

.confirm-modal {
  width: min(480px, 100%);
  padding: 26px;
}

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

.confirm-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eef3ff;
  color: #315fc6;
}

.confirm-icon.danger {
  background: #fff1f2;
  color: #e11d48;
}

.confirm-icon svg {
  width: 24px;
  height: 24px;
}

.confirm-copy {
  min-width: 0;
}

.confirm-copy h2 {
  margin: 2px 0 7px;
  font-size: 21px;
}

.confirm-copy p {
  margin: 0;
  color: #526078;
  line-height: 1.5;
}

.confirm-note {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f5f7fb;
  color: #526078;
  font-size: 12px;
  line-height: 1.5;
}

.confirm-modal .actions {
  margin-top: 22px;
}

.confirm-modal .actions button {
  min-width: 125px;
}

.confirm-modal .confirm-danger {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
  box-shadow: 0 6px 14px rgba(225, 29, 72, 0.18);
}
@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  }
  .detail-layout > div {
    min-width: 0;
  }
  .detail-photo {
    height: min(560px, 70vh);
    min-height: 420px;
  }
  .modal.product-modal {
    width: min(1040px, 100%);
  }
}

/* Consistent spacing inside every History tab; other sections are unchanged. */
#historyPage > .tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
}

#historyPage > .tabs button {
  line-height: 1.3;
  min-height: 44px;
  white-space: nowrap;
}

#historyPage svg {
  display: block;
}

#historyPage .history-tools {
  gap: 12px;
  margin-bottom: 4px;
}

#historyPage .history-count {
  padding: 8px 12px;
  border-radius: 9px;
  background: #eef2f8;
  line-height: 1.4;
}

#historyPage .history-head {
  grid-template-columns: 44px minmax(0, 1fr) auto 22px;
  gap: 16px;
  min-height: 88px;
  padding: 18px 20px;
}

#historyPage .history-head-copy b {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

#historyPage .history-head-copy small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  margin-top: 5px;
  line-height: 1.5;
  font-size: 13px;
}

#historyPage .history-designation {
  border-left: 1px solid #d9e1ec;
  padding-left: 12px;
  overflow-wrap: anywhere;
}

#historyPage .history-amount,
#historyPage .report-total {
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

#historyPage .history-detail {
  padding: 6px 22px 18px;
}

#historyPage .receipt-head,
#historyPage .receipt-row {
  grid-template-columns: minmax(180px, 1.5fr) minmax(110px, 0.9fr) minmax(120px, 1fr) minmax(
      120px,
      1fr
    );
  column-gap: 20px;
  align-items: center;
}

#historyPage .receipt-head {
  padding: 15px 0 12px;
  line-height: 1.4;
}

#historyPage .receipt-row {
  padding: 15px 0;
  font-weight: 500;
}

#historyPage .receipt-row > span,
#historyPage .return-history-row > span:not(.history-row-icon),
#historyPage .reservation-history-row > span:not(.history-row-icon),
#historyPage .report-line > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#historyPage .receipt-row b,
#historyPage .return-history-row b,
#historyPage .reservation-history-row b,
#historyPage .report-line b {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  color: #0f172a;
}

#historyPage .receipt-row small,
#historyPage .return-history-row small,
#historyPage .reservation-history-row small,
#historyPage .report-line small {
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#historyPage .receipt-row > span:nth-child(n + 3),
#historyPage .receipt-head > span:nth-child(n + 3) {
  text-align: right;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}

#historyPage .return-history-row {
  grid-template-columns: 46px minmax(160px, 1.2fr) minmax(100px, 0.65fr) minmax(160px, 1.4fr) 172px;
  gap: 18px;
  padding: 18px 20px;
  min-height: 88px;
}

#historyPage .history-note {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#historyPage .history-time {
  display: block;
  justify-self: end;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

#historyPage .reservation-history-row {
  grid-template-columns: 46px minmax(180px, 1.25fr) minmax(160px, 1.4fr) minmax(120px, 0.8fr) 172px;
  gap: 18px;
  padding: 18px 20px;
  min-height: 96px;
}

#historyPage .history-codes {
  white-space: pre-line;
}

#historyPage .reservation-history-status {
  width: fit-content;
  line-height: 1.4;
  padding: 6px 10px;
}

#historyPage .reservation-history-row > span:last-child {
  align-items: flex-end;
  text-align: right;
  gap: 7px;
}

#historyPage .calendar {
  padding: 20px 22px;
}

#historyPage .calendar-week {
  margin: 20px 0 10px;
  font-size: 11px;
  line-height: 1.4;
}

#historyPage .calendar-days {
  row-gap: 8px;
}

#historyPage .calendar-legend {
  gap: 12px 22px;
  margin-top: 20px;
  line-height: 1.4;
}

#historyPage .calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#historyPage .legend-dot {
  margin: 0;
  flex: 0 0 auto;
}

#historyPage .report-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

#historyPage .report-card > .report-title,
#historyPage .report-card > .weekly-metrics,
#historyPage .report-card > .weekly-profit-strip,
#historyPage .report-card > .report-section:last-child {
  grid-column: 1/-1;
}

#historyPage .report-title {
  gap: 14px;
  min-width: 0;
}

#historyPage .report-title-copy {
  min-width: 0;
}

#historyPage .report-title-copy b {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#historyPage .report-title-copy small {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}

#historyPage .weekly-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

#historyPage .weekly-profit-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

#historyPage .weekly-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding: 14px 16px;
  min-height: 84px;
}

#historyPage .weekly-metric > span {
  font-size: 12px;
  line-height: 1.45;
}

#historyPage .weekly-metric > b {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

#historyPage .profit-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

#historyPage .report-section {
  min-width: 0;
  margin: 0;
  padding: 18px 20px;
}

#historyPage .report-section-title {
  gap: 10px;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 10px;
}

#historyPage .report-section-title svg {
  flex: 0 0 auto;
}

#historyPage .report-line {
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 12px 0;
}

#historyPage .report-line > b {
  flex: 0 0 auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#historyPage .report-line:last-child {
  border-bottom: 0;
}

#historyPage .report-buyer {
  border-bottom: 1px solid #e2e8f0;
}

#historyPage .report-buyer:last-child {
  border-bottom: 0;
}

#historyPage .report-section .report-buyer-toggle {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

#historyPage .report-section .report-buyer-toggle:hover {
  background: #f1f5f9;
}

#historyPage .report-section .report-buyer-toggle:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.2);
  outline-offset: 2px;
}

#historyPage .report-buyer-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

#historyPage .report-buyer-summary > b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#historyPage .report-buyer-chevron {
  width: 19px;
  height: 19px;
  color: #64748b;
  transition: transform 0.18s ease;
}

#historyPage .report-buyer.open .report-buyer-chevron {
  transform: rotate(180deg);
}

#historyPage .report-buyer-detail {
  padding: 4px 0 14px;
}

#historyPage .report-buyer-order {
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

#historyPage .report-buyer-order + .report-buyer-order {
  margin-top: 10px;
}

#historyPage .report-buyer-order-head,
#historyPage .report-buyer-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 110px;
  gap: 14px;
  align-items: center;
}

#historyPage .report-buyer-order-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 10px;
}

#historyPage .report-buyer-order-head > span,
#historyPage .report-buyer-product > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#historyPage .report-buyer-order-head b,
#historyPage .report-buyer-order-head strong,
#historyPage .report-buyer-product b {
  color: #0f172a;
  line-height: 1.4;
}

#historyPage .report-buyer-order-head small,
#historyPage .report-buyer-product small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

#historyPage .report-buyer-product {
  min-height: 54px;
  padding: 9px 0;
  border-top: 1px solid #edf1f6;
}

#historyPage .report-buyer-product > b:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#historyPage .empty-history {
  padding: 28px;
  line-height: 1.5;
}

#historyPage .audit-notice {
  font-size: 13px;
  line-height: 1.5;
  padding: 14px 16px;
}

@media (max-width: 1100px) {
  #historyPage .report-card {
    grid-template-columns: minmax(0, 1fr);
  }
  #historyPage .report-card > .report-section {
    grid-column: 1/-1;
  }
}
