/**
 * Modern Split-Screen Login Theme for Madrasah
 */

:root {
  --mls-primary: #007a33;
  --mls-primary-dark: #004d20;
  --mls-primary-light: #059669;
  --mls-gold: #c5a14e;
  --mls-gold-light: #fef08a;
  --mls-text: #1e293b;
  --mls-text-muted: #64748b;
  --mls-border: #e2e8f0;
}

body.login {
  background: #f8fafc !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  min-height: 100vh !important;
  color: var(--mls-text) !important;
}

/* Outer Split Wrapper */
.mls-login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ==========================================================================
   LEFT COLUMN: BRANDING & LIVE CLOCK
   ========================================================================== */
.mls-brand-column {
  flex: 1.15;
  background: linear-gradient(145deg, #021a0c 0%, #06381a 50%, #0a4d25 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}

.mls-brand-decor-bg {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(#c5a14e 1.5px, transparent 1.5px), radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
}

.mls-brand-inner {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.mls-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.mls-brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.mls-brand-tag {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mls-inst-pill {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--mls-gold);
  text-transform: uppercase;
}

.mls-akred-pill {
  background: rgba(197, 161, 78, 0.2);
  border: 1px solid var(--mls-gold);
  color: var(--mls-gold-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-block;
  align-self: flex-start;
}

.mls-brand-body {
  margin-bottom: 32px;
}

.mls-brand-sub {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mls-brand-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 12px;
}

.mls-brand-motto {
  font-size: 0.9375rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  border-left: 3px solid var(--mls-gold);
  padding-left: 14px;
}

/* Live Digital Clock Card */
.mls-clock-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.mls-clock-date {
  font-size: 0.78125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.mls-clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mls-clock-tz {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mls-gold);
}

/* Security Badge */
.mls-security-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 28px;
}

.mls-sec-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: mls-pulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes mls-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mls-sec-info {
  display: flex;
  flex-direction: column;
}

.mls-sec-info strong {
  font-size: 0.78125rem;
  color: #a7f3d0;
}

.mls-sec-info span {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
}

.mls-brand-footer {
  margin-top: 10px;
}

.mls-back-home-link {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mls-back-home-link:hover {
  color: #ffffff;
  transform: translateX(-4px);
}

/* ==========================================================================
   RIGHT COLUMN: LOGIN FORM
   ========================================================================== */
.mls-form-column {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #f8fafc;
  position: relative;
}

#login {
  width: 100% !important;
  max-width: 440px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hide default WP logo */
#login h1 {
  display: none !important;
}

/* Login Form Card */
#loginform {
  background: #ffffff !important;
  border: 1px solid var(--mls-border) !important;
  border-radius: 12px !important;
  padding: 36px 32px !important;
  box-shadow: 0 20px 45px -15px rgba(0, 77, 32, 0.12) !important;
  position: relative;
}

/* Header inside form card */
#loginform::before {
  content: 'Masuk ke Akun Anda';
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--mls-text);
  margin-bottom: 24px;
  text-align: left;
}

#loginform label {
  font-size: 0.84375rem !important;
  font-weight: 600 !important;
  color: var(--mls-text) !important;
  margin-bottom: 6px !important;
  display: block !important;
}

#loginform input.input {
  width: 100% !important;
  height: 48px !important;
  font-size: 0.9375rem !important;
  padding: 0 14px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  color: var(--mls-text) !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
  margin-bottom: 18px !important;
}

#loginform input.input:focus {
  border-color: var(--mls-primary) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(0, 122, 51, 0.12) !important;
  outline: none !important;
}

/* Password eye wrapper */
.mls-pass-wrap {
  position: relative;
}

.mls-pass-toggle-btn {
  position: absolute;
  right: 12px;
  top: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mls-pass-toggle-btn:hover {
  color: var(--mls-primary);
}

/* Captcha Box (Unwrapped, Aligned Left) */
.mls-captcha-box {
  margin: 14px 0 18px 0;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 78px;
  overflow: visible;
}

.mls-captcha-box .g-recaptcha {
  display: block;
}

@media (max-width: 380px) {
  .mls-captcha-box .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 0 0;
  }
}

.mls-math-box {
  margin: 16px 0 20px 0;
  padding: 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.mls-math-label {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 8px !important;
  display: block;
}

.mls-math-input-group {
  display: flex;
  gap: 8px;
}

.mls-math-input {
  margin-bottom: 0 !important;
  height: 40px !important;
}

/* Remember Me & Forget Password */
.login .forgetmenot {
  float: left !important;
  margin-top: 6px !important;
}

.login .forgetmenot label {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: var(--mls-text-muted) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#loginform .button-primary {
  width: 100% !important;
  height: 48px !important;
  background: linear-gradient(135deg, var(--mls-primary) 0%, var(--mls-primary-dark) 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
  text-shadow: none !important;
  box-shadow: 0 4px 14px rgba(0, 122, 51, 0.35) !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  margin-top: 18px !important;
  float: none !important;
}

#loginform .button-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 122, 51, 0.45) !important;
}

/* Bottom Links */
#nav, #backtoblog {
  padding: 0 !important;
  margin: 16px 0 0 0 !important;
  text-align: center !important;
}

#nav a, #backtoblog a {
  color: var(--mls-text-muted) !important;
  font-size: 0.8125rem !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

#nav a:hover, #backtoblog a:hover {
  color: var(--mls-primary) !important;
}

/* Alert / Error Messages */
.login #login_error,
.login .message,
.login .notice {
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-size: 0.8125rem !important;
  margin-bottom: 20px !important;
  border-left-width: 4px !important;
}

.login #login_error {
  border-left-color: #ef4444 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08) !important;
}

.login .message {
  border-left-color: var(--mls-primary) !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (< 960px)
   ========================================================================== */
@media (max-width: 960px) {
  .mls-login-wrapper {
    flex-direction: column;
  }
  .mls-brand-column {
    flex: none;
    padding: 36px 24px;
    box-shadow: none;
  }
  .mls-brand-inner {
    max-width: 440px;
  }
  .mls-brand-title {
    font-size: 1.5rem;
  }
  .mls-clock-card {
    display: none;
  }
  .mls-security-badge {
    margin-bottom: 12px;
  }
  .mls-form-column {
    padding: 30px 16px 40px 16px;
  }
}
