#tab2 {
  padding-top: 34px;
}

#tab2[hidden] {
  display: none;
}

/* ─── Heading ─── */
#tab2 .tab-two-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 6px;
  margin-bottom: 26px;
}

#tab2 .tab-two-back {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0;
  background: var(--bg-card);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 150ms ease, border-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

#tab2 .tab-two-back:active {
  background: var(--accent-faint);
  border-color: rgba(0, 230, 118, 0.4);
}

#tab2 .tab-two-back .icon {
  width: 26px;
  height: 26px;
}

#tab2 h1 {
  margin: 0;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

/* ─── Form ─── */
#tab2 .tab-two-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
}

#tab2 .tab-two-field {
  width: 100%;
  min-height: 62px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--bg-card);
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px;
  padding: 0 14px 0 16px;
  transition: border-color 180ms ease, background 180ms ease;
}

#tab2 .tab-two-field:focus-within {
  border-color: rgba(0, 230, 118, 0.4);
  background: var(--bg-elevated);
}

#tab2 .tab-two-customized {
  cursor: pointer;
  z-index: 1;
}

#tab2 .tab-two-customized.open {
  z-index: 40;
}

#tab2 .tab-two-customized select {
  display: none;
}

#tab2 .tab-two-select-trigger {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

#tab2 .tab-two-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  max-height: 220px;
  border: 1.5px solid rgba(0, 230, 118, 0.2);
  border-radius: 16px;
  padding: 6px;
  background: rgba(14, 26, 34, 0.98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
}

#tab2 .tab-two-customized.open .tab-two-select-menu {
  display: grid;
  gap: 2px;
}

#tab2 .tab-two-select-option {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 400;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

#tab2 .tab-two-select-option:hover,
#tab2 .tab-two-select-option.active {
  background: var(--accent-faint);
  color: var(--accent);
}

/* ─── Error State ─── */
#tab2 .tab-two-field.field-error {
  border-color: var(--red);
  background: rgba(255, 61, 110, 0.05);
  animation: tab2FieldShake 240ms ease;
}

#tab2 .tab-two-field.field-error,
#tab2 .tab-two-field.field-error .tab-two-field-icon,
#tab2 .tab-two-field.field-error .tab-two-select-icon,
#tab2 .tab-two-field.field-error input,
#tab2 .tab-two-field.field-error select,
#tab2 .tab-two-field.field-error .tab-two-phone-prefix {
  color: var(--red);
}

#tab2 .tab-two-field-icon {
  color: var(--accent);
  width: 26px;
  height: 26px;
  justify-self: center;
  opacity: 0.8;
}

#tab2 .tab-two-select-icon {
  color: var(--ink-3);
  width: 26px;
  height: 26px;
  justify-self: end;
  pointer-events: none;
  transition: transform 200ms ease;
}

#tab2 .tab-two-customized.open .tab-two-select-icon {
  transform: rotate(180deg);
}

#tab2 select,
#tab2 input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  outline: none;
  letter-spacing: 0;
}

#tab2 select {
  appearance: none;
  cursor: pointer;
}

#tab2 input::placeholder {
  color: var(--ink-3);
  font-weight: 300;
  opacity: 1;
}

#tab2 .tab-two-phone-field {
  grid-template-columns: 46px auto minmax(0, 1fr);
}

#tab2 .tab-two-phone-prefix {
  color: var(--ink-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
}

/* ─── Continue Button ─── */
#tab2 .tab-two-action {
  width: 100%;
  min-height: 60px;
  margin-top: 28px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #071210;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 24px rgba(0, 230, 118, 0.28), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  transition: transform 120ms ease, box-shadow 120ms ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

#tab2 .tab-two-action::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, transparent 60%);
}

#tab2 .tab-two-action:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 2px 12px rgba(0, 230, 118, 0.2);
}

@keyframes tab2FieldShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

@media (max-width: 360px) {
  #tab2 { padding-top: 28px; }
  #tab2 h1 { font-size: 20px; }
  #tab2 select, #tab2 input, #tab2 .tab-two-phone-prefix { font-size: 17px; }
  #tab2 .tab-two-form { padding: 0; }
}
