/* HTMX Admin — Enterprise Design System */

:root {
    --admin-bg: #f4f7f9;
    --admin-surface: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #333333;
    /* a11y: raised from #777777 (4.48:1 on white, just under WCAG AA) to 4.8:1 */
    --admin-muted: #6b7280;
    /* a11y: raised from #999999 (2.9:1 on white, WCAG AA fail) to 4.9:1 */
    --admin-meta: #6b7280;
    /* a11y: darkened from #4a90e2 — white text on it was 3.3:1 (fails AA); #3572c4 gives 4.8:1 */
    --admin-primary: #3572c4;
    --admin-primary-hover: #2d63aa;
    --admin-primary-light: rgba(53, 114, 196, 0.12);
    --admin-primary-ring: rgba(53, 114, 196, 0.2);
    --admin-primary-border: rgba(53, 114, 196, 0.35);
    --admin-danger: #f44336;
    --admin-danger-hover: #d32f2f;
    --admin-success: #4caf50;
    --admin-warning: #d97706;
    /* UX-10: text-safe status colours (AA on white) and soft tints, used by the admin-fg-* / admin-bg-* helpers below */
    --admin-danger-text: #b91c1c;
    --admin-success-text: #15803d;
    --admin-warning-text: #b45309;
    --admin-danger-soft: #fef2f2;
    --admin-success-soft: #f0fdf4;
    --admin-warning-soft: #fffbeb;
    --admin-danger-border: #fecaca;
    --admin-success-border: #bbf7d0;
    --admin-warning-border: #fde68a;
    /* Corporate navigation palette: clean surfaces, navy type, blue accent. */
    --admin-sidebar-bg: #f4f7fb;
    --admin-sidebar-border: #dce4ef;
    --admin-sidebar-text: #263852;
    --admin-sidebar-muted: #64748b;
    --admin-sidebar-hover: #edf3fa;
    --admin-sidebar-active: #dceafe;
    --admin-sidebar-input-bg: #ffffff;
    --admin-sidebar-section: #41658f;
    --admin-sidebar-accent: #2563eb;
    --admin-sidebar-accent-strong: #1d4ed8;
    --admin-radius: 0.375rem;
    --admin-radius-sm: 0.25rem;
    --admin-shadow: 0 1px 2px rgba(44, 52, 75, 0.06), 0 1px 3px rgba(44, 52, 75, 0.04);
    --admin-shadow-md: 0 4px 6px -1px rgba(44, 52, 75, 0.06), 0 2px 4px -2px rgba(44, 52, 75, 0.04);
    --admin-sidebar-width: 18rem;
    --admin-sidebar-collapsed: 4rem;
    --admin-row-hover: #eef1f5;
    --admin-surface-muted: #f4f7f9;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--admin-primary);
    color: white;
    border-radius: var(--admin-radius-sm);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--admin-primary-hover);
    outline-offset: 2px;
}

/* In-page anchor (offsets for sticky header so anchor targets aren't hidden) */
.anchor {
    display: block;
    position: relative;
    top: -6rem; /* compensate for the sticky admin header */
    visibility: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hover-lift:hover, .nav-item:hover, .btn-hover:hover, .card-hover:hover, .admin-stat:hover {
        transform: none;
    }
}

body.admin-body {
    background-color: var(--admin-bg);
    color: var(--admin-text);
}

/* Layout */
#main-content {
    width: 100%;
    max-width: none;
    transition: opacity 0.2s ease;
}

#main-content.htmx-swapping {
    opacity: 0.35;
}

#page-header-meta {
    transition: opacity 0.2s ease;
}

#page-header-meta.htmx-swapping {
    opacity: 0.5;
}

/* Top route progress bar */
.admin-route-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--admin-primary), #7ab3ef);
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.admin-route-progress.is-active {
    opacity: 1;
    animation: adminRouteProgress 0.8s ease-in-out infinite;
}

@keyframes adminRouteProgress {
    0% { width: 0; margin-left: 0; }
    50% { width: 40%; margin-left: 30%; }
    100% { width: 0; margin-left: 100%; }
}

.admin-page-enter {
    animation: adminPageEnter 0.25s ease-out;
}

@keyframes adminPageEnter {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sidebar-transition {
    transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out;
}

/* Sidebar */
.sidebar-transition-inner {
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
}

.sidebar-collapsed {
    width: var(--admin-sidebar-collapsed);
}

.sidebar-collapsed .nav-text,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .nav-search-wrap,
.sidebar-collapsed .nav-section-chevron,
.sidebar-collapsed .nav-badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar-collapsed .nav-item svg {
    margin-right: 0;
}

/* Navigation groups (accordion) */
.nav-sections {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-group + .nav-group {
    margin-top: 0.25rem;
    border-top: 1px solid var(--admin-sidebar-border);
    padding-top: 0.375rem;
}

.nav-section-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.6rem;
    min-height: 2rem;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: var(--admin-radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-section-title {
    transition: color 0.15s ease;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

.nav-section-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--admin-sidebar-section);
    stroke-width: 2;
    transition: color 0.15s ease, transform 0.15s ease;
}

.nav-section-indicator {
    flex: 1;
}

.nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin: 0.125rem 0 0.375rem;
    padding-left: 0.55rem;
    border-left: 1px solid var(--admin-sidebar-border);
}

/* Items */
.nav-item {
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    border-radius: var(--admin-radius-sm);
}

.nav-item-accent {
    position: absolute;
    left: -0.55rem;
    top: 15%;
    bottom: 15%;
    width: 3px;
    border-radius: 2px;
    background: var(--admin-sidebar-accent);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.nav-item.active .nav-item-accent {
    opacity: 1;
}

.nav-item-dot {
    display: none;
}

/* Badges */
.nav-badge {
    margin-left: auto;
    min-width: 1.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    background: var(--admin-sidebar-hover);
    color: var(--admin-sidebar-text);
}

.nav-badge--danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Collapsed-mode tooltip */
.sidebar-collapsed .nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    padding: 0.35rem 0.6rem;
    border-radius: var(--admin-radius-sm);
    background: #1e2438;
    color: #ffffff;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: var(--admin-shadow-md);
    pointer-events: none;
}

/* Active page indicator in collapsed mode */
.sidebar-collapsed .nav-item.active .nav-item-dot {
    display: block;
    position: absolute;
    top: 50%;
    left: 0.375rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--admin-sidebar-accent);
    transform: translateY(-50%);
}

.nav-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 149, 168, 0.4) transparent;
}

.nav-container::-webkit-scrollbar {
    width: 4px;
}

.nav-container::-webkit-scrollbar-track {
    background: transparent;
}

.nav-container::-webkit-scrollbar-thumb {
    background: rgba(139, 149, 168, 0.4);
    border-radius: 2px;
}

/* Search */
.nav-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 0.4rem;
    color: var(--admin-sidebar-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-search-label-row kbd {
    padding: 0.1rem 0.3rem;
    border: 1px solid var(--admin-sidebar-border);
    border-radius: 0.2rem;
    color: var(--admin-sidebar-muted);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
}

.nav-search-box .nav-search-icon {
    position: absolute;
    left: 0.6rem;
    color: var(--admin-sidebar-muted);
    pointer-events: none;
}

.nav-search-box input {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 2.25rem 0.45rem 2rem;
    border-radius: var(--admin-radius-sm);
    background: var(--admin-sidebar-input-bg);
    border: 1px solid var(--admin-sidebar-border);
    color: var(--admin-sidebar-text);
    font-size: 0.8125rem;
}

.nav-search-clear {
    position: absolute;
    right: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--admin-sidebar-muted);
    font-size: 1.05rem;
    line-height: 1;
}

.nav-search-clear:hover,
.nav-search-clear:focus-visible {
    background: var(--admin-sidebar-hover);
    color: var(--admin-sidebar-text);
}

.nav-search-status,
.nav-search-empty {
    margin: 0.4rem 0 0;
    color: var(--admin-sidebar-muted);
    font-size: 0.6875rem;
}

.nav-search-empty {
    padding: 0.75rem 0.8rem;
    border: 1px dashed var(--admin-sidebar-border);
    border-radius: var(--admin-radius-sm);
    text-align: center;
}

.nav-search-box input::placeholder {
    color: var(--admin-sidebar-muted);
}

.nav-search-box input:focus {
    outline: none;
    border-color: var(--admin-sidebar-accent-strong);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.20);
}

/* Corporate sidebar shell */
.admin-sidebar {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fbfcfe 0%, var(--admin-sidebar-bg) 52%, #eef3f9 100%);
    color: var(--admin-sidebar-text);
    border-right: 1px solid var(--admin-sidebar-border);
    box-shadow: 8px 0 24px rgba(31, 52, 79, 0.08);
}

.admin-sidebar-header {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--admin-sidebar-border);
    background: rgba(255, 255, 255, 0.72);
}

.admin-sidebar-brand-title {
    color: #172b4d;
}

.admin-sidebar-brand-subtitle {
    color: var(--admin-sidebar-muted);
}

