:root {
  /* ==========================================
     GPS DIGIT — BRAND
     ========================================== */

  --primary: hsl(255 76% 48%);
  --primary-hover: hsl(255 76% 40%);
  --primary-active: hsl(255 76% 35%);

  --primary-soft: hsl(255 100% 97%);
  --primary-soft-hover: hsl(255 100% 94%);
  --primary-border: hsl(255 75% 89%);

  /* Accent - GPS Digit */

  --accent: hsl(264 70% 68%);

  --accent-hover: hsl(264 70% 60%);

  --accent-soft: hsl(264 70% 96%);

  --accent-border: hsl(264 55% 88%);

  /* ==========================================
     BUTTONS
     ========================================== */

  --button-primary: var(--primary);
  --button-primary-hover: var(--primary-hover);
  --button-primary-text: #ffffff;

  /* ==========================================
     BACKGROUNDS
     ========================================== */

  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-hover: #faf9fe;
  --muted: #f2f2f7;

  /* ==========================================
     BORDERS
     ========================================== */

  --border: #e8e8ef;
  --border-hover: #d5d2df;

  /* ==========================================
     TYPOGRAPHY
     ========================================== */

  --text: #25232c;
  --secondary: #777481;
  --text-muted: #9995a3;

  /* ==========================================
     STATUS
     ========================================== */

  --success: #16805d;
  --success-soft: #e9f8f1;

  --warning: #a66a12;
  --warning-soft: #fff5df;

  --danger: #c13545;
  --danger-soft: #fff0f2;

  --info: #5266a8;
  --info-soft: #edf1ff;

  /* ==========================================
     SHAPES
     ========================================== */

  --radius: 0.875rem;
  --radius-sm: 0.5rem;

  --shadow: 0 8px 28px rgb(40 25 75 / 5%);

  /* ==========================================
     SPACING
     ========================================== */

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* ==========================================
     TYPOGRAPHY SIZES
     ========================================== */

  --font-small: 0.8125rem;
  --font-body: 0.9375rem;
  --font-title: 1.875rem;

  /* ==========================================
     LAYOUT
     ========================================== */

  --sidebar-width: 15rem;
}

/* ==========================================
   GPS DIGIT — BUTTONS
   ========================================== */

:is(.app-shell, .portal) :is(button, .button) {
  background: var(--button-primary);
  border-color: var(--button-primary);
  color: var(--button-primary-text);

  border-radius: 9px;

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

:is(.app-shell, .portal) :is(button, .button):hover:not(:disabled) {
  background: var(--button-primary-hover);
  border-color: var(--button-primary-hover);
  box-shadow: 0 4px 12px hsl(255 76% 48% / 12%);
}

:is(.app-shell, .portal) a.button:not(.secondary):not(.danger) {
  color: var(--button-primary-text);
}

/* Secondary */

:is(.app-shell, .portal) :is(button, .button).secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

:is(.app-shell, .portal) :is(button, .button).secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: none;
}

/* Danger */

:is(.app-shell, .portal) :is(button, .button).danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

:is(.app-shell, .portal) :is(button, .button).danger:hover:not(:disabled) {
  background: #a62b3a;
  border-color: #a62b3a;
  box-shadow: none;
}

/* Disabled */

:is(.app-shell, .portal) button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================
   GPS DIGIT — SIDEBAR
   ========================================== */

.app-shell .sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar nav a {
  color: var(--secondary);
  border-radius: 9px;

  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.sidebar nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 650;
}

.sidebar nav a.active:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar nav a:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}

/* ==========================================
   GPS DIGIT — CARDS
   ========================================== */

.panel,
.module-card,
.billing-card,
.catalog-admin > section,
.catalog-admin > details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgb(40 25 75 / 2%);
}

/* ==========================================
   GPS DIGIT — INPUTS
   ========================================== */

:is(.app-shell, .portal) :is(input, select, textarea) {
  background: var(--surface);
  border-color: var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--text);
}

:is(.app-shell, .portal) :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

:is(.app-shell, .portal) input[type="checkbox"] {
  accent-color: var(--primary);
}

/* ==========================================
   GPS DIGIT — AVATARS
   ========================================== */

