/* ════════════════════════════════════════════════════════════════
   login-custom.css  — MonClass login page styles  (v20260305b)
   All custom .lg-* components for the auth/login.ejs template.
   ════════════════════════════════════════════════════════════════ */

/* ────────── Reset & Base ────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ════════════════════════════════════
   UNIVERSE  — full-screen wrapper
   ════════════════════════════════════ */
.lg-universe {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: #0b0f1e;
  color: #e2e8f0;
  font-family: 'Inter', 'Roboto', sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Background grid ── */
.lg-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 81, 137, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 81, 137, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ── Glow blobs ── */
.lg-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.lg-glow-1 {
  width: 520px; height: 520px;
  top: -140px; left: -160px;
  background: radial-gradient(circle, rgba(64,81,137,0.35) 0%, transparent 70%);
}
.lg-glow-2 {
  width: 420px; height: 420px;
  bottom: -100px; right: 20%;
  background: radial-gradient(circle, rgba(10,179,156,0.22) 0%, transparent 70%);
}
.lg-glow-3 {
  width: 320px; height: 320px;
  top: 30%; right: -80px;
  background: radial-gradient(circle, rgba(41,156,219,0.18) 0%, transparent 70%);
}

/* ── Mongolian flag illustration ── */
.lg-bg-illustration {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 42%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.07;
}
.lg-bg-illustration::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      #c8302a 0%, #c8302a 28%,
      #1c6ab5 28%, #1c6ab5 72%,
      #c8302a 72%, #c8302a 100%
    );
}

/* ── Floating particles ── */
.lg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.lg-particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(64,81,137,0.5);
  animation: lgFloat linear infinite;
}
.lg-particles span:nth-child(1)  { width:6px;  height:6px;  left:10%; animation-duration:14s; animation-delay:0s;   top:85%; }
.lg-particles span:nth-child(2)  { width:4px;  height:4px;  left:20%; animation-duration:18s; animation-delay:2s;   top:90%; }
.lg-particles span:nth-child(3)  { width:8px;  height:8px;  left:35%; animation-duration:12s; animation-delay:4s;   top:88%; }
.lg-particles span:nth-child(4)  { width:3px;  height:3px;  left:50%; animation-duration:20s; animation-delay:1s;   top:92%; }
.lg-particles span:nth-child(5)  { width:5px;  height:5px;  left:65%; animation-duration:15s; animation-delay:3s;   top:86%; }
.lg-particles span:nth-child(6)  { width:7px;  height:7px;  left:75%; animation-duration:16s; animation-delay:5s;   top:90%; }
.lg-particles span:nth-child(7)  { width:4px;  height:4px;  left:85%; animation-duration:13s; animation-delay:2s;   top:89%; }
.lg-particles span:nth-child(8)  { width:6px;  height:6px;  left:90%; animation-duration:17s; animation-delay:6s;   top:87%; }
.lg-particles span:nth-child(9)  { width:3px;  height:3px;  left:5%;  animation-duration:19s; animation-delay:1s;   top:88%; }
.lg-particles span:nth-child(10) { width:5px;  height:5px;  left:45%; animation-duration:11s; animation-delay:7s;   top:91%; }
.lg-particles span:nth-child(11) { width:7px;  height:7px;  left:58%; animation-duration:22s; animation-delay:0s;   top:85%; background:rgba(10,179,156,0.4); }
.lg-particles span:nth-child(12) { width:4px;  height:4px;  left:72%; animation-duration:14s; animation-delay:3s;   top:93%; background:rgba(41,156,219,0.4); }

@keyframes lgFloat {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) rotate(720deg); opacity: 0; }
}

/* ════════════════════════════════════
   TOPBAR
   ════════════════════════════════════ */
.lg-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  border-bottom: 1px solid rgba(64,81,137,0.25);
  background: rgba(11,15,30,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

/* ── MC Logo ── */
.lg-topbar-brand { text-decoration: none; }

.mc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.mc-logo-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.mc-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #405189, #0ab39c);
  transition: width 0.3s;
}
.mc-bar-1 { width: 22px; }
.mc-bar-2 { width: 16px; }
.mc-bar-3 { width: 10px; }