.admin-sidebar-btn {
    color: var(--admin-sidebar-muted);
    border-radius: var(--admin-radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-sidebar-btn:hover {
    background: var(--admin-sidebar-hover);
    color: var(--admin-sidebar-text);
}

.admin-sidebar .nav-item {
    color: var(--admin-sidebar-text);
    padding: 0.55rem 0.7rem;
    margin: 0 0.25rem;
}

.admin-sidebar .nav-item .nav-icon {
    color: var(--admin-sidebar-muted);
}

.admin-sidebar .nav-item:hover {
    background: var(--admin-sidebar-hover);
    transform: translateX(2px);
}

.admin-sidebar .nav-item.active {
    background: linear-gradient(90deg, var(--admin-sidebar-active) 0%, #edf5ff 100%);
    color: #173a68;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.admin-sidebar .nav-item.active .nav-icon {
    color: var(--admin-sidebar-accent);
}

.admin-sidebar .nav-section-title {
    color: var(--admin-sidebar-section);
}

.admin-sidebar .nav-section-chevron {
    color: var(--admin-sidebar-muted);
}

.admin-sidebar .nav-section-toggle:hover {
    background: var(--admin-sidebar-hover);
}

.admin-sidebar .nav-section-toggle:focus-visible,
.admin-sidebar .nav-search-clear:focus-visible,
.admin-sidebar .nav-search-box input:focus-visible {
    outline: 2px solid var(--admin-sidebar-accent);
    outline-offset: 2px;
}

.admin-sidebar .nav-section-toggle:hover .nav-section-title {
    color: var(--admin-sidebar-accent-strong);
}

.admin-sidebar .nav-section-toggle:hover .nav-section-icon,
.admin-sidebar .nav-section-toggle.is-open .nav-section-icon {
    color: var(--admin-sidebar-accent-strong);
}

.admin-sidebar .nav-section-toggle.is-open .nav-section-title {
    color: var(--admin-sidebar-accent-strong);
}

.admin-sidebar .admin-input {
    background: var(--admin-sidebar-input-bg);
    border-color: var(--admin-sidebar-border);
    color: var(--admin-sidebar-text);
}

.admin-sidebar .admin-input::placeholder {
    color: var(--admin-sidebar-muted);
}

.admin-sidebar .admin-input:focus {
    border-color: var(--admin-sidebar-accent-strong);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.20);
}

.admin-sidebar .nav-item:focus-visible {
    outline: 2px solid var(--admin-sidebar-accent);
    outline-offset: 2px;
}

.admin-sidebar .nav-container {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

.admin-sidebar-footer {
    flex: 0 0 auto;
    padding: 0.75rem;
    border-top: 1px solid var(--admin-sidebar-border);
    background: rgba(255, 255, 255, 0.62);
}

.admin-sidebar-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 2.65rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #244a73;
    border-radius: var(--admin-radius-sm);
    background: linear-gradient(135deg, #315f8f 0%, #244a73 52%, #1b3859 100%);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(27, 56, 89, 0.24);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-sidebar-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.24), transparent 42%);
    pointer-events: none;
}

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

.admin-sidebar-cta:hover {
    border-color: #163451;
    background: linear-gradient(135deg, #3e73a5 0%, #244a73 52%, #163451 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(27, 56, 89, 0.30);
}

.admin-sidebar-cta:focus-visible {
    outline: 2px solid var(--admin-sidebar-accent);
    outline-offset: 2px;
}

.admin-sidebar-cta-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    stroke-width: 2.5;
}

.sidebar-collapsed .admin-sidebar-footer {
    padding: 0.75rem 0.5rem;
}

.sidebar-collapsed .admin-sidebar-cta {
    padding: 0.7rem;
}

.sidebar-collapsed .nav-cta-label {
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-collapsed .admin-sidebar-cta:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 0.75rem);
    top: 50%;
    z-index: 60;
    padding: 0.35rem 0.6rem;
    border-radius: var(--admin-radius-sm);
    background: #172b4d;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transform: translateY(-50%);
    box-shadow: var(--admin-shadow-md);
    pointer-events: none;
}

.sidebar-collapsed .nav-group-items {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
}

.sidebar-collapsed .nav-item {
    margin-left: 0.35rem;
    margin-right: 0.35rem;
}

@media (max-width: 1024px) {
    .sidebar-mobile {
        transform: translateX(-100%);
    }
    .sidebar-mobile.open {
        transform: translateX(0);
    }
}

/* Cards */
.admin-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.admin-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-card-body {
    padding: 1.5rem;
}

/* Approved catalog role filters */
.catalog-role-page { display: grid; gap: 1.5rem; min-width: 0; }
.catalog-role-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem; padding: 0.375rem 0; }
.catalog-role-heading { display: flex; align-items: center; gap: 1rem; min-width: 0; flex: 1 1 24rem; }
.catalog-role-header-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 3.25rem; height: 3.25rem; border: 1px solid #d8e6fa; border-radius: 0.875rem; background: #edf4ff; color: #3572c4; }
.catalog-role-header-icon svg { width: 1.5rem; height: 1.5rem; }
.catalog-role-heading h2 { margin: 0; color: #14253e; font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.035em; }
.catalog-role-heading p { margin: 0.375rem 0 0; color: #64748b; font-size: 0.875rem; line-height: 1.6; }
.catalog-role-create { min-height: 2.75rem; border-radius: 0.5rem; padding: 0.625rem 1rem; box-shadow: 0 2px 4px rgba(53, 114, 196, 0.12); }
.catalog-role-create svg { width: 1.125rem; height: 1.125rem; }
.catalog-role-filters {
    padding: 1.25rem;
    border-color: #dfe7f1;
    border-radius: 0.875rem;
    box-shadow: 0 2px 8px rgba(30, 50, 80, 0.035);
}

.catalog-role-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.125rem;
}

.catalog-role-filter-heading-label { display: flex; align-items: center; gap: 0.5rem; }
.catalog-role-filter-heading-label > svg { width: 1.125rem; height: 1.125rem; color: #64748b; }

.catalog-role-filter-title {
    margin: 0;
    color: var(--admin-text);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
}

.catalog-role-filter-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.catalog-role-filter-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.625rem;
    border-radius: 0.375rem;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-role-filter-state {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--admin-primary-border);
    border-radius: 999px;
    background: var(--admin-primary-light);
    color: var(--admin-primary-hover);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.catalog-role-filter-fields {
    display: grid;
    grid-template-columns: minmax(18rem, 2fr) minmax(12rem, 1fr) minmax(10rem, 0.8fr) auto;
    gap: 1rem;
    align-items: flex-end;
}

.catalog-role-filter-field {
    display: block;
    flex: 1 1 12rem;
    min-width: 0;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1rem;
}

.catalog-role-filter-field .admin-input,
.catalog-role-filter-field .admin-select {
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    border-color: #d8e1ec;
    background-color: #fbfcfe;
    font-size: 0.875rem;
    font-weight: 400;
}

.catalog-role-filter-search { min-width: 0; }
.catalog-role-filter-status { min-width: 0; }
.catalog-role-search-control { display: block; position: relative; }
.catalog-role-search-control > svg { position: absolute; width: 1.125rem; height: 1.125rem; top: 50%; left: 0.875rem; transform: translateY(-50%); color: #64748b; pointer-events: none; }
.catalog-role-search-control .admin-input { padding-left: 2.5rem; }
.catalog-role-filter-field .admin-input:focus,
.catalog-role-filter-field .admin-select:focus { background-color: #fff; border-color: var(--admin-primary); }

.catalog-role-filter-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.375rem;
}

.catalog-role-filter-actions .admin-btn {
    min-height: 2.75rem;
    border-radius: 0.5rem;
}

.catalog-role-filter-actions .admin-btn-secondary { color: #295b9e; border-color: #b9cce5; background: #f3f7fd; font-weight: 600; }
.catalog-role-filter-actions .admin-btn-secondary:hover { background: #e8f0fb; border-color: #8eadd5; }
.catalog-role-applied { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #edf1f6; font-size: 0.75rem; }
.catalog-role-applied-label { color: #64748b; margin-right: 0.125rem; }
.catalog-role-applied-chip { max-width: 100%; overflow-wrap: anywhere; padding: 0.25rem 0.625rem; border: 1px solid #dce7f5; border-radius: 0.375rem; color: #335d94; background: #f3f7fd; }

@media (max-width: 960px) and (min-width: 641px) {
    .catalog-role-filter-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .catalog-role-filter-search,
    .catalog-role-filter-actions {
        grid-column: 1 / -1;
    }

    .catalog-role-filter-actions { justify-content: flex-end; }
}

@media (max-width: 640px) {
    .catalog-role-heading { flex-basis: 100%; gap: 0.75rem; }
    .catalog-role-heading h2 { font-size: 1.25rem; }
    .catalog-role-header-icon { flex-basis: 2.75rem; height: 2.75rem; }
    .catalog-role-create { width: 100%; }
    .catalog-role-filters {
        padding: 1rem;
    }

    .catalog-role-filter-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .catalog-role-filter-meta {
        justify-content: flex-start;
    }

    .catalog-role-filter-fields {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .catalog-role-filter-field { width: 100%; }

    .catalog-role-filter-actions .admin-btn {
        flex: 1;
    }
}

/* User detail presentation */
.user-detail-page {
    max-width: 100%;
}
.user-detail-identity {
    overflow: hidden;
    border-color: #d8e3f0;
    background: linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
}
.user-detail-identity-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}
.user-detail-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.875rem;
    background: linear-gradient(145deg, #3572c4, #244e8c);
    color: #fff;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2);
}
.user-detail-summary { min-width: 0; }
.user-detail-eyebrow {
    margin: 0 0 0.2rem;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.user-detail-name {
    margin: 0;
    overflow: hidden;
    color: #172b4d;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-detail-email {
    margin: 0.15rem 0 0;
    overflow: hidden;
    color: #64748b;
    font-size: 0.8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}
.user-detail-badge-dot {
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-right: 0.35rem;
    border-radius: 9999px;
    background: currentColor;
    vertical-align: 0.06em;
}
.user-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(5.5rem, 1fr));
    gap: 0.75rem 1.5rem;
    min-width: 13rem;
    padding-left: 1.5rem;
    border-left: 1px solid #dbe5f0;
}
.user-detail-meta dt {
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.user-detail-meta dd {
    margin: 0.2rem 0 0;
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}
.user-detail-card-title {
    display: block;
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 700;
}
.user-detail-card-subtitle {
    display: block;
    margin-top: 0.2rem;
    color: var(--admin-muted);
    font-size: 0.75rem;
    font-weight: 400;
}
.user-detail-page dl:not(.user-detail-meta) > div {
    min-width: 0;
    padding: 0.75rem 0.875rem;
    border: 1px solid #e7edf4;
    border-radius: 0.625rem;
    background: #f8fafc;
}
.user-detail-page dl:not(.user-detail-meta) dt {
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.user-detail-page dl:not(.user-detail-meta) dd {
    overflow-wrap: anywhere;
}
.user-detail-permission-row {
    padding: 0.75rem 0.875rem;
    border: 1px solid #e7edf4;
    border-radius: 0.625rem;
    background: #f8fafc;
}
.user-detail-tabs {
    flex-wrap: nowrap;
    scrollbar-width: none;
}
.user-detail-tabs::-webkit-scrollbar { display: none; }
.user-detail-tabs .admin-tab { flex: 0 0 auto; }

@media (max-width: 720px) {
    .user-detail-identity-body {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.875rem;
        padding: 1rem;
    }
    .user-detail-avatar { width: 3rem; height: 3rem; font-size: 1.125rem; }
    .user-detail-name { font-size: 1.0625rem; }
    .user-detail-meta {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        padding: 0.875rem 0 0;
        border-top: 1px solid #dbe5f0;
        border-left: 0;
    }
    .user-detail-card-subtitle { font-size: 0.6875rem; }
    .user-detail-page .admin-card-body { padding: 1rem; }
}

.admin-stat {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--admin-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-stat:hover {
    box-shadow: var(--admin-shadow-md);
    transform: translateY(-1px);
}

.admin-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-stat-value {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--admin-text);
    margin-top: 0.25rem;
    line-height: 1.2;
}

.admin-stat-meta {
    font-size: 0.75rem;
    color: var(--admin-meta);
    margin-top: 0.25rem;
}

.admin-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--admin-radius);
    flex-shrink: 0;
}

.admin-stat-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.admin-stat-icon--primary {
    background: var(--admin-primary-light);
    color: var(--admin-primary);
}

.admin-stat-icon--success {
    background: #e8f5e9;
    color: var(--admin-success);
}

.admin-stat-icon--warning {
    background: #fff8e1;
    color: #f9a825;
}

.admin-stat-icon--danger {
    background: #ffebee;
    color: var(--admin-danger);
}

.admin-stat-icon--neutral {
    background: var(--admin-row-hover);
    color: var(--admin-muted);
}

.admin-stat-icon.w-12,
.admin-stat-icon.h-12 {
    width: 3rem;
    height: 3rem;
}

.admin-stat-icon.w-14,
.admin-stat-icon.h-14 {
    width: 3.5rem;
    height: 3.5rem;
}

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    border-radius: var(--admin-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.admin-btn:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

.admin-btn-primary {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

.admin-btn-primary:hover {
    background: var(--admin-primary-hover);
    border-color: var(--admin-primary-hover);
}

.admin-btn-secondary {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.admin-btn-secondary:hover {
    background: var(--admin-surface-muted);
}

.admin-btn-danger {
    /* a11y: white on #f44336 was 3.9:1; #c62828 gives 5.6:1 */
    background: #c62828;
    color: white;
    border-color: #c62828;
}

.admin-btn-danger:hover {
    background: #b71c1c;
}

.admin-btn-ghost {
    background: transparent;
    color: var(--admin-muted);
    border-color: transparent;
}

.admin-btn-ghost:hover {
    background: var(--admin-row-hover);
    color: var(--admin-text);
}

.admin-btn:disabled,
.admin-btn[aria-disabled="true"] {
    opacity: 0.52;
    cursor: not-allowed;
    box-shadow: none;
}

.admin-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Workspace detail action toolbar */
.workspace-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: #f8fafc;
}

.workspace-action-label {
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.workspace-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.workspace-action-buttons .admin-btn {
    min-height: 2.25rem;
    box-shadow: 0 1px 2px rgba(31, 52, 79, 0.06);
}

.workspace-action-icon {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    stroke-width: 2;
}

.workspace-action-buttons .admin-btn-danger {
    box-shadow: 0 2px 5px rgba(198, 40, 40, 0.18);
}

@media (max-width: 640px) {
    .workspace-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-action-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .workspace-action-buttons .admin-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Form controls */
.admin-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--admin-text);
    margin-bottom: 0.375rem;
}

.admin-input,
.admin-select,
.admin-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px var(--admin-primary-ring);
}

.admin-input-prefix .admin-input {
    padding-left: 1.75rem;
}

.admin-multiselect {
    position: relative;
}

.admin-multiselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-multiselect-trigger:hover,
.admin-multiselect-trigger.is-open,
.admin-multiselect-trigger:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px var(--admin-primary-ring);
}

.admin-multiselect-trigger svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: #64748b;
    transition: transform 0.15s;
}

.admin-multiselect-trigger.is-open svg {
    transform: rotate(180deg);
}

.admin-multiselect-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.admin-multiselect-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-multiselect-panel li,
.admin-multiselect-panel label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--admin-text);
}

.admin-multiselect-panel label:hover,
.admin-multiselect-panel li:hover {
    background: #f8fafc;
}

.admin-multiselect-panel input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.admin-features-field {
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.75rem;
    background: #f8fafc;
}
.admin-features-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.admin-features-intro {
    margin: 0;
    color: var(--admin-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}
.admin-features-count {
    flex: 0 0 auto;
    padding: 0.25rem 0.55rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
}
.admin-features-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2.25rem;
    align-items: center;
    margin: 0.875rem 0;
    padding: 0.45rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    background: white;
}
.admin-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.3rem 0.5rem 0.3rem 0.65rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
}
.admin-feature-chip-remove {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1e40af;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.admin-feature-chip-remove:hover {
    background: rgba(30, 64, 175, 0.15);
}
.admin-features-empty {
    padding: 0.15rem 0.25rem;
    color: var(--admin-meta);
    font-size: 0.75rem;
}
.admin-feature-add-bar {
    margin-bottom: 0.75rem;
}
.admin-feature-add-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}
.admin-feature-add-row .admin-input {
    min-width: 0;
    flex: 1;
}
.admin-feature-add-row .admin-btn {
    flex: 0 0 auto;
}
.admin-features-alert {
    margin: 0.75rem 0;
}
.admin-feature-filter-row {
    margin-bottom: 0.5rem;
}
.admin-feature-checklist {
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
    border: 1px solid #dbe3ee;
    border-radius: 0.625rem;
    background: white;
    max-height: 16rem;
    overflow: auto;
}
.admin-feature-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #eef2f7;
    transition: background 0.12s ease;
}
.admin-feature-check-item:last-child {
    border-bottom: 0;
}
.admin-feature-check-item:hover {
    background: #f8fafc;
}
.admin-feature-check-item.is-selected {
    background: #eff6ff;
}
.admin-feature-check-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
    cursor: pointer;
    color: var(--admin-text);
    font-size: 0.8125rem;
    font-weight: 500;
}
.admin-feature-check-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-feature-check-label .admin-checkbox {
    margin-top: 0;
}
.admin-feature-delete {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: #94a3b8;
    border-radius: 0.4rem;
}
.admin-feature-delete svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke-width: 1.8;
}
.admin-feature-delete:hover {
    background: #fef2f2;
    color: #b91c1c;
}
.admin-feature-checklist-empty {
    padding: 0.9rem;
    color: var(--admin-meta);
    font-size: 0.75rem;
    text-align: center;
}

.admin-form-section {
    margin-bottom: 1.5rem;
}

.admin-form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.admin-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--admin-border);
    color: var(--admin-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.admin-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--admin-primary-ring);
}