.avatar {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ==========================================
   GPS DIGIT — LINKS
   ========================================== */

:is(.app-shell, .portal) a:not(.button) {
  color: var(--primary);
}

/* Preserve sidebar navigation colors */

.app-shell .sidebar nav a:not(.button) {
  color: var(--secondary);
}

.app-shell .sidebar nav a.active:not(.button) {
  color: var(--primary);
}

.app-shell .sidebar nav a:hover:not(.active):not(.button) {
  color: var(--text);
}

/* ==========================================
   GPS DIGIT — ACCESSIBILITY
   ========================================== */

:is(.app-shell, .portal) :focus-visible {
  outline-color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  :is(.app-shell, .portal) :is(button, .button),
  .sidebar nav a {
    transition: none;
  }
}

:is(.app-shell, .portal) {
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: var(--font-body);
  line-height: 1.6;
}
:is(.app-shell, .portal) [hidden] {
  display: none !important;
}
:is(.app-shell, .portal) :focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
:is(.app-shell, .portal) h1 {
  font-size: var(--font-title);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.25;
}
:is(.app-shell, .portal) h2 {
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.4;
}
:is(.app-shell, .portal) h3 {
  font-size: 1rem;
  font-weight: 650;
}
:is(.app-shell, .portal) p + p {
  margin-top: var(--space-2);
}
:is(.app-shell, .portal) a {
  color: var(--primary);
}
:is(.app-shell, .portal) a:hover {
  text-decoration: underline;
}
:is(.app-shell, .portal) small,
.text-secondary {
  color: var(--secondary);
  font-size: var(--font-small);
}
:is(.app-shell, .portal) button,
:is(.app-shell, .portal) .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);

  min-height: 2.65rem;
  padding: 0.6rem 1rem;

  background: var(--button-primary);
  border: 1px solid var(--button-primary);
  border-radius: var(--radius-sm);

  color: var(--button-primary-text);

  font: inherit;
  font-weight: 600;

  cursor: pointer;
  text-decoration: none;

  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}
:is(.app-shell, .portal) :is(button, .button):hover {
  background: var(--button-primary-hover);
  border-color: var(--button-primary-hover);
  text-decoration: none;
}

:is(.app-shell, .portal) :is(button, .button).secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

:is(.app-shell, .portal) :is(button, .button).secondary:hover {
  background: #f5f5f5;
  border-color: #d4d4d8;
}
:is(.app-shell, .portal) :is(button, .button).danger:hover {
  background: #84212a;
  border-color: #84212a;
}
:is(.app-shell, .portal) :is(button, .button).danger {
  background: var(--danger);
  color: white;
}
.app-shell a.danger {
  color: var(--danger);
}
:is(.app-shell, .portal) button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}
:is(.app-shell, .portal) form {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
:is(.app-shell, .portal) label {
  display: grid;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 0.875rem;
}
:is(.app-shell, .portal) :is(input, select, textarea) {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 1px solid #aab7c6;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  min-height: 2.75rem;
}
:is(.app-shell, .portal) textarea {
  min-height: 6rem;
  resize: vertical;
}
:is(.app-shell, .portal) input[type="checkbox"] {
  width: 1.1rem;
  min-height: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
}
:is(.app-shell, .portal) label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
}
:is(.app-shell, .portal) label:has(input[type="checkbox"]) input {
  margin-top: 0.3rem;
  flex-shrink: 0;
}
:is(.app-shell, .portal) .validation-message {
  color: var(--danger);
}
.app-shell {
  display: grid;

  grid-template-areas:
    "sidebar header"
    "sidebar content";

  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);

  min-height: 100dvh;
}
.app-shell .sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;

  display: flex;
  flex-direction: column;
  overflow-y: auto;

  margin: 0;
  padding: 1.5rem 0.75rem 1rem;

  background: #ffffff;

  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;

  box-shadow: none;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text) !important;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.brand-caption {
  font-size: var(--font-small);
  color: var(--secondary);
  margin: 0.7rem 0 2rem;
}
.sidebar nav {
  display: grid;
  gap: var(--space-1);
}
.sidebar nav a {
  padding: 0.65rem 0.85rem;
  color: var(--secondary);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.sidebar nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 650;
}
.sidebar nav a:hover {
  background: var(--bg);
  text-decoration: none;
}
.nav-section {
  margin-top: var(--space-4);
}
.nav-section > .nav-group {
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-section > .nav-group:hover {
  background: var(--bg);
}
.app-shell .sidebar .nav-section[open] > .nav-group {
  margin-bottom: var(--space-1);
}
.nav-section > .nav-group:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.nav-group-links {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-1);
}
.sidebar-bottom {
  margin-top: auto;
  padding: var(--space-6) 0.85rem 0;
  display: grid;
  gap: var(--space-2);
  font-size: var(--font-small);
  color: var(--secondary);
}
.app-main {
  min-width: 0;

  display: flex;
  flex-direction: column;

  background: var(--bg);
}
/* ==========================================
   TOPBAR — PROFILE MENU
   ========================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 72px;
  padding: 0 28px;

  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Profile */

