/* =========================================================
   THE MILLENNIUM UNIVERSITY (TMU) — CLEAN MODERN LOGIN UI v3.0
   Aesthetic on Desktop & Mobile • Single Logo • Zero Input Clutter
   ========================================================= */

.utility-brand-tag {
  display: inline-flex;
  align-items: center;
  color: #DCEAF8;
  font-size: 11.4px;
  font-weight: 600;
  white-space: nowrap;
}

.portal-navbar .nav-inner {
  min-height: 60px;
}

.portal-nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.portal-nav-brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.portal-navbar .nav-menu {
  margin: 0 0 0 auto;
}

/* =========================================================
   AMBIENT STAGE
   ========================================================= */
.portal-login-main {
  position: relative;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 60px;
  background:
    radial-gradient(circle at 12% 18%, rgba(29, 91, 150, 0.11) 0%, transparent 44%),
    radial-gradient(circle at 88% 82%, rgba(176, 138, 51, 0.10) 0%, transparent 44%),
    linear-gradient(160deg, #F6FAFF 0%, #EAF2FB 100%);
  overflow: hidden;
}

.portal-bg-watermark {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 420px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
   WIDE RECTANGULAR CARD (DESKTOP) & SLEEK STACKED CARD (MOBILE)
   ========================================================= */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  min-height: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(217, 229, 242, 0.95);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 22px 54px rgba(11, 37, 69, 0.10),
    0 4px 14px rgba(11, 37, 69, 0.04);
  animation: authCardIn 0.55s var(--ease-smooth) both;
}

/* Navy Aesthetic Panel */
.auth-visual-panel {
  position: relative;
  padding: 46px 36px;
  background: linear-gradient(155deg, #071A33 0%, #0E315C 55%, #1D5B96 100%);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-visual-panel::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 230, 174, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.auth-visual-sun {
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 230px;
  opacity: 0.11;
  filter: brightness(2.4);
  pointer-events: none;
}

.auth-visual-top {
  position: relative;
  z-index: 2;
}

.auth-visual-kicker {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #FDE6AE;
  margin-bottom: 12px;
}

.auth-visual-panel h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 14px;
}

.auth-visual-panel p {
  font-size: 13.4px;
  line-height: 1.65;
  color: #CFE4FA;
  max-width: 270px;
}

.auth-visual-bottom {
  position: relative;
  z-index: 2;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11.6px;
  font-weight: 600;
  color: #DCEAF8;
  letter-spacing: 0.2px;
}

/* Form Panel */
.auth-form-panel {
  position: relative;
  padding: 44px 46px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-view {
  animation: authViewIn 0.36s var(--ease-smooth) both;
}

.auth-view.hidden {
  display: none;
}

.auth-head {
  margin-bottom: 24px;
}

.auth-head h1,
.auth-head h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 23px;
  font-weight: 900;
  color: var(--tmu-navy);
  margin-bottom: 6px;
}

.auth-head p {
  font-size: 13.2px;
  color: var(--tmu-muted);
}

/* Alert Box */
.auth-alert {
  display: none;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 12.4px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.45;
}

.auth-alert.show {
  display: block;
  animation: authViewIn 0.28s var(--ease-smooth);
}

.auth-alert.is-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.auth-alert.is-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}

/* Clean Form Inputs (Zero Left Icons) */
.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 10.8px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--tmu-navy);
  margin-bottom: 7px;
}

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

.auth-input-wrap input {
  width: 100%;
  padding: 12.5px 14px;
  border: 1.5px solid var(--tmu-border);
  border-radius: 10px;
  background: #FAFBFD;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--tmu-text);
  outline: none;
  transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.auth-input-wrap input[type="password"],
.auth-input-wrap input#loginPassword {
  padding-right: 60px;
}

.auth-input-wrap input::placeholder {
  color: #94A3B8;
  font-weight: 500;
}

.auth-input-wrap input:focus {
  border-color: var(--tmu-blue);
  background: #FFFFFF;
  box-shadow: 0 0 0 3.5px rgba(29, 91, 150, 0.11);
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  padding: 5px 9px;
  border: none;
  background: transparent;
  color: var(--tmu-blue);
  border-radius: 6px;
  cursor: pointer;
  font-size: 11.8px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.password-toggle-btn:hover {
  background: var(--tmu-ice);
  color: var(--tmu-navy);
}

.auth-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 12.6px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--tmu-muted);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--tmu-blue);
  cursor: pointer;
}

