.status-region {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    background: none;
    color: var(--grey-700);
    font-size: 13px;
    line-height: 1.4;
}

.status-region.status-error {
    border-color: var(--accent-neg-dark);
    color: var(--accent-neg-dark);
    background: var(--accent-neg-light);
}

.status-region.status-hidden {
    display: none;
}

.status-retry {
    margin-left: 4px;
    padding: 6px 14px;
    font-size: 12px;
}

.select-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--grey-200);
    border-top-color: var(--ci-dark);
    animation: select-spinner-rotate 0.8s linear infinite;
}

@keyframes select-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}
body.select-body {
    font-family: "DM Sans", sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
    overflow-y: auto;
    color: var(--grey-900);
}

.select-shell {
    width: min(1240px, 100% - 56px);
    margin: 0 auto;
    padding: 40px 0 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.select-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--grey-200);
}

.select-hero__identity {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.select-hero__titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 320px;
    min-width: 220px;
}

.select-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 220px;
}


.select-hero__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

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

.select-session-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--grey-300);
    background: var(--white);
    color: var(--grey-700);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.select-session-user:focus-visible {
    outline: 2px solid var(--ci-dark);
    outline-offset: 4px;
}

.select-user-icon {
    width: 18px;
    height: 18px;
    pointer-events: none;
    filter: invert(18%) sepia(5%) saturate(1264%) hue-rotate(189deg) brightness(91%) contrast(88%);
}

.select-user-menu.is-open .select-user-caret {
    transform: rotate(180deg);
}

.select-user-menu.is-open .select-session-user {
    border-color: var(--ci-dark);
}

.select-session-user.is-hidden {
    display: none;
}

.select-user-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--grey-200);
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 12;
}

.select-user-menu__panel.is-hidden {
    display: none;
}

.select-user-menu__identity {
    margin: 0;
    font-size: 13px;
    color: var(--grey-700);
    line-height: 1.4;
}

.select-user-menu__label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-500);
    margin-bottom: 4px;
}

.select-user-menu__mail {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--grey-100);
    font-weight: 700;
    color: var(--ci-dark);
    font-size: 13px;
}

.select-user-menu__mail.is-placeholder {
    color: var(--grey-500);
    background: var(--grey-200);
    font-weight: 600;
}

.select-user-menu__action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid var(--grey-300);
    background: transparent;
    color: var(--grey-800);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    width: 100%;
}

.select-user-menu__action:hover {
    border-color: var(--ci-dark);
    color: var(--ci-dark);
}

.select-user-menu__action .icon-normal {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

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

    .select-status-stack {
        width: 100%;
        align-items: flex-start;
    }
}

.select-hero__logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.select-hero__logo img {
    width: 56px;
    height: auto;
}

.select-hero__details {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.select-eyebrow {
    color: var(--grey-600);
    margin: 0;
    font-weight: 600;
    font-size: 20px;
}

.select-title {
    margin: 0;
    color: var(--grey-900);
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 42px);
}

.select-lede {
    margin: 0;
    max-width: 680px;
    color: var(--grey-700);
    line-height: 1.6;
}



.select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.customer-card {
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--grey-200);
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.customer-card:hover {
    border-color: var(--ci-dark);
    transform: translateY(-4px);
}

.customer-card:not(.customer-card--disabled)::after {
    content: "";
}

.customer-card--disabled {
    opacity: 0.7;
}

.customer-card--disabled::after {
    content: none;
}

.customer-card__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 24px;
}

.customer-card__body:focus-visible {
    outline: 2px solid var(--ci-dark);
    outline-offset: 6px;
}

.customer-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.customer-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 28px;
    border-radius: 20px;
    border: 1px solid var(--grey-300);
    background: transparent;
    color: var(--grey-800);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.customer-action:hover {
    border-color: var(--ci-dark);
    color: var(--ci-dark);
}

.customer-action--primary {
    background: var(--ci-dark);
    border-color: var(--ci-dark);
    color: var(--white);
}

.customer-action--primary:hover {
    color: var(--white);
    background: var(--brand-dark-2);
}

.customer-action .icon-normal {
    width: 18px;
    height: 18px;
    pointer-events: none;
    flex-shrink: 0;
}

.customer-action.customer-action--primary .icon-normal {
    color: var(--white);
}

.customer-action:not(.customer-action--primary) .icon-normal {
    color: currentColor;
}

.customer-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--ci-dark);
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--grey-200);
    margin-right: 12px;
}

