/* ══════════════════════════════════════════════════════
   Skilli Registration — style.css
   Authentic Skilli Green Palette:
     Primary green : #2D7F62
     Dark green    : #1E5642
   ══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --green:          #2D7F62;
  --green-dark:     #1E5642;
  --green-mid:      #246b52;
  --green-light:    #e8f5f0;
  --green-xlight:   #f3faf7;
  --green-glow:     rgba(45,127,98,.16);

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --border:         #e2e8f0;
  --border-focus:   #2D7F62;
  --surface:        #f8fafc;
  --white:          #ffffff;

  --page-bg:        #f6f8f7;

  --error:          #ef4444;
  --error-light:    #fef2f2;
  --success:        #16a34a;
  --success-light:  #f0fdf4;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,.07);
  --shadow-card: 0 16px 48px -12px rgba(30,86,66,.14), 0 2px 10px rgba(0,0,0,.04);
  --shadow-focus:0 0 0 3px rgba(45,127,98,.2);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Subtle background ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 500px at 50% 0%, rgba(45,127,98,.08) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 90% 100%, rgba(30,86,66,.05) 0%, transparent 60%);
}

/* ── Page layout ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 44px;
  gap: 20px;
}

/* ══════════════════════════════════════
   BRAND HEADER
══════════════════════════════════════ */
.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.brand-sub {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   MAIN CARD
══════════════════════════════════════ */
.card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 34px 30px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(45,127,98,.12);
  position: relative;
  overflow: hidden;
}

/* Top accent bar */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-dark), var(--green), #48b894, var(--green-dark));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Form header */
.form-header {
  margin-bottom: 22px;
  text-align: left;
}

.card-title {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 5px;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   FORM INPUTS & GRID
══════════════════════════════════════ */
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.form-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px 0 38px;
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
}

.form-input-noicon {
  padding-left: 14px !important;
}

.form-input:focus {
  border-color: var(--green);
  background: var(--white);
  box-shadow: var(--shadow-focus);
}

.form-input::placeholder { color: var(--text-muted); font-weight: 400; }

.form-input.error {
  border-color: var(--error);
  background: var(--error-light);
}

.form-input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
  border-color: #cbd5e1;
}

/* Phone input */
.phone-wrapper {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  flex-shrink: 0;
}

.phone-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  padding-left: 14px !important;
}

.field-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.field-error {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--error);
  min-height: 16px;
  display: block;
}

/* ══════════════════════════════════════
   INPUT WITH INLINE ACTION (Get OTP)
══════════════════════════════════════ */
.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.btn-action {
  height: 46px;
  padding: 0 16px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(45,127,98,.2);
}

.btn-action:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 3px 10px rgba(45,127,98,.28);
}

.btn-action:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.8;
}

.btn-action-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-action.loading .btn-action-text { display: none; }
.btn-action.loading .btn-action-spinner { display: block; }

/* Verified badge pill in place of Get OTP button */
.verified-pill {
  height: 46px;
  padding: 0 16px;
  background: var(--success-light);
  color: var(--success);
  border: 1.5px solid #86efac;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0%   { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════
   INLINE OTP BOX (Beneath Email / Mobile)
══════════════════════════════════════ */
.inline-otp-box {
  margin-top: 8px;
  background: var(--green-xlight);
  border: 1.5px dashed rgba(45,127,98,.35);
  border-radius: var(--radius-sm);
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.28s ease both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.inline-otp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inline-otp-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-dark);
}

.inline-otp-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.otp-inline-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--text-primary);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
}

.otp-inline-input:focus {
  border-color: var(--green);
  box-shadow: var(--shadow-focus);
}

.otp-inline-input.error {
  border-color: var(--error);
  background: var(--error-light);
  animation: shake 0.4s ease;
}

.otp-inline-input:disabled {
  background: #f8fafc;
  color: var(--text-muted);
  cursor: wait;
  opacity: 0.85;
}

.inline-otp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.77rem;
}

.inline-resend {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.btn-link {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
  padding: 0 2px;
  transition: all var(--transition);
}

.btn-link:hover:not(:disabled) {
  color: var(--green-dark);
  text-decoration: underline;
}

.btn-link:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ══════════════════════════════════════
   SUBMIT SECTION
══════════════════════════════════════ */
.submit-section {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(45,127,98,.28);
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 4px 14px rgba(45,127,98,.36);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none !important;
}

.btn.enabled-ready {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(45,127,98,.2), 0 4px 14px rgba(45,127,98,.3);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(45,127,98,.2), 0 4px 14px rgba(45,127,98,.3); }
  50%      { box-shadow: 0 0 0 7px rgba(45,127,98,.35), 0 6px 18px rgba(45,127,98,.45); }
}

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

.btn.loading .btn-text,
.btn.loading .btn-arrow { display: none; }
.btn.loading .btn-spinner { display: block; }

