@font-face {
  font-family: 'Glacial Indifference';
  src: url('/static/fonts/GlacialIndifference-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --admin-primary: #ffffff;
  --admin-secondary: rgba(255, 255, 255, 0.85);
  --admin-accent: #71b7ff;
  --admin-accent-strong: #4c88ff;
  --admin-accent-soft: #a7d4ff;
  --admin-bg-overlay: rgba(10, 14, 23, 0.6);
  --admin-font-display: 'Glacial Indifference', 'Segoe UI', sans-serif;
  --admin-font-body: 'Glacial Indifference', 'Segoe UI', sans-serif;
  --profile-field-surface: linear-gradient(135deg, rgba(10, 15, 28, 0.85), rgba(20, 28, 52, 0.72));
  --profile-menu-card-background: linear-gradient(135deg, rgba(21, 29, 56, 0.85), rgba(49, 62, 109, 0.65));
  --profile-warm-accent-start: rgba(118, 183, 221, 0.9);
  --profile-warm-accent-end: rgba(86, 153, 204, 0.88);
  --profile-warm-shadow: rgba(66, 122, 173, 0.38);
  --profile-warm-gradient: linear-gradient(135deg, var(--profile-warm-accent-start), var(--profile-warm-accent-end));
  --profile-button-surface: linear-gradient(140deg, rgba(220, 234, 244, 0.88), rgba(192, 214, 232, 0.82));
  --profile-success: #68e0b8;
}

* {
  box-sizing: border-box;
}

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

body.admin-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--admin-font-body);
  color: var(--admin-primary);
  background: url('/static/images/wood-background-admin.jpg') center/cover no-repeat fixed;
  position: relative;
}

body.admin-body.admin-body--locked {
  overflow: hidden;
}

body.profile-modal-open {
  overflow: hidden;
}

body.no-scroll {
  overflow: hidden;
}

body.occupation-overlay-open {
  overflow: hidden;
}

body.admin-body::before,
body.admin-body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.admin-body::before {
  background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.15), transparent 58%),
              linear-gradient(135deg, rgba(14, 21, 44, 0.92), rgba(14, 21, 44, 0.48));
  mix-blend-mode: screen;
}

body.admin-body::after {
  background: linear-gradient(160deg, rgba(10, 14, 23, 0.75) 0%, rgba(10, 14, 23, 0.25) 65%, transparent 100%);
  mix-blend-mode: multiply;
}

.admin-fullscreen-shell {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

.portal-user-controls {
  position: relative;
  margin-left: auto;
  z-index: 20;
}

.portal-user-controls--fullscreen {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.portal-user-menu {
  position: relative;
}

.portal-user-trigger {
  list-style: none;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(12, 18, 34, 0.86);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.portal-user-trigger::-webkit-details-marker {
  display: none;
}

.portal-user-trigger::marker {
  content: '';
}

.portal-user-trigger:hover,
.portal-user-trigger:focus-visible,
.portal-user-menu[open] .portal-user-trigger {
  background: rgba(35, 60, 116, 0.9);
  border-color: rgba(255, 255, 255, 0.66);
}

.portal-user-trigger:focus-visible {
  outline: 2px solid rgba(113, 183, 255, 0.85);
  outline-offset: 2px;
}

.portal-user-trigger svg {
  width: 1.2rem;
  height: 1.2rem;
}

.portal-user-menu__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 10.75rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 12, 24, 0.95);
  box-shadow: 0 18px 38px rgba(4, 8, 18, 0.55);
  backdrop-filter: blur(12px);
}

.portal-user-menu__item {
  display: block;
  padding: 0.56rem 0.65rem;
  border-radius: 8px;
  color: #f6f9ff;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease;
}

.portal-user-menu__item:hover,
.portal-user-menu__item:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.portal-user-menu__item--danger {
  color: #ffb3b3;
}

.portal-user-menu__item--danger:hover,
.portal-user-menu__item--danger:focus-visible {
  background: rgba(255, 99, 132, 0.18);
}

.admin-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  position: relative;
  z-index: 1;
}

.admin-card {
  max-width: 1350px;
  width: 90vw;
  padding: clamp(3rem, 4vw, 4rem);
  border-radius: 36px;
  backdrop-filter: blur(22px);
  background: linear-gradient(160deg, rgba(14, 21, 44, 0.85), rgba(14, 21, 44, 0.55));
  box-shadow: 0 45px 120px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 2.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-meta {
  font-size: 0.95rem;
  letter-spacing: 0.4rem;
  text-transform: uppercase;
  color: var(--admin-secondary);
}

.admin-title h1 {
  font-family: var(--admin-font-display);
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  margin: 0;
  line-height: 1.1;
}

.admin-title p {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  margin: 1rem 0 0;
  color: var(--admin-secondary);
}

.admin-sections-grid {
  display: grid;
  gap: 3.4rem;
  grid-template-columns: 1fr;
}

.admin-section-card {
  padding: clamp(2rem, 4vw, 3rem) clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: 32px;
  background: linear-gradient(165deg, rgba(45, 55, 72, 0.85), rgba(30, 40, 58, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(4, 8, 18, 0.4);
  display: grid;
  gap: 2.25rem;
}

.admin-section-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-section__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.admin-section__title {
  margin: 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.admin-section__subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.5;
}

.admin-section-card__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.5rem;
}

.admin-section-card__actions--single {
  grid-template-columns: 1fr;
}

.admin-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.75rem, 3.5vw, 2.25rem);
  border-radius: 1.6rem;
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.82), rgba(8, 12, 24, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 26px 60px -40px rgba(2, 6, 23, 0.85);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 260px;
  overflow: hidden;
  isolation: isolate;
}

.admin-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(94, 234, 212, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 0;
}

.admin-tile::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  z-index: 0;
  opacity: 0.95;
  background: transparent;
  transition: opacity 200ms ease;
}

.admin-tile > * {
  position: relative;
  z-index: 1;
}

.admin-tile__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.admin-tile__title {
  margin: 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.4rem, 2.3vw, 1.7rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.admin-tile__icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.22), rgba(56, 189, 248, 0.2));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Icon colors - All tiles use same blue variant */
.admin-section-card--admin .admin-tile:nth-child(1) .admin-tile__icon,
.admin-section-card--admin .admin-tile:nth-child(2) .admin-tile__icon,
.admin-section-card--admin .admin-tile:nth-child(3) .admin-tile__icon,
.admin-section-card--admin .admin-tile:nth-child(4) .admin-tile__icon,
.admin-section-card--admin .admin-tile:nth-child(5) .admin-tile__icon,
.admin-section-card--nav .admin-tile:nth-child(1) .admin-tile__icon,
.admin-section-card--nav .admin-tile:nth-child(2) .admin-tile__icon,
.admin-section-card--integrations .admin-tile:nth-child(1) .admin-tile__icon,
.admin-section-card--integrations .admin-tile:nth-child(2) .admin-tile__icon,
.admin-section-card--support .admin-tile .admin-tile__icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(56, 189, 248, 0.18));
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.admin-tile__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  font-size: 1rem;
  flex-grow: 1;
}

.admin-tile--full {
  grid-column: 1 / -1;
}

.admin-tile__cta {
  margin-top: auto;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
}

.admin-tile--link:hover,
.admin-tile--link:focus-visible,
.admin-tile--action:hover,
.admin-tile--action:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px -40px rgba(15, 23, 42, 0.9);
  border-color: color-mix(in oklch, #5eead4 45%, rgba(148, 163, 184, 0.35) 55%);
}

.admin-tile--link:hover::before,
.admin-tile--link:focus-visible::before,
.admin-tile--action:hover::before,
.admin-tile--action:focus-visible::before {
  opacity: 1;
}

.admin-tile--link:hover::after,
.admin-tile--link:focus-visible::after,
.admin-tile--action:hover::after,
.admin-tile--action:focus-visible::after {
  opacity: 1;
}

.admin-section-card--admin {
  background: linear-gradient(165deg, rgba(48, 60, 78, 0.85), rgba(32, 42, 60, 0.8));
}

.admin-section-card--nav {
  background: linear-gradient(165deg, rgba(42, 48, 88, 0.85), rgba(28, 35, 68, 0.8));
}

.admin-section-card--integrations {
  background: linear-gradient(165deg, rgba(35, 68, 85, 0.85), rgba(25, 50, 68, 0.8));
}

.admin-section-card--support {
  background: linear-gradient(165deg, rgba(45, 62, 95, 0.85), rgba(30, 45, 75, 0.8));
}

/* Simplified base backgrounds - color comes from ::after overlay */
.admin-section-card--admin .admin-tile:nth-child(1),
.admin-section-card--admin .admin-tile:nth-child(2),
.admin-section-card--admin .admin-tile:nth-child(3),
.admin-section-card--admin .admin-tile:nth-child(4),
.admin-section-card--admin .admin-tile:nth-child(5),
.admin-section-card--nav .admin-tile:nth-child(1),
.admin-section-card--nav .admin-tile:nth-child(2),
.admin-section-card--integrations .admin-tile:nth-child(1),
.admin-section-card--integrations .admin-tile:nth-child(2),
.admin-section-card--support .admin-tile {
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.82), rgba(8, 12, 24, 0.7));
}

/* Pseudo-element color overlays - All tiles use same blue variant */
.admin-section-card--admin .admin-tile:nth-child(1)::after,
.admin-section-card--admin .admin-tile:nth-child(2)::after,
.admin-section-card--admin .admin-tile:nth-child(3)::after,
.admin-section-card--admin .admin-tile:nth-child(4)::after,
.admin-section-card--admin .admin-tile:nth-child(5)::after,
.admin-section-card--nav .admin-tile:nth-child(1)::after,
.admin-section-card--nav .admin-tile:nth-child(2)::after,
.admin-section-card--support .admin-tile::after {
  background: linear-gradient(140deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.12));
}

.admin-tile--link:focus-visible,
.admin-tile--action:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 3px;
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--admin-accent), var(--admin-accent-strong));
  color: #f7fbff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 28px rgba(76, 136, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: auto;
}

.admin-button--tile {
  width: 100%;
  margin-top: auto;
}

.admin-button:hover,
.admin-button:focus {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--admin-accent-soft), var(--admin-accent-strong));
  box-shadow: 0 20px 45px rgba(76, 136, 255, 0.38);
}

.admin-logo {
  width: clamp(140px, 14vw, 200px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.profile-section {
  display: grid;
  gap: 2rem;
}


.profile-dialog {
  border: none;
  padding: 0;
  margin: 0;
  max-width: min(1280px, 96vw);
  width: min(1280px, 96vw);
  background: transparent;
  color: inherit;
  border-radius: 32px;
  overflow: visible;
}

.profile-dialog[aria-hidden='true'] {
  display: none;
}

.profile-dialog[open] {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-dialog::backdrop {
  background: rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(14px);
}

body.occupation-overlay-open .profile-dialog::backdrop {
  display: none !important;
}

body.occupation-overlay-open .profile-dialog {
  display: none !important;
}

.profile-dialog.is-open {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(14px);
  z-index: 40;
}

.profile-dialog__surface {
  display: flex;
  flex-direction: column;
  width: min(1280px, 96vw);
  max-height: 90vh;
  padding: 0;
  border-radius: 32px;
  background: linear-gradient(176deg, rgba(12, 18, 34, 0.94), rgba(6, 9, 20, 0.9));
  box-shadow: 0 42px 95px rgba(8, 10, 24, 0.58);
}

@media (min-width: 960px) {
  .profile-dialog__surface {
    height: 90vh;
  }
}

.profile-dialog.is-open .profile-dialog__surface,
.profile-dialog[open] .profile-dialog__surface {
  width: min(1280px, 96vw);
}

@media (max-width: 720px) {
  .profile-dialog {
    border-radius: 0;
  }
  .profile-dialog__surface {
    border-radius: 0;
  }
}

.profile-dialog__scroll {
  --profile-section-spacing: clamp(1.7rem, 2.8vw, 2.6rem);
  --profile-dialog-top-padding: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.05);
  padding: var(--profile-dialog-top-padding) var(--profile-section-spacing)
    var(--profile-section-spacing);
  background: linear-gradient(180deg, rgba(8, 12, 26, 0.94), rgba(6, 9, 20, 0.96));
}

.profile-dialog__scroll--locked {
  overflow: hidden;
}

.profile-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.profile-mode-toggle__label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

.profile-mode-toggle__choices {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 14, 22, 0.65);
}

.profile-mode-toggle__button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(235, 243, 255, 0.78);
  padding: 0.45rem 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    color 0.2s ease;
}

