:root {
  color-scheme: light;
  font-family: "Segoe UI", "SF Pro Display", sans-serif;
  --bg: #f3f3f4;
  --surface: #ffffff;
  --surface-muted: #f2f2f4;
  --surface-soft: #f5f4f8;
  --text: #111111;
  --muted: #7b7b80;
  --green: #1ea332;
  --green-dark: #138b28;
  --purple: #b15cff;
  --border: rgba(17, 17, 17, 0.04);
  --shadow: 0 14px 40px rgba(23, 25, 31, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.phone-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 24px 112px;
  background: var(--bg);
}

.bank-loading-line {
  position: relative;
  min-height: 1em;
}

.bank-shell.is-loading .bank-loading-line {
  color: transparent;
}

.bank-shell.is-loading .bank-loading-line::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  height: 0.9em;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 227, 233, 0.9) 0%, rgba(243, 244, 247, 1) 50%, rgba(226, 227, 233, 0.9) 100%);
  background-size: 200% 100%;
  animation: bank-skeleton-shimmer 1.35s ease-in-out infinite;
}

.bank-loading-line-short::after {
  width: 42%;
}

.bank-loading-line-name::after {
  width: 88px;
}

.bank-loading-line-balance::after {
  width: 72%;
}

.bank-loading-line-title::after {
  width: 58%;
}

.bank-loading-line-meta::after {
  width: 78%;
  height: 0.8em;
}

.bank-loading-line-amount::after {
  width: 64px;
  right: 0;
  left: auto;
}

@keyframes bank-skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: -100% 50%;
  }
}

.topbar {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: #ececed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-button-avatar {
  background: #e8e8e8;
}

.avatar-shape {
  position: relative;
  width: 24px;
  height: 24px;
}

.avatar-shape::before,
.avatar-shape::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #9a9a9f;
}

.avatar-shape::before {
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.avatar-shape::after {
  bottom: 0;
  width: 24px;
  height: 12px;
  border-radius: 12px 12px 6px 6px;
}

.searchbar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  background: #ededee;
}

.searchbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #4a4a50;
  font-size: 17px;
}

.searchbar__icon {
  width: 16px;
  height: 16px;
  border: 2px solid #b3b3b8;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.searchbar__icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #b3b3b8;
  transform: rotate(45deg);
}

