/* ============================================
   AUTH SYSTEM - STANDARDIZED STYLES
   Version: 1.0 (LOCKED)
   Applies to: Login, User Registration, Restaurant Registration
   ============================================ */

/* ========== PAGE BACKGROUND ========== */
.auth-page {
  background: #FAFAFA;
  min-height: calc(100vh - 48px - 60px); /* viewport - navbar - footer */
  padding: 48px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

@media (max-width: 767px) {
  .auth-page {
    padding: 24px 16px;
  }
}

/* ========== FORM CARD ========== */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 32px;
}

@media (max-width: 767px) {
  .auth-card {
    padding: 24px;
  }
}

/* ========== PAGE TITLE ========== */
.auth-title {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1A1A1A;
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.2;
}

/* ========== FORM ========== */
.auth-form {
  display: flex;
  flex-direction: column;
}

/* ========== FIELD WRAPPER ========== */
.auth-field {
  margin-bottom: 16px;
  position: relative;
}

.auth-field:last-of-type {
  margin-bottom: 20px;
}

/* ========== FIELD LABEL ========== */
.auth-label {
  display: block;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

/* ========== FIELD INPUT ========== */
.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px; /* Prevents iOS zoom */
  color: #1A1A1A;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
  color: #9CA3AF;
}

.auth-input:focus {
  border-color: #F28500;
  box-shadow: 0 0 0 3px rgba(242, 133, 0, 0.1);
}

.auth-input.is-invalid {
  border-color: #EF4444;
}

.auth-input.is-invalid:focus {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Password field with toggle */
.auth-field--password .auth-input {
  padding-right: 48px;
}

/* ========== FIELD ERROR ========== */
.auth-error {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  color: #EF4444;
  margin-top: 4px;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* ========== PASSWORD HINT ========== */
.auth-password-hint {
  font-size: 12px;
  color: #6B7280;
  margin-top: 4px;
}

/* ========== PASSWORD TOGGLE ========== */
.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 38px; /* Label height + margin + input padding */
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #9CA3AF;
  transition: color 0.15s;
  padding: 0;
  z-index: 2;
}

.auth-password-toggle:hover {
  color: #374151;
}

.auth-password-toggle:focus {
  outline: none;
  color: #F28500;
}

/* ========== PASSWORD REQUIREMENTS CHECKLIST ========== */
.pwd-requirements {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: none;
}

.pwd-requirements.active {
  display: block;
}

.pwd-requirements li {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  color: #6B7280;
  padding: 2px 0;
  transition: color 0.15s;
}

.pwd-requirements li i {
  width: 14px;
  text-align: center;
  margin-right: 4px;
  font-size: 11px;
}

.pwd-requirements li.met {
  color: #059669;
}

.pwd-requirements li.met i {
  color: #059669;
}

.pwd-requirements li.unmet {
  color: #EF4444;
}

.pwd-requirements li.unmet i {
  color: #EF4444;
}

/* ========== TERMS CHECKBOX ========== */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  margin-bottom: 24px;
  line-height: 1.4;
}

.auth-terms input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: #F28500;
  cursor: pointer;
}

.auth-terms a {
  color: #F28500;
  text-decoration: none;
}

.auth-terms a:hover {
  text-decoration: underline;
}

.auth-terms-error {
  font-size: 13px;
  color: #EF4444;
  margin-top: -20px;
  margin-bottom: 16px;
  display: none;
}

.auth-terms-error.visible {
  display: block;
}

/* ========== SUBMIT BUTTON ========== */
.auth-btn {
  width: 100%;
  height: 48px;
  background: #F28500;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 16px;
}

.auth-btn:hover {
  background: #D97706;
}

.auth-btn:active {
  background: #B45309;
}

.auth-btn:disabled {
  background: #E0E0E0;
  color: #9CA3AF;
  cursor: not-allowed;
}

/* ========== FORGOT PASSWORD LINK ========== */
.auth-forgot {
  display: block;
  text-align: center;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: #F28500;
  text-decoration: none;
  margin-bottom: 16px;
}

.auth-forgot:hover {
  text-decoration: underline;
  color: #D97706;
}

/* ========== SWITCH LINK ========== */
.auth-switch {
  text-align: center;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: #6B7280;
}

.auth-switch a {
  color: #F28500;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ========== SUCCESS MESSAGE ========== */
.auth-success {
  background: #D1FAE5;
  color: #065F46;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  text-align: center;
}

/* ========== ERROR MESSAGE (GLOBAL) ========== */
.auth-alert {
  background: #FEE2E2;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  text-align: center;
}