.profile-mode-toggle__button[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}
.profile-mode-toggle__button--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-mode-toggle__button--active {
  background: rgba(111, 186, 255, 0.22);
  color: #f2f7ff;
  border-color: rgba(111, 186, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(111, 186, 255, 0.25);
}

.profile-mode-toggle__button:hover:not([aria-disabled='true']),
.profile-mode-toggle__button:focus-visible:not([aria-disabled='true']) {
  transform: translateY(-1px);
  border-color: rgba(196, 223, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 26px rgba(9, 13, 24, 0.55);
  outline: none;
}

.profile-mode-toggle__hint {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.profile-editor__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 2vw, 2rem);
}

.profile-dialog__scroll::-webkit-scrollbar {
  width: 12px;
}

.profile-dialog__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  border: 3px solid rgba(12, 18, 34, 0.9);
}

.profile-dialog__scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  margin-block: 0 var(--profile-section-spacing);
}

.profile-header h2 {
  margin: 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.profile-intro {
  margin: 0.75rem 0 0;
  color: var(--admin-secondary);
  line-height: 1.6;
  max-width: 48ch;
}

.profile-meta__primary {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-primary);
  word-break: break-word;
}

.profile-meta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.profile-action {
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--profile-button-surface);
  color: rgba(0, 0, 0, 0.88);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.85;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.profile-action:hover,
.profile-action:focus {
  opacity: 1;
  border-color: rgba(0, 0, 0, 0.55);
  background: var(--profile-warm-gradient);
  color: #000;
  transform: translateY(-1px);
}

.profile-action:disabled {
  cursor: not-allowed;
}

.profile-action--account {
  min-width: 17.5rem;
  border-color: rgba(118, 246, 215, 0.52);
  background: linear-gradient(135deg, rgba(101, 230, 198, 0.95), rgba(90, 205, 176, 0.92));
  color: #06231e;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(56, 173, 142, 0.28);
  text-decoration: none;
  opacity: 1;
}

.profile-action--account:hover,
.profile-action--account:focus {
  border-color: rgba(168, 255, 235, 0.78);
  background: linear-gradient(135deg, rgba(130, 243, 216, 0.98), rgba(108, 218, 190, 0.96));
  color: #021715;
  box-shadow: 0 18px 36px rgba(72, 197, 165, 0.34);
}

.profile-content {
  display: grid;
  gap: clamp(3.4rem, 5vw, 4.6rem);
  margin-top: clamp(2rem, 4vw, 2.5rem);
  transition: opacity 200ms ease, transform 200ms ease;
}

.profile-content--transitioning {
  opacity: 0;
  transform: translateX(-8px);
}

.profile-form {
  display: grid;
  gap: clamp(3.4rem, 5vw, 4.6rem);
}

.profile-panel {
  margin: 0;
  padding: 0;
  border: 0;
  --profile-panel-accent: rgba(70, 186, 138, 0.26);
  --profile-panel-background: radial-gradient(circle at 14% 12%, rgba(76, 194, 148, 0.42) 0%, rgba(38, 106, 75, 0.22) 22%, rgba(10, 20, 16, 0.88) 46%, rgba(4, 8, 6, 0.96) 58%, rgba(3, 6, 5, 0.98) 100%);
  --profile-panel-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0-.001-8.001A4 4 0 0 0 12 12zm0 2c-4.418 0-8 2.239-8 5v1h16v-1c0-2.761-3.582-5-8-5z'/%3E%3C/svg%3E");
}

.profile-panel__surface {
  position: relative;
  display: grid;
  gap: clamp(1.35rem, 2.8vw, 2.1rem);
  padding: clamp(1.7rem, 3.2vw, 2.4rem);
  border-radius: 24px;
  background: var(--profile-panel-background);
  border: 1px solid rgba(150, 226, 190, 0.12);
  box-shadow: 0 24px 58px rgba(4, 12, 8, 0.58), 0 0 32px rgba(56, 166, 126, 0.18);
  overflow: visible;
  isolation: isolate;
}

.profile-panel__surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% 10%, var(--profile-panel-accent), rgba(0, 0, 0, 0) 38%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 75%);
  pointer-events: none;
}

.profile-panel__surface > * {
  position: relative;
  z-index: 1;
}

.profile-panel__header {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  padding-bottom: 1.6rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-panel__icon {
  position: relative;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 234, 247, 0.72);
  background: radial-gradient(circle at 30% 30%, var(--profile-warm-accent-start), var(--profile-warm-accent-end));
  box-shadow: 0 18px 34px var(--profile-warm-shadow);
}

.profile-panel__icon::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.82));
  mask: var(--profile-panel-icon) center / 70% 70% no-repeat;
  -webkit-mask: var(--profile-panel-icon) center / 70% 70% no-repeat;
  filter: drop-shadow(0 8px 18px var(--profile-warm-shadow));
}

.profile-panel__titles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-panel__title {
  margin: 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  letter-spacing: 0.015em;
}

.profile-panel__subtitle {
  margin: 0;
  color: rgba(212, 242, 228, 0.78);
  line-height: 1.55;
  max-width: 52ch;
}

.profile-panel__body {
  display: grid;
  gap: 1.8rem;
}

.profile-panel__body--meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.profile-panel__body--meta .profile-meta__primary {
  flex: 1 1 auto;
}

.profile-panel--basic {
  --profile-panel-accent: rgba(98, 226, 174, 0.26);
  --profile-panel-background: radial-gradient(circle at 14% 12%, rgba(94, 220, 170, 0.32) 0%, rgba(34, 96, 68, 0.18) 20%, rgba(9, 18, 14, 0.88) 40%, rgba(3, 6, 5, 0.97) 55%, rgba(2, 4, 3, 0.99) 100%);
  --profile-panel-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v16H4z m4 3v2h8V7z m0 4v2h5v-2z'/%3E%3C/svg%3E");
}

.profile-panel--skills {
  --profile-panel-accent: rgba(82, 202, 154, 0.24);
  --profile-panel-background: radial-gradient(circle at 14% 12%, rgba(82, 202, 154, 0.28) 0%, rgba(30, 86, 60, 0.16) 20%, rgba(8, 16, 12, 0.88) 40%, rgba(3, 6, 5, 0.97) 55%, rgba(2, 4, 3, 0.99) 100%);
  --profile-panel-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 2.09 4.24 4.68.68-3.39 3.3.8 4.65L12 14.77 7.82 15.9l.8-4.65-3.39-3.3 4.68-.68z'/%3E%3C/svg%3E");
}

.profile-panel--occupations {
  --profile-panel-accent: rgba(82, 202, 154, 0.24);
  --profile-panel-background: radial-gradient(circle at 14% 12%, rgba(82, 202, 154, 0.24) 0%, rgba(16, 52, 38, 0.18) 22%, rgba(6, 12, 9, 0.9) 48%, rgba(2, 5, 4, 0.98) 62%, rgba(2, 4, 3, 0.99) 100%);
  --profile-panel-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 15 9l7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z'/%3E%3C/svg%3E");
}

.profile-panel--documents {
  --profile-panel-accent: rgba(74, 190, 146, 0.22);
  --profile-panel-background: radial-gradient(circle at 14% 12%, rgba(70, 186, 142, 0.26) 0%, rgba(26, 78, 54, 0.15) 20%, rgba(8, 16, 12, 0.88) 40%, rgba(3, 6, 5, 0.97) 55%, rgba(2, 4, 3, 0.99) 100%);
  --profile-panel-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6z m9 1.5V8h4.5zM9 11v1h6v-1zm0 3v1h6v-1z'/%3E%3C/svg%3E");
}

.profile-panel--user {
  --profile-panel-accent: rgba(106, 232, 184, 0.3);
  --profile-panel-background: radial-gradient(circle at 14% 12%, rgba(100, 226, 176, 0.34) 0%, rgba(40, 104, 72, 0.2) 20%, rgba(10, 20, 16, 0.9) 40%, rgba(4, 8, 6, 0.97) 55%, rgba(2, 4, 3, 0.99) 100%);
  --profile-panel-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0-.001-8.001A4 4 0 0 0 12 12zm0 2c-4.418 0-8 2.239-8 5v1h16v-1c0-2.761-3.582-5-8-5z'/%3E%3C/svg%3E");
}

.profile-panel--user .profile-panel__surface {
  gap: 0.9rem;
  padding: 1.25rem 1.6rem;
}

.profile-panel--user .profile-panel__body--meta {
  gap: 0.6rem;
  align-items: flex-start;
}

.profile-panel--user .profile-meta__actions {
  gap: 0.6rem;
}

.profile-panel--user .profile-panel__header {
  padding-bottom: 0.9rem;
  margin-bottom: 0;
}

.profile-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-grid--documents {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.profile-grid--stacked {
  grid-template-columns: minmax(0, 1fr);
}

.profile-skills__body .profile-grid--stacked {
  gap: var(--profile-skills-stack-gap, 1.3rem);
}

.profile-skills__body {
  --profile-skills-stack-gap: 1.3rem;
  gap: 2.4rem;
}

.profile-skills__fields {
  display: grid;
  gap: var(--profile-skills-stack-gap, 1.3rem);
}

.profile-skills__fields .profile-field {
  gap: 0.6rem;
}

.profile-employment {
  gap: 2.8rem;
}

.profile-employment .profile-field--select.profile-field--compact {
  gap: 0.9rem;
  margin-bottom: 0;
}

.profile-employment .profile-field__hint {
  margin-top: 0.2rem;
}

.profile-basic {
  display: grid;
  gap: 2rem;
}

.profile-basic__layout {
  display: grid;
  gap: 1.75rem;
}

.profile-avatar {
  grid-area: avatar;
}

.profile-basic__identity {
  grid-area: identity;
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.profile-basic__name {
  margin: 0;
}

.profile-basic__meta {
  display: grid;
  gap: 1.05rem;
}

.profile-basic__about {
  grid-area: about;
}

.profile-basic__languages {
  grid-area: languages;
  gap: 0.65rem;
  align-self: stretch;
}

.profile-basic__about textarea {
  min-height: 8.5rem;
}

@media (min-width: 640px) {
  .profile-basic__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (min-width: 720px) {
  .profile-basic__layout {
    grid-template-columns: minmax(250px, 0.9fr) minmax(360px, 1fr);
    grid-template-areas:
      "avatar identity"
      "about about"
      "languages languages";
    align-items: start;
    gap: 2.25rem;
  }

  .profile-basic__identity {
    align-self: stretch;
  }

  .profile-basic__about textarea {
    min-height: 9.25rem;
  }
}

@media (min-width: 1200px) {
  .profile-basic__layout {
    grid-template-columns: minmax(300px, 0.95fr) minmax(560px, 1.05fr);
    grid-template-areas:
      "avatar identity"
      "about about"
      "languages languages";
    gap: 2.75rem 3.25rem;
  }

  .profile-basic__identity {
    gap: 1.5rem;
  }

  .profile-basic__about textarea {
    min-height: 10.25rem;
  }

  .profile-basic__languages {
    gap: 0.65rem;
  }
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: rgba(216, 224, 245, 0.78);
}

.profile-field label,
.profile-field__label,
.profile-avatar__title,
.profile-document__title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
}

.profile-field label,
.profile-field__label {
  margin: 0;
  display: inline-block;
}

.profile-field--display {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--profile-field-surface);
  gap: 0.4rem;
}

.profile-field--display .profile-field__label {
  color: rgba(255, 255, 255, 0.82);
}

.profile-field--compact {
  gap: 0.12rem;
  margin-bottom: 1.25rem;
}

.profile-field--compact:last-child {
  margin-bottom: 0;
}

.profile-field--compact .profile-field__hint {
  line-height: 1.35;
  margin: 0;
}

.profile-field--spaced-top {
  margin-top: 0;
}

.profile-basic__languages-hint {
  max-width: 48ch;
}

.profile-basic__languages .profile-languages {
  margin-top: 0;
}

.profile-field__value {
  font-size: 1rem;
  color: var(--admin-primary);
}

.profile-field__value--empty {
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

.profile-document__meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.profile-document__meta-line {
  display: inline;
}

.profile-document__meta-line + .profile-document__meta-line {
  margin-left: 0.5rem;
}

@media (min-width: 960px) {
  .profile-document__meta-line {
    display: block;
  }

  .profile-document__meta-line + .profile-document__meta-line {
    margin-left: 0;
  }
}

.profile-field--full {
  grid-column: 1 / -1;
}

.profile-field--half {
  min-width: 0;
}

.profile-field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.profile-field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--profile-field-surface);
  color: var(--admin-primary);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-field select:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(98, 214, 160, 0.25);
  outline: none;
  background: linear-gradient(135deg, rgba(16, 24, 40, 0.9), rgba(28, 38, 62, 0.78));
}

