:root {
  --bg: #2f2f2f;
  --panel: #ffffff;
  --footer: #303840;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #c8cdd4;
  --field-bg: #eef2ff;
  --field-border: #d6dcff;
  --blue: #006fe6;
  --yellow: #ffd400;
  --success: #20a95a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-logo-wrap {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 10;
}

.page-logo {
  height: 48px;
  width: auto;
  display: block;
}

/* Concentric arcs */
body::before,
body::after {
  content: "";
  position: fixed;
  left: 50%;
  bottom: -520px;
  width: 720px;
  height: 720px;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  bottom: -400px;
  width: 480px;
  height: 480px;
  border-color: #0096ff;
}

.card {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  overflow: hidden;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .3);
}

.card-header {
  padding: 18px 16px 14px;
  background: linear-gradient(#f2f2f2, #ffffff);
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

form {
  padding: 22px 28px 22px;
}

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

/* Default 3-column row → each .field spans 4 of 12 */
.field { grid-column: span 4; position: relative; min-width: 0; padding-top: 18px; }
/* Email is wider, prefijo narrower, teléfono normal */
.field-wide { grid-column: span 5; }
.field.field-wide + .field { grid-column: span 3; } /* prefijo narrow */
.field.field-wide + .field + .field { grid-column: span 4; } /* teléfono */
.field-full { grid-column: 1 / -1; }

input,
select {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 1.5px solid var(--field-border);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  appearance: none;
  -webkit-appearance: none;
}

select {
  padding: 0 36px 0 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231f2937' d='M1.41 0L6 4.59 10.59 0 12 1.41l-6 6-6-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Floating label — sits inside input when empty, floats above on focus/fill */
.field > label {
  position: absolute;
  left: 18px;
  top: 33px;                 /* vertically centered inside the input (18 padding + ~15) */
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
  transition: top .15s ease, left .15s ease, font-size .15s ease, color .15s ease, font-weight .15s ease;
  background: transparent;
}

/* Floated state — pops ABOVE the input */
.field > input:focus ~ label,
.field > input:not(:placeholder-shown) ~ label,
.field > select:focus ~ label,
.field > label.static-label {
  top: 6px;
  transform: none;
  font-size: 12px;
  color: var(--blue);
  font-weight: 700;
  left: 4px;
}

.field > label.static-label { color: var(--muted); font-weight: 600; }

/* Focus ring */
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 111, 230, .12);
  background: #f6f8ff;
}

/* Privacy */
.privacy {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 18px;
  color: #334155;
  font-size: 14.5px;
}

.privacy input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex: 0 0 auto;
  appearance: auto;
  -webkit-appearance: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0;
}

.privacy a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

/* Footer actions */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  background: var(--footer);
}

button {
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.cancel {
  border: 1px solid rgba(255, 255, 255, .55);
  background: transparent;
  color: white;
}

.submit {
  border: 0;
  background: #cbd5e1;
  color: #475569;
}

.submit:enabled {
  background: var(--blue);
  color: white;
}

/* Success message */
.success {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 18px 28px 0;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #ecfdf3;
  color: #166534;
  font-weight: 700;
}

.success.show { display: flex; }

.tick {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-weight: 900;
}

/* Responsive */
@media (max-width: 820px) {
  body { padding: 14px; }
  .field, .field-wide,
  .field.field-wide + .field,
  .field.field-wide + .field + .field {
    grid-column: 1 / -1;
  }
  form { padding: 18px 16px 18px; }
  .success { margin: 16px 16px 0; }
  .page-logo { height: 38px; }
}
