* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #0f172a;
  color: #f1f5f9;
  font-family: 'Segoe UI', system-ui, sans-serif;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.container {
  width: 100%;
  max-width: 580px;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.step-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.step-tab {
  flex: 1 1 0;
  min-width: 60px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: default;
}

.step-tab.active {
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  border-color: #3b82f6;
}

.step-tab.completed {
  background: #1e3a5f;
  color: #60a5fa;
  cursor: pointer;
}

.step-tab.inactive {
  background: #1e293b;
  color: #64748b;
}

.step-tab-number {
  font-size: 14px;
  margin-bottom: 2px;
}

.step-content {
  background: #1a2332;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 24px;
}

.info-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.info-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.info-card-content {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

.info-card-content a {
  color: #60a5fa;
  text-decoration: none;
}

.info-card-content strong {
  color: #f1f5f9;
}

.info-card-content em {
  font-style: italic;
}

.info-card-content code {
  color: #60a5fa;
  font-size: 12px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.input-group {
  margin-bottom: 14px;
}

.input-label {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 5px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-size: 13px;
}

.code-block-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.code-block {
  flex: 1;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid #1e293b;
}

.code-block.nowrap {
  white-space: nowrap;
  word-break: normal;
}

.code-label {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 6px;
}

button {
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  border-radius: 8px;
}

.btn-copy {
  background: #3b82f6;
  color: #fff;
  padding: 5px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.btn-copy.copied {
  background: #22c55e;
}

.btn-primary {
  width: 100%;
  padding: 12px 0;
  background: #3b82f6;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-top: 22px;
}

.btn-primary:disabled {
  background: #334155;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 20px;
  background: #7c3aed;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

.btn-back {
  padding: 10px 20px;
  border: 1px solid #334155;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-group button:not(.btn-back) {
  flex: 1;
}

.link-button {
  display: inline-block;
  margin-top: 10px;
  background: #7c3aed;
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.error-box {
  margin-top: 14px;
  background: #3b0764;
  color: #f9a8d4;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}

.success-text {
  font-size: 13px;
  color: #22c55e;
  font-weight: 700;
  margin-bottom: 10px;
}

device-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

device-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

device-name {
  font-size: 14px;
  color: #f1f5f9;
  font-weight: 600;
}

device-location {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

device-id-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

device-id {
  font-size: 12px;
  color: #60a5fa;
  background: #0f172a;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
}

mapping-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

mapping-label {
  font-size: 13px;
  color: #f1f5f9;
  font-weight: 600;
  width: 140px;
  flex-shrink: 0;
}

mapping-select {
  flex: 1;
  min-width: 200px;
  padding: 8px 10px;
  font-size: 13px;
  color: #64748b;
}

mapping-select.selected {
  color: #60a5fa;
}

@media (max-width: 600px) {
  .step-tab {
    font-size: 10px;
    padding: 6px 2px;
  }
  
  .mapping-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .mapping-label {
    width: 100%;
  }
  
  .mapping-select {
    width: 100%;
  }
}