/* css/auth.css */
:root {
  --auth-primary: #4D4499;
  --auth-text-dark: #333333;
  --auth-text-muted: #64748B;
  --auth-border: #E2E8F0;
  --auth-bg-light: #F8F9FA;
  --font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: #ffffff;
}

* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

.auth-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100%;
}

.auth-sidebar {
  margin: 10px 10px 10px 10px;
  border-radius: 24px;
  width: 42%;
  background-image: url('../img/blue-background.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 40px;
  color: #ffffff;
  position: relative;
  overflow-y: auto;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  margin: auto;
  max-width: 320px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon img,
.feature-icon svg {
  width: 28px;
  height: 28px;
  object-fit: contain;
  stroke: #ffffff;
}

.feature-item h3 {
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.feature-item p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
  white-space: nowrap;
}

/* Sidebar Footer */
.auth-sidebar-footer {
  width: 100%;
  max-width: 411px;
  text-align: center;
  margin-top: auto;
}

.btn-auth-outline {
  display: block;
  width: 100%;
  padding: 14px;
  border: 1px solid rgb(255, 255, 255);
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 24px;
  transition: background 0.3s, border-color 0.3s;
}

.login-page .btn-auth-outline {
  margin-bottom: 54px;
}

.btn-auth-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.auth-sidebar-footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.auth-sidebar-footer p a {
  color: #ffffff;
  text-decoration: none;
}

.auth-sidebar-footer p a:hover {
  text-decoration: underline;
}

/* Right Form Container */
.auth-form-container {
  width: 58%;
  display: flex;
  justify-content: center;
  padding: 120px 40px 40px 40px;
  background: #ffffff;
  overflow-y: auto;
  position: relative;
}

.auth-form-wrapper {
  margin: auto 0;
  width: 100%;
  max-width: 600px;
}

/* Mobile Logo Header */
.mobile-logo-header {
  display: contents;
}

/* Header */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  position: absolute;
  top: 40px;
  right: 40px;
  height: 64px;
  object-fit: contain;
}

.auth-logo-left {
  right: auto;
  left: 40px;
}

.mobile-feature-icons {
  display: none;
}

.auth-header h1 {
  font-size: 40px;
  color: var(--auth-primary);
  font-weight: 700;
  margin: 0 0 8px 0;
}

.auth-subtitle {
  color: var(--auth-text-muted);
  font-size: 20px;
  margin: 0;
}

/* OAuth Buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.register-form-container .oauth-buttons {
  flex-direction: row;
}

.register-form-container .btn-oauth {
  flex: 1;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--auth-text-dark);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: var(--font-family);
}

.btn-oauth img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.btn-oauth img[alt="google"] {
  width: 28px;
  height: 28px;
}

.btn-oauth:hover {
  background: var(--auth-bg-light);
  border-color: #cbd5e1;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
  color: #94A3B8;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--auth-border);
}

.auth-divider span {
  padding: 0 16px;
}

/* Form Inputs */
.form-group {
  margin-bottom: 16px;
}

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

.input-icon {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.input-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.6;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 44px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--auth-text-dark);
  outline: none;
  font-family: var(--font-family);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(77, 68, 153, 0.1);
}

.input-wrapper input::placeholder {
  color: #6B7280;
}

.btn-toggle-password {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
}

.btn-toggle-password img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.6;
}

.btn-toggle-password:hover svg {
  stroke: var(--auth-primary);
}

/* Form Options */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: black;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 16px;
  width: 16px;
  background-color: #fff;
  border: 1px solid #CACACA;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.checkbox-container input:checked~.checkmark {
  background-color: var(--auth-primary);
  border-color: var(--auth-primary);
}

.checkbox-container input:checked~.checkmark:after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.forgot-link {
  font-size: 13px;
  color: var(--auth-primary);
  font-weight: 500;
}

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

