:root {
  --pkc-auth-bg: #e9edf2;
  --pkc-auth-bg-accent: #dbe6f3;
  --pkc-auth-panel-bg: rgba(255, 255, 255, 0.84);
  --pkc-auth-panel-solid: #ffffff;
  --pkc-auth-text: #172033;
  --pkc-auth-muted: #5f6b7a;
  --pkc-auth-border: rgba(148, 163, 184, 0.3);
  --pkc-auth-accent: #2454a6;
  --pkc-auth-accent-contrast: #ffffff;
  --pkc-auth-focus: #1f6feb;
  --pkc-auth-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
  --pkc-auth-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body.pkc-auth-theme-dark {
  --pkc-auth-bg: #0f1726;
  --pkc-auth-bg-accent: #1d3047;
  --pkc-auth-panel-bg: rgba(17, 24, 39, 0.82);
  --pkc-auth-panel-solid: #111827;
  --pkc-auth-text: #e5edf8;
  --pkc-auth-muted: #a5b4c7;
  --pkc-auth-border: rgba(148, 163, 184, 0.24);
  --pkc-auth-accent: #71a4ff;
  --pkc-auth-accent-contrast: #09111f;
  --pkc-auth-focus: #9ec1ff;
  --pkc-auth-shadow: 0 28px 60px rgba(2, 6, 23, 0.4);
  --pkc-auth-shadow-soft: 0 14px 28px rgba(2, 6, 23, 0.22);
}

body.dark-mode {
  --pkc-auth-panel-solid: #111827;
  --pkc-auth-text: #e5edf8;
  --pkc-auth-muted: #a5b4c7;
  --pkc-auth-border: rgba(148, 163, 184, 0.24);
  --pkc-auth-accent: #8eb4ff;
  --pkc-auth-accent-contrast: #09111f;
}

body.pkc-auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--pkc-auth-bg);
  background-image:
    radial-gradient(circle at top left, var(--pkc-auth-bg-accent), transparent 30rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(233, 237, 242, 0.9));
  color: var(--pkc-auth-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.pkc-auth-theme-dark.pkc-auth-page {
  background-image:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(15, 23, 38, 0.96), rgba(10, 15, 27, 1));
}

.pkc-auth-page a {
  color: var(--pkc-auth-accent);
}

.pkc-auth-page button,
.pkc-auth-page input,
.pkc-auth-page select,
.pkc-auth-page textarea {
  font: inherit;
}

.pkc-auth-page button,
.pkc-auth-button,
.pkc-auth-page input[type="submit"],
.pkc-auth-profile-logout button {
  border: 1px solid var(--pkc-auth-accent);
  border-radius: 12px;
  background: var(--pkc-auth-accent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pkc-auth-accent) 82%, white 18%),
    var(--pkc-auth-accent)
  );
  color: var(--pkc-auth-accent-contrast);
  cursor: pointer;
  font-weight: 650;
  padding: 0.78rem 1.05rem;
  box-shadow: 0 10px 22px rgba(36, 84, 166, 0.22);
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    box-shadow 0.16s ease;
}

.pkc-auth-page button:hover,
.pkc-auth-button:hover,
.pkc-auth-page input[type="submit"]:hover,
.pkc-auth-profile-logout button:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.pkc-auth-page input[type="text"],
.pkc-auth-page input[type="password"],
.pkc-auth-page input[type="email"],
.pkc-auth-page input[type="number"],
.pkc-auth-page input[type="search"],
.pkc-auth-page textarea,
.pkc-auth-page select {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--pkc-auth-text);
  padding: 0.82rem 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