.admin-permission-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    background: var(--admin-surface-muted);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.admin-permission-toggle:hover {
    border-color: var(--admin-border);
    background: #fff;
}

.admin-permission-toggle-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-permission-toggle-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--admin-muted);
    margin-top: 0.125rem;
}

.admin-edit-sidebar-column {
    align-self: stretch;
    min-height: 0;
    min-width: 0;
}

.admin-edit-sidebar {
    position: static;
    top: auto;
    z-index: 10;
}

.admin-form-layout {
    /* Grid columns defined via Tailwind on the template for reliable breakpoints */
    align-items: start;
}

@media (min-width: 768px) {
    .admin-edit-sidebar-column {
        align-self: stretch;
        position: relative;
    }

    .admin-edit-sidebar {
        position: sticky;
        top: 5.5rem;
    }
}

.admin-account-avatar {
    width: 3.5rem;
    height: 3.5rem;
    min-width: 3.5rem;
    max-width: 3.5rem;
    min-height: 3.5rem;
    max-height: 3.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-hover));
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.admin-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-section-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--admin-muted);
    text-decoration: none;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.admin-section-nav a:hover {
    color: var(--admin-primary);
    background: var(--admin-primary-light);
    border-color: var(--admin-primary-border);
}

/* User type card selector (create / edit user) */
.user-type-selector {
    position: relative;
}

.user-type-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .user-type-cards {
        grid-template-columns: 1fr;
    }
}

.user-type-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    width: 100%;
    padding: 1.25rem;
    text-align: left;
    border: 2px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-surface);
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.user-type-card:hover {
    border-color: var(--admin-primary-border);
    background: var(--admin-primary-light);
}

.user-type-card.is-selected {
    border-color: var(--admin-primary);
    background: var(--admin-primary-light);
    box-shadow: 0 0 0 3px var(--admin-primary-ring);
}

.user-type-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
}

.user-type-card-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    min-width: 0;
    flex: 1;
}

.user-type-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--admin-radius-sm);
    flex-shrink: 0;
}

.user-type-card-icon svg {
    width: 1.375rem;
    height: 1.375rem;
    max-width: 1.375rem;
    max-height: 1.375rem;
    display: block;
    flex-shrink: 0;
}

.user-type-card-icon--system {
    background: #f1f5f9;
    color: #475569;
}

.user-type-card-icon--keycloak {
    background: #dbeafe;
    color: #2563eb;
}

.user-type-card.is-selected .user-type-card-icon--system {
    background: #e2e8f0;
    color: #334155;
}

.user-type-card.is-selected .user-type-card-icon--keycloak {
    background: #bfdbfe;
    color: #1d4ed8;
}

.user-type-card-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--admin-text);
    line-height: 1.3;
}

.user-type-card-desc {
    display: block;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--admin-muted);
    line-height: 1.5;
}

.user-type-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #64748b;
}

.user-type-card.is-selected .user-type-card-badge {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

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

.auth-info-panel {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    border-radius: var(--admin-radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-muted);
    font-size: 0.875rem;
    color: var(--admin-muted);
    line-height: 1.5;
}

.auth-info-panel p {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.auth-info-panel__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    color: inherit;
}

.auth-info-panel__icon svg,
.auth-info-panel svg.admin-icon {
    width: 1.25rem;
    height: 1.25rem;
    max-width: 1.25rem;
    max-height: 1.25rem;
    display: block;
    flex-shrink: 0;
}

.auth-info-panel--keycloak {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

.auth-info-panel--system {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.hidden {
    display: none !important;
}

.pagination-desktop {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 639px) {
    .pagination-desktop { display: none; }
}

.password-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.password-field-row .admin-input {
    flex: 1;
}

.password-toggle-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.875rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    background: var(--admin-surface);
    color: var(--admin-muted);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.password-toggle-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    max-width: 1.25rem;
    max-height: 1.25rem;
    display: block;
    flex-shrink: 0;
}

/* Fixed-size inline icons (use when Tailwind w-* h-* is not on the SVG) */
.admin-icon {
    width: 1.25rem;
    height: 1.25rem;
    max-width: 1.25rem;
    max-height: 1.25rem;
    display: block;
    flex-shrink: 0;
}

.admin-icon--sm {
    width: 1rem;
    height: 1rem;
    max-width: 1rem;
    max-height: 1rem;
}

.admin-icon--md {
    width: 1.375rem;
    height: 1.375rem;
    max-width: 1.375rem;
    max-height: 1.375rem;
}

.password-toggle-btn:hover {
    background: var(--admin-surface-muted);
    color: var(--admin-text);
}

.user-create-preview-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
    min-height: 1.5rem;
}

.user-create-preview-email {
    font-size: 0.875rem;
    color: var(--admin-muted);
    min-height: 1.25rem;
}

@media (max-width: 640px) {
    .admin-form-actions-sticky {
        position: sticky;
        bottom: 0;
        background: var(--admin-surface);
        margin: 0 -1.5rem -1.5rem;
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--admin-border);
        box-shadow: 0 -4px 6px -1px rgba(15, 23, 42, 0.06);
        z-index: 10;
    }
}

/* Tables */
.users-table-card {
    border-color: #dbe3ee;
    box-shadow: 0 8px 24px rgba(31, 52, 79, 0.07);
}

.users-table thead {
    background: #f7f9fc;
}

.users-table .admin-table-th {
    color: #42536b;
    font-size: 0.6875rem;
    letter-spacing: 0.07em;
}

.users-table-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.users-table-row:hover {
    box-shadow: inset 3px 0 0 var(--admin-primary);
}

.users-profile-cell {
    min-width: 0;
}

.users-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.users-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    border: 1px solid #cfe0f3;
    border-radius: 0.65rem;
    background: linear-gradient(145deg, #eaf3ff, #d9e9fb);
    color: #24558b;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.users-profile-copy {
    min-width: 0;
}

.users-name,
.users-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-name {
    color: #1e3553;
    font-size: 0.875rem;
    font-weight: 650;
}

.users-email {
    margin-top: 0.15rem;
    color: var(--admin-muted);
    font-size: 0.75rem;
}

.users-status {
    gap: 0.35rem;
    white-space: nowrap;
}

.users-status::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: currentColor;
}

.users-actions-cell > div {
    gap: 0.35rem;
}

.users-bulk-content {
    gap: 0.9rem;
}

.users-bulk-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
}

.users-bulk-actions > button {
    margin-left: 0 !important;
}

@media (max-width: 640px) {
    .users-bulk-content {
        align-items: stretch;
        flex-direction: column;
    }

    .users-bulk-actions {
        width: 100%;
    }

    .users-bulk-actions > button {
        flex: 1 1 auto;
    }
}

@media (min-width: 1024px) {
    .users-profile-cell {
        min-width: 16rem;
    }
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--admin-surface-muted);
}

.admin-table-th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    /* a11y: --admin-muted on the tinted thead band failed AA at 12px uppercase; slate-600 passes */
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table-td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: var(--admin-text);
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: var(--admin-surface-muted);
}

/* Responsive table → card rows on mobile/tablet */
@media (max-width: 1023px) {
    .admin-table-responsive thead {
        display: none;
    }

    .admin-table-responsive tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        border: 1px solid var(--admin-border);
        border-radius: var(--admin-radius);
        background: var(--admin-surface);
        box-shadow: var(--admin-shadow);
        overflow: hidden;
    }

    .admin-table-responsive tbody tr:hover {
        background: var(--admin-surface);
    }

    .admin-table-responsive tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.625rem 1rem;
        border-bottom: 1px solid var(--admin-row-hover);
        text-align: right;
        white-space: normal;
    }

    .admin-table-responsive tbody td:last-child {
        border-bottom: none;
    }

    .admin-table-responsive tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.6875rem;
        color: var(--admin-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        text-align: left;
        flex-shrink: 0;
        max-width: 45%;
    }

    .admin-table-responsive tbody td.admin-table-actions {
        justify-content: flex-end;
        padding-top: 0.75rem;
    }

    .admin-table-responsive tbody td.admin-table-actions::before {
        display: none;
    }

    .admin-table-responsive tbody td.admin-table-checkbox {
        border-bottom: 1px solid var(--admin-border);
        background: var(--admin-surface-muted);
    }
}

/* Mobile cards */
.admin-mobile-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1rem;
    box-shadow: var(--admin-shadow);
}

.admin-mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-mobile-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-mobile-card-subtitle {
    font-size: 0.8125rem;
    color: var(--admin-muted);
    margin-top: 0.125rem;
}

.admin-mobile-dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.admin-mobile-dl dt {
    color: var(--admin-muted);
    font-weight: 500;
}

.admin-mobile-dl dd {
    color: var(--admin-text);
    text-align: right;
}

.admin-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--admin-border);
}

/* Badges */
.admin-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-active,
.admin-badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive,
.admin-badge-danger {
    background: #ffebee;
    color: #c62828;
}

.status-pending,
.admin-badge-warning {
    background: #fff8e1;
    /* a11y: amber-700 #f57f17 on the amber-50 tint was 2.5:1; amber-800 passes */
    color: #92400e;
}

.admin-badge-info {
    background: rgba(74, 144, 226, 0.15);
    color: #1565c0;
}

.admin-badge-neutral {
    /* a11y: muted on tinted pill failed AA; slate-600 passes */
    background: var(--admin-row-hover);
    color: #475569;
}

.admin-badge-low {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-badge-medium {
    background: #fff8e1;
    color: #f57f17;
}

.admin-badge-high {
    background: #ffe0b2;
    color: #e65100;
}

.admin-badge-critical,
.admin-badge-unknown {
    background: #ffebee;
    color: #c62828;
}

.admin-badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Empty state */
.admin-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--admin-muted);
}

/* OAuth user panel (v2) */
.kc-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.kc-v2-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.kc-v2-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-right: 0.25rem;
}

.kc-v2-meta {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--admin-muted);
    line-height: 1.4;
}

.kc-v2-banner {
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--admin-border);
}

.kc-v2-banner--error {
    background: #fef2f2;
    color: #991b1b;
}

.kc-v2-banner--warn {
    background: #fffbeb;
    color: #92400e;
}

.kc-v2-tabs {
    display: flex;
    gap: 0;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-muted);
}

.kc-v2-tab {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--admin-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.kc-v2-tab:hover {
    color: var(--admin-text);
}

.kc-v2-tab.is-active {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
    font-weight: 600;
}

.kc-v2-body {
    padding-top: 1.25rem;
}

.kc-v2-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .kc-v2-split {
        grid-template-columns: 1fr;
    }
}

.kc-v2-dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .kc-v2-dl {
        grid-template-columns: 1fr;
    }
}

.kc-v2-dl dt {
    font-weight: 500;
    color: var(--admin-muted);
    font-size: 0.8125rem;
}

.kc-v2-dl dd {
    margin-top: 0.25rem;
    color: var(--admin-text);
    word-break: break-word;
}

.kc-v2-dl-wide {
    grid-column: 1 / -1;
}

.kc-v2-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
}

.kc-v2-link-btn {
    margin-left: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--admin-primary);
    cursor: pointer;
    text-decoration: underline;
}

.kc-v2-link-btn:hover {
    color: var(--admin-primary-hover);
}

