/* ============================================================
   auth.css - login (standalone, no sidebar shell)
   ============================================================ */
.auth-body {
  background: var(--canvas);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* theme toggle top-right */
.auth-theme {
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
}
.auth-theme:hover { background: var(--surface-inset); color: var(--ink); }
.auth-theme svg { width: 17px; height: 17px; }

/* card */
.auth-card {
  width: 100%;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-brand img { width: 48px; height: 48px; }
.auth-brand span {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.auth-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 26px;
}

/* form */
#auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#auth-form .set-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#auth-form .set-field > label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}
#auth-form .input-flat {
  height: 44px;
  font-size: 13px;
}

/* password row */
.auth-pw {
  position: relative;
}
.auth-pw .input-flat {
  padding-right: 44px;
}
.auth-pw-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  background: transparent;
  border: none;
}
.auth-pw-toggle:hover { background: var(--surface-inset); color: var(--ink); }
.auth-pw-toggle svg { width: 16px; height: 16px; }

/* options row */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.btn-link:hover { color: var(--accent-hover); }

/* error */
.auth-error {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 4px;
  line-height: 1.4;
}
.auth-error:not(:empty) { display: block; }

/* submit */
.auth-submit {
  height: 46px;
  width: 100%;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  position: relative;
}
.auth-submit.is-loading .auth-submit-text { opacity: 0; }
.auth-submit.is-loading .auth-submit-spinner { display: block !important; position: absolute; }

/* divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 20px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* SSO */
.auth-sso {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-sso .btn-flat {
  height: 44px;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
}

/* hint */
.auth-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}
.auth-hint svg { width: 16px; height: 16px; flex-shrink: 0; }
.auth-hint b { font-weight: 600; }

/* footer links */
.auth-foot {
  display: flex;
  gap: 20px;
  margin-top: 28px;
}
.auth-foot a {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.auth-foot a:hover { color: var(--ink); }

/* responsive */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 22px; }
  .auth-sso { grid-template-columns: 1fr; }
  .auth-options { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---- dark overrides (already token-based; these keep SSO icons readable) ---- */
html.dark .auth-sso .btn-flat svg { color: var(--ink); }