body.pkc-auth-theme-dark.pkc-auth-page input[type="text"],
body.pkc-auth-theme-dark.pkc-auth-page input[type="password"],
body.pkc-auth-theme-dark.pkc-auth-page input[type="email"],
body.pkc-auth-theme-dark.pkc-auth-page input[type="number"],
body.pkc-auth-theme-dark.pkc-auth-page input[type="search"],
body.pkc-auth-theme-dark.pkc-auth-page textarea,
body.pkc-auth-theme-dark.pkc-auth-page select {
  background: rgba(15, 23, 42, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pkc-auth-page summary,
.pkc-auth-page button,
.pkc-auth-page a,
.pkc-auth-page input,
.pkc-auth-page select,
.pkc-auth-page textarea {
  outline-offset: 3px;
}

.pkc-auth-page summary:focus-visible,
.pkc-auth-page button:focus-visible,
.pkc-auth-page a:focus-visible,
.pkc-auth-page input:focus-visible,
.pkc-auth-page select:focus-visible,
.pkc-auth-page textarea:focus-visible {
  outline: 2px solid var(--pkc-auth-focus);
}

.pkc-auth-page .page-header {
  box-sizing: border-box;
  width: min(100%, 1120px);
  margin: 1rem auto 0;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--pkc-auth-border);
  background: rgba(255, 255, 255, 0.76);
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 82%, transparent);
  backdrop-filter: blur(18px);
  border-radius: 20px;
  box-shadow: var(--pkc-auth-shadow-soft);
}

.pkc-auth-page .page-main {
  box-sizing: border-box;
  width: min(100%, 1120px);
  margin: 1.6rem auto 0;
  padding: 0 1rem 2rem;
}

.pkc-auth-page .top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.pkc-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  color: inherit;
  text-decoration: none;
}

