/* ============================================
   LOGIN PAGE — OPTIVIEW-Style
   Full-screen image bg, floating dark form card on right
   ============================================ */

.login-body {
  margin: 0;
  padding: 0;
  background: #0a1428;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: #fff;
  position: relative;
  overflow-x: hidden;
}

/* ============================================
   FULL-SCREEN BACKGROUND
   ============================================ */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.login-bg-image {
  position: absolute;
  inset: 0;
  background:
    url('../assets/login-bg.jpg') center/cover no-repeat;
}
.login-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    /* Right side darker fade for form area */
    linear-gradient(90deg,
      rgba(4, 20, 45, 0.4) 0%,
      rgba(4, 20, 45, 0.55) 40%,
      rgba(4, 20, 45, 0.85) 75%,
      rgba(4, 20, 45, 0.95) 100%),
    /* Tonal shift to brand navy/teal */
    linear-gradient(135deg,
      rgba(10, 91, 176, 0.3) 0%,
      rgba(4, 43, 87, 0.5) 100%);
}

/* ============================================
   TOP BAR (Logo only, top-left)
   ============================================ */
.login-topbar {
  position: relative;
  z-index: 2;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
}
.login-brand {
  display: inline-block;
  text-decoration: none;
}
.login-brand img {
  height: 40px;
  width: auto;
  display: block;
}

/* ============================================
   MAIN — Form positioned on right
   ============================================ */
.login-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 5rem 0 2.5rem;
  min-height: calc(100vh - 168px);
}

/* ============================================
   FORM CARD (Glassmorphic, dark navy, on right)
   ============================================ */
.login-card {
  width: 100%;
  max-width: 480px;
  background: rgba(13, 27, 56, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.75rem 2.5rem;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.5);
}

.login-card-head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.login-card-head h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.login-card-head p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  font-weight: 400;
}

/* ============================================
   FORM FIELDS
   ============================================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.lf-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lf-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.005em;
}

.lf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.lf-input-icon {
  position: absolute;
  left: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(11, 30, 51, 0.5);
  pointer-events: none;
  transition: color 0.15s;
}
.lf-input-wrap input {
  width: 100%;
  padding: 0.75rem 0.875rem 0.75rem 2.375rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  color: #0B1E33;
  background: rgba(255, 255, 255, 0.92);
  transition: all 0.15s;
  outline: none;
  box-sizing: border-box;
}
.lf-input-wrap input::placeholder {
  color: rgba(11, 30, 51, 0.45);
}
.lf-input-wrap input:focus {
  background: #fff;
  border-color: #1BAFC4;
  box-shadow: 0 0 0 3px rgba(27, 175, 196, 0.25);
}
.lf-input-wrap input:focus ~ .lf-input-icon,
.lf-input-wrap:focus-within .lf-input-icon {
  color: #0A5BB0;
}

/* Eye toggle */
.lf-eye {
  position: absolute;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: rgba(11, 30, 51, 0.45);
  transition: all 0.15s;
}
.lf-eye:hover {
  color: #0A5BB0;
  background: rgba(10, 91, 176, 0.08);
}

/* ============================================
   REMEMBER ROW
   ============================================ */
