:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #101828;
  --muted: #4a5565;
  --accent: #155dfc;
  --accent-dark: #1447e6;
  --line: #d9e0ea;
  --success: #008138;
  --error: #bf000f;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 92% 0%, rgba(103, 232, 249, 0.26), transparent 30%),
    linear-gradient(180deg, #eef7ff 0%, var(--bg) 45%, #f9fafb 100%);
  font-family: ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
.secondary-button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

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

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100vw;
  max-width: none;
  height: 56px;
  min-height: 56px;
  margin: -24px 0 24px calc(50% - 50vw);
  padding: 0 max(16px, calc((100vw - 980px) / 2));
  border: 0;
  border-bottom: 1px solid #111827;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.card h2 {
  margin: 0;
}

.hero > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.hero .eyebrow {
  display: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.card {
  padding: 24px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #d1d5dc;
  border-radius: 6px;
  padding: 6px 12px;
  background: #ffffff;
  color: #364153;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}

.secondary-button:hover {
  background: #f9fafb;
  color: #101828;
}

.icon-link {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #101828;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.brand-link:hover {
  color: #1447e6;
}

.brand-logo {
  width: 22px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.card-header {
  margin-bottom: 16px;
}

.card-header-copy {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

label,
legend {
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 104px;
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(21, 93, 252, 0.16);
}

fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 10px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.checkbox-item input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.hidden-submenu {
  display: none;
}

.consent-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.consent-box summary {
  cursor: pointer;
  font-weight: 700;
}

.consent-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.consent-text p {
  margin: 0 0 10px;
}

.secondary-button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent);
}

button:hover {
  background: var(--accent-dark);
}

.secondary-button:hover {
  border-color: var(--accent);
  background: #eef4ff;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.hero .secondary-button {
  min-height: 34px;
  border: 1px solid #d1d5dc;
  border-radius: 6px;
  padding: 6px 12px;
  background: #ffffff;
  color: #364153;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: none;
}

.hero .secondary-button:hover {
  background: #f9fafb;
  color: #101828;
}

.hero .icon-link {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--error);
}

.toast-message {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #101828;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.22);
}

.toast-message.hidden {
  display: none;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 980px);
    padding-top: 24px;
  }

  .hero {
    align-items: center;
    flex-direction: row;
    padding: 0 16px;
  }

  .brand-link span {
    display: none;
  }

  .card {
    padding: 18px;
  }

  .form-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