.auth-text-btn {
  border: none;
  background: transparent;
  color: var(--tmu-blue);
  font-size: 12.6px;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-btn:hover {
  color: var(--tmu-navy);
  text-decoration: underline;
}

/* Primary Button with Smooth Shine & Press */
.auth-submit-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tmu-navy) 0%, var(--tmu-blue) 100%);
  color: #FFFFFF;
  font-size: 13.2px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(11, 37, 69, 0.18);
  transition: transform 0.22s var(--ease-smooth), box-shadow 0.22s ease, background 0.22s ease;
}

.auth-submit-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
}

.auth-submit-btn:hover:not(:disabled)::after {
  left: 140%;
}

.auth-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #071A33 0%, #154B7E 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 11px 24px rgba(11, 37, 69, 0.24);
}

.auth-submit-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.auth-submit-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-secondary-btn {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--tmu-border);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--tmu-navy);
  font-size: 12.8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.auth-secondary-btn:hover {
  background: var(--tmu-ice);
  border-color: var(--tmu-blue);
  color: var(--tmu-blue);
}

/* Minimal Footer Links */
.auth-card-footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--tmu-border-soft);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12.2px;
  color: var(--tmu-muted);
}

.auth-card-footer a {
  color: var(--tmu-blue);
  font-weight: 700;
}

.auth-card-footer a:hover {
  color: var(--tmu-navy);
  text-decoration: underline;
}

.auth-dot-sep {
  color: #CBD5E1;
}

/* =========================================================
   SMOOTH PORTAL ENTRY SUCCESS OVERLAY
   ========================================================= */
.auth-success-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(7, 26, 51, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: #FFFFFF;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.4s var(--ease-smooth);
}

.auth-success-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.auth-success-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16);
  border: 2px solid #4ADE80;
  color: #4ADE80;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transform: scale(0.5);
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.08s;
}

.auth-success-overlay.active .auth-success-ring {
  transform: scale(1);
}

.auth-success-overlay h3 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 20px;
  margin-bottom: 6px;
}

.auth-success-overlay p {
  font-size: 13px;
  color: #CFE4FA;
  margin-bottom: 18px;
}

.auth-success-bar {
  width: 170px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.auth-success-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #FDE6AE, #4ADE80);
  border-radius: 99px;
}

.auth-success-overlay.active .auth-success-bar span {
  animation: authLoadBar 0.72s var(--ease-smooth) forwards;
}

@keyframes authLoadBar {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes authCardIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes authViewIn {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* =========================================================
   RESPONSIVE — AESTHETIC MOBILE HEADER BANNER
   ========================================================= */
@media (max-width: 900px) {
  .portal-navbar .nav-menu { display: none; }
  .portal-nav-brand img { height: 34px; }

  .auth-card {
    max-width: 500px;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  /* Sleek Top Navy Header on Mobile (Instead of Hiding It) */
  .auth-visual-panel {
    padding: 26px 24px 22px;
    border-bottom: 3px solid var(--tmu-gold);
  }

  .auth-visual-kicker {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .auth-visual-panel h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .auth-visual-panel p {
    font-size: 12.6px;
    max-width: 100%;
    line-height: 1.5;
  }

  .auth-visual-bottom {
    display: none;
  }

  .auth-visual-sun {
    width: 150px;
    right: -28px;
    bottom: -36px;
  }

  .auth-form-panel {
    padding: 28px 24px 24px;
  }

  .auth-card-footer {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .utility-brand-tag { font-size: 10.4px; }
  .portal-login-main { padding: 22px 0 38px; min-height: auto; }
  .auth-card { border-radius: 16px; }
  .auth-visual-panel { padding: 22px 20px 18px; }
  .auth-form-panel { padding: 24px 20px 20px; }
  .auth-head { margin-bottom: 18px; }
  .auth-head h1, .auth-head h2 { font-size: 20px; }
}
