:root {
  --program-primary-color: #7c14ff;
  --program-primary-color-hover: #650fd4;
  --program-primary-text-color: #ffffff;
  --form-accent: var(--program-primary-color);
  --form-accent-hover: var(--program-primary-color-hover);
  --form-accent-text: var(--program-primary-text-color);
  --yellow: #ffcf00;
  --ink: #0f172a;
  --muted: #667085;
  --line: #ece7d6;
  --panel: #ffffff;
  --danger: #b42318;
  --success: #087443;
  --forms-background-image: url("assets/registration_background.png");
  --forms-background-mobile-image: url("assets/login_background_mobile.png");
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #fff;
}

button,
input,
select {
  font: inherit;
}

.forms-layout {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background-image: var(--forms-background-image);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-color: color-mix(in srgb, var(--form-accent) 72%, #ffffff);
}

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

.form-page-brand {
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-logo-stage {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 0.2rem 1.1rem 0;
  border-radius: 28px;
}

.login-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 1rem;
  border-radius: 20px;
  overflow: hidden;
}

.login-logo-image {
  display: block;
  width: min(100%, 720px);
  height: auto;
  max-height: 220px;
  object-fit: contain;
}

.form-panel {
  overflow: hidden;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(12, 28, 45, 0.1);
}

.form-inner {
  padding: 2rem;
}

.catalog-month-kicker,
.section-header-kicker {
  display: block;
  margin-bottom: 4px;
  color: rgba(17, 24, 39, 0.54);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.question-index-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
}

.question-index-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.form-section {
  display: grid;
  gap: 20px;
  margin-top: 2rem;
}

.section-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 30px;
  border: 1px solid #eadb9f;
  border-left: 8px solid var(--yellow);
  border-radius: 22px;
  background: linear-gradient(110deg, #fffdf4, #ffffff 72%, #fff8d5);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.section-header-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.section-header-description {
  margin: 0.7rem 0 0;
  color: #344054;
  font-weight: 600;
}

.section-header-count {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #f4df8a;
  border-radius: 999px;
  color: #d9a500;
  background: #fffdf2;
  font-weight: 900;
  white-space: nowrap;
}

.question-grid {
  display: grid;
  gap: 16px;
}

.question-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.045);
}

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

.institution-details {
  display: grid;
  gap: 16px;
}

.compact-header {
  padding: 20px 24px;
}

.question-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
}

.question-card label b {
  color: #ef4444;
}

.field-message {
  min-height: 18px;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.field-message.success {
  color: #027a48;
}

.field-message.danger {
  color: #b42318;
}

.field-message.warn {
  color: #b54708;
}

.password-strength {
  display: grid;
  gap: 8px;
}

.password-strength-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.password-strength-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #d0d5dd;
  transition:
    width 0.18s ease,
    background 0.18s ease;
}

.password-strength p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.password-strength[data-level="weak"] .password-strength-bar span {
  background: #f04438;
}

.password-strength[data-level="weak"] p {
  color: #b42318;
}

.password-strength[data-level="medium"] .password-strength-bar span {
  background: #f79009;
}

.password-strength[data-level="medium"] p {
  color: #b54708;
}

.password-strength[data-level="strong"] .password-strength-bar span {
  background: #12b76a;
}

.password-strength[data-level="strong"] p {
  color: #027a48;
}

.address-preview {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8e0ea;
  border-radius: 16px;
  background: #f8fafc;
}

.address-preview-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.address-preview dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.address-preview div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.address-preview dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.address-preview dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.address-manual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
}

.address-manual div {
  display: grid;
  gap: 10px;
}

.address-manual label {
  gap: 6px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
}

.optional-check-row {
  position: relative;
  display: inline-flex !important;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  gap: 9px !important;
  color: #344054 !important;
  font-size: 0.94rem;
  font-weight: 800 !important;
  cursor: pointer;
}

.optional-check-row input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--form-accent);
  background: color-mix(in srgb, var(--form-accent) 10%, white);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.info-tooltip:focus {
  outline: 2px solid color-mix(in srgb, var(--form-accent) 45%, white);
  outline-offset: 2px;
}

