/*
  GoPlai Portal — Figma "GoPlai Portal" page (file xeAxE53jTOht6tP4538UTK, node 9261:32039).
  Loaded after site.css. Holds the portal design tokens for dark / light, the pieces rebuilt
  from that design, and the right-to-left (Arabic) adjustments.
*/

/* ---------- Tokens (dark is the default, as in site.css) ---------- */
:root,
html[data-theme="dark"] {
  --gp-bg: #0b1517;
  --gp-surface: #112225;
  --gp-field: #0e1b1d;
  --gp-border: rgba(255, 255, 255, 0.1);
  --gp-divider: rgba(255, 255, 255, 0.08);
  --gp-text: #ffffff;
  --gp-text-secondary: #c9d4d5;
  --gp-text-muted: #8a9a9d;
  --gp-text-faint: #5f7477;
  --gp-accent: #02d866;
  --gp-accent-text: #02d866;
  --gp-on-accent: #0b1517;
  --gp-focus-border: rgba(2, 216, 102, 0.9);
  --gp-focus-ring: rgba(2, 217, 102, 0.18);
  --gp-check-border: rgba(255, 255, 255, 0.25);
  --gp-card-shadow: 0 16px 20px rgba(0, 0, 0, 0.45);
  --gp-switch-border: #ffffff;
  --gp-danger: #ff6b6b;
}

html[data-theme="light"] {
  --gp-bg: #f4f7f6;
  --gp-surface: #ffffff;
  --gp-field: #f3f6f5;
  --gp-border: rgba(15, 31, 34, 0.1);
  --gp-divider: rgba(15, 31, 34, 0.08);
  --gp-text: #0f1f22;
  --gp-text-secondary: #3d4f52;
  --gp-text-muted: #5d6f72;
  --gp-text-faint: #94a3a5;
  --gp-accent: #02d866;
  --gp-accent-text: #05a150;
  --gp-on-accent: #0b1517;
  --gp-focus-border: rgba(5, 161, 80, 0.9);
  --gp-focus-ring: rgba(5, 161, 79, 0.18);
  --gp-check-border: rgba(15, 31, 34, 0.25);
  --gp-card-shadow: 0 16px 20px rgba(15, 31, 33, 0.1);
  --gp-switch-border: rgba(15, 31, 34, 0.1);
  --gp-danger: #c62828;
}

/* The design's typeface is Arboria (licensed; not bundled). It is used when installed or once
   the font files are added; otherwise the existing portal stack applies. Arabic falls through
   to the system Arabic face. */
body.goplai-shell {
  font-family: "Arboria", "Segoe UI", Tahoma, Arial, Helvetica, sans-serif;
}

/* One <img> per theme for icons whose colour is baked into the SVG. */
.goplai-themed-img--light {
  display: none !important;
}

html[data-theme="light"] .goplai-themed-img--dark {
  display: none !important;
}

html[data-theme="light"] .goplai-themed-img--light {
  display: inline-block !important;
}

/* ---------- Language switcher (Components / Language switcher) ---------- */
.goplai-lang {
  flex-shrink: 0;
}

.goplai-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--gp-switch-border);
  border-radius: 10px;
  background: var(--gp-surface);
  color: var(--gp-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.goplai-lang__btn:focus-visible {
  outline: none;
  border-color: var(--gp-focus-border);
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

.goplai-lang__flag,
.goplai-lang__item img {
  display: block;
  flex-shrink: 0;
  border-radius: 2px;
}

.goplai-lang__menu {
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
  box-shadow: var(--gp-card-shadow);
}

.goplai-lang__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.goplai-lang__item:hover,
.goplai-lang__item:focus {
  background: var(--gp-field);
  color: var(--gp-text);
}

.goplai-lang__item.is-active {
  color: var(--gp-accent-text);
  font-weight: 700;
}

/* ---------- Public & auth ---------- */
html body.goplai-shell:has(.goplai-auth-shell),
html body.goplai-shell .goplai-auth-shell {
  background: var(--gp-bg);
  color: var(--gp-text);
}

.goplai-auth-theme-bar {
  align-items: center;
  gap: 10px;
}

.goplai-auth-shell .goplai-theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border-color: var(--gp-border);
  background: var(--gp-surface);
  color: var(--gp-text-secondary);
}

.goplai-auth-stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: clamp(8px, 5vh, 54px) auto 0;
}

.goplai-auth-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px;
  border: 1px solid var(--gp-border);
  border-radius: 24px;
  background: var(--gp-surface);
  box-shadow: var(--gp-card-shadow);
}