/* Primary Button */
.btn-auth-primary {
  width: 100%;
  padding: 14px;
  background-color: var(--auth-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background-color 0.2s;
}

.btn-auth-primary:hover {
  background-color: #3b347a;
}

/* Footers */
.auth-footer-desktop {
  margin-top: 24px;
  text-align: center;
}

.auth-footer-desktop p {
  font-size: 12px;
  color: var(--auth-text-muted);
  margin: 0;
  line-height: 1.5;
}

.auth-footer-desktop a {
  color: var(--auth-primary);
}

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

.auth-footer-mobile {
  display: none;
}

/* Responsive Styles */

/* Laptop / Short screens adjustment */
@media (max-width: 1400px),
(max-height: 850px) {
  .auth-features {
    gap: 20px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
  }

  .feature-icon img,
  .feature-icon svg {
    width: 24px;
    height: 24px;
  }

  .auth-sidebar-footer {
    margin-top: 20px;
  }

  .btn-auth-outline {
    margin-bottom: 2px;
    padding: 10px;
  }

  .login-page .btn-auth-outline {
    margin-bottom: 31px;
  }

  .login-form-container {
    padding: 0px 40px 20px 40px;
  }

  .register-form-container {
    padding: 80px 40px 20px 40px;
  }

  .auth-logo {
    top: 24px;
    right: 30px;
    height: 56px;
  }

  /* .auth-form-wrapper {
    padding-top: 60px;
  } */

  .register-form-container .auth-header {
    margin-bottom: 14px;
  }

  .register-form-container .auth-header h1 {
    font-size: 32px;
  }

  .register-form-container .auth-subtitle {
    font-size: 17px;
  }

  .oauth-buttons {
    gap: 8px;
    margin-bottom: 16px;
  }

  .btn-oauth {
    padding: 10px 16px;
  }

  .auth-divider {
    margin-bottom: 16px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .input-wrapper input {
    padding: 12px 44px;
  }

  .register-form-container .form-options {
    margin: 0px 0px 24px;
  }

  .btn-auth-primary {
    padding: 12px;
  }

  .auth-footer-desktop {
    margin-top: 16px;
  }
}

@media (max-width: 991px) {
  .auth-sidebar {
    display: none;
    /* Hide left panel entirely on mobile */
  }

  .auth-form-container {
    width: 100%;
    padding: 32px 24px;
    align-items: flex-start;
    overflow-y: visible;
  }

  .register-form-container .oauth-buttons {
    flex-direction: column;
  }

  .auth-form-wrapper {
    margin: auto 0;
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .auth-subtitle {
    font-size: 15px;
  }

  .mobile-logo-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: block;
    margin: 0;
    padding: 22px 24px 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--auth-border);
    z-index: 10;
  }

  .auth-logo {
    position: static;
    display: block;
    margin: 0;
  }

  .mobile-feature-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
  }

  .mobile-feature-icons .feature-icon {
    width: 56px;
    height: 56px;
    background: #F4F3FF;
    border-radius: 12px;
    margin-bottom: 0;
    box-shadow: none;
  }

  .mobile-feature-icons .feature-icon svg,
  .mobile-feature-icons .feature-icon img {
    stroke: var(--auth-primary);
  }

  .auth-header h1 {
    font-size: 28px;
  }

  .auth-footer-desktop {
    display: none;
  }

  .auth-footer-mobile {
    display: block;
    margin-top: 20px;
    text-align: center;
  }

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

  .auth-footer-mobile a {
    color: var(--auth-primary);
    text-decoration: none;
  }
}

@media (max-width: 480px) {
  .mobile-feature-icons .feature-icon {
    width: 48px;
    height: 48px;
  }
}

/* Auth Modal */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 249, 250, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal-overlay[hidden] {
  display: none;
}

.auth-modal-box {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 440px;
  padding: 40px;
  text-align: center;
  position: relative;
}

.auth-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #4D4499;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.auth-modal-close:hover {
  opacity: 0.7;
}

.auth-modal-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--auth-primary);
  margin: 0 0 12px;
}

.auth-modal-text {
  font-size: 15px;
  color: var(--auth-text-muted);
  line-height: 1.5;
  margin: 0 0 32px;
}

.auth-modal-redirect {
  background: #F8F9FA;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.auth-modal-redirect-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-modal-redirect-row img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.auth-modal-redirect-row span {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
}

.auth-modal-redirect-row span strong {
  color: var(--auth-primary);
  font-weight: 600;
}

.redirect-progress-container {
  width: 100%;
  height: 2px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
}

.redirect-progress-bar {
  height: 100%;
  background: var(--auth-primary);
  width: 0%;
  transition: width 3s linear;
}

@media (max-width: 575px) {
  .auth-modal-box {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .auth-modal-title {
    font-size: 20px;
  }

  .auth-modal-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }

  .auth-modal-text {
    font-size: 14px;
  }
}