.pm-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border-color, #d7dfeb);
  border-radius: 50%;
  background: var(--bg-card, #fff);
  color: var(--text-main, #24344d);
  cursor: pointer;
}
.pm-theme-toggle:hover { border-color: currentColor; }
.pm-theme-toggle:focus-visible { outline: 3px solid #6495ed; outline-offset: 3px; }
.pm-theme-toggle svg { width: 22px; height: 22px; }
.pm-theme-toggle .pm-theme-sun { display: none; }
html[data-theme="dark"] .pm-theme-toggle { background: var(--bg-card, #192436); color: var(--text-main, #ecf2ff); border-color: var(--border-color, #46546b); }
html[data-theme="dark"] .pm-theme-toggle .pm-theme-moon { display: none; }
html[data-theme="dark"] .pm-theme-toggle .pm-theme-sun { display: block; }
.pm-auth-header { position: relative; padding-right: 56px; }
.pm-auth-header .pm-theme-toggle { position: absolute; top: 0; right: 0; }
.admin-auth-card .pm-theme-toggle { margin-right: 12px; }

/* Separate the theme control from the primary page links. */
.pm-nav-theme {
  display: flex;
  align-items: center;
  margin-left: 1rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--pm-border, #cbd5e1);
}
.pm-nav-theme > .pm-theme-toggle { width: 36px; height: 36px; padding: 7px; }
html[data-theme="dark"] .pm-nav-theme { border-color: #46546b; }
@media (max-width: 768px) {
  .pm-nav-theme {
    width: 100%;
    margin-left: 0;
    padding: 0.75rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--pm-border, #cbd5e1);
  }
}
.pm-standalone-theme { display: flex; justify-content: flex-end; padding: 1rem 1rem 0; }
