@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Create User card (compact) ── */

.admin-create-user-card .settings-section-header {
    margin-bottom: 0.5rem;
}

.admin-create-user-card .settings-asset-subtitle {
    margin: -0.25rem 0 0.75rem 0;
    font-size: 0.8125rem;
}

.admin-create-user-card .settings-asset-form {
    padding: 0.75rem;
}

.admin-create-user-card .settings-asset-form .settings-asset-label,
.admin-create-user-card .settings-asset-form .settings-label.settings-asset-label {
    margin-bottom: 0.25rem;
}

.admin-create-user-card .settings-asset-form .settings-asset-input,
.admin-create-user-card .settings-asset-form .settings-asset-dropdown {
    margin-bottom: 0.5rem;
}

.admin-create-user-card .settings-asset-actions {
    padding-top: 0.5rem;
    border-top: none;
}

.admin-create-user-card .settings-section-icon {
    color: #374151;
}

.admin-create-user-card .admin-perm-btn--accent {
    background-color: #94ba1d !important;
    border-color: #94ba1d !important;
    color: #ffffff !important;
}

.admin-create-user-card .admin-perm-btn--accent .fa-user-plus {
    color: #ffffff !important;
}

.admin-create-user-card .admin-perm-btn--accent:hover:not(:disabled) {
    background-color: #7a9c17 !important;
    border-color: #7a9c17 !important;
    color: #ffffff !important;
}

/* ── Runtime view card ── */

.admin-runtime-card .settings-section-header {
    margin-bottom: 0.5rem;
}

.admin-runtime-card .settings-asset-subtitle {
    margin: -0.25rem 0 0.75rem 0;
    font-size: 0.8125rem;
}

.admin-runtime-confirm-toast {
    will-change: opacity;
}

.admin-runtime-card .admin-runtime-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
}

/* Skeleton overlay while runtime confirm callback runs */
.admin-runtime-form__content {
    transition: opacity 0.2s ease;
}

.admin-runtime-skeleton {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 42;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.1rem 0 0 0;
    pointer-events: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(3px);
}

.admin-runtime-form--loading .admin-runtime-skeleton {
    display: flex;
}

.admin-runtime-form--loading .admin-runtime-form__content {
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
}

.admin-runtime-form--loading .admin-runtime-form__content .admin-runtime-confirm-loading {
    visibility: hidden;
}

.admin-runtime-skeleton-block {
    background: linear-gradient(90deg, #eef2f6 25%, #e2e8f0 50%, #eef2f6 75%);
    background-size: 200% 100%;
    animation: admin-runtime-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes admin-runtime-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.admin-runtime-skeleton__head {
    height: 2.75rem;
    width: 100%;
    border-radius: 12px;
}

.admin-runtime-skeleton__chips {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.admin-runtime-skeleton__chip {
    flex: 1;
    height: 2.65rem;
    min-width: 0;
    border-radius: 0.5rem;
}

.admin-runtime-skeleton__bar {
    height: 2.85rem;
    width: 100%;
    border-radius: 0.5rem;
}

.admin-runtime-card .admin-runtime-confirm-loading {
    position: absolute !important;
    inset: 0 !important;
    z-index: 40 !important;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 10px;
}

.admin-runtime-card .admin-runtime-confirm-loading > div {
    height: 100% !important;
}

.admin-runtime-card .admin-runtime-loading-status {
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 186, 29, 0.35);
    color: #3f5207;
    font-size: 0.8125rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    pointer-events: none;
}

.admin-runtime-card .admin-runtime-loading-status--inline {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    z-index: 45;
}

.admin-runtime-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.admin-runtime-head__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
}

.admin-runtime-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
    line-height: 1.25;
    white-space: nowrap;
}

.admin-runtime-badge--admin {
    color: #4f660d;
    background: #eef9cd;
    border-color: #c8e05d;
}

.admin-runtime-badge--user {
    color: #2148a0;
    background: #deeafa;
    border-color: #a9c3ff;
}

.admin-runtime-badge--loading {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.admin-runtime-card .admin-runtime-mode-radio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0;
}