.kc-v2-aside {
    padding: 1rem;
    background: var(--admin-surface-muted);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.kc-v2-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kc-v2-action-list form {
    display: block;
}

.kc-v2-action-btn {
    width: 100%;
    justify-content: center;
}

.kc-v2-block {
    margin-top: 1.5rem;
}

.kc-v2-block:first-child {
    margin-top: 0;
}

.kc-v2-block-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 0.75rem;
}

.kc-v2-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.kc-v2-block-head .kc-v2-block-title {
    margin-bottom: 0;
}

.kc-v2-muted {
    font-size: 0.8125rem;
    color: var(--admin-muted);
}

.kc-v2-link {
    font-size: 0.8125rem;
    color: var(--admin-primary);
    text-decoration: none;
}

.kc-v2-link:hover {
    text-decoration: underline;
}

.kc-v2-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kc-v2-list li {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.8125rem;
}

.kc-v2-list li:last-child {
    border-bottom: none;
}

.kc-v2-list code {
    font-size: 0.8125rem;
    color: var(--admin-text);
}

.kc-v2-role-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.8125rem;
}

.kc-v2-role-row:last-child {
    border-bottom: none;
}

.kc-v2-role-client {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--admin-muted);
    min-width: 8rem;
}

.kc-v2-loading .admin-card-body {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--admin-muted);
}

.kc-v2.htmx-request {
    opacity: 0.65;
    pointer-events: none;
}

/* Required-actions success toast: visible ~7s, then fade/collapse away */
@keyframes kc-ra-auto-hide {
    0%, 93% {
        opacity: 1;
        max-height: 6rem;
    }
    100% {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
        border-width: 0;
        overflow: hidden;
    }
}

.kc-ra-auto-hide {
    animation: kc-ra-auto-hide 7.5s ease forwards;
}

/* Legacy entity panel (reseller/client) */
.kc-panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.kc-panel-header-main {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.kc-panel-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.kc-panel-subtitle {
    font-size: 0.8125rem;
    color: var(--admin-muted);
    margin-top: 0.25rem;
}

.kc-panel-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.kc-panel-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kc-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.45rem;
}

.kc-status-dot--ok { background: #22c55e; }
.kc-status-dot--err { background: #ef4444; }
.kc-status-dot--warn { background: #f59e0b; }

/* ===== OAuth Management Dashboard ===== */
.kc-mgmt-toolbar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.kc-mgmt-health .kc-status-dot {
    margin-top: 0;
}
.kc-mgmt-progress {
    width: 100%;
    height: 0.4rem;
    background: var(--admin-surface-muted, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
}
.kc-mgmt-progress--lg {
    height: 0.55rem;
}
.kc-mgmt-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--admin-primary, #4a90e2);
    transition: width 0.35s ease;
}
.kc-mgmt-progress-bar.is-good { background: var(--admin-success, #16a34a); }
.kc-mgmt-progress-bar.is-warn { background: var(--admin-warning, #d97706); }
.kc-mgmt-progress-bar.is-bad { background: var(--admin-danger, #dc2626); }
.kc-mgmt-progress-bar.is-info { background: var(--admin-primary, #4a90e2); }
.kc-mgmt-progress--indeterminate .kc-mgmt-progress-bar {
    animation: kc-mgmt-indeterminate 1.2s ease-in-out infinite;
}
@keyframes kc-mgmt-indeterminate {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}
.kc-mgmt-progress-card--running {
    border-color: #bfdbfe;
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.08);
}
.kc-mgmt-progress-card--error {
    border-color: #fecaca;
}
.kc-mgmt-progress-card--completed {
    border-color: #bbf7d0;
}
.kc-mgmt-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .kc-mgmt-action-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.kc-mgmt-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
}
.kc-mgmt-action-bar-wrap {
    height: 0.35rem;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.kc-mgmt-action-bar {
    height: 100%;
    background: var(--admin-primary, #4a90e2);
    border-radius: 999px;
}
.kc-mgmt-queue {
    list-style: none;
    margin: 0;
    padding: 0;
}
.kc-mgmt-queue li + li {
    border-top: 1px solid var(--admin-border, #e2e8f0);
}
.kc-mgmt-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}
.kc-mgmt-queue-item:hover {
    background: var(--admin-row-hover, #f8fafc);
}

.kc-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .kc-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.kc-stat {
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    font-size: 0.875rem;
}

.kc-stat-label {
    font-size: 0.75rem;
    color: var(--admin-muted);
    font-weight: 500;
}

.kc-stat-value {
    margin-top: 0.25rem;
    font-weight: 600;
}

.kc-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 960px) {
    .kc-main-grid { grid-template-columns: 1fr; }
}

.kc-actions-card,
.kc-subsection {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1rem;
}

.kc-action-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--admin-border);
}

.kc-action-section:last-child { border-bottom: none; }

.kc-action-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--admin-muted);
    margin-bottom: 0.5rem;
}

.kc-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kc-action-buttons form { display: inline; }

.kc-subsection-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.kc-empty {
    font-size: 0.8125rem;
    color: var(--admin-muted);
    font-style: italic;
}

.kc-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.kc-tag {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: var(--admin-primary-light);
    border-radius: var(--admin-radius-sm);
}

.kc-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--admin-radius);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.kc-alert--error { background: #fef2f2; color: #991b1b; }
.kc-alert--warn { background: #fffbeb; color: #92400e; }

.admin-empty-state-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--admin-border);
}

.admin-empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 0.25rem;
}

.admin-empty-state-text {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Breadcrumbs */
.admin-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--admin-muted);
}

.admin-breadcrumb a {
    color: var(--admin-muted);
    text-decoration: none;
}

.admin-breadcrumb a:hover {
    color: var(--admin-primary);
}

.admin-breadcrumb-sep {
    color: var(--admin-border);
    user-select: none;
}

.admin-breadcrumb-current {
    color: var(--admin-text);
    font-weight: 500;
}

/* Bulk actions bar */
#bulk-actions-bar {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#bulk-actions-bar:not(.hidden) {
    background: var(--admin-primary-light);
    border: 1px solid var(--admin-primary-border);
    border-radius: var(--admin-radius);
    padding: 0.875rem 1rem;
}

@media (max-width: 640px) {
    #bulk-actions-bar.bulk-bar-active {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 40;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -4px 6px -1px rgba(15, 23, 42, 0.1);
    }
}

/* HTMX */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
    pointer-events: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

.htmx-request .refresh-idle-label {
    display: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.loading-spinner {
    border: 2px solid #e2e8f0;
    border-top: 2px solid var(--admin-primary);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

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

/* Legacy compat */
.table-row-hover:hover { background-color: var(--admin-surface-muted); }
.search-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px var(--admin-primary-ring);
}
.btn-hover { transition: all 0.2s ease; }
.card-hover { transition: all 0.2s ease; }
.form-error {
    border-color: var(--admin-danger) !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.12);
}
.form-success {
    border-color: var(--admin-success);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}
.notification-success { background: #e8f5e9; border: 1px solid var(--admin-success); color: #1b5e20; }
.notification-error { background: #ffebee; border: 1px solid var(--admin-danger); color: #c62828; font-weight: 500; }
.notification-warning { background: #fff8e1; border: 1px solid #f9a825; color: #f57f17; }
.notification-info { background: rgba(74, 144, 226, 0.12); border: 1px solid var(--admin-primary); color: #1565c0; }
.admin-server-messages { display: none !important; }
.admin-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    width: min(26rem, calc(100vw - 2rem));
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}
.admin-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 1rem;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateX(1rem);
    transition: opacity 200ms ease, transform 200ms ease;
    pointer-events: auto;
}
.admin-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.admin-toast--success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.admin-toast--error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.admin-toast--warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.admin-toast--info { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.admin-toast__icon {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: currentColor;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
}
.admin-toast__message {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.admin-toast__close {
    flex: 0 0 auto;
    margin: -0.25rem -0.25rem 0 0;
    padding: 0.125rem 0.25rem;
    border-radius: 0.375rem;
    color: currentColor;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.65;
}
.admin-toast__close:hover,
.admin-toast__close:focus-visible { opacity: 1; background: rgba(15, 23, 42, 0.08); }
.pagination-active { background: var(--admin-primary); color: white; }

@media (max-width: 768px) {
    .mobile-hidden { display: none; }
    .mobile-full { width: 100%; }
    .mobile-stack { flex-direction: column; gap: 0.5rem; }
    .admin-toast-container { top: 0.75rem; right: 0.75rem; width: calc(100vw - 1.5rem); }
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: var(--admin-row-hover); }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--admin-border); border-radius: 3px; }

.focus-visible:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

/* UX-06/08/14: focus targets of the shared modal, tabs and boosted-navigation helpers.
   Containers that receive programmatic focus (dialog root, #main-content) show no
   ring; every interactive element inside keeps a visible one. */
[role="dialog"]:focus,
[data-modal]:focus,
#main-content:focus {
    outline: none;
}
[role="dialog"] a:focus-visible,
[role="dialog"] button:focus-visible,
[role="dialog"] summary:focus-visible,
[role="dialog"] [tabindex]:not([tabindex="-1"]):focus-visible,
[data-modal] a:focus-visible,
[data-modal] button:focus-visible,
[role="tab"]:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}
[role="tab"]:focus-visible {
    outline-offset: -2px;
}

/* Auth pages */
.admin-auth-bg {
    background: linear-gradient(135deg, #172b4d 0%, #355b8b 40%, var(--admin-bg) 100%);
    min-height: 100vh;
}

@media print {
    .no-print { display: none !important; }
    .print-break { page-break-before: always; }
}

/* Client and reseller creation workspace */
.admin-creation-page {
    max-width: 86rem;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}
.admin-creation-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin: 0.5rem 0 1.75rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    background:
        radial-gradient(60rem 12rem at 85% -40%, rgba(74, 144, 226, 0.14), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}
.admin-creation-header::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--admin-primary), #7ab3ef 55%, transparent);
}
.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.3rem 0.65rem 0.3rem 0.45rem;
    border-radius: 999px;
    color: var(--admin-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}
.admin-back-link:hover {
    color: var(--admin-primary);
    background: var(--admin-primary-light);
}
.admin-back-link:hover { color: var(--admin-primary); }
.admin-back-link svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}
.admin-creation-title-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}
.admin-creation-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 0.75rem;
}
.admin-creation-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 1.8;
}
.admin-creation-icon--client {
    color: #2563eb;
    background: #dbeafe;
}
.admin-creation-icon--reseller {
    color: #7c3aed;
    background: #ede9fe;
}
.admin-creation-icon--plan {
    color: #0f766e;
    background: #ccfbf1;
}
.admin-creation-icon--service {
    color: #c2410c;
    background: #ffedd5;
}
.admin-eyebrow {
    margin: 0 0 0.15rem;
    color: var(--admin-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.admin-creation-title {
    margin: 0;
    color: var(--admin-text);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
}
.admin-creation-subtitle {
    max-width: 43rem;
    margin: 0.75rem 0 0;
    color: var(--admin-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}
.admin-creation-progress {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
    white-space: nowrap;
}
.admin-creation-progress span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    color: var(--admin-muted);
    font-size: 0.75rem;
    font-weight: 600;
}
.admin-creation-progress span.is-active {
    color: #1d4ed8;
    background: #dbeafe;
}
.admin-creation-progress span.is-done {
    color: var(--admin-success-text);
}
.admin-creation-progress b {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: currentColor;
    color: white;
    font-size: 0.625rem;
}
.admin-form-alert {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    border: 1px solid;
    border-radius: 0.625rem;
    font-size: 0.875rem;
}
.admin-form-alert svg {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 auto;
    margin-top: 0.05rem;
    stroke-width: 2;
}
.admin-form-alert--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}
.admin-form-alert--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}
.admin-creation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18.5rem;
    gap: 1.5rem;
    align-items: start;
}
.admin-creation-main {
    min-width: 0;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow-md);
    overflow: hidden;
}
.admin-creation-main form { padding: 0 1.5rem; }
/* First row inside the card is the sticky nav — give it card-top spacing internally */
.admin-creation-main .admin-form-nav {
    margin: 0 -1.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
}
.admin-creation-main .admin-creation-actions { margin-bottom: 0; }
.admin-form-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--admin-border);
}
.admin-form-section:first-child { padding-top: 1.25rem; }
.admin-form-section-heading {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.125rem;
}
.admin-step-number {
    display: inline-flex;
    width: 1.75rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.admin-form-section-title {
    margin: 0;
    color: var(--admin-text);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.admin-form-section-description {
    margin: 0.2rem 0 0;
    color: var(--admin-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}
.admin-choice-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .admin-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-choice-card {
    position: relative;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    min-height: 6rem;
    padding: 0.875rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.625rem;
    background: var(--admin-surface);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.admin-choice-card:hover {
    border-color: var(--admin-primary-border);
    background: #f8fbff;
}
.admin-choice-card:has(input:checked) {
    border-color: var(--admin-primary);
    background: var(--admin-primary-light);
    box-shadow: 0 0 0 3px var(--admin-primary-ring);
}
.admin-choice-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.admin-choice-icon {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 0.5rem;
    color: #475569;
    background: #f1f5f9;
}
.admin-choice-card:has(input:checked) .admin-choice-icon {
    color: #2563eb;
    background: #dbeafe;
}
/* Wizard variant: tighter padding/height so plan cards stay scannable. */
.admin-choice-card--compact {
    min-height: 0;
    padding: 0.75rem;
}
.admin-choice-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    stroke-width: 1.8;
}
.admin-choice-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.admin-choice-card-title {
    color: var(--admin-text);
    font-size: 0.875rem;
    font-weight: 700;
}
.admin-choice-card-desc {
    color: var(--admin-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}
.admin-selection-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.625rem;
    background: #f8fafc;
}
.admin-selection-panel[hidden] { display: none !important; }
.admin-selection-panel-intro {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.875rem;
}
.admin-selection-panel-label {
    color: var(--admin-text);
    font-size: 0.8125rem;
    font-weight: 700;
}
.admin-selection-panel-help,
.admin-field-hint {
    display: block;
    margin-top: 0.3rem;
    color: var(--admin-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}
.admin-selection-panel-help { margin-top: 0; }
.admin-field-error {
    display: block;
    margin-top: 0.35rem;
    color: #dc2626;
    font-size: 0.75rem;
    line-height: 1.35;
}
.admin-optional-label {
    margin-left: 0.25rem;
    color: var(--admin-meta);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
}
.admin-linked-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.625rem;
    background: #f8fafc;
}
.admin-linked-user-avatar {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.8125rem;
    font-weight: 800;
}
.admin-linked-user div:last-of-type {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}
.admin-linked-user-label {
    color: var(--admin-meta);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.admin-linked-user strong { color: var(--admin-text); font-size: 0.875rem; }
.admin-linked-user span:last-child { color: var(--admin-muted); font-size: 0.75rem; }
.admin-status-card {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    padding: 0.875rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.625rem;
    background: #f8fafc;
    cursor: pointer;
}
.admin-status-card input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--admin-primary);
}
.admin-status-card-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px #dcfce7;
}
.admin-status-card span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}
.admin-status-card strong { color: var(--admin-text); font-size: 0.8125rem; }
.admin-status-card small { color: var(--admin-muted); font-size: 0.75rem; }
.admin-capability-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.625rem;
}
@media (min-width: 640px) {
    .admin-capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.admin-toggle-card {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    min-height: 5rem;
    padding: 0.75rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.625rem;
    cursor: pointer;
}
.admin-toggle-card:hover { background: #f8fafc; }
.admin-toggle-card input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    accent-color: var(--admin-primary);
}
.admin-toggle-card span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.admin-toggle-card strong { color: var(--admin-text); font-size: 0.75rem; line-height: 1.3; }
.admin-toggle-card small { color: var(--admin-muted); font-size: 0.6875rem; line-height: 1.35; }
/* Selected-state feedback for choice cards (has(:checked) with :has fallback class toggling not needed — pure CSS) */
.admin-status-card:has(input:checked),
.admin-toggle-card:has(input:checked) {
    border-color: var(--admin-primary-border);
    background: var(--admin-primary-light);
}
.admin-status-card:has(input:checked) .admin-status-card-indicator {
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.18);
}
.admin-status-card:has(input:not(:checked)) .admin-status-card-indicator {
    background: #cbd5e1;
    box-shadow: 0 0 0 4px #eef2f7;
}
.admin-toggle-card:has(input:checked) strong { color: #1d4ed8; }

/* Plan form: coin-amount group dims until the coin plan toggle is on */
.admin-plan-coin-group {
    transition: opacity 0.15s ease;
}
.admin-plan-coin-group.is-dimmed {
    opacity: 0.55;
}

/* Role option tiles inside the entitlement roles widget */
.admin-role-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    background: #ffffff;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.admin-role-option:hover {
    background: #f8fafc;
}
.admin-role-option:has(input:checked) {
    border-color: var(--admin-primary-border);
    background: var(--admin-primary-light);
    box-shadow: inset 0 0 0 1px var(--admin-primary-border);
}
.admin-role-option:has(input:checked) .admin-role-option-name {
    color: #1d4ed8;
    font-weight: 600;
}
.admin-role-option-name {
    color: var(--admin-text);
    font-size: 0.8125rem;
}

