/* Login/Signup Page Specific Styles */

:root {
  --primary: #8a4fff;        /* Vibrant purple - main GBV color */
  --primary-dark: #6b3fcc;   /* Darker purple */
  --primary-light: #b794ff;   /* Light purple for accents */
  --secondary: #f5f1ff;
  --dark-bg: #f8fbff;
  --card-bg: #ffffff;
  --border-color: rgba(107, 63, 204, 0.18);
  --text-primary: #1f2a3d;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --input-bg: #ffffff;
  --success: #9b87ff;        /* Purple-tinted success */
  --warning: #ffb86b;        /* Warm warning (kept for contrast) */
  --info: #87b9ff;           /* Blue-purple info */
}

body {
  background: linear-gradient(135deg, #f8fbff 0%, #f7f2ff 55%, #ffffff 100%);
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  margin: 0;
}

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem clamp(0.75rem, 2.4vw, 2rem);
}

/* Auth Card */
.auth-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8f2ff 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(138, 79, 255, 0.3);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(97, 59, 182, 0.14),
              0 0 0 1px rgba(138, 79, 255, 0.14);
  width: 100%;
  max-width: 980px;
  transition: transform 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 68px rgba(138, 79, 255, 0.24);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(250px, 34%) 1fr;
}

.auth-main {
  min-width: 0;
}

.auth-side {
  background: linear-gradient(170deg, #f4edff 0%, #ede4ff 100%);
  border-right: 1px solid rgba(138, 79, 255, 0.22);
  padding: clamp(1.2rem, 2.2vw, 2rem) clamp(1rem, 1.9vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.auth-side-brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

.auth-side-brand h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: #2b1654;
}

.auth-side-brand p {
  margin: 0;
  font-size: 0.92rem;
  color: #4c3f72;
  line-height: 1.6;
}

.auth-side-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.auth-side-points li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #2f2057;
  font-size: 0.88rem;
}

.auth-side-points i {
  color: #d8c2ff;
}

.auth-side-note {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #372663;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-side-note i {
  color: #d8c2ff;
  flex-shrink: 0;
}

.auth-side-help {
  margin-top: auto;
  border: 1px solid rgba(138, 79, 255, 0.35);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 0.9rem;
}

.auth-side-help span {
  display: block;
  margin-bottom: 0.6rem;
  color: #2b1654;
  font-weight: 600;
  font-size: 0.88rem;
}

.auth-side-help .btn-light {
  background: #ffffff;
  border-color: #d9c9ff;
  color: #4e31a1;
}

.auth-side-help .btn-light:hover {
  background: #f6f0ff;
  border-color: #c7b0ff;
  color: #452b92;
}

.auth-side-help .btn-outline-light {
  border-color: #8a4fff;
  color: #6b3fcc;
}

.auth-side-help .btn-outline-light:hover {
  background: #8a4fff;
  border-color: #8a4fff;
  color: #ffffff;
}

/* Brand Bar */
.auth-brand {
  padding: clamp(1.3rem, 2.4vw, 2rem) clamp(1.1rem, 2.4vw, 2rem) 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(138, 79, 255, 0.3);
}

.brand-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.brand-text span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
  display: block;
}

