*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:     #1a1a2e;
  --ink2:    #3d3d5c;
  --muted:   #7b7b9a;
  --line:    #e4e4f0;
  --surface: #f7f7fb;
  --white:   #ffffff;
  --accent:  #4f46e5;
  --err:     #dc2626;
  --font-d:  Georgia, 'Times New Roman', serif;
  --font-s:  -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ease:    cubic-bezier(.4,0,.2,1);
}

html, body { height: 100%; }
.login-body {
  font-family: var(--font-s);
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
}

/* ── SPLIT LAYOUT ── */
.login-wrap { display: flex; width: 100%; min-height: 100vh; }

/* ── LEFT PANEL ── */
.login-left {
  flex: 0 0 42%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 44px 40px;
}
.grid-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.brand-mark {
  position: absolute; top: 40px; left: 40px;
  font-family: var(--font-d);
  font-size: 20px; color: rgba(255,255,255,0.88); letter-spacing: .05em;
}
.tagline {
  position: relative; z-index: 1;
  font-family: var(--font-d);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2; color: #fff; margin-bottom: 32px;
}
.tagline em { display: block; color: #a5b4fc; font-style: italic; }

.float-card {
  position: absolute;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
  animation: floatUp 6s ease-in-out infinite;
}
.float-card .fc-label { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: .06em; text-transform: uppercase; }
.float-card .fc-val   { font-size: 14px; color: #fff; font-weight: 500; }
.fc1 { top: 20%; right: 8%;  animation-delay: 0s; }
.fc2 { top: 40%; left: 6%;   animation-delay: 2s; }
.fc3 { top: 60%; right: 12%; animation-delay: 4s; }
@keyframes floatUp { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-9px)} }

/* ── RIGHT PANEL ── */
.login-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px; background: var(--white);
}
.login-form-wrap {
  width: 100%; max-width: 360px;
  animation: slideIn .5s var(--ease) both;
}
@keyframes slideIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

.login-header { margin-bottom: 24px; }
.login-header h1 { font-family: var(--font-d); font-size: 32px; color: var(--ink); margin-bottom: 4px; letter-spacing: -.02em; }
.login-header p  { font-size: 13px; color: var(--muted); line-height: 1.5; }

.form-error-box {
  background: #fef2f2; border: 1px solid #fca5a5;
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: var(--err); margin-bottom: 16px;
}

.login-form { display: flex; flex-direction: column; gap: 15px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label { font-size: 12.5px; font-weight: 500; color: var(--ink2); }
.field-group input, .password-wrap input {
  width: 100%; padding: 10px 13px;
  font-family: var(--font-s); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 9px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-group input:focus, .password-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  background: #fff;
}
.field-group input::placeholder { color: #b0b0c8; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 40px; }
.eye-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 4px; display: flex; align-items: center; transition: color .15s;
}
.eye-toggle:hover { color: var(--accent); }

.remember-row { margin-top: -4px; }
.check-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
}
.check-label input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }

.btn-login {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 11px 18px;
  font-family: var(--font-s); font-size: 14.5px; font-weight: 500;
  color: #fff; background: var(--accent); border: none; border-radius: 9px;
  cursor: pointer; transition: background .2s, transform .1s, box-shadow .2s; margin-top: 2px;
}
.btn-login:hover  { background: #4338ca; box-shadow: 0 4px 16px rgba(79,70,229,0.28); }
.btn-login:active { transform: scale(0.98); }
.btn-login svg    { transition: transform .2s; }
.btn-login:hover svg { transform: translateX(3px); }

.demo-hints { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.demo-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.demo-grid  { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.demo-btn {
  padding: 7px 0; font-family: var(--font-s); font-size: 12.5px;
  color: var(--accent); background: #eef2ff; border: 1px solid #c7d2fe;
  border-radius: 7px; cursor: pointer; transition: background .15s, border-color .15s;
}
.demo-btn:hover { background: #e0e7ff; border-color: #a5b4fc; }

@media (max-width: 768px) { .login-left { display: none; } .login-right { padding: 32px 20px; } }
