:root {
  color-scheme: dark;
  --bg: #030817;
  --panel: #071126;
  --panel-strong: #0b1834;
  --line: rgba(122, 210, 255, 0.18);
  --text: #f4f8ff;
  --muted: #8ea4bf;
  --blue: #1269ff;
  --cyan: #12f3ff;
  --cyan-soft: rgba(18, 243, 255, 0.16);
  --white-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(18, 243, 255, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 4%, rgba(18, 105, 255, 0.2), transparent 28rem),
    linear-gradient(145deg, #020512 0%, #050b1d 48%, #02040d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.landing-screen {
  display: none;
  min-height: 100vh;
}

body.is-authenticated .landing-screen,
body.auth-open .landing-screen {
  display: none;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(18px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 23, 0.82);
  backdrop-filter: blur(18px);
}

.landing-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

.landing-nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.landing-actions,
.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.landing-main {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 34px 24px 86px;
}

.landing-hero {
  display: grid;
  justify-items: center;
  gap: 40px;
  min-height: calc(100vh - 118px);
  text-align: center;
}

.landing-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 980px;
}

.landing-copy h1 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: clamp(3.6rem, 8.5vw, 8.4rem);
  line-height: 0.9;
}

.landing-copy > p:not(.eyebrow) {
  max-width: 720px;
  color: #c5d4e9;
  font-size: 1.22rem;
  line-height: 1.62;
}

.landing-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(820px, 100%);
  margin: 34px auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.landing-proof div {
  display: grid;
  gap: 5px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.landing-proof div:last-child {
  border-right: 0;
}

.landing-proof strong {
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.landing-proof span {
  color: var(--muted);
  line-height: 1.35;
}

.automation-board,
.bot-sync,
.landing-section {
  border: 1px solid rgba(18, 243, 255, 0.22);
  border-radius: 18px;
  background: rgba(7, 17, 38, 0.78);
  box-shadow: var(--shadow);
}

.automation-board {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: min(760px, 100%);
  min-height: 360px;
  padding: 36px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 0%, rgba(18, 243, 255, 0.22), transparent 44%),
    rgba(7, 17, 38, 0.72);
}

.automation-board img {
  width: min(360px, 72vw);
  border-radius: 38px;
  opacity: 0.96;
  filter: drop-shadow(0 34px 70px rgba(18, 105, 255, 0.28));
}

.product-glass {
  position: absolute;
  right: 32px;
  bottom: 30px;
  display: grid;
  gap: 4px;
  min-width: 245px;
  padding: 16px;
  border: 1px solid rgba(18, 243, 255, 0.26);
  border-radius: 16px;
  text-align: left;
  background: rgba(2, 7, 22, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.product-glass span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.product-glass strong {
  font-size: 1.05rem;
}

.product-glass small {
  color: var(--muted);
}

.automation-strip {
  width: min(980px, 100%);
  margin: 74px auto 0;
  padding: 70px 0 56px;
  text-align: center;
}

.automation-strip h2 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.98;
}

.feature-showcase {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}

.feature-panel {
  min-height: 330px;
  padding: 30px;
  border: 1px solid rgba(18, 243, 255, 0.18);
  border-radius: 24px;
  background: rgba(7, 17, 38, 0.76);
  box-shadow: var(--shadow);
}

.feature-panel.large {
  grid-row: span 2;
  min-height: 678px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.feature-panel h2 {
  max-width: 680px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.feature-panel p:not(.eyebrow),
.bot-sync p {
  color: var(--muted);
  line-height: 1.6;
}

.landing-section,
.bot-sync {
  margin-top: 26px;
  padding: 24px;
}

.landing-statement {
  padding: 30px;
}

.landing-statement h2 {
  max-width: 900px;
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3.7rem);
  line-height: 1.08;
}

.landing-statement p:last-child {
  max-width: 860px;
  color: #c5d4e9;
  line-height: 1.7;
}

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

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

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: flex-start;
  justify-items: center;
  min-height: 100vh;
  max-height: 100vh;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 24% 10%, rgba(18, 243, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(18, 105, 255, 0.24), transparent 30rem),
    #030817;
}

body.auth-open .auth-screen {
  display: grid;
}

body:not(.is-authenticated) .app-shell {
  display: none;
}

body.is-authenticated .auth-screen {
  display: none;
}

.auth-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(18, 243, 255, 0.22);
  border-radius: 18px;
  background: rgba(7, 17, 38, 0.92);
  box-shadow: var(--shadow);
}

.auth-card.hidden,
.auth-support-page {
  display: none;
}

.auth-support-page.open {
  display: block;
  width: min(760px, 100%);
}

.auth-brand {
  margin-bottom: 20px;
}

.auth-heading h1 {
  margin-bottom: 10px;
  font-size: 2.25rem;
}

.auth-heading p:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.auth-tabs button.active {
  color: #00111f;
  background: linear-gradient(135deg, var(--cyan), #f8fbff);
}

.auth-form {
  display: none;
  gap: 12px;
}

.auth-form.active {
  display: grid;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #dbeafe;
  font-weight: 800;
}

.auth-form input {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 7, 22, 0.86);
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(18, 243, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(18, 243, 255, 0.08);
}

.auth-form p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.telegram-box {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.telegram-box span {
  color: var(--cyan);
  font-weight: 900;
}

.telegram-box small {
  color: var(--muted);
  line-height: 1.45;
}

.auth-support-toggle {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 900;
}

.auth-support-chat {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 7, 22, 0.72);
  box-shadow: var(--shadow);
}

.auth-support-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
  max-height: 460px;
  padding: 22px;
  overflow-y: auto;
}

.auth-support-page .message {
  width: min(76%, 560px);
}

.auth-support-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.auth-support-form input {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(2, 7, 22, 0.86);
  outline: none;
}

.auth-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.back-button {
  min-height: 38px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 900;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 86px;
  padding: 14px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 23, 0.84);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  order: 1;
}

