@font-face {
  font-family: "Cabinet Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url("assets/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Cabinet Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-display: block;
  font-weight: 400;
  src: url("assets/fonts/material-symbols-outlined-400.ttf") format("truetype");
}

@font-face {
  font-family: "Cabinet Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("assets/fonts/montserrat-cyrillic-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Cabinet Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fafafa;
  --panel: #ffffff;
  --text: #171717;
  --muted: #525252;
  --muted-soft: #a3a3a3;
  --border: #e5e5e5;
  --border-dark: #262626;
  --violet: #7c3aed;
  --violet-dark: #6d28d9;
  --violet-soft: #f5f3ff;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --lime: #84cc16;
  --lime-soft: #ecfccb;
  --shadow: 0 18px 40px rgba(23, 23, 23, 0.06);
  --font: "Cabinet Manrope", "Segoe UI", Arial, sans-serif;
  --display: "Cabinet Manrope", "Segoe UI", Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --tg-viewport-height: 100dvh;
  --tg-viewport-stable-height: 100dvh;
  --tg-safe-area-bottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-auth-loading .workspace {
  opacity: 0;
  pointer-events: none;
}

body.is-auth-loading .top-nav,
body.is-auth-loading .mobile-tabs {
  pointer-events: none;
}

body.is-telegram-miniapp {
  overscroll-behavior: none;
}

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

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.material-symbols-outlined {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "Material Symbols Outlined";
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.material-symbols-outlined.fill {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 280px;
  height: 100vh;
  flex-direction: column;
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.side-head {
  margin-bottom: 32px;
  padding: 0 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 4px;
  background: var(--violet);
  color: #ffffff;
}

.brand-mark .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.brand-row h1 {
  margin: 0;
  color: var(--violet);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.access-status-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.access-status-mini span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}

.access-status-mini.is-active {
  background: var(--lime-soft);
  color: #4d7c0f;
}

.side-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.side-link {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-right: 4px solid transparent;
  border-radius: 4px;
  color: #737373;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.side-link:hover {
  background: var(--bg);
  color: var(--violet);
}

.side-link.is-active {
  border-right-color: var(--violet);
  background: var(--violet-soft);
  color: var(--violet-dark);
}

.side-link.is-locked {
  color: var(--muted-soft);
}

.side-link.is-locked:hover {
  background: var(--red-soft);
  color: var(--red);
}

body.is-access-unlocked .side-link.is-locked {
  color: #737373;
}

body.is-access-unlocked .side-link.is-locked:hover {
  background: var(--bg);
  color: var(--violet);
}

body.is-access-unlocked .lock-icon {
  display: none;
}

.side-section {
  margin: 14px 0 6px;
  padding: 0 16px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-section.is-open {
  color: #4d7c0f;
}

.lock-icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  font-size: 18px;
  opacity: 0.55;
}

.side-footer {
  display: grid;
  gap: 16px;
  margin-top: auto;
}

.buy-note {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #ede9fe;
  border-radius: 4px;
  background: var(--violet-soft);
}

.buy-note p {
  margin: 0;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.buy-note a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--violet);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

body.is-access-unlocked .buy-note {
  display: none;
}

.footer-links {
  display: grid;
  gap: 4px;
}

.footer-links a {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 4px;
  color: #737373;
  font-size: 14px;
  font-weight: 700;
}

.footer-links a:hover {
  background: var(--bg);
  color: var(--violet);
}

.footer-links a.danger:hover {
  background: var(--red-soft);
  color: var(--red);
}

.top-nav {
  position: fixed;
  inset: 0 0 auto 280px;
  z-index: 10;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.top-nav h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: #f5f5f5;
  color: var(--violet);
}

.notify-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: var(--violet);
}

.divider {
  width: 1px;
  height: 24px;
  margin: 0 8px;
  background: var(--border);
}

.top-support {
  padding: 7px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.top-support:hover {
  color: var(--text);
}

.order-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--text);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.order-button:hover {
  background: #262626;
}

.order-button .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.workspace {
  position: absolute;
  inset: 64px 0 0 280px;
  overflow-y: auto;
  background: var(--bg);
  padding: 28px 32px 32px;
}

.workspace-inner {
  width: min(100%, 1152px);
  margin: 0 auto;
  padding-bottom: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(288px, 0.95fr);
  gap: 24px;
}

.status-card,
.start-card,
.locked-preview,
.tariff-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-card {
  display: flex;
  min-height: 328px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 32px;
}

.login-card {
  display: grid;
  max-width: 720px;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 14px;
  margin: 24px auto;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 54%, #f5f3ff 100%);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  background: var(--violet-soft);
  color: var(--violet);
}

.login-icon .material-symbols-outlined {
  width: 32px;
  height: 32px;
  font-size: 32px;
}

.login-kicker {
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.02;
}

.login-card p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 520px);
  margin-top: 8px;
}