/* Per-platform selected counter in entitlement widget header */
.admin-role-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
}
.admin-role-count[data-count="0"] {
    background: #f1f5f9;
    color: var(--admin-muted);
}

/* Keep plan summary beside the form while scrolling */
.admin-sidebar-sticky {
    position: sticky;
    top: 5.5rem;
}

/* Compact key/value list used in sidebar summary cards */
.admin-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--admin-muted);
}
.admin-summary-list dt { font-weight: 500; }
.admin-summary-list dd {
    margin: 0;
    max-width: 60%;
    text-align: right;
    color: var(--admin-text);
}

/* ===== Plan form: wizard stepper (create) & tab bar (edit) ===== */
.admin-form-nav {
    margin: 0 -1.5rem 1.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
}
/* anchored/panel scroll lands clear of the fixed admin header */
.admin-form-nav ~ .admin-step-panel { scroll-margin-top: 5.5rem; }

/* Wizard stepper */
.admin-wizard-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.admin-wizard-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 1 12rem;
    min-width: 8rem;
}
.admin-wizard-count {
    flex: 0 0 auto;
    color: var(--admin-muted);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.admin-wizard-count b { color: var(--admin-primary-hover); font-weight: 800; }
.admin-wizard-progress {
    flex: 1 1 auto;
    height: 4px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
}
.admin-wizard-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--admin-primary), #7ab3ef);
    transition: width 0.25s ease;
}
.admin-wizard-stepper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.admin-wizard-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: var(--admin-surface);
    color: var(--admin-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.admin-wizard-step:active { transform: scale(0.98); }
.admin-wizard-step b {
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.625rem;
    font-weight: 800;
}
.admin-wizard-step:hover { border-color: var(--admin-primary-border); color: var(--admin-text); }
.admin-wizard-step.is-active {
    border-color: var(--admin-primary-border);
    background: var(--admin-primary-light);
    color: #1d4ed8;
}
.admin-wizard-step.is-active b { background: var(--admin-primary); color: #fff; }
.admin-wizard-step.is-done { color: #15803d; border-color: #bbf7d0; }
.admin-wizard-step.is-done b { background: #22c55e; color: #fff; }
.admin-wizard-step.is-done b::before { content: ""; }
.admin-wizard-step.has-error { border-color: #fecaca; color: #b91c1c; }
.admin-wizard-step.has-error b { background: #ef4444; color: #fff; }

/* Tabs (edit mode) */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
}
.admin-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--admin-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.admin-tab:hover { color: var(--admin-text); }
.admin-tab.is-active {
    color: var(--admin-primary-hover);
    border-bottom-color: var(--admin-primary);
}
.admin-tab-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #ef4444;
}

/* Panels */
.admin-step-panel { animation: adminPanelIn 0.18s ease; }
@keyframes adminPanelIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

/* Elevated panel treatment for each step section */
.admin-step-panel { padding-top: 1.25rem; }
.admin-step-panel .admin-form-section {
    margin: 0 0 0.25rem;
    padding: 1.6rem 1.75rem 1.75rem;
    border: 1px solid #e8eef5;
    border-radius: 0.875rem;
    background: linear-gradient(180deg, #fdfefe 0%, #ffffff 100%);
    box-shadow: 0 1px 2px rgba(44, 52, 75, 0.04);
}
.admin-step-panel .admin-form-section-heading {
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--admin-border);
    margin-bottom: 1.35rem;
}

/* Softer, larger inputs inside plan form */
.plan-form-panels .admin-input,
.plan-form-panels .admin-select,
.plan-form-panels .admin-textarea {
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
}
.plan-form-panels .admin-label {
    margin-bottom: 0.45rem;
    font-weight: 600;
}
.plan-form-panels .admin-input:hover,
.plan-form-panels .admin-select:hover,
.plan-form-panels .admin-textarea:hover {
    border-color: var(--admin-primary-border);
}

/* In tab mode the section separator/heading step numbers are redundant */
.admin-tabs ~ .admin-step-panel .admin-form-section { border-bottom: 0; }
.admin-permissions-panel {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--admin-border);
}
.admin-permissions-panel ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.5rem;
    margin: 0.75rem 0 0;
}
.admin-permissions-panel li { list-style: none; }
.admin-permissions-panel label {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    color: var(--admin-text);
    font-size: 0.8125rem;
}
.admin-disclosure {
    margin-top: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.625rem;
    background: var(--admin-surface);
}
.admin-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    cursor: pointer;
    list-style: none;
}
.admin-disclosure summary::-webkit-details-marker { display: none; }
.admin-disclosure summary > svg {
    width: 1rem;
    height: 1rem;
    color: var(--admin-muted);
    transition: transform 0.15s ease;
}
.admin-disclosure[open] summary > svg { transform: rotate(180deg); }
.admin-disclosure-summary {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.admin-disclosure-summary span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.admin-disclosure-summary strong { color: var(--admin-text); font-size: 0.875rem; }
.admin-disclosure-summary small { color: var(--admin-muted); font-size: 0.75rem; }
.admin-disclosure-content {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--admin-border);
}
.admin-creation-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem -1.5rem 0;
    padding: 1.1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
    background: linear-gradient(180deg, #fbfcfe 0%, #f7fafc 100%);
    border-radius: 0 0 0.875rem 0.875rem;
}
.admin-btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.admin-btn-with-icon svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}
.admin-creation-sidebar {
    position: sticky;
    top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-sidebar-card {
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}
.admin-sidebar-card > h2 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--admin-text);
}
.admin-sidebar-card--soft { background: #f8fafc; box-shadow: none; }
.admin-sidebar-card-heading {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}
.admin-sidebar-card-icon {
    display: inline-flex;
    width: 1.8rem;
    height: 1.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    color: #2563eb;
    background: #dbeafe;
}
.admin-sidebar-card-icon svg { width: 1rem; height: 1rem; stroke-width: 2; }
.admin-sidebar-card h2 {
    margin: 0;
    color: var(--admin-text);
    font-size: 0.8125rem;
    font-weight: 700;
}
.admin-sidebar-card-heading p {
    margin: 0.15rem 0 0;
    color: var(--admin-muted);
    font-size: 0.7rem;
    line-height: 1.4;
}
.admin-sidebar-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1rem 0 0;
    padding: 0;
}
.admin-sidebar-checklist li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    list-style: none;
}
.admin-sidebar-checklist > li > span {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #2563eb;
    background: #dbeafe;
    font-size: 0.625rem;
    font-weight: 800;
}
.admin-sidebar-checklist div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.admin-sidebar-checklist strong { color: var(--admin-text); font-size: 0.75rem; }
.admin-sidebar-checklist small { color: var(--admin-muted); font-size: 0.6875rem; line-height: 1.35; }
.admin-sidebar-notes {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0.7rem 0 0;
    padding: 0;
}
.admin-sidebar-notes li {
    position: relative;
    padding-left: 0.9rem;
    color: var(--admin-muted);
    font-size: 0.7rem;
    line-height: 1.45;
    list-style: none;
}
.admin-sidebar-notes li::before {
    position: absolute;
    top: 0.38rem;
    left: 0;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    background: var(--admin-primary);
    content: "";
}
@media (max-width: 1024px) {
    .admin-creation-layout { grid-template-columns: minmax(0, 1fr); }
    .admin-creation-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .admin-creation-page { padding: 0 0.75rem 2rem; }
    .admin-creation-header { flex-direction: column; gap: 1rem; margin-top: 0; padding: 1.1rem 1.15rem; }
    .admin-creation-progress { width: 100%; overflow-x: auto; }
    .admin-creation-main form { padding: 0 1rem; }
    .admin-creation-main .admin-form-nav { margin: 0 -1rem; padding: 0.6rem 1rem; }
    .admin-step-panel { padding-top: 1rem; }
    .admin-step-panel .admin-form-section { padding: 1.1rem 1rem 1.2rem; }
    .admin-creation-sidebar { grid-template-columns: minmax(0, 1fr); }
    .admin-creation-actions { position: sticky; bottom: 0; z-index: 4; margin: 1rem -1rem 0; padding: 0.875rem 1rem; border-top: 1px solid var(--admin-border); background: rgba(255, 255, 255, 0.96); border-radius: 0; }
    .admin-creation-actions .admin-btn { flex: 1; justify-content: center; }
    .admin-features-toolbar,
    .admin-feature-add-row { flex-direction: column; }
    .admin-feature-add-row .admin-btn { width: 100%; }
    .admin-form-nav { margin: 0 -1rem 1rem; padding: 0.6rem 1rem; }
    .admin-wizard-wrap { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .admin-wizard-stepper { overflow-x: auto; padding-bottom: 0.25rem; }
}

/* Configuration Center domain navigator */
.cc-domain-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.75rem;
    background: #f8fafc;
    text-align: left;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.cc-domain-card:hover {
    border-color: #94a3b8;
    background: #fff;
}
.cc-domain-card:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}
.cc-domain-card-active {
    border-color: var(--admin-primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.25);
}
.cc-domain-card-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--admin-text);
}
.cc-domain-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
}
.cc-domain-card-active .cc-domain-card-count {
    background: rgba(74, 144, 226, 0.15);
    color: #1565c0;
}
.cc-domain-card-meta {
    font-size: 0.75rem;
    color: var(--admin-muted);
    line-height: 1.3;
}

