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

body {
  min-height: 100vh;
  display: flex;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ══════════════════════════════
   LEFT — form panel  (50%)
══════════════════════════════ */
.form-panel {
  width: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 52px 150px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 700;
  color: #16191f;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: #4F46E5;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.form-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0 40px;
}

.form-center h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #111827;
  line-height: 1.15;
  margin-bottom: 12px;
}

.form-center .sub {
  font-size: 0.9rem;
  color: #6B7280;
  line-height: 1.65;
  margin-bottom: 48px;
}

.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.input-wrap { position: relative; }

.input-wrap input {
  width: 100%;
  height: 46px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 0 42px 0 14px;
  font: 500 0.9rem "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}

.input-wrap input::placeholder { color: #9CA3AF; }

.input-wrap input:focus {
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.eye-btn {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #9CA3AF;
  display: grid;
  place-items: center;
  padding: 2px;
}

.eye-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: #4B5563;
  cursor: pointer;
  user-select: none;
}

.remember input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #4F46E5;
  cursor: pointer;
}

.forgot {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4F46E5;
  text-decoration: none;
}

.forgot:hover { text-decoration: underline; }

.btn-login {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: #4F46E5;
  color: #fff;
  font: 700 0.95rem "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background 150ms, transform 150ms, box-shadow 150ms;
  margin-bottom: 0;
}

.btn-login:hover {
  background: #4338CA;
  box-shadow: 0 8px 20px rgba(79,70,229,0.32);
  transform: translateY(-1px);
}

.btn-login:active { transform: translateY(0); }

.form-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #9CA3AF;
  padding-top: 22px;
  border-top: 1px solid #F3F4F6;
}

.form-footer a { color: #9CA3AF; text-decoration: none; }
.form-footer a:hover { color: #4F46E5; }

/* ══════════════════════════════
   RIGHT — QR scanner panel (50%)
══════════════════════════════ */
.scanner-panel {
  width: 50%;
  background: linear-gradient(145deg, #4F46E5 0%, #3730A3 55%, #312E81 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

/* background orbs */
.scanner-panel::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 65%);
  top: -160px;
  right: -160px;
  pointer-events: none;
}

.scanner-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 65%);
  bottom: -100px;
  left: -80px;
  pointer-events: none;
}

/* ── Scanner title ── */
.scanner-title {
  text-align: center;
  position: relative;
  z-index: 2;
}

.scanner-title h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.scanner-title p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.6;
}

/* ── Scanner widget ── */
.scanner-widget {
  position: relative;
  z-index: 2;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* outer glow ring */
.scanner-widget::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 26px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

/* QR code pattern (SVG) */
.qr-svg {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.4));
}

/* scan frame corners */
.scan-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scan-frame span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #fff;
  border-style: solid;
}

.scan-frame span:nth-child(1) { top: 0;    left: 0;   border-width: 4px 0 0 4px; border-radius: 6px 0 0 0; }
.scan-frame span:nth-child(2) { top: 0;    right: 0;  border-width: 4px 4px 0 0; border-radius: 0 6px 0 0; }
.scan-frame span:nth-child(3) { bottom: 0; left: 0;   border-width: 0 0 4px 4px; border-radius: 0 0 0 6px; }
.scan-frame span:nth-child(4) { bottom: 0; right: 0;  border-width: 0 4px 4px 0; border-radius: 0 0 6px 0; }

/* animated scan line */
.scan-line {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #7DD3FC, #38BDF8, #7DD3FC, transparent);
  box-shadow: 0 0 10px 2px rgba(56,189,248,0.6);
  animation: scanMove 2.4s ease-in-out infinite;
}

@keyframes scanMove {
  0%   { top: 10px;  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 244px; opacity: 0; }
}

/* ── Status badge ── */
.scan-status {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 8px 20px;
  backdrop-filter: blur(6px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.28);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.28); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0.12); }
}

.scan-status span {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.02em;
}

/* ── Feature pills ── */
.feature-pills {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
}

.pill svg {
  width: 13px;
  height: 13px;
  stroke: rgba(255,255,255,0.9);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  body { flex-direction: column; }
  .form-panel,
  .scanner-panel { width: 100%; }
  .form-panel { padding: 40px 36px; }
  .scanner-panel { padding: 56px 36px; min-height: 520px; }
}

@media (max-width: 480px) {
  .form-panel { padding: 32px 22px; }
  .scanner-widget { width: 220px; height: 220px; }
  .qr-svg { width: 170px; height: 170px; }
}