.profile-field__hint {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.profile-employment {
  display: grid;
  gap: 2.5rem;
}

.employment-panels {
  display: grid;
  gap: 2rem;
}

.employment-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.6rem 1.75rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(12, 24, 20, 0.72), rgba(6, 12, 10, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.employment-panel[hidden] {
  display: none !important;
}

.employment-panel__intro {
  display: grid;
  gap: 0.8rem;
}

.employment-panel__title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--admin-primary);
}

.employment-panel__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}
.employment-panel__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.45;
}

.employment-panel__content {
  display: grid;
  gap: 1.8rem;
}

.employment-panel__checkbox {
  margin-top: 0.25rem;
}

.employment-dependent[hidden] {
  display: none !important;
}

.employment-panel__info {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.employment-panel__info li {
  margin-left: 0.65rem;
}

.employment-panel__info--note {
  padding-left: 0;
  border-left: 3px solid rgba(98, 214, 160, 0.4);
  padding-inline: 1rem;
}

.employment-panel__info--note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.styrk-summary {
  display: grid;
  gap: 1.1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(18, 28, 48, 0.88), rgba(12, 20, 36, 0.78));
  color: var(--admin-primary);
  box-shadow: 0 18px 40px rgba(2, 10, 24, 0.35);
}

.styrk-summary[hidden] {
  display: none !important;
}

.styrk-summary__hint {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.styrk-summary__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.styrk-summary__item {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: rgba(15, 26, 48, 0.65);
  border: 1px solid rgba(103, 180, 255, 0.22);
}

.styrk-summary__item--more {
  background: rgba(88, 174, 255, 0.15);
  border: 1px solid rgba(111, 186, 255, 0.4);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.styrk-summary__item--more:hover {
  background: rgba(88, 174, 255, 0.25);
  border-color: rgba(111, 186, 255, 0.6);
  transform: translateY(-1px);
}

.styrk-summary__item--more .styrk-summary__name {
  color: rgba(173, 210, 255, 0.95);
}

.styrk-summary__name {
  font-weight: 600;
}

.styrk-summary__alternate {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.styrk-summary__meta {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.styrk-summary__empty {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.styrk-summary__edit {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 186, 255, 0.4);
  background: linear-gradient(135deg, rgba(111, 186, 255, 0.85), rgba(88, 224, 206, 0.78));
  color: #041018;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.styrk-summary__edit:hover,
.styrk-summary__edit:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(88, 174, 255, 0.35);
}

.styrk-summary__edit:disabled,
.styrk-summary__edit[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.styrk-summary__icon {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
  display: inline-block;
  position: relative;
}

.styrk-summary__icon::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  right: -0.05rem;
  width: 0.55rem;
  height: 0.55rem;
  background: currentColor;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.styrk-selector-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(4, 10, 18, 0.96);
  backdrop-filter: blur(6px);
  z-index: 2200;
  overflow: hidden;
  overscroll-behavior: contain;
}

.styrk-selector-overlay.is-open {
  display: flex;
}

.styrk-selector-overlay[hidden] {
  display: none !important;
}

.styrk-selector-overlay__surface {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: auto;
  border-radius: 0;
  border: 1px solid rgba(111, 186, 255, 0.2);
  background: rgba(8, 16, 28, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
}

@media (min-width: 768px) {
  .styrk-selector-overlay {
    padding: 2.5vh 2.5vw;
  }

  .styrk-selector-overlay__surface {
    border-radius: 20px;
    max-width: min(1400px, 90vw);
    height: 92vh;
    max-height: 960px;
  }
}

.styrk-selector__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 1rem;
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.96), rgba(8, 16, 28, 0.88));
}

.styrk-selector__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--admin-primary);
}

.styrk-selector__close {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(12, 20, 36, 0.75);
  position: relative;
  cursor: pointer;
}

.styrk-selector__close::before,
.styrk-selector__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 2px;
  background: var(--admin-primary);
}

.styrk-selector__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.styrk-selector__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.styrk-selector__close:hover,
.styrk-selector__close:focus {
  background: rgba(18, 30, 52, 0.85);
}

.styrk-selector {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 2rem 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  position: relative;
  min-height: 0;
}

.styrk-selector--disabled {
  opacity: 0.65;
}

/* Two-column layout for occupation selector */
.styrk-selector-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  column-gap: 1.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 1.2rem;
  overscroll-behavior: contain;
}

.styrk-selector-layout__left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
  overscroll-behavior: contain;
}

.styrk-selector-layout__right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 1rem;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
  overscroll-behavior: contain;
}

/* Mobile: stack columns vertically */
@media (max-width: 767px) {
  .styrk-selector-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    row-gap: 1.5rem;
  }

  .styrk-selector-layout__right {
    order: -1;
  }
}

.styrk-selector__selected {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 18px;
  background: rgba(20, 87, 70, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(105, 224, 206, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(105, 224, 206, 0.25);
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.styrk-selector__selected[hidden] {
  display: none !important;
}

.styrk-selector__selected-label {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(144, 255, 210, 0.85);
  font-weight: 600;
}

.styrk-selector__selected-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.styrk-selected-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(20, 87, 70, 0.95), rgba(17, 71, 57, 0.85));
  border-radius: 12px;
  padding: 0.5rem 0.4rem 0.5rem 0.85rem;
  box-shadow: 0 4px 12px rgba(8, 24, 19, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.styrk-selected-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(8, 24, 19, 0.4);
}

.styrk-selected-item__name {
  background: none;
  border: none;
  color: #effcf6;
  font-size: 0.9rem;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.styrk-selected-item__remove {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 28, 24, 0.6);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.styrk-selected-item__remove:hover,
.styrk-selected-item__remove:focus {
  background: rgba(220, 38, 38, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.styrk-selector__controls {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 0.2rem;
}

.styrk-selector__label {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.styrk-selector__results {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: none;
  background: rgba(11, 28, 52, 0.78);
  max-height: 12rem;
  overflow: auto;
  box-shadow: inset 0 0 0 1px rgba(111, 186, 255, 0.16);
}

.styrk-selector__results[hidden] {
  display: none !important;
}

.styrk-selector__results-label {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.styrk-selector__results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.styrk-selector__results-empty {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.styrk-selector__status {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.styrk-selector__status[data-status-type='error'] {
  color: #ffb8b8;
}

.styrk-selector__summary {
  padding: 0.85rem 1.2rem;
  border-radius: 14px;
  background: rgba(11, 28, 52, 0.65);
  border: 1px solid rgba(111, 186, 255, 0.2);
  color: rgba(173, 210, 255, 0.9);
  font-size: 0.9rem;
  text-align: center;
}

.styrk-selector__groups {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 0 0.5rem 0 0;
  display: grid;
  gap: 1rem;
  position: relative;
}

.styrk-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.styrk-tree__item {
  list-style: none;
}

.styrk-tree__item--branch {
  position: relative;
}

.styrk-tree__item--branch::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0.9rem;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(111, 186, 255, 0.12), rgba(111, 186, 255, 0));
  pointer-events: none;
}

.styrk-tree__item--level1::before {
  display: none;
}

.styrk-tree__item--branch > .styrk-group {
  position: relative;
  margin-left: 0.4rem;
}

.styrk-tree__item--level2 > .styrk-group {
  margin-left: 1rem;
}

.styrk-tree__item--level3 > .styrk-group {
  margin-left: 1.4rem;
}

.styrk-tree__item--leaf {
  margin-left: 2rem;
}

.styrk-selector__groups::-webkit-scrollbar {
  width: 10px;
}

.styrk-selector__groups::-webkit-scrollbar-track {
  background: rgba(10, 18, 16, 0.7);
  border-radius: 10px;
}

.styrk-selector__groups::-webkit-scrollbar-thumb {
  background: rgba(98, 214, 160, 0.45);
  border-radius: 10px;
}

/* Fade indicator for scrollable content */
.styrk-selector__groups::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(8, 16, 28, 0.95), transparent);
  pointer-events: none;
  z-index: 10;
  margin-top: -60px;
}

.styrk-selector__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.styrk-group {
  border: none;
  border-radius: 18px;
  background: rgba(10, 18, 32, 0.65);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(111, 186, 255, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Subtle glassmorphism for nested groups */
.styrk-group--level1,
.styrk-group--level2,
.styrk-group--level3 {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.styrk-group[open] {
  overflow: visible;
}

.styrk-group[open] > .styrk-group__list {
  overflow: visible !important;
}

.styrk-group--level1 {
  background: linear-gradient(135deg, rgba(16, 41, 76, 0.95), rgba(9, 28, 55, 0.88));
}

.styrk-group--level1[open] {
  padding-bottom: 1rem;
}

.styrk-group--level2 {
  background: linear-gradient(135deg, rgba(18, 82, 96, 0.95), rgba(14, 58, 78, 0.87));
  border-left: 3px solid rgba(111, 186, 255, 0.3);
  margin-left: 0.5rem;
}

.styrk-group--level2[open] {
  padding-bottom: 1rem;
}

.styrk-group--level3 {
  background: linear-gradient(135deg, rgba(16, 74, 68, 0.94), rgba(12, 58, 54, 0.86));
  border-left: 3px solid rgba(105, 224, 206, 0.35);
  margin-left: 0.75rem;
}

.styrk-group__summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  color: var(--admin-primary);
  border-radius: 18px;
}

.styrk-group__summary::-webkit-details-marker {
  display: none;
}

.styrk-group__summary:hover,
.styrk-group__summary:focus-visible {
  background: rgba(12, 30, 56, 0.65);
}

.styrk-group[open] .styrk-group__summary {
  background: rgba(8, 21, 42, 0.65);
  box-shadow: inset 0 0 0 1px rgba(111, 186, 255, 0.16);
  border-radius: 18px 18px 0 0;
}

.styrk-group__toggle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  border: 1px solid rgba(173, 210, 255, 0.55);
  background: rgba(11, 24, 42, 0.6);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 600;
  color: rgba(173, 210, 255, 0.9);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.styrk-group__summary:hover .styrk-group__toggle,
.styrk-group__summary:focus-visible .styrk-group__toggle {
  background: rgba(18, 44, 78, 0.55);
  border-color: rgba(173, 210, 255, 0.75);
}

.styrk-group__toggle::before {
  content: '+';
  line-height: 1;
}

.styrk-group[open] .styrk-group__toggle {
  background: rgba(18, 44, 78, 0.7);
  border-color: rgba(173, 210, 255, 0.75);
}

.styrk-group[open] > .styrk-group__summary .styrk-group__toggle::before {
  content: '−';
}

.styrk-group__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.styrk-group__title {
  font-weight: 600;
  color: rgba(231, 243, 255, 0.95);
}

.styrk-group__subtitle {
  font-size: 0.85rem;
  color: rgba(196, 220, 255, 0.88);
}

.styrk-group__list {
  list-style: none;
  margin: 0;
  padding: 0.6rem 1.25rem 1rem 1.8rem;
  display: grid;
  gap: 0.5rem;
  will-change: max-height;
  overflow: hidden;
  transform-origin: top center;
}

/* Keep branch content rendered even when <details> is closed so JS height animations can run. */
.styrk-group:not([open]) > .styrk-group__list {
  display: grid;
  max-height: 0;
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
}

.styrk-group[open] > .styrk-group__list {
  display: grid;
  pointer-events: auto;
}

.styrk-group__list--level2 {
  padding-left: 2.1rem;
}

.styrk-group__list--level3 {
  padding-left: 2.5rem;
}

.styrk-group__list--level4 {
  padding-left: 2.6rem;
}

.styrk-group--level3[open] {
  padding-bottom: 1rem;
}

.styrk-option {
  display: block;
}

.styrk-option[hidden] {
  display: none !important;
}

.styrk-option__label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, rgba(20, 87, 70, 0.95), rgba(17, 71, 57, 0.85));
  color: #effcf6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 22px rgba(8, 24, 19, 0.35);
}

.styrk-option__label:hover,
.styrk-option__label:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(8, 24, 19, 0.4);
}

/* Enhanced hover state for occupation items */
.styrk-option__label:hover {
  background: linear-gradient(135deg, rgba(25, 102, 82, 0.98), rgba(22, 86, 70, 0.88));
  box-shadow: 0 12px 28px rgba(8, 24, 19, 0.4), 0 0 0 2px rgba(144, 255, 210, 0.25);
}

.styrk-option__label:focus-within {
  outline: 2px solid rgba(105, 224, 206, 0.85);
  outline-offset: 3px;
}

.styrk-option__checkbox,
.styrk-result__checkbox {
  appearance: none;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 12px;
  border: 2px solid rgba(221, 255, 241, 0.65);
  background: rgba(10, 28, 24, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.styrk-option__checkbox:disabled,
.styrk-result__checkbox:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.styrk-option__checkbox::after,
.styrk-result__checkbox::after {
  content: '';
  width: 0.65rem;
  height: 1.05rem;
  border-right: 3.5px solid #0b241f;
  border-bottom: 3.5px solid #0b241f;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.styrk-option__checkbox:checked,
.styrk-result__checkbox:checked {
  border-color: rgba(221, 255, 241, 0.95);
  background: linear-gradient(135deg, rgba(144, 255, 210, 0.95), rgba(72, 198, 150, 0.85));
  box-shadow: 0 0 0 5px rgba(84, 214, 170, 0.45), 0 4px 12px rgba(72, 198, 150, 0.4);
}

.styrk-option__checkbox:checked::after,
.styrk-result__checkbox:checked::after {
  opacity: 1;
}

.styrk-option__checkbox:focus-visible,
.styrk-result__checkbox:focus-visible {
  outline: 2px solid rgba(105, 224, 206, 0.85);
  outline-offset: 2px;
}

.styrk-result__label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, rgba(20, 87, 70, 0.92), rgba(16, 70, 55, 0.82));
  color: #effcf6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(8, 24, 19, 0.32);
}

.styrk-result__label:hover,
.styrk-result__label:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(8, 24, 19, 0.38);
}

.styrk-result__body {
  display: grid;
  gap: 0.1rem;
}

.styrk-result__name {
  font-weight: 600;
  color: rgba(239, 252, 246, 0.95);
}

.styrk-result__meta {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(236, 255, 248, 0.6);
}

.styrk-option__name {
  font-weight: 600;
  color: rgba(239, 252, 246, 0.95);
}

.styrk-option__meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(236, 255, 248, 0.82);
}

.styrk-selector__footer {
  display: flex;
  justify-content: flex-end;
  padding: 1.5rem 0 1.2rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 1rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.94), rgba(8, 16, 28, 0.86) 40%, rgba(8, 16, 28, 0.92));
}

.styrk-selector__done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  border-radius: 14px;
  border: 1px solid rgba(105, 224, 206, 0.6);
  background: linear-gradient(135deg, rgba(105, 224, 206, 0.82), rgba(88, 174, 255, 0.78));
  color: #041018;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.styrk-selector__done:hover,
.styrk-selector__done:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(105, 224, 206, 0.35);
}