.login-actions button {
  display: inline-flex;
  min-height: 48px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.login-actions button.google-login {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.login-actions button.google-login > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #4285f4;
  color: #ffffff;
  font-weight: 900;
}

.login-card small {
  max-width: 460px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.violet-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 256px;
  height: 256px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  filter: blur(24px);
}

.status-badge {
  position: relative;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 12px;
  border-radius: 4px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 900;
}

.status-badge .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.status-badge.is-active {
  background: var(--lime-soft);
  color: #4d7c0f;
}

.status-card h3 {
  position: relative;
  max-width: 620px;
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.08;
}

.status-card p {
  position: relative;
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.card-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.locked-overlay a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
}

.primary-action {
  background: var(--violet);
  color: #ffffff;
}

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

.secondary-action {
  background: #f5f5f5;
  color: var(--text);
}

.secondary-action:hover {
  background: var(--border);
}

.start-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 328px;
  padding: 24px;
  border-color: #d9f99d;
  background: var(--lime-soft);
}

.start-label {
  margin-bottom: 8px;
  color: #4d7c0f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.start-card h4 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.start-price {
  margin-bottom: 18px;
  color: #65a30d;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.start-price span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.start-card ul,
.tariff-card ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.start-card li,
.tariff-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #404040;
  font-size: 14px;
  font-weight: 600;
}

.start-card li .material-symbols-outlined {
  width: 18px;
  height: 18px;
  color: #65a30d;
  font-size: 18px;
}

.start-card > a,
.start-card > button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 4px;
  background: var(--lime);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.start-card > a:hover,
.start-card > button:hover {
  background: #65a30d;
}

.locked-preview {
  min-height: 320px;
  margin-top: 24px;
  overflow: hidden;
}

body.is-access-unlocked .locked-preview {
  display: none;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  text-align: center;
}

.lock-circle {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f5f5;
  color: #9ca3af;
}

.lock-circle .material-symbols-outlined {
  width: 32px;
  height: 32px;
  font-size: 32px;
}

.locked-overlay h4 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.locked-overlay p {
  max-width: 420px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.locked-overlay a {
  min-height: 36px;
  background: var(--text);
  color: #ffffff;
}

.locked-overlay a:hover {
  background: #262626;
}

.blurred-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  min-height: 320px;
  padding: 32px;
  opacity: 0.38;
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.blur-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.fake-line {
  height: 24px;
  border-radius: 4px;
  background: #e5e5e5;
}

.fake-line-short {
  width: 128px;
}

.fake-line-long {
  width: 192px;
}

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

.fake-card {
  height: 112px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.fake-card.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.fake-card.yellow {
  border-color: #fde68a;
  background: #fefce8;
}

.terminal-card {
  min-height: 144px;
  padding: 18px;
  border: 1px solid #404040;
  border-radius: 8px;
  background: #171717;
  color: #737373;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.management-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #ecfccb 100%);
  box-shadow: var(--shadow);
}

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

.panel-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #4d7c0f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.management-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
}

.payment-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.payment-state.success {
  background: var(--lime-soft);
  color: #4d7c0f;
}

.payment-state .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

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

.tool-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.tool-card.is-focused {
  border-color: var(--violet);
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.12);
}

.tool-card > .material-symbols-outlined {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 24px;
}