/* Configuration Center form modal */
.cc-form-modal-frame {
    min-height: 0;
}
.cc-form-modal-shell {
    width: 100%;
    max-width: 44rem;
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}
@media (min-width: 640px) {
    .cc-form-modal-shell {
        border-radius: 1rem;
        max-height: min(90vh, 880px);
    }
}
.cc-form-modal-body-host,
#config-form-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: inherit;
    overflow: hidden;
}
.cc-form-modal-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(92vh, 900px);
    overflow: hidden;
}
@media (min-width: 640px) {
    .cc-form-modal-inner {
        max-height: min(90vh, 880px);
    }
}
.cc-form-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    flex-shrink: 0;
}
.cc-form-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    flex-shrink: 0;
}
.cc-form-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}
.cc-form-modal-body {
    flex: 1 1 0%;
    min-height: 0;
    /* Keep fields reachable even if flex height chaining fails in some browsers */
    max-height: calc(min(92vh, 900px) - 11.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.5rem 1.25rem;
    display: block;
    scrollbar-gutter: stable;
}
@media (min-width: 640px) {
    .cc-form-modal-body {
        max-height: calc(min(90vh, 880px) - 11.5rem);
    }
}
.cc-form-modal-body > .cc-form-section,
.cc-form-modal-body > form > .cc-form-section {
    margin-bottom: 1.25rem;
}
.cc-form-modal-body > .cc-form-section:last-child {
    margin-bottom: 0;
}
.cc-form-modal::-webkit-scrollbar {
    width: 0.5rem;
}
.cc-form-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.cc-form-modal::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.cc-form-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.cc-form-modal-banner {
    flex-shrink: 0;
    margin: 1rem 1.5rem 0;
}

/* Configuration Center table details cell */
.cc-details-cell {
    min-width: 0;
    max-width: 18rem;
}
.cc-details-primary {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-details-secondary {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (min-width: 1280px) {
    .cc-details-cell { max-width: 22rem; }
}

/* Configuration Center health-test status banner */
.cc-status-banner {
    opacity: 0;
    transform: translateY(-0.4rem);
    transition: opacity 200ms ease, transform 200ms ease;
}
.cc-status-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.cc-status-banner.hidden {
    display: none !important;
}
@keyframes cc-banner-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Configuration Center audit detail modal */
.cc-audit-modal-shell {
    width: 100%;
    max-width: 36rem;
    max-height: min(90vh, 820px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}
@media (min-width: 640px) {
    .cc-audit-modal-shell { border-radius: 1rem; }
}
#config-audit-modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(90vh, 820px);
    overflow: hidden;
}
.cc-audit-modal-inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(90vh, 820px);
}
.cc-audit-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    flex-shrink: 0;
}
.cc-audit-modal-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cc-audit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.cc-audit-meta-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.75rem 0.875rem;
}
.cc-audit-meta-label {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}
.cc-audit-meta-value {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: #0f172a;
    word-break: break-word;
}
.cc-audit-detail-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}
.cc-audit-detail-card-head {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}
.cc-audit-detail-card-head h4 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}
.cc-audit-detail-card-head p {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.cc-audit-detail-list {
    margin: 0;
    padding: 0.25rem 0;
}
.cc-audit-detail-row {
    display: grid;
    grid-template-columns: minmax(7rem, 34%) 1fr;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid #f1f5f9;
}
.cc-audit-detail-row:first-child { border-top: 0; }
.cc-audit-detail-row dt {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.cc-audit-detail-row dd {
    margin: 0;
    font-size: 0.875rem;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
}
.cc-form-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}
.cc-form-section-head {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}
.cc-form-section-head h4 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}
.cc-form-section-head p {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.cc-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem 1rem;
    padding: 1rem;
}
@media (min-width: 640px) {
    .cc-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-form-grid-1 { grid-template-columns: 1fr; }
}
.cc-form-field-span {
    grid-column: 1 / -1;
}
.cc-form-field-check {
    grid-column: 1 / -1;
}
.cc-check-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    background: #f8fafc;
    cursor: pointer;
}
.cc-check-label:hover { background: #f1f5f9; }
.cc-check-label input { margin-top: 0.15rem; }
.cc-check-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
}
.cc-check-help,
.cc-field-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}
.cc-field-error {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #dc2626;
}
.cc-form-modal-body .admin-label {
    margin-bottom: 0.35rem;
}
.cc-form-modal-body input[type="text"],
.cc-form-modal-body input[type="email"],
.cc-form-modal-body input[type="url"],
.cc-form-modal-body input[type="number"],
.cc-form-modal-body input[type="password"],
.cc-form-modal-body select,
.cc-form-modal-body textarea {
    width: 100%;
}


