/*=========================================================
  e-Samikshya Login — layout matched to reference
=========================================================*/

:root {
  --primary: #004a99;
  --primary-dark: #003670;
  --muted: #6b7280;
  --border: #d0d7e2;
  --page-bg: #8da8cede;
  --field-bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Poppins", sans-serif;
  background: var(--page-bg);
  color: #1f2937;
}

a {
  text-decoration: none;
}

/*========== PAGE SPLIT ==========*/

.login-page {
  display: flex;
  position: relative;
  height: calc(100vh - 18px);
  width: calc(100% - 24px);
  max-width: 1600px;
  margin: 9px auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(15, 35, 70, 0.12);
  background: #0a2a55;
}

/*========== LEFT BRANDING ==========*/

.brand-side {
  position: relative;
  flex: 1 1 62%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
}

.brand-bg {
  position: absolute;
  inset: 0;
  background: #0a2a55 url("images/left-bg.jpeg") center / cover no-repeat;
}

.brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 18, 45, 0.42) 0%,
    rgba(0, 25, 55, 0.28) 40%,
    rgba(0, 12, 35, 0.5) 100%
  );
}

.brand-center {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 40px 120px;
  max-width: 640px;
  width: 100%;
}

.uni-logo {
  display: block;
  width: 96px;
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.brand-center h1 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 2.8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.uni-location {
  font-size: clamp(0.65rem, 0.95vw, 0.8rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  margin: 0;
  color: #ffffff;
  opacity: 1;
}

.uni-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.uni-divider span {
  display: block;
  width: 100px;
  height: 1px;
  background: #ffffff;
}

.uni-divider i {
  font-size: 7px;
  line-height: 1;
  color: #ffffff;
}

.uni-tagline {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  font-weight: 400;
  margin: 0;
  color: #ffffff;
  opacity: 1;
}

/* Bottom feature bar */

.brand-footer {
  position: absolute;
  left: 28px;
  right: 80px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 12px;
}

.footer-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 6px;
  color: #ffffff;
}

.footer-item > i {
  font-size: 1.25rem;
  flex-shrink: 0;
  color: #ffffff;
  opacity: 1;
}

.footer-item strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
}

.footer-item small {
  display: block;
  font-size: 0.68rem;
  color: #ffffff;
  line-height: 1.3;
  opacity: 0.92;
}

.footer-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

/*========== RIGHT FORM ==========*/

.form-side {
  flex: 0 0 40%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
  background: #ffffff;
  margin-left: -56px;
  z-index: 10;
  border-radius: 10px 0 0 10px;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.22);
  overflow: auto;
}

.form-inner {
  width: 100%;
  max-width: 380px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.app-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-brand h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.app-brand p {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.form-intro {
  margin-bottom: 22px;
}

.form-intro h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.form-intro p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Fields */

.field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--field-bg);
  transition: border-color 0.2s;
}

.field:focus-within {
  border-color: var(--primary);
}

.field-icon {
  position: absolute;
  left: 14px;
  color: #7b8794;
  font-size: 1rem;
  pointer-events: none;
}

.field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 13px 42px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1f2937;
}

.field input::placeholder {
  color: #9aa3af;
}

.toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #8b95a1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
}

.toggle-pass:hover {
  color: var(--primary);
  background: #f3f6fb;
}

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: #555;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
}

.forgot:hover {
  text-decoration: underline;
}

/* Buttons */

.btn-primary,
.btn-sso {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  border: none;
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(0, 74, 153, 0.28);
}

.btn-sso {
  border: 1.5px solid #c8d0dc;
  background: #fff;
  color: #334155;
}

.btn-sso:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f7fafc;
}

.or-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.or-line::before,
.or-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.or-line span {
  font-size: 0.8rem;
  color: #9ca3af;
}

.copy {
  margin: 26px 0 0;
  text-align: center;
  font-size: 0.7rem;
  color: #9ca3af;
}

/*========== RESPONSIVE ==========*/

/* Large tablet / small laptop */
@media (max-width: 1200px) {
  .form-side {
    flex: 0 0 42%;
    padding: 36px 36px;
    margin-left: -40px;
  }

  .form-inner {
    max-width: 340px;
  }

  .brand-footer {
    left: 20px;
    right: 64px;
    bottom: 18px;
    padding: 14px 16px;
  }

  .footer-item strong {
    font-size: 0.7rem;
  }

  .footer-item small {
    font-size: 0.6rem;
  }

  .app-brand h2 {
    font-size: 1.35rem;
  }
}