.grid-icon {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.grid-icon span {
  border: 2px solid #1b1b1f;
  border-radius: 3px;
}

.wallet-card,
.section-card {
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.wallet-card {
  padding: 22px;
  margin-bottom: 16px;
  background: linear-gradient(120deg, #dce6ff 0%, #f4dff1 100%);
}

.wallet-card__header,
.section-card__header,
.history-item,
.bottom-nav,
.wallet-card__controls {
  display: flex;
}

.wallet-card__header,
.section-card__header {
  align-items: center;
  justify-content: space-between;
}

.wallet-card__header {
  margin-bottom: 18px;
}

.wallet-card h1,
.section-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.05;
}

.wallet-card__subtitle {
  margin-top: 6px;
  color: #75758c;
  font-size: 15px;
}

.wallet-card__controls {
  gap: 10px;
}

.wallet-card__control {
  min-width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: rgba(237, 232, 243, 0.9);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

.wallet-card__control-eye {
  background-image: url("/glaz.svg");
}

.wallet-card__control-menu {
  background-image: url("/tri_tochki.svg");
}

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

.wallet-shortcuts {
  display: grid;
  gap: 10px;
}

.shortcut-tile,
.wallet-item {
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.shortcut-tile {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortcut-tile__qr,
.shortcut-tile__shield,
.service-tile__icon-plus,
.history-item__icon,
.expense-card__icon,
.bottom-nav__icon,
.service-tile__icon-grid {
  position: relative;
}

.shortcut-tile__qr {
  width: 24px;
  height: 24px;
  background: url("/qr.svg") center / contain no-repeat;
}

.shortcut-tile__qr::before,
.shortcut-tile__qr::after {
  content: none;
}

.shortcut-tile__shield {
  width: 24px;
  height: 28px;
  background: url("/cybersecurity.svg") center / contain no-repeat;
}

.wallet-item {
  min-height: 160px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
}

.wallet-item__badge {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.wallet-item__badge-card {
  background-image: url("/card1.svg");
}

.wallet-item__badge-card-secondary {
  background-image: url("/card2.svg");
}

.wallet-item__badge-bonus {
  background-image: url("/bonus_spasibo.svg");
}

.wallet-item__name {
  color: #707078;
  font-size: 14px;
  margin-bottom: auto;
}

.wallet-item__amount {
  margin-top: 28px;
  font-size: 24px;
  font-weight: 700;
}

.wallet-item__meta {
  margin-top: 6px;
  color: #707078;
  font-size: 14px;
}

.section-card {
  padding: 22px 22px 10px;
  margin-bottom: 16px;
}

.section-card__header {
  margin-bottom: 18px;
}

.section-card__header a {
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
}

.section-card__link-placeholder {
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
}

.history-item {
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
}

.history-item__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f4f4f5 url("/basket_history_gray.svg") center / 22px 22px no-repeat;
}

.history-item__icon-payler {
  background-image: url("/basket.svg");
}

.history-item__icon::before,
.history-item__icon::after {
  content: none;
}

.history-item__body {
  min-width: 0;
  flex: 1;
}

.history-item__title {
  font-size: 17px;
  font-weight: 600;
}

.history-item__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.history-item__amount {
  white-space: nowrap;
  font-size: 17px;
  font-weight: 600;
  flex: 0 0 64px;
  text-align: right;
}

.history-item__amount.bank-loading-line {
  min-height: 1.1em;
}

.expense-grid,
.services-grid {
  display: grid;
  gap: 10px;
}

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

.expense-card,
.service-tile {
  min-height: 160px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.expense-card__icon {
  width: 24px;
  height: 24px;
  margin-bottom: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.expense-card__icon-clock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' focusable='false'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' fill-opacity='0' d='M0 0h24v24H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23111' fill-opacity='1' fill-rule='evenodd' d='M16.68 20.838a10 10 0 0 0 3.184-2.66c.341-.435.2-1.057-.267-1.353l-1.635-1.038c-.466-.296-1.078-.151-1.447.26a6.064 6.064 0 1 1-5.527-10.026c.544-.092.992-.532.992-1.085L11.975 3c0-.552-.452-1.004-1.001-.947a10 10 0 1 0 5.705 18.785M15.427 2.605a10 10 0 0 1 4.007 2.706c.369.41.27 1.04-.176 1.367l-1.562 1.145c-.445.326-1.066.222-1.461-.163a6.1 6.1 0 0 0-1.792-1.21c-.506-.223-.834-.76-.697-1.295l.479-1.877c.136-.535.683-.863 1.202-.673m6.355 11.468a9.96 9.96 0 0 0-.17-4.831c-.153-.531-.74-.78-1.253-.576l-1.799.717c-.513.205-.754.786-.636 1.325.153.698.183 1.429.076 2.162-.08.546.202 1.109.728 1.277l1.844.589c.527.168 1.095-.122 1.21-.663' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");
}

.expense-card__icon-clock::before {
  content: none;
}

.expense-card__icon-clock::after {
  content: none;
}

.expense-card__icon-people {
  background-image: url("/people.svg");
}

.expense-card__icon-people::before,
.expense-card__icon-people::after {
  content: none;
}

.expense-card__icon-people::before {
  width: 9px;
  height: 9px;
  left: 6px;
  top: 8px;
  box-shadow: 12px 0 0 #87ba1e;
}

.expense-card__icon-people::after {
  width: 18px;
  height: 8px;
  left: 8px;
  bottom: 7px;
}

.expense-card__icon-food {
  background-image: url("/vilka.svg");
}

.expense-card__icon-food::before,
.expense-card__icon-food::after {
  content: none;
}

.expense-card__icon-store {
  background-image: url("/basket.svg");
}

.expense-card__icon-store::before,
.expense-card__icon-store::after {
  content: none;
}

.expense-card__icon-store::before {
  left: 8px;
  top: 12px;
  width: 18px;
  height: 12px;
  border: 3px solid #27b58c;
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

.expense-card__icon-store::after {
  left: 10px;
  top: 8px;
  width: 14px;
  height: 4px;
  border: 3px solid #27b58c;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.expense-card__sum,
.expense-card__sum-small {
  font-weight: 700;
}

.expense-card__sum {
  font-size: 18px;
  margin-bottom: 6px;
}

.expense-card__sum-small {
  font-size: 16px;
  margin-top: 10px;
}

.expense-card__label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.expense-card__label-strong {
  color: #5e5e63;
}

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

.service-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-tile__brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
}

.service-tile__brand-logo {
  display: block;
  width: auto;
  max-width: 122px;
  height: 24px;
  object-fit: contain;
}

.service-tile__icon-grid {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.service-tile__icon-grid span {
  border: 2px solid #111;
  border-radius: 2px;
}

.service-tile__icon-plus {
  width: 28px;
  height: 28px;
  border: 2px solid #111;
  border-radius: 50%;
}

.service-tile__icon-plus::before,
.service-tile__icon-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #111;
  transform: translate(-50%, -50%);
}

.service-tile__icon-plus::before {
  width: 12px;
  height: 2px;
}

.service-tile__icon-plus::after {
  width: 2px;
  height: 12px;
}

.service-tile__title {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.service-tile__text {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.service-tile-accent {
  background: linear-gradient(180deg, #f4f2f7 0%, #ece8f3 100%);
  box-shadow: inset 0 0 0 1px rgba(177, 92, 255, 0.08);
}

.service-tile-accent .service-tile__title {
  line-height: 1.22;
}

.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  transform: translateX(-50%);
  padding: 10px 8px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  backdrop-filter: blur(16px);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8c8c92;
  font-size: 12px;
  font: inherit;
  text-decoration: none;
}

.bottom-nav__item-active {
  color: var(--green);
  font-weight: 600;
}

.bottom-nav__icon {
  width: 20px;
  height: 20px;
}

.bottom-nav__icon-home {
  background: url("/home.svg") center / contain no-repeat;
}

.bottom-nav__icon-home::after {
  content: none;
}

.bottom-nav__icon-chart::before,
.bottom-nav__icon-chart::after,
.bottom-nav__icon-pay::before,
.bottom-nav__icon-pay::after,
.bottom-nav__icon-card::before,
.bottom-nav__icon-assistant::before,
.bottom-nav__icon-assistant::after {
  content: none;
  position: absolute;
}

.bottom-nav__icon-chart {
  background: url("/nakopleniya.svg") center / contain no-repeat;
}

.bottom-nav__icon-chart::before {
  content: none;
}

.bottom-nav__icon-chart::after {
  content: none;
}

.bottom-nav__icon-assistant {
  background: url("/assistent.svg") center / contain no-repeat;
}

.bottom-nav__icon-assistant::before,
.bottom-nav__icon-assistant::after {
  content: none;
}

.bottom-nav__icon-assistant::before {
  content: none;
}

.bottom-nav__icon-assistant::after {
  content: none;
}

.bottom-nav__icon-pay {
  background: url("/platezhi.svg") center / contain no-repeat;
}

.bottom-nav__icon-pay::before {
  content: none;
}

.bottom-nav__icon-pay::after {
  content: none;
}

.bottom-nav__icon-card {
  background: url("/kredity.svg") center / contain no-repeat;
}

.bottom-nav__icon-card::before {
  content: none;
}

.bottom-nav__icon-card::after {
  content: none;
}

@media (max-width: 720px) {
  .wallet-grid {
    grid-template-columns: 62px repeat(3, 1fr);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .wallet-grid::-webkit-scrollbar,
  .expense-grid::-webkit-scrollbar,
  .services-grid::-webkit-scrollbar {
    display: none;
  }

  .wallet-item {
    min-width: 154px;
  }

  .expense-grid,
  .services-grid {
    grid-template-columns: repeat(4, 150px);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .service-tile {
    min-height: 184px;
  }
}

@media (max-width: 560px) {
  .phone-shell {
    padding: 16px 10px 108px;
  }

  .wallet-card,
  .section-card {
    border-radius: 22px;
  }

  .wallet-card,
  .section-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .wallet-card {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .section-card {
    padding-top: 18px;
  }

  .wallet-card h1,
  .section-card h2 {
    font-size: 24px;
  }

  .wallet-card__subtitle,
  .history-item__meta,
  .expense-card__label,
  .service-tile__text {
    font-size: 13px;
  }

}

@media (min-width: 761px) {
  .phone-shell {
    padding-left: 32px;
    padding-right: 32px;
  }

  .bottom-nav {
    padding-left: 32px;
    padding-right: 32px;
  }
}
