/* ============================================
   PersonalCloudComputing.com — admin auth pages
   Login · MFA · Logout

   These pages are standalone Razor Pages (Layout = null) and do not load
   site.css. They pull the same brand tokens through the _BrandTokens partial,
   so the accent follows the site. Neutral values are duplicated from site.css
   deliberately: the auth pages must render correctly even in isolation.
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: var(--brand-primary, #1d4ed8);
  --blue-bright: var(--brand-accent, #2563eb);
  --blue-deep: var(--brand-secondary, #1e40af);
  --blue-050: color-mix(in srgb, var(--brand-primary, #1d4ed8) 7%, #ffffff);
  --blue-ring: color-mix(in srgb, var(--brand-accent, #2563eb) 22%, transparent);

  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --line: #e5e7eb;
  --text-bright: #0f172a;
  --text-primary: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --emerald: #047857;
  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--surface-alt);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 420px; width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05), 0 24px 48px -20px rgba(15, 23, 42, .16);
  width: 100%;
}
.card + .card { margin-top: 1rem; }

.card-header { text-align: center; margin-bottom: 1.75rem; }
.card-header h1,
.card-header h2 {
  font-size: 1.5rem;
  color: var(--text-bright);
  font-weight: 700;
  letter-spacing: -0.022em;
  margin-bottom: 0.35rem;
}
.card-header h2 { font-size: 1.2rem; }
.card-header p { color: var(--text-secondary); font-size: 0.875rem; }

.icon {
  width: 48px;
  height: 48px;
  background: var(--blue-050);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
  color: var(--blue);
  font-size: 1.4rem;
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text-bright);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px var(--blue-ring);
}
input::placeholder { color: var(--text-muted); }
input.input-error { border-color: var(--red); }

.btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--blue);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--blue-deep);
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand-primary, #1d4ed8) 42%, transparent);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.msg-error,
.msg-success {
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.msg-error { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.msg-success { background: var(--emerald-bg); color: var(--emerald); border: 1px solid var(--emerald-border); }

.msg-match { font-size: 0.8rem; margin: -0.75rem 0 1rem; }
.msg-match.ok { color: var(--emerald); }
.msg-match.bad { color: var(--red); }

.pw-hint { font-size: 0.75rem; color: var(--text-muted); margin: -0.75rem 0 1rem; }

.back-link { text-align: center; margin-top: 1.25rem; }
.back-link a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}
.back-link a:hover { color: var(--blue); }

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
  border-radius: 4px;
}