.admin-runtime-card .admin-runtime-mode-radio label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    margin: 0;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.25;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease;
}

.admin-runtime-card .admin-runtime-mode-radio label:has(input:checked) {
    border-color: #94ba1d;
    background: #fcfdf7;
    color: #374151;
    box-shadow: 0 0 0 1px rgba(148, 186, 29, 0.16);
}

.admin-runtime-card .admin-runtime-mode-radio-input {
    flex-shrink: 0;
}

.admin-runtime-card {
    position: relative;
    z-index: 20;
    overflow: visible !important;
}

.admin-runtime-user-dropdown .Select-control,
.admin-runtime-user-dropdown .Select__control {
    height: 2.85rem !important;
    min-height: 2.85rem !important;
    padding: 0 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

.admin-runtime-user-dropdown .Select-value,
.admin-runtime-user-dropdown .Select__single-value {
    display: flex !important;
    align-items: center !important;
    line-height: 2.85rem !important;
    padding-left: 0.5rem !important;
    padding-right: 3.5rem !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.admin-runtime-user-dropdown .Select-input {
    align-self: center !important;
}

.admin-runtime-user-dropdown .Select-placeholder,
.admin-runtime-user-dropdown .Select__placeholder {
    line-height: 2.85rem !important;
    padding-left: 0.75rem !important;
}

.admin-runtime-user-dropdown .Select-clear-zone {
    position: absolute !important;
    right: 1.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 0.25rem !important;
}

.admin-runtime-user-dropdown .Select-arrow-zone {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
}

.admin-runtime-user-dropdown .Select-menu-outer,
.admin-runtime-user-dropdown .Select__menu {
    z-index: 1200 !important;
}

/* ── Step badges (dynamic: used in callbacks) ── */

.admin-mock-section-badge {
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    border: 1.5px solid #d1d5db;
    color: #9ca3af;
    background: #f9fafb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.admin-mock-section-badge--active {
    border-color: #94ba1d;
    color: #94ba1d;
    background: #ffffff;
}

.admin-mock-section-badge--complete {
    border-color: #94ba1d;
    color: #ffffff;
    background: #94ba1d;
}

.admin-mock-section-badge--locked {
    border-color: #e5e7eb;
    color: #9ca3af;
    background: #f3f4f6;
}

/* ── Status tags (dynamic: toggled via style) ── */

.admin-mock-tag {
    font-size: 0.5625rem;
    letter-spacing: 0.07em;
    font-weight: 700;
    padding: 0.0625rem 0.4375rem;
    border-radius: 9999px;
    background: #eef9cd;
    color: #4f660d;
    text-transform: uppercase;
    line-height: 1.4;
}

/* ── Step panel enable / disable (dynamic: class toggled in callbacks) ── */

.admin-mock-step-panel {
    transition: opacity 0.25s ease;
}

.admin-mock-step-panel--disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* Tighter spacing so Save Page Permissions sits closer to the page cards; center between bento and section 3 */
#admin-page-step-panel+.settings-asset-actions {
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
    justify-content: flex-start;
}

/* ── Step 3 Unit Permissions: counts panel (full width) ── */

.admin-unit-counts-info {
    margin-bottom: 1rem;
    display: block;
    width: 100%;
}

/* Step 3 section label: same row as steps 1–2; hairline then UP/UOF/ZR hint */
.admin-permissions-card .settings-asset-section-label.admin-perm-step3-label {
    flex-wrap: nowrap;
}

.admin-permissions-card .settings-asset-section-label.admin-perm-step3-label .admin-mock-section-badge {
    order: 1;
}

.admin-permissions-card .settings-asset-section-label.admin-perm-step3-label .admin-perm-step3-label__title {
    order: 2;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
}

.admin-permissions-card .settings-asset-section-label.admin-perm-step3-label::after {
    order: 3;
    flex: 1;
    min-width: 0.75rem;
}

.admin-permissions-card .settings-asset-section-label.admin-perm-step3-label .admin-perm-section-hint {
    order: 4;
    margin-left: 0;
    flex-shrink: 0;
    letter-spacing: 0.06em;
}

/* Stacked panels (scopes / grant / pickers) — match step 2 bento cards */
.admin-unit-panel {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
}

.admin-unit-panel__head {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.65rem;
}

.admin-unit-panel__title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #374151;
}