/* Tabs */
.auth-tabs {
  display: flex;
  padding: 0 clamp(1.1rem, 2.4vw, 2rem);
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.auth-tab i {
  margin-right: 8px;
}

.auth-tab:hover {
  color: var(--text-secondary);
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Auth Body */
.auth-body {
  padding: clamp(1.15rem, 2.4vw, 2rem);
}

/* Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.25rem;
}

.field-note {
  margin-top: 0.45rem;
  min-height: 14px;
  color: var(--text-muted);
  font-size: 11px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 16px;
  z-index: 10;
  transition: color 0.2s;
}

.input-group-custom input,
.input-group-custom select {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

/* Keep native dropdown options readable on light OS popup menus */
.input-group-custom select option {
  color: #161422;
  background: #ffffff;
}

.input-group-custom input:focus,
.input-group-custom select:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(138, 79, 255, 0.15);
}

.input-group-custom input:focus + .input-icon,
.input-group-custom:focus-within .input-icon {
  color: var(--primary);
}

.input-group-custom input::placeholder {
  color: var(--text-muted);
  font-size: 13px;
}

/* Password Toggle Button */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  z-index: 10;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle i {
  font-size: 18px;
}

/* Two Column Layout */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 768px) {
  .auth-card {
    max-width: 100%;
    border-radius: 16px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-side {
    border-right: 0;
    border-bottom: 1px solid rgba(138, 79, 255, 0.2);
    padding: 1.3rem 1.25rem;
    gap: 1rem;
  }

  .auth-side-help {
    margin-top: 0;
  }

  .row-2,
  .user-type-grid {
    grid-template-columns: 1fr;
  }

  .extras-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .auth-tab {
    font-size: 13px;
    padding: 0.85rem 0.5rem;
  }
}

/* User Type Cards */
.user-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.type-card {
  position: relative;
}

.type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.type-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.type-card label i {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.type-title {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.type-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.type-card input[type="radio"]:checked + label {
  background: rgba(138, 79, 255, 0.15);
  border-color: var(--primary);
}

.type-card input[type="radio"]:checked + label i,
.type-card input[type="radio"]:checked + label .type-title {
  color: var(--primary);
}

.type-card label:hover {
  border-color: rgba(138, 79, 255, 0.5);
}

/* Extras Row (Remember me + Forgot password) */
.extras-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0;
}

.remember-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.remember-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot-link {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Submit Button */
.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(138, 79, 255, 0.4);
}

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

.btn-auth i {
  font-size: 18px;
}

/* Password Strength Meter */
.strength-meter {
  margin-top: 0.5rem;
  height: 4px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.strength-meter-fill {
  height: 100%;
  width: 0;
  transition: width 0.3s, background-color 0.3s;
  border-radius: 4px;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Switch Prompt */
.switch-prompt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 13px;
  color: var(--text-muted);
}

.switch-prompt a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

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

/* Alert Messages */
.alerts-container {
  margin-bottom: 1.5rem;
}

.alert-custom {
  padding: 1rem;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.75rem;
  animation: slideIn 0.3s ease;
}

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

.alert-custom i {
  font-size: 18px;
  flex-shrink: 0;
}

.alert-error {
  background: #fff2f3;
  color: #a62834;
  border: 1px solid #f5c2c7;
}

.alert-success {
  background: #f5f0ff;
  color: #5a33b0;
  border: 1px solid #d8c6ff;
}

.alert-info {
  background: #eef6ff;
  color: #225b9f;
  border: 1px solid #b9d7fb;
}

/* Particle Animation */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle at 35% 35%, #f4e9ff 0%, #b684ff 45%, #8a4fff 100%);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 5px rgba(138, 79, 255, 0.6), 0 0 9px rgba(138, 79, 255, 0.28);
  animation: float linear infinite;
}

.particle::after {
  content: '';
  position: absolute;
  width: 34%;
  height: 34%;
  left: 26%;
  top: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

@keyframes float {
  0% {
    transform: translateY(calc(100vh + 32px)) scale(0.45);
    opacity: 0;
  }
  10% {
    opacity: 0.92;
  }
  90% {
    opacity: 0.58;
  }
  100% {
    transform: translateY(-16vh) scale(1.35);
    opacity: 0;
  }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .auth-side {
    padding: 1rem;
  }

  .auth-side-brand h2 {
    font-size: 1.2rem;
  }

  .auth-brand {
    padding: 1.5rem 1.5rem 0.5rem;
  }
  
  .auth-tabs {
    padding: 0 1.5rem;
  }
  
  .auth-body {
    padding: 1.5rem;
  }
  
  .brand-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .type-card label {
    padding: 1rem;
  }
  
  .type-card label i {
    font-size: 24px;
  }

  .auth-body {
    padding-bottom: 1.25rem;
  }
}

/* Loading State */
.btn-auth.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-auth.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Footer adjustments for auth pages */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  margin-top: 0;
}

@media (max-width: 380px) {
  .auth-container {
    padding: 0.9rem 0.55rem;
  }

  .auth-card {
    border-radius: 14px;
  }

  .auth-brand,
  .auth-tabs,
  .auth-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .auth-tab {
    font-size: 12px;
    padding: 0.7rem 0.45rem;
  }

  .input-group-custom input,
  .input-group-custom select {
    font-size: 13px;
  }
}