/* ============================================
   User Authentication Pages - Professional CSS
   Corpoz Theme Integration - Green Theme
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

/* ===========================
   ROOT VARIABLES - THEME COLORS
   =========================== */
:root {
  --primary-green: #14ba76;
  --primary-green-dark: #10a860;
  --primary-green-light: #1fd489;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --success-bg: #d4edda;
  --success-text: #155724;
  --error-bg: #f8d7da;
  --error-text: #721c24;
  --warning-color: #f59e0b;
  --warning-hover: #f08c3a;
}

/* ===========================
   GLOBAL TYPOGRAPHY
   =========================== */
.user-auth-section,
.user-auth-banner {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.user-auth-form label,
.card-title {
  font-family: 'Poppins', sans-serif;
}

/* ===========================
   BANNER STYLING
   =========================== */
.user-auth-banner {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 50%, #10a860 100%);
  min-height: 220px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.user-auth-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.1)"/></svg>');
  background-size: cover;
  animation: wave 8s linear infinite;
}

@keyframes wave {
  0% { transform: translateX(0); }
  100% { transform: translateX(50px); }
}

.user-auth-banner .opacity {
  position: relative;
  z-index: 2;
  width: 100%;
}

.user-auth-banner .theme-title-one {
  text-align: center;
}

.user-auth-banner .theme-title-one h2 {
  color: white;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.5px;
}

.user-auth-banner .theme-title-one p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.3px;
  line-height: 1.6;
  text-align: center;
  margin: 0 auto;
  max-width: 600px;
}

.user-auth-banner ul {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

.user-auth-banner ul li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.user-auth-banner ul li a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
  font-weight: 600;
}

.user-auth-banner ul li a:hover {
  opacity: 0.8;
}

/* ===========================
   SECTION LAYOUT
   =========================== */
.user-auth-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #f9fafb 0%, white 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}

.user-auth-section .container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.user-auth-section .row {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ===========================
   CARD STYLING
   =========================== */
.user-auth-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  margin: 0 auto;
}

.user-auth-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.user-auth-card .card-body {
  padding: 50px;
  text-align: center;
}

.card-title {
  color: var(--text-dark);
  border-bottom: 4px solid var(--primary-green);
  padding-bottom: 20px;
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 35px;
  letter-spacing: -0.3px;
  text-align: center;
}

/* ===========================
   FORM STYLING
   =========================== */
.user-auth-form {
  text-align: left;
  margin: 0 auto;
}

.user-auth-form .form-group {
  margin-bottom: 22px;
}

.user-auth-form .form-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 15px;
  letter-spacing: 0.2px;
  display: block;
}

/* REQUIRED FIELD ASTERISK ALIGNMENT */
.user-auth-form .form-label .text-danger {
  color: #dc3545;
  margin-left: 2px;
  font-weight: 700;
  display: inline;
}

.user-auth-form .form-control,
.user-auth-form .form-select {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Source Sans Pro', sans-serif;
  transition: all 0.3s ease;
  background-color: white;
  height: auto;
}

.user-auth-form .form-control:hover,
.user-auth-form .form-select:hover {
  border-color: #d1d5db;
  background-color: #fafbfc;
}

.user-auth-form .form-control:focus,
.user-auth-form .form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 4px rgba(20, 186, 118, 0.15);
  background-color: white;
  outline: none;
}

.user-auth-form .form-control::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* ===========================
   PASSWORD VISIBILITY TOGGLE
   =========================== */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-control {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  transition: all 0.3s ease;
  user-select: none;
}

.password-toggle:hover {
  color: var(--primary-green);
}

.password-toggle.visible {
  color: var(--primary-green);
}

/* ===========================
   TEXT ERROR DISPLAY
   =========================== */
.user-auth-form .text-danger {
  font-size: 13px;
  color: #dc3545;
  display: block;
  margin-top: 6px;
  font-weight: 500;
}

/* ===========================
   BUTTON STYLING
   =========================== */
