@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #050505;
  --bg-soft: #0b0b0d;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #9a9aa1;
  --blue: #ffcc1f;
  --blue-soft: rgba(255, 204, 31, 0.16);
  --white-soft: rgba(255, 255, 255, 0.8);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font: "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 42%, rgba(255, 204, 31, 0.14), transparent 28%),
    radial-gradient(circle at 72% 18%, rgba(255, 170, 0, 0.08), transparent 18%),
    linear-gradient(180deg, #050505 0%, #0a0b10 100%);
  color: var(--text);
  font-family: var(--font);
}

body {
  overflow-x: hidden;
  position: relative;
}

.miniapp-page {
  overflow-x: hidden;
  overflow-y: auto;
}

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

button,
input,
select {
  font: inherit;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9a9aa1 50%),
    linear-gradient(135deg, #9a9aa1 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}

option {
  color: var(--text);
  background: #18191c;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  opacity: 0.22;
}

.landing-shell,
.bot-shell,
.mini-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-shell {
  padding: 18px 0 56px;
}

.bot-shell,
.mini-shell {
  width: min(860px, calc(100% - 24px));
  padding: 10px 0;
}

.mini-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 0 26px;
}

.brand,
.top-nav,
.account-pill {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-mark,
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--line);
}

.brand-name {
  letter-spacing: -0.03em;
}

.top-nav {
  gap: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

.nav-link-active {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.04);
}

.account-pill {
  gap: 12px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffcc1f, #ffb800);
  border: 0;
  color: #111111;
}

