:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #16233b;
  background: #edf4fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --blue-soft: #dff2ff;
  --sky: #82ccfa;
  --surface: #f5f8fb;
  --success: #1c9b72;
  --danger: #da5b6c;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #edf4fa; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 9vw, 3rem); line-height: 1.04; }
h2 { font-size: clamp(1.4rem, 6vw, 1.85rem); line-height: 1.13; letter-spacing: -.04em; }
h3 { font-size: .95rem; line-height: 1.28; }

.page-enter { animation: page-in .62s cubic-bezier(.18,.82,.22,1) both; }
.eyebrow { display: block; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.splash { display: grid; min-height: 100vh; align-content: center; justify-items: center; gap: 14px; color: var(--muted); background: white; }
.loader { width: 30px; height: 30px; border: 3px solid #dcecf8; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }

/* Логотип собирается из отдельных букв, чтобы сохранить живой характер референса. */
.brand-logo { display: inline-flex; max-width: 100%; flex-direction: column; align-items: center; width: max-content; }
.brand-logo__image { display: block; width: clamp(255px, 72vw, 350px); max-width: 100%; height: auto; }
.brand-logo__word { display: flex; align-items: flex-end; color: var(--blue); font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-size: clamp(2.65rem, 13vw, 5.25rem); font-weight: 900; line-height: .78; letter-spacing: -.13em; white-space: nowrap; }
.brand-logo__word > span { display: inline-block; -webkit-text-fill-color: transparent; }
.brand-logo__word > span:nth-child(1) { transform: rotate(-7deg) translateY(2px); }
.brand-logo__word > span:nth-child(2) { transform: rotate(3deg) translateY(-1px); }
.brand-logo__word > span:nth-child(3) { transform: rotate(-2deg) scaleY(1.06); }
.brand-logo__word > span:nth-child(4) { transform: rotate(4deg) translateY(1px); }
.brand-logo__word > span:nth-child(5) { transform: rotate(-3deg); }
.brand-logo__word > span:nth-child(6) { transform: rotate(5deg) translateY(1px); }
.brand-logo__word > span:nth-child(7) { transform: rotate(-2deg); }
.brand-logo__slogan { margin-top: 5px; font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-size: clamp(.61rem, 3vw, 1rem); font-weight: 900; transform: rotate(-1deg); }
.brand-logo--compact { align-items: flex-start; }
.brand-logo--compact .brand-logo__image { width: 86px; }
.brand-logo--compact .brand-logo__word { font-size: 1.4rem; }
.brand-logo--compact .brand-logo__slogan { margin-top: 3px; font-size: .31rem; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid transparent; cursor: pointer; font-weight: 800; }
.button:active:not(:disabled) { transform: scale(.975); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button svg { width: 20px; height: 20px; }
.button--primary { color: white; }
.button--primary:hover:not(:disabled) { transform: translateY(-1px); }
.button--ghost { color: var(--ink-soft); background: white; }
.button--small { padding: 0 13px; color: white; font-size: .69rem; }
.button--full { width: 100%; }
.icon-button { display: grid; width: 38px; height: 38px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; place-items: center; }
.icon-button svg { width: 20px; }

input { width: 100%; height: 54px; padding: 0 16px; outline: none; color: var(--ink); transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
input::placeholder { color: #a1adba; }
.form-error { margin-top: 9px; color: var(--danger); font-size: .73rem; line-height: 1.45; }

.login-page { position: relative; display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)); overflow: hidden; }
.login-page::before { position: absolute; content: ''; }
.login-page::after { position: absolute; content: ''; }
.login-page__glow { position: absolute; left: 50%; border-radius: 50%; transform: translateX(-50%); }
.login-card { position: relative; z-index: 1; display: flex; width: calc(100vw - 36px); max-width: 430px; min-width: 0; flex: 0 1 auto; flex-direction: column; justify-content: space-between; padding: 18px 8px 2px; }
.login-card__top { display: flex; justify-content: space-between; font-size: .59rem; font-weight: 800; text-transform: uppercase; }
.login-card__copy { margin-bottom: 24px; }
.login-card__copy .eyebrow { margin-bottom: 10px; }
.login-card__copy h1 { max-width: 380px; margin-bottom: 13px; }
.login-card__copy > p:last-child { line-height: 1.6; }
.login-card form { display: flex; flex-direction: column; margin-inline: auto; }
.login-card label { margin-bottom: 9px; font-size: .73rem; font-weight: 750; }
.login-card__privacy { margin-top: 20px; color: #a0aab6; font-size: .61rem; text-align: center; }

.app-shell { width: 100%; min-height: 100vh; margin: 0 auto; }
.app-header { position: sticky; z-index: 20; top: 0; display: flex; width: 100%; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 20px 9px; border-bottom: 1px solid rgba(226,234,241,.8); backdrop-filter: blur(18px); }
.app-header__year { font-size: .58rem; font-weight: 850; }
.app-main { width: 100%; min-height: calc(100vh - 72px); }
.bottom-nav { position: fixed; z-index: 30; display: grid; left: 50%; grid-template-columns: repeat(4, 1fr); backdrop-filter: blur(18px); transform: translateX(-50%); }
.bottom-nav__item { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 3px; color: #9aa7b5; font-weight: 750; }
.bottom-nav__item svg { width: 21px; height: 21px; }

.hero-section { display: grid; }
.hero-section .eyebrow, .page-heading .eyebrow { margin-bottom: 9px; }
.hero-section h1, .page-heading h1 { margin-bottom: 11px; color: var(--ink); }
.hero-section > div:first-child > p:last-child, .page-heading > div > p:last-child { max-width: 430px; color: var(--ink-soft); font-size: .84rem; line-height: 1.6; }
.balance-card { position: relative; display: flex; align-items: center; gap: 15px; overflow: hidden; }
.balance-card::before { position: absolute; content: ''; }
.balance-card__icon { display: grid; flex: 0 0 auto; place-items: center; }
.balance-card__icon svg { width: 25px; }
.balance-card strong { position: relative; display: block; margin-top: 5px; font-size: clamp(1.65rem, 8vw, 2.35rem); line-height: 1; letter-spacing: -.05em; }
.balance-card strong small { font-size: .7rem; font-weight: 650; letter-spacing: 0; }
.balance-card--compact { min-width: 162px; padding: 14px; }
.balance-card--compact strong { font-size: 1.2rem; }

.scan-cta { display: grid; align-items: center; gap: 13px; overflow: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; }
.scan-cta:active { transform: scale(.985); }
.scan-cta__icon { display: grid; place-items: center; }
.scan-cta__icon svg { width: 26px; }
.scan-cta small, .scan-cta strong { display: block; }
.scan-cta small { margin-bottom: 3px; font-size: .63rem; font-weight: 700; opacity: .8; }
.scan-cta strong { font-size: .98rem; letter-spacing: -.02em; }
.scan-cta > svg { width: 19px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 + p { margin-top: 8px; font-size: .77rem; line-height: 1.5; }
.section-heading--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.section-heading--row > a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: var(--blue-deep); font-size: .69rem; font-weight: 800; }
.section-heading--row > a svg { width: 15px; }

/* Мерч — единый спокойный список, а не сетка карточек. */
.products-grid { display: flex; flex-direction: column; }
.product-list-item { border-bottom: 1px solid var(--line); transition: background .3s ease; }
.product-list-item:last-child { border-bottom: 0; }
.product-card { display: grid; min-width: 0; }
.product-list-item .product-card { background: transparent; }
.product-card__art { display: grid; overflow: hidden; place-items: center; }
.product-card__art svg { fill: rgba(47,159,231,.04); stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-card h3 { color: var(--ink); }
.product-card p { margin-top: 5px; font-size: .69rem; font-weight: 780; }
.product-card__action { display: flex; justify-content: flex-end; }
.product-card__action .button { line-height: 1.15; text-align: center; }
.product-card__hint { font-size: .63rem; font-weight: 700; }
.received-label { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; color: var(--success); font-size: .68rem; font-weight: 800; }
.received-label svg { width: 15px; }
.purchase-inline > div:not(.purchase-inline__actions) { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--ink-soft); font-size: .68rem; }
.purchase-inline > div strong { color: var(--ink); }
.purchase-inline > p { margin: 7px 0 13px; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.purchase-inline__actions { display: grid; grid-template-columns: .85fr 1.25fr; gap: 8px; }
.purchase-inline__actions .button { min-height: 42px; padding: 0 12px; font-size: .7rem; }

.transaction-list { overflow: hidden; }
.transaction { display: grid; min-height: 66px; align-items: center; grid-template-columns: 54px 1fr auto; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.transaction:last-child { border-bottom: 0; }
.transaction__amount { display: grid; height: 36px; color: var(--danger); background: #fff1f3; font-size: .71rem; font-weight: 850; place-items: center; }
.transaction__amount.is-positive { color: var(--success); background: #eefaf6; }
.transaction strong, .transaction small { display: block; }
.transaction strong { color: var(--ink); font-size: .75rem; }
.transaction small { margin-top: 3px; color: #97a4b2; font-size: .58rem; }
.empty-state { display: grid; min-height: 126px; align-content: center; justify-items: center; gap: 8px; padding: 20px; border: 1px dashed #dce6ee; color: #92a0ae; font-size: .75rem; text-align: center; }
.empty-state span { color: var(--blue); font-size: 1.25rem; }

.page-heading { display: grid; gap: 18px; margin-bottom: 25px; }
.scanner-card { background: white; }
.scanner-viewport { position: relative; display: grid; min-height: 294px; overflow: hidden; place-items: center; }
#qr-reader { width: 100%; min-height: 294px; border: 0 !important; }
#qr-reader video { border-radius: 20px; object-fit: cover; }
.scanner-placeholder { position: absolute; display: grid; width: 100%; inset: 0; align-content: center; justify-items: center; gap: 15px; padding: 30px; color: #62809a; text-align: center; }
.scanner-placeholder::before, .scanner-placeholder::after { position: absolute; width: 44px; height: 44px; border-color: var(--blue); border-style: solid; content: ''; opacity: .55; }
.scanner-placeholder::before { top: 44px; left: 44px; border-width: 2px 0 0 2px; border-radius: 8px 0 0; }
.scanner-placeholder::after { right: 44px; bottom: 44px; border-width: 0 2px 2px 0; border-radius: 0 0 8px; }
.scanner-placeholder svg { width: 44px; color: var(--blue-deep); }
.scanner-placeholder p { max-width: 210px; font-size: .75rem; line-height: 1.5; }
.dev-panel { margin-top: 12px; padding: 12px; border: 1px dashed #b9dff5; border-radius: 15px; background: #f4fbff; }
.dev-panel__label { display: block; margin-bottom: 8px; color: var(--blue-deep); font-size: .55rem; font-weight: 850; letter-spacing: .1em; }
.dev-panel__row { display: flex; gap: 8px; }
.dev-panel input { height: 38px; border-radius: 10px; background: white; }
.progress-card { margin-top: 17px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #f8fafc; }
.progress-card > div:first-child { display: flex; align-items: center; justify-content: space-between; font-size: .74rem; }
.progress-card strong { color: var(--blue-deep); font-size: 1.05rem; }
.progress-track { height: 7px; margin: 13px 0 10px; overflow: hidden; border-radius: 20px; background: #e5edf3; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #258bd0, #8ed2f7); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.progress-card p { color: var(--muted); font-size: .64rem; }

.shop-note { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 12px 14px; border-radius: 15px; color: #5f7185; font-size: .67rem; line-height: 1.45; }
.shop-note span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; border: 1px solid #9bd4f4; border-radius: 50%; color: var(--blue-deep); font-weight: 850; place-items: center; }

.receipt-page { padding: 5px 0 10px; }
.receipt { text-align: center; }
.receipt__mark { display: grid; width: 62px; height: 62px; margin: 4px auto 15px; border-radius: 50%; color: white; background: linear-gradient(145deg, #1c9b72, #6ad2ad); box-shadow: 0 0 0 9px #eefaf6; place-items: center; }
.receipt__mark svg { width: 29px; }
.receipt > h2 { margin: 6px 0 16px; color: var(--blue-deep); font-size: 2.2rem; text-transform: uppercase; }
.receipt > .brand-logo { margin-bottom: 20px; }
.receipt__details { padding: 6px 16px; border: 1px solid var(--line); border-radius: 20px; background: #f8fafc; }
.receipt__details > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .68rem; text-align: left; }
.receipt__details > div:last-child { border-bottom: 0; }
.receipt__details span { color: var(--muted); }
.receipt__details strong { max-width: 62%; color: var(--ink); text-align: right; }
.receipt__qr { display: grid; justify-items: center; gap: 9px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.receipt__qr svg { width: min(52vw, 188px); height: auto; }
.receipt__qr span { color: var(--muted); font-size: .64rem; font-weight: 750; }
.receipt__code { display: grid; gap: 4px; margin: 15px 0; padding: 14px; border-radius: 14px; color: white; background: linear-gradient(120deg, #237ebc, #69bfee); }
.receipt__code span { font-size: .59rem; opacity: .76; }
.receipt__instruction { max-width: 310px; margin: 0 auto 17px; color: #325f7e; font-size: .79rem; font-weight: 800; line-height: 1.45; }
.pending-receipts { display: grid; gap: 8px; margin: 0 0 22px; padding: 16px; border: 1px solid #d7e5ec; border-radius: 18px; background: linear-gradient(145deg, #f8fcfe, #edf7fb); }
.pending-receipts > div { margin-bottom: 3px; }
.pending-receipts h2 { margin-top: 4px; font-size: 1.15rem; }
.pending-receipts button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; border: 1px solid #d6e3e9; border-radius: 12px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.pending-receipts button > span:first-child { display: grid; gap: 4px; }
.pending-receipts button small { color: var(--muted); font-size: .6rem; }
.pending-receipts button > span:last-child { color: var(--blue-deep); font-size: .65rem; font-weight: 850; white-space: nowrap; }

.profile-hero { display: grid; justify-items: center; margin: 6px 0 23px; text-align: center; }
.profile-avatar { display: grid; width: 82px; height: 82px; margin-bottom: 16px; border: 1px solid #cce8f8; color: var(--blue-deep); background: linear-gradient(145deg, #e9f7ff, #cdeafa); font-size: 2rem; font-weight: 850; place-items: center; transform: rotate(-3deg); }
.profile-hero h1 { max-width: 430px; margin-top: 8px; color: var(--ink); font-size: clamp(1.45rem, 7vw, 2.25rem); letter-spacing: -.04em; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 11px; }
.stat-card { display: grid; padding: 16px; }
.stat-card svg { width: 24px; color: var(--blue-deep); }
.stat-card strong { align-self: end; color: var(--ink); font-size: 1.6rem; letter-spacing: -.04em; }
.stat-card strong small { color: var(--muted); font-size: .78rem; }
.stat-card span { color: var(--muted); font-size: .65rem; }
.transaction-list--full .transaction > small { margin: 0; padding: 4px 7px; border-radius: 8px; background: #f3f6f8; }
.logout-button { display: flex; width: 100%; height: 55px; align-items: center; gap: 12px; margin-top: 34px; padding: 0 17px; border: 1px solid #f2dbe0; border-radius: 16px; color: var(--danger); background: #fff8f9; cursor: pointer; font-weight: 750; }
.logout-button svg { width: 22px; }
.profile-footnote { margin-top: 11px; color: #9aa6b4; font-size: .61rem; text-align: center; }

.toast { position: fixed; z-index: 150; display: grid; width: min(calc(100% - 28px), 430px); left: 50%; top: max(16px, env(safe-area-inset-top)); grid-template-columns: 38px 1fr 34px; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.96); box-shadow: 0 18px 55px rgba(35,74,112,.18); backdrop-filter: blur(15px); transform: translateX(-50%); animation: toast-in .38s cubic-bezier(.2,.85,.2,1); }
.toast__icon { display: grid; width: 34px; height: 34px; border-radius: 11px; background: #f3f6f8; place-items: center; }
.toast__icon svg { width: 19px; }
.toast--success .toast__icon { color: var(--success); background: #eefaf6; }
.toast--error .toast__icon { color: var(--danger); background: #fff1f3; }
.toast strong { color: var(--ink); font-size: .75rem; }
.toast p { margin-top: 2px; color: var(--ink-soft); font-size: .63rem; line-height: 1.4; }

@media (min-width: 520px) {
  .app-main { padding-inline: 26px; }
  .hero-section, .page-heading { grid-template-columns: 1fr auto; align-items: end; }
  .hero-section .balance-card { min-width: 228px; }
}

@media (min-width: 700px) {
  body { padding: 26px; }
  .app-shell { min-height: calc(100vh - 52px); overflow: hidden; border: 1px solid #e1eaf1; }
  .app-header { padding-inline: 28px; }
  .app-main { padding-inline: 30px; }
}

@media (max-width: 360px) {
  .app-main { padding-inline: 14px; }
  .product-card { gap: 10px; padding-inline: 10px; }
  .product-card__art { border-radius: 16px; }
  .product-card__action { max-width: 100px; }
  .product-card__action .button { max-width: 100px; padding-inline: 8px; font-size: .62rem; }
  .floor-map__caption { padding-inline: 14px; }
  .floor-map__caption strong { font-size: .76rem; }
  .floor-map__caption a { font-size: .56rem; }
  .floor-map__note { padding-inline: 14px; }
  .dev-panel__row { flex-direction: column; }
  .bottom-nav { width: calc(100% - 16px); }
}

/* Серверные сценарии: активация ссылки и рабочее место сотрудника. */
.redeem-result {
  display: grid;
  min-height: 62vh;
  align-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.redeem-result__icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border: 1px solid #c9dbe6;
  border-radius: 50%;
  color: #237fb9;
  background: #f3f9fc;
  place-items: center;
}

.redeem-result__icon svg { width: 34px; height: 34px; }
.redeem-result--success .redeem-result__icon { color: var(--success); border-color: #bfe3d5; background: #f0faf6; }
.redeem-result--error .redeem-result__icon { color: var(--danger); border-color: #efd2d6; background: #fff6f7; }
.redeem-result > p:not(.eyebrow) { max-width: 310px; color: var(--ink-soft); line-height: 1.6; }
.redeem-result .button { width: min(100%, 310px); margin-top: 16px; }

.receipt__code strong { font-size: 1.35rem; letter-spacing: .12em; }

.privacy-consent {
  display: grid;
  align-items: start;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.privacy-consent input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #1d6f9f;
  box-shadow: none;
}

.privacy-consent a,
.app-legal a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

.app-legal {
  padding: 0 20px 108px;
  color: var(--muted);
  font-size: .58rem;
  text-align: center;
}

.privacy-page {
  min-height: 100vh;
  padding: 20px;
  color: #17283a;
  background: #f5f7f7;
}

.privacy-page > header,
.privacy-page > article { width: min(100%, 790px); margin-inline: auto; }
.privacy-page > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 4px 0 24px; }
.privacy-page > header > a { color: var(--blue-deep); font-size: .7rem; font-weight: 800; }
.privacy-page > article { padding: clamp(24px, 6vw, 56px); border: 1px solid #dce2e5; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(27,52,70,.07); }
.privacy-page h1 { max-width: 650px; margin-top: 12px; font-size: clamp(2.2rem, 8vw, 4rem); }
.privacy-lead { max-width: 620px; margin-top: 22px; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.privacy-page article section { margin-top: 34px; padding-top: 24px; border-top: 1px solid #e1e6e8; }
.privacy-page article section h2 { margin-bottom: 12px; font-size: 1.15rem; letter-spacing: -.02em; }
.privacy-page article section p { color: #536372; font-size: .82rem; line-height: 1.75; }
.privacy-page article section a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .privacy-page { padding: 12px; }
  .privacy-page > header { padding-inline: 5px; }
  .privacy-page > header .brand-logo__image { width: 80px; }
  .privacy-page > article { padding: 24px 20px; }
}

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

@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%,-18px); } }

/* Premium editorial pass: строгая сетка, меньше декоративных контейнеров. */
:root {
  --ink: #101d31;
  --ink-soft: #5d6877;
  --muted: #8d97a3;
  --blue: #3198dc;
  --blue-deep: #176ba6;
  --line: #dfe4e8;
  --shadow-soft: 0 20px 60px rgba(24, 45, 66, .07);
}

body {
  background: #e9edef;
}

h1, h2, h3 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
}

h1 {
  letter-spacing: -.06em;
}

.eyebrow {
  color: #39779f;
  font-size: .6rem;
  letter-spacing: .19em;
}

.brand-logo__word {
  filter: none;
}

.brand-logo__word > span {
  background: linear-gradient(180deg, #76c4f2, #368fc9);
  background-clip: text;
  -webkit-background-clip: text;
}

.brand-logo__slogan {
  color: #203f5e;
  letter-spacing: -.045em;
}

.button {
  border-radius: 7px;
  transition: transform .38s cubic-bezier(.16,1,.3,1), box-shadow .38s ease, background .38s ease, opacity .2s;
}

.button--primary {
  background: #153a5a;
  box-shadow: none;
}

.button--primary:hover:not(:disabled) {
  background: #1c4c73;
  box-shadow: 0 12px 30px rgba(20, 57, 87, .15);
}

.button--ghost {
  border-color: #d7dde2;
  border-radius: 7px;
}

.button--small {
  min-height: 37px;
  border-radius: 6px;
  background: #153a5a;
  box-shadow: none;
}

input {
  border: 0;
  border-bottom: 1px solid #bac4cb;
  border-radius: 0;
  background: transparent;
}

input:focus {
  border-color: #247fb8;
  background: transparent;
  box-shadow: 0 2px 0 #247fb8;
}

.login-page {
  background: #fafaf8;
}

.login-page::before {
  width: 1px;
  height: 190px;
  top: 0;
  right: 38px;
  border-radius: 0;
  background: #cce7f6;
}

.login-page::after {
  width: 120px;
  height: 1px;
  bottom: 34px;
  left: 0;
  border: 0;
  border-radius: 0;
  background: #cce7f6;
}

.login-page__glow {
  width: 340px;
  height: 240px;
  top: 14%;
  background: rgba(74, 170, 224, .065);
  filter: blur(90px);
}

.login-card {
  min-height: min(720px, calc(100vh - 44px));
  padding-inline: 14px;
}

.login-card__top {
  color: #778592;
  letter-spacing: .22em;
}

.login-card > .brand-logo {
  align-self: flex-start;
  margin: 8vh 0 8vh;
}

.login-card__copy {
  position: relative;
  padding-top: 20px;
}

.login-card__copy::before {
  position: absolute;
  width: 34px;
  height: 2px;
  top: 0;
  left: 0;
  background: #2e91ce;
  content: '';
}

.login-card__copy h1 {
  margin-top: 11px;
  color: #0f1e31;
  font-size: clamp(2.45rem, 11vw, 3.2rem);
}

.login-card__copy > p:last-child {
  max-width: 310px;
  color: #667383;
  font-size: .82rem;
}

.login-card form {
  width: 100%;
  max-width: none;
}

.login-card label {
  color: #25384a;
  letter-spacing: .025em;
}

.login-card form .button {
  min-height: 52px;
  margin-top: 20px;
  background: linear-gradient(90deg, #153a5a 0 calc(100% - 5px), #54b3e9 calc(100% - 5px));
}

.app-shell {
  max-width: 520px;
  background: #fbfbf9;
}

.app-header {
  height: 64px;
  padding-inline: 18px;
  border-bottom-color: #e2e6e8;
  background: rgba(251,251,249,.94);
}

.app-header__year {
  color: #667483;
  letter-spacing: .23em;
}

.app-main {
  padding: 34px 18px calc(92px + env(safe-area-inset-bottom));
}

.bottom-nav {
  width: min(100%, 520px);
  height: 66px;
  bottom: 0;
  padding: 6px 10px max(6px, env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid #dce2e6;
  border-radius: 0;
  background: rgba(251,251,249,.96);
  box-shadow: 0 -10px 35px rgba(24,45,66,.045);
}

.bottom-nav__item {
  border-radius: 0;
  font-size: .54rem;
  transition: color .35s ease, transform .35s cubic-bezier(.16,1,.3,1);
}

.bottom-nav__item.is-active {
  color: #176ba6;
  background: transparent;
  transform: translateY(-2px);
}

.bottom-nav__item.is-active::after {
  position: absolute;
  width: 18px;
  height: 2px;
  bottom: 0;
  background: #3198dc;
  content: '';
}

.hero-section {
  gap: 28px;
}

.hero-section h1,
.page-heading h1 {
  margin-top: 10px;
}

.hero-section > div:first-child > p:last-child,
.page-heading > div > p:last-child {
  max-width: 360px;
  color: #697482;
  font-size: .8rem;
}

.balance-card {
  min-height: 120px;
  padding: 21px 20px;
  border: 0;
  border-radius: 5px;
  color: white;
  background: #122a43;
  box-shadow: 0 18px 45px rgba(16, 36, 56, .14);
}

.balance-card::before {
  width: 1px;
  height: 100%;
  top: 0;
  right: 44px;
  border-radius: 0;
  background: rgba(119, 198, 241, .35);
}

.balance-card::after {
  position: absolute;
  right: 15px;
  bottom: 13px;
  color: rgba(255,255,255,.42);
  content: 'SB';
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.balance-card__icon {
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 4px;
  color: #81caf1;
  background: transparent;
  box-shadow: none;
}

.balance-card .eyebrow {
  color: #80c8ef;
}

.balance-card strong {
  color: white;
}

.balance-card strong small {
  color: #9fb5c7;
}

.balance-card--compact {
  min-height: 78px;
  border-radius: 4px;
}

.balance-card--compact .balance-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 3px;
}

.scan-cta {
  min-height: 78px;
  grid-template-columns: 46px 1fr 20px;
  margin: 14px 0 46px;
  padding: 14px 0;
  border-top: 1px solid #d6dde2;
  border-bottom: 1px solid #d6dde2;
  border-radius: 0;
  color: #153a5a;
  background: transparent;
  box-shadow: none;
}

.scan-cta:hover {
  box-shadow: none;
  transform: translateX(3px);
}

.scan-cta__icon {
  width: 42px;
  height: 42px;
  border-radius: 3px;
  color: white;
  background: #2b91cf;
}

.scan-cta small {
  color: #71808d;
}

.content-section {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid #dfe4e8;
}

.section-heading {
  margin-bottom: 21px;
}

.section-heading h2 + p {
  color: #76818d;
}

.floor-map { overflow: hidden; border: 1px solid #d7e0e5; border-radius: 18px; background: #fff; box-shadow: 0 18px 45px rgba(27, 65, 88, .08); }
.floor-map__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 6px; background: #edf2f5; }
.floor-map__tabs button { display: flex; min-width: 0; min-height: 48px; align-items: baseline; justify-content: center; gap: 4px; border: 0; border-radius: 12px; color: #718390; background: transparent; font: inherit; cursor: pointer; transition: color .28s ease, background .28s ease, box-shadow .28s ease, transform .28s cubic-bezier(.16,1,.3,1); }
.floor-map__tabs button span { font-size: 1rem; font-weight: 850; }
.floor-map__tabs button small { font-size: .57rem; font-weight: 700; }
.floor-map__tabs button.is-active { color: #153a5a; background: #fff; box-shadow: 0 5px 16px rgba(36, 71, 91, .1); }
.floor-map__tabs button:active { transform: scale(.97); }
.floor-map__viewport figure { margin: 0; animation: floor-map-in .42s cubic-bezier(.16,1,.3,1); }
.floor-map__caption { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 17px 18px 14px; }
.floor-map__caption > div { display: grid; min-width: 0; gap: 4px; }
.floor-map__caption span { color: #3b7b9f; font-size: .57rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.floor-map__caption strong { overflow: hidden; color: #162a3c; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.floor-map__caption a { flex: none; color: #176f9f; font-size: .6rem; font-weight: 800; }
.floor-map__viewport img { display: block; width: 100%; height: auto; aspect-ratio: 595 / 420; border-block: 1px solid #e2e7ea; background: #d9d9d9; object-fit: contain; }
.floor-map__note { display: flex; align-items: center; gap: 9px; padding: 13px 18px 15px; color: #758591; font-size: .61rem; line-height: 1.45; }
.floor-map__note span { display: grid; width: 24px; height: 24px; flex: none; border: 1px solid #d5e4ec; border-radius: 50%; color: #257da9; background: #f5fafc; place-items: center; }
@keyframes floor-map-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.products-grid {
  overflow: visible;
  border: 0;
  border-top: 1px solid #cfd7dc;
  border-radius: 0;
  background: transparent;
}

.product-list-item {
  border-bottom-color: #d8dfe3;
}

.product-list-item.is-selected {
  background: #f1f6f8;
}

.product-card {
  background: transparent;
}

.product-card__art {
  border: 1px solid #cbdce6;
  color: #257fb8;
}

.product-card__art svg {
  width: 33px;
  height: 33px;
}

.product-card p {
  color: #39779f;
  letter-spacing: .02em;
}

.product-card__hint {
  color: #74818d;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.received-label {
  border: 1px solid #cce6dc;
  border-radius: 4px;
  background: transparent;
}

.transaction-list {
  border: 0;
  border-top: 1px solid #d3dbe0;
  border-radius: 0;
  background: transparent;
}

.transaction {
  padding-inline: 0;
}

.transaction__amount {
  border-radius: 3px;
}

.empty-state {
  border-radius: 4px;
  background: transparent;
}

.page-heading {
  padding-bottom: 24px;
  border-bottom: 1px solid #dfe4e8;
}

.scanner-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.scanner-viewport {
  border-radius: 4px;
  background: #e9f2f6;
}

.scanner-card > .button {
  margin-top: 15px;
}

.dev-panel,
.progress-card,
.shop-note {
  border-radius: 4px;
}

.shop-note {
  border-left: 2px solid #3198dc;
  background: #f0f5f7;
}

.stats-grid {
  gap: 0;
  border-top: 1px solid #d8dfe3;
  border-bottom: 1px solid #d8dfe3;
}

.stat-card {
  min-height: 125px;
  border: 0;
  border-right: 1px solid #d8dfe3;
  border-radius: 0;
  background: transparent;
}

.stat-card:last-child {
  border-right: 0;
}

.profile-avatar {
  border-radius: 50%;
  box-shadow: none;
}

.receipt__mark,
.receipt__details,
.receipt__code {
  border-radius: 4px;
}

@media (min-width: 700px) {
  .app-shell {
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(22,43,61,.14);
  }

  .bottom-nav {
    bottom: 26px;
    border: 1px solid #dce2e6;
    border-radius: 0 0 8px 8px;
  }
}

@media (max-width: 360px) {
  .product-card {
    grid-template-columns: 45px minmax(0,1fr) auto;
  }

  .product-card__art {
    width: 43px;
    height: 43px;
  }

  .purchase-inline {
    padding-left: 57px;
  }
}

/* Фотокаталог: крупное изображение остаётся частью спокойного списка. */
.products-grid--shop {
  border-top-color: #c7d3da;
}

.products-grid--shop .product-list-item {
  padding-block: 5px;
}

.product-card {
  min-height: 126px;
  align-items: stretch;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  padding: 15px 0;
}

.product-card__art {
  width: 92px;
  height: 96px;
  align-self: start;
  border-color: #d7dfe4;
  border-radius: 5px;
  background: #f2f2ef;
}

.product-card__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.16, 1, .3, 1);
}

.product-card__art--contain img {
  padding: 5px;
  background: #fff;
  object-fit: contain;
}

.product-card:hover .product-card__art img {
  transform: scale(1.035);
}

.product-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.product-card h3 {
  overflow: visible;
  padding-right: 4px;
  font-size: .9rem;
  line-height: 1.28;
  text-overflow: clip;
  white-space: normal;
}

.product-card p.product-card__stock {
  margin-top: 6px;
  color: #74818d;
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .01em;
}

.product-card p.product-card__note {
  margin-top: 4px;
  color: #7d8791;
  font-size: .57rem;
  font-weight: 500;
  line-height: 1.35;
}

.product-card__footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 9px;
}

.product-card__footer > strong {
  color: #176ba6;
  font-size: .83rem;
  line-height: 1;
  white-space: nowrap;
}

.product-card__footer > strong span {
  font-size: .58rem;
  font-weight: 650;
}

.product-card__action {
  max-width: 106px;
}

.product-card__action .button {
  max-width: 106px;
  min-height: 35px;
  padding-inline: 10px;
}

.purchase-inline {
  padding: 2px 0 18px 107px;
}

@media (max-width: 380px) {
  .product-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
  }

  .product-card__art {
    width: 78px;
    height: 88px;
  }

  .product-card__action .button {
    max-width: 94px;
    padding-inline: 8px;
    font-size: .6rem;
  }

  .product-card__footer > strong {
    font-size: .76rem;
  }

  .purchase-inline {
    padding-left: 90px;
  }
}

.fatal-error {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f6f9fc;
}

.fatal-error > div {
  width: min(100%, 520px);
  padding: clamp(28px, 8vw, 56px);
  border: 1px solid rgba(20, 57, 95, .12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(24, 58, 92, .12);
}

.fatal-error h1 { margin: 8px 0 12px; }
.fatal-error code { display: block; margin: 18px 0; overflow-wrap: anywhere; color: #315f91; }
