.phr-auth {
  --auth-bg: #000;
  --auth-panel: #050505;
  --auth-line: rgba(255, 255, 255, 0.14);
  --auth-muted: rgba(255, 255, 255, 0.45);
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--auth-bg);
  color: #fff;
  font-family: "DM Sans", Inter, system-ui, sans-serif;
}

.phr-auth-panel {
  position: relative;
  z-index: 2;
  flex: 1 1 42%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1.25rem 1.25rem;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    #000;
}

@media (min-width: 640px) {
  .phr-auth-panel {
    padding: 1.5rem 2rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .phr-auth-panel {
    max-width: 560px;
    padding: 1.75rem 3rem 1.5rem;
  }
}

.phr-auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.phr-auth-logo {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: #fff;
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.phr-auth-logo img {
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
  display: block;
}

.phr-auth-logo:hover {
  transform: scale(1.04);
}

.phr-auth-portal {
  position: relative;
}

.phr-auth-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.35rem;
  padding: 0 0.85rem 0 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-size: 0.8rem;
  backdrop-filter: blur(10px);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.phr-auth-portal-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.phr-auth-portal-muted {
  color: rgba(255, 255, 255, 0.4);
  display: none;
}

@media (min-width: 480px) {
  .phr-auth-portal-muted {
    display: inline;
  }
}

.phr-auth-portal-mark {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fff, #7dd3fc);
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.65);
}

.phr-auth-portal-btn strong {
  font-weight: 600;
}

.phr-auth-portal-btn svg {
  width: 0.85rem;
  height: 0.85rem;
  opacity: 0.5;
  transition: transform 0.2s;
}

.phr-auth-portal-btn svg.is-open {
  transform: rotate(180deg);
}

.phr-auth-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.phr-auth-portal-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 50;
  width: 15.5rem;
  padding: 0.4rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 18, 0.96);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  animation: phr-select-in 0.16s ease;
}

.phr-auth-portal-menu button {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.12s;
}

.phr-auth-portal-menu button span {
  font-size: 0.875rem;
  font-weight: 600;
}

.phr-auth-portal-menu button small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.phr-auth-portal-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.phr-auth-portal-menu button.is-active {
  background: #fff;
  color: #000;
}

.phr-auth-portal-menu button.is-active small {
  color: rgba(0, 0, 0, 0.5);
}

.phr-auth-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  padding: 2.5rem 0 2rem;
}

.phr-auth-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.phr-auth-body h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

/* Blazor FocusOnNavigate focuses h1 — no focus box on headings */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible,
.phr-auth-body h1:focus,
.phr-auth-body h1:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.phr-auth-lead {
  margin: 0.85rem 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--auth-muted);
}

.phr-auth-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  animation: fade-in-up 0.4s ease;
}

.phr-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.phr-auth-field span {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding-left: 0.15rem;
}

.phr-auth-field input {
  height: 3.15rem;
  width: 100%;
  border-radius: 9999px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.035);
  padding: 0 1.2rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.phr-auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.phr-auth-field input:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.phr-auth-field input:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.phr-auth-password {
  position: relative;
}

.phr-auth-password input {
  padding-right: 3.25rem;
}

/* Hide native Edge/Chrome reveal so our eye stays visible on dark auth fields */
.phr-auth-password input::-ms-reveal,
.phr-auth-password input::-ms-clear {
  display: none;
}

.phr-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.15rem;
  bottom: auto;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  transition: color 0.15s ease, background 0.15s ease;
}

.phr-auth-password-toggle svg {
  display: block;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  pointer-events: none;
}

.phr-auth-password-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.phr-auth-password-toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.phr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.15rem;
  width: 100%;
  padding: 0 1.15rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.phr-btn:active {
  transform: scale(0.985);
}

.phr-btn-solid {
  border: none;
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 30px rgba(255, 255, 255, 0.08);
}

.phr-btn-solid:hover {
  opacity: 0.94;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 14px 36px rgba(255, 255, 255, 0.12);
}