.profile-menu {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 11px;

  min-height: 46px;
  padding: 5px 10px 5px 5px;

  border: 1px solid transparent;
  border-radius: 10px;

  background: transparent;

  cursor: pointer;
  list-style: none;

  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

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

.profile-trigger:hover,
.profile-menu[open] .profile-trigger {
  background: var(--bg);
  border-color: var(--border);
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  flex-shrink: 0;

  border-radius: 10px;

  background: var(--primary-soft);
  color: var(--primary);

  font-size: 14px;
  font-weight: 700;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;

  min-width: 0;
}

.profile-info strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.profile-info small {
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.2;
}

.profile-chevron {
  width: 16px;
  height: 16px;

  margin-left: 8px;

  color: var(--secondary);

  transition: transform 160ms ease;
}

.profile-menu[open] .profile-chevron {
  transform: rotate(180deg);
}

/* Dropdown */

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;

  z-index: 100;

  width: 230px;
  padding: 6px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;

  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.profile-dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 12px;
}

.profile-dropdown-header strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.profile-dropdown-header span {
  color: var(--secondary);
  font-size: 11px;
}

.profile-dropdown-divider {
  height: 1px;
  margin: 5px 0;

  background: var(--border);
}

.profile-dropdown-item {
  display: flex;
  align-items: center;

  width: 100%;
  min-height: 38px;
  padding: 9px 12px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: var(--text);

  font: inherit;
  font-size: 12px;
  font-weight: 500;

  text-decoration: none;
  text-align: left;

  cursor: pointer;
}

.profile-dropdown-item:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.profile-dropdown form {
  margin: 0;
}

.profile-dropdown .profile-logout {
  color: var(--danger);
}

