/* ============================================
   Rheinberg Financial — Signup Stylesheet
   ============================================ */

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fbfaf7;
  color: #0d1218;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

/* Container */
.signup-container {
  max-width: 480px;
  margin: 3rem auto 4rem;
  background: #ffffff;
  padding: 2.8rem 3rem 3rem;
  border-radius: 8px;
  border: 1px solid #e6e8ec;
  box-shadow: 0 4px 20px rgba(10, 30, 63, 0.05);
}

/* Header */
.signup-header {
  text-align: center;
  margin-bottom: 2rem;
  user-select: none;
}

.signup-header h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.75rem;
  color: #0a1e3f;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.signup-header p {
  font-size: 0.92rem;
  color: #5b6673;
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto;
}

/* Form */
.signup-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.4rem;
  position: relative;
}

label {
  display: block;
  font-weight: 600;
  color: #2a3441;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  user-select: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="file"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: 6px;
  border: 1px solid #e6e8ec;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  color: #0d1218;
  background: #ffffff;
  box-sizing: border-box;
}

input[type="file"] {
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: #5b6673;
}

input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: #0a1e3f;
  background: #f4f2ec;
  border: 1px solid #e6e8ec;
  border-radius: 5px;
  padding: 6px 12px;
  margin-right: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #eef0f3;
}

input:focus {
  outline: none;
  border-color: #0a1e3f;
  box-shadow: 0 0 0 3px rgba(10, 30, 63, 0.08);
}

input::placeholder {
  color: #8b95a1;
}

/* Error messages */
.error-message {
  display: none;
  color: #b91c1c;
  font-size: 0.78rem;
  margin-top: 0.35rem;
  font-weight: 500;
  user-select: none;
}

/* Submit button */
.signup-button {
  width: 100%;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid #0a1e3f;
  border-radius: 6px;
  cursor: pointer;
  background-color: #0a1e3f;
  color: #ffffff;
  transition: background-color 0.2s ease, transform 0.1s ease;
  user-select: none;
  letter-spacing: 0.005em;
  margin-top: 0.5rem;
}

.signup-button:hover,
.signup-button:focus {
  background-color: #132a52;
  border-color: #132a52;
}

.signup-button:active {
  transform: scale(0.995);
}

.signup-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer */
.signup-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.88rem;
  color: #5b6673;
  user-select: none;
}

.signup-footer a {
  color: #0a1e3f;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.signup-footer a:hover,
.signup-footer a:focus {
  color: #a67c2e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(251, 250, 247, 0.96);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-container {
  text-align: center;
  color: #0d1218;
  padding: 20px;
  max-width: 320px;
}

.loader {
  border: 3px solid #e6e8ec;
  border-top: 3px solid #0a1e3f;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 1rem auto;
}

.loader-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #2a3441;
  line-height: 1.5;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============ Responsive ============ */

@media (max-width: 640px) {
  .signup-container {
    margin: 1.5rem 1rem 2.5rem;
    padding: 2rem 1.5rem 2.25rem;
    border-radius: 6px;
  }

  .signup-header h2 {
    font-size: 1.5rem;
  }

  .signup-header p {
    font-size: 0.88rem;
    max-width: 100%;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="file"] {
    padding: 0.8rem 0.9rem;
    font-size: 16px; /* prevents iOS auto-zoom */
  }

  .signup-button {
    padding: 0.95rem 0;
    font-size: 16px;
  }

  .signup-footer {
    font-size: 0.85rem;
  }
}

@media (max-width: 400px) {
  .signup-container {
    margin: 1rem 0.75rem 2rem;
    padding: 1.75rem 1.25rem 2rem;
  }

  .signup-header h2 {
    font-size: 1.35rem;
  }

  input[type="file"] {
    font-size: 0.8rem;
  }
}