/* ══════════════════════════════════════════
   ADMIN LOGIN CSS — Verified.mn
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #ef4444;
  --primary-dark:   #dc2626;
  --primary-light:  #fef2f2;
  --primary-border: #fecaca;
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --bg:             #f8fafc;
  --bg-secondary:   #f1f5f9;
  --border-light:   #e2e8f0;
  --radius:         8px;
}

html, body { height: 100%; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  font-family: 'Noto Sans', sans-serif;
  color: var(--text-primary);
}

/* ── Base form elements ──────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: space-between;
}
.form-label-hint { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.form-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-light); border-radius: var(--radius);
  font-size: 14px; color: var(--text-primary); background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.form-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input.is-invalid { border-color: #fca5a5; background: #fff5f5; }
.form-input.is-invalid:focus { border-color: var(--primary); }

/* ── Two-panel layout ────────────────────────────────────── */
.auth-wrap {
  flex: 1; display: grid;
  grid-template-columns: 440px 1fr;
  min-height: 100vh;
}

/* ══════════════════════════════
   LEFT PANEL
══════════════════════════════ */
.auth-left {
  background: linear-gradient(160deg, #1a2744 0%, #0E2340 55%, #080f1e 100%);
  padding: 2.25rem 2.5rem 2.5rem;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}

/* Red accent line at top */
.auth-left::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f87171, #ef4444);
}

/* Decorative circle */
.auth-left::after {
  content: ''; position: absolute; bottom: -80px; left: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(239,68,68,0.06); pointer-events: none;
}

.auth-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; position: relative; z-index: 1;
  flex-shrink: 0; padding-top: 6px;
}
.auth-brand-img  { height: 64px; width: auto; filter: brightness(0) invert(1); }
.auth-brand-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.auth-brand-sub  {
  font-size: 10px; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: .06em; margin-top: 1px;
}

.auth-left-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1; padding: 2.5rem 0 2rem;
}

.auth-left-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.18);
  color: #fca5a5;
  font-size: 11.5px; font-weight: 500;
  padding: 5px 13px; border-radius: 100px;
  border: 1px solid rgba(239,68,68,0.35);
  margin-bottom: 1.5rem; align-self: flex-start;
}
.auth-left-badge i { font-size: 13px; }

.auth-left-title {
  font-size: 26px; font-weight: 700; color: #fff;
  line-height: 1.3; letter-spacing: -.5px; margin-bottom: 1rem;
}
.auth-left-desc {
  font-size: 13.5px; color: rgba(255,255,255,0.48);
  line-height: 1.78; max-width: 320px; margin-bottom: 2.25rem;
}

.auth-features { display: flex; flex-direction: column; gap: 18px; }
.auth-feature  { display: flex; align-items: flex-start; gap: 12px; }
.auth-feat-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
}
.auth-feat-icon i  { font-size: 18px; color: #fca5a5; }
.auth-feat-title   { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.auth-feat-desc    { font-size: 12px; color: rgba(255,255,255,0.42); line-height: 1.55; }

.auth-left-foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  font-size: 11px; color: rgba(255,255,255,0.28);
}
.auth-back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: rgba(255,255,255,0.42);
  text-decoration: none; transition: color .15s;
}
.auth-back-link:hover { color: #fff; }

/* ══════════════════════════════
   RIGHT PANEL
══════════════════════════════ */
.auth-right {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2rem; background: var(--bg);
}
.auth-card { width: 100%; max-width: 420px; }

.auth-portal-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11.5px; font-weight: 600;
  padding: 4px 11px; border-radius: 100px;
  border: 1px solid var(--primary-border);
  margin-bottom: 12px;
}
.auth-portal-badge i { font-size: 13px; }

.auth-head { margin-bottom: 2rem; }
.auth-title    { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -.4px; margin-bottom: 7px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

/* Alerts */
.auth-alert {
  display: none; align-items: flex-start; gap: 9px;
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 13px; margin-bottom: 1.25rem;
}
.auth-alert.show { display: flex; }
.auth-alert i    { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.auth-alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.auth-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

.input-icon-wrap { position: relative; }
.pw-wrap         { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--text-muted); pointer-events: none;
}
.form-input.has-icon { padding-left: 38px; }
.pw-wrap .form-input  { padding-left: 38px; padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 18px;
  display: flex; align-items: center; padding: 4px;
  border-radius: var(--radius); transition: color .15s;
}
.pw-toggle:hover { color: var(--text-secondary); }

.field-error { display: none; font-size: 12px; color: #dc2626; margin-top: 3px; }
.field-error.show { display: block; }

.auth-opt-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.auth-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.auth-remember input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

/* Submit button */
.btn-submit {
  background: var(--primary); color: #fff; border: none;
  padding: 13px; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; transition: background .15s; width: 100%; margin-top: 4px;
}
.btn-submit:hover:not(:disabled) { background: var(--primary-dark); }
.btn-submit:disabled { opacity: 0.72; cursor: not-allowed; }

/* Switch between login / register */
.auth-switch-row {
  text-align: center; font-size: 13px; color: var(--text-secondary);
  margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 5px;
}
.auth-switch-btn {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 13px; font-weight: 600;
  padding: 0; font-family: inherit;
}
.auth-switch-btn:hover { text-decoration: underline; }

/* Help box */
.auth-help-box {
  display: none; align-items: flex-start; gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px; color: var(--text-secondary);
  margin-top: 1.5rem; line-height: 1.55;
}
.auth-help-box.show { display: flex; }
.auth-help-box i    { font-size: 16px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

/* Setup: first-time banner */
.auth-setup-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: 13px 15px;
  font-size: 13px; color: #92400e;
  margin-bottom: 1.5rem; line-height: 1.5;
}
.auth-setup-banner i { font-size: 17px; color: #d97706; flex-shrink: 0; margin-top: 1px; }

/* Admin card at bottom (after login) */
.auth-logged-in {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius); margin-top: 1.5rem;
}
.auth-logged-av {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Loading spinner ─────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.la-spin { animation: spin .9s linear infinite; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; min-height: auto; }
  .auth-left { padding: 1.75rem 1.5rem; }
  .auth-left-title { font-size: 20px; }
  .auth-left-desc  { font-size: 13px; margin-bottom: 0; }
  .auth-features   { display: none; }
  .auth-left-body  { padding: 1.5rem 0 1.25rem; }
  .auth-right      { padding: 2rem 1.25rem; align-items: flex-start; }
  .auth-card       { max-width: 100%; }
}
