/* Unified Auth Styles */
:root {
  --maroon: #5b4a42;
  --maroon-2: #5b4a42;
  --accent: #FFE1AF;
  --bg-soft: #fff6f7;
  --bg-panel: #ffffff;
  --border-col: rgba(123, 30, 45, .12);
  --radius-xl: 28px;
}

/* Animation tokens */
:root{
  --ease-out: cubic-bezier(.21,1,.21,1);
  --anim-med: 520ms;
}

body.auth-body,
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, #ffe3e7 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 88% 82%, #fdd5db 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(150deg, #fff, #fff6f7 65%, #ffeef1);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

.auth-shell {
  max-width: 1180px;
  width: 100%;
  margin: clamp(1.5rem, 4vh, 3rem) auto;
  padding: 0 1.2rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: 470px 1fr;
  gap: 2.2rem;
  align-items: stretch;
}

@media (max-width:1020px) {
  .auth-grid {
    grid-template-columns: 1fr
  }

  .brand-pane {
    order: 2
  }

  .form-pane {
    order: 1
  }
}

.brand-pane {
  position: relative;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-2) 60%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 3rem 2.6rem 3.4rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 24px 50px -18px rgba(123, 30, 45, .30);
}

.brand-pane.with-photo:before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/unikl_campus.jpg') center/cover no-repeat;
  opacity: .22;
  mix-blend-mode: overlay;
}

.brand-head h1 {
  font-weight: 800;
  font-size: clamp(1.95rem, 2.7vw, 2.6rem);
  letter-spacing: -1px;
  margin: 0 0 .75rem;
}

.brand-head p {
  font-size: .95rem;
  opacity: .9;
  margin: 0 0 1.4rem;
  line-height: 1.45;
}

.brand-bullets {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
}

.brand-bullets li {
  display: flex;
  gap: .6rem;
  font-size: .86rem;
  margin: .5rem 0;
  opacity: .95;
}

.brand-bullets li i {
  color: #ffe5ea;
  margin-top: .15rem;
}

.version-note {
  font-size: .68rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  opacity: .6;
}

.logo-badge {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .25);
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.logo-badge img {
  width: 90%;
  height: auto;
}

.form-pane,
.reset-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-col);
  border-radius: var(--radius-xl);
  padding: 3rem clamp(1.8rem, 2.4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 14px 44px -18px rgba(123, 30, 45, .18);
}

.form-pane h3 {
  font-weight: 700;
  margin: 0 0 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--maroon);
  letter-spacing: -.5px;
}

.subtitle {
  font-size: .9rem;
  color: #677079;
  margin: -.4rem 0 1.6rem;
}

.floating-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.floating-group input {
  width: 100%;
  padding: 1.05rem 3.1rem 1.05rem 3.1rem;
  border: 1px solid #d9dde2;
  border-radius: 16px;
  background: #fff;
  font-size: .95rem;
  transition: .25s;
}

.floating-group input:focus {
  border-color: var(--maroon-2);
  box-shadow: 0 6px 22px -10px rgba(123, 30, 45, .35);
  outline: none;
}

.floating-group label {
  position: absolute;
  left: 3.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .88rem;
  color: #737e87;
  background: #fff;
  padding: 0 .35rem;
  transition: .22s;
  pointer-events: none;
}

.floating-group input:focus+label,
.floating-group input:not(:placeholder-shown)+label {
  top: 0;
  transform: translateY(-50%) scale(.82);
  color: var(--maroon-2);
  font-weight: 600;
}

.floating-group .icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa2ac;
  font-size: 1.05rem;
  transition: .25s;
  pointer-events: none;
}

.floating-group input:focus~.icon {
  color: var(--maroon-2);
}

.toggle-pass {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8d97a0;
  cursor: pointer;
  font-size: 1rem;
  padding: .35rem .4rem;
}

.toggle-pass:hover {
  color: var(--maroon-2);
}

.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: none;
  border-radius: 16px;
  padding: .95rem 1rem;
  font-weight: 600;
  font-size: .95rem;
  transition: .25s;
}

.btn-primary-auth {
  background: linear-gradient(95deg, var(--maroon), var(--maroon-2));
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(123, 30, 45, .55);
}

.btn-primary-auth:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px -14px rgba(123, 30, 45, .55);
}

.btn-outline-auth {
  background: #fff;
  border: 1px solid #d9dde2;
  color: #5d6770;
}

