:root {
  --bg: rgb(254, 247, 255);
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1ea7ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  width: 100%;
  padding: 0;
}

.card {
  width: 100%;
  min-height: 100vh;
  background: var(--card);
  border-radius: 0;
  padding: 34px 42px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

h1 { margin: 0; font-size: 34px; font-weight: 700; color: #1E5E8E; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.legal-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #0369a1;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: 8px;
  padding: 8px 10px;
}
.legal-link:hover { background: #e0f2fe; }
.note {
  margin-top: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}
.center-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-10vh);
}
.form-shell {
  width: 875px; /* 250 + 125 + 500 */
  max-width: 100%;
}
.small-note {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}
.small-note a {
  color: #0369a1;
  text-decoration: none;
}
.small-note a:hover {
  text-decoration: underline;
}
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.field.grow { flex: 1; }
.row-center {
  justify-content: flex-start;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 125px; /* half of 5-digit width (250 / 2) */
}
.code-field {
  width: 250px;
  min-width: 250px;
}
.url-field {
  width: 500px;
  min-width: 500px;
}
label { font-weight: 600; color: var(--muted); }
.field label { text-align: center; }
input, select {
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 16px;
}
.actions { margin-top: 22px; display: flex; justify-content: flex-end; }
.actions-right {
  justify-content: flex-end;
}
button {
  background: var(--primary);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
}
.status { min-height: 24px; margin-top: 16px; color: var(--muted); }
.status.error { color: #b91c1c; }
.status.ok { color: #0f766e; }
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.status {
  margin: 0;
  text-align: right;
}
.footer-links {
  margin-top: 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a {
  color: #0369a1;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .card {
    padding: 24px 16px;
  }
  .top-bar h1 { font-size: 30px; }
  .brand-icon {
    width: 28px;
    height: 28px;
  }
  .center-stage { transform: translateY(-4vh); }
  .row-center {
    flex-wrap: wrap;
    gap: 16px;
  }
  .code-field,
  .url-field {
    width: 100%;
    min-width: 220px;
  }
  .form-shell {
    width: 100%;
  }
  .bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .status {
    text-align: left;
  }
}