.pkc-auth-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pkc-auth-brand-kicker {
  color: var(--pkc-auth-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pkc-auth-brand-copy strong {
  color: var(--pkc-auth-text);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  line-height: 1.15;
}

.pkc-auth-brand-copy span:last-child {
  color: var(--pkc-auth-muted);
  font-size: 0.94rem;
}

.pkc-auth-brand-logo {
  width: auto;
  height: 2.8rem;
  max-width: 9.5rem;
  object-fit: contain;
  border-radius: 12px;
  padding: 0.42rem 0.55rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.pkc-auth-user-menu {
  margin-left: auto;
  position: relative;
}

.pkc-auth-profile-menu {
  position: relative;
}

.pkc-auth-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.pkc-auth-profile-trigger::-webkit-details-marker {
  display: none;
}

.pkc-auth-profile-roundel {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pkc-auth-accent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--pkc-auth-accent) 80%, white 20%),
    var(--pkc-auth-accent)
  );
  color: var(--pkc-auth-accent-contrast);
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pkc-auth-profile-trigger-name {
  color: var(--pkc-auth-muted);
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pkc-auth-profile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  min-width: 16rem;
  max-width: min(21rem, calc(100vw - 2rem));
  border: 1px solid var(--pkc-auth-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 90%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgb(15 23 42 / 20%);
  padding: 0.72rem;
}

body.dark-mode .pkc-auth-profile-panel,
body.pkc-auth-theme-dark .pkc-auth-profile-panel {
  background: #172133;
  background: color-mix(in srgb, #172133 88%, black 12%);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.46);
}

.pkc-auth-profile-menu[open] .pkc-auth-profile-trigger {
  opacity: 0.95;
}

.pkc-auth-profile-heading {
  margin: 0 0 0.7rem;
  color: var(--pkc-auth-muted);
  font-size: 0.84rem;
  padding: 0.18rem 0.25rem 0.68rem;
  border-bottom: 1px solid var(--pkc-auth-border);
}

.pkc-auth-profile-heading span,
.pkc-auth-profile-heading strong {
  display: block;
  overflow-wrap: anywhere;
}

.pkc-auth-profile-heading strong {
  color: var(--pkc-auth-text);
  font-size: 0.96rem;
  margin: 0.12rem 0;
}

body.dark-mode .pkc-auth-profile-heading,
body.pkc-auth-theme-dark .pkc-auth-profile-heading {
  color: #aebdd2;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

body.dark-mode .pkc-auth-profile-heading strong,
body.pkc-auth-theme-dark .pkc-auth-profile-heading strong {
  color: #f3f7ff;
}

.pkc-auth-profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pkc-auth-profile-links a,
.pkc-auth-login-link,
.pkc-auth-theme-toggle {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.76rem 0.82rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--pkc-auth-text);
  text-align: left;
  background: transparent;
  box-shadow: none;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.pkc-auth-profile-links a:hover,
.pkc-auth-profile-links a:focus-visible,
.pkc-auth-login-link:hover,
.pkc-auth-login-link:focus-visible,
.pkc-auth-theme-toggle:hover,
.pkc-auth-theme-toggle:focus-visible {
  background: rgba(36, 84, 166, 0.1);
  background: color-mix(in srgb, var(--pkc-auth-accent) 10%, transparent);
  color: var(--pkc-auth-accent);
  transform: translateX(1px);
}

body.dark-mode .pkc-auth-profile-links a,
body.pkc-auth-theme-dark .pkc-auth-profile-links a,
body.dark-mode .pkc-auth-login-link,
body.pkc-auth-theme-dark .pkc-auth-login-link {
  color: #e8eef8;
}

body.dark-mode .pkc-auth-profile-links a:hover,
body.dark-mode .pkc-auth-profile-links a:focus-visible,
body.pkc-auth-theme-dark .pkc-auth-profile-links a:hover,
body.pkc-auth-theme-dark .pkc-auth-profile-links a:focus-visible {
  background: rgba(113, 164, 255, 0.16);
  background: color-mix(in srgb, #71a4ff 16%, transparent);
  color: #f7fbff;
}

.pkc-auth-profile-logout {
  margin-top: 0.7rem;
  padding-top: 0.72rem;
  border-top: 1px solid var(--pkc-auth-border);
}

.pkc-auth-profile-logout button {
  width: 100%;
  box-shadow: none;
}

body.dark-mode .pkc-auth-profile-logout,
body.pkc-auth-theme-dark .pkc-auth-profile-logout {
  border-top-color: rgba(148, 163, 184, 0.18);
}

body.dark-mode .pkc-auth-profile-logout button,
body.pkc-auth-theme-dark .pkc-auth-profile-logout button {
  background: #202c43;
  background: color-mix(in srgb, #202c43 84%, black 16%);
  border-color: rgba(148, 163, 184, 0.24);
  color: #eef4ff;
}

.pkc-auth-surface,
.pkc-auth-card {
  width: min(100%, 52rem);
  margin: 0 auto;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 86%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: var(--pkc-auth-shadow);
  padding: 1.2rem;
}

.pkc-auth-surface--narrow {
  width: min(100%, 31rem);
  margin-top: clamp(4vh, 8vh, 10vh);
}

.pkc-auth-surface--form {
  width: min(100%, 38rem);
}

.pkc-auth-surface--wide {
  width: min(100%, 58rem);
}

.pkc-auth-surface > :first-child,
.pkc-auth-card > :first-child {
  margin-top: 0;
}

.pkc-auth-surface h1,
.pkc-auth-card h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.42rem, 2.2vw, 1.82rem);
  line-height: 1.08;
}

.pkc-auth-surface h2,
.pkc-auth-card h2 {
  margin: 1.15rem 0 0.4rem;
  font-size: 1.1rem;
  line-height: 1.2;
}

.pkc-auth-surface p,
.pkc-auth-card p,
.pkc-auth-surface li,
.pkc-auth-card li {
  color: var(--pkc-auth-text);
}

.pkc-auth-surface > p,
.pkc-auth-card > p {
  margin: 0.42rem 0;
}

.pkc-auth-surface form,
.pkc-auth-card form {
  margin: 0.8rem 0 0;
}

.pkc-auth-surface form + form,
.pkc-auth-card form + form {
  margin-top: 0.7rem;
}

.pkc-auth-surface form p,
.pkc-auth-card form p {
  margin: 0 0 0.68rem;
}

.pkc-auth-surface label,
.pkc-auth-card label {
  display: inline-block;
  margin-bottom: 0.22rem;
  font-weight: 650;
  color: var(--pkc-auth-text);
}

.pkc-auth-surface input[type="text"],
.pkc-auth-surface input[type="password"],
.pkc-auth-surface input[type="email"],
.pkc-auth-surface input[type="number"],
.pkc-auth-surface input[type="search"],
.pkc-auth-surface textarea,
.pkc-auth-surface select,
.pkc-auth-card input[type="text"],
.pkc-auth-card input[type="password"],
.pkc-auth-card input[type="email"],
.pkc-auth-card input[type="number"],
.pkc-auth-card input[type="search"],
.pkc-auth-card textarea,
.pkc-auth-card select {
  padding: 0.7rem 0.82rem;
}

.pkc-auth-surface img,
.pkc-auth-card img {
  max-width: min(100%, 17rem);
  height: auto;
  display: block;
  border-radius: 16px;
  background: #ffffff;
  padding: 0.7rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.pkc-auth-surface code,
.pkc-auth-card code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.14);
  padding: 0.18rem 0.48rem;
}

.pkc-auth-surface table,
.pkc-auth-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.pkc-auth-surface th,
.pkc-auth-card th,
.pkc-auth-surface td,
.pkc-auth-card td {
  border-bottom: 1px solid var(--pkc-auth-border);
  padding: 0.78rem 0.72rem;
  text-align: left;
  vertical-align: top;
}

.pkc-auth-surface th,
.pkc-auth-card th {
  color: var(--pkc-auth-muted);
  font-weight: 700;
}

.pkc-auth-page .flash-messages p[data-flash-category="error"],
.pkc-auth-page .flash-messages p[data-flash-category="danger"] {
  border-color: rgba(220, 38, 38, 0.28);
}

.pkc-auth-page .flash-messages p[data-flash-category="success"] {
  border-color: rgba(22, 163, 74, 0.28);
}

.pkc-auth-meta {
  color: var(--pkc-auth-muted);
  font-size: 0.94rem;
}

.pkc-auth-inline-error {
  color: #b42318;
  font-size: 0.9rem;
  margin-top: -0.45rem;
}

body.pkc-auth-theme-dark .pkc-auth-inline-error {
  color: #ffb4a8;
}

.pkc-auth-disclosure {
  margin: 0.7rem 0 0;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.08);
}

.pkc-auth-disclosure summary {
  cursor: pointer;
  list-style: none;
  padding: 0.8rem 0.95rem;
  font-weight: 650;
}

.pkc-auth-disclosure summary::-webkit-details-marker {
  display: none;
}

.pkc-auth-disclosure-body {
  padding: 0 0.95rem 0.95rem;
}

body.pkc-auth-theme-dark .pkc-auth-disclosure,
body.pkc-auth-theme-dark .pkc-auth-section-card {
  background: rgba(30, 41, 59, 0.58);
}

.pkc-auth-quiet-form {
  margin-top: 0.4rem;
}

.pkc-auth-quiet-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--pkc-auth-muted);
  font-weight: 600;
  padding: 0.2rem 0;
}