.admin-unit-panel__subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.35;
}

.admin-unit-panel__eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.65rem;
}

.admin-unit-panel__picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.admin-unit-panel__picker-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #374151;
}

.admin-unit-panel__picker-meta {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

.admin-unit-panel--grant {
    padding-bottom: 1rem;
}

.admin-unit-panel--pickers {
    margin-bottom: 0;
}

.admin-unit-panel--grant .admin-grant-mode-radio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0;
}

.admin-unit-panel--grant .admin-grant-mode-radio label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    margin: 0;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.25;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.admin-unit-panel--grant .admin-grant-mode-radio label:has(input:checked) {
    border-color: #94ba1d;
    background: rgba(148, 186, 29, 0.14);
    color: #24310a;
}

.admin-unit-panel--grant .admin-grant-mode-radio label .admin-grant-mode-radio-input {
    accent-color: #94ba1d;
    flex-shrink: 0;
}

.admin-unit-scope-rows {
    display: flex;
    flex-direction: column;
}

.admin-unit-scope-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.admin-unit-scope-row--last {
    border-bottom: none;
    padding-bottom: 0;
}

.admin-unit-scope-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.admin-unit-scope-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.admin-unit-scope-pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: lowercase;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    line-height: 1.3;
}

.admin-unit-scope-pill--empty {
    background: #e5e7eb;
    color: #9ca3af;
}

.admin-unit-scope-pill--active {
    background: #eef9cd;
    color: #4f660d;
}

.admin-unit-scope-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
}

.admin-unit-scope-metric {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    font-size: 0.8125rem;
}

.admin-unit-scope-metric-key {
    color: #9ca3af;
    font-weight: 500;
}

.admin-unit-scope-metric-num {
    color: #111827;
    font-weight: 700;
}

.admin-unit-counts-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f8fafc;
    box-shadow: none;
    width: fit-content;
    transition: none;
}

.admin-unit-counts-card:hover {
    box-shadow: none;
    transform: none;
}

.admin-unit-counts-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.75rem;
}

.admin-unit-counts-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
}

.admin-unit-counts-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.admin-unit-counts-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
}

/* ── Step 3 Unit Permissions: controls row (Unit Type + Unit Codes) ── */

.admin-unit-controls-row {
    margin-bottom: 1rem;
}

.admin-unit-controls-row .settings-asset-label {
    margin-bottom: 0.35rem;
}

.admin-unit-controls-row .settings-asset-dropdown {
    margin-bottom: 0;
}

.admin-unit-controls-row .admin-perm-help-inline {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* ── Step 3 Unit Permissions: actions row (Grant / Revoke / Revoke All) ── */

.admin-unit-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding-top: 0.875rem;
    border-top: 1px solid #e5e7eb;
}

.admin-unit-actions-row .settings-submit-button {
    flex: 0 1 auto;
    min-width: 6.5rem;
}

/* Revoke All tooltip: bring closer to button */
.admin-revoke-all-tooltip.bs-tooltip-top {
    margin-bottom: -6px !important;
}

/* ── Locked-step message (shown via CSS :has when sibling panel is disabled) ── */

.admin-perm-locked-msg {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    color: #9ca3af;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.admin-perm-locked-msg i {
    font-size: 0.75rem;
}

.admin-perm-locked-msg:has(+ .admin-mock-step-panel--disabled) {
    display: flex;
}

/* ── Page-permissions checklist grid ── */

.admin-mock-page-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem 1.25rem;
    margin-bottom: 0.25rem;
}

/* Full-width row: four equal cards spanning the card length */
.admin-mock-page-grid--bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.admin-mock-page-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    padding: 0.375rem 0.25rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0;
}

