/* SaaS Admin operator login — same chrome language as public portal */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/brand_theme/static/src/fonts/IBMPlexSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/brand_theme/static/src/fonts/IBMPlexSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/brand_theme/static/src/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/brand_theme/static/src/fonts/IBMPlexSans-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/brand_theme/static/src/fonts/IBMPlexSerif-SemiBold.woff2") format("woff2");
}

:root {
  --ink: #1a1830;
  --ink-muted: #5c6478;
  --paper: #ffffff;
  --wash: #f3f5f8;
  --brand: #5b21b6;
  --brand-strong: #4c1d95;
  --accent: #e89a12;
  --accent-ink: #1a1830;
  --line: #e3e7ee;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26, 24, 48, 0.05), 0 22px 48px rgba(26, 24, 48, 0.08);
  --motion: 240ms;
  --max: 72rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "IBM Plex Sans", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--wash);
  line-height: 1.55;
}

.sa-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(91, 33, 182, 0.08), transparent 55%),
    radial-gradient(900px 380px at 88% 0%, rgba(232, 154, 18, 0.1), transparent 50%),
    var(--wash);
}

a { color: var(--brand); text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* —— Header (mirrors public .lp-top) —— */
.sa-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.75rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.sa-brand { display: inline-flex; text-decoration: none; }
.sa-logo {
  height: 2.2rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
  display: block;
}
.sa-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
  flex-wrap: wrap;
  font-size: 0.94rem;
}
.sa-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0;
  transition: color var(--motion);
}
.sa-nav a:hover { color: var(--ink); }
.sa-nav-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
}
.sa-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sa-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* —— Stage —— */
.sa-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 3.5rem;
}
.sa-stage {
  width: 100%;
  max-width: 26rem;
  animation: sa-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sa-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
}
.sa-stage h1 {
  margin: 0 0 0.55rem;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.sa-intro {
  margin: 0 0 1.35rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}
.sa-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.35rem 1.35rem 1.2rem;
  box-shadow: var(--shadow);
}
.sa-error {
  color: var(--danger);
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
}
.sa-form { display: grid; gap: 0.9rem; }
.sa-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.sa-form input {
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  background: #fff;
  transition: border-color var(--motion), box-shadow var(--motion);
}
.sa-form input:hover { border-color: #cfd6e3; }
.sa-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.12);
  outline: none;
}
.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 0.15rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background var(--motion), border-color var(--motion), transform var(--motion);
}
.sa-btn:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.sa-btn:active { transform: translateY(1px); }

/* —— Footer —— */
.sa-foot {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.sa-foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem 1.75rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.sa-foot strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.sa-foot a { color: var(--ink-muted); }
.sa-foot a:hover { color: var(--brand); }
.sa-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

@keyframes sa-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion: 0ms; }
  .sa-stage { animation: none; }
  .sa-btn:active { transform: none; }
}

@media (max-width: 767.98px) {
  .sa-nav-toggle { display: inline-flex; }
  .sa-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem 0 0.75rem;
  }
  .sa-nav.is-open { display: flex; }
  .sa-top { flex-wrap: wrap; }
  .sa-nav-badge { justify-content: center; }
}
