* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --page-bg: #F6F7F9;
  --text: #222222;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background-image: url('./images/login-bg.jpg?v=20260710-fast-login');
  background-size: cover;
  background-position: center;
}

.login-panel {
  width: 430px;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 92px;
  background: transparent;
}

.login-logo {
  width: min(220px, 50vw);
  height: auto;
  margin-top: 18vh;
  display: block;
}

.login-spacer {
  flex: 0 0 44px;
}

.qr-wrap {
  margin: 0 auto 14px;
  width: 220px;
  min-height: 248px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
}

.qrcode {
  width: 180px;
  height: 180px;
  max-width: 100%;
  max-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.qrcode canvas,
.qrcode img,
.qrcode table {
  display: block;
  margin: auto;
  width: 180px !important;
  height: 180px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  pointer-events: none;
}

.qrcode img,
.qrcode canvas {
  object-fit: contain;
}

.qrcode table {
  table-layout: fixed;
  border-collapse: collapse !important;
}

.qrcode table td {
  padding: 0 !important;
}

.login-countdown {
  min-height: 18px;
  margin: 0;
  color: #666666;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.qr-fallback {
  max-width: 180px;
  word-break: break-all;
  color: #999999;
  font-size: 12px;
  text-align: center;
}

.qrcode:empty,
.qr-fallback:empty {
  display: none;
}

.login-status {
  min-height: 22px;
  width: 100%;
  color: #333333;
  background: transparent;
  text-align: center;
  margin: 18px 0 0;
  padding: 0 12px;
  font-size: 14px;
}

.login-footer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  color: #777777;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.login-footer a {
  color: inherit;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}