/* Bento cells: card-style tiles */
.admin-mock-page-grid--bento label {
    align-items: stretch;
    padding: 0;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    min-height: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-mock-page-grid--bento label:hover {
    border-color: #d1d5db;
    background: #fafafa;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.admin-mock-page-grid--bento label:has(input[type="checkbox"]:checked) {
    border-color: #94ba1d;
    background: #f7fce8;
}

.admin-mock-page-grid--bento .admin-perm-bento-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.875rem 0.5rem;
    min-height: 3.25rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Checkbox: top-right corner of bento card */
.admin-mock-page-grid--bento label {
    position: relative;
}

.admin-mock-page-grid--bento input[type="checkbox"] {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    margin: 0;
    z-index: 10;
}

.admin-mock-page-grid label:hover {
    color: #4f660d;
}

.admin-mock-page-grid input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 9999px;
    border: 2px solid #d1d5db;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
    background: #ffffff;
}

.admin-mock-page-grid input[type="checkbox"]:checked {
    background-color: #94ba1d;
    border-color: #94ba1d;
}

.admin-mock-page-grid input[type="checkbox"]:checked::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    color: #ffffff;
    font-size: 0.5625rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.admin-mock-page-grid label:has(input[type="checkbox"]:checked) {
    color: #4f660d;
}

.admin-perm-page-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.admin-perm-page-icon {
    color: #9ca3af;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.admin-perm-page-icon--card {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
}

label:has(input[type="checkbox"]:checked) .admin-perm-page-icon {
    color: #94ba1d;
}

.admin-perm-page-text {
    font-weight: 600;
    font-size: 0.875rem;
}

.admin-perm-page-sublabel {
    font-size: 0.6875rem;
    color: #6b7280;
    font-weight: 500;
}

.admin-mock-page-grid--bento label:has(input[type="checkbox"]:checked) .admin-perm-page-sublabel {
    color: #4f660d;
}

/* ── User chip (dynamic: built in callback) ── */

.admin-mock-chip-wrapper {
    margin-top: 1rem;
}

.admin-mock-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    padding: 0.5rem 0.75rem;
}

.admin-mock-chip-label {
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1e40af;
    font-weight: 700;
}

.admin-mock-chip-name {
    color: #1f2937;
    font-weight: 700;
    font-size: 0.8125rem;
}

.admin-mock-chip-email {
    color: #6b7280;
    font-size: 0.75rem;
}

