:root {
  --bg: #f5f7f8;
  --panel: #fff;
  --text: #172126;
  --muted: #66737d;
  --line: #dce3e8;
  --brand: #0b7f68;
  --brand-dark: #096350;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand,
.nav,
.button,
button {
  display: inline-flex;
  align-items: center;
}

.brand {
  min-height: 44px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 168px;
  height: 44px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
}

.nav {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a,
.button,
button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: white;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

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

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

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.support-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2aabee;
  border-radius: 8px;
  padding: 8px 13px;
  background: linear-gradient(135deg, #2aabee, #1d9bd7);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(42, 171, 238, .24);
}

.support-button:hover {
  background: linear-gradient(135deg, #35b8f4, #178fc9);
  color: #fff;
}

.page-title-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.page-title-row h1 {
  margin: 0;
  text-align: center;
}

.title-spacer {
  width: 120px;
}

.page-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  text-align: center;
}

.back-button {
  justify-self: start;
  gap: 6px;
  font-weight: 750;
}

.back-button:hover {
  color: #fff;
}

.profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f4f1;
  color: var(--brand-dark);
  font-weight: 800;
}

.profile-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.profile-meta span {
  color: var(--muted);
  font-size: 12px;
}

.profile-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.profile-logout {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: white;
  text-decoration: none;
  color: var(--muted);
}

.content {
  width: min(1140px, calc(100% - 32px));
  margin: 24px auto 56px;
}

.headline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 6px;
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

p {
  line-height: 1.5;
}

.headline p,
.muted,
.catalog-card span {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 32px;
  font-weight: 850;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.catalog-card,
.location-card,
.package-card,
.row-link {
  display: grid;
  gap: 8px;
  text-decoration: none;
}

.catalog-card strong,
.location-card strong,
.package-card strong {
  font-size: 18px;
}

.catalog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(11, 127, 104, .14), transparent 20rem),
    linear-gradient(180deg, #ffffff 0%, #f5fbf9 100%);
}

.catalog-hero h1 {
  margin-top: 8px;
}

.catalog-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.catalog-hero-actions {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

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

.catalog-card {
  min-height: 210px;
  align-content: start;
  gap: 14px;
  padding: 18px;
  color: var(--text);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 127, 104, .40);
  box-shadow: 0 18px 36px rgba(23, 33, 38, .12);
}

.catalog-card-featured {
  border-color: rgba(11, 127, 104, .32);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}

.catalog-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f4f1;
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 850;
}

.catalog-card strong {
  color: var(--text);
  font-size: 20px;
}

.catalog-card span:not(.catalog-icon):not(.catalog-action) {
  color: var(--muted);
  line-height: 1.45;
}

.catalog-action {
  width: fit-content;
  margin-top: auto;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--brand);
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
}

.catalog-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.catalog-benefits .card {
  display: grid;
  gap: 8px;
}

.catalog-benefits strong {
  color: var(--text);
}

.catalog-benefits span {
  color: var(--muted);
  line-height: 1.45;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}

.section-title:first-of-type {
  margin-top: 0;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.package-card {
  min-height: 220px;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.package-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 127, 104, .40);
  box-shadow: 0 18px 36px rgba(23, 33, 38, .12);
}

.package-topline,
.package-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.package-type,
.package-speed {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.package-type {
  background: #e8f4f1;
  color: var(--brand-dark);
}

.package-speed {
  background: #f2f6f7;
  color: var(--muted);
}

.package-volume {
  display: block;
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.package-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.package-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.seo-content {
  margin-top: 28px;
  display: grid;
  gap: 14px;
  line-height: 1.58;
}

.seo-content h2,
.seo-content h3,
.seo-content p {
  margin: 0;
}

.seo-content p {
  color: var(--muted);
}

.seo-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.seo-facts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fbfc;
}

.seo-facts strong,
.seo-facts span {
  display: block;
}

.seo-facts span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.package-action {
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.unlimited-package {
  border-color: rgba(11, 127, 104, .30);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}

.unlimited-package .package-type {
  background: var(--brand);
  color: #fff;
}

.package-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 16px;
  align-items: start;
}

.package-detail-card {
  display: grid;
  gap: 18px;
  min-height: 420px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(11, 127, 104, .20), transparent 18rem),
    var(--panel);
}

