:root{
  --uni-deep: #3d1019;
  --uni-deep-2: #741f2b;
  --uni-gold: #d59a68;
  --uni-gold-soft: #f1c7a5;
  --uni-surface: rgba(255,255,255,0.82);
  --uni-border: rgba(18,42,74,0.12);
  --uni-text: #35171d;
  --uni-muted: #806a6d;
}

* { box-sizing: border-box; }

body.uni-bg{
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(213, 154, 104, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(116, 31, 43, 0.14), transparent 30%),
    linear-gradient(180deg, #fbf6f2 0%, #f3e4e4 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--uni-text);
  overflow-x: hidden;
}

.login-backdrop{
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(61, 16, 25, .98), rgba(116, 31, 43, .94) 52%, rgba(145, 76, 72, .84));
  z-index: 0;
}

.login-backdrop::before{
  content: "";
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: min(72vw, 720px);
  aspect-ratio: 1;
  background: url('../images/logo-transparent.png') center / contain no-repeat;
  opacity: .075;
  transform: translate(-50%, -50%);
  animation: slowLogoBounce 8s ease-in-out infinite;
}

.login-backdrop::after{
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 20, 37, .58), rgba(5, 20, 37, .14) 58%, rgba(5, 20, 37, .34));
}

.backdrop-grid{
  position: absolute;
  inset: -30%;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(500px) rotateX(58deg) rotateZ(-12deg);
  animation: gridDrift 18s linear infinite;
  z-index: 3;
}

.backdrop-line{
  position: absolute;
  height: 2px;
  width: 55vw;
  background: linear-gradient(90deg, transparent, rgba(213,154,104,.72), transparent);
  filter: blur(.2px);
  transform: rotate(-26deg);
  animation: lightSweep 8s ease-in-out infinite;
}

.line-one{top: 24%; left: -8%;}
.line-two{top: 62%; right: -10%; animation-delay: -3s;}

.backdrop-book{
  position: absolute;
  width: 210px;
  height: 270px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.04) 13%, rgba(255,255,255,.08) 88%, rgba(255,255,255,.2));
  box-shadow: 24px 28px 0 rgba(0,0,0,.08), inset 12px 0 0 rgba(231,185,61,.2);
  opacity: .42;
  transform: rotate(13deg);
  animation: bookFloat 9s ease-in-out infinite;
}

.book-one{right: 9%; top: 14%;}
.book-two{right: 22%; top: 28%; transform: rotate(-10deg) scale(.72); animation-delay: -2s;}
.book-three{left: 5%; bottom: -9%; transform: rotate(-17deg) scale(.86); animation-delay: -5s;}

.backdrop-mark{
  position: absolute;
  color: rgba(255,255,255,.3);
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 700;
  animation: markFloat 7s ease-in-out infinite;
}

.mark-one{left: 10%; top: 20%; color: rgba(213,154,104,.72);}
.mark-two{right: 38%; bottom: 12%; animation-delay: -2s;}
.mark-three{left: 43%; top: 10%; font-size: 2rem; animation-delay: -4s;}

@keyframes gridDrift{to{transform: perspective(500px) rotateX(58deg) rotateZ(-12deg) translate3d(42px,42px,0)}}
@keyframes lightSweep{0%,100%{opacity:.12; transform:translateX(-12%) rotate(-26deg)}50%{opacity:.8; transform:translateX(32%) rotate(-26deg)}}
@keyframes bookFloat{0%,100%{translate:0 0 rotate(13deg)}50%{translate:0 -16px rotate(16deg)}}
@keyframes markFloat{0%,100%{translate:0 0; opacity:.25}50%{translate:0 -14px; opacity:.55}}
@keyframes slowLogoBounce{0%,100%{transform:translateY(0) rotate(0deg)}50%{transform:translateY(-10px) rotate(1deg)}}
@keyframes featureReveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

.bg-orb {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}

/* Keep the backdrop atmospheric without letting decoration compete with the login controls. */
.bg-orb { display: none; }

.orb-one {
  background: rgba(12, 50, 90, 0.35);
  top: -160px;
  left: -130px;
}

.orb-two {
  background: rgba(71, 177, 183, 0.2);
  right: -120px;
  bottom: -140px;
}

.uni-header{
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, var(--uni-deep) 0%, var(--uni-deep-2) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 25px rgba(7, 21, 38, 0.18);
}