.profile-field input[type="text"],
.profile-field input[type="number"],
.profile-field input[type="url"],
.profile-field input[type="search"],
.profile-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--profile-field-surface);
  color: var(--admin-primary);
  font: inherit;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-field textarea {
  min-height: 150px;
}

.profile-field--tall textarea {
  min-height: 160px;
}

@media (min-width: 768px) {
  .profile-field--tall textarea {
    min-height: 208px;
  }
}

.profile-field input[type="text"]:focus,
.profile-field input[type="number"]:focus,
.profile-field input[type="url"]:focus,
.profile-field input[type="search"]:focus,
.profile-field textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(98, 214, 160, 0.25);
  outline: none;
  background: linear-gradient(135deg, rgba(16, 24, 40, 0.9), rgba(28, 38, 62, 0.78));
}


.profile-avatar {
  position: relative;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr);
  padding: 1.1rem 1.25rem 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--profile-field-surface);
  align-items: start;
  justify-items: center;
}

.profile-avatar__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  text-align: center;
  padding-inline: 1.5rem;
}

.profile-avatar__preview {
  width: 128px;
  height: 128px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
}

.profile-avatar__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar__title {
  margin: 0;
}

.profile-avatar__editor {
  display: none;
  gap: 0.65rem;
  justify-items: center;
  width: 100%;
}

.profile-avatar__editor[hidden] {
  display: none !important;
}

.profile-avatar.is-editing .profile-avatar__editor {
  display: grid;
  margin-top: 0.6rem;
}

.profile-avatar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.profile-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--profile-button-surface);
  color: #0a0e17;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.profile-upload-button:hover,
.profile-upload-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(102, 168, 214, 0.25);
}

.profile-upload-button:disabled,
.profile-upload-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.profile-upload-button--secondary {
  background: transparent;
  color: var(--admin-primary);
  border-color: rgba(255, 255, 255, 0.32);
}

.profile-avatar__status {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  min-height: 1.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-avatar[data-status-visible="true"] .profile-avatar__status {
  opacity: 1;
}

.profile-avatar__edit {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(6, 10, 18, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.25s ease;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.profile-avatar:hover .profile-avatar__edit,
.profile-avatar:focus-within .profile-avatar__edit,
.profile-avatar.is-editing .profile-avatar__edit,
.profile-avatar__edit:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-1px) scale(1.08);
  border-color: rgba(146, 218, 255, 0.75);
  background: linear-gradient(140deg, rgba(36, 60, 102, 0.95), rgba(18, 32, 60, 0.92));
  box-shadow: 0 0 0 3px rgba(118, 183, 221, 0.35), 0 18px 36px rgba(6, 12, 24, 0.55);
}

@media (hover: none) {
  .profile-avatar__edit {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
}

.profile-avatar__edit:focus-visible {
  outline: none;
}

.profile-avatar__edit:hover,
.profile-avatar__edit:focus-visible {
  transform: translateY(-2px) scale(1.16);
  border-color: rgba(172, 234, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(146, 218, 255, 0.45), 0 26px 44px rgba(6, 12, 24, 0.65);
}

.profile-avatar__edit-icon {
  width: 1.05rem;
  height: 1.05rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23f6f9ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 13.5 13.5 4a1.414 1.414 0 0 1 2 2L6 15.5 3 16.5z'/%3E%3C/svg%3E")
    no-repeat center/100% 100%;
}

.profile-avatar[data-status-type="error"] .profile-avatar__status {
  color: #ffb3c0;
}

.profile-avatar[data-status-type="success"] .profile-avatar__status {
  color: #7cf3c2;
}

@media (min-width: 640px) {
  .profile-avatar {
    justify-items: center;
    padding: 1.35rem 1.6rem 1.45rem;
  }

  .profile-avatar__preview {
    margin: 0;
  }

  .profile-avatar__editor {
    justify-items: center;
  }

  .profile-avatar__actions {
    justify-content: center;
  }
}

.profile-document {
  display: grid;
  gap: 0.9rem;
  padding: 1.4rem 1.6rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--profile-field-surface);
}

.profile-document__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.profile-document__titles {
  display: grid;
  gap: 0.4rem;
}

.profile-document__title {
  margin: 0;
}

.profile-document__hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(224, 232, 246, 0.72);
}

.profile-document__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-document__status {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  min-height: 1.1em;
}

.profile-document__status[data-status-type="error"] {
  color: #ffb3c0;
}

.profile-document__status[data-status-type="success"] {
  color: #7cf3c2;
}

.profile-document__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.profile-document__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 16, 26, 0.78);
}