.pkc-auth-quiet-button:hover,
.pkc-auth-quiet-button:focus-visible {
  background: transparent;
  color: var(--pkc-auth-accent);
  transform: none;
}

.pkc-auth-section-grid {
  display: grid;
  gap: 1rem;
}

.pkc-auth-section-grid--tight {
  gap: 0.65rem;
}

.pkc-auth-section-card {
  border: 1px solid var(--pkc-auth-border);
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.08);
  padding: 0.8rem 0.85rem 0.85rem;
}

.pkc-auth-section-card h2 {
  margin-top: 0;
}

.pkc-auth-status-line {
  margin: 0.25rem 0;
}

.pkc-auth-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.75rem;
}

.pkc-auth-button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pkc-auth-accent);
  border-radius: 12px;
  background: var(--pkc-auth-accent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pkc-auth-accent) 82%, white 18%),
    var(--pkc-auth-accent)
  );
  color: var(--pkc-auth-accent-contrast);
  cursor: pointer;
  font-weight: 650;
  padding: 0.72rem 1rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(36, 84, 166, 0.22);
}

.pkc-auth-button-link:hover,
.pkc-auth-button-link:focus-visible {
  color: var(--pkc-auth-accent-contrast);
  filter: brightness(0.97);
}

.pkc-auth-theme-button {
  min-width: 10rem;
}

.pkc-auth-profile-page h1 {
  margin-bottom: 0.3rem;
  font-size: clamp(1.28rem, 2vw, 1.62rem);
}

.pkc-auth-profile-card {
  padding: 0.8rem 0.85rem;
}

.pkc-auth-profile-fields {
  display: grid;
  gap: 0.6rem;
}

.pkc-auth-profile-note {
  margin-top: -0.1rem;
}

.pkc-auth-profile-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.55rem;
}

