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

:root {
  --brand: #1a56db;
  --brand-dark: #1344b8;
  --brand-light: #e8efff;
  --bg: #f0f4ff;
  --card: #ffffff;
  --text: #1a1d2e;
  --muted: #6b7280;
  --border: #d1d9f0;
  --error-bg: #fff0f0;
  --error: #c0392b;
  --radius: 20px;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-image: radial-gradient(circle at 10% 20%, #c7d9ff 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, #ddeaff 0%, transparent 50%);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 820px;
  min-height: 480px;
  box-shadow: 0 20px 60px rgba(26, 86, 219, 0.13);
  display: flex;
  overflow: hidden;
}

.panel-left {
  flex: 1.1;
  background: var(--brand);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  overflow: hidden;
}

.panel-left::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  background: #1344b8;
  border-radius: 50%;
  opacity: 0.5;
}

.panel-left::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.welcome-label {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.welcome-sub {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.illustration {
  position: relative;
  z-index: 1;
  width: 180px;
  height: 180px;
}

.lamp-wrap {
  position: absolute;
  top: 0;
  right: 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lamp-cord {
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, 0.4);
}

.lamp-head {
  width: 28px;
  height: 16px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0 0 50% 50%;
}

.lamp-glow {
  width: 60px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(255, 255, 200, 0.3) 0%, transparent 80%);
  margin-top: -2px;
}

.panel-right {
  flex: 1;
  padding: 2.8rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.8rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.logo-text span {
  color: var(--brand);
}

h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.field {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: none;
  border-bottom: 1.5px solid var(--border);
  font-size: 0.93rem;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}

input:focus {
  border-bottom-color: var(--brand);
}

input::placeholder {
  color: #bbb;
}

.btn-login {
  width: 100%;
  padding: 0.82rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.97rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 0.8rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-msg {
  display: none;
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.error-msg.visible {
  display: block;
}

.btn-login:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.35);
}

.btn-login:active {
  transform: scale(0.98);
}

.footer-note {
  text-align: center;
  margin-top: 1.3rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-note a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 600px) {
  .card {
    flex-direction: column;
  }

  .panel-left {
    padding: 2rem 1.5rem 1.5rem;
    min-height: 200px;
  }

  .illustration {
    width: 120px;
    height: 120px;
  }

  .welcome-label {
    font-size: 1.5rem;
  }

  .panel-right {
    padding: 2rem 1.5rem;
  }

  .lamp-wrap {
    right: 16px;
  }
}