.goplai-auth-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goplai-auth-card__title {
  margin: 0;
  color: var(--gp-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.goplai-auth-card__lead {
  margin: 0;
  max-width: 380px;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

.goplai-auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.goplai-auth-form__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goplai-auth-eyebrow {
  margin: 0;
  color: var(--gp-accent-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.96px;
  text-transform: uppercase;
}

html[dir="rtl"] .goplai-auth-eyebrow {
  letter-spacing: 0;
}

.goplai-auth-form__title {
  margin: 0;
  color: var(--gp-text);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.goplai-auth-form__sub {
  margin: 0;
  color: var(--gp-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.goplai-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

html[data-theme] .goplai-auth-shell .goplai-auth-label {
  margin: 0;
  color: var(--gp-text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.goplai-auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--gp-border);
  border-radius: 10px;
  background: var(--gp-field);
}

.goplai-auth-input:focus-within {
  border-color: var(--gp-focus-border);
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

.goplai-auth-input__icon {
  flex-shrink: 0;
}

.goplai-auth-input__control {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gp-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.goplai-auth-input__control::placeholder {
  color: var(--gp-text-faint);
  opacity: 1;
}

.goplai-auth-input__control:-webkit-autofill {
  -webkit-text-fill-color: var(--gp-text);
  box-shadow: 0 0 0 1000px var(--gp-field) inset;
  caret-color: var(--gp-text);
}

html[dir="rtl"] .goplai-auth-input__control[dir="ltr"] {
  text-align: right;
}

.goplai-auth-input__toggle {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.goplai-auth-input__toggle[aria-pressed="true"] {
  opacity: 0.55;
}

.goplai-auth-field__error,
.goplai-auth-error {
  color: var(--gp-danger);
  font-size: 12px;
  font-weight: 500;
}

.goplai-auth-field__error:empty,
.goplai-auth-error:empty,
.goplai-auth-error.validation-summary-valid {
  display: none;
}

.goplai-auth-error ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.goplai-auth-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

html[data-theme] .goplai-auth-shell .goplai-auth-check {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.goplai-auth-check__box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--gp-check-border);
  border-radius: 4px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.goplai-auth-check__box:checked {
  border-color: var(--gp-accent);
  background: var(--gp-accent) center / 10px 10px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.6 8.5 2.6' fill='none' stroke='%230b1517' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.goplai-auth-check__box:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

.goplai-auth-link {
  color: var(--gp-accent-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.goplai-auth-link:hover,
.goplai-auth-link:focus {
  color: var(--gp-accent-text);
  text-decoration: underline;
}

.goplai-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--gp-accent);
  color: var(--gp-on-accent);
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
}

.goplai-auth-submit:hover {
  filter: brightness(1.05);
}

.goplai-auth-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

/* Directional arrow points the other way in right-to-left, as in the Arabic frames. */
html[dir="rtl"] .goplai-auth-submit__arrow {
  transform: scaleX(-1);
}

.goplai-auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goplai-auth-or__line {
  flex: 1 1 0;
  height: 1px;
  background: var(--gp-divider);
}

.goplai-auth-or__text {
  color: var(--gp-text-faint);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.goplai-auth-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Mascot overlaps the card's lower right corner (card 460 wide; eagle starts 350px in, 305px down). */
.goplai-auth-eagle {
  position: absolute;
  z-index: 2;
  top: 305px;
  left: 350px;
  width: 459px;
  max-width: none;
  height: 306px;
  object-fit: cover;
  pointer-events: none;
}

@media (max-width: 1199.98px) {
  .goplai-auth-eagle {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .goplai-auth-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .goplai-auth-form__title {
    font-size: 28px;
  }
}

.goplai-auth-footnote {
  margin: 0;
  padding: 16px 16px 18px;
  color: var(--gp-text-faint);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* ---------- Right-to-left shell basics ---------- */
html[dir="rtl"] .goplai-sidebar {
  border-right: 0;
  border-left: 1px solid var(--theme-border);
}

html[dir="rtl"] .goplai-admin-user__meta {
  text-align: right !important;
}

html[dir="rtl"] .goplai-org-header-back svg,
html[dir="rtl"] .goplai-admin-header__trail-sep {
  transform: scaleX(-1);
}

/* ---------- Public & auth: split layout (brand panel + form) ---------- */
.goplai-auth-shell--split {
  position: relative;
  display: grid;
  grid-template-columns: 592px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.goplai-auth-brand {
  position: sticky;
  top: 16px;
  grid-row: 1 / span 2;
  align-self: start;
  height: calc(100vh - 32px);
  min-height: 560px;
  margin: 16px 0 16px 16px;
  overflow: hidden;
  border-radius: 24px;
  background: #0b1517;
}

html[dir="rtl"] .goplai-auth-brand {
  margin: 16px 16px 16px 0;
}

.goplai-auth-brand__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goplai-auth-brand__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 21, 23, 0.3) 0%, rgba(11, 21, 23, 0.88) 60%, #0b1517 100%);
}

.goplai-auth-brand__logo {
  position: absolute;
  top: 44px;
  inset-inline-start: 36px;
}

.goplai-auth-brand__copy {
  position: absolute;
  inset-inline: 36px;
  bottom: 9.5%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.goplai-auth-brand__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(2, 216, 102, 0.12);
  color: #02d866;
  font-size: 11px;
  font-weight: 700;
}

.goplai-auth-brand__title {
  max-width: 480px;
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
}

.goplai-auth-brand__text {
  max-width: 460px;
  margin: 0;
  color: #c9d4d5;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.goplai-auth-shell--split .goplai-auth-theme-bar {
  grid-column: 2;
  padding: 28px 32px 0;
}

.goplai-auth-shell--split .goplai-auth-main {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  padding: 24px 32px 48px !important;
}

.goplai-auth-shell--split .goplai-lang__btn {
  border-color: var(--gp-border);
}

@media (max-width: 1099.98px) {
  .goplai-auth-shell--split {
    display: flex;
    flex-direction: column;
  }

  .goplai-auth-brand {
    display: none;
  }
}

.goplai-auth-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 420px;
}

.goplai-auth-panel--wide {
  max-width: 560px;
  margin: 0;
  padding: 0;
}

.goplai-auth-panel__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goplai-auth-panel__title {
  margin: 0;
  color: var(--gp-text);
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
}

.goplai-auth-panel__lead {
  margin: 0;
  color: var(--gp-text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.goplai-auth-panel__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.goplai-auth-input--select {
  padding: 0;
}

.goplai-auth-input--select .goplai-auth-input__control {
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
}

.goplai-auth-input--select .goplai-auth-input__control option {
  background: var(--gp-surface);
  color: var(--gp-text);
}

.goplai-auth-help {
  margin: 0;
  color: var(--gp-text-muted);
  font-size: 11px;
  font-weight: 500;
}

.goplai-auth-strength {
  display: flex;
  gap: 6px;
}

.goplai-auth-strength span {
  flex: 1 1 0;
  height: 5px;
  border-radius: 3px;
  background: var(--gp-border);
}

.goplai-auth-strength span.is-on {
  background: var(--gp-accent);
}

a.goplai-auth-submit,
a.goplai-auth-submit:hover {
  color: var(--gp-on-accent);
  text-decoration: none;
}

.goplai-auth-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--gp-accent-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.goplai-auth-back:hover {
  color: var(--gp-accent-text);
  text-decoration: underline;
}

html[dir="rtl"] .goplai-auth-back__chevron {
  transform: scaleX(-1);
}

.goplai-auth-notice {
  padding: 12px 14px;
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

.goplai-auth-notice--success {
  border-color: rgba(2, 216, 102, 0.35);
}

.goplai-auth-notice--warning {
  border-color: rgba(255, 176, 32, 0.45);
}

/* Organization admin invitation (Account/AcceptOrganizationAdminInvitation):
   read-only summary of the invited email + organizations, then a two-column details form. */
.goplai-auth-invite__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
}

.goplai-auth-invite__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.goplai-auth-invite__label {
  flex: 0 0 104px;
  color: var(--gp-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 24px;
}

.goplai-auth-invite__value {
  min-width: 0;
  color: var(--gp-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 24px;
  overflow-wrap: anywhere;
}

.goplai-auth-invite__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.goplai-auth-invite__chip {
  padding: 3px 10px;
  border: 1px solid var(--gp-border);
  border-radius: 999px;
  background: var(--gp-field);
  color: var(--gp-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.goplai-auth-invite__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.goplai-auth-invite__optional {
  color: var(--gp-text-faint);
  font-weight: 400;
}

.goplai-auth-invite__code {
  flex-shrink: 0;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 575.98px) {
  .goplai-auth-invite__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .goplai-auth-invite__row {
    flex-direction: column;
    gap: 2px;
  }

  .goplai-auth-invite__label {
    flex-basis: auto;
  }
}

/* Organization sign-up keeps its existing form markup; these rules give it the Figma field style. */
.goplai-auth-shell--split .org-signup-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.goplai-auth-shell--split .org-signup-section {
  border-bottom-color: var(--gp-divider) !important;
}

.goplai-auth-shell--split .org-signup-step {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gp-accent-text);
  background: rgba(2, 216, 102, 0.12);
  color: var(--gp-accent-text);
  font-size: 12px;
}

html[data-theme] .goplai-auth-shell--split .org-signup-section-head .h6 {
  color: var(--gp-text);
  font-size: 14px;
  font-weight: 700;
}

html[data-theme] .goplai-auth-shell--split .text-muted,
html[data-theme] .goplai-auth-shell--split .form-text {
  color: var(--gp-text-muted) !important;
  font-size: 12px;
}

html[data-theme] .goplai-auth-shell--split .form-label {
  margin-bottom: 6px;
  color: var(--gp-text-secondary);
  font-size: 12px;
  font-weight: 500;
}

html[data-theme] .goplai-auth-shell--split .form-control,
html[data-theme] .goplai-auth-shell--split .form-select {
  min-height: 42px;
  border: 1px solid var(--gp-border) !important;
  border-radius: 10px;
  background-color: var(--gp-field) !important;
  color: var(--gp-text) !important;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

html[data-theme] .goplai-auth-shell--split .form-control::placeholder {
  color: var(--gp-text-faint);
}

html[data-theme] .goplai-auth-shell--split .form-control:focus,
html[data-theme] .goplai-auth-shell--split .form-select:focus {
  border-color: var(--gp-focus-border) !important;
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

html[data-theme] .goplai-auth-shell--split .form-control:disabled,
html[data-theme] .goplai-auth-shell--split .form-control[readonly] {
  opacity: 0.7;
}

html[data-theme] .goplai-auth-shell--split .org-verify-panel,
html[data-theme] .goplai-auth-shell--split .org-cert-row {
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
}

html[data-theme] .goplai-auth-shell--split .btn-goplai {
  padding: 13px 22px;
  border: 0 !important;
  border-radius: 10px;
  background: var(--gp-accent) !important;
  color: var(--gp-on-accent) !important;
  font-size: 13px;
  font-weight: 700;
}

html[data-theme] .goplai-auth-shell--split .btn-outline-secondary,
html[data-theme] .goplai-auth-shell--split .btn-outline-primary {
  min-height: 42px;
  border: 1px solid var(--gp-border);
  border-radius: 10px;
  background: var(--gp-surface);
  color: var(--gp-text);
  font-size: 13px;
  font-weight: 700;
}

html[data-theme] .goplai-auth-shell--split .btn-outline-secondary:hover,
html[data-theme] .goplai-auth-shell--split .btn-outline-primary:hover {
  border-color: var(--gp-focus-border);
  background: var(--gp-field);
  color: var(--gp-text);
}

html[data-theme] .goplai-auth-shell--split .org-verify-status.is-verified {
  color: var(--gp-accent-text);
}

.goplai-auth-shell--split .org-signup-page a:not(.btn) {
  color: var(--gp-accent-text);
  font-weight: 700;
  text-decoration: none;
}

/* =====================================================================
   Signed-in shell: Sidebar v3 (9247:20702) and Topbar (9188:352)
   ===================================================================== */

/* Portal palette for the existing --theme-* tokens, so pages styled through them follow Figma. */
html[data-theme="dark"] body.goplai-admin-shell {
  --theme-bg: #0b1517;
  --theme-bg-dark: #0b1517;
  --theme-surface: #112225;
  --theme-surface-elevated: #0e1b1d;
  --theme-card-bg: #112225;
  --theme-sidebar-bg: #112225;
  --theme-border: rgba(255, 255, 255, 0.1);
  --theme-text: #ffffff;
  --theme-text-secondary: #c9d4d5;
  --theme-text-muted: #8a9a9d;
  --theme-nav-hover: rgba(255, 255, 255, 0.04);
  --theme-shadow: 0 16px 20px rgba(0, 0, 0, 0.45);
  --brand-momentum: #02d866;
  --gp-nav-border: rgba(255, 255, 255, 0.08);
  --gp-nav-count: rgba(255, 255, 255, 0.07);
  --gp-nav-hover: rgba(255, 255, 255, 0.04);
  --gp-nav-active: rgba(2, 216, 102, 0.12);
  --gp-topbar-border: rgba(255, 255, 255, 0.07);
  background: var(--gp-bg);
}

html[data-theme="light"] body.goplai-admin-shell {
  --theme-bg: #f4f7f6;
  --theme-bg-dark: #ffffff;
  --theme-surface: #ffffff;
  --theme-surface-elevated: #f3f6f5;
  --theme-card-bg: #ffffff;
  --theme-sidebar-bg: #ffffff;
  --theme-border: rgba(15, 31, 34, 0.1);
  --theme-text: #0f1f22;
  --theme-text-secondary: #3d4f52;
  --theme-text-muted: #5d6f72;
  --theme-nav-hover: rgba(15, 31, 34, 0.04);
  --theme-shadow: 0 16px 20px rgba(15, 31, 33, 0.1);
  --brand-momentum: #02d866;
  --gp-nav-border: rgba(15, 31, 34, 0.08);
  --gp-nav-count: rgba(15, 31, 34, 0.06);
  --gp-nav-hover: rgba(15, 31, 34, 0.04);
  --gp-nav-active: rgba(2, 216, 102, 0.14);
  --gp-topbar-border: rgba(15, 31, 34, 0.08);
  background: var(--gp-bg);
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header,
html[data-theme] body.goplai-admin-shell .goplai-admin-content,
html[data-theme] body.goplai-admin-shell .goplai-main {
  background: var(--gp-bg);
}

/* Icon drawn from a Figma SVG file, tinted with the current text colour. */
.gp-ic {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--gp-ic) center / contain no-repeat;
  mask: var(--gp-ic) center / contain no-repeat;
}

.gp-ic--14 {
  width: 14px;
  height: 14px;
}

/* ---------- Sidebar ---------- */
html[data-theme] body.goplai-admin-shell .gp-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex: 0 0 256px;
  flex-direction: column;
  gap: 12px;
  width: 256px;
  max-width: 256px;
  height: 100vh;
  padding: 18px 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  border: 0;
  border-inline-end: 1px solid var(--gp-nav-border);
  background: var(--gp-surface);
  z-index: 2;
}

.gp-sidebar::-webkit-scrollbar {
  display: none;
}

.gp-sidebar__brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  height: 62px;
}

.gp-sidebar__logo {
  display: inline-flex;
  line-height: 0;
}

.gp-sidebar__logo img {
  width: 129px;
  height: 41px;
  object-fit: contain;
  object-position: left center;
}

.gp-sidebar__badge {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(2, 216, 102, 0.13);
  color: var(--gp-accent-text);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09px;
  line-height: normal;
}

.gp-sidebar__club {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--gp-nav-border);
  border-radius: 12px;
  background: var(--gp-nav-hover);
  color: var(--gp-text-muted);
  text-decoration: none;
}

.gp-sidebar__club-logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: rgba(2, 216, 102, 0.13);
  color: var(--gp-accent-text);
  font-size: 15px;
  font-weight: 700;
}

.gp-sidebar__club-text {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gp-sidebar__club-name {
  overflow: hidden;
  color: var(--gp-text);
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gp-sidebar__club-sub {
  color: var(--gp-text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: normal;
}

.gp-nav {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.gp-nav__section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gp-nav__group {
  margin: 0;
  color: var(--gp-text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

html[dir="rtl"] .gp-nav__group {
  font-size: 11px;
  letter-spacing: 0;
}

.gp-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.gp-nav__item:hover,
.gp-nav__item:focus-visible {
  background: var(--gp-nav-hover);
  color: var(--gp-text);
  outline: none;
}

.gp-nav__item.is-active {
  background: var(--gp-nav-active);
  color: var(--gp-text);
  font-weight: 700;
}

.gp-nav__item.is-active .gp-ic {
  color: var(--gp-accent-text);
}

.gp-nav__item.is-active::before {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--gp-accent);
}

.gp-nav__label {
  flex: 1 1 0;
  min-width: 0;
}

.gp-nav__count {
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--gp-nav-count);
  color: var(--gp-text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.gp-sidebar__spacer {
  flex: 1 0 0;
  min-height: 1px;
}

.gp-sidebar__status {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.gp-sidebar__status-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gp-accent);
  box-shadow: 0 0 0 4px rgba(2, 216, 102, 0.18);
}

.gp-sidebar__status-text {
  flex: 1 1 0;
  min-width: 0;
  color: var(--gp-text-muted);
  font-size: 11px;
  font-weight: 500;
}

.gp-sidebar__version {
  color: var(--gp-text-faint);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.gp-sidebar .goplai-sidebar-toggle {
  display: none;
}

/* Collapsed rail (the existing toggle keeps working). */
html[data-sidebar="collapsed"][data-theme] body.goplai-admin-shell .gp-sidebar {
  flex-basis: 72px;
  width: 72px;
  max-width: 72px;
  padding-inline: 12px;
}

html[data-sidebar="collapsed"] .gp-sidebar .menu-label,
html[data-sidebar="collapsed"] .gp-sidebar .gp-nav__group {
  display: none;
}

html[data-sidebar="collapsed"] .gp-sidebar .gp-sidebar__brand {
  overflow: hidden;
  width: 30px;
}

html[data-sidebar="collapsed"] .gp-sidebar .gp-nav__item,
html[data-sidebar="collapsed"] .gp-sidebar .gp-sidebar__club,
html[data-sidebar="collapsed"] .gp-sidebar .gp-sidebar__status {
  justify-content: center;
  padding-inline: 0;
}

html[data-sidebar="collapsed"] .gp-sidebar .gp-nav__section {
  padding-top: 6px;
  border-top: 1px solid var(--gp-nav-border);
}

@media (max-width: 992px) {
  html[data-theme] body.goplai-admin-shell .gp-sidebar {
    flex-basis: 72px;
    width: 72px;
    max-width: 72px;
    padding-inline: 12px;
  }

  .gp-sidebar .menu-label,
  .gp-sidebar .gp-nav__group {
    display: none;
  }

  .gp-sidebar .gp-sidebar__brand {
    overflow: hidden;
    width: 30px;
  }

  .gp-sidebar .gp-nav__item,
  .gp-sidebar .gp-sidebar__club,
  .gp-sidebar .gp-sidebar__status {
    justify-content: center;
    padding-inline: 0;
  }
}

/* ---------- Top bar ---------- */
html[data-theme] body.goplai-admin-shell .goplai-admin-header,
html[data-theme] body.goplai-admin-shell .goplai-admin-header.goplai-header {
  border-bottom: 1px solid var(--gp-topbar-border) !important;
  background: var(--gp-bg);
  box-shadow: none;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 67px;
  padding: 14px 32px;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__title {
  flex: 1 1 0;
  gap: 12px;
  min-width: 0;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__title-copy {
  gap: 2px;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__heading {
  overflow: hidden;
  color: var(--gp-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__subtitle {
  padding: 0;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__trail {
  margin-top: 2px;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__trail-item {
  color: var(--gp-text-muted);
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__trail-item.is-active {
  color: var(--gp-text);
  font-weight: 700;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__search {
  flex: 0 0 250px;
  width: 250px;
  max-width: 250px;
  margin-inline-start: auto;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__search-icon {
  width: 16px;
  height: 16px;
}

html[dir="rtl"][data-theme] body.goplai-admin-shell .goplai-admin-header__search-icon {
  right: 12px;
  left: auto;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__search-icon img {
  width: 16px;
  height: 16px;
}

html[data-theme="light"] body.goplai-admin-shell .goplai-admin-header__search-icon img {
  filter: brightness(0.45);
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__search-input {
  height: 36px;
  min-height: 36px;
  padding: 9px 12px;
  padding-inline-start: 38px;
  border: 1px solid var(--gp-nav-border);
  border-radius: 10px;
  background: var(--gp-surface);
  color: var(--gp-text);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__search-input::placeholder {
  color: var(--gp-text-faint);
}

html[data-theme] body.goplai-admin-shell .goplai-admin-header__search-input:focus {
  border-color: var(--gp-focus-border);
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

.gp-topbar__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 16px;
}

html[data-theme] body.goplai-admin-shell .gp-topbar__actions .goplai-lang__btn {
  border-color: var(--gp-border);
}

html[data-theme] body.goplai-admin-shell .gp-icon-btn,
html[data-theme] body.goplai-admin-shell .goplai-admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid var(--gp-border);
  border-radius: 10px;
  background: var(--gp-surface);
  color: var(--gp-text-secondary);
  line-height: 0;
}

html[data-theme] body.goplai-admin-shell .gp-icon-btn:hover:not(:disabled),
html[data-theme] body.goplai-admin-shell .goplai-admin-icon-btn:hover:not(:disabled) {
  border-color: var(--gp-focus-border);
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .gp-icon-btn:disabled {
  opacity: 0.55;
}

html[dir="rtl"] .goplai-admin-icon-btn.goplai-org-header-back svg {
  transform: scaleX(-1);
}

.gp-topbar__divider {
  flex-shrink: 0;
  width: 1px;
  height: 28px;
  background: var(--gp-border);
}

.gp-account__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gp-text-muted);
  text-align: start;
  cursor: pointer;
}

.gp-account__photo {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.gp-account__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gp-account__email {
  max-width: 220px;
  overflow: hidden;
  color: var(--gp-text);
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gp-account__role {
  color: var(--gp-text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: normal;
  white-space: nowrap;
}

.gp-menu {
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
  box-shadow: var(--gp-card-shadow);
}

.gp-menu__item {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.gp-menu__item:hover,
.gp-menu__item:focus {
  background: var(--gp-field);
  color: var(--gp-text);
}

.gp-menu__item--danger,
.gp-menu__item--danger:hover,
.gp-menu__item--danger:focus {
  color: var(--gp-danger);
}

.gp-menu__divider {
  margin: 4px 0;
  border-color: var(--gp-divider);
  opacity: 1;
}

@media (max-width: 1199.98px) {
  html[data-theme] body.goplai-admin-shell .goplai-admin-header__search,
  .gp-account__text {
    display: none;
  }
}

@media (max-width: 767.98px) {
  html[data-theme] body.goplai-admin-shell .goplai-admin-header__inner {
    gap: 10px;
    padding: 12px 16px;
  }

  .gp-topbar__actions {
    gap: 10px;
  }

  .gp-topbar__divider {
    display: none;
  }
}

/* =====================================================================
   Shared page components inside the signed-in shell
   (Figma: Organizations list 9172:185 / light 9267:16454 — page header,
   card, toolbar, table, status pills, buttons, fields, pagination)
   ===================================================================== */

html[data-theme="dark"] {
  --gp-warning: #febc2e;
  --gp-warning-tint: rgba(254, 188, 46, 0.12);
  --gp-danger-tint: rgba(255, 107, 107, 0.16);
  --gp-success-tint: rgba(2, 216, 102, 0.12);
  --gp-info: #5ab8ff;
  --gp-info-tint: rgba(90, 184, 255, 0.14);
  --gp-neutral-tint: rgba(255, 255, 255, 0.06);
  --gp-btn-border: rgba(255, 255, 255, 0.14);
  --gp-row-border: rgba(255, 255, 255, 0.05);
  --gp-thead-bg: rgba(255, 255, 255, 0.03);
  --gp-thead-border: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] {
  --gp-warning: #c98a06;
  --gp-warning-tint: rgba(254, 188, 46, 0.16);
  --gp-danger-tint: rgba(198, 40, 40, 0.1);
  --gp-success-tint: rgba(2, 216, 102, 0.14);
  --gp-info: #1677c7;
  --gp-info-tint: rgba(22, 119, 199, 0.1);
  --gp-neutral-tint: rgba(15, 31, 34, 0.06);
  --gp-btn-border: rgba(15, 31, 34, 0.14);
  --gp-row-border: rgba(15, 31, 34, 0.06);
  --gp-thead-bg: rgba(15, 31, 34, 0.03);
  --gp-thead-border: rgba(15, 31, 34, 0.08);
}

/* ---------- Page padding and headings ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main {
  color: var(--gp-text);
  font-size: 14px;
}

html[data-theme] body.goplai-admin-shell .goplai-main h1:not(.modal-title),
html[data-theme] body.goplai-admin-shell .goplai-main .goplai-page-title {
  color: var(--gp-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
}

html[data-theme] body.goplai-admin-shell .goplai-main h2:not(.modal-title),
html[data-theme] body.goplai-admin-shell .goplai-main h3:not(.modal-title),
html[data-theme] body.goplai-admin-shell .goplai-main h4:not(.modal-title),
html[data-theme] body.goplai-admin-shell .goplai-main h5:not(.modal-title),
html[data-theme] body.goplai-admin-shell .goplai-main h6:not(.modal-title),
html[data-theme] body.goplai-admin-shell .goplai-main .card-title {
  color: var(--gp-text);
  font-weight: 700;
}

html[data-theme] body.goplai-admin-shell .goplai-main .text-muted,
html[data-theme] body.goplai-admin-shell .goplai-main .text-secondary,
html[data-theme] body.goplai-admin-shell .goplai-main .text-body-secondary,
html[data-theme] body.goplai-admin-shell .goplai-main .form-text,
html[data-theme] body.goplai-admin-shell .goplai-main .goplai-page-subtitle,
html[data-theme] body.goplai-admin-shell .goplai-main small.text-muted {
  color: var(--gp-text-muted) !important;
}

html[data-theme] body.goplai-admin-shell .goplai-main a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not([class*="goplai-"]):not([class*="org-"]):not([class*="gp-"]) {
  color: var(--gp-accent-text);
  text-decoration: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main hr {
  border-color: var(--gp-border);
  opacity: 1;
}

/* ---------- Cards ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .card,
html[data-theme] body.goplai-admin-shell .goplai-main .goplai-card,
html[data-theme] body.goplai-admin-shell .goplai-main .list-group-item {
  border: 1px solid var(--gp-border);
  background: var(--gp-surface);
  color: var(--gp-text);
  box-shadow: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .card,
html[data-theme] body.goplai-admin-shell .goplai-main .goplai-card {
  border-radius: 16px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .card-header,
html[data-theme] body.goplai-admin-shell .goplai-main .card-footer {
  border-color: var(--gp-row-border);
  background: transparent;
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .bg-white,
html[data-theme] body.goplai-admin-shell .goplai-main .bg-body {
  background-color: var(--gp-surface) !important;
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .bg-light,
html[data-theme] body.goplai-admin-shell .goplai-main .bg-body-tertiary {
  background-color: var(--gp-field) !important;
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .border,
html[data-theme] body.goplai-admin-shell .goplai-main .border-top,
html[data-theme] body.goplai-admin-shell .goplai-main .border-bottom,
html[data-theme] body.goplai-admin-shell .goplai-main .border-start,
html[data-theme] body.goplai-admin-shell .goplai-main .border-end {
  border-color: var(--gp-border) !important;
}

/* ---------- Tables ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--gp-text-secondary);
  --bs-table-border-color: var(--gp-row-border);
  --bs-table-striped-bg: transparent;
  --bs-table-striped-color: var(--gp-text-secondary);
  --bs-table-hover-bg: var(--gp-nav-hover);
  --bs-table-hover-color: var(--gp-text);
  margin-bottom: 0;
  border-color: var(--gp-row-border);
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .table > :not(caption) > * > * {
  padding: 10px 20px;
  border-bottom: 1px solid var(--gp-row-border);
  background: transparent;
  color: inherit;
  box-shadow: none;
  vertical-align: middle;
}

html[data-theme] body.goplai-admin-shell .goplai-main .table > thead > tr > th {
  padding: 12px 20px;
  border-bottom: 1px solid var(--gp-thead-border);
  background: var(--gp-thead-bg);
  color: var(--gp-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.44px;
  text-transform: uppercase;
  white-space: nowrap;
}

html[dir="rtl"] body.goplai-admin-shell .goplai-main .table > thead > tr > th {
  font-size: 12px;
  letter-spacing: 0;
}

html[data-theme] body.goplai-admin-shell .goplai-main .table > thead > tr > th a {
  color: inherit;
}

html[data-theme] body.goplai-admin-shell .goplai-main .table > tbody > tr:last-child > * {
  border-bottom-color: transparent;
}

html[data-theme] body.goplai-admin-shell .goplai-main .table > tbody > tr:hover > * {
  background: var(--gp-nav-hover);
}

html[data-theme] body.goplai-admin-shell .goplai-main .table strong,
html[data-theme] body.goplai-admin-shell .goplai-main .table .fw-semibold,
html[data-theme] body.goplai-admin-shell .goplai-main .table .fw-bold {
  color: var(--gp-text);
  font-weight: 700;
}

html[data-theme] body.goplai-admin-shell .goplai-main .table-responsive {
  border-radius: 16px;
}

/* ---------- Fields ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .form-label,
html[data-theme] body.goplai-admin-shell .goplai-main label:not(.btn):not(.form-check-label) {
  color: var(--gp-text-secondary);
  font-size: 12px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-control,
html[data-theme] body.goplai-admin-shell .goplai-main .form-select {
  min-height: 42px;
  border: 1px solid var(--gp-border);
  border-radius: 10px;
  background-color: var(--gp-field);
  color: var(--gp-text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-control-sm,
html[data-theme] body.goplai-admin-shell .goplai-main .form-select-sm {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

html[data-theme] body.goplai-admin-shell .goplai-main textarea.form-control {
  min-height: 96px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-control::placeholder {
  color: var(--gp-text-faint);
  opacity: 1;
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-control:focus,
html[data-theme] body.goplai-admin-shell .goplai-main .form-select:focus {
  border-color: var(--gp-focus-border);
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-control:disabled,
html[data-theme] body.goplai-admin-shell .goplai-main .form-control[readonly],
html[data-theme] body.goplai-admin-shell .goplai-main .form-select:disabled {
  background-color: var(--gp-field);
  color: var(--gp-text-muted);
  opacity: 0.75;
}

html[data-theme="dark"] body.goplai-admin-shell .goplai-main .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238a9a9d' stroke-width='1.33' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="light"] body.goplai-admin-shell .goplai-main .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235d6f72' stroke-width='1.33' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-select option {
  background: var(--gp-surface);
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .input-group-text {
  border: 1px solid var(--gp-border);
  background: var(--gp-field);
  color: var(--gp-text-muted);
  font-size: 13px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-check-input {
  border: 1.5px solid var(--gp-check-border);
  background-color: transparent;
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-check-input:checked {
  border-color: var(--gp-accent);
  background-color: var(--gp-accent);
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-check-input:focus {
  border-color: var(--gp-focus-border);
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

html[data-theme] body.goplai-admin-shell .goplai-main .form-check-label {
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .text-danger,
html[data-theme] body.goplai-admin-shell .goplai-main .field-validation-error,
html[data-theme] body.goplai-admin-shell .goplai-main .invalid-feedback {
  color: var(--gp-danger) !important;
}

/* ---------- Buttons ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .btn {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn:not(.btn-sm):not(.btn-lg):not(.btn-link):not(.btn-close):not([class*="goplai-admin-icon"]) {
  padding: 10px 16px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-goplai,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-primary,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-success {
  border: 1px solid var(--gp-accent);
  background: var(--gp-accent);
  color: var(--gp-on-accent);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-goplai:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-primary:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-success:hover {
  border-color: var(--gp-accent);
  background: var(--gp-accent);
  color: var(--gp-on-accent);
  filter: brightness(1.06);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-secondary,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-light,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-secondary,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-dark,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-goplai-outline {
  border: 1px solid var(--gp-btn-border);
  background: var(--gp-surface);
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-secondary:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-light:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-secondary:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-dark:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-goplai-outline:hover {
  border-color: var(--gp-focus-border);
  background: var(--gp-field);
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-primary,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-success {
  border: 1px solid transparent;
  background: var(--gp-success-tint);
  color: var(--gp-accent-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-primary:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-success:hover {
  border-color: var(--gp-focus-border);
  background: var(--gp-success-tint);
  color: var(--gp-accent-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-danger,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-danger {
  border: 1px solid transparent;
  background: var(--gp-danger-tint);
  color: var(--gp-danger);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-danger:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-danger:hover {
  border-color: var(--gp-danger);
  background: var(--gp-danger-tint);
  color: var(--gp-danger);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-warning,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-warning {
  border: 1px solid transparent;
  background: var(--gp-warning-tint);
  color: var(--gp-warning);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-info,
html[data-theme] body.goplai-admin-shell .goplai-main .btn-outline-info {
  border: 1px solid transparent;
  background: var(--gp-info-tint);
  color: var(--gp-info);
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn-link {
  color: var(--gp-accent-text);
  font-weight: 700;
  text-decoration: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn:disabled,
html[data-theme] body.goplai-admin-shell .goplai-main .btn.disabled {
  opacity: 0.5;
}

html[data-theme] body.goplai-admin-shell .goplai-main .btn:focus-visible {
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

/* ---------- Status pills and tags ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .badge {
  padding: 4px 10px;
  border: 0;
  border-radius: 100px;
  background: var(--gp-neutral-tint) !important;
  color: var(--gp-text-secondary) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: normal;
}

html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-success,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-success,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-primary,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-primary {
  background: var(--gp-success-tint) !important;
  color: var(--gp-accent-text) !important;
}

html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-warning,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-warning {
  background: var(--gp-warning-tint) !important;
  color: var(--gp-warning) !important;
}

html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-danger,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-danger {
  background: var(--gp-danger-tint) !important;
  color: var(--gp-danger) !important;
}

html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-info,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-info {
  background: var(--gp-info-tint) !important;
  color: var(--gp-info) !important;
}

html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-success::before,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-success::before,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-warning::before,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-warning::before,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.bg-danger::before,
html[data-theme] body.goplai-admin-shell .goplai-main .badge.text-bg-danger::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

/* ---------- Alerts ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .alert {
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .alert-success {
  border-color: rgba(2, 216, 102, 0.35);
  background: var(--gp-success-tint);
}

html[data-theme] body.goplai-admin-shell .goplai-main .alert-warning {
  border-color: rgba(254, 188, 46, 0.4);
  background: var(--gp-warning-tint);
}

html[data-theme] body.goplai-admin-shell .goplai-main .alert-danger {
  border-color: rgba(255, 107, 107, 0.4);
  background: var(--gp-danger-tint);
}

html[data-theme] body.goplai-admin-shell .goplai-main .alert-info {
  border-color: rgba(90, 184, 255, 0.35);
  background: var(--gp-info-tint);
}

/* ---------- Tabs ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .nav-tabs {
  gap: 0;
  border-bottom: 1px solid var(--gp-row-border);
}

html[data-theme] body.goplai-admin-shell .goplai-main .nav-tabs .nav-link {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .nav-tabs .nav-link.active {
  border-bottom-color: var(--gp-accent);
  background: transparent;
  color: var(--gp-text);
  font-weight: 700;
}

html[data-theme] body.goplai-admin-shell .goplai-main .nav-pills .nav-link {
  border-radius: 10px;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .nav-pills .nav-link.active {
  background: var(--gp-success-tint);
  color: var(--gp-accent-text);
  font-weight: 700;
}

/* ---------- Pagination ---------- */
html[data-theme] body.goplai-admin-shell .goplai-main .pagination {
  gap: 4px;
  margin-bottom: 0;
}

html[data-theme] body.goplai-admin-shell .goplai-main .pagination .page-link {
  min-width: 28px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--gp-text-secondary);
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
  box-shadow: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .pagination .page-link:hover {
  border-color: var(--gp-border);
  background: var(--gp-surface);
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .pagination .page-item.active .page-link {
  border-color: rgba(2, 216, 102, 0.5);
  background: rgba(2, 216, 102, 0.15);
  color: var(--gp-accent-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .pagination .page-item.disabled .page-link {
  background: transparent;
  color: var(--gp-text-faint);
}

/* ---------- Overlays ---------- */
html[data-theme] body.goplai-admin-shell .modal-content {
  border: 1px solid var(--gp-border);
  border-radius: 16px;
  background: var(--gp-surface);
  color: var(--gp-text);
  box-shadow: var(--gp-card-shadow);
}

html[data-theme] body.goplai-admin-shell .modal-header,
html[data-theme] body.goplai-admin-shell .modal-footer {
  border-color: var(--gp-row-border);
}

html[data-theme] body.goplai-admin-shell .modal-title {
  color: var(--gp-text);
  font-size: 18px;
  font-weight: 700;
}

html[data-theme="dark"] body.goplai-admin-shell .modal .btn-close {
  filter: invert(1) grayscale(1);
}

html[data-theme="dark"] body.goplai-admin-shell .modal-backdrop.show {
  opacity: 0.6;
}

html[data-theme] body.goplai-admin-shell .goplai-main .dropdown-menu {
  padding: 6px;
  border: 1px solid var(--gp-border);
  border-radius: 12px;
  background: var(--gp-surface);
  box-shadow: var(--gp-card-shadow);
}

html[data-theme] body.goplai-admin-shell .goplai-main .dropdown-item {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--gp-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

html[data-theme] body.goplai-admin-shell .goplai-main .dropdown-item:hover,
html[data-theme] body.goplai-admin-shell .goplai-main .dropdown-item:focus {
  background: var(--gp-field);
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .dropdown-item.text-danger {
  color: var(--gp-danger) !important;
}

html[data-theme] body.goplai-admin-shell .goplai-main .dropdown-divider {
  border-color: var(--gp-divider);
  opacity: 1;
}

html[data-theme] body.goplai-admin-shell .goplai-main .progress {
  height: 6px;
  border-radius: 100px;
  background: var(--gp-neutral-tint);
}

html[data-theme] body.goplai-admin-shell .goplai-main .progress-bar {
  border-radius: 100px;
  background: var(--gp-accent);
}

/* Sidebar logo size as drawn in the component. */
.gp-sidebar__logo img {
  width: 96px;
  height: 31px;
}

/* ---------- Breadcrumb (top bar) and page header (content) ---------- */
.gp-crumbs {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  line-height: normal;
  white-space: nowrap;
}

.gp-crumbs__item {
  overflow: hidden;
  color: var(--gp-text-muted);
  font-weight: 500;
  text-decoration: none;
  text-overflow: ellipsis;
}

a.gp-crumbs__item:hover {
  color: var(--gp-text);
}

.gp-crumbs__item--current {
  color: var(--gp-text);
  font-weight: 700;
}

.gp-crumbs__sep {
  width: 12px;
  height: 12px;
  color: var(--gp-text-muted);
}

html[dir="rtl"] .gp-crumbs__sep {
  transform: scaleX(-1);
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head > .goplai-admin-header__title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 0 24px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head .goplai-admin-header__title-copy {
  gap: 6px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head .goplai-admin-header__heading {
  margin: 0;
  color: var(--gp-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
  white-space: normal;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head .goplai-admin-header__subtitle {
  margin: 0;
  color: var(--gp-text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head .goplai-system-badge {
  display: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head .goplai-org-header-back {
  flex-shrink: 0;
  margin-top: -2px;
}

/* Table header keeps the Figma tint even where older page rules set their own. */
html[data-theme] body.goplai-admin-shell .goplai-main .table > thead > tr > th {
  background: var(--gp-thead-bg) !important;
  color: var(--gp-text-muted) !important;
}

/* ---------- Sidebar collapse control (sits on the sidebar edge) ---------- */
html[data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle {
  top: 37px;
  left: 256px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gp-border);
  border-radius: 8px;
  background: var(--gp-surface);
  color: var(--gp-text-muted);
  box-shadow: none;
}

html[data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle:hover,
html[data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle:focus-visible {
  border-color: var(--gp-focus-border);
  background: var(--gp-surface);
  color: var(--gp-accent-text);
}

html[data-sidebar="collapsed"][data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle {
  left: 72px;
}

html[dir="rtl"][data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle {
  right: 256px;
  left: auto;
  transform: translateX(50%) scaleX(-1);
}

html[dir="rtl"][data-sidebar="collapsed"][data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle {
  right: 72px;
  left: auto;
}

@media (max-width: 992px) {
  html[data-theme] body.goplai-admin-shell .goplai-sidebar-rail-toggle {
    display: none;
  }
}

/* ---------- Arabic / right-to-left ---------- */
/* Arboria has no Arabic glyphs; Arabic text uses the platform's Arabic UI face. */
html[lang="ar"] body.goplai-shell {
  font-family: "Segoe UI", "Noto Sans Arabic", "Dubai", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body.goplai-admin-shell .goplai-main .table > thead > tr > th,
html[dir="rtl"] body.goplai-admin-shell .goplai-main .table > tbody > tr > td {
  text-align: right;
}

html[dir="rtl"] body.goplai-admin-shell .goplai-main .text-start {
  text-align: right !important;
}

html[dir="rtl"] body.goplai-admin-shell .goplai-main .text-end {
  text-align: left !important;
}

/* Values that stay left-to-right inside Arabic pages (emails, phone numbers, codes, dates). */
html[dir="rtl"] .gp-ltr,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"] {
  direction: ltr;
  text-align: right;
}

html[dir="rtl"] .gp-account__email {
  direction: ltr;
}

/* Directional icons flip in right-to-left, as in the Arabic Figma frame. */
html[dir="rtl"] .gp-flip-rtl,
html[dir="rtl"] .gp-ic[style*="arrow-right"],
html[dir="rtl"] .gp-ic[style*="chevron-right"],
html[dir="rtl"] .gp-ic[style*="chevron-left"] {
  transform: scaleX(-1);
}

/* ---------- GoPlai logo (Figma "Final Logo" mask: green mark + word in the text colour) ---------- */
.gp-logo {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 118px;
  height: 34px;
}

.gp-logo__mark,
.gp-logo__word {
  position: absolute;
  -webkit-mask-image: url("../images/figma/auth/logo-mask.png");
  mask-image: url("../images/figma/auth/logo-mask.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 129px 86px;
  mask-size: 129px 86px;
}

.gp-logo__mark {
  z-index: 1;
  top: 0;
  left: 0;
  width: 47px;
  height: 34px;
  background: #00d15a;
  -webkit-mask-position: 0 -26px;
  mask-position: 0 -26px;
}

.gp-logo__word {
  top: 1.35px;
  left: 18.72px;
  width: 97.13px;
  height: 31.3px;
  background: var(--gp-text);
  -webkit-mask-position: -18.72px -27.35px;
  mask-position: -18.72px -27.35px;
}

.gp-logo--on-dark .gp-logo__word {
  background: #ffffff;
}

.gp-sidebar__logo {
  align-items: center;
}

.goplai-auth-brand__logo {
  top: 46px;
}

/* ---------- Page-level actions docked in the page header (wwwroot/js/goplai-portal.js) ---------- */
html.gp-actions-docked[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head > .goplai-admin-header__title {
  /* site.css sets justify-self: start, which shrinks the row to the title text and leaves the
     actions next to the subtitle instead of at the end of the row. */
  justify-self: stretch;
  width: 100%;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 16px;
  row-gap: 12px;
  padding-inline-end: 0 !important;
}

html.gp-actions-docked[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head .goplai-admin-header__title-copy {
  flex: 1 1 320px;
  padding-inline-end: 0 !important;
}

html.gp-actions-docked[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head__actions {
  display: flex;
  flex: 0 1 auto;
  justify-content: flex-end;
  max-width: 100%;
  margin-inline-start: auto;
}

html.gp-actions-docked[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head__actions > * {
  position: static !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  pointer-events: auto !important;
  transform: none !important;
}

@media (max-width: 767.98px) {
  html.gp-actions-docked[data-theme] body.goplai-admin-shell .goplai-main .gp-page-head__actions {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

/* ---------- Portal dialogs (gpConfirm / gpAlert in goplai-portal.js) ---------- */
.gp-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gp-dialog[hidden] {
  display: none;
}

.gp-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 13, 0.6);
}

html[data-theme="light"] .gp-dialog__backdrop {
  background: rgba(15, 31, 34, 0.35);
}

.gp-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  border: 1px solid var(--gp-border);
  border-radius: 16px;
  background: var(--gp-surface);
  color: var(--gp-text);
  box-shadow: var(--gp-card-shadow);
  animation: gp-dialog-in 0.14s ease-out;
}

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

.gp-dialog__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.gp-dialog__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gp-success-tint);
  color: var(--gp-accent-text);
}

.gp-dialog__icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: url("../images/figma/orgs/ic-info.svg") center / contain no-repeat;
  mask: url("../images/figma/orgs/ic-info.svg") center / contain no-repeat;
}

.gp-dialog__panel[data-tone="success"] .gp-dialog__icon::before {
  -webkit-mask-image: url("../images/figma/orgs/ic-check.svg");
  mask-image: url("../images/figma/orgs/ic-check.svg");
}

.gp-dialog__panel[data-tone="danger"] .gp-dialog__icon {
  background: var(--gp-danger-tint);
  color: var(--gp-danger);
}

.gp-dialog__panel[data-tone="danger"] .gp-dialog__icon::before {
  -webkit-mask-image: url("../images/figma/orgs/ic-x-circle.svg");
  mask-image: url("../images/figma/orgs/ic-x-circle.svg");
}

.gp-dialog__title {
  margin: 0;
  color: var(--gp-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.gp-dialog__message {
  margin: 0 0 22px;
  padding-inline-start: 52px;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-line;
}

.gp-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.gp-dialog__btn {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
}

.gp-dialog__btn[hidden] {
  display: none;
}

.gp-dialog__btn--ghost {
  border-color: var(--gp-btn-border, var(--gp-border));
  background: var(--gp-surface);
  color: var(--gp-text);
}

.gp-dialog__btn--ghost:hover {
  background: var(--gp-field);
}

.gp-dialog__btn--primary {
  background: var(--gp-accent);
  color: var(--gp-on-accent);
}

.gp-dialog__panel[data-tone="danger"] .gp-dialog__btn--primary {
  background: var(--gp-danger);
  color: #ffffff;
}

.gp-dialog__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gp-focus-ring);
}

html.gp-dialog-open,
html.gp-dialog-open body {
  overflow: hidden;
}

@media (max-width: 480px) {
  .gp-dialog__message {
    padding-inline-start: 0;
  }
}

/* ---------- Select chevron: one arrow, at the end of the field ----------
   Section styles set `background:` on selects for their fill colour; that shorthand resets
   background-repeat/position, which tiled the chevron across the field. Pin them here. */
html[data-theme] body.goplai-shell select.form-select:not([multiple]):not([size]),
html[data-theme] body.goplai-shell .form-select.gp-orgform__ms-btn {
  padding-inline-end: 2.25rem;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
}

html[dir="rtl"][data-theme] body.goplai-shell select.form-select:not([multiple]):not([size]),
html[dir="rtl"][data-theme] body.goplai-shell .form-select.gp-orgform__ms-btn {
  background-position: left 0.75rem center !important;
}

html[data-theme="dark"] body.goplai-shell select.form-select:not([multiple]):not([size]),
html[data-theme="dark"] body.goplai-shell .form-select.gp-orgform__ms-btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238a9a9d' stroke-width='1.33' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

html[data-theme="light"] body.goplai-shell select.form-select:not([multiple]):not([size]),
html[data-theme="light"] body.goplai-shell .form-select.gp-orgform__ms-btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235d6f72' stroke-width='1.33' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* =====================================================================
   List / grid view (Views/Shared/_GpViewToggle.cshtml, goplai-portal.js)
   A .gp-gridable table inside [data-gp-view="grid"] is laid out as cards: one row = one card.
   Cell hooks: data-label (caption), .gp-grid-primary, .gp-grid-check, .gp-grid-actions.
   ===================================================================== */
html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--gp-border);
  border-radius: 10px;
  background: var(--gp-field);
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle[hidden] {
  display: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--gp-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle__btn:hover {
  color: var(--gp-text);
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle__btn:focus-visible {
  outline: 2px solid var(--gp-focus-ring);
  outline-offset: 1px;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle__btn.is-active {
  background: var(--gp-surface);
  color: var(--gp-accent-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* ---- Grid view ---- */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] {
  overflow: visible;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable,
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead,
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody {
  display: block;
  width: 100%;
}

/* Header row becomes a slim bar: keeps "select all" and the sortable columns, drops plain captions. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead > tr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--gp-divider);
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead > tr > th {
  display: none;
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  white-space: nowrap;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead > tr > th:has(input[type="checkbox"]),
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead > tr > th:has(a) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead > tr > th[data-grid-label]::after {
  content: attr(data-grid-label);
  color: var(--gp-text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > thead:not(:has(input[type="checkbox"], a)) {
  display: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--gp-border);
  border-radius: 14px;
  background: var(--gp-field);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr:hover,
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr:focus-within {
  border-color: var(--gp-focus-border);
  box-shadow: var(--gp-card-shadow, 0 8px 20px rgba(0, 0, 0, 0.18));
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr:has(.gp-grid-check input:checked) {
  border-color: color-mix(in srgb, var(--gp-accent) 60%, transparent);
  background: color-mix(in srgb, var(--gp-accent) 7%, var(--gp-field));
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: auto;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--gp-text);
  font-size: 13px;
  white-space: normal;
  text-align: end;
  overflow-wrap: anywhere;
}

/* Column caption in front of the value. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td[data-label]::before {
  content: attr(data-label);
  flex-shrink: 0;
  color: var(--gp-text-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: start;
  white-space: nowrap;
}

/* Main cell: card heading, room left for the checkbox in the corner. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-primary {
  order: -1;
  justify-content: flex-start;
  margin-bottom: 8px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--gp-divider);
  text-align: start;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr:has(> td.gp-grid-check) > td.gp-grid-primary {
  padding-inline-end: 28px;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-primary > * {
  min-width: 0;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-check {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  z-index: 1;
  padding: 0;
}

/* Actions: footer of the card, pushed to the bottom so cards in a row line up. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions {
  justify-content: flex-end;
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 1px solid var(--gp-divider);
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td:has(+ td.gp-grid-actions) {
  padding-bottom: 12px;
}

/* Footer buttons keep their own size; groups wrap if the card is narrow. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions {
  flex-wrap: wrap;
  gap: 8px;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions > * {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

/* A full-width cell (empty state row) stays one block. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr:has(> td[colspan]) {
  grid-column: 1 / -1;
  border-style: dashed;
  background: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td[colspan] {
  justify-content: center;
  text-align: center;
}

@media (max-width: 575.98px) {
  html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
}

/* Switch outside a toolbar: a small bar above the table; docked into a toolbar it sits at the end. */
html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px 0;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-bar[hidden] {
  display: none;
}

html[data-theme] body.goplai-admin-shell .goplai-main .gp-view-toggle--docked {
  margin-inline-start: auto;
}

html[data-theme] body.goplai-admin-shell .goplai-main [class*="toolbar"] > .gp-view-toggle--docked ~ * {
  margin-inline-start: 0;
}

html[data-theme] body.goplai-admin-shell .goplai-main form .gp-view-bar,
html[data-theme] body.goplai-admin-shell .goplai-main [class*="toolbar"] .gp-view-bar,
html[data-theme] body.goplai-admin-shell .goplai-main .gp-orgs__filters .gp-view-bar {
  padding: 0;
}


/* Secondary columns: shown in the list, left out of cards. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-hide {
  display: none;
}

/* Card heading: larger avatar / photo. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable td.gp-grid-primary [class*="avatar"] {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  border-radius: 50%;
  font-size: 15px;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable td.gp-grid-primary [class*="avatar"] img,
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable td.gp-grid-primary img[class*="avatar"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable td.gp-grid-primary {
  font-size: 14px;
}

/* Clickable rows / cards. */
html[data-theme] body.goplai-admin-shell .goplai-main table.gp-gridable > tbody > tr.gp-row-link {
  cursor: pointer;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="list"] table.gp-gridable > tbody > tr.gp-row-link:hover > td {
  background-color: var(--gp-nav-hover);
}

/* Photo avatars shared by list rows. */
html[data-theme] body.goplai-admin-shell .goplai-main img.gp-list-photo {
  object-fit: cover;
  padding: 0;
}

/* Export menu (Views/Shared/_GpExportMenu.cshtml): one "Export" button with CSV / Excel / PDF. */
.gp-export {
  display: inline-flex;
}

.gp-export .gp-export__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.gp-export .gp-export__btn::after {
  display: none;
}

.gp-export__ic {
  width: 16px;
  height: 16px;
}

.gp-export__menu {
  min-width: 160px;
}

/* Card footer actions (grid view, all lists): text buttons are green so the card's actions read as
   actions, and a labelled group (Assessment · Consolidated · Psychometric) shares one row equally. */
html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions
  :is(a.btn, a.gp-as-btn-sm, a.gp-rp-btn):not(.btn-goplai):not(.btn-danger):not(.btn-outline-danger):not(.dropdown-toggle):not(.dropdown-item) {
  border: 1px solid rgba(2, 216, 102, 0.35);
  background: var(--gp-success-tint);
  color: var(--gp-accent-text);
  font-weight: 700;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions
  :is(a.btn, a.gp-as-btn-sm, a.gp-rp-btn):not(.btn-goplai):not(.btn-danger):not(.btn-outline-danger):not(.dropdown-toggle):not(.dropdown-item):hover {
  border-color: var(--gp-accent, #02d866);
  filter: brightness(1.1);
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions > .gp-as-row-actions--labelled {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

html[data-theme] body.goplai-admin-shell .goplai-main [data-gp-view="grid"] table.gp-gridable > tbody > tr > td.gp-grid-actions > .gp-as-row-actions--labelled > a {
  min-width: 0;
  padding: 9px 8px;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}
