/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.20_@playwright+test@1.62.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.20_@playwright+test@1.62.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root {
  color-scheme: light;
  --ink: #17231f;
  --ink-muted: #66706c;
  --ink-soft: #8d9591;
  --brand: #5b1730;
  --brand-hover: #451024;
  --brand-soft: #f3e6eb;
  --canvas: #f6f2f3;
  --surface: #ffffff;
  --surface-soft: #f8f8f4;
  --line: #e2e5de;
  --line-strong: #cfd4cc;
  --rose: #eaa1aa;
  --rose-soft: #fbedef;
  --green: #19724c;
  --green-soft: #e4f3e9;
  --amber: #94610a;
  --amber-soft: #fff0cf;
  --red: #a84242;
  --red-soft: #fbe8e8;
  --blue: #316c8d;
  --blue-soft: #e7f1f6;
  --shadow-soft: 0 10px 30px rgba(75, 22, 42, 0.07);
  --shadow-sheet: 0 -20px 60px rgba(8, 23, 17, 0.22);
  --radius: 20px;
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px)
  );
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: var(--app-viewport-height, var(--tg-viewport-stable-height, 100dvh));
  background:
    radial-gradient(circle at 100% 0, rgba(234, 161, 170, 0.1), transparent 320px), var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: var(--brand);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(49, 108, 141, 0.25);
  outline-offset: 2px;
}

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

.button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease;
}

.button:active:not(:disabled) {
  transform: scale(0.98);
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button--primary {
  background: var(--brand);
  color: white;
}

.button--primary:hover {
  background: var(--brand-hover);
}

.button--secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition:
    transform 140ms ease,
    background-color 140ms ease;
}

.icon-button:active:not(:disabled) {
  transform: scale(0.94);
  background: var(--surface-soft);
}