.btn-outline-auth:hover {
  border-color: var(--maroon-2);
  color: var(--maroon-2);
  box-shadow: 0 8px 26px -12px rgba(123, 30, 45, .35);
}

.options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .3rem 0 1.3rem;
}

.options-row a {
  font-size: .78rem;
  text-decoration: none;
  color: var(--maroon-2);
  font-weight: 600;
}

.options-row a:hover {
  text-decoration: underline;
}

.alert {
  border-radius: 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.1rem 0 1.2rem;
}

.divider span {
  flex: 0 0 auto;
  font-size: .7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: #7d8791;
}

.divider:before,
.divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, 0));
}

.divider:after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .08));
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  margin-top: 1.05rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--maroon-2);
}

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

.reset-card {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 2rem;
}

@media (max-width:1020px) {
  .reset-card {
    grid-template-columns: 1fr
  }
}

@media (max-width:600px) {
  .form-pane {
    padding: 2.1rem 1.4rem 2.6rem;
  }

  .floating-group input {
    padding: .95rem 2.9rem .95rem 2.9rem;
  }

  .floating-group label {
    left: 2.9rem;
  }
}

.login-container h3 {
  color: var(--maroon);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: bold;
  margin-bottom: 20px;
}

/* Glassmorphism login box */
.login-container {
  background: linear-gradient(135deg, var(--maroon), var(--bg-soft));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  width: 450px;
  color: #fff;
  box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.3);
}

/* Profile icon circle */
.login-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.15) url('https://cdn-icons-png.flaticon.com/512/847/847969.png') center/50% no-repeat;
}

/* Input fields */
.login-form input {
  width: 100%;
  margin: 12px 0;
  padding: 12px 15px;
  border: none;
  border-bottom: 1px solid #ccc;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
}

/* Placeholder color */
.login-form input::placeholder {
  color: #ccc;
}

/* Remember me + Forgot password */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin: 15px 0;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.login-options a {
  color: #ffffffff;
  text-decoration: none;
}

.login-options a:hover {
  text-decoration: underline;
}

/* Login button */
.btn-logins {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #7b1e2d, #9b2b3a);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-logins:hover {
  opacity: 0.9;
}

.btn-backs {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: #f9f0f1;
  text-decoration: none;
}

.btn-backs:hover {
  text-decoration: underline;
}

/* Enter animations (triggered by .auth-shell.is-ready) */
.auth-shell .brand-pane,
.auth-shell .form-pane{
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--anim-med) var(--ease-out),
              transform var(--anim-med) var(--ease-out);
  will-change: opacity, transform;
}

.auth-shell.is-ready .brand-pane{
  opacity: 1; transform: none; transition-delay: .05s;
}
.auth-shell.is-ready .form-pane{
  opacity: 1; transform: none; transition-delay: .18s;
}

/* Subtle floating gradient behind brand pane */
@keyframes floaty {
  0%,100%{ transform: translateY(0); filter: hue-rotate(0deg); }
  50%{ transform: translateY(-6px); filter: hue-rotate(10deg); }
}
.brand-pane.with-photo{
  position: relative; isolation: isolate;
}
.brand-pane.with-photo::after{
  content:"";
  position: absolute; inset: -10px;
  background:
    radial-gradient(560px 120px at 20% 0%, rgba(13,110,253,.08), transparent 60%),
    radial-gradient(560px 120px at 80% 100%, rgba(6,182,212,.08), transparent 60%);
  border-radius: 18px;
  pointer-events: none;
  z-index: -1;
  animation: floaty 8s ease-in-out infinite;
}

/* Logo gentle breathing glow */
@keyframes breathe {
  0%,100%{ filter: drop-shadow(0 6px 18px rgba(13,110,253,.18)); transform: translateY(0); }
  50%{ filter: drop-shadow(0 8px 22px rgba(13,110,253,.28)); transform: translateY(-2px); }
}
.logo-badge img{ animation: breathe 5s ease-in-out infinite; }

/* Button hover lift */
.btn-auth{
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), filter .18s;
}
.btn-auth:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -18px rgba(15,23,36,.35);
  filter: saturate(1.05);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .auth-shell .brand-pane,
  .auth-shell .form-pane,
  .brand-pane.with-photo::after,
  .logo-badge img,
  .btn-auth{
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}