:root {
  --bo-bg: #eff2f5;
  --bo-glow: rgba(57, 97, 251, 0.07);
  --bo-ink: #222531;
  --bo-navy: #030525;
  --bo-muted: #58667e;
  --bo-line: #ebecf0;
  --bo-input: #e5e7ed;
  --bo-card: #fff;
  --bo-field: #fff;
  --bo-blue: #3961fb;
  --bo-icon: #3961fb;
  --bo-chip: #fff;
  --bo-shadow: rgba(3, 5, 37, 0.12) 0 3px 14px -8px, rgba(3, 5, 37, 0.024) 0 1px 2px, rgba(3, 5, 37, 0.28) 0 28px 56px -36px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bo-bg: #0f1420;
  --bo-glow: rgba(122, 150, 255, 0.07);
  --bo-ink: #e6e9f0;
  --bo-muted: #a3acbe;
  --bo-line: #262e3e;
  --bo-input: #2c3546;
  --bo-card: #171d2b;
  --bo-field: #171d2b;
  --bo-icon: #8b94a7;
  --bo-chip: #171d2b;
  --bo-shadow: rgba(0, 0, 0, 0.12) 0 3px 14px -8px, rgba(0, 0, 0, 0.024) 0 1px 2px, rgba(0, 0, 0, 0.28) 0 28px 56px -36px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: Inter, sans-serif;
  color: var(--bo-ink);
  background: var(--bo-bg);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.bo-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 50% -12%, var(--bo-glow), transparent 70%),
    var(--bo-bg);
}

.bo-login-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px 0;
}

.bo-login-lang,
.bo-login-theme {
  height: 36px;
  border: 1px solid var(--bo-line);
  border-radius: 10px;
  background: var(--bo-chip);
  color: var(--bo-muted);
}

.bo-login-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 30px 0 10px;
}

.bo-login-flag {
  width: 18px;
  height: 18px;
  display: block;
}

.bo-login-lang span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.bo-login-lang select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.bo-login-chevron,
.bo-login-theme svg,
.bo-login-ico,
.bo-login-eye svg,
.bo-login-submit svg,
.bo-login-note-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bo-login-chevron {
  position: absolute;
  right: 8px;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.bo-login-theme {
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.bo-login-theme svg { width: 17px; height: 17px; }
.bo-login-theme .is-sun { display: none; }
html[data-theme="dark"] .bo-login-theme .is-moon { display: none; }
html[data-theme="dark"] .bo-login-theme .is-sun { display: block; }

.bo-login-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 72px 16px 28px;
}

.bo-login-card {
  width: min(960px, 100%);
  min-height: 540px;
  display: grid;
  grid-template-columns: 384px minmax(0, 1fr);
  background: var(--bo-card);
  border: 1px solid var(--bo-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--bo-shadow);
}

.bo-login-brand {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 32px;
  color: #fff;
  background:
    radial-gradient(120% 70% at 0 0, rgba(57, 97, 251, 0.42), transparent 62%),
    radial-gradient(90% 60% at 100% 100%, rgba(116, 102, 240, 0.26), transparent 66%),
    #030525;
}

.bo-login-logo {
  display: block;
  width: auto;
  max-width: 128px;
  height: 20px;
  margin: 0;
  object-fit: contain;
  object-position: left center;
}

.bo-login-brand-copy { margin-top: auto; }

.bo-login-brand-copy h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.33px;
  line-height: 1.25;
}

.bo-login-brand-copy p {
  margin: 10px 0 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.6;
}

.bo-login-notes {
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bo-login-notes li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.45;
}

.bo-login-note-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
}

.bo-login-note-icon svg { width: 15px; height: 15px; }

.bo-login-panel {
  display: flex;
  padding: 44px 36px 32px;
}

.bo-login-form {
  width: 360px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bo-login-heading h1 {
  margin: 0;
  color: var(--bo-navy);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.36px;
  line-height: 1.25;
}

html[data-theme="dark"] .bo-login-heading h1 { color: #f5f7fa; }

.bo-login-heading p {
  margin: 6px 0 0;
  color: var(--bo-muted);
  font-size: 13px;
  line-height: 1.55;
}

.bo-login-error {
  margin: -6px 0 0;
  color: #d92d20;
  font-size: 13px;
  line-height: 1.4;
}

.bo-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bo-login-field span {
  color: var(--bo-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.bo-login-control { position: relative; }

.bo-login-ico {
  position: absolute;
  left: 13px;
  top: 14px;
  width: 16px;
  height: 16px;
  color: var(--bo-icon);
  pointer-events: none;
}

.bo-login-control input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--bo-input);
  border-radius: 10px;
  background: var(--bo-field);
  color: var(--bo-ink);
  outline: none;
}

.bo-login-control input:focus {
  border-color: var(--bo-blue);
  box-shadow: 0 0 0 3px rgba(57, 97, 251, 0.16);
}

.bo-login-control--password input { padding-right: 42px; }

.bo-login-eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--bo-muted);
  padding: 0;
}

.bo-login-eye svg { width: 16px; height: 16px; }
.bo-login-eye .is-off { display: none; }
.bo-login-eye.is-open .is-on { display: none; }
.bo-login-eye.is-open .is-off { display: block; }

.bo-login-submit {
  height: 44px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--bo-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: rgba(3, 5, 37, 0.12) 0 1px 2px, rgba(57, 97, 251, 0.7) 0 8px 18px -10px;
}

.bo-login-submit svg { width: 16px; height: 16px; }
.bo-login-submit:hover { filter: brightness(1.05); }

.bo-login-help {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--bo-line);
  color: var(--bo-muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.bo-login-copy {
  margin: 0;
  color: var(--bo-muted);
  font-size: 12px;
  line-height: 18px;
}

.bo-login-copy strong {
  font-weight: 500;
  letter-spacing: 0.96px;
}

.bo-login-qr {
  display: block;
  width: 196px;
  height: 196px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid var(--bo-line);
  border-radius: 12px;
  background: #fff;
}

.bo-login-secret {
  margin: 0;
  color: var(--bo-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  word-break: break-all;
}

.bo-login-control input.bo-login-code {
  padding-left: 14px;
  padding-right: 14px;
  text-align: center;
  letter-spacing: 0.28em;
  font-size: 18px;
  font-weight: 600;
}

.bo-login-help a {
  color: var(--bo-blue);
  text-decoration: none;
}

@media (max-width: 860px) {
  .bo-login-stage { padding-top: 28px; }
  .bo-login-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .bo-login-brand { min-height: 320px; }
  .bo-login-panel { padding: 28px 20px 24px; }
  .bo-login-form { width: 100%; }
}