.lg-topbar-brand:hover .mc-bar-1 { width: 22px; }
.lg-topbar-brand:hover .mc-bar-2 { width: 22px; }
.lg-topbar-brand:hover .mc-bar-3 { width: 22px; }

.mc-logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e2e8f0;
}
.mc-mon { color: #405189; }
.mc-cls { color: #0ab39c; }
.mc-reg {
  font-size: 9px;
  font-weight: 400;
  vertical-align: super;
  color: #94a3b8;
  margin-left: 1px;
}

/* ── Right side ── */
.lg-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Status pill ── */
.lg-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(10,179,156,0.12);
  border: 1px solid rgba(10,179,156,0.3);
  font-size: 12px;
  color: #0ab39c;
  font-weight: 500;
}
.lg-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0ab39c;
  animation: lgPulse 1.8s ease-in-out infinite;
}
@keyframes lgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* ── Theme toggle ── */
.lg-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(100,116,160,0.35);
  border-radius: 8px;
  background: rgba(64,81,137,0.15);
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-size: 16px;
  padding: 0;
}
.lg-theme-toggle:hover { background: rgba(64,81,137,0.35); color: #e2e8f0; }
.lg-theme-toggle .ri-sun-line  { display: none; }
.lg-theme-toggle .ri-moon-line { display: block; }
.lg-light .lg-theme-toggle .ri-sun-line  { display: block; }
.lg-light .lg-theme-toggle .ri-moon-line { display: none; }

/* ── Language switcher ── */
.lg-lang-wrap { position: relative; }
.lg-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(100,116,160,0.35);
  border-radius: 8px;
  background: rgba(64,81,137,0.15);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
.lg-lang-btn:hover { background: rgba(64,81,137,0.35); }
.lg-lang-btn img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lg-lang-arrow { font-size: 14px; color: #64748b; transition: transform 0.2s; }
.lg-lang-wrap .show ~ .lg-lang-arrow, .lg-lang-dropdown.show + .lg-lang-arrow { transform: rotate(180deg); }

.lg-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #141929;
  border: 1px solid rgba(64,81,137,0.35);
  border-radius: 10px;
  overflow: hidden;
  z-index: 200;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.lg-lang-dropdown.show { display: block; }
.lg-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.lg-lang-option:hover { background: rgba(64,81,137,0.25); color: #e2e8f0; }
.lg-lang-option.active { color: #0ab39c; }
.lg-lang-option img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lg-lang-check { margin-left: auto; font-size: 14px; color: #0ab39c; }

/* ════════════════════════════════════
   MAIN LAYOUT — two columns
   ════════════════════════════════════ */
.lg-main {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 1;
  align-items: stretch;
  min-height: 0;
}

/* ── Left: Info column ── */
.lg-info-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}
.lg-info-inner { max-width: 460px; width: 100%; }

.lg-hero-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: #e2e8f0;
  margin-bottom: 32px;
}
.lg-hero-highlight {
  display: block;
  background: linear-gradient(135deg, #405189 0%, #0ab39c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Feature cards */
.lg-feature-cards { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.lg-feat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(var(--fcr, 64,81,137), 0.25);
  transition: background 0.2s, transform 0.2s;
}
.lg-feat-card:hover { background: rgba(var(--fcr,64,81,137), 0.1); transform: translateX(4px); }
.lg-feat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(var(--fcr, 64,81,137), 0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--fc, #405189);
  flex-shrink: 0;
}
.lg-feat-name  { font-size: 14px; font-weight: 600; color: #e2e8f0; line-height: 1.3; }
.lg-feat-sub   { font-size: 11px; color: #64748b; margin-top: 2px; }

/* Explore link */
.lg-explore-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #0ab39c;
  text-decoration: none;
  transition: gap 0.2s;
}
.lg-explore-link:hover { gap: 10px; color: #0cc9af; }

/* ── Right: Form column ── */
.lg-form-col {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  background: rgba(255,255,255,0.015);
  border-left: 1px solid rgba(64,81,137,0.2);
}

/* ═══════════════════════════════════════
   TERMINAL CARD — the login form
   ═══════════════════════════════════════ */
.lg-terminal {
  width: 100%;
  max-width: 400px;
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(64,81,137,0.3);
  box-shadow: 0 24px 64px rgba(0,0,0,0.45), 0 0 0 1px rgba(64,81,137,0.1);
}

/* Titlebar */
.lg-term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #0d1322;
  border-bottom: 1px solid rgba(64,81,137,0.2);
}
.lg-term-dots { display: flex; gap: 6px; }
.lg-term-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: block;
}
.lg-dot-r { background: #ff5f57; }
.lg-dot-y { background: #febc2e; }
.lg-dot-g { background: #28c840; }
.lg-term-title { flex: 1; text-align: center; font-size: 12px; color: #64748b; font-weight: 500; }
.lg-term-lock {
  font-size: 11px;
  color: #0ab39c;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* Terminal body */
.lg-term-body { padding: 28px 28px 24px; }

/* ── Greeting ── */
.lg-greeting { text-align: center; margin-bottom: 24px; }
.lg-greeting-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(64,81,137,0.3), rgba(10,179,156,0.2));
  border: 1px solid rgba(64,81,137,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: #405189;
  margin: 0 auto 12px;
}
.lg-greeting h2 {
  font-size: 20px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.lg-greeting p {
  font-size: 13px;
  color: #64748b;
}

/* ── Alerts ── */
.lg-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
}
.lg-alert-ok {
  background: rgba(10,179,156,0.12);
  border: 1px solid rgba(10,179,156,0.3);
  color: #0ab39c;
}
.lg-alert-err {
  background: rgba(240,68,56,0.12);
  border: 1px solid rgba(240,68,56,0.3);
  color: #f04438;
}

/* ── Form fields ── */
.lg-field { margin-bottom: 18px; }
.lg-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 6px;
}
.lg-forgot { font-size: 12px; color: #405189; text-decoration: none; transition: color 0.2s; }
.lg-forgot:hover { color: #0ab39c; }

.lg-input-box {
  position: relative;
  display: flex;
  align-items: center;
}
.lg-input-ico {
  position: absolute;
  left: 12px;
  font-size: 16px;
  color: #4b5563;
  pointer-events: none;
  z-index: 1;
}
.lg-input-box input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(100,116,160,0.25);
  border-radius: 9px;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}
.lg-input-box input::placeholder { color: #4b5563; }
.lg-input-box input:focus {
  border-color: #405189;
  background: rgba(64,81,137,0.08);
}
.lg-eye-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #4b5563;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.lg-eye-toggle:hover { color: #94a3b8; }

/* ── Remember ── */
.lg-remember { margin-bottom: 20px; }
.lg-check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: #94a3b8;
  user-select: none;
}
.lg-check-label input[type=checkbox] { display: none; }
.lg-check-box {
  width: 17px; height: 17px;
  border: 1.5px solid rgba(100,116,160,0.4);
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.lg-check-label input[type=checkbox]:checked + .lg-check-box {
  background: #405189;
  border-color: #405189;
}
.lg-check-label input[type=checkbox]:checked + .lg-check-box::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* ── Submit button ── */
.lg-btn-submit {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #405189 0%, #3a4a80 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.15s;
  margin-bottom: 18px;
}
.lg-btn-submit:hover { opacity: 0.92; transform: translateY(-1px); }
.lg-btn-submit:active { transform: translateY(0); }
.lg-btn-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.lg-btn-arrow { font-size: 16px; }
.lg-btn-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lg-btn-loader::after {
  content: '';
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lgSpin 0.7s linear infinite;
}
.lg-btn-submit.is-loading .lg-btn-text { opacity: 0; }
.lg-btn-submit.is-loading .lg-btn-loader { opacity: 1; }

@keyframes lgSpin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.lg-divider {
  position: relative;
  text-align: center;
  margin-bottom: 16px;
  color: #374151;
}
.lg-divider::before, .lg-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: rgba(100,116,160,0.2);
}
.lg-divider::before { left: 0; }
.lg-divider::after  { right: 0; }
.lg-divider span {
  display: inline-block;
  padding: 0 10px;
  font-size: 12px;
  color: #4b5563;
  background: #111827;
  position: relative;
  z-index: 1;
}

/* ── Social row ── */
.lg-social-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.lg-social {
  width: 42px; height: 42px;
  border-radius: 9px;
  border: 1px solid rgba(100,116,160,0.25);
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lg-social.fb:hover { background: rgba(66,103,178,0.2); border-color: rgba(66,103,178,0.5); color: #4267b2; }
.lg-social.gg:hover { background: rgba(219,68,55,0.2);  border-color: rgba(219,68,55,0.5);  color: #db4437; }
.lg-social.gh:hover { background: rgba(36,41,46,0.4);   border-color: rgba(255,255,255,0.3); color: #e2e8f0; }
.lg-social.tw:hover { background: rgba(29,161,242,0.2); border-color: rgba(29,161,242,0.5); color: #1da1f2; }

/* ── Sign-up row ── */
.lg-signup-row {
  text-align: center;
  font-size: 13px;
  color: #64748b;
}
.lg-signup-row a {
  color: #405189;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.lg-signup-row a:hover { color: #0ab39c; }

/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
.lg-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 14px 24px;
  font-size: 12px;
  color: #374151;
  border-top: 1px solid rgba(64,81,137,0.15);
  flex-shrink: 0;
}

/* ════════════════════════════════════
   LIGHT THEME  (.lg-light on .lg-universe)
   ════════════════════════════════════ */
.lg-light { background: #f1f5f9; color: #1e293b; }
.lg-light .lg-topbar { background: rgba(241,245,249,0.9); border-color: rgba(64,81,137,0.15); }
.lg-light .mc-logo-text { color: #1e293b; }
.lg-light .mc-reg { color: #64748b; }
.lg-light .lg-status-pill { background: rgba(10,179,156,0.1); }
.lg-light .lg-theme-toggle { background: rgba(64,81,137,0.08); border-color: rgba(64,81,137,0.2); color: #64748b; }
.lg-light .lg-lang-btn { background: rgba(64,81,137,0.08); border-color: rgba(64,81,137,0.2); color: #374151; }
.lg-light .lg-lang-dropdown { background: #ffffff; border-color: rgba(64,81,137,0.2); }
.lg-light .lg-lang-option { color: #374151; }
.lg-light .lg-lang-option:hover { background: rgba(64,81,137,0.07); color: #1e293b; }
.lg-light .lg-hero-title { color: #1e293b; }
.lg-light .lg-feat-card { background: rgba(0,0,0,0.03); }
.lg-light .lg-terminal { background: #ffffff; border-color: rgba(64,81,137,0.2); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.lg-light .lg-term-bar { background: #f8fafc; border-color: rgba(64,81,137,0.15); }
.lg-light .lg-form-col { background: rgba(0,0,0,0.02); border-color: rgba(64,81,137,0.1); }
.lg-light .lg-greeting h2 { color: #1e293b; }
.lg-light .lg-greeting-icon { background: linear-gradient(135deg, rgba(64,81,137,0.12), rgba(10,179,156,0.08)); }
.lg-light .lg-input-box input {
  background: #f8fafc;
  border-color: rgba(100,116,160,0.3);
  color: #1e293b;
}
.lg-light .lg-input-box input:focus { background: #fff; border-color: #405189; }
.lg-light .lg-divider span { background: #ffffff; color: #94a3b8; }
.lg-light .lg-social { background: #f8fafc; border-color: rgba(100,116,160,0.2); color: #64748b; }
.lg-light .lg-footer { color: #94a3b8; border-color: rgba(64,81,137,0.1); }

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 900px) {
  .lg-info-col { display: none; }
  .lg-form-col {
    width: 100%;
    border-left: none;
    padding: 32px 20px;
  }
  .lg-topbar { padding: 0 16px; }
  .lg-status-pill { display: none; }
}

@media (max-width: 480px) {
  .lg-terminal { border-radius: 10px; }
  .lg-term-body { padding: 22px 18px 18px; }
  .mc-logo-text { font-size: 15px; }
  .lg-lang-label { display: none; }
  .lg-form-col { padding: 24px 16px; }
}