.brand img {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(18, 243, 255, 0.38);
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 0 32px rgba(18, 243, 255, 0.18);
}

.brand span {
  display: grid;
  gap: 1px;
  justify-items: center;
}

.brand strong {
  font-size: 1.25rem;
  letter-spacing: 0.18em;
}

.brand small {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.42em;
}

.profile-panel,
.side-subscription {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-panel {
  order: 3;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  justify-self: end;
  width: 210px;
  padding: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(18, 243, 255, 0.34);
  border-radius: 50%;
  color: #00111f;
  background: linear-gradient(135deg, var(--cyan), #4fa8ff);
  font-weight: 900;
}

.profile-panel strong,
.profile-panel span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-panel span {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-list {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nav-link {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  font-weight: 800;
}

.nav-link::before {
  content: none;
}

.nav-link:hover,
.nav-link.active {
  border-color: rgba(18, 243, 255, 0.26);
  color: var(--text);
  background: rgba(18, 243, 255, 0.1);
}

.side-subscription {
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.side-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.side-row strong {
  font-size: 0.92rem;
}

.side-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.side-progress span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 0 18px rgba(18, 243, 255, 0.42);
}

.side-button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #00111f;
  background: linear-gradient(135deg, var(--cyan), #f8fbff);
  font-weight: 900;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.workspace {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 34px 24px 64px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

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

.screen-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.copy-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
}

.copy-id::after {
  content: "□";
  color: rgba(244, 248, 255, 0.72);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.12;
}

.account-chip {
  display: grid;
  gap: 2px;
  min-width: 160px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.account-chip span,
.metric span,
.checkout-row span,
.connection-body span,
.profile-lines span {
  color: var(--muted);
  font-size: 0.78rem;
}

.pill,
.panel-badge {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(18, 243, 255, 0.32);
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-actions,
.checkout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  border: 0;
  padding: 0 18px;
  color: #00111f;
  background: linear-gradient(135deg, var(--cyan), #48a7ff 48%, #f8fbff);
  box-shadow: 0 14px 36px rgba(18, 243, 255, 0.18);
}

.ghost-btn {
  border: 1px solid var(--line);
  padding: 0 16px;
  color: var(--text);
  background: var(--white-soft);
}

.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.compact {
  min-height: 36px;
  font-size: 0.9rem;
}

.full {
  width: 100%;
}

.connection-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 12%, rgba(18, 243, 255, 0.11), transparent 18rem),
    radial-gradient(circle at 8% 100%, rgba(18, 105, 255, 0.15), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(5, 11, 27, 0.88);
  box-shadow: var(--shadow);
}

.connection-card::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  background: url("./assets/coltvpn-logo.jpg") center / cover no-repeat;
  opacity: 0.08;
  filter: saturate(0.5);
  pointer-events: none;
}

.connection-topline {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.card-title {
  margin-bottom: 0;
  color: #e8eef8;
  font-weight: 800;
}

.route-state {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(18, 243, 255, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(18, 243, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 900;
}

.route-state.inactive {
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.connection-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
  margin-bottom: 24px;
}

.route-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border: 1px solid rgba(18, 243, 255, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(18, 243, 255, 0.18) 0 24%, transparent 25%),
    conic-gradient(from 70deg, var(--cyan), rgba(18, 105, 255, 0.1), var(--blue), var(--cyan));
  box-shadow: 0 0 34px rgba(18, 243, 255, 0.12);
}

.route-orbit::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: rgba(4, 10, 24, 0.95);
}

.route-orbit span {
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 1px dashed rgba(244, 248, 255, 0.16);
}

.route-orbit strong {
  position: relative;
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 900;
}

.connection-body strong,
.connection-body small {
  display: block;
}

.connection-body strong {
  margin: 4px 0;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1;
}

.connection-body small {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.connection-body p {
  max-width: 600px;
  margin: 10px 0 0;
  color: #c5d4e9;
  line-height: 1.5;
}

.wide-btn,
.connection-actions {
  position: relative;
  z-index: 1;
}

.wide-btn {
  width: min(520px, 100%);
}

.connection-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  max-width: 720px;
}

.connection-actions .primary-btn,
.connection-actions .ghost-btn {
  min-height: 46px;
}

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

.command-tile {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(7, 17, 38, 0.7);
}

.command-tile span {
  color: var(--cyan);
  font-weight: 900;
}

.command-tile strong {
  font-size: 1.05rem;
}

.command-tile small {
  color: var(--muted);
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.profile-lines {
  display: grid;
}

.profile-lines div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-lines div:last-child {
  border-bottom: 0;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 17, 38, 0.82);
}

.metric {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.metric strong {
  font-size: 1.45rem;
}

.metric small,
.timeline small {
  color: var(--muted);
}

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

.panel {
  padding: 20px;
}

.panel.wide {
  grid-column: 1 / -1;
}

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

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

.plan-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
}

.plan-card strong {
  font-size: 1.7rem;
}

.plan-card small {
  color: var(--muted);
}

.plan-card.selected {
  border-color: rgba(18, 243, 255, 0.65);
  background: linear-gradient(145deg, rgba(18, 243, 255, 0.16), rgba(18, 105, 255, 0.18));
}

.checkout-row {
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.checkout-row div {
  display: grid;
  gap: 4px;
}

.checkout-row strong {
  font-size: 1.35rem;
}

.icon-btn {
  width: 42px;
  border: 1px solid var(--line);
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 1.4rem;
}

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

.config-box {
  padding: 16px;
  border: 1px solid rgba(18, 243, 255, 0.22);
  border-radius: 8px;
  background: #020716;
}

.config-box code {
  color: #dbeafe;
  overflow-wrap: anywhere;
}

.config-box.empty code {
  color: var(--muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.guide-grid a {
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.timeline div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.timeline div:last-child {
  border-bottom: 0;
}

.timeline span {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto;
  min-height: 660px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(7, 17, 38, 0.82);
  box-shadow: var(--shadow);
}

.chat-header,
.chat-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-header h2 {
  margin: 0;
}

.quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.quick-topics button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(18, 243, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(18, 243, 255, 0.08);
  font-weight: 800;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
}

.message {
  width: min(76%, 560px);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.message.user {
  align-self: flex-end;
  border-color: rgba(18, 243, 255, 0.28);
  background: linear-gradient(135deg, rgba(18, 243, 255, 0.18), rgba(18, 105, 255, 0.12));
}

.message span {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.message p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.45;
}

.chat-form {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 0;
}

.chat-composer {
  display: grid;
  gap: 10px;
  width: 100%;
}

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

.attach-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(18, 243, 255, 0.24);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(18, 243, 255, 0.08);
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 900;
}

.attach-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-preview,
.message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-chip,
.message-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(18, 243, 255, 0.2);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(18, 243, 255, 0.075);
  font-size: 0.82rem;
  font-weight: 800;
}

.attachment-chip span,
.message-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.chat-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 7, 22, 0.86);
  outline: none;
}

.chat-form input:focus {
  border-color: rgba(18, 243, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(18, 243, 255, 0.08);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 16px;
  border: 1px solid rgba(18, 243, 255, 0.34);
  border-radius: 8px;
  color: var(--text);
  background: rgba(4, 11, 27, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .landing-nav {
    grid-template-columns: 1fr;
  }

  .landing-nav nav,
  .landing-actions {
    justify-content: flex-start;
  }

  .landing-hero,
  .automation-strip,
  .bot-sync {
    grid-template-columns: 1fr;
    min-height: 0;
  }

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

  .feature-panel.large {
    min-height: 430px;
  }

  .landing-plans {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    grid-template-columns: 1fr;
    height: auto;
    padding: 16px;
  }

  .profile-panel,
  .side-subscription {
    display: none;
  }

  .nav-list {
    justify-content: flex-start;
  }

  .workspace {
    padding: 18px 14px 28px;
  }

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

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .screen-head,
  .panel-heading {
    display: grid;
    gap: 12px;
  }

  .account-chip {
    width: 100%;
    min-width: 0;
  }

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

  .nav-list,
  .metric-grid,
  .content-grid,
  .plans,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .connection-card {
    min-height: 0;
    padding: 16px;
    border-radius: 14px;
  }

  .connection-card::after {
    width: 150px;
    height: 150px;
    right: -46px;
    bottom: -54px;
  }

  .connection-topline {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
  }

  .connection-body {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 18px;
  }

  .route-orbit {
    width: 62px;
  }

  .route-orbit::before {
    inset: 9px;
  }

  .route-orbit strong {
    font-size: 1.25rem;
  }

  .connection-body strong {
    font-size: clamp(1.55rem, 9vw, 2rem);
  }

  .connection-body p {
    grid-column: 1 / -1;
    margin-top: 8px;
    font-size: 0.92rem;
  }

  .command-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .connection-actions {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: none;
  }

  .command-tile {
    min-height: 96px;
    padding: 14px;
  }

  .chat-panel {
    min-height: 560px;
  }

  .chat-header,
  .chat-form {
    display: grid;
  }

  .composer-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .composer-row .primary-btn {
    grid-column: 1 / -1;
  }

  .message {
    width: 100%;
  }

}

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

  h1 {
    font-size: clamp(1.45rem, 10vw, 1.9rem);
  }

  .screen-head p,
  .copy-id {
    font-size: 0.9rem;
  }

  .connection-body {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .route-orbit {
    width: 54px;
  }

  .connection-body strong {
    font-size: 1.55rem;
  }

  .connection-body small,
  .connection-body p,
  .command-tile small {
    font-size: 0.86rem;
  }
}

@media (max-height: 820px) {
  .auth-screen {
    padding: 12px;
  }

  .auth-card {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .auth-brand {
    margin-bottom: 14px;
  }

  .auth-brand img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .auth-heading h1 {
    margin-bottom: 6px;
    font-size: 1.85rem;
  }

  .auth-heading p:last-child {
    margin-bottom: 0;
    line-height: 1.4;
  }

  .auth-tabs {
    margin: 12px 0;
  }

  .auth-tabs button,
  .auth-form input,
  .auth-form .primary-btn,
  .auth-form .ghost-btn {
    min-height: 40px;
  }

  .auth-form {
    gap: 9px;
  }

  .auth-form label {
    gap: 6px;
  }

  .back-button {
    min-height: 34px;
    margin-bottom: 10px;
  }
}
