/* Login page design + simple Connect Interface (step 2) */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&display=swap');

body.login-interface {
  /* Blue palette aligned with eZee logo */
  --auth-ink: #14212b;
  --auth-muted: #5b6b76;
  --auth-line: #d5dde3;
  --auth-surface: rgba(255, 255, 255, 0.96);
  --auth-accent: #1a73e8;
  --auth-accent-deep: #0d47a1;
  --auth-accent-soft: #e8f1fc;
  --auth-glow: rgba(26, 115, 232, 0.22);
  --auth-radius: 18px;
  --auth-font: 'Manrope', sans-serif;
  --auth-display: 'Source Serif 4', Georgia, serif;

  font-family: var(--auth-font);
  color: var(--auth-ink);
  background-color: #e9eef5;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 15%, rgba(26, 115, 232, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 85%, rgba(13, 71, 161, 0.1), transparent 50%),
    linear-gradient(160deg, #f2f5f9 0%, #e6ecf4 45%, #e4eaf3 100%);
  background-attachment: fixed;
  min-height: 100%;
  padding: 32px 16px !important;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.login-interface::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 33, 43, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 43, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  z-index: 0;
}

/* Keep overlays out of the flex flow so the login card stays centered */
body.login-interface > #wait {
  position: fixed !important;
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login-interface > #wait .card {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  margin: 0;
}

body.login-interface > .progress,
body.login-interface > #divAlert,
body.login-interface > #divMsgBox,
body.login-interface > #divModalContainer {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
  z-index: 100;
}

body.login-interface > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 0 0 auto;
}

body.login-interface .form-signin {
  width: 100%;
  max-width: 460px;
  padding: 0;
  margin: 0 auto;
}

/* ---------- Login card (step 1) ---------- */
#diveZeeLogin .form-signin {
  animation: authCardIn 0.55s ease-out both;
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#diveZeeLogin .auth-card,
#diveZeeLogin .form-signin .card {
  background: var(--auth-surface) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: var(--auth-radius) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(20, 33, 43, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

#diveZeeLogin .auth-card::before,
#diveZeeLogin .form-signin .card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #1a73e8, #0d47a1 60%, #1565c0);
}

#diveZeeLogin .form-signin .card-body {
  padding: 2rem 1.75rem 1.75rem;
}

#diveZeeLogin .auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

#diveZeeLogin .auth-kicker {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-accent-deep);
  background: var(--auth-accent-soft);
  border-radius: 999px;
}

#diveZeeLogin .auth-header h1,
#diveZeeLogin .form-signin h1 {
  font-family: var(--auth-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 1.85rem);
  line-height: 1.25;
  color: var(--auth-ink);
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}

#diveZeeLogin .auth-header p {
  margin: 0 auto;
  max-width: 28ch;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--auth-muted);
  font-weight: 400;
}

#diveZeeLogin .form-label-group {
  margin-bottom: 1.05rem;
}

#diveZeeLogin .form-label-group .form-control {
  height: 54px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: #fff;
  color: var(--auth-ink);
  font-family: var(--auth-font);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#diveZeeLogin .form-label-group > label {
  color: var(--auth-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

#diveZeeLogin .form-label-group input:not(:placeholder-shown) ~ label,
#diveZeeLogin .form-label-group select ~ label {
  color: var(--auth-accent-deep);
  font-weight: 600;
}

/* Label overlays the select — let clicks open the dropdown */
#diveZeeLogin .form-label-group select ~ label {
  pointer-events: none;
}

#diveZeeLogin .form-label-group .form-control:hover {
  border-color: #b8c5cf;
}

#diveZeeLogin .form-label-group .form-control:focus {
  border-color: var(--auth-accent) !important;
  box-shadow: 0 0 0 3px var(--auth-glow) !important;
  background: #fff;
}

#diveZeeLogin .form-label-group select.form-control {
  padding-top: 1.2rem;
  padding-bottom: 0.35rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b76' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
}

#diveZeeLogin #loginClick {
  height: 50px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 12px;
  font-family: var(--auth-font);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  box-shadow: 0 10px 22px var(--auth-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#diveZeeLogin #loginClick:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(26, 115, 232, 0.32);
  background: linear-gradient(135deg, #2b7de9 0%, #0b3f91 100%);
}

#diveZeeLogin #loginClick:active {
  transform: translateY(0);
}

#diveZeeLogin #loginClick:focus {
  box-shadow: 0 0 0 3px var(--auth-glow), 0 10px 22px var(--auth-glow) !important;
}

