/* ==============================================
   AutoCon 5 SDD Workshop - Registration + Login
   Palette: #271d48 (dark) / #4754a0 (blue) / #e5e7f5 (light) / #ea5c40 (coral)
   ============================================== */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: #271d48;
}

[hidden] { display: none !important; }

.highlight {
  background: linear-gradient(135deg, #ea5c40 0%, #f07a62 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.req { color: #ea5c40; font-weight: 700; }

/* =====================================================
   Workshop badge (used at top of register page)
   ===================================================== */

.workshop-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(10px);
  margin-bottom: 1.75rem;
}

.workshop-badge i { color: #ea5c40; }

/* =====================================================
   Shared form bits (inputs, alerts, buttons)
   ===================================================== */

.error-alert, .success-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.error-alert {
  background: rgba(234, 92, 64, 0.1);
  border: 1px solid rgba(234, 92, 64, 0.3);
  color: #c44327;
  animation: shake 0.5s ease-in-out;
}

.success-alert {
  background: rgba(31, 107, 55, 0.08);
  border: 1px solid rgba(31, 107, 55, 0.25);
  color: #1f6b37;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.input-group { display: flex; flex-direction: column; gap: 0.45rem; }

.input-group > label, .input-group > legend {
  font-size: 0.88rem;
  font-weight: 600;
  color: #271d48;
}

.input-field { position: relative; }

.input-field > i:first-child {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #4754a0;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.3s ease;
}

.input-field input,
.input-field select {
  width: 100%;
  padding: 0.875rem 2.75rem 0.875rem 2.75rem;
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #271d48;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(39, 29, 72, 0.06);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.input-field input::placeholder { color: #a0a5c0; }

.input-field input:focus,
.input-field select:focus {
  outline: none;
  border-color: #4754a0;
  box-shadow: 0 0 0 4px rgba(71, 84, 160, 0.15);
}

.input-field:focus-within > i:first-child { color: #ea5c40; }

.input-field input.invalid,
.input-field select.invalid {
  border-color: #ea5c40;
  box-shadow: 0 0 0 4px rgba(234, 92, 64, 0.12);
}

.input-field input.valid,
.input-field select.valid {
  border-color: #2f9e4f;
  box-shadow: 0 0 0 4px rgba(47, 158, 79, 0.12);
}

.input-field.select .select-caret {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #4754a0;
  pointer-events: none;
  font-size: 0.8rem;
}

.field-status {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.field-status.checking {
  border: 2px solid rgba(71, 84, 160, 0.25);
  border-top-color: #4754a0;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.field-status.ok::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #2f9e4f;
}

.field-status.bad::before {
  content: "\f057";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #ea5c40;
}

.field-error {
  color: #c44327;
  font-size: 0.8rem;
  min-height: 1rem;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 1rem;
  margin-top: 1.25rem;
  background: linear-gradient(135deg, #ea5c40 0%, #d44a2e 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(234, 92, 64, 0.35);
  font-family: inherit;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(234, 92, 64, 0.45);
}

.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.submit-btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   REGISTER — centered page layout
   ===================================================== */

.register-body {
  background:
    radial-gradient(circle at 20% -10%, rgba(234, 92, 64, 0.10), transparent 40%),
    radial-gradient(circle at 120% 20%, rgba(71, 84, 160, 0.18), transparent 45%),
    #e5e7f5;
  min-height: 100vh;
}

.register-header {
  background: linear-gradient(135deg, #271d48 0%, #1a1230 60%, #4754a0 100%);
  color: #ffffff;
}

.register-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.register-header-logo { height: 32px; width: auto; }

.register-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.register-hero {
  text-align: center;
  margin-bottom: 28px;
}

.register-hero .workshop-badge {
  color: #271d48;
  background: rgba(71, 84, 160, 0.12);
  border-color: rgba(71, 84, 160, 0.25);
}

.register-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #271d48;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.register-hero-tagline {
  color: #271d48;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  letter-spacing: 0.2px;
}

.register-hero-tagline strong {
  background: linear-gradient(135deg, #4754a0 0%, #323d80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-hero-sub {
  color: #4754a0;
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto;
}

.register-card {
  background: #ffffff;
  border: 1px solid #d8deea;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(39, 29, 72, 0.08);
  padding: 32px;
}

.register-card-header {
  margin-bottom: 20px;
  text-align: center;
}

.register-card-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  color: #271d48;
}

.register-card-header p {
  margin: 0;
  color: #5b6473;
  font-size: 0.9rem;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.checkbox-group {
  border: 1px solid #d8deea;
  border-radius: 14px;
  padding: 18px 20px 18px;
  margin: 0;
  background: #f8faff;
}

.checkbox-group legend {
  padding: 0 6px;
  margin-left: -6px;
}

.field-hint {
  margin: 4px 0 12px;
  font-size: 0.82rem;
  color: #5b6473;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.checkbox-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #d8deea;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.checkbox-pill:hover {
  border-color: #4754a0;
  background: #f8faff;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #c2c8e0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.checkbox-box i { opacity: 0; }

.checkbox-pill input:checked ~ .checkbox-box {
  background: linear-gradient(135deg, #ea5c40, #d44a2e);
  border-color: #ea5c40;
}

.checkbox-pill input:checked ~ .checkbox-box i { opacity: 1; }

.checkbox-pill input:checked ~ .checkbox-label {
  color: #271d48;
  font-weight: 600;
}

.checkbox-label { color: #4754a0; line-height: 1.3; }

.checkbox-pill.invalid { border-color: #ea5c40; box-shadow: 0 0 0 3px rgba(234, 92, 64, 0.12); }

.form-fineprint {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #5b6473;
}

.register-footer {
  text-align: center;
  margin-top: 28px;
  color: #4754a0;
  font-size: 0.8rem;
}

/* =====================================================
   Capacity-full modal
   ===================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 11, 36, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #ffffff;
  max-width: 460px;
  width: 100%;
  padding: 32px 28px 28px;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea5c40, #d44a2e);
  color: #ffffff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  color: #271d48;
}

.modal p {
  margin: 0 0 20px;
  color: #4754a0;
  line-height: 1.55;
  font-size: 0.95rem;
}

.modal-actions { display: flex; justify-content: center; }

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #4754a0, #323d80);
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(71, 84, 160, 0.35);
}

/* =====================================================
   Status pages (confirmed / confirm_error)
   ===================================================== */

.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #271d48 0%, #1a1230 50%, #4754a0 100%);
}

.status-card {
  background: #e5e7f5;
  max-width: 600px;
  width: 100%;
  padding: 2.8rem 2.4rem;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.status-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #ffffff;
}

.status-icon.success { background: linear-gradient(135deg, #2f9e4f 0%, #1f6b37 100%); }
.status-icon.error { background: linear-gradient(135deg, #ea5c40 0%, #d44a2e 100%); }

.status-card h1 {
  margin: 0 0 0.75rem;
  font-size: 1.7rem;
  color: #271d48;
}

.status-card > p {
  margin: 0 0 1.5rem;
  color: #4754a0;
  font-size: 1rem;
  line-height: 1.55;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, #ea5c40 0%, #d44a2e 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(234, 92, 64, 0.35);
}

/* =====================================================
   Credential block (shown on /confirm success)
   ===================================================== */

.credential-block {
  margin: 22px auto 18px;
  max-width: 520px;
  text-align: left;
  background: #f8faff;
  border: 1px solid #d8deea;
  border-radius: 12px;
  overflow: hidden;
}

.credential-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e7f5;
}

.credential-row:last-child { border-bottom: none; }

.credential-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #4754a0;
  font-weight: 700;
}

.credential-value {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  color: #271d48;
  word-break: break-all;
  text-decoration: none;
}

a.credential-value:hover { color: #4754a0; }

.modal-note {
  display: block;
  margin-top: 8px;
  color: #5b6473;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 700px) {
  .row-2 { grid-template-columns: 1fr; }
  .register-card { padding: 22px 18px; }
  .register-hero h1 { font-size: 1.6rem; }
}

/* =====================================================
   LOGIN — two-panel layout (reused from original)
   ===================================================== */

.login-container {
  min-height: 100vh;
  display: flex;
  background: #271d48;
}

.login-branding-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: linear-gradient(135deg, #271d48 0%, #1a1230 50%, #4754a0 100%);
  position: relative;
  overflow: hidden;
}

.login-branding-panel::before,
.login-branding-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-branding-panel::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(234, 92, 64, 0.12) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  animation: float 20s ease-in-out infinite;
}

.login-branding-panel::after {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(71, 84, 160, 0.18) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

.branding-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

.workshop-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(10px);
  margin-bottom: 1.75rem;
}

.workshop-badge i { color: #ea5c40; }

.branding-text h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}

.branding-text .subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 2.25rem;
}

.branding-text strong { color: #ffffff; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  width: 100%;
  max-width: 560px;
  margin-bottom: 2rem;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-align: left;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #ea5c40 0%, #d44a2e 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 1rem;
}

.feature-text h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.feature-text p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.45;
}

.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.powered-by span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.powered-by img {
  height: 30px;
  width: auto;
  opacity: 0.8;
}

.login-form-panel {
  width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: #e5e7f5;
}

.form-wrapper {
  width: 100%;
  max-width: 400px;
}

.form-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-logo {
  height: 46px;
  width: auto;
  margin-bottom: 1.25rem;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #271d48;
  margin: 0 0 0.5rem;
}

.form-header p {
  font-size: 0.95rem;
  color: #4754a0;
  margin: 0;
}


/* ===================================================== Login responsive ===================================================== */
@media (max-width: 1024px) {
  .login-branding-panel { display: none; }
  .login-form-panel { width: 100%; }
}

/* Password visibility toggle button (login) */
.pw-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #4754a0;
  padding: 0.4rem;
  border-radius: 6px;
}
.pw-toggle:hover { color: #ea5c40; }