.admin-mock-chip-role {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #2148a0;
    background: #deeafa;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* ── Dropdown user-option rendering ── */

.admin-mock-user-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.admin-mock-user-main {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.admin-mock-user-role-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.admin-mock-user-name {
    font-size: 0.8125rem;
    color: #1f2937;
    font-weight: 700;
}

.admin-mock-user-email {
    color: #6b7280;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-mock-user-role {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2148a0;
    background: #deeafa;
    padding: 0.0625rem 0.375rem;
    border-radius: 9999px;
    flex-shrink: 0;
    align-self: center;
    line-height: 1.25;
}

.admin-mock-user-role--admin {
    color: #7a3a00;
    background: #ffedd5;
}

/* ── Target-user row: dropdown + buttons inline ── */

.admin-perm-target-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
}

.admin-perm-target-dropdown-wrap {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.admin-perm-target-row .settings-submit-button {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 0;
    width: auto;
    padding: 0 1.25rem;
    font-size: 0.8125rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

/* Runtime confirm action should span the full row width */
.admin-runtime-card .admin-perm-target-row .settings-submit-button {
    width: 100%;
    flex: 1 1 100%;
}

/* ── Target-user dropdown: compact control ── */

.admin-perm-user-dropdown .Select-control,
.admin-perm-user-dropdown .Select__control {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    padding: 0 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

.admin-perm-user-dropdown .Select-value,
.admin-perm-user-dropdown .Select__single-value {
    display: flex !important;
    align-items: center !important;
    line-height: 2.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 3.5rem !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.admin-perm-user-dropdown .Select-input {
    align-self: center !important;
}

.admin-perm-user-dropdown .Select-placeholder,
.admin-perm-user-dropdown .Select__placeholder {
    line-height: 2.5rem !important;
    padding-left: 0.75rem !important;
}

.admin-perm-user-dropdown .Select-clear-zone {
    position: absolute !important;
    right: 1.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 0.25rem !important;
}

.admin-perm-user-dropdown .Select-arrow-zone {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
}

/* ── Permissions-specific helpers ── */

.admin-perm-help-text {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-perm-help-inline {
    margin-top: 0.375rem;
    margin-bottom: 0;
    font-size: 0.72rem;
    color: #9ca3af;
}

.admin-perm-section-hint {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    order: 1;
}

.admin-perm-textarea {
    min-height: 5.625rem;
    margin-top: 0.375rem;
    resize: vertical;
    line-height: 1.6;
}

/* ── Button variants ── */

.admin-perm-btn--accent {
    background-color: #94ba1d !important;
    border-color: #94ba1d !important;
}

.admin-perm-btn--accent:hover:not(:disabled) {
    background-color: #7a9c17 !important;
    border-color: #7a9c17 !important;
}

.admin-perm-btn--outline {
    background-color: #ffffff !important;
    border: 1.5px solid #d1d5db !important;
    color: #374151 !important;
}

.admin-perm-btn--outline:hover:not(:disabled) {
    border-color: #94ba1d !important;
    color: #4f660d !important;
    background-color: #fcfdf7 !important;
}

/* Revoke (step 3): same outline treatment as Clear pages, reddish accent */
.admin-perm-btn--outline-revoke {
    border-color: #f87171 !important;
    color: #b91c1c !important;
}

.admin-perm-btn--outline-revoke:hover:not(:disabled) {
    border-color: #dc2626 !important;
    color: #991b1b !important;
    background-color: #fff1f2 !important;
}

.admin-unit-actions-row .admin-perm-btn--outline-revoke:disabled {
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    opacity: 1 !important;
}

.admin-perm-btn--danger {
    background-color: #ffffff !important;
    border-color: #fca5a5 !important;
    color: #c0392b !important;
}

.admin-perm-btn--danger:hover:not(:disabled) {
    background-color: #fef2f2 !important;
    border-color: #f87171 !important;
}

.admin-perm-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-perm-actions-row .settings-submit-button {
    flex: 1;
    min-width: 0;
}

.settings-asset-section--last .settings-asset-section-label {
    margin-bottom: 0.625rem;
}

/* ── Vertically center selected value and badge in dropdown control ── */

.settings-asset-dropdown .Select-control,
.settings-asset-dropdown .Select__control {
    display: flex !important;
    align-items: center !important;
}

.settings-asset-dropdown .Select-value,
.settings-asset-dropdown .Select__single-value {
    display: flex !important;
    align-items: center !important;
    line-height: normal !important;
    padding-left: 0.5rem !important;
    margin: 0 !important;
    max-width: 100%;
}

/* Multi-select: prevent chips from squishing—each chip sizes to its content */
.settings-asset-dropdown .Select--multi .Select-value,
.settings-asset-dropdown .Select--multi .Select__multi-value,
#admin-asset-picker .Select--multi .Select-value,
#admin-asset-picker .Select--multi .Select__multi-value,
#admin-unit-code-picker .Select--multi .Select-value,
#admin-unit-code-picker .Select--multi .Select__multi-value {
    max-width: none !important;
    min-width: fit-content !important;
    flex-shrink: 0 !important;
}

.settings-asset-dropdown .Select--multi .Select-value-label,
.settings-asset-dropdown .Select--multi .Select__multi-value__label,
#admin-asset-picker .Select--multi .Select-value-label,
#admin-asset-picker .Select--multi .Select__multi-value__label,
#admin-unit-code-picker .Select--multi .Select-value-label,
#admin-unit-code-picker .Select--multi .Select__multi-value__label {
    overflow: visible !important;
    white-space: nowrap !important;
    text-overflow: unset !important;
    line-height: 1.25 !important;
    padding: 4px 8px !important;
}

/* Allow multi-select control to grow when many chips are selected */
.settings-asset-dropdown .Select--multi .Select-control,
.settings-asset-dropdown .Select--multi .Select__control,
#admin-asset-picker .Select--multi .Select-control,
#admin-asset-picker .Select--multi .Select__control,
#admin-unit-code-picker .Select--multi .Select-control,
#admin-unit-code-picker .Select--multi .Select__control {
    min-height: 2.5rem !important;
    height: auto !important;
    max-height: none !important;
}

.settings-asset-dropdown .Select--multi .Select-multi-value-wrapper,
.settings-asset-dropdown .Select--multi [class*="multi-value"],
#admin-asset-picker .Select--multi .Select-multi-value-wrapper,
#admin-asset-picker .Select--multi [class*="multi-value"],
#admin-unit-code-picker .Select--multi .Select-multi-value-wrapper,
#admin-unit-code-picker .Select--multi [class*="multi-value"] {
    flex-wrap: wrap !important;
    gap: 6px 8px !important;
    align-items: center !important;
}

.settings-asset-dropdown .Select-input {
    align-self: center !important;
}

/* ── Step 3 pickers (Unit Type / Codes / Assets): keep chevron off the label text ──
   Mirrors .admin-perm-user-dropdown; .settings-dropdown alone only pads left. */

#admin-unit-type-dropdown .Select-control,
#admin-unit-type-dropdown .Select__control,
#admin-unit-code-picker .Select-control,
#admin-unit-code-picker .Select__control,
#admin-asset-picker .Select-control,
#admin-asset-picker .Select__control {
    position: relative !important;
}

#admin-unit-type-dropdown .Select__value-container {
    padding-right: 2.75rem !important;
    box-sizing: border-box !important;
}

