/* ============================================================
   MO'AR — Login Page CSS
   ============================================================ */

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

body.login-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #0F1117;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* ── Split Layout ── */
.login-split-left {
  flex: 1;
  background: linear-gradient(145deg, #0a0d14 0%, #0f1a1f 40%, #0b1a17 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

.login-split-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 40%, rgba(0,180,160,.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-split-right {
  width: 420px;
  flex-shrink: 0;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

/* ── Background Orbs ── */
.login-orbs { position: absolute; inset: 0; pointer-events: none; }

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  animation: orb-float 8s ease-in-out infinite;
}
.login-orb-1 { width: 200px; height: 200px; background: #00B4A0; top: -60px; right: -60px; animation-delay: 0s; }
.login-orb-2 { width: 140px; height: 140px; background: #007B6E; bottom: 80px; left: -40px; animation-delay: 3s; }
.login-orb-3 { width: 80px;  height: 80px;  background: #00D4BC; top: 40%; right: 10%;  animation-delay: 5s; }

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-18px) scale(1.04); }
}

/* ── Brand ── */
.login-brand {
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(0,180,160,.12);
  border: 1.5px solid rgba(0,180,160,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  overflow: hidden;
}

.login-logo-wrap img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.login-brand-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.login-brand-sub {
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
}

/* ── Feature Cards ── */
.login-features {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 300px;
  position: relative;
  z-index: 1;
}

.login-feat {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 13px 16px;
  animation: feat-in .6s ease both;
}

.login-feat:nth-child(1) { animation-delay: .1s; }
.login-feat:nth-child(2) { animation-delay: .2s; }
.login-feat:nth-child(3) { animation-delay: .3s; }

@keyframes feat-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: none; }
}

.login-feat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(0,180,160,.15);
  border: 1px solid rgba(0,180,160,.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-feat-icon svg {
  width: 16px;
  height: 16px;
  stroke: #00B4A0;
  fill: none;
  stroke-width: 1.8;
}

.login-feat-title {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 2px;
}

.login-feat-desc {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  line-height: 1.4;
}

/* ── Right Panel ── */
.login-form-wrap {
  width: 100%;
  max-width: 320px;
}

.login-form-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-form-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.login-form-sub {
  font-size: 13px;
  color: var(--muted);
}

/* ── Alert ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-err {
  background: #FEE8E8;
  color: var(--red);
  border: 1px solid #FECACA;
}

.alert-err svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ── Form ── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

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

.form-label-row .form-label { margin-bottom: 0; }

.form-control {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--surface2);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.form-control:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--hint); }
.form-control.input-ok  { border-color: var(--accent); }
.form-control.input-err { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,57,53,.1); }

.field-hint {
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
  display: none;
}
.field-hint.show { display: block; }

/* ── Password Wrapper ── */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 44px; }

.pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hint);
  padding: 4px;
  transition: color .13s;
  display: flex;
  align-items: center;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ── Forgot Link ── */
.forgot-link {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color .13s;
}
.forgot-link:hover { color: var(--accent-dim); }

/* ── Submit Button ── */
.btn-login {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  letter-spacing: .01em;
}
.btn-login:hover    { background: var(--accent-dim); box-shadow: 0 4px 16px rgba(0,180,160,.35); }
.btn-login:active   { transform: scale(.98); }
.btn-login:disabled { background: var(--hint); cursor: not-allowed; box-shadow: none; }
.btn-login svg      { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }

/* ── Spinner ── */
.login-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.login-footer-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--hint);
  margin-top: 24px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 760px) {
  body.login-body { flex-direction: column; }

  .login-split-left {
    flex: none;
    padding: 32px 24px 24px;
  }

  .login-features { display: none; }

  .login-split-right {
    width: 100%;
    flex: 1;
    padding: 28px 24px 36px;
  }
}

@media (max-width: 480px) {
  .login-split-left { padding: 28px 20px 20px; }
  .login-split-right { padding: 24px 20px 32px; }
  .login-brand-name { font-size: 22px; }
  .login-logo-wrap  { width: 58px; height: 58px; border-radius: 14px; }
  .login-logo-wrap img { width: 42px; height: 42px; }
}