.uni-logo{
  width: 70px;
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.uni-title{
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.uni-sub{
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 104px);
  display: flex;
  align-items: center;
  padding: 52px 0;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 34px;
  align-items: center;
}

.auth-story {
  position: relative;
  background: rgba(61, 16, 25, .48);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 28px;
  padding: 40px 34px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(2,14,30,.28), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.08);
  animation: floatUp 0.8s ease-out;
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(213,154,104,.85) 28%, rgba(255,255,255,.9) 52%, transparent 85%);
  box-shadow: 0 0 18px rgba(213,154,104,.42);
}

.auth-story > * {
  position: relative;
  z-index: 1;
}

.story-badge {
  display: inline-block;
  background: rgba(213, 154, 104, 0.18);
  color: #7b4a32;
  border: 1px solid rgba(213, 154, 104, 0.4);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-story h2 {
  margin: 22px 0 18px;
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
}

.auth-story p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,.76);
  margin-bottom: 28px;
}

.feature-list {
  display: grid;
  gap: 18px;
}

.feature-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 24px rgba(1,14,29,.12);
  transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
  animation: featureReveal .7s ease-out both;
}

.feature-item:nth-child(2) { animation-delay: .12s; }
.feature-item:nth-child(3) { animation-delay: .24s; }

.feature-item:hover {
  transform: translateY(-4px) translateX(3px);
  border-color: rgba(213,154,104,.55);
  background: linear-gradient(135deg, rgba(255,255,255,.21), rgba(255,255,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 16px 30px rgba(1,14,29,.2);
}

.feature-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--uni-deep) 0%, var(--uni-deep-2) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 10px 22px rgba(15, 36, 64, 0.18);
}

.feature-item strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 4px;
}

.feature-item small {
  display: block;
  color: rgba(255,255,255,.68);
  line-height: 1.5;
}

.auth-card-wrap {
  display: flex;
  justify-content: center;
  animation: floatUp 0.9s ease-out 0.1s both;
}

.auth-card-wrap:hover .uni-card {
  transform: translateY(-4px);
  box-shadow: 0 34px 78px rgba(2,14,30,.38), inset 0 1px 0 rgba(255,255,255,.48), inset 0 -1px 0 rgba(255,255,255,.08);
}

.uni-card {
  width: min(100%, 430px);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.1));
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  box-shadow: 0 28px 70px rgba(2, 14, 30, .32), inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}

.uni-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
}

.uni-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  top: -110px;
  right: -80px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  filter: blur(4px);
  pointer-events: none;
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 30px 26px 26px;
}

.card-topline {
  margin-bottom: 10px;
}