.hero-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  display: inline-block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(3.3rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy h1 span {
  color: var(--blue);
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--white-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 32px;
}

.hero-platforms {
  margin-top: 34px;
}

.hero-platforms > span {
  display: block;
  margin-bottom: 14px;
  color: #6f6f77;
  font-weight: 700;
  text-transform: lowercase;
}

.platform-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #d4d4d8;
  font-weight: 700;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.visual-card,
.workspace-card,
.telegram-frame,
.miniapp-shell {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.visual-card {
  position: relative;
  width: min(100%, 500px);
  height: 470px;
  border-radius: 42px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 204, 31, 0.24), transparent 24%),
    radial-gradient(circle at 68% 72%, rgba(255, 176, 31, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.visual-orbit {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
}

.visual-orbit-left {
  inset: 72px auto auto 60px;
  width: 150px;
  height: 150px;
  background: rgba(255, 204, 31, 0.24);
}

.visual-orbit-right {
  inset: auto 44px 72px auto;
  width: 180px;
  height: 180px;
  background: rgba(255, 184, 0, 0.14);
}

.visual-frame {
  position: absolute;
  inset: 72px;
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-phone {
  width: 220px;
  height: 332px;
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(180deg, #1f2330, #0f121a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.35);
  transform: rotate(-10deg);
}

.visual-screen {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 204, 31, 0.3), transparent 35%),
    linear-gradient(180deg, #0d1220, #07090f);
}

.screen-line,
.screen-pill,
.screen-button {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.screen-line {
  width: 100%;
  height: 14px;
  margin-bottom: 14px;
}

.screen-line-short {
  width: 62%;
}

.screen-pill {
  width: 78px;
  height: 78px;
  margin-top: 34px;
  background: linear-gradient(180deg, rgba(255, 204, 31, 0.95), rgba(255, 204, 31, 0.28));
}

.screen-button {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 110px;
  height: 40px;
  background: linear-gradient(135deg, #ffd84f, #ffbf00);
}

.visual-chip {
  position: absolute;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.78);
  font-weight: 700;
}

.chip-top {
  top: 28px;
  right: 28px;
}

.chip-bottom {
  left: 24px;
  bottom: 26px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 24px;
  margin-top: 22px;
}

.workspace-card {
  border-radius: 30px;
  padding: 28px;
}

.workspace-head,
.miniapp-top,
.progress-summary,
.telegram-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workspace-head h2,
.miniapp-shell h1,
.final-card h2 {
  margin: 10px 0 0;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.stack-form {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

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

.field span,
.result-label,
.plan-pill span,
.result-meta span,
.telegram-topbar span,
.ghost-link,
.bot-meta,
.countdown-box span {
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(255, 204, 31, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 204, 31, 0.12);
}

.plan-preview,
.result-meta,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-pill,
.result-meta > div,
.result-block,
.countdown-box,
.ad-stage,
.final-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
}

.plan-pill,
.result-meta > div {
  flex: 1 1 180px;
  padding: 14px 16px;
}

.plan-pill strong,
.result-meta strong {
  font-size: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: linear-gradient(135deg, #ffda52 0%, #ffbf00 100%);
  color: #050505;
  font-weight: 800;
}

.button-secondary,
.button-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.26);
}

.button-outline {
  min-width: 220px;
}

.button-row-stretch .button {
  flex: 1 1 220px;
}

.result-card {
  align-self: start;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #ffd451;
  font-size: 0.82rem;
  font-weight: 800;
}

.result-stack {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.result-block {
  padding: 18px;
}

.result-block code,
.inline-link {
  color: #ffd451;
  word-break: break-all;
}

.result-block code {
  display: block;
  margin-top: 10px;
  line-height: 1.5;
}

.inline-link {
  font-size: 0.94rem;
}

.telegram-frame {
  border-radius: 30px;
  overflow: hidden;
}

.telegram-topbar {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.telegram-topbar strong {
  display: block;
}

.chat-area {
  min-height: 420px;
  padding: 22px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 204, 31, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.01));
}

.message-row {
  display: flex;
}

.message-row:first-child {
  justify-content: flex-end;
}

.bot-bubble,
.user-bubble {
  max-width: min(100%, 520px);
  padding: 16px 18px;
  border-radius: 22px;
}

.bot-bubble {
  background: rgba(255, 255, 255, 0.05);
  border-top-left-radius: 10px;
}

.user-bubble {
  background: rgba(255, 204, 31, 0.18);
  border-top-right-radius: 10px;
}

.bot-bubble p,
.ad-stage p,
.final-card p {
  margin: 0;
  line-height: 1.6;
  color: #d5d5da;
}

.bot-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.88rem;
}

.error-state {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.miniapp-shell {
  width: 100%;
  margin: 0 auto;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 20px);
  padding: 18px;
}

.progress-summary {
  margin-top: 8px;
}

.progress-summary strong {
  display: block;
  margin-top: 6px;
}

.progress-bar {
  height: 12px;
  margin: 10px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffcc1f, #ffd95c);
  transition: width 0.35s ease;
}

.ad-stage,
.final-card {
  padding: 18px;
}

.ad-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffda52 0%, #ffbf00 100%);
  color: #121212;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ad-stage h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.28rem, 3vw, 1.75rem);
  letter-spacing: -0.04em;
}

.ad-stage p {
  font-size: 1rem;
  line-height: 1.5;
}

.countdown-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 20px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.045);
}

.countdown-box span {
  color: #b6b6bf;
  font-size: 0.92rem;
  font-weight: 600;
}

.countdown-box strong {
  font-size: 1.5rem;
  color: #ffd451;
}

.final-card {
  margin-bottom: 12px;
}

.final-link-block {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.final-link-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.final-link-value {
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #ffd451;
  word-break: break-all;
}

.miniapp-shell .button-row {
  margin-top: auto;
}

.miniapp-secondary-actions {
  justify-content: center;
}

.miniapp-secondary-actions .button {
  min-width: 260px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-layout,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .landing-shell,
  .bot-shell,
  .mini-shell {
    width: min(100% - 18px, 100%);
  }

  .site-header,
  .workspace-head,
  .miniapp-top,
  .progress-summary,
  .telegram-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    order: 3;
  }

  .hero-layout {
    min-height: auto;
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
  }

  .workspace-card,
  .telegram-frame,
  .miniapp-shell {
    border-radius: 24px;
  }

  .workspace-card,
  .miniapp-shell,
  .chat-area,
  .telegram-topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .miniapp-shell {
    min-height: calc(100dvh - 16px);
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .visual-card {
    height: 360px;
  }

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

  .referral-copy-button {
    width: 100%;
    min-width: 0;
  }

  .visual-frame {
    inset: 56px;
  }

  .visual-phone {
    transform: rotate(-6deg) scale(0.92);
  }
}

.dashboard-shell-page {
  background:
    radial-gradient(circle at left top, rgba(255, 204, 31, 0.12), transparent 28%),
    linear-gradient(180deg, #040404 0%, #090909 100%);
}

.dashboard-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  width: min(1440px, calc(100% - 30px));
  margin: 0 auto;
  padding: 14px 0 34px;
}

.dashboard-sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #17181b;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-brand {
  padding: 4px 4px 10px;
}

.sidebar-profile {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-profile strong,
.sidebar-profile span {
  display: block;
}

.sidebar-profile span {
  margin-top: 4px;
  color: var(--muted);
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: linear-gradient(180deg, #ffcc1f, #ffb800);
  color: #111111;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-label {
  padding: 8px 12px;
  color: #6f7076;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  color: #adadb5;
  font-weight: 600;
}

.sidebar-link-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-main {
  min-width: 0;
  padding: 8px 0 0;
}

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

.topbar-heading h1,
.links-head h2,
.compose-head h2 {
  margin: 10px 0 0;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.notice-card,
.stat-card,
.compose-card,
.dashboard-result,
.link-item {
  border: 1px solid var(--line);
  background: #18191c;
  box-shadow: var(--shadow);
}

.notice-card {
  padding: 20px 24px;
  border-radius: 22px;
}

.notice-card p {
  margin: 0;
  max-width: 820px;
  color: #dddddf;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.stat-card {
  padding: 24px;
  border-radius: 22px;
}

.stat-card-interactive {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.stat-card-interactive:hover,
.stat-card-active {
  border-color: rgba(255, 204, 31, 0.34);
  background: #1b1d24;
  transform: translateY(-2px);
}

.stat-label,
.stat-meta {
  display: block;
}

.stat-label {
  color: #d8d8dc;
  font-weight: 700;
}

.stat-value {
  display: block;
  margin: 12px 0 8px;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stat-meta {
  color: var(--muted);
}

.detail-stats-card {
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #18191c;
  box-shadow: var(--shadow);
}

.detail-stats-panel {
  display: none;
}

.detail-stats-panel-active {
  display: block;
}

.detail-stats-head h2 {
  margin: 10px 0 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.detail-metric {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.detail-metric span,
.detail-metric strong {
  display: block;
}

.detail-metric span {
  color: var(--muted);
  margin-bottom: 10px;
}

.detail-metric strong {
  font-size: 1.25rem;
  line-height: 1.25;
}

.rate-card {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.referral-card {
  display: grid;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.referral-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.referral-head strong {
  color: #ffd451;
  font-size: 1.1rem;
}

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

.referral-link-field {
  gap: 8px;
}

.referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.referral-link-value {
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #ffd451;
  line-height: 1.45;
  word-break: break-all;
}

.referral-copy-button {
  min-width: 140px;
}

.referrals-layout .referral-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.referrals-layout .distribution-list {
  margin-top: 0;
}

.rate-meta {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rate-meta span {
  color: var(--muted);
}

.rate-meta strong {
  font-size: 1.1rem;
}

.form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 22px;
}

.compose-card,
.dashboard-result {
  border-radius: 24px;
  padding: 24px;
}

.compose-form {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.field-wide input {
  height: 64px;
  font-size: 1rem;
}

.compose-settings {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: end;
}

.field-compact select {
  height: 58px;
}

.dashboard-preview {
  margin: 0;
}

.compose-actions {
  display: flex;
  justify-content: flex-end;
}

.links-section {
  margin-top: 26px;
}

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

.search-shell {
  width: min(100%, 250px);
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #111215;
  color: var(--muted);
}

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

.link-item {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #18191c;
  box-shadow: var(--shadow);
}

.link-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.link-copy-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.link-url,
.link-meta {
  display: block;
}

.link-url {
  color: #ffd451;
  font-size: 0.95rem;
  word-break: break-all;
}

.link-target {
  display: block;
  margin: -2px 0 10px;
  color: var(--white-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-all;
}

.link-title {
  display: block;
  margin: 8px 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.link-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.link-item-fresh {
  border-color: rgba(255, 204, 31, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 204, 31, 0.12);
}

.link-item-empty {
  grid-column: 1 / -1;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.link-item-empty .link-title {
  margin-top: 0;
  text-transform: none;
}

.field-static {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #232427;
  color: var(--text);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 22px;
}

.dashboard-panels-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-panel,
.history-table-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #18191c;
  box-shadow: var(--shadow);
}

.panel-large {
  min-width: 0;
}

.referrals-layout {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.panel-headline h2 {
  margin: 10px 0 0;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.chart-shell {
  margin-top: 24px;
}

.chart-shell-tall {
  min-height: 320px;
}

.chart-detail-card {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 204, 31, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.chart-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chart-detail-head strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.chart-detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffcf33, #ffb800);
  color: #1a1607;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chart-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.chart-detail-metric {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-detail-metric span {
  color: var(--muted);
  font-size: 0.84rem;
}

.chart-detail-metric strong {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.chart-bars {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.chart-bar-button {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chart-bar-income {
  display: none;
}

.chart-bars span,
.chart-bar-button span {
  display: block;
  width: 100%;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, #ffcc1f, #ffb800);
  min-height: 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.chart-bar-button:hover span,
.chart-bar-button:focus-visible span,
.chart-bar-active span {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(255, 184, 0, 0.26);
  filter: saturate(1.08);
}

.chart-bar-button:focus-visible {
  outline: none;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.chart-legend span {
  transition: color 180ms ease, transform 180ms ease;
}

.chart-legend-active {
  color: #f5f7fb;
  transform: translateY(-2px);
}

.quick-actions,
.distribution-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.quick-action,
.distribution-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.quick-action span,
.distribution-item span {
  color: var(--muted);
}

.distribution-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.distribution-item strong {
  font-size: 1.2rem;
}

.history-head {
  margin-bottom: 18px;
}

.history-table {
  display: grid;
}

.history-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr 0.8fr 0.8fr;
  gap: 16px;
  padding: 18px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}

.history-row-head {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill-live {
  background: rgba(36, 209, 138, 0.14);
  color: #65e5ad;
}

.status-pill-wait {
  background: rgba(255, 178, 31, 0.14);
  color: #ffc85c;
}

.status-pill-done {
  background: rgba(255, 204, 31, 0.16);
  color: #ffd451;
}

.button-light {
  background: #f3f3f3;
  color: #151515;
  font-weight: 700;
}

.payments-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

.payments-card,
.payments-note-card,
.wallet-methods-card {
  border: 1px solid var(--line);
  background: #18191c;
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.payments-card,
.payments-note-card,
.wallet-methods-card,
.payments-history-card {
  padding: 24px;
}

.payments-balance {
  display: block;
  margin: 14px 0 22px;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.payments-info-list {
  display: grid;
  gap: 14px;
}

.payments-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.payments-info-row strong {
  color: var(--text);
}

.payments-actions-row {
  margin-top: 24px;
}

.payments-actions-row .button {
  flex: 1 1 180px;
}

.payments-note-card {
  margin-top: 18px;
  max-width: 760px;
}

.payments-note-card p {
  margin: 0 0 18px;
  color: #dddddf;
  line-height: 1.7;
}

.payments-note-card span {
  color: var(--muted);
}

.admin-deny-card {
  margin-top: 22px;
  max-width: 760px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 204, 31, 0.24);
  background: rgba(255, 204, 31, 0.08);
  box-shadow: var(--shadow);
}

.admin-deny-card h2 {
  margin: 10px 0 12px;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.admin-deny-card p {
  margin: 0;
  color: #dddddf;
  line-height: 1.6;
}

.admin-side-stack {
  display: grid;
  gap: 18px;
}

.admin-rate-form {
  margin-top: 24px;
}

.admin-rate-actions {
  margin-top: 18px;
}

.admin-inline-note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-history-table {
  margin-top: 24px;
}

.admin-history-row {
  display: grid;
  grid-template-columns: 0.65fr 1.15fr 1fr 1.55fr 0.75fr 0.85fr 1.15fr;
  gap: 16px;
  padding: 18px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}

.admin-history-row-head {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-user-cell,
.admin-dest-cell {
  display: grid;
  gap: 4px;
}

.admin-user-cell strong,
.admin-dest-cell strong {
  font-size: 0.96rem;
  line-height: 1.35;
}

.admin-user-cell span,
.admin-dest-cell span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  word-break: break-word;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-actions .button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
}

.wallet-methods-card {
  margin-top: 22px;
}

.methods-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.methods-head h2 {
  margin: 10px 0 0;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.wallet-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 10px;
}

.wallet-item-form {
  align-content: start;
}

.wallet-item strong,
.wallet-item span {
  display: block;
}

.wallet-item span:last-child {
  color: var(--muted);
}

.wallet-item-head {
  display: grid;
  gap: 8px;
}

.wallet-form-grid {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.wallet-field input,
.wallet-field select {
  height: 54px;
}

.wallet-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.wallet-save-note {
  color: var(--muted);
  line-height: 1.5;
}

.wallet-note-error {
  color: #ff9d9d;
}

.wallet-save-button {
  min-width: 132px;
}

.wallet-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  font-weight: 800;
  color: #111111;
}

.wallet-badge img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.wallet-badge-blue {
  background: #48bfff;
}

.wallet-badge-card {
  background: #ffffff;
}

.wallet-badge-red {
  background: #ff4040;
  color: #ffffff;
}

.wallet-badge-gold {
  background: #ffcc1f;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.withdraw-modal {
  width: min(100%, 460px);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #18191c;
  box-shadow: var(--shadow);
}

.withdraw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.withdraw-head strong {
  font-size: 1.3rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.withdraw-submit {
  width: 100%;
  margin-top: 16px;
}

.withdraw-hint {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.withdraw-note {
  margin: 14px 0 0;
  color: #d9d9dd;
}

@media (max-width: 1180px) {
  .dashboard-app {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    height: auto;
  }

  .payments-top-grid,
  .dashboard-panels,
  .recent-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .referral-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .referral-copy-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 860px) {
  .stats-grid,
  .detail-stats-grid,
  .dashboard-grid,
  .payments-top-grid,
  .dashboard-panels,
  .compose-settings,
  .recent-links-grid,
  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-topbar,
  .links-head,
  .methods-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wallet-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .wallet-save-button {
    width: 100%;
  }

  .compose-actions {
    justify-content: stretch;
  }

  .compose-actions .button {
    width: 100%;
  }

  .history-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .history-row-head {
    display: none;
  }

  .admin-history-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-history-row-head {
    display: none;
  }

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

  .chart-bars {
    gap: 10px;
  }
}