/* ---------- Connect Interface (step 2) — same modern blue look ---------- */
#divInterfaceConnect .form-signin {
  animation: authCardIn 0.45s ease-out both;
  max-width: 460px;
  padding: 0;
  margin: 0 auto;
}

#divInterfaceConnect .connect-card,
#divInterfaceConnect .form-signin .card {
  background: var(--auth-surface) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: var(--auth-radius) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(20, 33, 43, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

#divInterfaceConnect .connect-card::before,
#divInterfaceConnect .form-signin .card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #1a73e8, #0d47a1 60%, #1565c0);
}

#divInterfaceConnect .form-signin .card-body {
  padding: 2rem 1.75rem 1.75rem;
}

#divInterfaceConnect .connect-header {
  text-align: center;
  margin-bottom: 1.6rem;
}

#divInterfaceConnect .connect-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.7rem;
  border-radius: 12px;
  font-size: 1.45rem;
  color: #fff;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  box-shadow: 0 8px 18px var(--auth-glow);
}

#divInterfaceConnect .connect-header h2 {
  margin: 0 0 0.4rem;
  font-family: var(--auth-display);
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}

#divInterfaceConnect .connect-header p {
  margin: 0 auto;
  max-width: 32ch;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--auth-muted);
}

#divInterfaceConnect .connect-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1.05rem;
}

#divInterfaceConnect .connect-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  white-space: nowrap;
}

#divInterfaceConnect .connect-meta-label {
  color: var(--auth-accent-deep);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#divInterfaceConnect .connect-meta-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--auth-ink);
}

#divInterfaceConnect .form-label-group {
  margin-bottom: 1.05rem;
}

#divInterfaceConnect .form-label-group .form-control {
  height: 54px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: #fff;
  color: var(--auth-ink);
  font-family: var(--auth-font);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#divInterfaceConnect .form-label-group > label {
  color: var(--auth-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

#divInterfaceConnect .form-label-group input:not(:placeholder-shown) ~ label,
#divInterfaceConnect .form-label-group select ~ label {
  color: var(--auth-accent-deep);
  font-weight: 600;
}

#divInterfaceConnect .form-label-group select ~ label {
  pointer-events: none;
}

#divInterfaceConnect .form-label-group .form-control:hover {
  border-color: #b8c5cf;
}

#divInterfaceConnect .form-label-group .form-control:focus {
  border-color: var(--auth-accent) !important;
  box-shadow: 0 0 0 3px var(--auth-glow) !important;
  background: #fff;
}

#divInterfaceConnect .form-label-group select.form-control {
  padding-top: 1.2rem;
  padding-bottom: 0.35rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b76' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
}

#divInterfaceConnect #fasConnect {
  height: 50px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 12px;
  font-family: var(--auth-font);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  box-shadow: 0 10px 22px var(--auth-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#divInterfaceConnect #fasConnect:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(26, 115, 232, 0.32);
  background: linear-gradient(135deg, #2b7de9 0%, #0b3f91 100%);
}

#divInterfaceConnect #fasConnect:active {
  transform: translateY(0);
}

#divInterfaceConnect #fasConnect:focus {
  box-shadow: 0 0 0 3px var(--auth-glow), 0 10px 22px var(--auth-glow) !important;
}

#divInterfaceConnect #QBOnline_div,
#divInterfaceConnect #Jrunal_ID_div {
  margin: 0.25rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: #f5f8fc;
}

#divInterfaceConnect #QBOnline_div b,
#divInterfaceConnect #Jrunal_ID_div b {
  font-weight: 500;
  color: var(--auth-muted);
}

#divInterfaceConnect #QBOnline_div p,
#divInterfaceConnect #Jrunal_ID_div p {
  margin-bottom: 0.55rem;
  color: var(--auth-ink);
  font-weight: 600;
}

#divInterfaceConnect .custom-file {
  margin-bottom: 1rem;
}

/* Processing overlay spinner — blue */
body.login-interface #wait .spinner-border {
  color: #1a73e8 !important;
}

body.login-interface #wait .card {
  border-radius: 8px !important;
  border: 1px solid #dee2e6 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 576px) {
  body.login-interface {
    padding: 20px 12px !important;
    align-items: flex-start;
  }

  #diveZeeLogin .form-signin .card-body {
    padding: 1.5rem 1.15rem 1.25rem;
  }

  #diveZeeLogin .auth-header h1 {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #diveZeeLogin .form-signin {
    animation: none;
  }

  #diveZeeLogin #loginClick {
    transition: none;
  }
}