.pkc-auth-profile-appearance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.pkc-auth-profile-appearance-label {
  color: var(--pkc-auth-muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.pkc-auth-profile-submit {
  margin: 0;
}

.pkc-auth-profile-submit input,
.pkc-auth-profile-submit button {
  margin: 0;
}

.pkc-auth-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.pkc-auth-filter-bar {
  display: grid;
  grid-template-columns: minmax(15rem, 1.6fr) repeat(4, minmax(8rem, 0.9fr)) auto;
  gap: 0.7rem;
  align-items: end;
  margin: 0.9rem 0 1rem;
}

.pkc-auth-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.pkc-auth-filter-field span {
  color: var(--pkc-auth-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.pkc-auth-filter-field--compact select,
.pkc-auth-filter-field--compact input {
  min-width: 0;
}

.pkc-auth-filter-actions {
  display: flex;
  align-items: end;
}

.pkc-auth-filter-actions input,
.pkc-auth-filter-actions button {
  margin: 0;
}

body.pkc-auth-theme-dark .pkc-auth-filter-field span,
body.pkc-auth-theme-dark .pkc-auth-pagination {
  color: #aebdd2;
}

body.pkc-auth-theme-dark .pkc-auth-button-link,
body.pkc-auth-theme-dark .pkc-auth-theme-button {
  color: #09111f;
}

.pkc-auth-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--pkc-auth-muted);
  font-size: 0.9rem;
}

.pkc-auth-pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.pkc-auth-embedded {
  min-height: auto;
  background-image: none;
  background: transparent;
}

.pkc-auth-embedded,
.pkc-auth-embedded html,
.pkc-auth-embedded body {
  overflow-x: hidden;
}

.pkc-auth-embedded .page-main {
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.65rem 0.8rem;
}

.pkc-auth-embedded .pkc-auth-surface,
.pkc-auth-embedded .pkc-auth-card {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 84%, transparent);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  padding: 0.9rem 0.95rem 1rem;
}

.pkc-auth-embedded .pkc-auth-profile-card {
  padding: 0.7rem 0.75rem 0.75rem;
}

.pkc-auth-embedded .pkc-auth-surface--narrow,
.pkc-auth-embedded .pkc-auth-surface--form,
.pkc-auth-embedded .pkc-auth-surface--wide {
  width: min(100%, 58rem);
  margin-top: 0;
}

@media (max-width: 720px) {
  .pkc-auth-page .page-header {
    align-items: flex-start;
    margin: 0.8rem auto 0;
    padding: 0.95rem 1rem;
  }

  .pkc-auth-brand {
    align-items: flex-start;
  }

  .pkc-auth-brand-logo {
    height: 2.45rem;
    max-width: 7.8rem;
  }

  .pkc-auth-profile-trigger-name {
    display: none;
  }

  .pkc-auth-profile-panel {
    right: 0;
    min-width: min(17rem, calc(100vw - 1rem));
  }

  .pkc-auth-page .page-main {
    margin-top: 1.2rem;
    padding: 0 0.85rem 1.6rem;
  }

  .pkc-auth-surface,
  .pkc-auth-card {
    padding: 1rem;
    border-radius: 20px;
  }

  .pkc-auth-surface--narrow {
    margin-top: 1.1rem;
  }

  .pkc-auth-embedded .page-main {
    padding: 0.5rem 0.5rem 0.7rem;
  }

  .pkc-auth-embedded .pkc-auth-surface,
  .pkc-auth-embedded .pkc-auth-card {
    padding: 0.75rem;
  }

  .pkc-auth-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pkc-auth-page-heading,
  .pkc-auth-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pkc-auth-filter-bar {
    grid-template-columns: 1fr;
  }
}

/* Portal-owned desktop administration layout. */
.pkc-auth-admin-page {
  height: 100vh;
  min-height: 0;
}

.pkc-auth-admin-page.pkc-auth-embedded {
  overflow: hidden;
}

.pkc-auth-admin-page.pkc-auth-embedded .page-main,
.pkc-auth-admin-page.pkc-auth-embedded .pkc-auth-surface--wide {
  height: 100%;
  min-height: 0;
}

.pkc-auth-admin-page.pkc-auth-embedded .page-main {
  padding: 0;
}

.pkc-auth-admin-page.pkc-auth-embedded .pkc-auth-surface--wide {
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pkc-auth-admin-page .pkc-auth-button-link {
  color: #ffffff;
}

body.pkc-auth-theme-dark .pkc-auth-admin-page .pkc-auth-button-link {
  color: #09111f;
}

.pkc-auth-admin-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 1rem 1.15rem 0.85rem;
}

.pkc-auth-admin-shell .pkc-auth-page-heading {
  flex: 0 0 auto;
  align-items: center;
  margin-bottom: 0.7rem;
}

.pkc-auth-admin-shell .pkc-auth-page-heading h1 {
  margin: 0;
}

.pkc-auth-kicker {
  margin: 0 0 0.2rem;
  color: var(--pkc-auth-accent) !important;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pkc-auth-admin-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
  padding: 0.6rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 70%, var(--pkc-auth-bg) 30%);
}