.tool-card h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.tool-card button {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 4px;
  background: var(--text);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.tool-card button:hover {
  background: #262626;
}

.live-terminal {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 8px;
  background: #171717;
  color: #a3e635;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
}

.management-panel {
  width: min(100%, 1040px);
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.management-view {
  display: grid;
  gap: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-head h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: none;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.launch-shell {
  display: grid;
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.launch-block h4,
.block-title-row h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.launch-block h4 .material-symbols-outlined,
.block-title-row h4 .material-symbols-outlined {
  width: 18px;
  height: 18px;
  color: var(--muted);
  font-size: 18px;
}

.upload-dropzone {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px;
  border: 2px dashed #d4d4d4;
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  text-align: center;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.upload-dropzone:hover {
  border-color: #c4b5fd;
  background: #f8f7ff;
}

.upload-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted-soft);
  box-shadow: 0 10px 24px rgba(23, 23, 23, 0.05);
}

.upload-icon .material-symbols-outlined {
  width: 26px;
  height: 26px;
  font-size: 26px;
}

.upload-dropzone strong {
  display: block;
  margin-bottom: 5px;
  color: #404040;
  font-size: 16px;
  font-weight: 900;
}

.upload-dropzone small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-dropzone em {
  display: block;
  margin-top: 10px;
  color: var(--violet);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.ghost-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  margin-top: 20px;
  padding: 8px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.block-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.block-title-row h4 {
  margin: 0;
}

.block-title-row > span {
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.code-area {
  width: 100%;
  height: 192px;
  padding: 16px;
  border: 1px solid #262626;
  border-radius: 8px;
  background: #171717;
  color: #d4d4d4;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.code-area:focus {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.env-list {
  display: grid;
  height: 192px;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.env-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.45fr) minmax(0, 1fr);
  gap: 8px;
}

.env-row input {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: #ffffff;
  color: #404040;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.add-env-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  border: 1px dashed #d4d4d4;
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.add-env-button .material-symbols-outlined {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.launch-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.launch-actions button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 6px;
  background: var(--violet);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 2px 0 #5b21b6;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.launch-actions button:hover {
  background: var(--violet-dark);
}

.launch-actions button:active {
  box-shadow: none;
  transform: translateY(2px);
}

.logs-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.logs-title-line h3 {
  margin-bottom: 0;
}

.log-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--lime-soft);
  color: #3f6212;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-status span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #65a30d;
  animation: pulse 1.2s ease-in-out infinite;
}

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

.logs-toolbar > div {
  display: flex;
  gap: 10px;
}

.logs-toolbar button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #404040;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(23, 23, 23, 0.04);
}

.logs-toolbar button:hover {
  background: #f5f5f5;
}

.logs-toolbar button.danger {
  color: var(--red);
}

.logs-toolbar button.danger:hover {
  border-color: #fecaca;
  background: var(--red-soft);
}

.selected-bot-label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  max-width: 280px;
  overflow: hidden;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet-dark);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-toolbar .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.logs-terminal {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 54px rgba(23, 23, 23, 0.08);
}

.terminal-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: #f5f5f5;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #d4d4d4;
}

.terminal-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.terminal-empty .material-symbols-outlined {
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #f5f3ff;
  color: var(--violet);
  font-size: 30px;
}

.terminal-empty strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.terminal-empty small {
  max-width: 340px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

.terminal-line {
  display: grid;
  grid-template-columns: 96px 74px minmax(0, 1fr);
  gap: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  color: #404040;
}

.terminal-line:hover {
  background: #fafafa;
}

.terminal-time {
  color: var(--muted-soft);
  user-select: none;
}

.terminal-level {
  font-weight: 900;
}

.terminal-level.SYSTEM {
  color: #5b21b6;
}

.terminal-level.INFO {
  color: #2563eb;
}

.terminal-level.SUCCESS {
  color: #16a34a;
}

.terminal-level.WARN {
  color: #d97706;
}

.terminal-level.ERROR {
  color: var(--red);
}

.mobile-tabs {
  display: none;
}

.bot-control-shell {
  gap: 18px;
}

.bot-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed #d4d4d4;
  border-radius: 14px;
  background: #fafafa;
  color: var(--muted);
  text-align: center;
}

.bot-state .material-symbols-outlined {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 28px;
}

.bot-state strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.bot-state small {
  max-width: 420px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.bot-state.is-error .material-symbols-outlined {
  background: var(--red-soft);
  color: var(--red);
}

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

.bot-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 23, 23, 0.05);
}

.bot-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.bot-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 24px;
}

