/* ============================================================
   assets/css/login/login.css
   ============================================================ */

/* Background */
.bg-canvas { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.16; }
.bg-orb-1 { width: 600px; height: 600px; background: #e8b86d; top: -200px; left: -150px; animation: drift1 18s ease-in-out infinite alternate; }
.bg-orb-2 { width: 500px; height: 500px; background: #6d9fe8; bottom: -180px; right: -120px; animation: drift2 22s ease-in-out infinite alternate; }
.bg-orb-3 { width: 300px; height: 300px; background: #e86d9f; top: 40%; left: 50%; opacity: 0.08; animation: drift3 14s ease-in-out infinite alternate; }
[data-theme="light"] .bg-orb { opacity: 0.07; }
@keyframes drift1 { to { transform: translate(40px,60px) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-50px,-40px) scale(0.95); } }
@keyframes drift3 { to { transform: translate(-30px,40px); } }

/* Layout */
.auth-layout {
  position: relative; z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Theme toggle */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 100;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--brand); border-color: rgba(232,184,109,0.3); }

/* ── Left panel ── */
.auth-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 56px;
  position: relative;
  overflow: hidden;
}
.auth-panel::after {
  content: '';
  position: absolute;
  right: 0; top: 8%; bottom: 8%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--brand), #c99040);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: #0d0f14;
  font-weight: 700;
  box-shadow: 0 0 20px var(--brand-glow);
}
.auth-brand-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.auth-brand-name span { color: var(--brand); }
.auth-brand-sub { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.auth-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}
.auth-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-dim);
  border: 1px solid rgba(232,184,109,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand);
  width: fit-content;
  margin-bottom: 24px;
}
.auth-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 18px;
}
.auth-title em { font-style: italic; color: var(--brand); }
.auth-sub {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 380px;
  font-weight: 300;
  margin-bottom: 32px;
}

.auth-features { display: flex; flex-direction: column; gap: 12px; }
.auth-feature {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.85rem;
  color: var(--text-2);
}
.auth-feature i {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand-dim);
  border: 1px solid rgba(232,184,109,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  color: var(--brand);
  flex-shrink: 0;
}

.auth-security {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.78rem;
  color: var(--muted);
}
.auth-security i { color: var(--success); font-size: 1.2rem; flex-shrink: 0; }
.auth-security strong { color: var(--text); font-weight: 500; }

.auth-deco-text {
  position: absolute;
  right: 48px; top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.07);
  white-space: nowrap;
  pointer-events: none;
}
[data-theme="light"] .auth-deco-text { color: rgba(0,0,0,0.07); }

/* ── Right panel ── */
.auth-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  flex-shrink: 0;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.auth-online {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px;
}
.auth-avatars { display: flex; }
.auth-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  margin-left: -6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700;
}
.auth-av:first-child { margin-left: 0; }
.av-1 { background: #4f6ef7; color: #fff; }
.av-2 { background: #e86d9f; color: #fff; }
.av-3 { background: var(--brand); color: #0d0f14; }
.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  margin-left: 4px;
}
.online-text { font-size: 0.72rem; color: var(--muted); }

.auth-form-title { font-size: 1.8rem; margin-bottom: 4px; }
.auth-form-sub { font-size: 0.8rem; color: var(--muted); margin-bottom: 24px; font-weight: 300; line-height: 1.6; }

.field { margin-bottom: 14px; }
.field-wrap { position: relative; }
.field-icon {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s;
}
.field-wrap:focus-within .field-icon { color: var(--brand); }
.field-wrap .form-control { padding-left: 38px; }
.pass-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); cursor: pointer; font-size: 1rem;
  transition: color 0.2s;
}
.pass-toggle:hover { color: var(--text); }

.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.remember-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.78rem; color: var(--muted); cursor: pointer;
}
.remember-label input[type=checkbox] { accent-color: var(--brand); }
.forgot-link { font-size: 0.78rem; color: var(--brand); text-decoration: none; }
.forgot-link:hover { opacity: 0.75; }

#statusMsg:not(:empty) { margin-bottom: 12px; }
.status-error {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: rgba(224,112,112,0.1);
  border: 1px solid rgba(224,112,112,0.2);
  border-radius: 9px;
  font-size: 0.8rem;
  color: var(--danger);
}

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(13,15,20,0.3);
  border-top-color: #0d0f14;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-footer-note {
  text-align: center;
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--muted);
}
.auth-footer-note a { color: var(--brand); text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .auth-panel { display: none; }
  .auth-right { width: 100%; }
}