:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #666;
  --accent: #1787B8;
  --accent-600: #136E96;
  --border: #e6e6e6;
  --shadow: 0 10px 30px rgba(0, 0, 0, .06);
  --content-width: 1120px
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 32px 20px
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: var(--content-width);
  margin: 0 auto 24px
}

.logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: contain
}

.title {
  margin: 0;
  font-size: 28px;
  font-weight: 700
}

.subtitle {
  margin: 0;
  color: var(--muted)
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: var(--content-width);
  margin: 0 auto;
  overflow: hidden;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  /* uniform spacing between fields (rows and columns) */
}

/* Consistent vertical spacing between grid sections */
.grid+.grid {
  margin-top: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* uniform spacing between label and input */
}

label {
  display: block;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  /* normalize label line height */
}

input {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02)
}

/* Normalize form control margins so spacing relies on .field gap and .grid gap */
.field input,
.field select,
.field textarea {
  margin: 0;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent)
}

input::placeholder {
  color: #999
}


.actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .05s ease, background .2s;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent)
}

/* Ensure no underline in any link state */
.btn:link,
.btn:visited,
.btn:hover,
.btn:focus,
.btn:active {
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-600)
}

.btn:active {
  transform: translateY(1px)
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin .8s linear infinite
}

.btn.loading .spinner {
  display: inline-block
}

.btn.loading .btn-label {
  opacity: .6
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--accent)
}

.btn-outline:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent)
}

.form-message {
  min-height: 22px;
  margin: 8px 0 0 0;
  font-weight: 600
}

.form-message.error {
  color: #c62828
}

.form-message.success {
  color: #2e7d32
}

.success {
  margin-top: 20px;
  background: #f8fffe;
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow)
}

.success.hidden {
  display: none
}

.success-actions {
  margin-top: 10px
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

@media (max-width:720px) {
  .grid {
    grid-template-columns: 1fr;
    row-gap: 16px;
    /* uniform space between each field block */
    column-gap: 0;
  }

  .field {
    gap: 12px;
    /* uniform space between label and input */
  }

  /* Normalize label height inside the registration form to make every block look identical */
  #registration-form .field label {
    font-size: 14px;
    line-height: 1.2;
    min-height: calc(1.2em * 2);
    /* reserve space for 2 lines so single-line labels match spacing */
    line-clamp: 2;
    /* standard */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* limit to 2 lines on very small screens */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .actions {
    justify-content: center;
  }

  .btn {
    justify-content: center;
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn)
  }
}