.package-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.package-detail-volume {
  display: block;
  color: var(--text);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.package-detail-copy {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.package-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.package-detail-stats div {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.package-detail-stats span {
  color: var(--muted);
  font-size: 13px;
}

.package-detail-stats strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-card {
  position: sticky;
  top: 96px;
  padding: 22px;
  box-shadow: 0 18px 36px rgba(23, 33, 38, .10);
}

.checkout-card h2 {
  margin-bottom: 0;
}

.checkout-total {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkout-card button {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  font-weight: 850;
}

.telegram-payment {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe1ea;
  border-radius: 8px;
  background: #f7fbfd;
}

.telegram-payment div {
  display: grid;
  gap: 4px;
}

.telegram-payment strong {
  color: var(--text);
  font-size: 15px;
}

.telegram-payment span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.telegram-button {
  justify-content: center;
  border-color: #2aabee;
  background: #2aabee;
  color: #fff;
  font-weight: 800;
}

.telegram-button:hover {
  background: #1d9bd7;
  color: #fff;
}

.checkout-benefits {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.country-search {
  position: relative;
}

.country-search input {
  min-height: 54px;
  padding-left: 46px;
  border-color: #cfd9df;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 33, 38, .06);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.country-summary {
  min-height: 54px;
  display: grid;
  align-content: center;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 33, 38, .05);
}

.country-summary strong {
  font-size: 20px;
  line-height: 1;
}

.country-summary span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.country-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "flag info code"
    "flag info action";
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  min-height: 116px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.country-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 127, 104, .35);
  box-shadow: 0 16px 34px rgba(23, 33, 38, .10);
}

.country-card[hidden] {
  display: none;
}

.country-flag {
  grid-area: flag;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2f6f7;
  font-size: 30px;
}

.country-info {
  grid-area: info;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.country-info strong {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.country-info span {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.country-code {
  grid-area: code;
  align-self: start;
  justify-self: end;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf5f3;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.country-action {
  grid-area: action;
  justify-self: end;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.price,
.total {
  font-size: 28px;
  font-weight: 850;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 16px;
  align-items: start;
}

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

.row-link {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.orders-section {
  display: grid;
  gap: 14px;
}

.orders-section + .orders-section {
  margin-top: 16px;
}

.orders-section h2 {
  margin-bottom: 4px;
}

.orders-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.orders-section-head p {
  margin: 0;
}

.orders-page-label {
  padding-top: 4px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.orders-list {
  display: grid;
  gap: 8px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.order-row:hover {
  border-color: rgba(11, 127, 104, .40);
  background: #f9fbfc;
}

.order-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.order-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-meta,
.payment-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.payment-hint {
  color: #684407;
}

.order-amount,
.order-status {
  justify-self: end;
  white-space: nowrap;
}

.order-amount {
  font-weight: 800;
}

.order-status {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f2f6f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pending-payment {
  border-color: #e8ca93;
  background: #fffdf8;
}

.pending-payment .order-status,
.ready-esim .order-status {
  background: #fff3d8;
  color: #684407;
}

.ready-esim {
  border-color: #e8ca93;
  background: #fffdf8;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form {
  display: grid;
  gap: 14px;
}

.form .button {
  justify-content: center;
}

.form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: white;
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 127, 104, .12);
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 24px;
  align-items: start;
}

.auth-info {
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(11, 127, 104, .12), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, #f5fbf9 100%);
}

.auth-info h1 {
  margin: 0;
}

.auth-info p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.auth-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e8f4f1;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.auth-points {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
}

.auth-card {
  padding: 22px;
  box-shadow: 0 18px 36px rgba(23, 33, 38, .10);
}

.auth-form-head {
  display: grid;
  gap: 6px;
}

.auth-form-head h2 {
  margin: 0;
}

.auth-form-head p {
  margin: 0;
  color: var(--muted);
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch a {
  color: var(--brand-dark);
  font-weight: 850;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.support-link {
  border-color: #2aabee;
  color: #1d8dc7;
}

.support-link:hover {
  background: #f1f9fe;
  color: #137fba;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #e8ca93;
  border-radius: 8px;
  background: #fff8eb;
  color: #684407;
}

.danger {
  border-color: #f0b7b2;
  background: #fff1f0;
  color: var(--danger);
}

.badge {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 13px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.qr {
  max-width: 280px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.button-stack,
.manual-data,
.help-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.button-stack {
  justify-items: start;
}

.manual-data {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.spaced {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .headline,
  .auth {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .auth-info {
    min-height: 0;
    padding: 20px;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-switch {
    flex-direction: column;
  }

  .page-title-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .title-spacer {
    display: none;
  }

  .page-title-row h1,
  .page-subtitle {
    text-align: left;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    justify-content: center;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .nav a {
    justify-content: center;
    text-align: center;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .support-button {
    width: 100%;
  }

  .profile {
    min-width: 0;
    width: 100%;
  }

  .profile-logout {
    justify-content: center;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .country-showcase {
    grid-template-columns: 1fr;
  }

  .catalog-hero,
  .catalog-grid,
  .catalog-benefits {
    grid-template-columns: 1fr;
  }

  .catalog-hero {
    padding: 20px;
  }

  .catalog-hero-actions {
    min-width: 0;
  }

  .country-grid {
    grid-template-columns: 1fr;
  }

  .package-grid {
    grid-template-columns: 1fr;
  }

  .seo-facts {
    grid-template-columns: 1fr;
  }

  .package-detail-layout,
  .package-detail-stats {
    grid-template-columns: 1fr;
  }

  .checkout-card {
    position: static;
  }

  .package-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .package-action {
    text-align: center;
  }

  .country-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "flag info"
      "code action";
  }

  .country-code {
    justify-self: start;
  }

  .row-link {
    grid-template-columns: 1fr;
  }

  .orders-section-head,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-page-label,
  .order-amount,
  .order-status {
    justify-self: start;
  }

  .order-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .order-main strong {
    white-space: normal;
  }

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