@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #ececec;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --ink: #1f2d44;
  --muted: #6f7785;
  --accent: #d91505;
  --accent-strong: #a90700;
  --accent-soft: #f7d8d4;
  --success: #2f8f4e;
  --success-soft: #e3f3e8;
  --warning: #f7d9d4;
  --warning-ink: #8b2f1f;
  --line: rgba(31, 45, 68, 0.14);
  --shadow: 0 18px 42px rgba(28, 37, 58, 0.08);
  --radius-xl: 6px;
  --radius-lg: 4px;
  --radius-md: 2px;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #dadde1 0, #f2f3f5 108px, var(--bg) 108px),
    linear-gradient(180deg, #f5f6f8 0%, var(--bg) 100%);
}

.page-shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero-card,
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
  border-top: 4px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(229, 232, 236, 0.75) 0, rgba(255, 255, 255, 0.96) 56%),
    var(--surface);
}

.hero-copy h1 {
  margin: 0.75rem 0 0.5rem;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.hero-copy p,
.panel-card p,
.message-panel p,
.field-card small,
.selected-member span,
.stepper span {
  color: var(--muted);
}

.language-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-lg);
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 700;
}

.status-pill-online {
  background: rgba(47, 143, 78, 0.12);
  color: #2b6e42;
}

.status-pill-offline {
  background: var(--warning);
  color: var(--warning-ink);
}

.wizard-shell {
  display: grid;
  gap: 1.25rem;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.stepper li {
  position: relative;
  padding: 0.9rem 0.15rem 0.35rem;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  border-top: 1px solid rgba(31, 45, 68, 0.18);
  box-shadow: none;
  pointer-events: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.stepper li.active {
  border-top-color: rgba(217, 21, 5, 0.4);
  background: transparent;
  box-shadow: none;
}

.stepper li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 44px;
  height: 3px;
  background: rgba(31, 45, 68, 0.16);
}

.stepper li.active::before {
  background: var(--accent);
}

.stepper strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.stepper span {
  display: block;
  font-size: 0.85rem;
}

.stepper li.active strong {
  color: var(--ink);
}

.stepper li.active span {
  color: var(--accent-strong);
}

.message-panel,
.panel-card {
  border-radius: var(--radius-xl);
}

.message-panel {
  padding: 1rem 1.2rem;
}

.error-panel {
  background: var(--warning);
  color: var(--warning-ink);
}

.panel-card {
  padding: 1.8rem;
  border-top: 3px solid var(--accent);
}

.panel-card h2 {
  margin-top: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}

.field-card,
.selected-member,
.success-grid div {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.field-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem;
  font-weight: 700;
}

.field-card-full {
  grid-column: 1 / -1;
}

.selected-member {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.selected-member strong {
  display: block;
  font-size: 1.1rem;
}

.form-control,
.form-select {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 45, 68, 0.18);
  padding: 0.85rem 0.95rem;
  background-color: #fff;
}

.form-control:focus,
.form-select:focus,
.primary-button:focus,
.secondary-button:focus,
.language-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(217, 21, 5, 0.12);
  border-color: rgba(217, 21, 5, 0.35);
  outline: none;
}

.button-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(217, 21, 5, 0.18);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.language-link:hover {
  transform: translateY(-1px);
}

.primary-button[disabled] {
  opacity: 0.45;
  transform: none;
}

.validation-summary ul {
  margin: 0 0 1rem;
  padding-left: 1rem;
  color: var(--warning-ink);
}

.validation-text {
  font-size: 0.9rem;
  color: var(--warning-ink);
}

.success-card {
  position: relative;
  overflow: hidden;
  border-top-color: var(--success);
}

.success-card::after {
  content: "";
  position: absolute;
  inset: auto -5rem -5rem auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 143, 78, 0.12), transparent 70%);
}

.success-banner {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(47, 143, 78, 0.3);
  border-left: 6px solid var(--success);
  background: var(--success-soft);
  color: #1f6d3a;
  border-radius: var(--radius-lg);
  font-weight: 700;
}

.success-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.success-grid div {
  padding: 1rem;
}

.success-grid dt {
  color: var(--muted);
  font-size: 0.95rem;
}

.success-grid dd {
  margin: 0.45rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.success-grid-full {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 1rem, 1080px);
    padding-top: 1rem;
  }

  .hero-card,
  .selected-member,
  .form-grid,
  .success-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    position: relative;
    padding: 1.4rem;
  }

  .language-switch {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .hero-copy {
    padding-top: 2.6rem;
  }

  .stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .stepper li {
    padding: 0.55rem 0.15rem 0.2rem;
  }

  .stepper li::before {
    width: 28px;
    height: 2px;
  }

  .stepper span {
    font-size: 0.72rem;
  }

  .stepper strong {
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .panel-card {
    padding: 1.3rem;
  }

  .panel-card h2 {
    font-size: 1.65rem;
  }
}