/* ===== Executive Dashboard ===== */
.dashboard-toolbar {
    position: relative;
}
.dashboard-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    justify-content: space-between;
}
.dashboard-preset-group {
    display: inline-flex;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    overflow: hidden;
    background: var(--admin-surface-muted);
}
.dashboard-preset {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.dashboard-preset input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.dashboard-preset span {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    /* a11y: --admin-muted fails contrast on the tinted group background; slate-600 passes everywhere */
    color: #475569;
    border-right: 1px solid var(--admin-border);
}
.dashboard-preset:last-child span {
    border-right: none;
}
.dashboard-preset.is-active span,
.dashboard-preset:has(input:checked) span {
    background: var(--admin-primary);
    color: #fff;
}
.dashboard-preset:focus-within span {
    outline: 2px solid var(--admin-primary);
    outline-offset: -2px;
}
.dashboard-custom-range {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.dashboard-custom-range .admin-input {
    width: auto;
    min-width: 9rem;
}
.dashboard-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
.dashboard-cache-pill {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: var(--admin-primary-light);
    /* a11y: brand-on-tint was borderline; brand-dark passes */
    color: #2d63aa;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dashboard-range-error {
    margin-top: 0.75rem;
    color: var(--admin-danger);
    font-size: 0.8125rem;
}
.dashboard-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--admin-muted);
}
.htmx-request .dashboard-loading,
.dashboard-loading.htmx-request {
    display: inline-flex;
}
.dashboard-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--admin-border);
    border-top-color: var(--admin-primary);
    border-radius: 50%;
    animation: dashboard-spin 0.7s linear infinite;
}
@keyframes dashboard-spin {
    to { transform: rotate(360deg); }
}
.dashboard-kpi {
    text-decoration: none;
    color: inherit;
    display: block;
}
.dashboard-kpi:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}
.dashboard-delta {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.dashboard-delta--up { color: var(--admin-success); }
.dashboard-delta--down { color: var(--admin-danger); }
.dashboard-delta--flat { color: var(--admin-muted); }
.dashboard-delta-icon {
    font-size: 0.65rem;
}
.dashboard-chart-wrap {
    position: relative;
    height: 220px;
    width: 100%;
}
.dashboard-chart-wrap--donut {
    height: 200px;
}
.dashboard-fallback-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dashboard-fallback-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--admin-border);
}
.dashboard-fallback-list li:last-child {
    border-bottom: none;
}
.dashboard-alert {
    border-left-width: 4px;
}
.dashboard-alert--danger {
    border-left-color: var(--admin-danger);
    background: #fff5f5;
}
.dashboard-alert--warning {
    border-left-color: var(--admin-warning);
    background: #fffbeb;
}
.dashboard-alert--info {
    border-left-color: var(--admin-primary);
    background: #f0f7ff;
}
.dashboard-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--admin-row-hover);
    color: var(--admin-muted);
}
.dashboard-alert-badge--danger,
.dashboard-alert--danger .dashboard-alert-badge {
    background: #ffebee;
    color: var(--admin-danger);
}
.dashboard-alert-badge--warning,
.dashboard-alert--warning .dashboard-alert-badge {
    background: #fff8e1;
    color: var(--admin-warning);
}
@media (max-width: 640px) {
    .dashboard-toolbar-meta {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
    .dashboard-chart-wrap {
        height: 180px;
    }
}

/* ===== Email Template Studio ===== */
.email-studio-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--admin-muted);
    margin-bottom: 0.35rem;
}
.email-studio-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--admin-brand, #4a90e2);
    text-decoration: none;
}
.email-studio-back:hover { text-decoration: underline; }
.email-studio-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #cbd5e1;
    display: inline-block;
}
.email-studio-dot-on { background: #2e7d32; }
.email-studio-token {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 0.375rem;
    background: #f1f5f9;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
}
.email-studio-token-btn {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.email-studio-token-btn:hover:not(:disabled) {
    background: #e0edff;
    border-color: #93c5fd;
    color: #1e40af;
}
.email-studio-token-btn:active:not(:disabled) { transform: translateY(1px); }
.email-studio-token-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.email-studio-workflow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.email-studio-workflow-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-muted);
}
.email-studio-workflow-dot {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
}
.email-studio-workflow-step.is-complete .email-studio-workflow-dot,
.email-studio-workflow-step.is-current .email-studio-workflow-dot {
    background: rgba(74, 144, 226, 0.18);
    color: #1565c0;
}
.email-studio-workflow-step.is-current .email-studio-workflow-label {
    color: #0f172a;
    font-weight: 600;
}
.email-studio-workflow-line {
    flex: 1 1 1.5rem;
    min-width: 1.25rem;
    max-width: 3rem;
    height: 2px;
    background: #e2e8f0;
}
.email-studio-workflow-line.is-complete { background: #93c5fd; }

.email-studio-override summary::-webkit-details-marker { display: none; }
.email-studio-override summary::after {
    content: '+';
    color: var(--admin-muted);
    font-weight: 600;
}
.email-studio-override[open] summary::after { content: '\2212'; }

.email-studio-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 0.75rem;
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.email-studio-editor-grid {
    display: grid;
    gap: 1rem;
}
@media (min-width: 1024px) {
    .email-studio-editor-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
        align-items: start;
    }
}
.email-studio-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.email-studio-tab {
    flex: 1;
    padding: 0.7rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    border: 0;
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.email-studio-tab:hover { color: #0f172a; background: #f1f5f9; }
.email-studio-tab.is-active {
    color: #1565c0;
    border-bottom-color: #4a90e2;
    background: #fff;
}
.email-studio-block {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.85rem;
    background: #fff;
}
.email-studio-code {
    min-height: 22rem;
    line-height: 1.5;
}
.email-studio-device-toggle {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}
.email-studio-device-btn {
    padding: 0.35rem 0.5rem;
    background: #fff;
    color: #64748b;
    border: 0;
    cursor: pointer;
}
.email-studio-device-btn + .email-studio-device-btn { border-left: 1px solid #e2e8f0; }
.email-studio-device-btn.is-active {
    background: #eff6ff;
    color: #1565c0;
}
.email-studio-preview-placeholder {
    text-align: center;
    padding: 3rem 1.25rem;
    color: var(--admin-muted);
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.65rem;
}
.email-studio-preview-mobile {
    max-width: 390px;
    margin-left: auto;
    margin-right: auto;
}
.email-studio-preview-subject {
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
}
.email-studio-preview-frame {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #eef2f7;
}
.email-studio-preview-iframe {
    width: 100%;
    min-height: 420px;
    border: 0;
    background: #fff;
    display: block;
}
[x-cloak] { display: none !important; }

.email-studio-preview-pane .admin-card {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}
.email-studio-preview-pane .email-studio-preview-card {
    padding: 0;
}

#editor-preview > .admin-card,
#email-preview-panel > .admin-card {
    /* Preview partial is self-contained when loaded into a host card */
}
#editor-preview > .admin-card {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

/* ===== Platform Roles control plane ===== */
.pr-coverage-bar {
    height: 0.3125rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    flex: 1;
    min-width: 3.5rem;
}
.pr-coverage-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    min-width: 0;
}
.pr-platform-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    font-size: 0.8125rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    border: 1px solid #bfdbfe;
}
.pr-platform-avatar--sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.6875rem;
    border-radius: 0.375rem;
}
.pr-platform-avatar--lg {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
    border-radius: 0.75rem;
}
.pr-platform-avatar--danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.pr-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}
.pr-table .admin-table-th,
.pr-table .admin-table-td {
    padding: 0.625rem 0.875rem;
}
.pr-table thead .admin-table-th {
    background: #f8fafc;
    white-space: nowrap;
}
.pr-table tbody tr:last-child .admin-table-td {
    border-bottom: 0;
}
.pr-table__entity {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}
.pr-table__entity-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}
.pr-table__entity-id {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    color: #64748b;
    background: transparent;
    padding: 0;
    line-height: 1.3;
}
.pr-table__entity-desc {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 28rem;
}
.pr-table__metric {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}
.pr-table__col-metric {
    width: 4.5rem;
    text-align: center;
}
.pr-table__col-coverage {
    width: 9rem;
}
.pr-table__col-status {
    width: 7.5rem;
}
.pr-table__col-usage {
    width: 8.5rem;
}
.pr-table__coverage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 7rem;
}
.pr-table__coverage-pct {
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #334155;
    min-width: 2rem;
}
.pr-table__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.pr-table__badges .admin-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
}
.pr-table__muted {
    color: #cbd5e1;
    font-size: 0.875rem;
}
.pr-table__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}
.pr-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
}
.pr-toolbar__search {
    position: relative;
    flex: 1;
    min-width: 0;
}
.pr-toolbar__search .admin-input {
    padding-left: 2.25rem;
    background: #fff;
}
.pr-toolbar__search-icon {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem;
    max-height: 1rem;
    flex-shrink: 0;
    color: #94a3b8;
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.pr-platform-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.pr-platform-card {
    margin: 0;
}
.pr-platform-card__link {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pr-platform-card__link:hover {
    border-color: #93c5fd;
    background: #f8fbff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px -12px rgba(37, 99, 235, 0.35);
}
.pr-platform-card__link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.pr-platform-card__main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.pr-platform-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.pr-platform-card__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}
.pr-platform-card__client-id {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    background: transparent;
    padding: 0;
}
.pr-platform-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: center;
}
.pr-metric {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}
.pr-metric__value {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.pr-metric__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.pr-metric--coverage {
    gap: 0.375rem;
}
.pr-metric__coverage-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.pr-metric--coverage .pr-metric__value {
    font-size: 0.875rem;
}
.pr-platform-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.pr-platform-card__link:hover .pr-platform-card__cta {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
}
@media (max-width: 900px) {
    .pr-platform-card__link {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    .pr-platform-card__cta {
        justify-self: start;
    }
}
@media (max-width: 520px) {
    .pr-platform-card__metrics {
        grid-template-columns: 1fr 1fr;
    }
    .pr-metric--coverage {
        grid-column: 1 / -1;
    }
}
.pr-toolbar__filter {
    width: 100%;
    max-width: 11rem;
    background: #fff;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .pr-toolbar {
        flex-wrap: wrap;
    }
    .pr-toolbar__filter {
        max-width: none;
        width: 100%;
    }
}
.pr-role-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.pr-role-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pr-role-card:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pr-role-card__main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1rem;
    min-width: 0;
}
.pr-role-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.pr-role-card__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.25;
}
.pr-role-card__desc {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pr-role-card__desc--empty {
    color: #94a3b8;
    font-style: italic;
}
.pr-role-card__meta {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 0.75rem;
    min-width: 0;
}
.pr-role-meta {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}
.pr-role-meta__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.pr-role-meta__empty {
    font-size: 0.8125rem;
    color: #94a3b8;
}
.pr-usage-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.pr-usage-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}
.pr-role-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}
.pr-role-card__delete {
    color: #dc2626 !important;
}
.pr-role-card__delete:hover {
    background: #fef2f2 !important;
}
@media (max-width: 960px) {
    .pr-role-card__main {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .pr-role-card__meta {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 640px) {
    .pr-role-card {
        grid-template-columns: 1fr;
    }
    .pr-role-card__meta {
        grid-template-columns: 1fr;
    }
    .pr-role-card__actions {
        justify-content: flex-start;
        padding-top: 0.25rem;
        border-top: 1px solid #f1f5f9;
    }
}
.pr-policy-item {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.pr-policy-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.pr-callout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}
.pr-callout--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}
.pr-callout--warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.pr-callout--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.pr-assoc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.pr-assoc-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.6875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pr-assoc-chip--more {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #64748b;
}
.pr-assoc-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.375rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem;
    background: #f8fafc;
}
@media (min-width: 640px) {
    .pr-assoc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.pr-assoc-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.pr-assoc-option:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.pr-assoc-option.is-checked {
    border-color: #93c5fd;
    background: #eff6ff;
}

/* ==========================================================================
   Generic admin tab component (client-side Alpine tabs)
   Usage: <div class="admin-tabs" role="tablist">
              <button type="button" class="admin-tab" role="tab"
                      :class="tab==='x' && 'admin-tab--active'"
                      @click="tab='x'">Label</button>
          </div>
          <div x-show="tab==='x'" x-cloak>…panel content…</div>
   ========================================================================== */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.admin-tab {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    border-radius: 0.375rem 0.375rem 0 0;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.admin-tab:hover {
    color: #0f172a;
    background: #f1f5f9;
}
.admin-tab:focus-visible {
    outline: 2px solid #4a90e2;
    outline-offset: -2px;
}
.admin-tab--active,
.admin-tab--active:hover,
.admin-tabs[data-tabs="self"] .admin-tab[aria-selected="true"] {
    color: #1565c0;
    border-bottom-color: #4a90e2;
    background: #eff6ff;
}

/* ==========================================================================
   Workspace setup wizard
   Shell: gradient header + progress bar; rail: numbered/done steps.
   Panels: labeled section boxes used by every step body.
   ========================================================================== */
.wizard-step {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.625rem;
    text-decoration: none;
    min-width: 11rem;
}
.wizard-step a:hover,
a.wizard-step:hover {
    background: #eef4fb;
}
.wizard-step--current {
    background: var(--admin-primary-light);
    box-shadow: inset 0 0 0 1px var(--admin-primary-border);
}
.wizard-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.125rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.wizard-step-dot--done {
    color: #047857;
    background: #d1fae5;
}
a.wizard-step:hover .wizard-step-dot--done {
    background: #a7f3d0;
}
.wizard-step-dot--current {
    color: #fff;
    background: var(--admin-primary);
    box-shadow: 0 0 0 4px var(--admin-primary-ring);
}
.wizard-step-dot--todo {
    color: #94a3b8;
    background: #e2e8f0;
}

/* Business overview layout */
.dashboard-page-header { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; }
.dashboard-page-header h1 { margin:0; }
.admin-eyebrow { margin:0 0 .25rem; color:#64748b; font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.admin-page-description { margin:.35rem 0 0; color:#64748b; }
.dashboard-kpi-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.dashboard-two-column { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.dashboard-health-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.dashboard-growth-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.dashboard-chart-wrap--small { height:180px; }
.dashboard-summary-list,.dashboard-activity-list { list-style:none; padding:0; margin:1rem 0 0; }
.dashboard-summary-list li,.dashboard-activity-list li { display:flex; justify-content:space-between; gap:1rem; padding:.65rem 0; border-bottom:1px solid #e2e8f0; }
.dashboard-activity-list time { color:#64748b; white-space:nowrap; }
.dashboard-attention { display:flex; justify-content:space-between; gap:1rem; padding:.75rem; border-left:3px solid #94a3b8; background:#f8fafc; margin-bottom:.5rem; }
.dashboard-attention--danger { border-color:#dc2626; background:#fff7f7; }
.dashboard-attention--warning { border-color:#d97706; background:#fffbeb; }
.dashboard-attention p { margin:.2rem 0 0; color:#64748b; font-size:.875rem; }
.dashboard-table-wrap { overflow-x:auto; }
.dashboard-table,.dashboard-data-table { width:100%; border-collapse:collapse; }
.dashboard-table th,.dashboard-table td,.dashboard-data-table th,.dashboard-data-table td { padding:.65rem .5rem; border-bottom:1px solid #e2e8f0; text-align:left; }
.dashboard-table th { color:#475569; font-size:.8rem; }
.dashboard-data-table { margin-top:1rem; font-size:.8rem; }
.dashboard-data-details { margin-top:.75rem; }
.dashboard-data-details > summary { cursor:pointer; font-size:.875rem; color:#475569; }
.dashboard-alert-list { list-style:none; margin:0; padding:0; }
.dashboard-empty { color:#64748b; }
@media (max-width: 900px) { .dashboard-kpi-grid,.dashboard-health-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-two-column { grid-template-columns:1fr; } }
@media (max-width: 600px) { .dashboard-page-header { align-items:flex-start; flex-direction:column; } .dashboard-kpi-grid,.dashboard-health-grid,.dashboard-growth-grid { grid-template-columns:1fr; } .dashboard-filter-row { flex-direction:column; align-items:stretch; } .dashboard-toolbar-meta { align-items:flex-start; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; } }
.wizard-step-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
}

/* Step section boxes (fieldset-style blocks inside a step body) */
.wizard-section {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    padding: 1rem 1.125rem 1.125rem;
    background: var(--admin-surface);
}
.wizard-section + .wizard-section {
    margin-top: 1rem;
}
.wizard-section > legend,
.wizard-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}
.wizard-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: var(--admin-primary-light);
    color: #2563eb;
    flex: 0 0 auto;
}
.wizard-section-icon svg {
    width: 1rem;
    height: 1rem;
}

/* Member-role picker: keep long emails and role labels usable in the wizard. */
.wizard-role-picker { min-width: 0; }
.wizard-role-help { margin: 0; font-size: 0.8125rem; line-height: 1.6; color: #64748b; }
.wizard-role-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
.wizard-role-field { display: block; min-width: 0; }
.wizard-role-field select { min-width: 0; width: 100%; text-overflow: ellipsis; }
.wizard-role-member-context { display: flex; align-items: flex-start; gap: 0.45rem; margin-top: 0.625rem; color: #64748b; font-size: 0.75rem; line-height: 1.45; }
.wizard-role-member-context strong { color: #334155; font-weight: 600; overflow-wrap: anywhere; }
.wizard-role-member-context-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 1.25rem; height: 1.25rem; border-radius: 9999px; background: #eff6ff; color: #2563eb; font-weight: 700; }
.wizard-role-step-label { display: inline-flex; align-items: center; gap: 0.45rem; color: #334155; font-size: 0.8125rem; font-weight: 600; }
.wizard-role-step-number { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 9999px; background: #e0ecff; color: #2563eb; font-size: 0.6875rem; font-weight: 700; }
.wizard-role-step-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.wizard-role-step-heading .wizard-chip { flex: 0 0 auto; }
.wizard-role-options { display: grid; gap: 0.625rem; max-height: min(22rem, 45vh); overflow-y: auto; padding: 0.625rem; border: 1px solid var(--admin-border); border-radius: 0.75rem; background: #f8fafc; }
.wizard-role-group { min-width: 0; border: 1px solid #e2e8f0; border-radius: 0.625rem; padding: 0.7rem 0.75rem 0.75rem; background: #fff; }
.wizard-role-group + .wizard-role-group { padding-top: 0.7rem; }
.wizard-role-group legend { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; margin-bottom: 0.5rem; color: #475569; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.wizard-role-platform { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-role-group-rule { flex: 0 0 auto; color: #94a3b8; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.wizard-role-group-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.wizard-role-option { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2rem; padding: 0.35rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 0.5rem; background: #fff; color: #334155; font-size: 0.8125rem; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.wizard-role-option:hover { border-color: #93c5fd; background: #f8fbff; }
.wizard-role-option:focus-within { outline: 3px solid #bfdbfe; outline-offset: 1px; }
.wizard-role-option:has(input:checked) { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.wizard-role-option input { width: 0.9rem; height: 0.9rem; accent-color: #2563eb; }
.wizard-role-add-row, .wizard-role-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wizard-role-add-row { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--admin-border); }
.wizard-role-selection-summary { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; color: #334155; font-size: 0.8125rem; }
.wizard-role-selection-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 9999px; background: #dbeafe; color: #2563eb; font-size: 0.875rem; font-weight: 700; }
.wizard-role-help-inline { color: #64748b; }
.wizard-role-footer { padding-top: 1rem; border-top: 1px solid var(--admin-border); }
.wizard-role-add-row .admin-btn, .wizard-role-footer .admin-btn { flex-shrink: 0; }
.wizard-role-add-row .admin-btn:disabled, .wizard-role-footer .admin-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.wizard-role-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; border: 1px solid #fde68a; border-radius: 0.75rem; background: #fffbeb; color: #92400e; font-size: 0.8125rem; }
.wizard-role-pending > span { flex: 1 1 16rem; }
.wizard-assigned-roles-help { margin-top: 0.125rem; }
.wizard-assigned-roles > legend { flex-wrap: wrap; }
.wizard-assigned-member-list { display: grid; gap: 0.75rem; margin-top: 0.875rem; }
.wizard-assigned-member { min-width: 0; padding: 0.75rem; border: 1px solid #dbe3ef; border-radius: 0.75rem; background: #f8fafc; }
.wizard-assigned-member-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.wizard-assigned-member-identity { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
.wizard-assigned-member-email { margin: 0; overflow: hidden; color: #0f172a; font-size: 0.8125rem; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.wizard-assigned-member-count { margin: 0.15rem 0 0; color: #64748b; font-size: 0.6875rem; line-height: 1.35; }
.wizard-assigned-platforms { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.7rem 0 0.625rem 2.75rem; }
.wizard-platform-chip { display: inline-flex; align-items: center; max-width: 100%; padding: 0.2rem 0.45rem; overflow: hidden; border-radius: 0.35rem; background: #e2e8f0; color: #475569; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.625rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.wizard-platform-chip--strong { background: #eff6ff; color: #1d4ed8; }
.wizard-assigned-member-list-items { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.wizard-assigned-role { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; padding: 0.5rem 0.625rem; border: 1px solid var(--admin-border); border-radius: 0.55rem; background: #fff; }
.wizard-assigned-role-label { display: flex; align-items: center; gap: 0.5rem; min-width: 0; color: #334155; font-size: 0.8125rem; }
.wizard-assigned-role-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
    .wizard-role-fields { grid-template-columns: minmax(0, 1fr); }
    .wizard-role-add-row { flex-direction: column; align-items: stretch; }
    .wizard-role-add-row .admin-btn { width: 100%; }
    .wizard-assigned-platforms { margin-left: 0; }
    .wizard-assigned-role { align-items: flex-start; }
    .wizard-role-footer { flex-direction: column; align-items: stretch; }
    .wizard-role-footer .admin-btn { width: 100%; }
}

/* Inline chips (counts, prices, optional tags) */
.wizard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--admin-primary-light);
    color: #1d4ed8;
}
.wizard-chip--amber {
    background: #fef3c7;
    color: #92400e;
}
.wizard-chip--slate {
    background: #e2e8f0;
    color: #475569;
}
.wizard-chip--emerald {
    background: #d1fae5;
    color: #047857;
}

/* Draft item rows (members / roles lists) */
.wizard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.625rem;
    background: var(--admin-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.wizard-item:hover {
    border-color: #cbd5e1;
    box-shadow: var(--admin-shadow);
}
.wizard-item-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #dbeafe;
    text-transform: uppercase;
}
.wizard-item-avatar--indigo {
    color: #4338ca;
    background: #e0e7ff;
}
.wizard-item-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b91c1c;
    cursor: pointer;
    transition: background-color 0.15s;
}
.wizard-item-remove:hover {
    background: #fee2e2;
}

/* Review summary cards */
.wizard-review-card {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--admin-surface);
}
.wizard-review-card dt {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.375rem;
}
.wizard-review-card dd {
    font-size: 0.875rem;
    color: var(--admin-text);
}

/* In-flight feedback: htmx adds .htmx-request to the submitting form. */
#wizard-step-body form.htmx-request .admin-btn-primary {
    opacity: 0.6;
    pointer-events: none;
}
#wizard-step-body form.htmx-request .htmx-indicator {
    display: inline-block;
}

/* Provisioning progress panel */
.wizard-progress-pulse {
    position: relative;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    background: #3b82f6;
}
.wizard-progress-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #3b82f6;
    animation: wizardPulse 1.6s ease-out infinite;
}
@keyframes wizardPulse {
    0% { transform: scale(1); opacity: 0.7; }
    70% { transform: scale(2.6); opacity: 0; }
    100% { transform: scale(2.6); opacity: 0; }
}
.wizard-event-dot {
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.4rem;
    border-radius: 9999px;
    background: #cbd5e1;
}
.wizard-event-dot--ok { background: #34d399; }
.wizard-event-dot--fail { background: #f87171; }
.wizard-event-dot--run { background: #60a5fa; }
.wizard-event-dot--wait { background: #fbbf24; }
@media (prefers-reduced-motion: reduce) {
    .wizard-progress-pulse::after {
        animation: none;
    }
}
/* Workspace directory */
.ws-directory { display: grid; gap: 24px; }
.ws-directory-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ws-directory-header h1 { margin: 4px 0 8px; font-size: 30px; letter-spacing: -.035em; font-weight: 750; color: #172b43; line-height: 1.15; }
.ws-directory-header p:not(.ws-eyebrow) { margin: 0; color: #64748b; font-size: 14px; }
.ws-eyebrow { margin: 0; color: #52769a; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ws-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ws-summary-card { display: grid; gap: 8px; padding: 20px 22px; border: 1px solid #dee6ef; border-radius: 12px; background: #fff; color: #516378; box-shadow: 0 2px 4px #1b355305; transition: border-color .15s, box-shadow .15s; }
.ws-summary-card:hover { border-color: #8caaca; box-shadow: 0 4px 14px #1b355310; }
.ws-summary-card > span { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ws-summary-card strong { color: #1b3553; font-size: 30px; line-height: 1.2; letter-spacing: -.04em; }
.ws-summary-card small { font-size: 11px; color: #64748b; }
.ws-summary-attention { background: #fffcf6; border-color: #ede3cd; }
.ws-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ws-dot-green { color: #20815d; }.ws-dot-amber { color: #b57a1e; }
.ws-directory-list { background: #fff; border: 1px solid #dce5ef; border-radius: 12px; box-shadow: 0 2px 7px #1b355305; overflow: hidden; }
.ws-filters { display: grid; grid-template-columns: minmax(200px, 1.7fr) repeat(4, minmax(125px, 1fr)) auto; gap: 12px; padding: 22px; align-items: end; }
.ws-filters > div { min-width: 0; }
.ws-filters label { display: block; margin-bottom: 7px; color: #536478; font-size: 11px; font-weight: 600; }
.ws-filters .admin-input, .ws-filters .admin-select { width: 100%; min-width: 0; height: 40px; background-color: #fff; font-size: 12px; }
.ws-filters > button { height: 40px; white-space: nowrap; }
.ws-results-header { padding: 14px 22px; border-top: 1px solid #edf1f6; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #536478; font-size: 12px; }
.ws-results-header p { margin: 0; }.ws-results-header strong { color: #263e59; }.ws-results-header p > span { color: #718096; margin-left: 14px; }
.ws-clear-filters, .ws-directory-note a { color: #356a9b; font-weight: 600; }
.ws-clear-filters:hover, .ws-directory-note a:hover, .ws-name:hover, .ws-edit-link:hover { text-decoration: underline; }
.ws-table { width: 100%; table-layout: fixed; }
.ws-table thead th { background: #f7f9fc; border-top: 1px solid #e8edf3; border-bottom: 1px solid #e8edf3; color: #67798e; padding: 12px 18px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; white-space: normal; }
.ws-table th:first-child { width: 24%; padding-left: 22px; }.ws-table th:nth-child(2) { width: 23%; }.ws-table th:nth-child(3) { width: 14%; }.ws-table th:nth-child(4) { width: 14%; }.ws-table th:nth-child(5) { width: 14%; }.ws-table th:last-child { width: 11%; }
.ws-table tbody td { padding: 22px 18px; vertical-align: middle; border-bottom: 1px solid #edf1f6; white-space: normal; overflow-wrap: anywhere; }
.ws-table tbody tr:last-child td { border-bottom: 0; }.ws-table tbody tr:hover { background: #f8fbff; }
.ws-table tbody td:first-child { padding-left: 22px; }
.ws-identity { display: flex; align-items: center; gap: 12px; }.ws-identity > div { min-width: 0; }
.ws-avatar { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #dae6f2; border-radius: 10px; background: #eef4fb; color: #527aa1; font-size: 15px; font-weight: 650; flex-shrink: 0; }
.ws-name { color: #214362; font-size: 13px; font-weight: 650; }
.ws-secondary { display: block; color: #6b7c91; font-size: 11px; line-height: 1.5; margin-top: 6px; }
.ws-email { overflow-wrap: anywhere; }.ws-account-name { color: #354a62; font-size: 12px; font-weight: 550; }
.ws-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 650; line-height: 1.4; }
.ws-status-green { background: #eaf6f0; color: #226a4d; }.ws-status-neutral { background: #eff2f6; color: #65758a; }.ws-status-amber { background: #fff3d9; color: #896014; }.ws-status-red { background: #fff0ef; color: #a9433c; }.ws-text-warning { color: #916322; }
.ws-access-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #64748b; font-size: 11px; }.ws-access-counts strong { color: #344d67; font-weight: 650; }
.ws-row-actions, .ws-actions-heading { text-align: right; }.ws-row-actions .admin-btn { white-space: nowrap; }.ws-edit-link { display: block; margin-top: 8px; color: #607993; font-size: 11px; }
.ws-directory-note { margin: 0; color: #78879a; font-size: 12px; }
.ws-empty-state { padding: 56px 24px 64px; text-align: center; border-top: 1px solid #edf1f6; }.ws-empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #eef4fb; color: #6384a5; font-size: 28px; }.ws-empty-state h2 { margin: 16px 0 8px; color: #2b425b; font-size: 18px; font-weight: 650; }.ws-empty-state p { max-width: 430px; margin: 0 auto 22px; color: #64748b; font-size: 13px; line-height: 1.7; }
.ws-directory a:focus-visible, .ws-directory button:focus-visible { outline: 3px solid #7fa6cc; outline-offset: 3px; }
@media (max-width: 1400px) { .ws-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }.ws-filters .ws-search-field { grid-column: span 2; }.ws-filters > button { justify-self: start; }.ws-table tbody td, .ws-table thead th { padding-left: 12px; padding-right: 12px; }.ws-avatar { display: none; } }
@media (max-width: 1100px) { .ws-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.ws-table, .ws-table tbody { display: block; }.ws-table thead { display: none; }.ws-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; gap: 18px; border-top: 1px solid #e5ebf3; }.ws-table tbody td, .ws-table tbody td:first-child { display: block; padding: 0; border: 0; }.ws-table td::before { content: attr(data-label); display: block; font-size: 10px; color: #6b7c91; margin-bottom: 7px; }.ws-table .ws-identity-cell { grid-column: 1 / -1; }.ws-table .ws-identity-cell::before { display: none; }.ws-avatar { display: grid; }.ws-row-actions { text-align: left; } }
@media (max-width: 640px) { .ws-directory { gap: 18px; }.ws-directory-header { align-items: flex-start; flex-direction: column; gap: 16px; }.ws-directory-header h1 { font-size: 27px; }.ws-summary { gap: 10px; }.ws-summary-card { padding: 16px; }.ws-summary-card > span { font-size: 11px; }.ws-summary-card strong { font-size: 26px; }.ws-summary-card small { font-size: 10px; }.ws-filters { padding: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }.ws-filters > button { width: 100%; }.ws-results-header { padding: 14px 18px; }.ws-results-header p > span { display: block; margin: 4px 0 0; }.ws-table tbody tr { padding: 18px; }.ws-directory-note { line-height: 1.8; } }
.ws-table thead th { text-align: left; }
.ws-table thead .ws-actions-heading { text-align: right; }


/* ==========================================================================
   UX-10: token-backed colour helpers. They replace hard-coded Tailwind palette
   classes (text-slate-500, bg-red-50 ...) in the Users & Access, Resellers and
   Plans & Services templates so the whole admin follows the --admin-* tokens.
   ========================================================================== */
.admin-fg-strong, .admin-fg { color: var(--admin-text); }
.admin-fg-muted { color: var(--admin-muted); }
.admin-fg-primary { color: var(--admin-primary); }
.admin-fg-danger { color: var(--admin-danger-text); }
.admin-fg-success { color: var(--admin-success-text); }
.admin-fg-warning { color: var(--admin-warning-text); }
.admin-bg-muted { background-color: var(--admin-surface-muted); }
.admin-bg-subtle { background-color: var(--admin-border); }
.admin-bg-primary-soft { background-color: var(--admin-primary-light); }
.admin-bg-danger-soft { background-color: var(--admin-danger-soft); }
.admin-bg-success-soft { background-color: var(--admin-success-soft); }
.admin-bg-warning-soft { background-color: var(--admin-warning-soft); }
.admin-border-default { border-color: var(--admin-border); }
.admin-border-primary { border-color: var(--admin-primary-border); }
.admin-border-danger { border-color: var(--admin-danger-border); }
.admin-border-success { border-color: var(--admin-success-border); }
.admin-border-warning { border-color: var(--admin-warning-border); }
.admin-divide-default > :not(:last-child) { border-color: var(--admin-border); }
