* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #f6f7fb;
  color: #172237;
}

.layout {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.layout.auth-mode {
  grid-template-columns: 1fr;
  max-width: 900px;
  min-height: calc(100vh - 48px);
  align-items: center;
}

.layout.auth-mode .content {
  align-items: center;
}

.layout.auth-mode .auth-card {
  width: 100%;
  max-width: 760px;
}

.sidebar {
  background: #ffffff;
  border: 1px solid #e7eaf2;
  border-radius: 16px;
  padding: 20px 16px;
  min-height: 680px;
}

.brand {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
}

.sidebar-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6a7385;
}

.sidebar-step {
  margin-top: 4px;
  font-size: 13px;
  color: #3f4a5f;
}

.step-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.step-link {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #243146;
  border: 1px solid #e3e7f0;
  padding: 11px 12px;
}

.step-link.active {
  background: #0b1e4f;
  color: #fff;
  border-color: #0b1e4f;
}

.draft-btn {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid #d8deeb;
  color: #243146;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e8ebf3;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card {
  width: 100%;
  max-width: 760px;
  min-height: 220px;
}

.telegram-widget-wrap {
  margin-top: 12px;
  min-height: 48px;
}

.auth-form {
  margin-top: 12px;
}

.telegram-fallback-btn {
  display: inline-flex;
  margin-top: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #0b1e4f;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.telegram-fallback-btn:hover {
  background: #112b69;
}

.muted.small {
  margin-top: 8px;
  font-size: 13px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.content-header h2 {
  margin: 0;
}

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d8deeb;
  color: #64708a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: #fff;
}

.progress-dot.active {
  border-color: #0b1e4f;
  background: #0b1e4f;
  color: #fff;
}

.progress-line {
  width: 70px;
  height: 2px;
  background: #dfe4ef;
}

.step-card h3 {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.grid.single {
  grid-template-columns: 1fr;
}

label {
  display: block;
  margin-top: 0;
  font-weight: 600;
  font-size: 14px;
  color: #2d3950;
}

input,
textarea,
button {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #d4dae7;
  font-size: 14px;
}

button {
  background: #0b1e4f;
  color: #fff;
  cursor: pointer;
  border: none;
  font-weight: 600;
}

button:hover {
  background: #112b69;
}

button.secondary {
  background: #fff;
  color: #2f3b52;
  border: 1px solid #d4dae7;
}

.actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.status {
  margin-top: 10px;
  color: #136b52;
}

.status.error {
  color: #c0392b;
}

.muted {
  color: #65718a;
  margin: 0;
}

.hidden {
  display: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}

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

  .sidebar {
    min-height: auto;
  }

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