.tooltip-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: min(290px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #344054;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.info-tooltip:hover .tooltip-panel,
.info-tooltip:focus .tooltip-panel {
  opacity: 1;
  transform: translate(-50%, 0);
}

.social-name-field {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.social-name-field label {
  color: #344054;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 49px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

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

.searchable-select {
  position: relative;
}

.searchable-select input:disabled {
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}

.searchable-select-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.searchable-select.is-open .searchable-select-list {
  display: grid;
}

.searchable-select-option {
  width: 100%;
  min-height: 42px;
  border: 0;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--form-accent) 10%, #ffffff);
}

.searchable-select-empty {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 700;
}

.coupon-helper {
  margin: -2px 0 0;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
}

.coupon-helper b {
  color: var(--ink);
  font-weight: 900;
}

.native-city-select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary {
  min-width: 200px;
  color: var(--form-accent-text);
  background: var(--form-accent);
}

.btn-primary:hover {
  background: var(--form-accent-hover);
}

.btn-secondary {
  color: var(--form-accent);
  background: color-mix(in srgb, var(--form-accent) 9%, white);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-weight: 600;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.flow-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--form-accent) 22%, var(--line));
  border-left: 6px solid var(--form-accent);
  border-radius: 18px;
  color: #17406f;
  background: color-mix(in srgb, var(--form-accent) 8%, white);
}

.flow-box.full {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.flow-box-message {
  margin: 0;
  font-weight: 650;
  line-height: 1.45;
}

.flow-box-title {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.flow-class-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.flow-class-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.flow-class-row dt {
  color: #344054;
  font-weight: 700;
}

.flow-class-row dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
}

.flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flow-actions .btn-primary,
.flow-actions .btn-secondary {
  min-width: 0;
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 700;
}

.form-notice,
.alert {
  border-radius: 16px;
  padding: 13px 15px;
  font-size: 0.92rem;
  font-weight: 800;
}

.form-notice {
  color: #17406f;
  background: color-mix(in srgb, var(--form-accent) 8%, white);
}

.alert-stack {
  display: grid;
  gap: 10px;
}

.alert.success,
.submit-message.success {
  color: var(--success);
}

.alert.success {
  background: #ecfdf3;
}

.alert.danger,
.submit-message.danger {
  color: var(--danger);
}

.alert.danger {
  background: #fef3f2;
}

.alert.warn {
  color: #9a3412;
  background: #fff7ed;
}

.hidden {
  display: none !important;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.submit-message {
  min-height: 22px;
  color: var(--muted);
  font-weight: 900;
}

.success-screen {
  display: grid;
  gap: 24px;
}

.success-hero {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 32px;
  border: 1px solid #b7ebc6;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(135deg, #ecfdf3, #ffffff 74%);
}

.success-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--success);
  background: #dcfae6;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.success-hero-btn {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 32px;
  border-radius: 22px;
  text-align: center;
}

.success-hero h2 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
  font-weight: 950;
}

.success-hero p {
  max-width: 680px;
  margin: 0;
  color: #344054;
  font-weight: 700;
  line-height: 1.55;
}

.success-scroll-note {
  padding: 12px 14px;
  border-radius: 14px;
  color: #087443 !important;
  background: #f0fdf4;
  font-weight: 900 !important;
}

.success-infographic {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.success-infographic img {
  display: block;
  width: 100%;
  height: auto;
}

.success-footer-action {
  display: grid;
}

.success-action {
  width: 100%;
  text-decoration: none;
}

@media (max-width: 920px) {
  .question-grid.two,
  .terms-grid,
  .address-preview dl,
  .address-manual {
    grid-template-columns: 1fr;
  }

  .section-header-card,
  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

}

@media (max-width: 640px) {
  .forms-layout {
    background-image: var(--forms-background-mobile-image);
    background-attachment: scroll;
  }

  .page-shell {
    width: min(100% - 18px, 1120px);
    padding-top: 1.1rem;
  }

  .login-logo-frame {
    min-height: 140px;
  }

  .form-inner {
    padding: 1.15rem;
  }

  .form-panel {
    border-radius: 22px;
  }

  .section-header-card,
  .question-card {
    border-radius: 18px;
  }

  .inline-action {
    grid-template-columns: 1fr;
  }

  .flow-actions {
    display: grid;
  }

  .flow-class-row {
    grid-template-columns: 1fr;
  }
}