.bot-card h4 {
  overflow: hidden;
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-card p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.bot-status.running,
.bot-status.starting {
  background: var(--lime-soft);
  color: #4d7c0f;
}

.bot-status.error {
  background: var(--red-soft);
  color: var(--red);
}

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

.bot-actions button {
  display: inline-flex;
  min-height: 40px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: #404040;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.bot-actions button:hover {
  background: #f5f5f5;
}

.bot-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.bot-actions button.secondary {
  background: var(--violet-soft);
  color: var(--violet-dark);
}

.bot-actions .material-symbols-outlined {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  font-size: 18px;
}

.bot-payment-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.tariffs {
  margin-top: 28px;
}

.tariffs h3 {
  margin: 0 0 24px;
  text-align: center;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.18;
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.tariff-card {
  display: flex;
  min-height: 350px;
  flex-direction: column;
  padding: 24px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tariff-card:hover {
  border-color: #c4b5fd;
}

.tariff-card.featured {
  border: 2px solid var(--violet);
  box-shadow: 0 18px 34px rgba(124, 58, 237, 0.12);
  transform: translateY(-12px);
}

.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--violet);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

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

.tariff-head h4 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
}

.tariff-card.featured h4 {
  color: var(--violet);
}

.tariff-price {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.tariff-price span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tariff-card li .material-symbols-outlined {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--muted-soft);
  font-size: 20px;
}

.tariff-card.featured li .material-symbols-outlined {
  color: var(--violet);
}

.tariff-card > a,
.tariff-card > button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f5f5f5;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
}

.tariff-card > a:hover,
.tariff-card > button:hover {
  background: #e5e5e5;
}

.tariff-card.featured > a,
.tariff-card.featured > button {
  border-color: var(--violet);
  background: var(--violet);
  color: #ffffff;
}

.tariff-card.featured > a:hover,
.tariff-card.featured > button:hover {
  background: var(--violet-dark);
}

[data-plan-id].is-loading,
[data-crypto-tariff].is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.start-card > button {
  gap: 8px;
  padding: 10px 14px;
  line-height: 1.18;
  text-align: center;
}

.start-card > button .material-symbols-outlined,
.tariff-card > button .material-symbols-outlined {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  font-size: 18px;
}

.crypto-payment-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid #d9f99d;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fee7 100%);
  box-shadow: 0 18px 38px rgba(23, 23, 23, 0.06);
}

.crypto-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #4d7c0f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crypto-payment-panel h4 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
}

