/* =============================================
   AUTH PAGES – Maaskom Logistics
   Matches: --accent #e04700, Montserrat/Open Sans
   ============================================= */

/* Page reset for auth */
.auth-page {
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Background ---- */
.auth-main {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 1rem 3rem;
}

.auth-bg {
  position: fixed;
  inset: 0;
  background: url('../images/semi-truck-port-sunset-scaled.jpg') center / cover no-repeat;
  z-index: -2;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 19, 29, 0.88) 0%, rgba(35, 60, 85, 0.80) 100%);
}

/* ---- Layout container ---- */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  animation: authFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-container--signup {
  max-width: 1060px;
}

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

/* ---- Left panel ---- */
.auth-left {
  background: linear-gradient(160deg, #e04700 0%, #b83600 60%, #2c3e50 100%);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.auth-icon {
  font-size: 2.8rem;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.auth-left h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: #fff;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.auth-left > .auth-brand p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.auth-brand {
  margin-bottom: 2rem;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.90);
  font-weight: 600;
}

.auth-features li i {
  color: #ffe0d0;
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-already {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* ---- Right panel ---- */
.auth-right {
  background: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card--signup {
  max-width: 100%;
}

/* ---- Card header ---- */
.auth-card-header {
  margin-bottom: 2rem;
}

.auth-card-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  color: #1a1a2e;
  margin: 0.2rem 0 0.5rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #6b7a8d;
  margin: 0;
}

/* ---- Form groups ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #3a4a5c;
  letter-spacing: 0.01em;
}

/* ---- Input wrapper ---- */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  padding: 0.78rem 1rem 0.78rem 2.75rem;
  border: 1.5px solid #d8dfe8;
  border-radius: 10px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  color: #1a1a2e;
  background: #f9fafc;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}

.input-wrapper input::placeholder {
  color: #b0bac8;
}

.input-wrapper input:focus {
  border-color: #e04700;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 71, 0, 0.12);
}

.input-wrapper input.is-valid {
  border-color: #27ae60;
  background: #f6fffa;
}

.input-wrapper input.is-invalid {
  border-color: #e74c3c;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.09);
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  color: #9daebe;
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon {
  color: #e04700;
}

.toggle-pw {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #9daebe;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  transition: color 0.2s;
}

.toggle-pw:hover { color: #e04700; }

/* ---- Error messages ---- */
.field-error {
  font-size: 0.76rem;
  color: #e74c3c;
  font-weight: 600;
  min-height: 0.9rem;
  display: block;
}

/* ---- Remember me / forgot ---- */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -0.2rem 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.83rem;
  color: #4a5568;
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 2px solid #d0d8e4;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.2s;
  margin-top: 1px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #e04700;
  border-color: #e04700;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  display: block;
  width: 5px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.forgot-link {
  font-size: 0.82rem;
  color: #e04700;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s;
}

.forgot-link:hover { color: #b83600; text-decoration: underline; }

/* ---- CTA Button ---- */
.auth-btn {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #e04700 0%, #c03900 100%);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 18px rgba(224, 71, 0, 0.35);
  margin-top: 0.4rem;
}

.auth-btn:hover {
  background: linear-gradient(135deg, #c93f00 0%, #a82f00 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(224, 71, 0, 0.40);
}

.auth-btn:active { transform: translateY(0); }

.auth-btn:disabled {
  opacity: 0.7;
  pointer-events: none;
}

.btn-spinner.hidden,
.btn-text.hidden { display: none; }

/* ---- Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #aab5c4;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8ecf1;
}

/* ---- Social buttons ---- */
.social-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid #d8dfe8;
  border-radius: 10px;
  background: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a4a5c;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.social-btn:hover {
  border-color: #e04700;
  background: #fff5f0;
  transform: translateY(-1px);
}

.social-btn i { font-size: 1rem; }
.social-btn .fa-google { color: #ea4335; }
.social-btn .fa-linkedin { color: #0a66c2; }

/* ---- Switch link ---- */
.auth-switch-link {
  color: #e04700;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-switch-link:hover { color: #b83600; text-decoration: underline; }

/* ---- Password strength ---- */
.pw-strength {
  height: 4px;
  background: #e8ecf1;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.pw-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.35s ease, background 0.35s ease;
}

.pw-bar.weak    { width: 33%; background: #e74c3c; }
.pw-bar.fair    { width: 66%; background: #f39c12; }
.pw-bar.strong  { width: 100%; background: #27ae60; }

.pw-strength-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: #9daebe;
}
.pw-strength-label.weak   { color: #e74c3c; }
.pw-strength-label.fair   { color: #f39c12; }
.pw-strength-label.strong { color: #27ae60; }

/* ---- Feedback toast ---- */
.form-feedback {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  animation: feedbackIn 0.3s ease;
}

.form-feedback.hidden { display: none; }

.form-feedback.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-feedback.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

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

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .auth-container,
  .auth-container--signup {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .auth-left {
    padding: 2rem 2rem 1.8rem;
  }

  .auth-features { margin-bottom: 0; }
  .auth-brand { margin-bottom: 1.2rem; }
  .auth-already { margin-top: 1rem; }
}

@media (max-width: 520px) {
  .auth-main { padding: 90px 0.75rem 2rem; }
  .auth-right { padding: 2rem 1.4rem; }
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; align-items: flex-start; }
}