.profile-document__preview {
  flex: 0 0 auto;
  width: 96px;
  height: 128px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-document__preview-link {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-document__preview-link:focus-visible {
  outline: 2px solid var(--admin-primary, #9fd4ff);
  outline-offset: 2px;
}

.profile-document__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.profile-document__info {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.profile-document__name {
  color: var(--admin-primary);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.profile-document__name:hover,
.profile-document__name:focus {
  text-decoration: underline;
}

.profile-document__meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.profile-document__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.profile-document__empty {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.profile-document--empty .profile-document__list {
  gap: 0;
}

.profile-document--empty .profile-document__list::before {
  content: attr(data-empty-message);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.profile-field input::placeholder,
.profile-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.profile-field input:focus,
.profile-field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(96, 220, 168, 0.22);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.profile-status {
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.profile-status[data-status-type="error"] {
  color: #ffb4b4;
}

.profile-status[data-status-type="success"] {
  color: var(--profile-success);
}

@media (min-width: 1024px) {
  .admin-section-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-section-card__actions--single {
    grid-template-columns: 1fr;
  }

  .admin-tile {
    min-height: calc(var(--admin-tile-base-height, 220px) * 1.35);
  }
}

@media (max-width: 980px) {
  body.admin-body {
    background-position: center 22%;
    background-attachment: scroll;
  }

  body.admin-body::after {
    /* screen + sterke radial-gradienter vasket ut bildet — tilbake til multiply */
    background: linear-gradient(165deg, rgba(9, 12, 20, 0.72) 0%, rgba(9, 12, 20, 0.28) 65%, transparent 100%);
    mix-blend-mode: multiply;
  }

  .admin-wrapper {
    padding: 2.5rem 1.5rem;
  }

  .admin-card {
    padding: 2.75rem 2.25rem;
    border-radius: 28px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-logo {
    align-self: flex-end;
  }
}

@media (max-width: 640px) {
  body.admin-body {
    background: linear-gradient(200deg, rgba(8, 12, 22, 0.92), rgba(8, 12, 22, 0.35) 68%, transparent),
                url('/static/images/Nordlys.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 32%;
    background-attachment: scroll;
  }

  body.admin-body::before {
    background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.22), transparent 65%),
                linear-gradient(195deg, rgba(14, 21, 44, 0.95), rgba(14, 21, 44, 0.4));
  }

  body.admin-body::after {
    background: radial-gradient(circle at 85% 20%, rgba(255, 153, 94, 0.75), transparent 45%),
                radial-gradient(circle at 20% 85%, rgba(120, 182, 255, 0.6), transparent 55%),
                linear-gradient(180deg, rgba(6, 9, 16, 0.9) 0%, rgba(6, 9, 16, 0.2) 70%, transparent 100%);
  }

  /* --- User controls: keep icon integrated in top-right on fullscreen pages --- */
  .portal-user-controls {
    position: relative;
    top: auto;
    right: auto;
    z-index: 10;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
  }

  .portal-user-controls--fullscreen {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0;
    margin: 0;
  }

  .portal-user-trigger {
    width: 2.45rem;
    height: 2.45rem;
  }

  /* --- Flatten the box nesting: remove wrapper + card chrome --- */
  .admin-wrapper {
    padding: 0;
    align-items: stretch;
  }

  .admin-card {
    padding: 0 1rem 2rem;
    gap: 1.25rem;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
  }

  /* --- Header: logo centered, compact --- */
  .admin-header {
    position: relative;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    padding-right: 4rem;
  }

  body.admin-body:not(.admin-body--full) .portal-user-controls {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
  }

  .admin-logo {
    width: 100px;
    align-self: center;
    order: -1;
  }

  .admin-title h1 {
    font-size: 1.75rem;
  }

  .admin-title p {
    font-size: 0.95rem;
  }

  .admin-meta {
    font-size: 0.75rem;
    letter-spacing: 0.3rem;
  }

  /* --- Section cards: remove the extra box, just show content --- */
  .admin-sections-grid {
    gap: 1.5rem;
  }

  .admin-section-card {
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    box-shadow: none;
    gap: 0.75rem;
  }

  .admin-section-card__header {
    padding: 0 0.25rem;
  }

  .admin-section__title {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
  }

  .admin-section__subtitle {
    display: none;
  }

  .admin-section-card__actions {
    gap: 0.75rem;
  }

  /* --- Tiles: compact, the ONLY visible box level --- */
  .admin-tile {
    min-height: auto;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    gap: 0.5rem;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .admin-tile__header {
    flex: 1;
    min-width: 0;
    gap: 0.75rem;
    align-items: center;
  }

  .admin-tile__icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
    border-radius: 0.75rem;
  }

  .admin-tile__title {
    font-size: 1.05rem;
  }

  /* Hide description and CTA on mobile - tile becomes a compact row */
  .admin-tile__description {
    display: none;
  }

  .admin-tile__cta {
    display: none;
  }

  /* Full-width support tile */
  .admin-tile--full {
    flex-direction: row;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .admin-button {
    width: 100%;
  }

}

.user-picker[hidden] {
  display: none !important;
}

.user-picker {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, margin 0.25s ease;
}

.user-picker.is-open {
  pointer-events: auto;
  opacity: 1;
}

.user-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 20, 0.65);
  backdrop-filter: blur(6px);
}

.user-picker__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  background: rgba(11, 16, 30, 0.92);
  border-radius: 24px;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 1.5rem;
  max-height: min(80vh, 720px);
  overflow: hidden;
}

.user-picker__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.user-picker__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.6);
}

.user-picker__title {
  margin: 0.25rem 0 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.6rem, 2.6vw, 1.95rem);
}

.user-picker__subtitle {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.user-picker__close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--admin-primary);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.user-picker__close:hover,
.user-picker__close:focus {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.user-picker__body {
  display: grid;
  gap: 1.25rem;
  overflow: hidden;
}

.user-picker__label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.user-picker__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.user-picker__input {
  flex: 1;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(7, 11, 20, 0.7);
  color: var(--admin-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.user-picker__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(7, 11, 20, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.user-picker__spinner {
  position: absolute;
  right: 1rem;
  width: 20px;
  height: 20px;
}

.user-picker__spinner::after {
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.85);
  animation: user-picker-spin 0.8s linear infinite;
  display: block;
}

.user-picker__spinner[hidden] {
  display: none;
}

.user-picker__hint,
.user-picker__feedback {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.user-picker__feedback {
  min-height: 1.4em;
}

.user-picker__feedback[data-tone='muted'] {
  color: rgba(255, 255, 255, 0.55);
}

.user-picker__feedback[data-tone='warning'] {
  color: #ffd8a8;
}

.user-picker__feedback[data-tone='error'] {
  color: #ffb3b3;
}

.user-picker__feedback[data-tone='success'] {
  color: #b8f5d1;
}

.user-picker__results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-height: 320px;
  overflow-y: auto;
  padding-bottom: 0.5rem;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.user-picker__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(16, 22, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
}

.user-picker__user {
  display: grid;
  gap: 0.35rem;
}

.user-picker__name {
  margin: 0;
  font-weight: 600;
  color: var(--admin-primary);
  font-size: 1.05rem;
}

.user-picker__meta {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.user-picker__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.user-picker__role {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.user-picker__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff9b4a, #ff5d7d);
  color: #0a0e17;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  box-shadow: 0 16px 35px rgba(255, 123, 89, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-picker__action:hover,
.user-picker__action:focus {
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(255, 123, 89, 0.45);
}

.user-picker__action[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.6;
  box-shadow: none;
}

.user-picker__results::-webkit-scrollbar {
  width: 6px;
}

.user-picker__results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

@keyframes user-picker-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .user-picker__dialog {
    padding: 1.25rem;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    margin-top: auto;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .user-picker__input {
    min-height: 44px;
    font-size: 16px;
  }

  .user-picker__results {
    max-height: 300px;
  }

  .user-picker__row {
    flex-direction: column;
    align-items: stretch;
  }

  .user-picker__action {
    justify-content: center;
    min-height: 44px;
  }
}

.profile-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.profile-menu.profile-menu--modal-open {
  pointer-events: none;
  opacity: 0.4;
  filter: blur(1px);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.profile-menu__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.4rem 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--profile-menu-card-background);
  color: var(--admin-primary);
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(13, 18, 34, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-menu__card:hover,
.profile-menu__card:focus {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 24px 48px rgba(20, 28, 60, 0.45);
}

.profile-menu__icon {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, var(--profile-warm-accent-start), var(--profile-warm-accent-end));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 22px var(--profile-warm-shadow);
  position: relative;
}

.profile-menu__icon::after {
  content: '\270F';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: rgba(0, 0, 0, 0.92);
}

.profile-menu__icon--preferences::after {
  content: '\1F4CD';
  font-size: 1.15rem;
}

.profile-menu__icon--partner::after {
  content: '\1F464';
  font-size: 1.15rem;
}

.profile-menu__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.profile-menu__title {
  font-family: var(--admin-font-display);
  font-weight: 650;
  font-size: 1.2rem;
}

.profile-menu__description {
  font-size: 0.95rem;
  color: rgba(216, 224, 245, 0.78);
  line-height: 1.55;
}

.profile-menu__chevron {
  margin-left: auto;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23f6f9ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M7 4l6 6-6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-menu__card:hover .profile-menu__chevron,
.profile-menu__card:focus .profile-menu__chevron {
  opacity: 0.95;
  transform: translateX(4px);
}

.profile-editor {
  display: grid;
  gap: var(--profile-section-spacing, clamp(1.7rem, 2.8vw, 2.6rem));
  position: relative;
}

.profile-editor[hidden] {
  display: none !important;
}

.profile-editor__header {
  display: grid;
  grid-template-columns: minmax(0, 240px) 1fr auto;
  align-items: center;
  gap: 1.35rem;
  padding: 1.2rem 1.75rem 1.35rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--profile-menu-card-background);
  box-shadow: 0 36px 82px rgba(12, 16, 28, 0.6), 0 0 46px rgba(21, 29, 56, 0.4);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 5;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-editor--overlay-open .profile-editor__header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.profile-editor--overlay-open .profile-dialog__scroll {
  overflow: hidden;
}

body.occupation-overlay-open .styrk-selector-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2500;
  display: flex;
  pointer-events: auto !important;
}

body.occupation-overlay-open .styrk-selector-overlay * {
  pointer-events: auto !important;
}

.profile-editor__save-group {
  display: grid;
  grid-auto-rows: max-content;
  row-gap: 0;
  align-items: start;
  width: 100%;
}

.profile-save-status {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.25s ease;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
}

.profile-save-status.is-visible {
  opacity: 1;
  margin-top: 0.4rem;
  max-height: 3rem;
}

.profile-save-status[data-status-type="success"] {
  color: var(--profile-success);
}

.profile-save-status[data-status-type="error"] {
  color: #ffb4b4;
}

@media (max-width: 700px) {
  .profile-editor__header {
    grid-template-columns: 1fr;
  }

  .profile-editor__nav {
    width: 100%;
  }

  .profile-editor__nav .profile-editor__back,
  .profile-editor__nav .profile-editor__save {
    width: 100%;
  }

  .profile-dialog__close {
    justify-self: end;
  }
}

.profile-editor__headline h3 {
  margin: 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  color: #f1fff9;
}

.profile-editor__headline p {
  margin: 0.4rem 0 0;
  color: rgba(230, 248, 238, 0.82);
  max-width: 52ch;
  line-height: 1.6;
}

.profile-dialog__close {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--profile-button-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 26px rgba(8, 12, 22, 0.48);
}

.profile-dialog__close::before {
  content: '';
  width: 1.1rem;
  height: 1.1rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.82));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 4l10 10M14 4 4 14' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 4l10 10M14 4 4 14' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.profile-dialog__close:hover,
.profile-dialog__close:focus {
  border-color: rgba(0, 0, 0, 0.55);
  background: var(--profile-warm-gradient);
  box-shadow: 0 20px 36px var(--profile-warm-shadow);
  transform: translateY(-1px);
}

.profile-info-dialog {
  border: none;
  padding: 0;
  margin: 0;
  width: min(520px, calc(100vw - 3rem));
  max-width: 520px;
  background: transparent;
  color: inherit;
  border-radius: 28px;
  overflow: visible;
  z-index: 45;
}

.profile-info-dialog[aria-hidden='true'] {
  display: none;
}

.profile-info-dialog[open] {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-info-dialog::backdrop {
  background: rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(16px);
}

.profile-info-dialog.is-open {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(16px);
  z-index: 45;
}

.profile-info-dialog__surface {
  position: relative;
  display: grid;
  gap: 1.8rem;
  padding: clamp(2rem, 3vw, 2.6rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(102, 192, 150, 0.4), rgba(0, 0, 0, 0) 48%),
    linear-gradient(165deg, rgba(16, 24, 42, 0.94), rgba(8, 12, 24, 0.92));
  border: 1px solid rgba(168, 238, 204, 0.14);
  box-shadow: 0 38px 88px rgba(8, 12, 20, 0.68), 0 0 48px rgba(66, 156, 126, 0.28);
  width: min(520px, calc(100vw - 3rem));
}

.profile-info-dialog.is-open .profile-info-dialog__surface,
.profile-info-dialog[open] .profile-info-dialog__surface {
  animation: profile-info-dialog-enter 260ms ease-out;
}

@keyframes profile-info-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-info-dialog__close {
  position: absolute;
  top: clamp(1.1rem, 2.4vw, 1.6rem);
  right: clamp(1.1rem, 2.4vw, 1.6rem);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--profile-button-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 32px rgba(6, 10, 18, 0.48);
}

.profile-info-dialog__close::before {
  content: '';
  width: 1rem;
  height: 1rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.82));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 4l10 10M14 4 4 14' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 4l10 10M14 4 4 14' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.profile-info-dialog__close:hover,
.profile-info-dialog__close:focus {
  border-color: rgba(0, 0, 0, 0.55);
  background: var(--profile-warm-gradient);
  box-shadow: 0 22px 38px var(--profile-warm-shadow);
  transform: translateY(-1px);
}

.profile-info-dialog__content {
  display: grid;
  gap: 0.9rem;
  padding-top: 0.6rem;
}

.profile-info-dialog__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: rgba(228, 248, 236, 0.7);
}

.profile-info-dialog__title {
  margin: 0;
  font-family: var(--admin-font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: #f2fff8;
}

.profile-info-dialog__description {
  margin: 0;
  line-height: 1.65;
  color: rgba(233, 250, 242, 0.86);
}

.profile-info-dialog__link {
  color: #aaf4d2;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.profile-info-dialog__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2em;
  height: 2px;
  background: linear-gradient(90deg, rgba(170, 244, 210, 0.1), rgba(170, 244, 210, 0.85), rgba(170, 244, 210, 0.1));
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform: scaleX(0.6);
  opacity: 0.7;
  transform-origin: center;
}

.profile-info-dialog__link:hover::after,
.profile-info-dialog__link:focus::after {
  transform: scaleX(1);
  opacity: 1;
}

.profile-info-dialog__action {
  justify-self: start;
  padding: 0.7rem 1.6rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  background: var(--profile-button-surface);
  color: rgba(8, 12, 18, 0.92);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 18px 34px rgba(6, 10, 18, 0.42);
}

.profile-info-dialog__action:hover,
.profile-info-dialog__action:focus {
  border-color: rgba(0, 0, 0, 0.55);
  background: var(--profile-warm-gradient);
  color: rgba(0, 0, 0, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 24px 40px var(--profile-warm-shadow);
}

.profile-editor__nav {
  display: grid;
  grid-auto-rows: max-content;
  row-gap: 0.5rem;
  align-content: center;
  align-items: center;
  justify-items: start;
  height: 100%;
}

.profile-editor__back,
.profile-editor__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: var(--profile-button-surface);
  color: rgba(0, 0, 0, 0.9);
  font-weight: 600;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 14px 26px rgba(6, 10, 18, 0.48);
}

.profile-editor__back:hover,
.profile-editor__back:focus,
.profile-editor__save:hover,
.profile-editor__save:focus {
  border-color: rgba(0, 0, 0, 0.55);
  background: var(--profile-warm-gradient);
  color: #000;
  box-shadow: 0 18px 36px var(--profile-warm-shadow);
  transform: translateY(-2px);
}

.profile-editor__back:hover .profile-editor__back-icon,
.profile-editor__back:focus .profile-editor__back-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 4l-6 6 6 6'/%3E%3C/svg%3E");
}

.profile-editor__save {
  font-size: 0.9rem;
}

.profile-editor__back {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
}

.profile-editor__nav .profile-editor__back,
.profile-editor__nav .profile-editor__save {
  width: clamp(8.5rem, 18vw, 10.5rem);
}

.profile-editor__back-icon {
  width: 1.1rem;
  height: 1.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 4l-6 6 6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

.profile-editor__back--inline {
  width: auto;
  padding: 0.9rem 1.5rem;
}


.profile-field--select {
  position: relative;
}

.profile-field--select.profile-field--select-open {
  z-index: 45;
}

.profile-select {
  position: relative;
  width: 100%;
  z-index: 1;
}

.profile-select.is-open {
  z-index: 40;
  margin-bottom: var(--profile-select-open-space, 0px);
}

.profile-select__button {
  width: 100%;
  padding: 0.85rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--profile-field-surface);
  color: var(--admin-primary);
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-select__button:hover,
.profile-select__button:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(96, 220, 168, 0.22);
  background: linear-gradient(135deg, rgba(16, 24, 40, 0.9), rgba(28, 38, 62, 0.78));
}

.profile-select.is-open .profile-select__button {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(100, 125, 255, 0.25);
}

.profile-select__value {
  flex: 1;
  color: var(--admin-primary);
}

.profile-select__chevron {
  width: 0.9rem;
  height: 0.9rem;
  flex: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath fill='none' stroke='%23f6f9ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m4 4 6 4 6-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}

.profile-select.is-open .profile-select__chevron {
  transform: rotate(180deg);
}

.profile-select__list {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  padding: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(16, 22, 40, 0.95), rgba(14, 19, 35, 0.92));
  box-shadow: 0 24px 48px rgba(10, 12, 26, 0.5);
  max-height: 16.5rem;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}

.profile-select__option {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--admin-primary);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.profile-select__option:hover,
.profile-select__option:focus {
  background: rgba(255, 255, 255, 0.08);
}

.profile-select__option.is-selected {
  background: rgba(104, 126, 255, 0.18);
  color: #f7f9ff;
}

.profile-select__option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.profile-status + .profile-actions__buttons {
  margin-top: 0.5rem;
}

.profile-languages {
  display: grid;
  gap: 1.2rem;
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(20, 28, 52, 0.82), rgba(14, 20, 38, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.profile-languages__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.profile-languages__titles {
  display: grid;
  gap: 0.35rem;
}

.profile-languages__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--admin-primary);
}

.profile-languages__description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  flex: 1 1 240px;
}

.profile-languages__add {
  align-self: center;
  white-space: nowrap;
}

.profile-languages__add-icon {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-languages__add-icon::before,
.profile-languages__add-icon::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
}

.profile-languages__add-icon::before {
  width: 60%;
  height: 2px;
}

.profile-languages__add-icon::after {
  width: 2px;
  height: 60%;
}

.profile-languages__empty {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.profile-languages__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.profile-languages__item {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
}

.profile-languages__item.profile-languages__item--select-open {
  z-index: 45;
}

.profile-languages__item.is-editing {
  background: linear-gradient(135deg, rgba(118, 183, 221, 0.24), rgba(86, 153, 204, 0.28));
  border-color: rgba(118, 183, 221, 0.55);
}

.profile-languages__summary {
  display: grid;
  gap: 0.85rem;
  padding-right: 2.75rem;
}

.profile-languages__summary-fields {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .profile-languages__summary-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-action.profile-languages__action {
  padding: 0.6rem 1.3rem;
  font-size: 0.9rem;
}

.profile-action.profile-languages__action--remove {
  background: linear-gradient(135deg, rgba(255, 114, 114, 0.78), rgba(255, 81, 81, 0.78));
  color: rgba(0, 0, 0, 0.86);
}

.profile-action.profile-languages__action--remove:hover,
.profile-action.profile-languages__action--remove:focus {
  background: linear-gradient(135deg, rgba(255, 145, 145, 0.92), rgba(255, 110, 110, 0.92));
}

.profile-action.profile-languages__action--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.85);
}

.profile-action.profile-languages__action--ghost:hover,
.profile-action.profile-languages__action--ghost:focus {
  background: rgba(255, 255, 255, 0.18);
  color: #000;
}

.profile-languages__editor {
  display: grid;
  gap: 0.85rem;
}

.profile-languages__editor-controls {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .profile-languages__editor-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-languages__editor-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.profile-languages__editor-actions [data-language-remove] {
  margin-right: auto;
}

.profile-languages__editor-buttons {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-languages__error {
  margin: 0;
  font-size: 0.9rem;
  color: #ffd4d4;
}

.profile-languages__edit {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(6, 10, 18, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.25s ease;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.profile-languages__item:hover .profile-languages__edit,
.profile-languages__item:focus-within .profile-languages__edit,
.profile-languages__edit:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-1px) scale(1.08);
  border-color: rgba(146, 218, 255, 0.75);
  background: linear-gradient(140deg, rgba(36, 60, 102, 0.95), rgba(18, 32, 60, 0.92));
  box-shadow: 0 0 0 3px rgba(118, 183, 221, 0.35), 0 18px 36px rgba(6, 12, 24, 0.55);
}

.profile-languages__edit:focus-visible {
  outline: none;
}

.profile-languages__edit:hover,
.profile-languages__edit:focus-visible {
  transform: translateY(-2px) scale(1.16);
  border-color: rgba(172, 234, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(146, 218, 255, 0.45), 0 26px 44px rgba(6, 12, 24, 0.65);
}

.profile-languages__edit-icon {
  width: 1.05rem;
  height: 1.05rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23f6f9ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 13.5 13.5 4a1.414 1.414 0 0 1 2 2L6 15.5 3 16.5z'/%3E%3C/svg%3E")
    no-repeat center/100% 100%;
}

.household {
  display: grid;
  gap: 2.4rem;
}

.household__toggle {
  padding: 1.6rem 1.6rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(12, 24, 20, 0.7), rgba(8, 16, 14, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.household__toggle-label {
  margin: 0 0 0.8rem;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.household-toggle__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.household-toggle__button {
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 14, 18, 0.7);
  color: rgba(239, 252, 246, 0.9);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}

.household-toggle__button:hover,
.household-toggle__button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(146, 218, 255, 0.65);
  box-shadow: 0 10px 26px rgba(10, 18, 26, 0.55);
}

.household-toggle__button--active {
  background: var(--profile-button-surface);
  color: #0a0e17;
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 26px rgba(102, 168, 214, 0.35);
}

.household__expanded {
  display: grid;
  gap: 2rem;
}

.household__block {
  padding: 1.9rem 1.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(9, 17, 28, 0.8), rgba(6, 12, 22, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 1.4rem;
}

.household__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
  font-size: 0.95rem;
}

.household__info {
  margin-top: 0;
  padding: 1.3rem 1.4rem;
  border-radius: 12px;
  border: 1px solid rgba(113, 183, 255, 0.32);
  background: linear-gradient(135deg, rgba(113, 183, 255, 0.14), rgba(90, 144, 214, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.9rem;
}

.household__info-text {
  margin: 0;
  color: rgba(242, 248, 255, 0.92);
  line-height: 1.5;
}

.household__info-action {
  align-self: flex-start;
}

.household-children {
  display: grid;
  gap: 1.3rem;
  margin-top: 0;
}

.household-children__list {
  display: grid;
  gap: 0.75rem;
}

.household-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.household-child__field {
  flex: 1 1 160px;
}

.household-child__field input {
  width: 100%;
}

.household-child__remove {
  margin-top: 1.6rem;
}

.household-children__add {
  width: fit-content;
}

.household-children__add-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-block;
  position: relative;
}

.household-children__add-icon::before,
.household-children__add-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.household-children__add-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.household-children__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.household-children__error {
  margin: 0;
  color: #ffb4b4;
  font-size: 0.95rem;
}

.profile-select__native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.preferences-view {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 3vw, 2.6rem);
}

.preferences-header .profile-editor__headline p {
  max-width: 560px;
}

.preferences-form {
  display: flex;
  flex-direction: column;
  gap: clamp(1.8rem, 3vw, 2.8rem);
  position: relative;
}

.preferences-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.8rem;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(45, 61, 112, 0.78), rgba(16, 21, 38, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preferences-hero__content {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.preferences-hero__eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(120, 211, 255, 0.9);
  margin: 0;
}

.preferences-hero__content h4 {
  margin: 0;
  font-size: 1.65rem;
}

.preferences-hero__content p {
  margin: 0;
  color: rgba(232, 239, 255, 0.8);
  line-height: 1.5;
}

.preferences-hero__actions {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.preferences-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
}

.preferences-status {
  min-height: 1.4rem;
  font-size: 0.95rem;
  color: rgba(224, 232, 255, 0.92);
}

.preferences-status--inline {
  margin-top: 0.4rem;
}

.preferences-status--footer {
  flex: 1 1 240px;
  margin: 0;
}

.preferences-status[data-status-type='error'] {
  color: #ff8f8f;
}

.preferences-status[data-status-type='success'] {
  color: #6be6c6;
}

.preferences-reset {
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: transparent;
  color: inherit;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.preferences-reset:hover:not(:disabled),
.preferences-reset:focus-visible:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.7);
  color: #96f7ff;
  transform: translateY(-1px);
}

.preferences-reset:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.preferences-info-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.preferences-info-button__icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0a1524;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.preferences-info-button:hover,
.preferences-info-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(12, 18, 32, 0.5);
}

.preferences-info-dialog .profile-info-dialog__body {
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.preferences-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.4rem, 2.4vw, 2.2rem);
}

.preference-panel {
  border-radius: 26px;
  padding: 1.6rem;
  background: radial-gradient(circle at 18% 12%, rgba(88, 167, 255, 0.25), rgba(6, 12, 20, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.preference-panel__header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.preference-panel__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(154, 214, 255, 0.85);
}

.preference-panel__title {
  margin: 0;
  font-size: 1.3rem;
}

.preference-panel__description {
  margin: 0;
  color: rgba(214, 226, 255, 0.78);
  line-height: 1.4;
}

.preference-panel__summary {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
}

.preference-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: hidden;
}

.preference-panel__toggle {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, rgba(132, 242, 189, 0.22), rgba(64, 167, 125, 0.18));
  color: inherit;
  padding: 1rem 1.25rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preference-panel__toggle:hover,
.preference-panel__toggle:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(12, 26, 18, 0.4);
}

.preference-panel__chevron {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6cf0c3, #a0ffd8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 18px rgba(64, 167, 125, 0.35);
}

.preference-panel__chevron::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  border-left: 2px solid rgba(0, 0, 0, 0.85);
  border-bottom: 2px solid rgba(0, 0, 0, 0.85);
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
}

.preference-panel--collapsed .preference-panel__chevron::before {
  transform: rotate(135deg);
}

.preference-panel__body[hidden] {
  display: none !important;
}

.preference-slider-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preference-slider-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.preference-slider-empty {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(196, 215, 245, 0.72);
}

.preference-slider-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(3, 6, 12, 0.62);
  box-shadow: 0 10px 22px rgba(5, 9, 16, 0.45);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.preference-slider-row[data-slider-value='1'],
.preference-slider-row[data-slider-value='2'] {
  background: rgba(19, 36, 62, 0.85);
  border-color: rgba(120, 211, 255, 0.28);
}

.preference-slider-row[data-slider-value='2'] {
  box-shadow: 0 18px 36px rgba(11, 24, 44, 0.65);
}

.preference-slider-row__label {
  font-weight: 600;
  color: rgba(240, 245, 255, 0.94);
}

.preference-slider-row__control {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.preference-slider-markers {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(184, 205, 245, 0.85);
  padding: 0 0.3rem;
  cursor: pointer;
  user-select: none;
}

.preference-slider-markers span {
  flex: none;
  width: 33%;
  text-align: center;
}

.preference-slider-markers span:first-child {
  text-align: left;
}

.preference-slider-markers span:last-child {
  text-align: right;
}

.preference-slider-track {
  position: relative;
  width: 100%;
  height: 58px;
  border-radius: 999px;
  background: rgba(82, 134, 200, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 1.6rem;
}

.preference-slider-range {
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 0;
  height: 100%;
}

.preference-slider-range:focus {
  outline: none;
}

.preference-slider-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(93, 132, 204, 0.35),
    rgba(129, 176, 255, 0.65),
    rgba(255, 196, 122, 0.9)
  );
}

.preference-slider-range::-moz-range-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(93, 132, 204, 0.35),
    rgba(129, 176, 255, 0.65),
    rgba(255, 196, 122, 0.9)
  );
}

.preference-slider-range::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(8, 17, 31, 0.8);
  margin-top: -11px;
  box-shadow: 0 8px 18px rgba(12, 20, 32, 0.4);
}

.preference-slider-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(8, 17, 31, 0.8);
  box-shadow: 0 8px 18px rgba(12, 20, 32, 0.4);
}

.preference-slider-row__value {
  font-size: 0.8rem;
  color: rgba(199, 215, 245, 0.78);
}

.preference-slider-row__value[data-value='2'] {
  color: #ffd894;
}

.preference-slider-row__value[data-value='1'] {
  color: #9be5ff;
}

@media (max-width: 640px) {
  .preference-slider-row {
    grid-template-columns: 1fr;
  }

  .preference-slider-markers span {
    font-size: 0.72rem;
  }
}

.preferences-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

.preferences-status--footer {
  order: -1;
}

.preferences-actions .profile-editor__back--inline {
  margin-right: auto;
}

.preferences-loader {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: rgba(3, 6, 12, 0.8);
  backdrop-filter: blur(9px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  font-weight: 500;
  z-index: 1;
}

.preferences-loader[hidden] {
  display: none !important;
}

.preferences-loader__spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.9);
  animation: preferences-spin 0.8s linear infinite;
}

@keyframes preferences-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .preferences-hero {
    flex-direction: column;
  }

  .preferences-hero__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .preferences-info-button {
    width: 100%;
    justify-content: center;
  }

  .preferences-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .preferences-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .preferences-actions .profile-editor__back--inline {
    margin-right: 0;
    width: 100%;
    justify-content: center;
  }

  .preferences-actions .profile-editor__save--footer {
    width: 100%;
  }
}
.preferences-unsaved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
}

