* {
  box-sizing: border-box;
}

:root {
  --bg: #090704;
  --bg-soft: #151008;
  --panel: #171008;
  --line: #3a2713;
  --txt: #ffffff;
  --muted: #b9a891;
  --accent: #ff8a1f;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--txt);
  background: radial-gradient(circle at 15% 20%, #2d1908, var(--bg) 40%);
  scroll-behavior: smooth;
}

.login-page {
  min-height: 100vh;
}

.login-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 138, 31, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 138, 31, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 85%);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(7, 3, 7, 0.7);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--txt);
  text-decoration: none;
  font-weight: 800;
}

.site-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #6a431f;
}

.hero-logo {
  width: 78px;
  height: 78px;
  margin-inline: auto;
  margin-bottom: 6px;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav-center {
  justify-self: center;
}

.nav-right {
  justify-self: end;
}

.nav a {
  color: #e4d5c1;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.nav a:hover {
  color: var(--accent);
}

.header-profile {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 0 0 rgba(255, 138, 31, 0);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-profile:hover {
  border-color: #ffb064;
  box-shadow: 0 0 16px rgba(255, 138, 31, 0.35);
}

.header-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section {
  padding: 72px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 138, 31, 0.1);
  color: #ffb064;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.95;
  margin: 16px 0 20px;
}

.accent {
  color: var(--accent);
}

h2 {
  font-size: clamp(30px, 6vw, 58px);
  margin: 16px 0;
}

p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  color: var(--txt);
  border-radius: 12px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
  background: transparent;
}

.btn-primary {
  background: linear-gradient(130deg, #ff9f2f, #d45a00);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(255, 138, 31, 0.28);
}

.btn-secondary:hover {
  border-color: #8a5a2d;
}

.terminal,
.card,
.auth-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(36, 21, 11, 0.65), rgba(14, 10, 6, 0.82));
  border-radius: 18px;
}

.terminal {
  overflow: hidden;
  min-height: 280px;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4b331d;
}

.terminal-head span:nth-child(1) { background: #ff5f57; }
.terminal-head span:nth-child(2) { background: #ffbd2e; }
.terminal-head span:nth-child(3) { background: #28ca42; }

.terminal-head strong {
  margin-left: auto;
  font-size: 12px;
  color: #9d815f;
  text-transform: uppercase;
}

.terminal-body {
  padding: 18px;
  font-family: Consolas, monospace;
}

.terminal-body p {
  margin: 0 0 8px;
  color: #d9cad2;
}

.terminal-body .ok {
  color: #ffa24a;
}

.cards {
  display: grid;
  gap: 16px;
}

.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); margin-top: 26px; }

.card {
  padding: 24px;
}

.card h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
}

.card p {
  margin: 8px 0 0;
}

.card.active {
  border-color: #8b5b2c;
  box-shadow: 0 0 30px rgba(255, 138, 31, 0.18);
}

.center {
  text-align: center;
}

.center p {
  margin-inline: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 34px;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 13%;
  right: 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 138, 31, 0.25) 20%, rgba(255, 138, 31, 0.25) 80%, transparent 100%);
  pointer-events: none;
}

.steps article {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 24px;
  text-align: center;
}

.steps span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid var(--line);
  background: #130d08;
  transition: all 0.25s ease;
  box-shadow: 0 0 0 rgba(255, 138, 31, 0);
  position: relative;
}

.steps article:hover span {
  background: #130d08;
  color: var(--accent);
  border-color: #ffb064;
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.28), 0 0 24px rgba(255, 138, 31, 0.45);
  transform: translateY(-1px);
}

.steps article h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.2vw, 34px);
}

.steps article p {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.5;
  margin-inline: auto;
}

.pricing-card h4 {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d9c2a8;
}

.pricing-card {
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: #b0753a;
  box-shadow: 0 0 0 1px rgba(255, 138, 31, 0.3), 0 0 28px rgba(255, 138, 31, 0.24);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(130deg, #ff9f2f, #d45a00);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 8px 18px rgba(255, 138, 31, 0.32);
}

.pricing-card small {
  font-size: 16px;
  color: #c2aa8d;
}

.pricing-features {
  margin: 18px 0 8px;
  padding: 0;
  list-style: none;
  text-align: left;
  display: grid;
  gap: 10px;
}

.pricing-features li {
  color: #d5c5b0;
  position: relative;
  padding-left: 22px;
}

.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

.pricing-card .btn {
  margin-top: 16px;
  width: 100%;
}

.auth-wrap {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 30px;
}

.auth-status {
  margin: 10px 0 0;
  color: #c9b79f;
  font-size: 14px;
}

.tg-holder {
  display: grid;
  place-items: center;
  min-height: 64px;
  margin: 18px 0 10px;
  border: 1px dashed #5a3b1d;
  border-radius: 12px;
  padding: 10px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #5a3b1d;
}

.dashboard-page {
  min-height: 100vh;
}

.dashboard-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(13, 9, 5, 0.93);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--txt);
  text-decoration: none;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-item {
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  color: #dbc7af;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.side-item.is-active {
  border-color: #8b5a2b;
  background: rgba(255, 138, 31, 0.15);
  color: #fff;
}

.sidebar-user {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user span {
  display: block;
  color: #b39d82;
  font-size: 13px;
}

.mini-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.dashboard-content {
  padding: 20px;
}

.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dash-topbar h1 {
  margin: 0;
  font-size: 30px;
}

.dash-section {
  display: none;
}

.dash-section.is-visible {
  display: block;
}

.dash-grid {
  display: grid;
  gap: 14px;
}

.dash-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.dash-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(24, 15, 9, 0.78);
  padding: 22px;
}

.dash-card h2,
.dash-card h3 {
  margin: 0 0 8px;
}

.dash-card strong {
  font-size: 42px;
}

.hero-card {
  margin-bottom: 14px;
}

.center-card {
  text-align: center;
  padding: 48px 24px;
}

.wiki-pre {
  border: 1px solid #4b3218;
  border-radius: 12px;
  background: #120d08;
  padding: 14px;
  overflow: auto;
  color: #ffb064;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #b6a186;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 980px) {
  .hero-grid,
  .cards.four,
  .cards.three,
  .cards.two,
  .steps {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding-block: 10px;
  }

  .nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dash-grid.three {
    grid-template-columns: 1fr;
  }

  h1 {
    line-height: 1.03;
  }
}