.crypto-payment-panel p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.crypto-invoice-id {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.crypto-invoice-id strong {
  color: var(--text);
}

.crypto-status {
  margin-top: 8px;
  color: #4d7c0f;
  font-size: 13px;
  font-weight: 900;
}

.crypto-actions {
  display: grid;
  min-width: 210px;
  gap: 10px;
}

.crypto-actions button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.crypto-actions button:last-child {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.crypto-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #171717;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(23, 23, 23, 0.18);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.toast.is-error {
  background: #991b1b;
}

.toast.is-success {
  background: #3f6212;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

@media (max-width: 1120px) {
  .hero-grid,
  .tariff-grid,
  .management-grid,
  .launch-grid {
    grid-template-columns: 1fr;
  }

  .tariff-card.featured {
    transform: none;
  }
}

@media (max-width: 820px) {
  body.cabinet-page {
    height: 100dvh;
    overflow: hidden;
  }

  .side-nav {
    display: none;
  }

  .top-nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
  }

  .top-nav h2 {
    font-size: 18px;
  }

  .top-actions {
    display: flex;
    gap: 4px;
  }

  .top-actions .divider,
  .top-actions .top-support,
  .top-actions .order-button {
    display: none;
  }

  .workspace {
    position: fixed;
    inset: 64px 0 64px 0;
    width: auto;
    overflow-y: auto;
    padding: 16px 14px 26px;
  }

  .workspace-inner {
    padding-bottom: 18px;
  }

  .mobile-tabs {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-around;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(16px);
  }

  .mobile-tab {
    position: relative;
    display: flex;
    width: 64px;
    min-height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 12px;
    color: var(--muted-soft);
    font-size: 10px;
    font-weight: 900;
    transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
  }

  .mobile-tab .material-symbols-outlined {
    width: 24px;
    height: 24px;
    font-size: 24px;
  }

  .mobile-tab.is-active {
    background: var(--violet-soft);
    color: var(--violet-dark);
  }

  .mobile-tab.is-locked {
    color: #c4c4c4;
  }

  body.is-access-unlocked .mobile-tab.is-locked {
    color: var(--muted-soft);
  }

  body.is-access-unlocked .mobile-tab.is-active {
    color: var(--violet-dark);
  }

  .hero-grid {
    gap: 16px;
  }

  .status-card,
  .start-card {
    border-radius: 14px;
  }

  .management-panel {
    margin-top: 0;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-head h3 {
    font-size: 24px;
  }

  .payment-state {
    display: none;
  }

  .launch-shell {
    gap: 22px;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(23, 23, 23, 0.05);
  }

  .upload-dropzone {
    min-height: 180px;
    padding: 28px 18px;
    border-radius: 14px;
  }

  .upload-dropzone strong {
    font-size: 14px;
  }

  .code-area,
  .env-list {
    height: 160px;
    border-radius: 12px;
  }

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

  .launch-actions {
    padding-top: 8px;
  }

  .launch-actions button {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    font-size: 15px;
  }

  .logs-toolbar {
    position: sticky;
    top: -16px;
    z-index: 3;
    margin-inline: -14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(12px);
  }

  .logs-toolbar button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .logs-terminal {
    min-height: calc(100dvh - 260px);
    border-radius: 0;
    margin-inline: -14px;
    border-inline: 0;
    box-shadow: none;
  }

  .terminal-line {
    grid-template-columns: 74px 68px minmax(0, 1fr);
    gap: 6px;
    font-size: 11px;
  }

  .terminal-head {
    min-height: 38px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .side-nav,
  .top-nav,
  .workspace {
    position: static;
    width: auto;
  }

  .side-nav {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .top-nav {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .top-actions > .top-support,
  .top-actions > .order-button {
    width: 100%;
    justify-content: center;
  }

  .workspace {
    padding: 20px 16px 28px;
  }

  .status-card,
  .start-card,
  .tariff-card {
    min-height: 0;
  }

  .status-card {
    padding: 24px;
  }

  .status-card h3 {
    font-size: 32px;
  }

  .blurred-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .side-nav {
    padding: 18px 12px;
  }

  .side-head {
    padding: 0 6px;
  }

  .side-link {
    padding-inline: 10px;
  }

  .card-actions,
  .top-actions {
    display: grid;
  }

  .primary-action,
  .secondary-action,
  .locked-overlay a {
    width: 100%;
  }

  .status-card h3 {
    font-size: 28px;
  }

  .tariffs h3 {
    font-size: 26px;
  }

  .fake-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body.cabinet-page {
    height: 100dvh;
    overflow: hidden;
  }

  .side-nav {
    display: none;
  }

  .top-nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
  }

  .top-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .top-actions .divider,
  .top-actions .top-support,
  .top-actions .order-button {
    display: none;
  }

  .workspace {
    position: fixed;
    inset: 64px 0 64px 0;
    width: auto;
    overflow-y: auto;
    padding: 16px 14px 26px;
  }

  .mobile-tabs {
    display: flex;
  }
}

/* Final responsive cabinet layer. It intentionally lives last to override older mobile blocks. */
@media (max-width: 1024px) {
  html,
  body.cabinet-page {
    width: 100%;
    height: 100%;
    min-height: 100%;
  }

  body.cabinet-page {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #f7f7f8;
  }

  body.cabinet-page.is-telegram-miniapp {
    height: var(--tg-viewport-stable-height);
    min-height: var(--tg-viewport-stable-height);
  }

  .side-nav {
    display: none !important;
  }

  .top-nav {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 25;
    height: 64px;
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(229, 229, 229, 0.86);
    background: rgba(255, 255, 255, 0.9);
  }

  .top-nav h2 {
    min-width: 0;
    overflow: hidden;
    font-size: clamp(16px, 4.4vw, 19px);
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .top-actions .divider,
  .top-actions .top-support,
  .top-actions .order-button {
    display: none !important;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .workspace {
    position: fixed !important;
    inset: 64px 0 calc(64px + var(--tg-safe-area-bottom)) 0 !important;
    width: auto !important;
    padding: 16px 14px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-inner {
    width: 100%;
    max-width: none;
    padding-bottom: 12px;
  }

  .hero-grid,
  .bot-grid,
  .tariff-grid,
  .launch-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .status-card,
  .start-card,
  .locked-preview,
  .tariff-card,
  .launch-shell,
  .logs-terminal {
    border-radius: 18px;
  }

  .status-card {
    min-height: auto;
    padding: 22px;
  }

  .login-card {
    min-height: calc(var(--tg-viewport-stable-height) - 160px);
    margin: 0;
    padding: 24px 18px;
    border-radius: 18px;
  }

  .status-card h3 {
    font-size: clamp(28px, 8.8vw, 36px);
    line-height: 1.04;
  }

  .status-card p {
    font-size: 14px;
    line-height: 1.5;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action,
  .locked-overlay a {
    width: 100%;
  }

  .start-card,
  .tariff-card {
    min-height: auto;
  }

  .locked-preview {
    min-height: 260px;
    margin-top: 16px;
  }

  .locked-overlay {
    padding: 24px 18px;
  }

  .blurred-content {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .fake-cards {
    grid-template-columns: 1fr 1fr;
  }

  .management-panel,
  .tariffs {
    width: 100%;
    margin-top: 0;
  }

  .page-head {
    align-items: flex-start;
    gap: 12px;
  }

  .page-head h3,
  .tariffs h3 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .payment-state {
    display: none;
  }

  .launch-shell {
    gap: 22px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(23, 23, 23, 0.05);
  }

  .upload-dropzone {
    min-height: 178px;
    padding: 26px 18px;
    border-radius: 16px;
  }

  .code-area,
  .env-list {
    height: 164px;
    border-radius: 14px;
  }

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

  .launch-actions {
    padding-top: 8px;
  }

  .launch-actions button {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
  }

  .logs-toolbar {
    position: sticky;
    top: -16px;
    z-index: 4;
    margin-inline: -14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
  }

  .selected-bot-label {
    max-width: 46vw;
    min-width: 0;
  }

  .logs-toolbar > div {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .logs-toolbar > div::-webkit-scrollbar {
    display: none;
  }

  .logs-toolbar button {
    min-height: 36px;
    flex: 0 0 auto;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .logs-terminal {
    min-height: calc(var(--tg-viewport-stable-height) - 252px);
    margin-inline: -14px;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .terminal-output {
    padding: 12px;
    font-size: 12px;
  }

  .terminal-line {
    grid-template-columns: 74px 66px minmax(0, 1fr);
    gap: 6px;
    padding: 5px 6px;
  }

  .tariff-card.featured {
    transform: none;
  }

  .tariff-card li {
    min-width: 0;
    align-items: flex-start;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .tariff-card > button,
  .start-card > button {
    width: 100%;
    min-height: 46px;
    white-space: normal;
  }

  .crypto-payment-panel {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
  }

  .crypto-actions {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .crypto-actions button {
    min-width: 0;
    white-space: normal;
  }

  .mobile-tabs {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: flex !important;
    height: calc(64px + var(--tg-safe-area-bottom));
    align-items: center;
    justify-content: space-around;
    padding: 6px 8px max(6px, var(--tg-safe-area-bottom));
    border-top: 1px solid rgba(229, 229, 229, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
  }

  .mobile-tab {
    width: min(21vw, 82px);
    min-height: 50px;
    border-radius: 14px;
    min-width: 0;
    overflow: hidden;
  }

  .mobile-tab .material-symbols-outlined {
    flex: 0 0 auto;
  }

  .mobile-tab span:not(.material-symbols-outlined) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-tab.is-active {
    background: var(--violet-soft);
    color: var(--violet-dark);
  }

  .toast {
    right: 12px;
    bottom: calc(76px + var(--tg-safe-area-bottom));
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding-inline: 12px;
  }

  .status-card,
  .login-card,
  .start-card,
  .tariff-card,
  .launch-shell {
    border-radius: 16px;
  }

  .launch-shell {
    padding: 16px;
  }

  .logs-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .selected-bot-label {
    max-width: 100%;
    justify-content: center;
  }

  .logs-toolbar > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow: visible;
  }

  .logs-toolbar button {
    width: 100%;
  }

  .logs-terminal {
    min-height: calc(var(--tg-viewport-stable-height) - 286px);
    margin-inline: -12px;
  }

  .terminal-line {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px;
    border-bottom: 1px solid rgba(229, 229, 229, 0.7);
  }

  .terminal-time,
  .terminal-level {
    width: auto;
  }

  .tariff-price {
    font-size: 30px;
  }

  .crypto-actions {
    grid-template-columns: 1fr;
  }

  .mobile-tab {
    width: calc((100vw - 24px) / 4);
    font-size: 9px;
    gap: 2px;
    padding-inline: 2px;
  }
}
