@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand-primary: #26a7e8;
  --brand-primary-dk: #2b86c2;
  --brand-focus-ring: rgba(38, 167, 232, 0.22);
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-btn: 8px;
  --shadow-card: 0 20px 60px rgba(3, 10, 22, 0.52);
  --shadow-panel: 0 12px 34px rgba(3, 10, 22, 0.28);
  --color-text: #e8f2ff;
  --color-text-muted: #b8cee4;
  --color-border: rgba(132, 173, 209, 0.34);
  --color-bg-page: #081220;
  --color-bg-card: rgba(12, 27, 45, 0.92);
  --color-bg-panel: rgba(16, 33, 53, 0.92);
  --color-bg-input: #0e1d31;
  --color-bg-disabled: #182a3f;
  --color-text-disabled: #7f97b0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  background:
    radial-gradient(circle at 14% 10%, rgba(38, 167, 232, 0.24), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(43, 134, 194, 0.2), transparent 36%),
    linear-gradient(145deg, #06101d 0%, #0b1728 45%, #112741 100%);
  color: var(--color-text);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

.form-header {
  width: 100%;
  max-width: 860px;
  padding: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-logo {
  height: 52px;
  width: auto;
  display: block;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid rgba(174, 206, 236, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(7px);
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #9ab2ca;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  transition: color 0.16s ease;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.is-active {
  color: #7ed0f8;
}

.lang-separator {
  color: #7e9dbc;
}

.form-card {
  width: 100%;
  max-width: 860px;
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  animation: enter-card 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.form-card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #26a7e8 0%, #2b86c2 56%, #7bd0f7 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  margin: -36px -40px 28px;
}

@keyframes enter-card {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.75rem;
  font-weight: 700;
  color: #eaf6ff;
  letter-spacing: -0.01em;
}

.subtitle {
  margin-top: 0;
  margin-bottom: 28px;
  color: var(--color-text-muted);
  font-size: 0.97rem;
  line-height: 1.55;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #9bd8f8;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

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

.field {
  display: flex;
  flex-direction: column;
}

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

label {
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #d7e9f8;
}

.field-help {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.sms-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sms-consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--brand-primary);
}

.sms-consent-copy {
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  font-weight: 500;
}

.sms-consent-copy a {
  color: #8fd8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--color-text);
  background: var(--color-bg-input);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

select {
  color-scheme: dark;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: #84a0bc;
}

select option,
select optgroup {
  color: var(--color-text) !important;
  background: #0e1d31 !important;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-bg-disabled);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

input[readonly],
select[readonly] {
  background: var(--color-bg-disabled);
  color: #9cb5cd;
  cursor: default;
}

textarea {
  resize: vertical;
}

.dynamic-section {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.section-intro {
  margin: 0 0 18px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.business-panels,
.personal-panels,
.form1099-panels {
  display: grid;
  gap: 16px;
}

.question-panel {
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgba(11, 23, 39, 0.86);
  box-shadow: var(--shadow-panel);
}

.question-panel h3 {
  margin: 0 0 4px;
  font-size: 0.97rem;
  font-weight: 700;
  color: #ebf5ff;
}

.question-panel h3::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: linear-gradient(180deg, #26a7e8 0%, #2b86c2 100%);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.panel-copy {
  margin: 0 0 16px;
  color: var(--color-text-muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

.conditional-group {
  padding-top: 6px;
}

.nested-grid {
  gap: 16px;
}

.dependent-forms {
  display: grid;
  gap: 14px;
}

.dependent-card {
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgba(16, 31, 49, 0.84);
}

.dependent-card-title {
  margin: 0 0 12px;
  font-size: 0.93rem;
  font-weight: 600;
  color: #ddecfb;
}

.hidden {
  display: none;
}

.reserved-field-hidden {
  visibility: hidden;
}

.reserved-field-hidden > * {
  pointer-events: none;
}

button[type="submit"] {
  margin-top: 24px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-btn);
  background: linear-gradient(90deg, #26a7e8 0%, #2b86c2 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

button[type="submit"]:hover:not(:disabled) {
  background: linear-gradient(90deg, #2eb3f2 0%, #2b86c2 100%);
  box-shadow: 0 10px 26px rgba(38, 167, 232, 0.35);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  margin-top: 16px;
  min-height: 20px;
  padding: 0;
  border-radius: var(--radius-input);
  font-size: 0.91rem;
}

.form-message.success {
  color: #c7f2d7;
  background: rgba(20, 92, 46, 0.3);
  border: 1px solid rgba(110, 212, 161, 0.48);
  padding: 14px 16px;
}

.form-message.error {
  color: #ffd2d2;
  background: rgba(126, 32, 32, 0.35);
  border: 1px solid rgba(249, 168, 168, 0.52);
  padding: 14px 16px;
}

.form-message-title {
  font-weight: 700;
  margin-bottom: 5px;
}

.form-message-body {
  font-weight: 500;
  line-height: 1.45;
}

.form-message-details {
  margin: 8px 0 0;
  padding-left: 18px;
}

.form-message-details li {
  margin-bottom: 4px;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .page {
    padding: 0;
    align-items: stretch;
  }

  .form-header {
    padding: 16px 18px 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .form-logo {
    height: 40px;
  }

  .form-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 24px 18px;
    box-shadow: 0 16px 38px rgba(4, 10, 20, 0.42);
  }

  .form-card::before {
    margin: -24px -18px 22px;
  }

  .dynamic-section,
  .question-panel {
    padding: 16px;
  }

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