.user-auth-btn {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
  border: none;
  color: white;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-size: 16px;
  letter-spacing: 0.3px;
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.user-auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.user-auth-btn:hover::before {
  left: 100%;
}

.user-auth-btn:hover {
  background: linear-gradient(135deg, var(--primary-green-dark) 0%, #0e8c53 100%);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(20, 186, 118, 0.35);
}

.user-auth-btn:active {
  transform: translateY(-1px);
}

.user-auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.user-auth-btn.w-100 {
  width: 100%;
}

/* WARNING BUTTON */
.user-auth-btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #ea580c 100%);
}

.user-auth-btn-warning:hover {
  background: linear-gradient(135deg, var(--warning-hover) 0%, #da4807 100%);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

/* ===========================
   ALERTS
   =========================== */
.user-auth-alert {
  border-radius: 8px;
  border: none;
  margin-bottom: 25px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 500;
}

.user-auth-alert.alert-success {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.user-auth-alert.alert-danger {
  background-color: var(--error-bg);
  color: var(--error-text);
}

.user-auth-alert.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

/* ===========================
   CHECKBOXES & RADIO
   =========================== */
.user-auth-form .form-check {
  margin-bottom: 20px;
  padding-left: 0;
  display: flex;
  align-items: flex-start;
}

.user-auth-form .form-check-input {
  border: 2px solid var(--border-color);
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-top: 3px;
  margin-right: 10px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.user-auth-form .form-check-input:hover {
  border-color: var(--primary-green);
}

.user-auth-form .form-check-input:checked {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.user-auth-form .form-check-input:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 4px rgba(20, 186, 118, 0.15);
}

.user-auth-form .form-check-label {
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
  display: inline-block;
  white-space: normal;
  word-wrap: break-word;
}

.user-auth-form .form-check-label .text-danger {
  color: #dc3545;
  margin-left: 2px;
  font-weight: 700;
  white-space: nowrap;
  display: inline;
}

.user-auth-form .form-check-label a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.user-auth-form .form-check-label a:hover {
  color: var(--primary-green-dark);
  text-decoration: underline;
}

/* ===========================
   DIVIDERS
   =========================== */
.user-auth-form-divider {
  margin: 35px 0;
  border: none;
  border-top: 2px solid var(--border-color);
  position: relative;
}

.user-auth-form-divider::after {
  content: 'OR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 0 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
}

/* ===========================
   HELPER TEXT & LINKS
   =========================== */
.user-auth-helper-text {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
  line-height: 1.6;
}

.user-auth-helper-text a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.user-auth-helper-text a:hover {
  color: var(--primary-green-dark);
  text-decoration: underline;
}

.user-auth-form-title {
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 25px;
  font-size: 20px;
  letter-spacing: -0.2px;
}

/* ===========================
   DROPDOWN MENU
   =========================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 6px;
}

.dropdown-toggle:hover {
  color: var(--primary-green);
}

.dropdown-toggle::after {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 10px;
  vertical-align: 0.3em;
  content: "";
  border-top: 0.35em solid;
  border-right: 0.35em solid transparent;
  border-bottom: 0;
  border-left: 0.35em solid transparent;
  transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.user-profile-link {
  color: inherit;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.user-profile-link:hover {
  color: inherit;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  float: left;
  min-width: 220px;
  padding: 8px 0;
  margin: 8px 0 0;
  font-size: 14px;
  text-align: left;
  list-style: none;
  background-color: white;
  background-clip: padding-box;
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.2s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-menu.show {
  display: block !important;
}

.user-dropdown-menu li {
  list-style: none;
}

.user-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 20px;
  clear: both;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-dark);
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
}

.user-dropdown-menu .dropdown-item:hover {
  color: var(--primary-green);
  background-color: #f0f4ff;
}

.user-dropdown-menu .dropdown-item i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 992px) {
  .user-auth-section {
    padding: 60px 0;
  }

  .user-auth-card .card-body {
    padding: 40px 30px;
  }

  .card-title {
    font-size: 24px;
  }

  .user-auth-banner .theme-title-one h2 {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .user-auth-banner {
    min-height: 180px;
  }

  .user-auth-banner .theme-title-one h2 {
    font-size: 28px;
    margin-bottom: 10px;
  }

  .user-auth-banner .theme-title-one p {
    font-size: 15px;
  }

  .user-auth-card .card-body {
    padding: 35px 25px;
  }

  .card-title {
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 15px;
  }

  .user-auth-form .form-control,
  .user-auth-form .form-select {
    padding: 12px 14px;
    font-size: 16px; /* Prevents zoom on mobile */
  }

  .user-auth-form .form-label {
    font-size: 14px;
  }

  .user-auth-btn {
    padding: 13px 28px;
    font-size: 15px;
  }

  .user-auth-helper-text {
    font-size: 13px;
  }

  .user-auth-form-divider {
    margin: 25px 0;
  }

  .user-auth-section {
    padding: 50px 0;
  }
}

@media (max-width: 576px) {
  .user-auth-banner {
    min-height: 160px;
  }

  .user-auth-banner .theme-title-one h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .user-auth-banner .theme-title-one p {
    font-size: 13px;
    line-height: 1.5;
  }

  .user-auth-banner ul {
    gap: 8px;
    margin-top: 12px;
  }

  .user-auth-banner ul li {
    font-size: 12px;
  }

  .user-auth-card .card-body {
    padding: 30px 20px;
  }

  .card-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  .user-auth-form .form-group {
    margin-bottom: 18px;
  }

  .user-auth-form .form-label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .user-auth-form .form-control,
  .user-auth-form .form-select {
    padding: 11px 12px;
    font-size: 16px;
  }

  .user-auth-form .text-danger {
    font-size: 12px;
    margin-top: 4px;
  }

  .user-auth-form .form-check-label {
    font-size: 13px;
    margin-left: 10px;
  }

  .user-auth-btn {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
  }

  .user-auth-btn.w-100 {
    width: 100%;
  }

  .user-auth-helper-text {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .user-auth-form-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .user-auth-form-divider {
    margin: 20px 0;
  }

  .user-auth-form-divider::after {
    font-size: 11px;
  }

  .user-auth-section {
    padding: 40px 0;
  }

  .col-md-8.offset-md-2,
  .col-md-6.offset-md-3 {
    padding: 0 15px;
  }
}

@media (max-width: 400px) {
  .user-auth-banner .theme-title-one h2 {
    font-size: 20px;
  }

  .card-title {
    font-size: 18px;
  }

  .user-auth-card .card-body {
    padding: 25px 15px;
  }

  .user-auth-btn {
    padding: 11px 20px;
    font-size: 13px;
  }
}

/* ===========================
   UTILITIES
   =========================== */
.text-center {
  text-align: center;
}

.text-danger {
  color: #dc3545;
}

.d-none {
  display: none !important;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.fw-bold {
  font-weight: 700;
}

.me-1 {
  margin-right: 0.25rem;
}

.me-2 {
  margin-right: 0.5rem;
}
