/* Shared styles for /login and /admin/login. The Gnote-style animated
   characters live in login-anim.js; this file owns the page chrome, the
   form on the right, and all character shapes (sizes/colors/positions).
   Eye/body transforms are written inline at runtime by login-anim.js. */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
  overflow: hidden;
  position: relative;
}

@keyframes bgFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.bg-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  animation: bgFloat 5s ease-in-out infinite;
  pointer-events: none;
}

/* Floating language toggle in the top-right corner of the login page. */
.login-lang-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  min-width: 40px;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.login-lang-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.7);
}
.login-lang-btn:active { transform: scale(0.97); }

.main-card {
  display: flex;
  width: 100%;
  max-width: 1000px;
  min-height: 580px;
  border-radius: 24px;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: #fff;
}

.left-panel {
  flex: 0 0 56%;
  background: linear-gradient(160deg, #6C3FF5 0%, #2D2D2D 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.right-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #fff;
}

@media (max-width: 767px) {
  .main-card { flex-direction: column; max-width: 420px; min-height: auto; }
  .left-panel { display: none; }
  .right-panel { padding: 32px 24px; }
}

/* ---- right panel form ---- */
.form-content { width: 100%; max-width: 320px; }
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.logo .lab {
  font-weight: 400;
  font-style: italic;
  color: #6b7280;
  letter-spacing: 0;
}
.logo .cms { color: #6366f1; }
.admin-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  background: #dc2626;
  color: #fff;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e1b4b;
  margin: 0 0 6px;
}
.form-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 13px; font-weight: 600; color: #374151; }
.password-wrap { position: relative; }
.field-input {
  width: 100%;
  padding: 11px 40px 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  color: #1e1b4b;
  background: #fafafe;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-input::placeholder { color: #b0b4bc; }
.field-input:hover { border-color: #c7c4f3; background: #fff; }
.field-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: #fff;
}
.eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  display: flex;
  align-items: center;
}
.eye-toggle:hover { color: #6366f1; }
.error-msg {
  font-size: 13px;
  color: #ef4444;
  background: #fef2f2;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  margin-bottom: 12px;
}
.submit-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #6366f1 50%, #764ba2 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}
.submit-btn:hover { opacity: 0.92; }
.submit-btn:active { transform: scale(0.99); }

/* ---- character animation stage ---- */
.char-stage {
  position: relative;
  width: 480px;
  height: 360px;
  pointer-events: none; /* mouse passes through to bg so eye tracking still works */
}
@media (max-width: 1023px) {
  .char-stage { transform: scale(0.85); transform-origin: bottom center; }
}
@media (max-width: 767px) {
  .char-stage { transform: scale(0.5) translateY(40px); }
}

.char {
  position: absolute;
  bottom: 0;
  transition: transform 0.7s ease-in-out, height 0.7s ease-in-out;
  transform-origin: bottom center;
}
.char-face,
.char-face-pupils {
  position: absolute;
  display: flex;
  transition: left 0.2s ease-out, top 0.2s ease-out;
}
.eye {
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.15s ease;
}
.char.blink .eye { height: 2px !important; }
.char.blink .eye .pupil { display: none; }
.pupil {
  border-radius: 50%;
  background: #2D2D2D;
  transition: transform 0.1s ease-out;
}

/* ---- Purple character (back left) ---- */
.char-purple {
  left: 60px;
  width: 160px;
  height: 360px;
  background: #FF6B6B;
  border-radius: 10px 10px 0 0;
  z-index: 1;
}
.char-purple .char-face { left: 38px; top: 36px; gap: 30px; }
.char-purple .eye { width: 18px; height: 18px; }
.char-purple .eye .pupil { width: 7px; height: 7px; }

/* ---- Teal character (middle) ---- */
.char-teal {
  left: 210px;
  width: 110px;
  height: 280px;
  background: #00CEC9;
  border-radius: 8px 8px 0 0;
  z-index: 2;
}
.char-teal .char-face { left: 22px; top: 28px; gap: 22px; }
.char-teal .eye { width: 16px; height: 16px; }
.char-teal .eye .pupil { width: 6px; height: 6px; }

/* ---- Orange character (front left, semicircle) — pupils only ---- */
.char-orange {
  left: 0;
  width: 220px;
  height: 180px;
  background: #FFEAA7;
  border-radius: 110px 110px 0 0;
  z-index: 3;
}
.char-orange .char-face-pupils { left: 72px; top: 82px; gap: 30px; }
.char-orange .pupil { width: 12px; height: 12px; }

/* ---- Yellow character (front right, capsule) — pupils + mouth ---- */
.char-yellow {
  left: 280px;
  width: 130px;
  height: 210px;
  background: #FD79A8;
  border-radius: 65px 65px 0 0;
  z-index: 4;
}
.char-yellow .char-face-pupils { left: 46px; top: 36px; gap: 22px; }
.char-yellow .pupil { width: 12px; height: 12px; }
.char-yellow .char-mouth {
  position: absolute;
  width: 70px;
  height: 4px;
  background: #2D2D2D;
  border-radius: 2px;
  left: 36px;
  top: 82px;
}
