:root {
  --ink: #141414;
  --muted: #5c5c5c;
  --paper: #fafafa;
  --card: #ffffff;
  --line: #e6e6e6;
  --accent: #c62828;
  --accent-dark: #9a1c1c;
  --ok: #2e7d32;
  --shadow: 0 12px 40px rgba(20, 20, 20, 0.08);
  --radius: 18px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Space Grotesk", "Manrope", sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(198, 40, 40, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(20, 20, 20, 0.06), transparent 50%),
    linear-gradient(180deg, #f3f3f3 0%, #fafafa 40%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bg-glow { display: none; }

.installer {
  width: min(720px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(20, 20, 20, 0.06);
  overflow: hidden;
  animation: rise 0.45s ease-out;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.installer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}

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

.logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  object-fit: contain;
  background: transparent;
}

.logo h1 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.steps { display: flex; gap: 6px; }

.steps .step {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: #f0f0f0;
  color: #999;
  transition: 0.25s ease;
}

.steps .step.active {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.steps .step.done {
  background: var(--ok);
  color: #fff;
}

.installer-content {
  padding: 36px 28px 28px;
  min-height: 420px;
}

.installer-content h2 {
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.subtitle, .description {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}

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

.buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-secondary { background: #f0f0f0; color: var(--ink); }
.btn-secondary:hover { background: #e4e4e4; }
.btn-success { background: var(--ok); color: #fff; }

.requirements { list-style: none; margin: 8px 0 0; }
.requirements li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.requirements .status.ok { color: var(--ok); font-weight: 700; }
.requirements .status.bad { color: var(--accent); font-weight: 700; }
.requirements .status.opt { color: var(--muted); }

.hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f7f7;
  color: var(--muted);
  font-size: 13px;
}
.hint.ok { background: #e8f5e9; color: var(--ok); }
.hint.err { background: #ffebee; color: var(--accent); }

.progress-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 12px;
}
.progress-fill {
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, var(--accent), #e57373);
  border-radius: inherit;
  transition: width 0.35s ease;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

.install-logs {
  max-height: 220px;
  overflow: auto;
  background: #141414;
  color: #e8e8e8;
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
}
.install-logs .log-line.err { color: #ff8a80; }
.install-logs .log-line.ok { color: #a5d6a7; }

.complete-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0 8px;
  background: #fcfcfc;
}
.complete-card dt { font-size: 12px; color: var(--muted); margin-top: 8px; }
.complete-card dd { font-weight: 600; word-break: break-all; }

.installer-footer {
  padding: 14px 28px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.locked {
  text-align: center;
  padding: 24px 8px;
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .installer-content { padding: 28px 18px; }
  .installer-header { padding: 18px; }
}

.salon-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
@media (max-width: 720px) {
  .salon-type-grid { grid-template-columns: 1fr; }
}
.salon-type-card {
  border: 2px solid #E5E0D8;
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
  text-align: center;
}
.salon-type-card:hover {
  border-color: #C9A961;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.salon-type-card.active {
  border-color: #2F6F68;
  background: rgba(47,111,104,0.04);
  box-shadow: 0 0 0 3px rgba(47,111,104,0.1);
}
.salon-type-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}
.salon-type-label {
  font-weight: 600;
  font-size: 14px;
  color: #2B2B2B;
  margin-bottom: 6px;
}
.salon-type-desc {
  font-size: 12px;
  color: #8B8178;
  line-height: 1.4;
}
