:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9e0e7;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --rose: #b4233a;
  --shadow: 0 22px 60px rgba(22, 31, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  color: #fff;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.login-copy p,
.login-note {
  color: var(--muted);
}

.kicker {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.login-copy {
  margin-bottom: 24px;
}

.login-copy p {
  margin: 0;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #b9c4d0;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

button {
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--teal-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.ghost-button {
  border: 1px solid #b9c4d0;
  background: #fff;
  color: var(--teal);
}

.ghost-button:hover {
  border-color: var(--teal);
  background: #eef8f6;
}

.setup-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.setup-box strong,
.setup-box span,
.qr-panel strong,
.qr-panel span {
  display: block;
}

.setup-box span,
.qr-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.qr-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #a7d8d2;
  border-radius: 8px;
  background: #f0fbf9;
}

.qr-panel[hidden] {
  display: none;
}

.qr-panel img {
  width: min(100%, 240px);
  height: auto;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
}

.login-note {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.6;
}