.submit-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  transition: color var(--transition);
}

.submit-hint.ready {
  color: var(--green);
  font-weight: 600;
}

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

@keyframes shake {
  10%, 90%      { transform: translateX(-2px); }
  20%, 80%      { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60%      { transform: translateX(4px); }
}

/* ══════════════════════════════════════
   SUCCESS SCREEN
══════════════════════════════════════ */
.success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success-circle {
  width: 80px;
  height: 80px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px var(--green-glow);
  margin-bottom: 12px;
  animation: successPop 0.55s cubic-bezier(0.175,0.885,0.32,1.275) both;
}

@keyframes successPop {
  from { opacity: 0; transform: scale(0.3); }
  to   { opacity: 1; transform: scale(1); }
}

.success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.success-name {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.success-name strong { color: var(--text-primary); }

/* Credential notice box */
.credential-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--green-xlight);
  border: 1px solid rgba(45,127,98,.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 18px 0 6px;
  text-align: left;
}

.credential-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--green);
}

.credential-notice p {
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--green-dark);
}

.success-details {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.detail-icon { font-size: 1rem; flex-shrink: 0; }
.detail-value { color: var(--text-secondary); font-weight: 500; word-break: break-all; }

.verified-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
}
.badge--success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.page-footer {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.87rem;
  font-weight: 600;
  font-family: var(--font);
  color: white;
  min-width: 250px;
  max-width: 360px;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes toastIn  { from { opacity:0; transform:translateX(60px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); }    to { opacity:0; transform:translateX(60px); } }

.toast--success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast--error   { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.toast--info    { background: linear-gradient(135deg, var(--green), var(--green-dark)); }

/* ══════════════════════════════════════
   RESPONSIVE DESIGN (Mobile & Tablet)
══════════════════════════════════════ */
@media (max-width: 520px) {
  .page-wrapper {
    padding: 20px 12px 75px; /* extra bottom padding ensures Netlify floating badge never obscures form or buttons */
    gap: 16px;
  }

  .brand-logo-img {
    height: 38px;
  }

  .card {
    padding: 22px 14px 20px;
    border-radius: var(--radius-md);
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-subtitle {
    font-size: 0.82rem;
  }

  .name-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-group {
    margin-bottom: 13px;
  }

  .form-label {
    font-size: 0.8rem;
  }

  .form-input {
    height: 44px;
    font-size: 0.88rem;
    padding-left: 36px;
  }

  .form-input-noicon {
    padding-left: 12px !important;
  }

  .input-icon {
    left: 11px;
    width: 15px;
    height: 15px;
  }

  .input-with-action {
    gap: 6px;
  }

  .btn-action {
    height: 44px;
    padding: 0 13px;
    font-size: 0.8rem;
  }

  .verified-pill {
    height: 44px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .phone-prefix {
    padding: 0 10px;
    font-size: 0.85rem;
  }

  .phone-input {
    padding-left: 10px !important;
  }

  .field-hint {
    font-size: 0.72rem;
  }

  .field-error {
    font-size: 0.74rem;
  }

  /* Inline OTP Box on Mobile */
  .inline-otp-box {
    padding: 10px 10px 8px;
    gap: 7px;
  }

  .inline-otp-title {
    font-size: 0.76rem;
  }

  .inline-otp-row {
    gap: 6px;
  }

  .otp-inline-input {
    height: 44px;
    font-size: 1.15rem;
    letter-spacing: 0.28em;
    padding: 0 10px;
  }

  .inline-otp-footer {
    font-size: 0.72rem;
    gap: 4px;
  }

  .btn-link {
    font-size: 0.72rem;
  }

  .btn {
    height: 46px;
    font-size: 0.9rem;
  }

  .submit-hint {
    font-size: 0.74rem;
    line-height: 1.4;
  }

  /* Success screen on Mobile */
  .success-circle {
    width: 68px;
    height: 68px;
  }

  .success-title {
    font-size: 1.25rem;
  }

  .credential-notice {
    padding: 12px 12px;
  }

  .credential-notice p {
    font-size: 0.82rem;
  }

  .success-details {
    padding: 12px 14px;
    font-size: 0.84rem;
  }
}

@media (max-width: 360px) {
  .page-wrapper {
    padding: 14px 8px 80px;
  }

  .card {
    padding: 18px 10px 16px;
  }

  .btn-action {
    padding: 0 10px;
    font-size: 0.75rem;
  }

  .verified-pill {
    padding: 0 8px;
    font-size: 0.75rem;
  }

  .phone-prefix {
    padding: 0 7px;
    font-size: 0.8rem;
  }

  .otp-inline-input {
    height: 42px;
    letter-spacing: 0.22em;
    font-size: 1.05rem;
  }
}