.profile-dropdown .profile-logout:hover {
  background: var(--danger-soft, #fff1f1);
  color: var(--danger);
}

/* Responsive */

@media (max-width: 600px) {
  .topbar {
    padding: 0 16px;
  }

  .profile-info {
    display: none;
  }

  .profile-chevron {
    margin-left: 0;
  }
}
.workspace-context {
  flex: 1;
  margin-right: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
}
.eyebrow {
  font-size: 0.65rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  flex-basis: 100%;
}
.account-context {
  display: grid;
  text-align: right;
}
.account-context strong {
  font-size: 0.875rem;
}
.workspace-switcher {
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.workspace-switcher summary {
  font-weight: 650;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.workspace-switcher ul {
  position: absolute;
  top: 2rem;
  left: 0;
  z-index: 20;
  background: var(--surface);
  width: 19rem;
  max-width: 70vw;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
}
.workspace-switcher a {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
}
.app-content {
  width: 100%;
  max-width: 88rem;
  padding: 2.5rem clamp(1.25rem, 3vw, 3rem);
  margin-inline: auto;
  min-width: 0;
  flex: 1;
}
.app-footer {
  padding: var(--space-4) var(--space-8);
  color: var(--secondary);
  font-size: 0.75rem;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.page-description {
  color: var(--secondary);
  max-width: 45rem;
  margin-top: var(--space-2);
}
.breadcrumb {
  display: inline-block;
  font-size: var(--font-small);
  margin-bottom: var(--space-3);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.app-shell .actions form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.panel,
.module-card,
.billing-card,
.catalog-admin > section,
.catalog-admin > details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  min-width: 0;
}
.panel h2,
.module-card h2,
.billing-card h2 {
  margin-bottom: var(--space-3);
}
.panel-grid,
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-6);
}
.workspace-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
}
.workspace-card .button {
  width: fit-content;
}
.metric {
  font-size: 2.25rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}
.section-heading {
  margin: var(--space-8) 0 var(--space-4);
}
.status-badge {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.6;
  vertical-align: middle;
}
.status-success {
  color: var(--success);
  background: var(--success-soft);
}
.status-warning {
  color: var(--warning);
  background: var(--warning-soft);
}
.status-danger {
  color: var(--danger);
  background: var(--danger-soft);
}
.status-info {
  color: var(--info);
  background: var(--info-soft);
}
.status-muted {
  color: var(--secondary);
  background: var(--muted);
}
.notice,
.app-shell p[role="alert"],
.app-shell p[role="status"],
.portal .error {
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-block: var(--space-4);
  background: var(--info-soft);
  color: var(--info);
}
.notice-success {
  background: var(--success-soft);
  color: var(--success);
}
.notice-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.notice-danger,
.app-shell p[role="alert"],
.portal .error {
  background: var(--danger-soft);
  color: var(--danger);
}
.empty-state {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem var(--space-6);
  background: var(--surface);
}
.empty-state p {
  color: var(--secondary);
  margin: var(--space-2) auto var(--space-6);
  max-width: 35rem;
}
.app-shell dl {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr);
  gap: 0.8rem 1rem;
}
.app-shell dt {
  color: var(--secondary);
  font-size: 0.875rem;
}
.app-shell dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.catalog-terms {
  display: grid;
  gap: var(--space-4);
}
.app-shell :is(details > summary) {
  cursor: pointer;
  font-weight: 600;
}
.app-shell details[open] > summary {
  margin-bottom: var(--space-4);
}
.catalog-admin > section form {
  max-width: 45rem;
}
.app-shell form > p {
  color: var(--secondary);
  font-size: 0.8125rem;
}
.plan {
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
}
.plan-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.price {
  font-size: 1.55rem;
  font-weight: 650;
  margin-block: var(--space-3);
}
.app-shell table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.app-shell th {
  color: var(--secondary);
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 650;
}
.app-shell :is(th, td) {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.table-scroll {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-6);
}
.users {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.users > li {
  display: grid;
  grid-template-columns:
    2.5rem minmax(9rem, 2fr) minmax(8rem, 1fr) minmax(8rem, 1fr)
    auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.users > li:last-child {
  border-bottom: 0;
}
.users > li > div {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  overflow-wrap: anywhere;
}
.users > li > .actions {
  display: flex;
  gap: var(--space-4);
}
.users > li > .status-badge {
  justify-self: start;
}
.avatar {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 650;
}
.app-shell dialog {
  width: min(44rem, calc(100vw - 2rem));
  max-height: 85vh;
  position: fixed;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8);
  overflow: auto;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.app-shell dialog::backdrop {
  background: #18273888;
}
.app-shell dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.app-shell dialog :is(h3, footer) {
  margin-top: var(--space-6);
}
.app-shell dialog section {
  margin-top: var(--space-4);
}
.user-workspace-actions {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.app-shell dialog .user-extraordinary-actions {
  margin-top: var(--space-8);
  background: var(--muted);
  border-style: dashed;
}
.app-shell dialog .user-extraordinary-actions h3 {
  margin-top: 0;
}
.development-tools {
  background: #fffaf0;
  border: 1px dashed #b38631;
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-top: var(--space-6);
}
.development-tools .billing-card {
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: var(--space-6);
}
.development-tools form {
  margin-top: var(--space-4);
}
.development-tools form > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.development-tools button {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  font-size: 0.8125rem;
}
.payment-reference {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--secondary);
  overflow-wrap: anywhere;
}
.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 1rem;
  background: var(--surface);
}
.skip-link:focus {
  top: 1rem;
}
.nav-toggle {
  display: none;
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 0 !important;
  opacity: 0;
}
.menu-toggle {
  display: none !important;
  cursor: pointer;
}
.portal {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-4);
  background: var(--bg);
}
.portal :is(.login-card, .activation-card) {
  width: 100%;
  max-width: 28rem;
  margin: auto;
  background: var(--surface);
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.portal .activation-card {
  max-width: 36rem;
}
.portal .brand {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 750;
  margin-bottom: var(--space-6);
}
.portal h1 {
  margin-bottom: var(--space-2);
}
.portal form {
  margin-top: var(--space-6);
}
.portal .public-link {
  display: block;
  font-size: 0.875rem;
  margin-top: var(--space-6);
}
@media (max-width: 1200px) {
  .users > li {
    grid-template-columns: 2.5rem minmax(9rem, 2fr) minmax(8rem, 1fr) auto;
  }
  .users > li > div:nth-child(4) {
    grid-column: 2;
  }
  .users .actions {
    grid-column: 4;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 1023px) {
  .app-shell {
    grid-template-areas:
      "header"
      "sidebar"
      "content";

    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
  }
}

@media (max-width: 1023px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .menu-toggle {
    display: block !important;
    padding: 0.5rem;
  }
  .nav-toggle {
    display: block;
  }
  .app-shell .sidebar {
    position: fixed;
    z-index: 30;
    top: 5.25rem;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100dvh - 5.25rem);
    transform: translateX(-100%);
    visibility: hidden;
    overflow-y: auto;
    box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-toggle:focus-visible ~ .app-main .menu-toggle {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
  }
  .topbar {
    padding-inline: var(--space-4);
    gap: var(--space-4);
  }
  .account-context small {
    display: none;
  }
}
@media (max-width: 767px) {
  .account-context {
    display: none;
  }
  .topbar {
    gap: var(--space-3);
  }
  .app-content {
    padding: var(--space-6) var(--space-4);
  }

  .users > li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }
  .users > li > :nth-child(n + 3) {
    grid-column: 2;
  }
  .users .actions {
    grid-column: 2;
    grid-row: auto;
  }
  .app-shell table:not(.data-table *) :is(thead) {
    position: absolute;
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
  }
  .app-shell table:not(.data-table *),
  .app-shell tbody:not(.data-table *),
  .app-shell tr:not(.data-table *) {
    display: block;
  }
  .app-shell tr:not(.data-table *) {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border);
  }
  .app-shell td:not(.data-table *) {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: var(--space-3);
    padding: 0.5rem 0;
    border: 0;
  }
  .app-shell td:not(.data-table *)::before {
    content: attr(data-label);
    color: var(--secondary);
    font-size: 0.75rem;
  }
  .app-shell dl {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .app-shell dd {
    margin-bottom: var(--space-3);
  }
  .portal :is(.login-card, .activation-card) {
    padding: var(--space-6);
  }
  .app-shell dialog {
    padding: var(--space-6);
  }
}

:is(.app-shell, .portal) fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: var(--space-4);
}
:is(.app-shell, .portal) legend {
  font-size: 1rem;
  font-weight: 650;
  padding: 0 0 var(--space-4);
}