.phr-btn-outline {
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-weight: 500;
}

.phr-btn-outline em {
  width: 100%;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
  margin-top: -0.15rem;
}

.phr-btn-outline:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.28);
}

.phr-btn-ghost {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  min-height: 2.5rem;
}

.phr-btn-ghost:hover {
  color: #fff;
}

.phr-btn-ghost u {
  text-underline-offset: 3px;
}

.phr-btn-badge {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.55rem;
  font-weight: 800;
}

.phr-btn-badge--logo {
  background: #fff;
  padding: 0.15rem;
}

.phr-btn-badge--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.phr-btn-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.phr-auth-switch {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.42);
}

.phr-auth-switch button {
  border: none;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.phr-auth-switch a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phr-auth-switch a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Platform / System Admin — simple centered login (theme-aware) */
.pa-login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    #050505;
  color: #fff;
  font-family: "DM Sans", Inter, system-ui, sans-serif;
}

.pa-login-theme {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 2;
}

.pa-login-card {
  width: 100%;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  text-align: center;
}

.pa-login-brand {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.pa-login-logo {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}

.pa-login-wordmark {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.pa-login-card h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.pa-login-sub {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.pa-login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.pa-login-field span {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding-left: 0.15rem;
}

.pa-login-field input {
  height: 2.85rem;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 1rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.pa-login-field input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.pa-login-field input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.pa-login-submit {
  margin-top: 0.25rem;
  height: 2.85rem;
  border: none;
  border-radius: 0.75rem;
  background: #fff;
  color: #0a0a0a;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.pa-login-submit:hover:not(:disabled) {
  opacity: 0.92;
}

.pa-login-submit:active:not(:disabled) {
  transform: scale(0.99);
}

.pa-login-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.pa-login-error {
  margin: 0;
  font-size: 0.85rem;
  color: #f87171;
  text-align: left;
}

/* Light theme for System Admin / Platform login */
html.light .pa-login,
html[data-theme="light"] .pa-login {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(30, 58, 95, 0.08), transparent 55%),
    #f4f6f9;
  color: #1e3a5f;
}

html.light .pa-login-wordmark,
html[data-theme="light"] .pa-login-wordmark {
  color: rgba(30, 58, 95, 0.85);
}

html.light .pa-login-sub,
html[data-theme="light"] .pa-login-sub {
  color: rgba(30, 58, 95, 0.55);
}

html.light .pa-login-field span,
html[data-theme="light"] .pa-login-field span {
  color: rgba(30, 58, 95, 0.55);
}

html.light .pa-login-field input,
html[data-theme="light"] .pa-login-field input {
  border: 1px solid rgba(30, 58, 95, 0.18);
  background: #fff;
  color: #1e3a5f;
}

html.light .pa-login-field input::placeholder,
html[data-theme="light"] .pa-login-field input::placeholder {
  color: rgba(30, 58, 95, 0.35);
}

html.light .pa-login-field input:focus,
html[data-theme="light"] .pa-login-field input:focus {
  border-color: rgba(30, 58, 95, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

html.light .pa-login-submit,
html[data-theme="light"] .pa-login-submit {
  background: #1e3a5f;
  color: #fff;
}

html.light .pa-login-error,
html[data-theme="light"] .pa-login-error {
  color: #dc2626;
}

/* Legacy platform auth accents (unused by simple login) */
.phr-auth--platform .phr-auth-logo {
  background: linear-gradient(145deg, #e2e8f0 0%, #94a3b8 100%);
  color: #0f172a;
}

.phr-auth-back {
  align-self: flex-start;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.25rem;
}

.phr-auth-back:hover {
  color: #fff;
}

.phr-auth-error {
  margin: 0;
  font-size: 0.85rem;
  color: #f87171;
}

.phr-password-rules {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.phr-password-rules li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.phr-password-rules li.is-met {
  color: #34d399;
}

.phr-auth-hint {
  margin: 0.15rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.32);
}

.phr-auth-foot {
  max-width: 24rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.32);
}

.phr-auth-foot .almost-thr-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f3f3ee;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
}

.phr-auth-foot .almost-thr-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.phr-auth-foot .almost-thr-link:hover,
.phr-auth-foot .almost-thr-link:focus-visible {
  color: #fff;
  text-decoration: none;
}

.phr-auth-foot .almost-thr-link:hover span,
.phr-auth-foot .almost-thr-link:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.phr-auth-copy {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.phr-link {
  border: none;
  background: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font: inherit;
}

.phr-auth-brand {
  position: relative;
  display: none;
  flex: 1 1 58%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: #030303;
}

@media (min-width: 1024px) {
  .phr-auth-brand {
    display: flex;
  }
}

.phr-auth-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  pointer-events: none;
  animation: phr-orb 12s ease-in-out infinite;
}

.phr-auth-orb-a {
  top: -12%;
  right: -8%;
  width: min(42vw, 34rem);
  height: min(42vw, 34rem);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 40%, transparent 70%);
}

.phr-auth-orb-b {
  bottom: -18%;
  left: 10%;
  width: min(36vw, 28rem);
  height: min(36vw, 28rem);
  background: radial-gradient(circle, rgba(96, 165, 250, 0.18) 0%, rgba(59, 130, 246, 0.05) 45%, transparent 70%);
  animation-delay: -4s;
}

.phr-auth-orb-c {
  top: 35%;
  left: 35%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  animation-delay: -7s;
}

@keyframes phr-orb {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-3%, 4%) scale(1.06); opacity: 0.85; }
}

.phr-auth-grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.phr-auth-preview {
  position: relative;
  z-index: 1;
  width: min(92%, 44rem);
  padding: 2rem 1.5rem;
  animation: fade-in-up 0.7s ease;
}

.phr-auth-preview-frame {
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141414;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition:
    transform 0.45s ease,
    background 0.85s ease,
    border-color 0.85s ease,
    box-shadow 0.85s ease;
}

.phr-auth-preview:hover .phr-auth-preview-frame {
  transform: perspective(1400px) rotateY(-2deg) rotateX(1deg);
}

/* Browser chrome removed from auth demos — preview is product UI only. */
.phr-auth-preview-chrome {
  display: none !important;
}

.phr-auth-preview-chrome > span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
}

