:root {
  --bg: #09050f;
  --bg-soft: #10091a;
  --surface: #171021;
  --surface-2: #21152f;
  --surface-3: #2b1b40;
  --surface-gold: #2a211e;
  --line: rgb(196 161 255 / 15%);
  --line-strong: rgb(244 201 104 / 34%);
  --text: #fbf7ff;
  --muted: #a89ab7;
  --muted-2: #756781;
  --gold: #f4c968;
  --gold-light: #ffe6a6;
  --gold-deep: #b8842d;
  --violet: #8b4dff;
  --violet-light: #b88cff;
  --violet-deep: #5b22c5;
  --success: #48d7a0;
  --warning: #f4c968;
  --danger: #ff6b82;
  --radius: 22px;
  --shadow: 0 22px 54px rgb(0 0 0 / 34%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  overflow-x: hidden;
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button { color: inherit; }
.hidden { display: none !important; }

.ambient {
  position: fixed;
  z-index: 0;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: .24;
}

.ambient--violet {
  top: 10vh;
  left: -210px;
  background: var(--violet);
}

.ambient--gold {
  right: -230px;
  bottom: 7vh;
  background: var(--gold-deep);
  opacity: .13;
}

.splash,
.fatal {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background:
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px);
  background-size: 34px 34px;
}

.splash strong {
  margin-top: 16px;
  font-size: 29px;
  letter-spacing: -.9px;
}

.splash small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.spinner {
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 2px solid rgb(244 201 104 / 18%);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

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

.fatal__card {
  width: min(100%, 390px);
  padding: 34px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 18px 34px 18px 34px;
  background: linear-gradient(145deg, rgb(34 21 50 / 96%), rgb(18 11 27 / 98%));
  box-shadow: var(--shadow);
}

.fatal h1 { margin: 24px 0 8px; font-size: 27px; }
.fatal p { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 13% 5%, rgb(139 77 255 / 14%), transparent 28%),
    radial-gradient(circle at 92% 56%, rgb(244 201 104 / 6%), transparent 24%);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: max(9px, var(--tg-content-safe-area-inset-top, 0px)) 14px 9px;
  border-bottom: 1px solid var(--line);
  background: rgb(9 5 15 / 88%);
  box-shadow: 0 10px 30px rgb(0 0 0 / 12%);
  backdrop-filter: blur(24px) saturate(130%);
}

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

.topbar__brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: .1px;
}

.topbar__brand small {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .85px;
  text-transform: uppercase;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  filter: drop-shadow(0 7px 13px rgb(139 77 255 / 30%));
}

.brand-mark svg { width: 100%; height: 100%; overflow: visible; }
.brand-mark__frame { fill: var(--violet); stroke: var(--gold); stroke-width: 1.6; }
.brand-mark__letter { fill: var(--gold-light); }

.brand-mark--large {
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 16px 28px rgb(139 77 255 / 36%));
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--gold-light);
  background: rgb(255 255 255 / 2%);
}

.icon-button:active {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: scale(.96);
}

.icon-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.test-banner {
  position: sticky;
  z-index: 19;
  top: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  color: #1a1027;
  background: linear-gradient(90deg, #c99b3e, var(--gold-light), #c99b3e);
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .55px;
}

.test-banner span:first-child {
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--gold-light);
  background: #26153a;
  font-size: 9px;
}

.test-banner span:last-child { opacity: .83; }

.content {
  width: min(100%, 760px);
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 20px 16px 122px;
  outline: none;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 2px 20px;
}

.page-head::before {
  content: "";
  width: 4px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(var(--gold), var(--violet));
}

.page-head > div { flex: 1; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: -1px; }
.page-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 20px 20px;
  margin-bottom: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 16px 38px 16px 38px;
  background:
    linear-gradient(145deg, rgb(45 24 72 / 96%), rgb(18 10 29 / 98%) 58%, rgb(37 27 23 / 98%));
  box-shadow: 0 26px 64px rgb(0 0 0 / 34%), inset 0 1px 0 rgb(255 255 255 / 7%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background:
    linear-gradient(115deg, transparent 47%, rgb(244 201 104 / 12%) 47.5%, transparent 48%),
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: auto, 30px 30px, 30px 30px;
}