.lf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-top: -0.25rem;
}
.lf-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-weight: 500;
}
.lf-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lf-checkbox-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  position: relative;
}
.lf-checkbox input:checked ~ .lf-checkbox-mark {
  background: linear-gradient(135deg, #0A5BB0, #1BAFC4);
  border-color: transparent;
}
.lf-checkbox input:checked ~ .lf-checkbox-mark::after {
  content: '';
  width: 8px;
  height: 4px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translateY(-1px);
}

.lf-forgot {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.lf-forgot:hover { color: #7DDDF0; }

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.lf-submit {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.005em;
  margin-top: 0.5rem;
}
.lf-submit:hover {
  background: linear-gradient(135deg, rgba(10, 91, 176, 0.7), rgba(27, 175, 196, 0.7));
  border-color: rgba(125, 221, 240, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 91, 176, 0.4);
}

/* ============================================
   DEMO ACCOUNTS (Subtle, collapsed by default)
   ============================================ */
.lf-demo {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}
.lf-demo summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.25rem;
  transition: color 0.15s;
}
.lf-demo summary::-webkit-details-marker { display: none; }
.lf-demo summary:hover { color: rgba(255, 255, 255, 0.85); }
.lf-demo summary svg { transition: transform 0.2s; }
.lf-demo[open] summary svg { transform: rotate(180deg); }

.lf-demo-grid {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.mock-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.mock-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(125, 221, 240, 0.3);
}
.mock-role {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #7DDDF0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mock-email {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Inter', monospace;
}

/* ============================================
   BOTTOM BAR
   ============================================ */
.login-bottombar {
  position: relative;
  z-index: 2;
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.lb-copyright {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}
.lb-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.lb-link:hover { color: #7DDDF0; }


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .login-topbar { padding: 1.25rem 1.5rem; }
  .login-main {
    padding: 0 1.5rem;
    justify-content: center;
    min-height: calc(100vh - 140px);
  }
  .login-card { padding: 2rem 1.5rem; }
  .login-bottombar {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  /* Stronger overlay on mobile so text is readable over image */
  .login-bg-overlay {
    background:
      linear-gradient(180deg,
        rgba(4, 20, 45, 0.5) 0%,
        rgba(4, 20, 45, 0.7) 50%,
        rgba(4, 20, 45, 0.92) 100%);
  }
}

@media (max-width: 480px) {
  .login-card-head h1 { font-size: 1.0625rem; letter-spacing: 0.02em; }
  .login-brand img { height: 32px; }
}


/* ============================================
   ADDITIONAL STYLES — Register / Forgot / OTP
   ============================================ */

/* Wider card variant for register (2-col forms) */
.login-card-wide {
  max-width: 540px;
}

/* 2-col grid inside form */
.lf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}
@media (max-width: 480px) {
  .lf-grid-2 { grid-template-columns: 1fr; }
}

/* Block-level checkbox (for terms) */
.lf-checkbox-block {
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.25rem;
}
.lf-checkbox-block .lf-checkbox-mark {
  margin-top: 1px;
}
.lf-inline-link {
  color: #7DDDF0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.lf-inline-link:hover { color: #fff; text-decoration: underline; }

/* Bottom alt line (Don't have an account? / Already have one?) */
.lf-altline {
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.5rem 0 0;
}
.lf-altline a {
  color: #7DDDF0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.lf-altline a:hover { color: #fff; text-decoration: underline; }

/* Info box (forgot password) */
.lf-info-box {
  padding: 0.875rem 1rem;
  background: rgba(125, 221, 240, 0.08);
  border: 1px solid rgba(125, 221, 240, 0.2);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
}
.lf-info-box p { margin: 0; }

/* ============================================
   OTP page specific
   ============================================ */
.otp-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(125, 221, 240, 0.12);
  border: 1px solid rgba(125, 221, 240, 0.25);
  color: #7DDDF0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.login-card-head { display: flex; flex-direction: column; align-items: center; }

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}
.otp-input {
  width: 50px;
  height: 56px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0B1E33;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  outline: none;
  transition: all 0.15s;
  caret-color: #1BAFC4;
}
.otp-input:focus {
  background: #fff;
  border-color: #1BAFC4;
  box-shadow: 0 0 0 3px rgba(27, 175, 196, 0.25);
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .otp-input { width: 42px; height: 50px; font-size: 1.25rem; }
  .otp-inputs { gap: 0.4rem; }
}

.otp-resend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
}
.lf-textbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7DDDF0;
  padding: 0;
  transition: color 0.15s;
}
.lf-textbtn:disabled {
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}
.lf-textbtn:not(:disabled):hover { color: #fff; }
