/* Reset + base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(180deg, #f5f7fb 0%, #e8edf5 100%);
  color: #1a2332;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 30, 60, 0.08), 0 2px 8px rgba(15, 30, 60, 0.04);
  max-width: 480px;
  width: 100%;
  padding: 32px 24px 24px;
}

.hero { margin-bottom: 28px; text-align: left; }
.brand {
  display: inline-block;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: #eff4ff;
  border-radius: 999px;
}
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #0f1e3a;
  line-height: 1.2;
}
.lead { color: #4a5568; margin: 0; font-size: 15px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a2332;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d4dbe5;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #1a2332;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.field input::placeholder { color: #9aa5b8; }
.field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.field input:invalid:not(:placeholder-shown) { border-color: #e53e3e; }
.field input:valid:not(:placeholder-shown) { border-color: #38a169; }

/* phone input con prefijo */
.phone-input {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #d4dbe5;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.phone-input:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #f3f5f9;
  color: #4a5568;
  font-size: 15px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border-right: 1.5px solid #d4dbe5;
  white-space: nowrap;
  user-select: none;
}
.phone-input input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.phone-input input:focus { outline: none; }
.phone-input input:invalid:not(:placeholder-shown) { background: #fff5f5; }
.phone-input input:valid:not(:placeholder-shown) { background: #f0fbf4; }

/* hint */
.hint {
  display: block;
  margin-top: 6px;
  color: #6b7787;
  font-size: 12px;
}

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  font-family: inherit;
  margin-top: 6px;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #93b0e6; cursor: not-allowed; }

.status {
  margin-top: 14px;
  padding: 0;
  font-size: 14px;
  text-align: center;
  min-height: 1.2em;
  color: #4a5568;
}
.status.success { color: #166534; font-weight: 600; }
.status.error { color: #b91c1c; font-weight: 600; }

.site-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e8edf5;
  text-align: center;
  font-size: 12px;
  color: #6b7787;
}
.site-footer a { color: #2563eb; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { color: #9aa5b8; }

@media (max-width: 380px) {
  .card { padding: 24px 18px 18px; border-radius: 12px; }
  .hero h1 { font-size: 24px; }
}
