:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #161a22;
  --muted: #5c6472;
  --line: #e5e8ef;
  --green: #18a85a;
  --green-dark: #0c8241;
  --blue: #2488d8;
  --blue-dark: #1268ae;
  --shadow: 0 18px 50px rgba(28, 35, 50, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 18px 28px;
}

.page,
.topbar,
section,
article,
aside,
div {
  min-width: 0;
}

h1,
h2,
h3,
p,
strong,
span,
a,
button {
  overflow-wrap: break-word;
  word-break: normal;
}

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

.top-actions,
.brand {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 10px;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--page-deep, #151923);
  color: #fff;
  flex: 0 0 38px;
  overflow: hidden;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-logo-image {
  display: block;
  width: 26px !important;
  max-width: 26px !important;
  height: 26px !important;
  max-height: 26px !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.brand-mark.is-inverted .brand-logo-image {
  filter: brightness(0) invert(1);
}

.brand-mark.is-grayscale .brand-logo-image {
  filter: grayscale(1);
}

.brand-mark.is-inverted.is-grayscale .brand-logo-image {
  filter: grayscale(1) brightness(0) invert(1);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.lang-button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  padding: 0 10px;
}

.lang-button.is-active {
  background: var(--page-deep, #151923);
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(24, 168, 90, 0.14);
}

.button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 850;
  padding: 0 20px;
  box-shadow: 0 12px 24px var(--page-deep-shadow, rgba(18, 28, 45, 0.14));
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px var(--page-deep-shadow-hover, rgba(18, 28, 45, 0.18));
}

.button-primary {
  background: var(--page-deep, #151923);
}

.button-primary:hover {
  background: var(--page-deep-hover, #2a3140);
}

.button-whatsapp {
  background: var(--green);
}

.button-whatsapp:hover {
  background: var(--green-dark);
}

.button-telegram {
  background: var(--blue);
}

.button-telegram:hover {
  background: var(--blue-dark);
}

.button-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.button-icon svg {
  width: 16px;
  height: 16px;
}

.payment-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-icons img {
  display: block;
  width: 74px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 8px 10px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999;
  display: flex;
  width: auto;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(13, 17, 25, 0.68);
  backdrop-filter: blur(14px);
}

.modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(100%, 430px);
  margin: 0;
  flex: 0 1 430px;
  transform: translate(-50%, -50%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(13, 17, 25, 0.24);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--page-deep, #151923);
  color: #fff;
}

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

.modal h2 {
  margin: 18px 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.modal p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions .button {
  width: 100%;
  min-width: 0;
}

@media (max-width: 560px) {
  .page {
    padding: 16px 14px 28px;
  }

  .topbar {
    margin-bottom: 16px;
  }

  .top-actions {
    gap: 8px;
  }

  .brand-text {
    display: none;
  }

  .status {
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .language-switch {
    flex: 0 0 auto;
  }

  .button {
    width: 100%;
    padding: 0 14px;
  }

  .modal-panel {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    flex-basis: auto;
    padding: 24px 18px 18px;
  }

  .modal h2 {
    font-size: 24px;
  }
}