.app-header {
  position: -webkit-sticky;
  position: sticky;
  z-index: 20;
  top: 0;
  padding-top: var(--safe-top);
  background: rgba(91, 23, 48, 0.97);
  color: white;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-header__inner {
  width: min(100%, 1040px);
  min-height: 70px;
  padding: 12px 16px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand div,
.operator__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand strong {
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.2;
}

.operator {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.operator__text {
  align-items: flex-end;
}

.operator__text strong {
  max-width: 180px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator__text span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.operator__avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 15px;
  font-weight: 800;
}

.app-main {
  width: min(100%, 860px);
  min-height: calc(var(--app-viewport-height, 100dvh) - 70px);
  margin: 0 auto;
  padding: 24px 16px calc(28px + var(--safe-bottom));
}

.page-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-kicker {
  margin: 0 0 3px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.refresh-button {
  color: var(--brand);
}

.refresh-button.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

.controls {
  margin-bottom: 20px;
}

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

.search-field {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(75, 22, 42, 0.035);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.search-field:focus-within {
  border-color: rgba(91, 23, 48, 0.4);
  box-shadow: 0 0 0 3px rgba(91, 23, 48, 0.08);
}

.search-field > svg {
  flex: 0 0 20px;
  color: var(--ink-soft);
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search-field input::placeholder {
  color: #9aa19e;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.clear-search {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink-muted);
  cursor: pointer;
}

.filter-toggle {
  min-width: 50px;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 4px 20px rgba(75, 22, 42, 0.035);
}

.filter-toggle--open {
  border-color: rgba(91, 23, 48, 0.35);
  background: var(--brand-soft);
}

.filter-count {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-size: 11px;
}

.sort-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.select-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-label > span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.select-label select,
.select-label input[type='date'] {
  width: 100%;
  min-height: 46px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background-color: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

.select-label input[type='date'] {
  padding-right: 12px;
}

.select-label select:focus,
.select-label input[type='date']:focus {
  border-color: rgba(91, 23, 48, 0.45);
  box-shadow: 0 0 0 3px rgba(91, 23, 48, 0.08);
}

.sort-select {
  width: min(100%, 245px);
}

.sort-select > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sort-select select {
  min-height: 40px;
  border-color: transparent;
  background-color: transparent;
  color: var(--ink-muted);
  font-size: 16px;
  font-weight: 650;
  text-align: right;
}

.filter-panel {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: reveal 180ms ease-out;
}

.filter-fieldset {
  padding: 0;
  margin: 0 0 18px;
  border: 0;
}

.filter-fieldset legend {
  padding: 0;
  margin-bottom: 9px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.choice-chip.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

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

.filter-period {
  grid-column: 1 / -1;
}

.date-range {
  margin-top: 14px;
}

.reset-filters {
  min-height: 40px;
  margin: 16px 0 -4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.results-heading {
  min-height: 26px;
  margin: 0 2px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-muted);
}

.results-heading > span {
  font-size: 14px;
  font-weight: 750;
}

.results-heading small {
  font-size: 11px;
}

.inline-error {
  margin-bottom: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #efd0d0;
  border-radius: 13px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
}

.inline-error button {
  padding: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  cursor: pointer;
}

.order-list {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 12px;
  gap: 12px;
}

.order-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 20px rgba(75, 22, 42, 0.04);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.order-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 9px 28px rgba(75, 22, 42, 0.07);
}

.order-card:active {
  transform: scale(0.995);
}

.order-card__main {
  width: 100%;
  padding: 16px 16px 13px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.order-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.order-card__top > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-number {
  color: var(--brand);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.order-date {
  color: var(--ink-soft);
  font-size: 12px;
}

.status-badge {
  min-height: 27px;
  max-width: 58%;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.status-badge--green {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge--amber {
  background: var(--amber-soft);
  color: var(--amber);
}

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

.status-badge--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-badge--gray {
  background: #ecefeb;
  color: #59615d;
}

.status-badge--outline {
  border-color: currentColor;
  background: transparent;
}

.order-card__body {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-card__recipient {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-card__recipient strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card__recipient span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card__chevron {
  flex: 0 0 20px;
  color: var(--ink-soft);
}

.order-card__items {
  margin-top: 10px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card__bottom {
  margin-top: 13px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.order-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 11px;
  white-space: nowrap;
}

.order-meta > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--ink-soft);
}

.payment-dot--green {
  background: var(--green);
}

.payment-dot--amber {
  background: var(--amber);
}

.payment-dot--red {
  background: var(--red);
}

.payment-dot--blue {
  background: var(--blue);
}

.order-total {
  flex: 0 0 auto;
  font-size: 16px;
}

.order-card__phone {
  min-height: 43px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.state-card {
  min-height: 310px;
  padding: 42px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.state-card__icon {
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
}

.state-card__icon--error {
  background: var(--red-soft);
  color: var(--red);
}

.state-card h2 {
  margin: 0;
  font-size: 19px;
}

.state-card p {
  max-width: 330px;
  margin: 8px 0 20px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}

.pagination {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
}

.pagination button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 750;
  cursor: pointer;
}

.pagination button:last-child {
  justify-self: end;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

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

.app-footer {
  padding: 24px 4px 4px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.auth-page {
  min-height: 100vh;
  min-height: var(--app-viewport-height, var(--tg-viewport-stable-height, 100dvh));
  padding: calc(32px + var(--safe-top)) 18px calc(32px + var(--safe-bottom));
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(234, 161, 170, 0.24), transparent 260px), var(--canvas);
}

.auth-card {
  width: min(100%, 420px);
  padding: 34px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(207, 212, 204, 0.8);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 60px rgba(75, 22, 42, 0.1);
  text-align: center;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 18px;
}

.auth-state-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: var(--brand-soft);
  color: var(--brand);
}

.auth-state-icon--denied,
.auth-state-icon--stale,
.auth-state-icon--error {
  background: var(--red-soft);
  color: var(--red);
}

.auth-card h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.auth-card p {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-card small {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 11px;
}

.auth-retry {
  width: 100%;
  margin-top: 22px;
}

.auth-card--loading h1 {
  font-size: 24px;
}

.auth-loader {
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sheet-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding-top: var(--safe-top);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(7, 19, 14, 0.48);
  animation: fade-in 160ms ease-out;
}

.detail-sheet {
  width: min(100%, 720px);
  max-height: calc(
    var(--app-viewport-height, 100dvh) - var(--safe-top) -
      max(env(safe-area-inset-bottom, 0px), 8px)
  );
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: var(--canvas);
  box-shadow: var(--shadow-sheet);
  animation: sheet-up 220ms cubic-bezier(0.22, 0.8, 0.32, 1);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 9px auto 1px;
  border-radius: 4px;
  background: #c7ccc6;
}

.detail-header {
  min-height: 67px;
  padding: 10px 16px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.detail-header > div {
  min-width: 0;
}

.detail-eyebrow {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-header h2 {
  margin: 1px 0 0;
  color: var(--brand);
  font-size: 21px;
}

.detail-content {
  max-height: calc(
    var(--app-viewport-height, 100dvh) - var(--safe-top) - var(--safe-bottom) - 91px
  );
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 16px calc(22px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.detail-hero {
  padding: 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  grid-gap: 8px;
  gap: 8px;
  border-radius: 18px;
  background: var(--brand);
  color: white;
}

.detail-statuses {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-statuses .status-badge {
  max-width: none;
}

.detail-hero > strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 500;
}

.detail-hero > span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  text-align: right;
}

.detail-section {
  margin-top: 12px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.detail-section h3 {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.detail-section > strong {
  font-size: 16px;
}

.phone-link {
  width: -moz-fit-content;
  width: fit-content;
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-muted);
  font-size: 13px;
}

.detail-row a {
  overflow-wrap: anywhere;
  font-weight: 650;
  text-align: right;
  text-decoration: none;
}

.detail-address {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.detail-note {
  margin-top: 5px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--amber-soft);
}

.detail-note--rose {
  background: var(--rose-soft);
}

.detail-note--green {
  background: var(--green-soft);
}

.detail-note span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-note p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.detail-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-section__heading h3 {
  margin: 0;
}

.detail-section__heading span {
  color: var(--ink-soft);
  font-size: 11px;
}

.detail-items {
  display: flex;
  flex-direction: column;
}

.detail-item {
  padding: 12px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.detail-item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.detail-item > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.detail-item > strong {
  flex: 0 0 auto;
}

.detail-item span {
  color: var(--ink-muted);
  font-size: 11px;
}

.detail-totals > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-muted);
  font-size: 13px;
}

.detail-totals .detail-total {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
}

.detail-footer {
  padding: 16px 4px 2px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.detail-error {
  min-height: 320px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  text-align: center;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e7eae4;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 80%
  );
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

.skeleton-card {
  min-height: 200px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.skeleton--line {
  width: 100%;
  height: 16px;
}

.skeleton--half {
  width: 52%;
}

.skeleton--short {
  width: 72%;
}

.skeleton--block {
  width: 100%;
  height: 130px;
  margin-top: 12px;
}

.skeleton--hero {
  width: 100%;
  height: 112px;
  margin-bottom: 18px;
  background: #dfe4dd;
}

.app-navigation {
  width: min(100%, 1040px);
  min-height: 42px;
  padding: 0 16px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.app-navigation button {
  min-width: 120px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px 13px 0 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.67);
  font-weight: 750;
  cursor: pointer;
}

.app-navigation button.is-active {
  background: var(--canvas);
  color: var(--brand);
}

.operator--button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.account-menu {
  position: relative;
}

.account-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(310px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(42, 12, 23, 0.18);
  animation: reveal 150ms ease-out;
}

.account-popover > div:first-child {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-popover > div:first-child strong {
  font-size: 15px;
}

.account-popover > div:first-child span,
.account-popover__status span {
  color: var(--ink-muted);
  font-size: 12px;
}

.account-popover__status {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-block: 1px solid var(--line);
  background: var(--surface-soft);
}

.account-popover > button {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.account-popover > button:first-of-type {
  border-top: 0;
}

.account-popover .account-popover__logout {
  color: var(--red);
}

.modal-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(38, 9, 20, 0.54);
}

.password-dialog {
  width: min(100%, 440px);
  padding: 25px;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(38, 9, 20, 0.25);
}

.password-dialog h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 500;
}

.password-dialog > p {
  margin: 8px 0 20px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.5;
}

.install-dialog ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.45;
}

.password-dialog form,
.auth-form,
.bonus-adjustment form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.password-dialog label,
.auth-form label,
.bonus-adjustment label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.password-dialog label > span,
.auth-form label > span,
.bonus-adjustment label > span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.password-dialog input,
.auth-form input,
.bonus-adjustment input,
.bonus-adjustment textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

.bonus-adjustment textarea {
  min-height: 82px;
  padding-block: 12px;
  resize: vertical;
}

.password-dialog input:focus,
.auth-form input:focus,
.bonus-adjustment input:focus,
.bonus-adjustment textarea:focus {
  border-color: rgba(91, 23, 48, 0.5);
  box-shadow: 0 0 0 3px rgba(91, 23, 48, 0.08);
}

.password-dialog__actions {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
}

.password-dialog__actions--single {
  grid-template-columns: 1fr;
  margin-top: 22px;
}

.auth-card--form {
  align-items: stretch;
}

.auth-card--form .auth-logo,
.auth-card--form .auth-state-icon {
  align-self: center;
}

.auth-kicker {
  margin: 0 0 4px !important;
  color: var(--brand) !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-description {
  margin-bottom: 22px !important;
}

.auth-form__error {
  padding: 10px 12px;
  border: 1px solid #efd0d0;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.app-main--wide {
  width: min(100%, 1120px);
}

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

.customer-stat {
  min-height: 92px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.customer-stat span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-stat strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.customer-stat--accent {
  border-color: transparent;
  background: var(--brand);
  color: white;
}

.customer-stat--accent span {
  color: rgba(255, 255, 255, 0.68);
}

.customer-controls {
  margin-bottom: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(460px, 1.35fr);
  grid-gap: 12px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.customer-search {
  align-self: end;
  box-shadow: none;
}

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

.customer-selects select {
  min-height: 50px;
}

.customer-city-filter {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

.customer-sort-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.customer-sort-reset {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.customer-sort-reset:disabled {
  color: var(--ink-soft);
  cursor: default;
  opacity: 0.55;
}

.customer-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.customer-table th,
.customer-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.customer-table th {
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 750;
}

.customer-table-sort {
  margin: -7px -8px;
  padding: 7px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.customer-table-sort:hover,
.customer-table-sort:focus-visible,
.customer-table-sort.is-active {
  background: rgba(91, 23, 48, 0.07);
  color: var(--brand);
  outline: 0;
}

.customer-sort-indicator {
  width: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1;
}

.customer-table-sort.is-active .customer-sort-indicator {
  color: var(--brand);
}

.customer-table tbody tr:last-child td {
  border-bottom: 0;
}

.customer-row {
  cursor: pointer;
}

.customer-row:hover,
.customer-row:focus {
  outline: 0;
  background: #fbf7f8;
}

.customer-row td:nth-child(3) {
  display: table-cell;
}

.customer-row td:nth-child(3) strong,
.customer-row td:nth-child(3) small {
  display: block;
}

.customer-row td:nth-child(3) small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 10px;
}

.customer-identity {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
}

.customer-identity > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.customer-identity strong {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-identity small {
  max-width: 280px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bonus-pill {
  min-width: 58px;
  min-height: 28px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
}

.customer-card-list {
  display: none;
  grid-template-columns: 1fr;
  gap: 10px;
}

.customer-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.customer-card__metrics {
  margin-top: 14px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 0.7fr 1.4fr 0.9fr;
  border-block: 1px solid var(--line);
}

.customer-card__metrics > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-card__metrics small,
.customer-card__footer {
  color: var(--ink-muted);
  font-size: 10px;
}

.customer-card__metrics strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bonus-text {
  color: var(--brand);
}

.customer-card__footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.customer-sheet {
  width: min(100%, 760px);
}

.customer-balance-hero {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  border-radius: 19px;
  background: var(--brand);
  color: white;
}

.customer-balance-hero span {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
  font-weight: 700;
}

.customer-balance-hero strong {
  margin-top: 6px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 38px;
  font-weight: 500;
}

.customer-balance-hero small {
  color: rgba(255, 255, 255, 0.67);
}

.customer-contacts > a,
.customer-contacts > span {
  width: -moz-fit-content;
  width: fit-content;
  color: var(--brand);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.customer-detail-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.customer-detail-grid > span {
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.customer-detail-grid small {
  color: var(--ink-muted);
  font-size: 10px;
}

.customer-detail-grid strong {
  font-size: 13px;
}

.bonus-adjustment > p,
.detail-muted {
  margin: 0 0 6px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.bonus-operation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
}

.bonus-operation button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-muted);
  font-weight: 750;
  cursor: pointer;
}

.bonus-operation button.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.bonus-history {
  display: flex;
  flex-direction: column;
}

.bonus-history > div {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  grid-gap: 10px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.bonus-history > div:last-child {
  border-bottom: 0;
}

.bonus-history > div > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bonus-history strong {
  font-size: 12px;
}

.bonus-history small {
  color: var(--ink-muted);
  font-size: 10px;
}

.bonus-history__plus,
.bonus-history__minus {
  font-size: 13px;
  font-weight: 850;
}

.bonus-history__plus {
  color: var(--green);
}

.bonus-history__minus {
  color: var(--red);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes sheet-up {
  from {
    transform: translateY(36px);
    opacity: 0.7;
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 560px) {
  .app-header__inner {
    min-height: 66px;
  }

  .operator__text {
    display: none;
  }

  .app-navigation {
    justify-content: stretch;
  }

  .app-navigation button {
    min-width: 0;
    flex: 1 1;
  }

  .auth-card {
    padding: 28px 20px 23px;
  }

  .customer-stats {
    gap: 8px;
  }

  .customer-stat {
    min-height: 84px;
    padding: 13px;
  }

  .customer-stat strong {
    font-size: 20px;
  }

  .customer-controls {
    padding: 12px;
  }

  .customer-selects {
    grid-template-columns: 1fr;
  }

  .customer-detail-grid {
    grid-template-columns: 1fr;
  }

  .filter-toggle span:not(.filter-count) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .filter-toggle {
    position: relative;
    width: 50px;
    padding: 0;
  }

  .filter-count {
    position: absolute;
    top: -5px;
    right: -5px;
    box-shadow: 0 0 0 2px var(--canvas);
  }

  .filter-grid,
  .date-range {
    grid-template-columns: 1fr;
  }

  .filter-period {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .customer-table-wrap {
    display: block;
    max-width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .customer-sort-tools {
    justify-content: flex-start;
  }

  .customer-sort-reset {
    align-self: flex-start;
  }

  .customer-table {
    min-width: 630px;
  }

  .customer-table th,
  .customer-table td {
    padding: 10px 8px;
    font-size: 11px;
  }

  .customer-table th:first-child,
  .customer-table td:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 2;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    box-shadow: 8px 0 12px -13px rgba(20, 16, 18, 0.8);
  }

  .customer-table th:nth-child(2),
  .customer-table td:nth-child(2) {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .customer-table th:first-child {
    z-index: 3;
    background: var(--surface-soft);
  }

  .customer-table td:first-child {
    background: var(--surface);
  }

  .customer-row:hover td:first-child,
  .customer-row:focus td:first-child {
    background: #fbf7f8;
  }

  .customer-table-sort {
    margin-inline: -5px;
    padding-inline: 5px;
    gap: 3px;
  }

  .customer-identity {
    min-width: 0;
    gap: 6px;
  }

  .customer-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
  }

  .customer-identity strong,
  .customer-identity small {
    max-width: 90px;
  }

  .bonus-pill {
    min-width: 0;
    min-height: 24px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .customer-controls {
    grid-template-columns: 1fr;
  }

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

@media (min-width: 700px) {
  .app-main {
    padding-top: 32px;
  }

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

  .state-card {
    grid-column: 1 / -1;
  }

  .detail-sheet {
    margin-bottom: 20px;
    border-radius: 26px;
  }
}

@media (hover: none) {
  .order-card:hover {
    border-color: var(--line);
    box-shadow: 0 5px 20px rgba(75, 22, 42, 0.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

