/* ===== Auth Pages CSS - Matching Homepage Theme ===== */

:root {
  --maroon: #7B1F1F;
  --maroon-dark: #5a1616;
  --maroon-light: #9d2828;
  --gold: #C8922A;
  --gold-light: #E8B84B;
  --gold-pale: #FFF8E7;
  --text-dark: #2c2c2c;
  --text-soft: #666;
  --border: #e0e0e0;
  --bg-light: #fafafa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 50%, var(--gold) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  min-height: 600px;
}

/* Left Side - Brand */
.auth-brand {
  background: linear-gradient(135deg, rgba(123, 31, 31, 0.45) 0%, rgba(90, 22, 22, 0.55) 100%), url('../assets/img/auth-bg-1.jpg');
  background-size: cover;
  background-position: center;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(232,184,75,0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.auth-brand-content {
  position: relative;
  z-index: 1;
}

.auth-logo {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 3px solid var(--gold-light);
}

.auth-logo i {
  font-size: 40px;
  color: var(--gold-light);
}

.auth-brand h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.auth-brand p {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 30px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
  text-align: left;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  padding: 12px 16px;
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.auth-feature i {
  font-size: 20px;
  color: var(--gold-light);
  flex-shrink: 0;
}

.auth-feature span {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

/* Right Side - Form */
.auth-form-wrapper {
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 8px;
}

.auth-form-header p {
  font-size: 14px;
  color: var(--text-soft);
}

.auth-form-header p a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-form-header p a:hover {
  color: var(--maroon);
}

/* Alert Messages */
.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

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

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,146,42,0.1);
}

.form-control::placeholder {
  color: #999;
}

.text-danger {
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
  display: block;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--maroon);
}

.form-checkbox label {
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
  margin: 0;
}

.form-checkbox a {
  color: var(--gold);
  text-decoration: none;
}

.form-checkbox a:hover {
  color: var(--maroon);
}

/* Buttons */
.btn-auth {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(123,31,31,0.3);
}

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

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

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

.auth-divider span {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}

/* Social Buttons */
.social-login {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.btn-social {
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-social:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: translateY(-2px);
}

.btn-social i {
  font-size: 20px;
}

.btn-google { color: #DB4437; }
.btn-facebook { color: #4267B2; }
.btn-twitter { color: #1DA1F2; }
.btn-github { color: #333; }

/* Footer Links */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.auth-footer p {
  font-size: 14px;
  color: var(--text-soft);
}

.auth-footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--maroon);
}

/* Demo Credentials */
.demo-credentials {
  background: var(--gold-pale);
  border: 2px dashed var(--gold);
  border-radius: 8px;
  padding: 16px;
  margin-top: 24px;
}

.demo-credentials h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-cred-item {
  background: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.demo-cred-item:hover {
  border-color: var(--gold);
  transform: translateX(4px);
}

.demo-cred-item:last-child {
  margin-bottom: 0;
}

.demo-cred-text {
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.4;
}

.demo-cred-text strong {
  color: var(--maroon);
  font-weight: 600;
}

.demo-cred-icon {
  color: var(--gold);
  font-size: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .auth-brand {
    padding: 40px 30px;
  }

  .auth-features {
    display: none;
  }

  .auth-form-wrapper {
    padding: 40px 30px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .auth-brand {
    padding: 30px 20px;
  }

  .auth-form-wrapper {
    padding: 30px 20px;
  }

  .auth-form-header h2 {
    font-size: 26px;
  }

  .social-login {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Loading Overlay */
#overlayer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#overlayer.active {
  display: flex;
}

.loader-overlay {
  text-align: center;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: var(--gold-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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