.card-pill {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.card-title {
  font-size: clamp(1.9rem, 2vw, 2.3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.card-subtitle {
  color: rgba(255,255,255,.72);
  margin-bottom: 22px;
}

.form-label {
  font-weight: 600;
  color: rgba(255,255,255,.9);
}

.form-control,
.form-select {
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  background: rgba(255,255,255,.13);
  color: #fff;
  padding: 0.8rem 0.9rem;
  transition: all 0.25s ease;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(255,255,255,.72);
  box-shadow: 0 0 0 0.18rem rgba(255,255,255,.12), 0 8px 25px rgba(0,0,0,.08);
  background: rgba(255,255,255,.2);
  color: #fff;
}

.form-control::placeholder { color: rgba(255,255,255,.58); }
.form-select option { color: var(--uni-text); }
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,.13) inset;
  transition: background-color 9999s ease-in-out 0s;
}
.form-control:focus-visible,
.form-select:focus-visible,
.uni-btn:focus-visible,
.form-check-input:focus-visible {
  outline: 3px solid rgba(247,215,120,.72);
  outline-offset: 3px;
}

.small-text {
  color: rgba(255,255,255,.7);
}

.small-text a,
.text-muted a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.uni-card .text-muted {
  color: rgba(255,255,255,.68) !important;
}

.recovery-card {
  width: min(100%, 480px);
}

.recovery-logo {
  display: block;
  width: 74px;
  height: 74px;
  object-fit: contain;
  margin: 0 auto 16px;
  opacity: .9;
}

.recovery-link {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  text-decoration: none;
}

.recovery-link:hover { color: #fff; text-decoration: underline; }

.uni-btn {
  background: linear-gradient(135deg, var(--uni-deep) 0%, var(--uni-deep-2) 100%);
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 1.25rem;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 30px rgba(61, 16, 25, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.uni-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(61, 16, 25, 0.3);
  color: #fff;
}

.alert {
  border-radius: 14px;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

footer {
  position: relative;
  z-index: 1;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-story {
    padding: 28px 20px;
  }
}

@media (max-width: 767px) {
  .uni-header .container {
    justify-content: center;
    text-align: center;
  }

  .uni-header {
    padding: 8px 0;
  }

  .auth-shell {
    padding-top: 30px;
  }

  .auth-story h2 {
    font-size: 2.2rem;
  }

  .card-body {
    padding: 24px 18px 20px;
  }

  .backdrop-book {
    width: 140px;
    height: 190px;
    opacity: .28;
  }

  .book-one { right: -24%; top: 17%; }
  .book-two { right: -8%; top: 32%; }
  .mark-two { right: 12%; bottom: 10%; }

  .login-backdrop::before { width: 92vw; }
}

@media (max-width: 575px) {
  .uni-logo { width: 56px; }
  .uni-title { font-size: 1.18rem; }
  .uni-sub { font-size: .68rem; }
  .auth-shell { min-height: auto; padding: 28px 0 22px; }
  .auth-grid { gap: 22px; }
  .auth-story { padding: 24px 18px; border-radius: 20px; }
  .auth-story h2 { margin-top: 16px; font-size: 1.85rem; }
  .auth-story p { font-size: .92rem; line-height: 1.6; margin-bottom: 20px; }
  .feature-list { gap: 10px; }
  .feature-item { gap: 10px; padding: 11px 12px; border-radius: 13px; }
  .feature-icon { width: 32px; height: 32px; flex: 0 0 32px; }
  .feature-item strong { font-size: .9rem; }
  .feature-item small { font-size: .76rem; }
  .uni-card { border-radius: 20px; }
  .card-body { padding: 22px 16px 18px; }
  .card-title { font-size: 1.75rem; }
  .card-subtitle { margin-bottom: 18px; font-size: .9rem; }
  .form-control, .form-select { border-radius: 11px; padding: .72rem .8rem; }
  .uni-btn { border-radius: 11px; padding: .8rem 1rem; }
  footer { padding-bottom: 14px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop-grid,
  .backdrop-line,
  .backdrop-book,
  .backdrop-mark,
  .login-backdrop::before,
  .auth-story,
  .feature-item,
  .auth-card-wrap {
    animation: none;
  }

  .feature-item,
  .auth-card-wrap:hover .uni-card { transition: none; transform: none; }
}

/* ===== LOGIN SYSTEM BLUE ===== */
:root{
  --uni-deep:#012d66;
  --uni-deep-2:#023e8a;
  --uni-gold:#72c7df;
  --uni-gold-soft:#b9e8f2;
  --uni-text:#082f55;
  --uni-muted:#53718b;
}
body.uni-bg{background:linear-gradient(180deg,#f4fbfd 0%,#dceff7 100%);color:var(--uni-text)}
.login-backdrop{background:linear-gradient(118deg,rgba(1,45,102,.98),rgba(2,62,138,.94) 52%,rgba(0,150,199,.84))}
.uni-header{background:linear-gradient(90deg,var(--uni-deep) 0%,var(--uni-deep-2) 100%)}
.auth-story{background:rgba(1,45,102,.48)}
.story-badge{color:#dff6fc;border-color:rgba(114,199,223,.5);background:rgba(114,199,223,.18)}
.auth-story::before{background:linear-gradient(90deg,transparent,rgba(114,199,223,.85) 28%,rgba(255,255,255,.9) 52%,transparent 85%);box-shadow:0 0 18px rgba(114,199,223,.42)}
.feature-icon{background:linear-gradient(135deg,var(--uni-deep),var(--uni-deep-2))}
.uni-card{background:linear-gradient(145deg,rgba(2,62,138,.24),rgba(1,45,102,.1))}
.uni-btn{background:linear-gradient(135deg,var(--uni-deep) 0%,var(--uni-deep-2) 100%)}
.uni-btn:hover{background:linear-gradient(135deg,var(--uni-deep-2) 0%,#0096c7 100%)}
.uni-header,.uni-header .uni-title,.uni-header .uni-sub{color:#fff}