/* ==========================================================================
   GLOBAL MOBILE ENHANCEMENTS (all admin pages)
   ========================================================================== */

/* Prevent iOS zoom on input focus - must be >= 16px */
@media (max-width: 768px) {
  body.admin-body input,
  body.admin-body select,
  body.admin-body textarea {
    font-size: 16px;
  }
}

/* Touch-friendly tap highlight */
@media (hover: none) {
  body.admin-body {
    -webkit-tap-highlight-color: rgba(52, 211, 153, 0.15);
  }

  /* Disable hover transforms on touch devices to prevent sticky hover */
  .admin-tile--link:hover,
  .admin-tile--action:hover {
    transform: none;
  }

  .admin-tile--link:active,
  .admin-tile--action:active {
    transform: scale(0.98);
    transition-duration: 80ms;
  }
}

/* Safe area for iPhones with notch/home indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    body.admin-body {
      padding-bottom: env(safe-area-inset-bottom);
    }
  }
}

/* Prevent horizontal overflow globally on mobile */
@media (max-width: 768px) {
  body.admin-body {
    overflow-x: hidden;
  }

  /* Allow horizontal scroll for data-heavy elements */
  body.admin-body pre,
  body.admin-body code,
  body.admin-body table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Entrance keyframes for mobile intro splash */
@keyframes mobileIntroLogoReveal {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes mobileIntroFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes mobileIntroAurora1 {
  0%, 100% { transform: translate(0%, 0%); }
  32%      { transform: translate(9%, -8%); }
  66%      { transform: translate(-6%, 10%); }
}

@keyframes mobileIntroAurora2 {
  0%, 100% { transform: translate(0%, 0%); }
  42%      { transform: translate(-9%, 7%); }
  74%      { transform: translate(7%, -5%); }
}

@keyframes mobileIntroBreathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.4); }
}