.hero::after {
  content: "P";
  position: absolute;
  right: -15px;
  top: -52px;
  color: rgb(244 201 104 / 5%);
  font-size: 210px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(8deg);
}

.hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--gold);
  border-radius: 2px;
  transform: rotate(45deg);
}

.hero__seal {
  padding: 6px 9px;
  border: 1px solid rgb(244 201 104 / 28%);
  border-radius: 99px;
  color: var(--gold);
  background: rgb(244 201 104 / 7%);
  font-size: 10px;
  font-weight: 800;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 17px 0 11px;
  font-size: clamp(29px, 8vw, 43px);
  line-height: 1.02;
  letter-spacing: -1.65px;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
  text-shadow: 0 5px 24px rgb(244 201 104 / 14%);
}

.hero > p {
  position: relative;
  z-index: 1;
  max-width: 550px;
  margin: 0 0 20px;
  color: #b9abc8;
  font-size: 14px;
  line-height: 1.5;
}

.hero__route {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 0 17px;
}

.route-step {
  position: relative;
  min-width: 0;
  padding: 11px 9px 10px;
  border: 1px solid rgb(184 140 255 / 14%);
  border-radius: 13px;
  background: rgb(8 4 14 / 34%);
}

.route-step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -8px;
  width: 9px;
  height: 2px;
  background: var(--gold);
  box-shadow: 4px 0 0 rgb(244 201 104 / 35%);
}

.route-step b {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .8px;
}

.route-step span {
  display: block;
  overflow: hidden;
  color: #e6dced;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

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

.section-title h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.section-title > span,
.section-count {
  min-width: 29px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--gold);
  background: rgb(244 201 104 / 7%);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.button {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 780;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease, box-shadow .12s ease;
}

.button:active { transform: translateY(1px) scale(.985); }
.button:disabled { cursor: default; opacity: .42; }
.button--primary {
  color: #211629;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 58%, #d19f43);
  box-shadow: 0 12px 25px rgb(184 132 45 / 19%), inset 0 1px 0 rgb(255 255 255 / 48%);
}
.button--secondary { border: 1px solid var(--line); background: var(--surface-3); }
.button--ghost { border: 1px solid rgb(244 201 104 / 22%); color: var(--gold); background: rgb(244 201 104 / 7%); }
.button--danger { border: 1px solid rgb(255 107 130 / 18%); color: #ff9cac; background: rgb(255 107 130 / 9%); }
.button--wide { width: 100%; }
.button svg { width: 20px; height: 20px; fill: currentColor; }

.card {
  position: relative;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(29 19 42 / 96%), rgb(20 13 29 / 96%));
  box-shadow: 0 15px 34px rgb(0 0 0 / 19%), inset 0 1px 0 rgb(255 255 255 / 3%);
}

.card + .card { margin-top: 12px; }

.offer-card {
  overflow: hidden;
  padding: 0;
  border-radius: 14px 28px 14px 28px;
}

.offer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--gold), var(--violet));
}

.offer-card::after {
  content: "";
  position: absolute;
  top: 82px;
  right: -8px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}

.offer-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px 20px;
}

.offer-card__id {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .7px;
}

.admin-remove {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0 0 2px;
  border: 1px solid rgb(255 107 130 / 35%);
  border-radius: 50%;
  color: #ff9cac;
  background: rgb(255 107 130 / 10%);
  font-size: 21px;
  line-height: 1;
}

.admin-remove:active { transform: scale(.94); }
.admin-remove--corner {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}
.history-card { position: relative; }
.history-card__head { padding-right: 32px; }