#admin-unit-type-dropdown .Select-arrow-zone,
#admin-unit-code-picker .Select-arrow-zone,
#admin-asset-picker .Select-arrow-zone {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
}

#admin-unit-type-dropdown .Select__indicators {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: auto !important;
}

/* Multi-select: value area + react-select v5 value container (room for clear + chevron) */
#admin-unit-code-picker .Select--multi .Select-multi-value-wrapper,
#admin-asset-picker .Select--multi .Select-multi-value-wrapper,
#admin-unit-code-picker .Select__value-container,
#admin-asset-picker .Select__value-container {
    padding-right: 3rem !important;
    box-sizing: border-box !important;
}

#admin-unit-code-picker .Select--multi .Select__placeholder,
#admin-asset-picker .Select--multi .Select__placeholder {
    padding-right: 0 !important;
}

#admin-unit-code-picker .Select__indicators,
#admin-asset-picker .Select__indicators {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    align-self: center !important;
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .admin-mock-page-grid--bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .admin-mock-page-grid {
        grid-template-columns: 1fr;
    }

    .admin-mock-page-grid--bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .admin-perm-target-row {
        flex-direction: column;
    }

    .admin-perm-target-row .settings-submit-button {
        width: 100%;
    }

    .admin-perm-actions-row {
        flex-direction: column;
    }

    .admin-perm-actions-row .settings-submit-button {
        width: 100%;
    }

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

    .admin-runtime-card .admin-runtime-mode-radio {
        grid-template-columns: 1fr;
    }

    .admin-unit-actions-row {
        flex-direction: column;
        padding-top: 0.75rem;
    }

    .admin-unit-actions-row .settings-submit-button {
        width: 100%;
        min-width: 0;
    }

    .admin-unit-panel--grant .admin-grant-mode-radio {
        grid-template-columns: 1fr;
    }
}

/* ── Admin Permissions Card Overrides ── */

.admin-permissions-card {
    padding: 2rem !important;
}

.admin-permissions-card .settings-asset-form {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.admin-permissions-card .settings-asset-section {
    margin-bottom: 2rem;
}

.admin-permissions-card .settings-asset-section--last {
    margin-bottom: 1rem;
}

.admin-permissions-card .settings-asset-section-label::after {
    background: #f1f5f9 !important;
    height: 1px !important;
}

.admin-grant-mode-radio-input {
    flex-shrink: 0;
}