/* Tablet */
@media (max-width: 991px) {
  html,
  body {
    overflow: auto;
    height: auto;
  }

  .login-page {
    flex-direction: column;
    width: calc(100% - 20px);
    height: auto;
    min-height: calc(100vh - 20px);
    margin: 10px auto;
    border-radius: 12px;
  }

  .brand-side {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 380px;
  }

  .brand-center {
    padding: 36px 28px 110px;
  }

  .uni-logo {
    width: 80px;
  }

  .brand-center h1 {
    font-size: 2rem;
  }

  .uni-location {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .uni-tagline {
    font-size: 1.05rem;
  }

  .uni-divider span {
    width: 80px;
  }

  .brand-footer {
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 14px 18px;
  }

  .footer-item {
    gap: 10px;
  }

  .footer-item > i {
    font-size: 1.15rem;
  }

  .footer-item strong {
    font-size: 0.72rem;
  }

  .footer-item small {
    font-size: 0.62rem;
  }

  .form-side {
    flex: none;
    flex-basis: auto;
    width: 100%;
    height: auto;
    min-height: auto;
    margin-left: 0;
    margin-top: -32px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.16);
    padding: 40px 40px 48px;
    overflow: visible;
  }

  .form-inner {
    max-width: 420px;
    margin: 0 auto;
  }
}

/* Large phones / small tablets */
@media (max-width: 768px) {
  .login-page {
    width: calc(100% - 16px);
    margin: 8px auto;
    border-radius: 10px;
  }

  .brand-side {
    min-height: 280px;
  }

  .brand-center {
    padding: 28px 20px 40px;
  }

  .brand-center h1 {
    font-size: 1.65rem;
  }

  .brand-footer {
    display: none;
  }

  .footer-item {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding: 0 4px;
  }

  .footer-divider {
    height: 36px;
  }

  .form-side {
    margin-top: -28px;
    border-radius: 18px 18px 0 0;
    padding: 36px 28px 44px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .login-page {
    width: calc(100% - 12px);
    min-height: calc(100vh - 12px);
    margin: 6px auto;
    border-radius: 10px;
  }

  .brand-side {
    min-height: 240px;
  }

  .brand-center {
    padding: 24px 16px 36px;
  }

  .uni-logo {
    width: 64px;
    margin-bottom: 12px;
  }

  .brand-center h1 {
    font-size: 1.4rem;
    letter-spacing: 0.03em;
  }

  .uni-location {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .uni-divider {
    margin: 14px 0;
  }

  .uni-divider span {
    width: 52px;
  }

  .uni-tagline {
    font-size: 0.9rem;
  }

  .form-side {
    margin-top: -24px;
    border-radius: 16px 16px 0 0;
    padding: 28px 18px 36px;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.14);
  }

  .form-inner {
    max-width: 100%;
  }

  .app-brand {
    margin-bottom: 22px;
  }

  .app-logo {
    width: 42px;
    height: 42px;
  }

  .app-brand h2 {
    font-size: 1.25rem;
  }

  .app-brand p {
    font-size: 0.8rem;
  }

  .form-intro {
    margin-bottom: 18px;
  }

  .form-intro h3 {
    font-size: 1.15rem;
  }

  .form-intro p {
    font-size: 0.8rem;
  }

  .field {
    margin-bottom: 12px;
  }

  .field input {
    padding: 12px 40px;
    font-size: 0.875rem;
  }

  .btn-primary,
  .btn-sso {
    height: 44px;
    font-size: 0.9rem;
  }

  .form-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .copy {
    margin-top: 22px;
    font-size: 0.65rem;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .login-page {
    width: 100%;
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }

  .brand-side {
    min-height: 280px;
    border-radius: 0;
  }

  .brand-center h1 {
    font-size: 1.25rem;
  }

  .form-side {
    margin-top: -20px;
    padding: 24px 14px 32px;
    border-radius: 14px 14px 0 0;
  }

  .remember,
  .forgot {
    font-size: 0.75rem;
  }
}