.pkc-auth-admin-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin: 0;
}

.pkc-auth-admin-toolbar label > span {
  color: var(--pkc-auth-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.pkc-auth-admin-toolbar input,
.pkc-auth-admin-toolbar select {
  min-height: 2.15rem;
  margin: 0;
  padding: 0.42rem 0.55rem;
}

.pkc-auth-search-field {
  flex: 1 1 22rem;
  max-width: 34rem;
}

.pkc-auth-admin-toolbar--search-only .pkc-auth-search-field {
  max-width: 42rem;
}

.pkc-auth-button--compact,
.pkc-auth-page .pkc-auth-button--compact {
  min-height: 2.15rem;
  width: auto;
  margin: 0;
  padding: 0.42rem 0.72rem;
  border-radius: 7px;
  font-size: 0.82rem;
}

.pkc-auth-secondary-link {
  align-self: center;
  padding: 0.4rem;
  font-size: 0.82rem;
}

.pkc-auth-secondary-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 7px;
  background: transparent;
  color: var(--pkc-auth-text);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.pkc-auth-danger-button,
.pkc-auth-page .pkc-auth-danger-button {
  border: 1px solid color-mix(in srgb, #b42318 38%, transparent);
  background: transparent;
  color: #b42318;
  box-shadow: none;
}

body.pkc-auth-theme-dark .pkc-auth-danger-button {
  color: #fda29b;
}

.pkc-auth-table-region {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 10px;
}

.pkc-auth-admin-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}

.pkc-auth-admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.58rem 0.65rem;
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 82%, var(--pkc-auth-bg) 18%);
  color: var(--pkc-auth-muted);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.pkc-auth-admin-table td {
  padding: 0.55rem 0.65rem;
  border-top: 1px solid var(--pkc-auth-border);
  vertical-align: middle;
}

.pkc-auth-admin-table tbody tr:hover {
  background: color-mix(in srgb, var(--pkc-auth-accent) 5%, transparent);
}

.pkc-auth-admin-table form {
  margin: 0;
}

.pkc-auth-wide-column,
.pkc-auth-details-column {
  width: 34%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pkc-auth-date-column {
  min-width: 11rem;
  white-space: nowrap;
}

.pkc-auth-ip-column {
  width: 8.5rem;
  white-space: nowrap;
}

.pkc-auth-actions-column {
  width: 1%;
}

.pkc-auth-event-name,
.pkc-auth-audit-table code {
  display: block;
}

.pkc-auth-audit-table code {
  margin-top: 0.15rem;
  color: var(--pkc-auth-muted);
  font-size: 0.68rem;
}

.pkc-auth-status-tag {
  display: inline-flex;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: #dcfae6;
  color: #067647;
  font-size: 0.72rem;
  font-weight: 700;
}

.pkc-auth-status-tag.is-disabled {
  background: #fee4e2;
  color: #b42318;
}

.pkc-auth-empty-state {
  padding: 2rem !important;
  color: var(--pkc-auth-muted);
  text-align: center;
}

.pkc-auth-admin-shell .pkc-auth-pagination {
  flex: 0 0 auto;
  margin-top: 0.6rem;
}

.pkc-auth-admin-section {
  flex: 0 0 auto;
  margin-top: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 10px;
}

.pkc-auth-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.pkc-auth-section-heading h2,
.pkc-auth-section-heading p {
  margin: 0;
}

.pkc-auth-section-heading p {
  margin-top: 0.18rem;
  color: var(--pkc-auth-muted);
  font-size: 0.8rem;
}

.pkc-auth-inline-add-form {
  display: flex;
  align-items: end;
  gap: 0.45rem;
  margin: 0;
}

.pkc-auth-inline-add-form label {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin: 0;
}

.pkc-auth-inline-add-form label span {
  color: var(--pkc-auth-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.pkc-auth-inline-add-form select {
  min-width: 14rem;
  min-height: 2.15rem;
  margin: 0;
  padding: 0.4rem 0.5rem;
}

.pkc-auth-table-region--members {
  max-height: 10.5rem;
}

.pkc-auth-group-editor {
  overflow: auto;
}

.pkc-auth-permissions-section {
  flex: 1 0 auto;
}

.pkc-auth-permission-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.pkc-auth-permission-column {
  min-width: 0;
  padding: 0.65rem;
  border-radius: 9px;
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 72%, var(--pkc-auth-bg) 28%);
}

.pkc-auth-permission-column > h3 {
  margin: 0 0 0.55rem;
  color: var(--pkc-auth-text);
  font-size: 0.92rem;
}

.pkc-auth-permission-area {
  margin: 0 0 0.55rem;
  padding: 0;
  border: 0;
}

.pkc-auth-permission-area legend {
  width: 100%;
  margin-bottom: 0.2rem;
  color: var(--pkc-auth-muted);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pkc-auth-permission-form {
  margin: 0 0 0.25rem;
}

.pkc-auth-permission-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.5rem;
  min-height: 3.4rem;
  padding: 0.52rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 8px;
  background: var(--pkc-auth-panel-solid);
  cursor: pointer;
}

.pkc-auth-permission-row:hover {
  border-color: color-mix(in srgb, var(--pkc-auth-accent) 55%, var(--pkc-auth-border));
}

.pkc-auth-permission-toggle {
  width: 1rem;
  height: 1rem;
  margin: 0.1rem 0 0;
}

.pkc-auth-permission-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.16rem;
}

.pkc-auth-permission-description {
  color: var(--pkc-auth-text);
  font-size: 0.8rem;
  line-height: 1.25;
}

.pkc-auth-permission-copy code {
  color: var(--pkc-auth-muted);
  font-size: 0.68rem;
}

.pkc-auth-availability {
  width: fit-content;
  padding: 0.12rem 0.32rem;
  border-radius: 4px;
  background: #fff4e5;
  color: #934f00;
  font-size: 0.64rem;
  font-weight: 700;
}

.pkc-auth-availability.is-not-enforced {
  background: #eef4ff;
  color: #1849a9;
}

.pkc-auth-save-feedback {
  min-width: 3.3rem;
  color: var(--pkc-auth-muted);
  font-size: 0.68rem;
  text-align: right;
}

.pkc-auth-save-feedback.is-saved {
  color: #067647;
}

.pkc-auth-save-feedback.is-error {
  color: #b42318;
}

.pkc-auth-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pkc-auth-admin-form-shell {
  overflow: auto;
}

.pkc-auth-detail-shell {
  max-width: 88rem;
  margin: 0 auto;
  overflow: auto;
}

.pkc-auth-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.pkc-auth-action-bar form {
  margin: 0;
}

.pkc-auth-summary-card,
.pkc-auth-technical-card {
  padding: 0.85rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 82%, var(--pkc-auth-bg) 18%);
}

.pkc-auth-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(10rem, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.pkc-auth-detail-grid > div {
  min-width: 0;
  padding: 0.62rem;
  border-radius: 8px;
  background: var(--pkc-auth-panel-solid);
}

.pkc-auth-detail-grid dt {
  margin-bottom: 0.25rem;
  color: var(--pkc-auth-muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.pkc-auth-detail-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--pkc-auth-text);
  overflow-wrap: anywhere;
}

.pkc-auth-detail-grid--audit {
  grid-template-columns: 1.25fr 1.4fr repeat(3, minmax(8rem, 1fr));
}

.pkc-auth-detail-grid code {
  color: var(--pkc-auth-muted);
  font-size: 0.75rem;
}

.pkc-auth-status-tag.is-neutral {
  background: #eef2f6;
  color: #475467;
}

.pkc-auth-detail-memberships {
  margin-top: 0.75rem;
}

.pkc-auth-technical-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(24rem, 1.2fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pkc-auth-technical-card h2 {
  margin: 0 0 0.5rem;
  color: var(--pkc-auth-text);
  font-size: 0.9rem;
}

.pkc-auth-technical-card pre {
  max-height: 24rem;
  margin: 0;
  padding: 0.75rem;
  overflow: auto;
  border-radius: 8px;
  background: color-mix(in srgb, var(--pkc-auth-bg) 72%, var(--pkc-auth-panel-solid) 28%);
  color: var(--pkc-auth-text);
  font: 0.78rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pkc-auth-user-edit-form {
  padding: 0.9rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 10px;
}

.pkc-auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.pkc-auth-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  color: var(--pkc-auth-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.pkc-auth-form-grid input {
  width: 100%;
  margin: 0;
}

.pkc-auth-checkbox-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
}

.pkc-auth-checkbox-row label,
.pkc-auth-remember-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--pkc-auth-text);
  cursor: pointer;
}

.pkc-auth-checkbox-row input,
.pkc-auth-remember-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.pkc-auth-protection-note {
  color: var(--pkc-auth-muted);
  font-size: 0.75rem;
}

.pkc-auth-user-edit-form .pkc-auth-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.pkc-auth-user-edit-form .pkc-auth-form-actions input {
  width: auto;
  margin: 0;
}

.pkc-auth-remember-option {
  align-items: flex-start;
  padding: 0.7rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 9px;
  background: color-mix(in srgb, var(--pkc-auth-panel-solid) 74%, var(--pkc-auth-bg) 26%);
}

.pkc-auth-remember-option span {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.pkc-auth-remember-option strong {
  font-size: 0.88rem;
}

.pkc-auth-remember-option small {
  color: var(--pkc-auth-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

body.pkc-auth-theme-dark .pkc-auth-summary-card,
body.pkc-auth-theme-dark .pkc-auth-technical-card,
body.pkc-auth-theme-dark .pkc-auth-remember-option {
  background: color-mix(in srgb, #172133 80%, black 20%);
}

body.pkc-auth-theme-dark .pkc-auth-detail-grid > div {
  background: #172133;
}

.pkc-auth-compact-edit-form {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(24rem, 1.3fr) auto;
  align-items: end;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--pkc-auth-border);
  border-radius: 10px;
}

.pkc-auth-compact-edit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  color: var(--pkc-auth-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.pkc-auth-compact-edit-form input,
.pkc-auth-compact-edit-form textarea {
  width: 100%;
  margin: 0;
}

.pkc-auth-compact-edit-form textarea {
  min-height: 5rem;
  resize: vertical;
}

.pkc-auth-form-actions input {
  width: auto;
  margin: 0;
}

body.pkc-auth-theme-dark .pkc-auth-admin-toolbar,
body.pkc-auth-theme-dark .pkc-auth-permission-column,
body.pkc-auth-theme-dark .pkc-auth-admin-table th {
  background: color-mix(in srgb, #172133 80%, black 20%);
}

body.pkc-auth-theme-dark .pkc-auth-permission-row {
  background: #172133;
}

body.pkc-auth-theme-dark .pkc-auth-status-tag {
  background: #073b2a;
  color: #75e0a7;
}

body.pkc-auth-theme-dark .pkc-auth-status-tag.is-disabled {
  background: #4a1d1f;
  color: #fda29b;
}

@media (max-width: 820px) {
  .pkc-auth-admin-shell {
    padding: 0.75rem;
    overflow: auto;
  }

  .pkc-auth-admin-toolbar,
  .pkc-auth-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .pkc-auth-search-field {
    flex-basis: auto;
    max-width: none;
  }

  .pkc-auth-permission-matrix {
    grid-template-columns: 1fr;
  }

  .pkc-auth-inline-add-form {
    align-items: stretch;
    flex-direction: column;
  }

  .pkc-auth-compact-edit-form {
    grid-template-columns: 1fr;
  }

  .pkc-auth-action-bar,
  .pkc-auth-checkbox-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pkc-auth-detail-grid,
  .pkc-auth-detail-grid--audit,
  .pkc-auth-form-grid,
  .pkc-auth-technical-grid {
    grid-template-columns: 1fr;
  }

  .pkc-auth-inline-add-form select {
    width: 100%;
    min-width: 0;
  }

  .pkc-auth-table-region {
    min-height: 15rem;
  }
}