.phr-auth-preview-chrome > span:nth-child(1) { background: #ff5f57; }
.phr-auth-preview-chrome > span:nth-child(2) { background: #febc2e; }
.phr-auth-preview-chrome > span:nth-child(3) { background: #28c840; }

.phr-auth-preview-url {
  margin-left: 0.65rem;
  flex: 1;
  height: 1.45rem;
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  transition: background 0.85s ease, color 0.85s ease;
}

.phr-auth-preview-theme {
  flex-shrink: 0;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.85s ease, color 0.85s ease, border-color 0.85s ease;
}

.phr-auth-preview-shell,
.phr-auth-preview-rail,
.phr-auth-preview-mark,
.phr-auth-preview-rail > div:not(.phr-auth-preview-mark),
.phr-auth-preview-head small,
.phr-auth-preview-head strong,
.phr-auth-preview-head p,
.phr-auth-preview-metrics > div,
.phr-auth-preview-metrics span,
.phr-auth-preview-metrics b,
.phr-auth-preview-metrics em,
.phr-auth-preview-card,
.phr-auth-preview-card h4,
.phr-auth-preview-actions span,
.phr-auth-preview-card li,
.phr-auth-preview-card li b,
.phr-auth-preview-card li small {
  transition:
    background 0.85s ease,
    border-color 0.85s ease,
    color 0.85s ease,
    box-shadow 0.85s ease;
}

.phr-auth-preview-shell {
  display: flex;
  min-height: 22rem;
  background: #1a1a1a;
}

.phr-auth-preview-rail {
  width: 3.1rem;
  padding: 0.75rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #111;
}

.phr-auth-preview-mark {
  width: 1.85rem;
  height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: #fff;
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.phr-auth-preview-rail > div:not(.phr-auth-preview-mark) {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
}

.phr-auth-preview-rail > div.is-on {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.phr-auth-preview-main {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.1rem 1.15rem;
}

.phr-auth-preview-head {
  margin-bottom: 0.9rem;
}

.phr-auth-preview-head small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.phr-auth-preview-head strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.phr-auth-preview-head p {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.42);
}

.phr-auth-preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.phr-auth-preview-metrics > div {
  padding: 0.55rem 0.6rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.phr-auth-preview-metrics span {
  display: block;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.42);
}

.phr-auth-preview-metrics b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #fff;
}

.phr-auth-preview-metrics em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.35);
}

.phr-auth-preview-metrics > div.is-ok em { color: #6ee7b7; }
.phr-auth-preview-metrics > div.is-warn em { color: #fcd34d; }

.phr-auth-preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.phr-auth-preview-card {
  padding: 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  min-height: 8.5rem;
}

.phr-auth-preview-card h4 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.88);
}

.phr-auth-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.phr-auth-preview-actions span {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.phr-auth-preview-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.phr-auth-preview-card li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.phr-auth-preview-card li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.phr-auth-preview-card li b {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.phr-auth-preview-card li small {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.38);
}

.phr-auth-preview-caption {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
  margin-left: 0.25rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.phr-auth-preview-caption span:first-child {
  color: #fff;
  font-weight: 600;
}

.phr-auth-tag-sep {
  width: 1px;
  height: 0.85rem;
  background: rgba(255, 255, 255, 0.2);
}

/* Dashboard preview — light theme flip */
.phr-auth-preview-frame.is-light {
  border-color: hsl(217 30% 82%);
  background: #f4f6f9;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 40px 80px rgba(15, 40, 80, 0.18),
    0 0 60px rgba(255, 255, 255, 0.08);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-chrome {
  border-bottom-color: hsl(217 30% 88%);
  background: #eef2f7;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-url {
  background: rgba(255, 255, 255, 0.85);
  color: hsl(217 30% 40%);
  border: 1px solid hsl(217 30% 88%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-theme {
  border-color: hsl(217 40% 75%);
  background: #fff;
  color: hsl(217 60% 32%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-shell {
  background: #f8fafc;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-rail {
  border-right-color: hsl(217 30% 88%);
  background: #e8eef5;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-mark {
  background: hsl(217 60% 28%);
  color: #fff;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-rail > div:not(.phr-auth-preview-mark) {
  background: rgba(33, 64, 120, 0.08);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-rail > div.is-on {
  background: hsl(217 60% 28% / 0.18);
  box-shadow: 0 0 0 1px hsl(217 60% 28% / 0.25);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-head small {
  color: hsl(217 30% 45%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-head strong {
  color: hsl(217 60% 22%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-head p {
  color: hsl(217 25% 42%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-metrics > div {
  border-color: hsl(217 30% 88%);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 40, 80, 0.04);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-metrics span {
  color: hsl(217 25% 45%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-metrics b {
  color: hsl(217 60% 22%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-metrics em {
  color: hsl(217 20% 48%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-metrics > div.is-ok em {
  color: #059669;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-metrics > div.is-warn em {
  color: #b45309;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-card {
  border-color: hsl(217 30% 88%);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 40, 80, 0.04);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-card h4 {
  color: hsl(217 60% 24%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-actions span {
  border-color: hsl(217 30% 88%);
  background: hsl(217 60% 97%);
  color: hsl(217 50% 30%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-card li {
  border-bottom-color: hsl(217 30% 90%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-card li b {
  color: hsl(217 55% 26%);
}

.phr-auth-preview-frame.is-light .phr-auth-preview-card li small {
  color: hsl(217 25% 48%);
}

@media (max-width: 1280px) {
  .phr-auth-preview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .phr-auth-panel {
    background:
      radial-gradient(ellipse 90% 40% at 100% -10%, rgba(255, 255, 255, 0.1), transparent 50%),
      radial-gradient(ellipse 70% 35% at 0% 100%, rgba(59, 130, 246, 0.12), transparent 45%),
      #000;
  }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes phr-select-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.phr-auth-preview-shell.is-shot {
  display: block;
  min-height: 0;
  padding: 0;
  background: #0a0a0a;
}

.phr-auth-preview-shot {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 28rem);
  object-fit: cover;
  object-position: top left;
  transition: opacity 0.85s ease;
}

.phr-auth-preview-frame.is-light .phr-auth-preview-shell.is-shot {
  background: #f8fafc;
}

.phr-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Signup */
.phr-auth-body--signup {
  max-width: 26rem;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
  justify-content: flex-start;
  flex: 1 0 auto;
}

.phr-auth-brand-inner {
  position: relative;
  z-index: 1;
  width: min(92%, 40rem);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: fade-in-up 0.7s ease;
}

.phr-auth-brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.phr-auth-brand-title {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: #fff;
}

.phr-auth-brand-copy {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  max-width: 28rem;
}

.phr-signup-preview {
  position: relative;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141414;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.phr-signup-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(55vh, 26rem);
  object-fit: cover;
  object-position: top left;
  vertical-align: middle;
}

.phr-signup-steps {
  margin: 0 0 1.25rem;
}

.phr-signup-steps-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.phr-signup-steps-bar > div {
  flex: 1;
  height: 0.28rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease;
}

.phr-signup-steps-bar > div.is-on {
  background: #fff;
}

.phr-signup-steps p {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

.phr-auth-select {
  height: 3.15rem;
  width: 100%;
  border-radius: 9999px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.035);
  padding: 0 1.1rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Custom Select on auth screens */
.phr-auth .phr-auth-select-wrap .ww-select-trigger {
  min-height: 3.15rem;
  border-radius: 9999px;
  border-color: var(--auth-line);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  box-shadow: none;
  padding-left: 1.2rem;
}

.phr-auth .phr-auth-select-wrap .ww-select-trigger:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.055);
}

.phr-auth .phr-auth-select-wrap.is-open .ww-select-trigger {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.phr-auth .phr-auth-select-wrap .ww-select-value.is-placeholder {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 500;
}

.phr-auth .phr-auth-select-wrap .ww-select-chevron {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  border-radius: 9999px;
}

.phr-auth .phr-auth-select-wrap .ww-select-menu {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 18, 0.97);
  color: #fff;
}

.phr-auth .phr-auth-select-wrap .ww-select-option {
  color: rgba(255, 255, 255, 0.88);
}

.phr-auth .phr-auth-select-wrap .ww-select-option:hover,
.phr-auth .phr-auth-select-wrap .ww-select-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.phr-auth .phr-auth-select-wrap .ww-select-option.is-selected {
  background: #fff;
  color: #0a0a0a;
}

.phr-auth-select option {
  color: #111;
  background: #fff;
}

.phr-auth-select:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.phr-signup-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
  cursor: pointer;
}

.phr-signup-check input {
  margin-top: 0.2rem;
  accent-color: #fff;
}

.phr-signup-actions {
  display: flex;
  gap: 0.6rem;
}

.phr-signup-actions .phr-btn {
  flex: 1;
}

.phr-signup-summary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.phr-signup-summary p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.phr-signup-summary span {
  color: rgba(255, 255, 255, 0.42);
}

.phr-signup-summary strong {
  font-weight: 600;
  text-align: right;
}

.phr-signup-preview-fallback {
  padding: 2rem 1.5rem;
  color: rgba(255, 255, 255, 0.75);
}

.phr-signup-preview-fallback strong {
  display: block;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.phr-signup-preview-fallback p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.45;
}