.avatar {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgb(244 201 104 / 34%);
  border-radius: 15px 22px 15px 22px;
  color: var(--gold-light);
  background: linear-gradient(145deg, var(--violet-deep), #321554);
  box-shadow: inset 0 0 0 3px rgb(9 5 15 / 25%);
  font-size: 19px;
  font-weight: 800;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--large { width: 82px; height: 82px; border-radius: 24px 34px 24px 34px; font-size: 30px; }

.seller { min-width: 0; flex: 1; }
.seller strong { display: block; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.seller small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.online-dot { width: 11px; height: 11px; flex: 0 0 auto; border: 2px solid var(--surface); border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgb(72 215 160 / 8%); }

.quote-grid,
.rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.quote,
.rate-grid > div {
  min-width: 0;
  padding: 15px 13px;
  background: rgb(10 5 16 / 44%);
}

.quote:last-child,
.rate-grid div:last-child { text-align: right; }

.quote small,
.rate-grid small,
.meta-row small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.quote strong,
.rate-grid strong {
  display: block;
  overflow: hidden;
  color: var(--gold-light);
  font-size: clamp(17px, 5vw, 21px);
  letter-spacing: -.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.quote:last-child .quote__meta { text-align: right; }

.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 18px 0;
}

.offer-tag {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #d8cde1;
  background: rgb(255 255 255 / 2.5%);
  font-size: 11px;
}

.offer-tag b { color: var(--violet-light); font-size: 9px; letter-spacing: .55px; text-transform: uppercase; }

.offer-meta {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 14px 18px 0;
  color: #ded6e5;
  font-size: 13px;
}

.offer-meta span { color: var(--muted); }
.offer-card > .button { width: calc(100% - 36px); margin: 16px 18px 18px; }

.empty {
  padding: 52px 22px;
  text-align: center;
  border-style: dashed;
}

.empty__icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px 28px 18px 28px;
  color: var(--gold);
  background: linear-gradient(145deg, rgb(139 77 255 / 15%), rgb(244 201 104 / 7%));
  font-size: 27px;
}

.empty h3 { margin: 0 0 8px; font-size: 20px; }
.empty p { max-width: 330px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.45; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 12px;
  right: 12px;
  bottom: max(9px, var(--tg-content-safe-area-inset-bottom, 0px));
  height: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px;
  border: 1px solid rgb(244 201 104 / 16%);
  border-radius: 22px;
  background: rgb(23 16 33 / 94%);
  box-shadow: 0 20px 45px rgb(0 0 0 / 45%);
  backdrop-filter: blur(24px) saturate(140%);
}

.nav-item {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  padding: 3px;
  border: 0;
  border-radius: 15px;
  color: #776a83;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
}

.nav-item svg { width: 23px; height: 23px; fill: currentColor; stroke: currentColor; stroke-width: .6; }
.nav-item.active { color: var(--gold-light); background: linear-gradient(145deg, rgb(139 77 255 / 25%), rgb(244 201 104 / 7%)); }
.nav-item.active::before { content: ""; position: absolute; top: 0; width: 24px; height: 2px; border-radius: 99px; background: var(--gold); box-shadow: 0 0 12px rgb(244 201 104 / 70%); }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgb(15 8 23 / 68%);
}

.segmented button {
  min-height: 45px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.segmented button.active {
  color: #271932;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 8px 20px rgb(184 132 45 / 17%);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgb(244 201 104 / 15%);
  border-radius: 8px;
  color: var(--warning);
  background: rgb(244 201 104 / 8%);
  font-size: 10px;
  font-weight: 780;
}

.status::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.status--completed,
.status--open { border-color: rgb(72 215 160 / 17%); color: var(--success); background: rgb(72 215 160 / 8%); }
.status--cancelled { border-color: var(--line); color: var(--muted); background: rgb(168 154 183 / 7%); }
.status--disputed { border-color: rgb(255 107 130 / 18%); color: var(--danger); background: rgb(255 107 130 / 8%); }

.history-card { overflow: hidden; }
.history-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--violet); }
.history-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.history-card__head strong { display: block; font-size: 17px; }
.history-card__head small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.amount-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgb(10 5 16 / 38%); }
.amount-line strong { color: var(--gold-light); font-size: 18px; }
.detail-list { display: grid; gap: 10px; margin: 15px 0; color: #ded5e6; font-size: 13px; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; }
.detail-list span:first-child { color: var(--muted); }
.detail-list b { max-width: 64%; overflow-wrap: anywhere; text-align: right; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.card-actions .button { min-height: 42px; flex: 1 1 140px; padding: 10px 12px; font-size: 12px; }

.profile-card {
  overflow: hidden;
  padding: 22px;
  border-radius: 16px 38px 16px 38px;
  background:
    radial-gradient(circle at 96% 5%, rgb(244 201 104 / 12%), transparent 34%),
    linear-gradient(145deg, rgb(47 26 74 / 97%), rgb(20 12 30 / 97%));
}

.profile-card::after { content: ""; position: absolute; right: -25px; bottom: -55px; width: 145px; height: 145px; border: 1px solid rgb(244 201 104 / 10%); transform: rotate(45deg); }
.profile-identity { position: relative; z-index: 1; display: flex; align-items: center; gap: 17px; text-align: left; }
.profile-copy { min-width: 0; flex: 1; }
.profile-kicker { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: 1.05px; text-transform: uppercase; }
.profile-card h1 { margin: 7px 0 4px; overflow: hidden; font-size: 25px; letter-spacing: -.8px; text-overflow: ellipsis; white-space: nowrap; }
.profile-card .profile-copy > p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.role-chip { display: inline-flex; padding: 6px 9px; border: 1px solid rgb(244 201 104 / 20%); border-radius: 8px; color: var(--gold-light); background: rgb(244 201 104 / 8%); font-size: 10px; font-weight: 780; }
.profile-fields { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; text-align: left; }
.editable { min-width: 0; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: rgb(9 5 15 / 31%); text-align: left; }
.editable span { min-width: 0; }
.editable small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .35px; text-transform: uppercase; }
.editable strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.editable svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--gold); stroke-width: 2; }
.editable--static { cursor: default; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { min-width: 0; padding: 16px 8px; text-align: center; }
.stat::before { content: ""; display: block; width: 18px; height: 2px; margin: 0 auto 11px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--gold)); }
.stat strong { display: block; overflow: hidden; color: var(--gold-light); font-size: clamp(15px, 4.5vw, 22px); text-overflow: ellipsis; }
.stat small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; letter-spacing: .35px; text-transform: uppercase; }
.profile-referral { margin-top: 12px; }
.profile-referral > p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.referral-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: linear-gradient(90deg, rgb(139 77 255 / 8%), rgb(244 201 104 / 6%)); }
.referral-code code { overflow: hidden; color: var(--gold-light); font-size: 15px; font-weight: 800; text-overflow: ellipsis; }
.profile-referrals { margin-top: 12px; }
.profile-referrals > p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.referral-list { display: grid; gap: 8px; margin-top: 14px; }
.referral-person { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgb(10 5 16 / 30%); }
.referral-person .avatar { width: 38px; height: 38px; font-size: 12px; }
.referral-person div:last-child { min-width: 0; }
.referral-person strong, .referral-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referral-person strong { font-size: 13px; }
.referral-person small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.faq { padding: 0; overflow: hidden; }
.faq details { padding: 0 18px; border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 0; cursor: pointer; list-style: none; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--gold); font-size: 20px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; background: rgb(244 201 104 / 8%); }
.faq p { margin: -3px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.support-card { margin-top: 14px; overflow: hidden; text-align: left; }
.support-card::after { content: "?"; position: absolute; right: 15px; top: -22px; color: rgb(244 201 104 / 6%); font-size: 125px; font-weight: 900; }
.support-card h3 { position: relative; z-index: 1; margin: 4px 0 8px; }
.support-card p { position: relative; z-index: 1; margin: 0 0 17px; color: var(--muted); line-height: 1.45; }
.support-card .button { position: relative; z-index: 1; }

.admin-periods { display: flex; gap: 8px; margin-bottom: 14px; }
.chip { flex: 1; min-height: 40px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); font-weight: 700; }
.chip.active { border-color: var(--gold); color: #23162d; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.metric { min-height: 105px; padding: 16px; }
.metric::before { content: ""; width: 7px; height: 7px; display: block; margin-bottom: 14px; border: 2px solid var(--violet-light); border-radius: 2px; transform: rotate(45deg); }
.metric--wide { grid-column: 1 / -1; min-height: 126px; background: linear-gradient(145deg, rgb(49 29 72 / 97%), rgb(39 29 22 / 97%)); }
.metric--wide::before { border-color: var(--gold); }
.metric small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.metric strong { display: block; margin-top: 8px; font-size: 23px; letter-spacing: -.6px; }
.metric--wide strong { color: var(--gold-light); font-size: 29px; }
.queue-group { margin-top: 25px; }
.queue-group > h2 { margin: 0 2px 12px; font-size: 19px; line-height: 1.3; }
.staff-row { display: flex; align-items: center; gap: 12px; }
.staff-row__body { min-width: 0; flex: 1; }
.staff-row__body strong,
.staff-row__body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-row__body small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.modal { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; border: 0; background: rgb(5 2 9 / 76%); backdrop-filter: blur(7px); }
.modal__sheet { position: relative; width: min(100%, 760px); max-height: calc(92vh - var(--tg-content-safe-area-inset-top, 0px)); overflow-y: auto; padding: 9px 18px max(22px, var(--tg-content-safe-area-inset-bottom, 0px)); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 24px 24px 0 0; background: linear-gradient(165deg, #251736, #120b1b 55%); box-shadow: 0 -22px 65px rgb(0 0 0 / 52%); animation: sheet-in .2s ease-out; }
@keyframes sheet-in { from { transform: translateY(25%); opacity: 0; } }
.modal__handle { width: 42px; height: 4px; margin: 0 auto 19px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--gold)); }
.modal h2 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.6px; }
.modal .lead { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span { color: #c5b8d1; font-size: 12px; font-weight: 680; }
.input { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--text); background: #0e0815; }
textarea.input { min-height: 92px; resize: vertical; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(244 201 104 / 10%); }
.input[readonly] { color: #d8cde1; background: rgb(255 255 255 / 3%); }
.file-field small { color: var(--muted); font-size: 11px; }
.file-field input[type="file"] { padding: 10px; font-size: 12px; }
.file-field input[type="file"]::file-selector-button { margin-right: 9px; padding: 8px 10px; border: 0; border-radius: 8px; color: #24152d; background: var(--gold); font-weight: 750; }
.receipt-summary { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgb(10 5 16 / 30%); }
.receipt-preview { width: 100%; max-height: 58vh; display: block; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #09050f; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 9px; margin-top: 5px; }
.notice { padding: 14px; border: 1px solid rgb(244 201 104 / 13%); border-radius: 12px; color: #e7d29f; background: rgb(244 201 104 / 7%); font-size: 13px; line-height: 1.45; }
.notice--danger { border-color: rgb(255 107 130 / 15%); color: #ffc1cc; background: rgb(255 107 130 / 8%); }
.legal-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.legal-links a { min-height: 43px; display: grid; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--gold-light); background: rgb(139 77 255 / 8%); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; }
.copy-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #0d0714; }
.copy-box code { overflow-wrap: anywhere; color: var(--gold-light); }

.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(93px + var(--tg-content-safe-area-inset-bottom, 0px)); width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: #251735; box-shadow: var(--shadow); transform: translateX(-50%); font-size: 13px; font-weight: 680; }
.toast.error { border-color: rgb(255 107 130 / 36%); color: #ffc1cc; }
.skeleton { min-height: 150px; overflow: hidden; background: linear-gradient(100deg, var(--surface) 20%, var(--surface-3) 40%, var(--surface) 60%); background-size: 220% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }

@media (max-width: 390px) {
  .hero { padding: 21px 17px 17px; }
  .hero__route { gap: 5px; }
  .route-step { padding: 10px 7px; }
  .route-step span { font-size: 9px; }
  .profile-fields { grid-template-columns: 1fr; }
  .profile-identity { align-items: flex-start; }
  .avatar--large { width: 70px; height: 70px; }
}

@media (min-width: 700px) {
  .content { padding-left: 24px; padding-right: 24px; }
  .offers-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .offers-list .card + .card { margin-top: 0; }
  .bottom-nav { left: 50%; right: auto; width: min(calc(100% - 24px), 730px); transform: translateX(-50%); }
}

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