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

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.app-menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.num {
  text-align: right;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.center {
  justify-content: center;
  text-align: center;
}

.section-title {
  margin: 12px 0 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 24% 18%, rgba(20, 184, 166, .15), transparent 30%),
    radial-gradient(circle at 78% 76%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, #f8fafc 0%, #eef5f8 48%, #f6f9fc 100%);
}

.login-shell {
  width: min(460px, 100%);
}

.login-panel {
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
  padding: 34px;
}

.login-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.login-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #d6c51f;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.login-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel h1 {
  margin: 0;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.login-copy {
  margin: 0 0 22px;
  color: #64748b;
  font-weight: 720;
}

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

.login-panel label {
  color: #334155;
  font-weight: 850;
}

.login-panel input {
  min-height: 50px;
  margin-top: 7px;
  border-color: #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
}

.login-panel input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
  outline: none;
}

.login-2fa-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}

.login-2fa-box span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-2fa-box code {
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

.login-2fa-qr {
  display: grid;
  place-items: center;
  width: 216px;
  min-height: 216px;
  margin: 2px auto;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.login-2fa-qr canvas,
.login-2fa-qr img,
.login-2fa-qr svg {
  display: block;
  width: 192px !important;
  height: 192px !important;
}

.login-2fa-manual {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.login-2fa-manual summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 850;
}

.login-2fa-manual code {
  display: block;
  margin-top: 8px;
}

.login-2fa-box small {
  color: #64748b;
  font-weight: 700;
  line-height: 1.45;
}

.login-trust-device {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.login-panel .login-trust-device input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: #0d9488;
}

.login-secondary-action {
  margin-top: 12px;
}

.login-secondary-action .ghost {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
}

.login-panel .primary {
  min-height: 52px;
  margin-top: 2px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488 0%, #2563eb 100%);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .22);
  font-size: 16px;
}

@media (max-width: 640px) {
  .login-body {
    padding: 16px;
  }

  .login-panel {
    padding: 24px;
  }

  .login-panel h1 {
    font-size: 26px;
  }
}