.customer-avatar--image {
    background: transparent;
    border-color: transparent;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.customer-name {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.customer-id {
    font-size: 11px;
    color: var(--grey-700);
    letter-spacing: 0.02em;
}

/* Taiga #7868. Deliberately quiet -- grey, not a warning colour: an archived
   workspace is retired, not broken, and the card still opens normally. */
.customer-archived-pill {
    align-self: flex-start;
    margin-top: 6px;
    border-radius: 999px;
    border: 1px solid var(--grey-300);
    background: var(--grey-100);
    padding: 2px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--grey-700);
}

.role-pill {
    border-radius: 999px;
    border: 1px solid var(--grey-200);
    background: var(--grey-100);
    padding: 6px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ci-dark);
    margin-left: auto;
}

.customer-destination {
    margin: 0;
    color: var(--grey-700);
    display: none;
}

.customer-link-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ci-dark);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 600;
}

.customer-link-hint::after {
    content: "↗";
    font-size: 14px;
}

.customer-error {
    margin: 0;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid var(--accent-neg-dark);
    background: var(--accent-neg-light);
    color: var(--accent-neg-dark);
    font-size: 13px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 32px;
    border-radius: 20px;
    border: 1px dashed var(--grey-300);
    background: rgba(255, 255, 255, 0.7);
    color: var(--grey-700);
    text-align: center;
}

@media (max-width: 960px) {
    .select-shell {
        width: calc(100% - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .customer-card {
        transition: none;
    }
}

@media (min-width: 960px) {
    .select-logout {
        gap: 12px;
        padding: 12px 28px;
        border-radius: 20px;
    }

    .select-lede {
        max-width: 520px;
    }
}

/* Search toolbar */
.select-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.select-search {
    flex: 1 1 280px;
    max-width: 420px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid var(--grey-300);
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    color: var(--grey-900);
    outline: none;
    transition: border-color 0.2s ease;
}

.select-search:focus {
    border-color: var(--ci-dark);
}

.select-search::placeholder {
    color: var(--grey-500);
}

.select-result-count {
    color: var(--grey-600);
    font-size: 13px;
    white-space: nowrap;
}

/* Taiga #7868. Archive mode: a switch, not a checkbox, because it swaps which set
   of workspaces the grid shows rather than widening the current one.

   Hand-rolled rather than Bootstrap's `.form-switch` (which is what the SPM's
   Onboarding mode uses) because this page deliberately loads four stylesheets and
   none of them is Bootstrap -- pulling the framework in for one control would
   restyle the whole grid. Same 2:1 track, white knob and --ci-dark "on" tint, so
   the two read as the same control.

   Starts hidden; mainSelect.js reveals it only for an account that actually holds
   an archived workspace. `.is-hidden` rather than the `hidden` attribute, because
   `display: inline-flex` here would out-specify the UA rule. */
.select-archive-mode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--grey-700);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.select-archive-mode.is-hidden {
    display: none;
}

.select-archive-mode input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 34px;
    height: 18px;
    margin: 0;
    border: 1px solid var(--grey-300);
    border-radius: 999px;
    background: var(--grey-200);
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.select-archive-mode input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    transition: transform 0.2s ease;
}

.select-archive-mode input:checked {
    background: var(--ci-dark);
    border-color: var(--ci-dark);
}

.select-archive-mode input:checked::after {
    transform: translateX(16px);
}

.select-archive-mode input:focus-visible {
    outline: 2px solid var(--ci-dark);
    outline-offset: 2px;
}

/* Pagination */
.select-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.pagination-btn {
    padding: 10px 20px;
    border-radius: 14px;
    border: 1px solid var(--grey-300);
    background: var(--white);
    color: var(--grey-800);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--ci-dark);
    color: var(--ci-dark);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-700);
}

/* ---- Whitelabel (whitelabelPortal.js adds .whitelabel-mode on <html>) ---- */

/* The palette needs no restatement here: every colour on this page already goes
   through --ci-dark / --ci-light / --brand-dark-2, and the t-XXXXXX class that
   applyHead() puts on <html> re-points those in colors.css. Only the Shikenso
   ASSETS need handling, and they are assets rather than colours -- no amount of
   re-tinting makes a wordmark neutral. */

/* Keep the Shikenso logo from flashing before applyBranding() has replaced it.
   applyBranding runs at the end of <body>, so on a slow connection the header
   paints first; without this the client sees our wordmark for a beat. The
   whitelabel logos have other aspect ratios, so constrain height as well as
   width once the swap has landed. */
.whitelabel-mode .select-hero__logo img {
    visibility: hidden;
    width: auto;
    max-width: 56px;
    max-height: 56px;
}

.whitelabel-mode .select-hero__logo img.whitelabel-logo-applied {
    visibility: visible;
}