.development-tools .renewal-test-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-6);
  padding-left: 1.5rem;
}
.development-tools .renewal-test-steps li {
  padding-left: var(--space-2);
  min-width: 0;
}
.development-tools .renewal-test-steps li::marker {
  font-weight: 700;
}
.development-tools h4 {
  font-size: var(--font-body);
  margin-bottom: var(--space-2);
}
.development-tools .renewal-test-steps p {
  color: var(--secondary);
  margin-bottom: var(--space-4);
}
.development-tools .renewal-test-recovery {
  display: grid;
  gap: var(--space-3);
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}
.development-tools .renewal-test-recovery button {
  justify-self: start;
}
.development-tools .development-extra-tools {
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}
.development-tools .development-extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-6);
}
.development-tools .development-extra-grid section {
  min-width: 0;
}
.development-tools .development-extra-grid button {
  margin-top: var(--space-4);
}

.users-page .page-header .button:hover {
  background-color: var(--button-primary-hover);
}

/* =========================================
   INVITATIONS HEADER
   ========================================= */

.invitations-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.invitations-header-search {
  display: flex;
  align-items: center;
  gap: 10px;

  width: 300px;
  height: 44px;
  padding: 0 14px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);

  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.invitations-header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.invitations-header-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--secondary);
}

.invitations-header-search input {
  width: 100%;
  min-width: 0;
  height: 100%;

  border: 0;
  outline: 0;

  background: transparent;
  color: var(--text);

  font: inherit;
  font-size: 13px;
}

.invitations-header-search input::placeholder {
  color: var(--secondary);
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .invitations-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .invitations-header-search {
    flex: 1 1 220px;
    width: auto;
  }
}

.invitations-header-search input,
.invitations-header-search input:hover,
.invitations-header-search input:focus,
.invitations-header-search input:focus-visible {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;

  margin: 0;
  padding: 0;

  border: none !important;
  outline: none !important;
  box-shadow: none !important;

  background: transparent !important;
  background-image: none !important;

  color: var(--text);
  font: inherit;
  font-size: 13px;
  appearance: none;
}
