/* ==========================================================================
   PORTAL LOGIN ANGGOTA & SIVITAS AKADEMIKA - 2-PANEL INSTITUTIONAL THEME
   Institut Kesehatan Karsa Husada Garut
   Palette: Tosca IKKH (#09a89e), Deep Teal (#078f86, #043d38), Royal Gold (#ffb830)
   Path: public/css/pages/member/login.css
   ========================================================================== */

/* Prevent vertical scroll on desktop viewports when content fits */
@media (min-height: 720px) and (min-width: 900px) {
  html:has(.member-auth-section),
  body:has(.member-auth-section) {
    overflow: hidden !important;
    height: 100vh !important;
  }
}

/* --------------------------------------------------------------------------
   1. SECTION & DYNAMIC GRADIENT BACKGROUND
   -------------------------------------------------------------------------- */
.member-auth-section {
  position: relative;
  /* Fill exact remaining height below navbar (topbar ~36px + navbar ~70px = ~106px) */
  height: calc(100vh - 108px);
  min-height: 620px;
  max-height: calc(100vh - 108px);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: 
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(9, 168, 158, 0.22) 0%, transparent 65%),
    radial-gradient(circle 500px at 10% 75%, rgba(255, 184, 48, 0.14) 0%, transparent 55%),
    radial-gradient(circle 550px at 90% 70%, rgba(9, 168, 158, 0.16) 0%, transparent 60%),
    linear-gradient(150deg, #e7f5f4 0%, #f2f9f8 35%, #edf6f5 65%, #dff2f0 100%);
  overflow: hidden;
}

/* Fallback for smaller screen heights or mobile */
@media (max-height: 720px), (max-width: 880px) {
  .member-auth-section {
    height: auto;
    max-height: none;
    padding: 2rem 1rem;
    overflow-y: auto;
  }
}

/* Subtle Geometric Pattern Overlay */
.member-auth-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(9, 168, 158, 0.12) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  pointer-events: none;
  opacity: 0.85;
}

/* Decorative Luminous Orbs */
.auth-bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
  animation: orbFloat 14s ease-in-out infinite alternate;
}

.auth-glow-1 {
  top: -80px;
  left: 15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(9, 168, 158, 0.35) 0%, transparent 70%);
}

.auth-glow-2 {
  bottom: -60px;
  right: 15%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 184, 48, 0.22) 0%, transparent 70%);
  animation-delay: -5s;
}

.auth-glow-3 {
  top: 40%;
  left: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(9, 168, 158, 0.25) 0%, transparent 70%);
  animation-delay: -9s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, 20px) scale(1.08); }
  100% { transform: translate(-20px, -25px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   2. AUTH CONTAINER & 2-PANEL CARD
   -------------------------------------------------------------------------- */
.member-auth-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.member-auth-card {
  background: #ffffff;
  border: 1px solid rgba(9, 168, 158, 0.22);
  border-radius: 20px;
  box-shadow: 
    0 24px 60px -15px rgba(9, 168, 158, 0.24),
    0 8px 24px -4px rgba(10, 25, 47, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  transition: box-shadow 0.3s ease;
}

.member-auth-card:hover {
  box-shadow: 
    0 28px 70px -15px rgba(9, 168, 158, 0.28),
    0 12px 28px -4px rgba(10, 25, 47, 0.1);
}

/* --------------------------------------------------------------------------
   3. LEFT PANEL: LOGIN FORM
   -------------------------------------------------------------------------- */
.member-form-panel {
  padding: 1.75rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.member-form-header {
  margin-bottom: 1.15rem;
}

.member-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(9, 168, 158, 0.1);
  color: #078f86;
  border: 1px solid rgba(9, 168, 158, 0.3);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #09a89e;
  box-shadow: 0 0 6px #09a89e;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.member-form-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.member-form-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Alert Boxes */
.member-auth-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.member-auth-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.member-auth-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.45;
}

/* Form Groups & Inputs */
.form-group-modern {
  margin-bottom: 0.85rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.modern-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0;
}

.label-pill {
  font-size: 0.65rem;
  font-weight: 600;
  background: #e6f7f6;
  color: #09a89e;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.forgot-link {
  font-size: 0.775rem;
  color: #09a89e;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.forgot-link:hover {
  color: #078f86;
  text-decoration: underline;
}

.modern-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.modern-input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.65rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #dbe5e4;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.modern-input::placeholder {
  color: #94a3b8;
  font-size: 0.825rem;
}

.modern-input:focus {
  background: #ffffff;
  border-color: #09a89e;
  box-shadow: 0 0 0 3px rgba(9, 168, 158, 0.14);
}

.modern-input-wrapper:focus-within .input-icon-left {
  color: #09a89e;
}

.modern-input.is-invalid {
  border-color: #ef4444;
  background: #fff8f8;
}

.btn-toggle-pwd {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-toggle-pwd:hover {
  color: #09a89e;
  background: #e6f7f6;
}

/* Submit Button */
.btn-modern-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.925rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, #09a89e 0%, #078f86 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(9, 168, 158, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-modern-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-modern-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(9, 168, 158, 0.4);
  background: linear-gradient(135deg, #0ab8ad 0%, #089b91 100%);
}

.btn-modern-submit:hover::before {
  left: 100%;
}

.btn-modern-submit:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(9, 168, 158, 0.25);
}

.btn-submit-icon {
  transition: transform 0.2s ease;
}

.btn-modern-submit:hover .btn-submit-icon {
  transform: translateX(3px);
}

/* Policy Note under form */
.member-form-policy {
  margin-top: 0.85rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.45;
}

.member-form-policy strong {
  color: #334155;
}

/* --------------------------------------------------------------------------
   4. RIGHT PANEL: INFORMASI LAYANAN PEMUSTAKA (TOSCA INSTITUSIONAL)
   -------------------------------------------------------------------------- */
.member-info-panel {
  position: relative;
  background: linear-gradient(145deg, #09a89e 0%, #078f86 45%, #043d38 100%);
  color: #ffffff;
  padding: 1.85rem 2rem 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Texture Pattern Overlay */
.member-info-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 1.2px);
  background-size: 16px 16px;
  pointer-events: none;
  opacity: 0.85;
}

/* Accent Glow inside info panel */
.member-info-panel::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 48, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.member-info-content {
  position: relative;
  z-index: 1;
}

.member-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.member-info-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 0.45rem;
  color: #ffffff;
  letter-spacing: -0.015em;
}

.member-info-desc {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

/* Feature List */
.member-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.member-feature-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.member-feature-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd675;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Glass Card Help Notice */
.member-info-help-box {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  backdrop-filter: blur(6px);
}

.member-info-help-box strong {
  color: #ffd675;
}

.member-info-help-icon {
  flex-shrink: 0;
  color: #ffd675;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   5. COMPACT SINGLE-LINE FOOTER FOR LOGIN SCREEN
   -------------------------------------------------------------------------- */
.member-compact-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  padding: 0.45rem 1rem 0;
  margin-top: 0.35rem;
}

.member-compact-footer a {
  color: #09a89e;
  text-decoration: none;
  font-weight: 600;
}

.member-compact-footer a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .member-auth-card {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .member-form-panel {
    padding: 1.5rem 1.25rem;
  }

  .member-info-panel {
    padding: 1.5rem 1.25rem;
    order: 2;
  }

  .member-auth-title,
  .member-form-title,
  .member-info-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .member-form-panel {
    padding: 1.25rem 1rem;
  }

  .member-info-panel {
    padding: 1.25rem 1rem;
  }
}
