/* ======================================================== */
/* Premium Authentication Styles from New Design            */
/* ======================================================== */

body.blank-page {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
body.blank-page .page-view {
  display: none;
  width: 100%;
  height: 100vh;
}
body.blank-page .page-view.active {
  display: flex;
}

/* ========== LEFT PANEL ========== */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--sidebar-bg);
}

/* Top: logo + title — auto height */
.left-top {
  flex-shrink: 0;
  padding: 36px 40px 22px;
  position: relative;
  z-index: 2;
}
.left-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.left-brand .brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent), #14B8A6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}
.left-brand .brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #FFF;
  letter-spacing: -0.3px;
}
.left-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #FFF;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.left-title span {
  background: linear-gradient(135deg, #14B8A6, #5EEAD4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Image: fixed 30% of panel height */
.left-image-wrap {
  flex-shrink: 0;
  height: 30vh;
  height: 45vh;
  padding: 0 40px;
}
.left-image-inner {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  /* border: 1px solid rgba(13, 148, 136, 0.15); */
  /* box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03) inset; */
  /* background: rgba(255,255,255,0.03); */
      background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.left-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.left-image-inner:hover img {
  transform: scale(1.03);
}

/* Body: features + bottom text — takes remaining space, scrollable */
.left-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 40px 32px;
  display: flex;
  flex-direction: column;
}
.left-body::-webkit-scrollbar {
  width: 0;
}
.left-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.left-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.left-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #14B8A6;
  font-size: 15px;
  backdrop-filter: blur(4px);
}
.left-feature-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3px;
}
.left-feature-text p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Bottom description pinned to bottom */
.left-bottom-desc {
  margin-top: auto;
  flex-shrink: 0;
}
.left-divider {
  width: 50px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-bottom: 14px;
}
.left-bottom-desc p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

/* ========== RIGHT PANEL ========== */
.right-panel {
  width: 540px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--white);
  position: relative;
}
.right-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(13, 148, 136, 0.12), transparent);
}
.right-scroll {
  flex: 1;
  overflow-y: auto;
}
.right-scroll::-webkit-scrollbar {
  width: 0;
}
.right-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 52px;
  min-height: 100%;
}
.right-header {
  margin-bottom: 28px;
}
.right-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.right-header p {
  font-size: 14px;
  color: var(--text-secondary);
}
.login-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 26px;
}
.login-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s;
  border: none;
  background: none;
  font-family: inherit;
}
.login-tab:hover {
  color: var(--text-primary);
}
.login-tab.active {
  background: var(--white);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.login-tab i {
  margin-right: 6px;
  font-size: 13px;
}
.form-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.form-panel.active {
  display: flex;
  animation: fadePanel 0.3s ease;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 0px; /* Overriding bootstrap default */
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.form-group label .required {
  color: var(--danger);
}
.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: -2px;
}
.input-wrapper {
  position: relative;
}
.input-wrapper input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--white);
  transition: all 0.2s;
  outline: none;
}
.input-wrapper input::placeholder {
  color: var(--text-muted);
}
.input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.input-wrapper input.has-icon {
  padding-left: 42px;
}
.input-wrapper .input-right-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}
.btn-send-otp {
  padding: 7px 16px;
  border-radius: 7px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-send-otp:hover {
  background: var(--accent-dark);
}
.btn-send-otp:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-send-otp.sent {
  background: var(--bg);
  color: var(--text-muted);
}
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}
.otp-input {
  width: 46px;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
  background: var(--white);
}
.otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.otp-input.filled {
  border-color: var(--accent);
  background: #F0FDFA;
}
.otp-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -6px;
}
.otp-hint strong {
  color: var(--accent);
  font-weight: 600;
}
.otp-timer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-top: -6px;
}
.otp-timer span {
  color: var(--accent);
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.remember-me input[type="checkbox"] {
  display: none;
}
.remember-me .checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.remember-me .checkmark i {
  font-size: 10px;
  color: white;
  opacity: 0;
  transition: opacity 0.15s;
}
.remember-me input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}
.remember-me input:checked + .checkmark i {
  opacity: 1;
}
.remember-me span {
  font-size: 13px;
  color: var(--text-secondary);
}
.forgot-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
.forgot-link:hover {
  opacity: 0.75;
}
.btn-primary {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 18px rgba(13, 148, 136, 0.3);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.social-buttons {
  display: flex;
  gap: 12px;
}
.btn-social {
  flex: 1;
  height: 46px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: inherit;
}
.btn-social:hover {
  background: var(--bg);
  border-color: #D1D5DB;
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.btn-social.google:hover {
  border-color: #FECACA;
  background: #FEF2F2;
  color: #DC2626;
}
.btn-social.linkedin:hover {
  border-color: #BFDBFE;
  background: #EFF6FF;
  color: #2563EB;
}
.btn-social .social-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-social .social-icon svg {
  width: 18px;
  height: 18px;
}
.right-footer {
  padding: 20px 52px 32px;
  border-top: 1px solid var(--border);
}
.right-footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.right-footer-links a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.link-create {
  color: var(--accent);
}
.link-create:hover {
  color: var(--accent-dark);
}
.link-scholar {
  color: var(--text-muted);
}
.link-scholar:hover {
  color: var(--text-secondary);
}
.right-footer-links .sep {
  width: 120px;
  height: 1px;
  background: var(--border);
}
.right-copyright {
  text-align: center;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.mobile-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #14B8A6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.mobile-brand .brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

@media(max-width: 1024px) {
  .left-panel {
    display: none;
  }
  .right-panel {
    width: 100%;
  }
  .right-panel::before {
    display: none;
  }
  .mobile-brand {
    display: flex !important;
  }
}

@media(max-width: 520px) {
  .right-content {
    padding: 32px 24px;
  }
  .right-footer {
    padding: 16px 24px 28px;
  }
  .right-header h1 {
    font-size: 24px;
  }
  .social-buttons {
    flex-direction: column;
  }
  .otp-inputs {
    gap: 8px;
  }
  .otp-input {
    width: 42px;
    height: 48px;
    font-size: 18px;
  }
}

/* Custom styles for the country code flag select inside register */
.phone-input-container {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}
.phone-code-select-wrapper {
  position: relative;
  flex-shrink: 0;
}
.phone-code-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-right: none;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}
.phone-code-btn:focus {
  border-color: var(--accent);
}
.phone-number-field {
  flex: 1;
  height: 46px;
  border: 1.5px solid var(--border);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: var(--white);
  transition: all 0.2s;
}
.phone-number-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.phone-code-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  z-index: 1000;
  min-width: 160px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: none;
}
.phone-code-dropdown.show {
  display: block;
}
.phone-code-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.phone-code-dropdown .dropdown-item:hover {
  background: #F3F4F6;
}
.phone-code-dropdown .dropdown-item .flag-icon {
  margin-right: 4px;
}