@keyframes mobileLogoPulse {
  0%   { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  40%  { transform: scale(1.35); filter: drop-shadow(0 0 12px rgba(80, 216, 180, 0.5)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
}

@keyframes mobileContentReveal {
  from { opacity: 0; transform: translateY(36px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mobileHeaderBorderDraw {
  0%   { transform: scaleX(0); background: rgba(80, 216, 180, 0.8); }
  60%  { transform: scaleX(1); background: rgba(80, 216, 180, 0.6); }
  100% { transform: scaleX(1); background: rgba(255, 255, 255, 0.1); }
}

/* ==========================================================================
   MOBILE SHELL INTRO + HEADER (fullscreen pages)
   ==========================================================================
   Base styling for mobile header, hamburger, and slide-menu lives outside
   mediaqueries so pages can opt in at different breakpoints (e.g. tablet).
   Only display/visibility toggles are scoped to mediaqueries.
   ========================================================================== */

.mobile-brand-intro,
.mobile-top-header {
  display: none;
}

/* --- Mobile top header — base visual styling (hidden by display:none above) --- */
body.admin-body.admin-body--full .mobile-top-header {
  position: absolute;
  top: clamp(1.35rem, 2vw, 2.4rem);
  right: clamp(1.35rem, 2vw, 2.4rem);
  left: auto;
  z-index: 90;
  display: flex;
  height: auto;
  padding: 0;
  align-items: center;
  justify-content: flex-end;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: auto;
}

body.admin-body.admin-body--full .mobile-top-header::after {
  content: none;
}

body.admin-body.admin-body--full .mobile-top-header__brand {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.admin-body.admin-body--full .mobile-top-header__logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

body.admin-body.admin-body--full .mobile-top-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

body.admin-body.admin-body--full .mobile-top-header__context {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

body.admin-body.admin-body--full .mobile-top-header__context[hidden] {
  display: none !important;
}

.mobile-back-trigger,
.mobile-menu-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-back-trigger {
  width: clamp(3rem, 2.35rem + 1.3vw, 4.25rem);
  height: clamp(3rem, 2.35rem + 1.3vw, 4.25rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12, 19, 34, 0.9), rgba(10, 16, 30, 0.82));
  color: rgba(104, 224, 184, 0.96);
  box-shadow: 0 12px 28px rgba(2, 8, 18, 0.24);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.mobile-back-trigger::before {
  content: '';
  position: absolute;
  inset: clamp(0.18rem, 0.16rem + 0.05vw, 0.24rem);
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.mobile-back-trigger svg {
  width: 1.1rem;
  height: 1.1rem;
}

.mobile-header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(3rem, 2.35rem + 1.3vw, 4.25rem);
  height: clamp(3rem, 2.35rem + 1.3vw, 4.25rem);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12, 19, 34, 0.9), rgba(10, 16, 30, 0.82));
  color: rgba(240, 247, 255, 0.92);
  box-shadow: 0 12px 28px rgba(2, 8, 18, 0.24);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.mobile-header-action::before {
  content: '';
  position: absolute;
  inset: clamp(0.18rem, 0.16rem + 0.05vw, 0.24rem);
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.mobile-header-action:hover,
.mobile-header-action:focus-visible {
  background: linear-gradient(180deg, rgba(16, 28, 44, 0.94), rgba(12, 22, 36, 0.9));
  border-color: rgba(113, 183, 255, 0.34);
  transform: translateY(-1px);
}

.mobile-header-action:focus-visible {
  outline: 2px solid rgba(113, 183, 255, 0.8);
  outline-offset: 2px;
}

.mobile-header-action[disabled] {
  cursor: default;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.mobile-header-action[disabled]:hover,
.mobile-header-action[disabled]:focus-visible {
  background: linear-gradient(180deg, rgba(12, 19, 34, 0.9), rgba(10, 16, 30, 0.82));
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(240, 247, 255, 0.92);
  transform: none;
}

.mobile-header-action--accent {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(135deg, rgba(61, 228, 165, 0.98), rgba(100, 234, 185, 0.96));
  color: #041018;
  box-shadow: 0 10px 24px rgba(22, 163, 124, 0.28);
}

.mobile-header-action--accent:hover,
.mobile-header-action--accent:focus-visible {
  border-color: rgba(52, 211, 153, 0.38);
  background: linear-gradient(135deg, rgba(72, 234, 175, 0.99), rgba(118, 240, 197, 0.97));
  color: #041018;
}

.mobile-header-action[data-success-state='true'],
.mobile-header-action[data-success-state='true']:hover,
.mobile-header-action[data-success-state='true']:focus-visible {
  border-color: rgba(52, 211, 153, 0.38);
  background: linear-gradient(135deg, rgba(61, 228, 165, 0.98), rgba(100, 234, 185, 0.96));
  color: #041018;
  transform: none;
  box-shadow: 0 10px 24px rgba(22, 163, 124, 0.28);
}

.mobile-header-action__icon {
  width: 1.28rem;
  height: 1.28rem;
}

.mobile-header-action__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mobile-back-trigger:hover,
.mobile-back-trigger:focus-visible {
  background: linear-gradient(180deg, rgba(16, 28, 44, 0.94), rgba(12, 22, 36, 0.9));
  border-color: rgba(104, 224, 184, 0.32);
  color: rgba(128, 239, 198, 1);
  transform: translateY(-1px);
}

.mobile-back-trigger:focus-visible {
  outline: 2px solid rgba(113, 183, 255, 0.8);
  outline-offset: 2px;
}

/* --- Hamburger trigger — base visual styling --- */
.mobile-menu-trigger {
  width: clamp(3rem, 2.35rem + 1.3vw, 4.25rem);
  height: clamp(3rem, 2.35rem + 1.3vw, 4.25rem);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.88);
  box-shadow: 0 16px 36px rgba(2, 8, 18, 0.34);
  backdrop-filter: blur(12px);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.mobile-menu-trigger:hover,
.mobile-menu-trigger:focus-visible {
  background: rgba(35, 60, 116, 0.9);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 40px rgba(3, 10, 22, 0.42);
  transform: translateY(-1px);
}
.mobile-menu-trigger:focus-visible {
  outline: 2px solid rgba(113, 183, 255, 0.85);
  outline-offset: 2px;
}
.mobile-menu-trigger::before {
  content: '';
  position: absolute;
  inset: clamp(0.22rem, 0.18rem + 0.08vw, 0.32rem);
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.mobile-menu-trigger__bar {
  position: absolute;
  width: clamp(1.1rem, 0.95rem + 0.32vw, 1.45rem);
  height: 1.6px;
  background: #fff;
  border-radius: 1px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 200ms ease;
}
.mobile-menu-trigger__bar:nth-child(1) { transform: translateY(clamp(-6px, -4.5px - 0.16vw, -5px)); }
.mobile-menu-trigger__bar:nth-child(2) { transform: translateY(0); }
.mobile-menu-trigger__bar:nth-child(3) { transform: translateY(clamp(5px, 4.5px + 0.16vw, 6px)); }

.mobile-menu-trigger[aria-expanded="true"] .mobile-menu-trigger__bar:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}
.mobile-menu-trigger[aria-expanded="true"] .mobile-menu-trigger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-trigger[aria-expanded="true"] .mobile-menu-trigger__bar:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

.mobile-menu-trigger__badge {
  position: absolute;
  top: clamp(-0.24rem, -0.12rem - 0.18vw, -0.36rem);
  right: clamp(-0.14rem, -0.08rem - 0.14vw, -0.28rem);
  min-width: clamp(1.28rem, 1.12rem + 0.34vw, 1.56rem);
  height: clamp(1.28rem, 1.12rem + 0.34vw, 1.56rem);
  padding: 0 clamp(0.32rem, 0.22rem + 0.14vw, 0.42rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a7a 0%, #ff5a5f 100%);
  color: #ffffff;
  font-size: clamp(0.68rem, 0.62rem + 0.12vw, 0.8rem);
  font-weight: 700;
  line-height: 1;
  border: 2px solid rgba(10, 18, 34, 0.92);
  box-shadow: 0 8px 18px rgba(255, 90, 95, 0.28);
  pointer-events: none;
  z-index: 2;
}

.mobile-menu-trigger__badge[hidden] {
  display: none !important;
}

/* --- Slide-over menu — base visual styling --- */
.mobile-slide-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  isolation: isolate;
  pointer-events: none;
}
.mobile-slide-menu[hidden] {
  display: block;
  visibility: hidden;
}
.mobile-slide-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-slide-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(2, 6, 16, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-slide-menu.is-open .mobile-slide-menu__backdrop {
  opacity: 1;
}

.mobile-slide-menu__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(84vw, 22rem);
  display: flex;
  flex-direction: column;
  background: #070c18;
  border-left: 1px solid rgba(80, 216, 180, 0.08);
  transform: translateX(100%);
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-slide-menu.is-open .mobile-slide-menu__panel {
  transform: translateX(0);
}

.mobile-slide-menu__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: calc(env(safe-area-inset-top) + 1.4rem) 1.4rem 1.3rem;
  overflow: hidden;
}
.mobile-slide-menu__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(80, 216, 180, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 20%, rgba(99, 130, 255, 0.07) 0%, transparent 50%),
    linear-gradient(180deg, rgba(80, 216, 180, 0.04) 0%, transparent 100%);
  pointer-events: none;
}
.mobile-slide-menu__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.4rem;
  right: 1.4rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(80, 216, 180, 0.3), rgba(80, 216, 180, 0.05) 60%, transparent);
}
.mobile-slide-menu__user-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.mobile-slide-menu__avatar {
  flex-shrink: 0;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #50d8b4 0%, #2a9d8f 50%, #264653 100%);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px rgba(80, 216, 180, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
}
.mobile-slide-menu__user-details {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.mobile-slide-menu__name {
  color: #f1f3f8;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-slide-menu__email {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-slide-menu__close {
  position: relative;
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.mobile-slide-menu__close svg {
  width: 1.15rem;
  height: 1.15rem;
}
.mobile-slide-menu__close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.mobile-slide-menu__close:focus-visible {
  outline: 2px solid rgba(80, 216, 180, 0.6);
  outline-offset: 2px;
}

.mobile-slide-menu__body {
  flex: 1;
  padding: 1rem 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-slide-menu.is-open .mobile-slide-menu__body > * {
  animation: slideMenuItemIn 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mobile-slide-menu.is-open .mobile-slide-menu__body > *:nth-child(1) { animation-delay: 80ms; }
.mobile-slide-menu.is-open .mobile-slide-menu__body > *:nth-child(2) { animation-delay: 130ms; }
.mobile-slide-menu.is-open .mobile-slide-menu__body > *:nth-child(3) { animation-delay: 180ms; }
.mobile-slide-menu.is-open .mobile-slide-menu__body > *:nth-child(4) { animation-delay: 230ms; }
.mobile-slide-menu.is-open .mobile-slide-menu__body > *:nth-child(5) { animation-delay: 280ms; }
.mobile-slide-menu.is-open .mobile-slide-menu__body > *:nth-child(6) { animation-delay: 330ms; }

@keyframes slideMenuItemIn {
  from {
    opacity: 0;
    transform: translateX(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-menu-action {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #dce1ec;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  width: 100%;
  text-align: left;
  min-height: 3.4rem;
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu-action::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #50d8b4, #2a9d8f);
  transform: translateY(-50%);
  transition: height 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu-action:hover,
.mobile-menu-action:focus-visible {
  background: rgba(80, 216, 180, 0.05);
  color: #f4f6fb;
}
.mobile-menu-action:hover::before {
  height: 1.4rem;
}
.mobile-menu-action:focus-visible {
  outline: 2px solid rgba(80, 216, 180, 0.5);
  outline-offset: -2px;
}
.mobile-menu-action:active {
  background: rgba(80, 216, 180, 0.08);
}

.mobile-menu-action__icon {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  color: #50d8b4;
  opacity: 0.65;
  transition: opacity 150ms ease, transform 200ms ease;
}
.mobile-menu-action:hover .mobile-menu-action__icon {
  opacity: 1;
  transform: scale(1.08);
}

.mobile-menu-action--disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.mobile-menu-action--disabled::before {
  display: none;
}

.mobile-menu-action--disabled:hover,
.mobile-menu-action--disabled:focus-visible,
.mobile-menu-action--disabled:active {
  background: transparent;
  color: #dce1ec;
  outline: none;
}

.mobile-menu-action--disabled:hover .mobile-menu-action__icon,
.mobile-menu-action--disabled:focus-visible .mobile-menu-action__icon {
  opacity: 0.65;
  transform: none;
}

.mobile-menu-action__meta {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 205, 96, 0.88);
}

.mobile-menu-action__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  margin-left: auto;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a7a 0%, #ff5a5f 100%);
  border: 1px solid rgba(255, 122, 122, 0.28);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.mobile-menu-action__badge[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .mobile-menu-action--ferd {
    display: none !important;
  }
}

.mobile-slide-menu__footer {
  padding: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
  background: rgba(0, 0, 0, 0.15);
}
.mobile-slide-menu__signout {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border-radius: 12px;
  color: rgba(236, 244, 255, 0.86);
  font-size: 1.02rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
  min-height: 3.4rem;
}
.mobile-slide-menu__signout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.mobile-slide-menu__signout:focus-visible {
  outline: 2px solid rgba(80, 216, 180, 0.5);
  outline-offset: -2px;
}
.mobile-slide-menu__signout-icon {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  opacity: 0.55;
  transition: opacity 150ms ease;
}
.mobile-slide-menu__signout:hover .mobile-slide-menu__signout-icon {
  opacity: 0.85;
}

.mobile-slide-menu__signout--danger {
  color: rgba(255, 140, 140, 0.8);
}

.mobile-slide-menu__signout--danger:hover {
  background: rgba(255, 80, 100, 0.08);
  color: #ffa8a8;
}

.mobile-slide-menu__placeholder {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.4rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.96rem;
  line-height: 1.4;
}

.mobile-slide-menu__placeholder .mobile-slide-menu__signout-icon {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-slide-menu__panel,
  .mobile-slide-menu__backdrop,
  .mobile-menu-trigger__bar {
    transition-duration: 0.01ms !important;
  }
  .mobile-slide-menu.is-open .mobile-slide-menu__body > * {
    animation: none !important;
  }
}

.mobile-menu-divider {
  height: 1px;
  margin: 0.3rem 1rem;
  background: rgba(255, 255, 255, 0.05);
}

/* --- Mobile breakpoint: activate header + mobile-specific layout --- */
@media (max-width: 820px) {
  body.kommune-job-body.admin-body::before,
  body.kommune-job-body.admin-body::after {
    display: none;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell {
    padding-top: max(4rem, calc(env(safe-area-inset-top) + 3.4rem));
  }

  /* On mobile fullscreen pages, skip duplicate hero after intro.
     First visible section under header should be page content cards. */
  body.admin-body.admin-body--full .tilflytter-shell > .tilflytter-hero {
    display: none !important;
  }

  body.admin-body.admin-body--full .tilflytter-shell {
    padding-top: 0;
    gap: 1.25rem;
  }

  /* Right-column content is in the mobile menu — hide on mobile */
  .tilflytter-shell__right,
  .kommune-shell__right,
  .bedrift-shell__right {
    display: none !important;
  }

  body.admin-body.admin-body--full .mobile-top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    height: calc(env(safe-area-inset-top) + 4.25rem);
    padding: calc(env(safe-area-inset-top) + 0.6rem) 0.95rem 0.6rem;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(8, 13, 25, 0.96), rgba(8, 13, 25, 0.82));
    backdrop-filter: blur(14px);
  }

  body.admin-body.admin-body--full .mobile-top-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
  }

  body.admin-body.admin-body--full .mobile-top-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
  }

  body.admin-body.admin-body--full .mobile-top-header__brand span {
    font-size: 0.78rem;
    line-height: 1;
  }

  body.admin-body.admin-body--full .mobile-top-header__logo {
    width: 3.1rem;
    height: 3.1rem;
  }

  .mobile-menu-trigger {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 10px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .mobile-back-trigger {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 10px;
    box-shadow: none;
  }

  .mobile-header-action {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 10px;
    box-shadow: none;
  }

  body.admin-body.admin-body--full .mobile-brand-intro {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(env(safe-area-inset-top) + 2rem) 1.6rem 2rem;
    background: #050d1a;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  body.admin-body.admin-body--full .mobile-brand-intro::before,
  body.admin-body.admin-body--full .mobile-brand-intro::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
  }

  body.admin-body.admin-body--full .mobile-brand-intro::before {
    width: 100vw;
    height: 100vw;
    top: -30%;
    left: -25%;
    background: radial-gradient(circle, rgba(14, 55, 120, 0.58) 0%, transparent 68%);
    filter: blur(50px);
    animation: mobileIntroAurora1 18s ease-in-out infinite;
  }

  body.admin-body.admin-body--full .mobile-brand-intro::after {
    width: 80vw;
    height: 80vw;
    bottom: -15%;
    right: -22%;
    background: radial-gradient(circle, rgba(7, 52, 40, 0.5) 0%, transparent 68%);
    filter: blur(45px);
    animation: mobileIntroAurora2 24s ease-in-out infinite;
  }

  body.admin-body.admin-body--full .mobile-brand-intro__card {
    width: 100%;
    max-width: 26rem;
    display: grid;
    align-content: start;
    justify-items: center;
    text-align: center;
    gap: 0;
    position: relative;
    z-index: 1;
    transform-origin: top center;
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), opacity 620ms ease;
  }

  body.admin-body.admin-body--full .mobile-brand-intro__logo {
    width: min(50vw, 9.5rem);
    margin-bottom: 2.2rem;
    justify-self: center;
    transform-origin: center;
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), opacity 620ms ease;
  }

  body.admin-body.admin-body--full .mobile-brand-intro__eyebrow {
    margin: 0 0 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.26em;
    font-size: 0.66rem;
    color: #50d8b4;
    transition: opacity 280ms ease, transform 280ms ease;
  }

  body.admin-body.admin-body--full .mobile-brand-intro__eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 1.5px;
    background: #50d8b4;
    opacity: 0.75;
    margin: 0 auto 1rem;
  }

  body.admin-body.admin-body--full .mobile-brand-intro__title {
    margin: 0 0 1.1rem;
    max-width: 13ch;
    font-size: clamp(2.8rem, 13vw, 3.6rem);
    line-height: 0.90;
    letter-spacing: -0.025em;
    color: #f0f5ff;
    transition: opacity 280ms ease, transform 280ms ease;
  }

  body.admin-body.admin-body--full .mobile-brand-intro__subtitle {
    margin: 0;
    max-width: 25ch;
    color: rgba(185, 212, 235, 0.62);
    line-height: 1.58;
    font-size: 0.86rem;
    letter-spacing: 0.01em;
    transition: opacity 280ms ease, transform 280ms ease;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-brand-intro {
    opacity: 1;
    visibility: visible;
    animation: mobileIntroBreathe 2.6s ease-in-out infinite;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-brand-intro__logo {
    animation: mobileIntroLogoReveal 580ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 60ms;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-brand-intro__eyebrow {
    animation: mobileIntroFadeUp 560ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 250ms;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-brand-intro__title {
    animation: mobileIntroFadeUp 560ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 360ms;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-brand-intro__subtitle {
    animation: mobileIntroFadeUp 560ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 460ms;
  }

  /* Hide page content behind intro during all exit phases */
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active > *:not(.mobile-brand-intro),
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit > *:not(.mobile-brand-intro),
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-collapsing > *:not(.mobile-brand-intro) {
    visibility: hidden;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-top-header,
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit .mobile-top-header,
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-collapsing .mobile-top-header {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  /* Phase 1 — Staggered text exit: subtitle first, then title, then eyebrow */
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit .mobile-brand-intro__subtitle {
    opacity: 0;
    transform: translateY(-14px);
    transition-delay: 0ms;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit .mobile-brand-intro__title {
    opacity: 0;
    transform: translateY(-14px);
    transition-delay: 80ms;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit .mobile-brand-intro__eyebrow {
    opacity: 0;
    transform: translateY(-14px);
    transition-delay: 160ms;
  }

  /* Phase 2 — Aurora blobs fade during background collapse */
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-collapsing .mobile-brand-intro::before,
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-collapsing .mobile-brand-intro::after {
    opacity: 0;
    transition: opacity 400ms ease;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-complete .mobile-brand-intro {
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-complete .mobile-top-header {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Logo pulse when it lands in the header */
  body.admin-body.admin-body--full .mobile-top-header__logo.logo-pulse {
    animation: mobileLogoPulse 420ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Content reveal after intro completes */
  body.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-content-reveal > *:not(.mobile-brand-intro):not(.mobile-top-header) {
    animation: mobileContentReveal 800ms cubic-bezier(0.16, 1, 0.3, 1) 120ms backwards;
  }

  /* ══════════════════════════════════════════════════════════════
     PROFILE DIALOG — Full-screen mobile treatment
     ══════════════════════════════════════════════════════════════ */

  .profile-dialog,
  .profile-dialog[open],
  .profile-dialog.is-open {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    align-items: stretch;
    justify-content: stretch;
  }

  .profile-dialog::backdrop {
    background: rgba(6, 10, 22, 0.85);
    backdrop-filter: blur(6px);
  }

  .profile-dialog__surface,
  .profile-dialog.is-open .profile-dialog__surface,
  .profile-dialog[open] .profile-dialog__surface {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .profile-dialog__scroll {
    border-radius: 0;
  }

  body.mobile-dialog-shell-open.admin-body.admin-body--full .mobile-top-header {
    display: flex !important;
    z-index: 2600;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.mobile-dialog-shell-open .mobile-back-trigger {
    display: inline-flex !important;
  }

  body.mobile-dialog-shell-open.admin-body.admin-body--full .mobile-brand-intro {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.mobile-dialog-shell-open.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active > *:not(.mobile-brand-intro),
  body.mobile-dialog-shell-open.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit > *:not(.mobile-brand-intro),
  body.mobile-dialog-shell-open.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-collapsing > *:not(.mobile-brand-intro) {
    visibility: visible !important;
  }

  body.mobile-dialog-shell-open.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-active .mobile-top-header,
  body.mobile-dialog-shell-open.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-text-exit .mobile-top-header,
  body.mobile-dialog-shell-open.admin-body.admin-body--full .admin-fullscreen-shell.mobile-intro-collapsing .mobile-top-header {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.mobile-dialog-shell-open .profile-dialog.is-open,
  body.mobile-dialog-shell-open .profile-dialog-v2--shell-open {
    top: calc(env(safe-area-inset-top) + 4.25rem);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100dvh - (env(safe-area-inset-top) + 4.25rem));
    max-height: calc(100dvh - (env(safe-area-inset-top) + 4.25rem));
    z-index: 2400;
  }

  body.mobile-dialog-shell-open .mobile-slide-menu {
    z-index: 3200;
  }

  body[data-mobile-dialog='profile'] .mobile-slide-menu [data-mobile-menu-href='/tilflytter/profile/edit'],
  body[data-mobile-dialog='preferences'] .mobile-slide-menu [data-mobile-menu-open='preferences-open-button'],
  body[data-mobile-dialog='notifications'] .mobile-slide-menu [data-mobile-menu-open='notification-prefs-button'] {
    display: none;
  }
}
