.authorization-section-shell .authorization-panel {
    padding: 1rem 0;
}

.authorization-source-banner {
    background: #fff8e5;
    border: 1px solid #f0c36d;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.authorization-source-banner p {
    margin: 0;
}

.authorization-roles-layout {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1100px) {
    .authorization-roles-layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
        align-items: start;
    }
}

.authorization-role-slug {
    font-size: 0.75rem;
    opacity: 0.75;
}

.authorization-role-editor {
    background: var(--ws-surface, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 1rem;
}

.authorization-role-editor[hidden] {
    display: none !important;
}

.authorization-role-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.authorization-role-editor-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.authorization-role-fields {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.authorization-role-fields label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.authorization-role-checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem !important;
}

.authorization-field-hint {
    margin-top: 0.2rem;
    color: #6d6b77;
    font-size: 0.75rem;
    line-height: 1.35;
}

/* Beat global input { width: 100% } so checkboxes stay intrinsic size */
.webisport-dashboard .authorization-role-checkbox input[type="checkbox"],
.webisport-dashboard .authorization-cap-item input[type="checkbox"] {
    width: auto;
    max-width: none;
    min-width: 1em;
    flex: 0 0 auto;
    margin: 0.15em 0 0;
}

.authorization-cap-group {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0 0 0.75rem;
}

.authorization-cap-group legend {
    font-weight: 600;
    padding: 0 0.35rem;
    text-transform: capitalize;
}

.authorization-cap-grid {
    display: grid;
    gap: 0.35rem;
}

.authorization-cap-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

.authorization-role-actions {
    margin-top: 1rem;
}

.authorization-error {
    color: #b32d2e;
}

/* Club-wide role assignment — compact, role-focused directory */
.webisport-dashboard .authorization-members-panel {
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-5);
}

.webisport-dashboard .authorization-members-intro {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--ws-space-5);
    padding: var(--ws-space-5);
    overflow: hidden;
    background: var(--webisport-surface-muted, #f9fafb);
    border: 1px solid rgba(47, 43, 61, 0.12);
    border-left: 4px solid var(--ws-primary-border, #7367f0);
    border-radius: var(--ws-radius);
}

.webisport-dashboard .authorization-members-intro::after {
    content: '';
    position: absolute;
    right: -2rem;
    bottom: -4rem;
    width: 11rem;
    height: 11rem;
    border: 1.5rem solid rgba(47, 43, 61, 0.035);
    border-radius: 50%;
    pointer-events: none;
}

.webisport-dashboard .authorization-members-eyebrow {
    display: block;
    margin-bottom: var(--ws-space-1);
    color: #6d6b77;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.webisport-dashboard .authorization-members-intro h3 {
    margin: 0 0 var(--ws-space-1);
    color: #2f2b3d;
    font-size: 1.25rem;
}

.webisport-dashboard .authorization-members-intro p {
    max-width: 68ch;
    margin: 0;
    color: #6d6b77;
    font-size: 0.875rem;
    line-height: 1.5;
}

.webisport-dashboard .authorization-members-total {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 0.4rem 0.7rem;
    color: #444050;
    background: var(--ws-surface, #fff);
    border: 1px solid rgba(47, 43, 61, 0.12);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.webisport-dashboard .authorization-members-filters {
    display: grid;
    grid-template-columns: minmax(15rem, 2fr) minmax(11rem, 1fr) minmax(11rem, 1fr) auto;
    align-items: end;
    gap: var(--ws-space-3);
}

.webisport-dashboard .authorization-members-filters label {
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-1);
    min-width: 0;
    color: #6d6b77;
    font-size: 0.75rem;
    font-weight: 600;
}

.webisport-dashboard .authorization-members-filters input,
.webisport-dashboard .authorization-members-filters select {
    min-height: 2.35rem;
}

.webisport-dashboard .authorization-member-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.webisport-dashboard .authorization-member-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.32rem 0.28rem 0.55rem;
    color: #444050;
    background: var(--webisport-surface-muted, #f9fafb);
    border: 1px solid rgba(47, 43, 61, 0.14);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.webisport-dashboard .authorization-member-role-chip button {
    display: inline-grid;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    place-items: center;
    color: #6d6b77;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.webisport-dashboard .authorization-member-role-chip button:hover,
.webisport-dashboard .authorization-member-role-chip button:focus-visible {
    color: #b32d2e;
    background: rgba(179, 45, 46, 0.08);
    outline: none;
}

.webisport-dashboard .authorization-member-no-role {
    color: #8a8793;
    font-size: 0.8125rem;
    font-style: italic;
}

.webisport-dashboard .authorization-member-role-add {
    display: flex;
    align-items: stretch;
    gap: var(--ws-space-2);
    min-width: 15rem;
}

.webisport-dashboard .authorization-member-role-add .webisport-select {
    min-width: 8rem;
}

.webisport-dashboard .authorization-members-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ws-space-3);
    min-height: 2.25rem;
    color: #6d6b77;
    font-size: 0.8125rem;
}

@media (max-width: 960px) {
    .webisport-dashboard .authorization-members-filters {
        grid-template-columns: 1fr 1fr;
    }

    .webisport-dashboard .authorization-members-filters .webisport-btn {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .webisport-dashboard .authorization-members-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .webisport-dashboard .authorization-members-filters {
        grid-template-columns: 1fr;
    }
}

/* Member detail — roles tab */
.webisport-dashboard .member-roles-layout {
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-5);
}

.webisport-dashboard .member-roles-hint {
    margin: 0 0 var(--ws-space-4) 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #6d6b77;
    max-width: 62ch;
}

.webisport-dashboard .member-roles-list-wrap {
    margin-bottom: var(--ws-space-4);
}

.webisport-dashboard .member-roles-empty {
    padding: var(--ws-space-6) var(--ws-space-4);
}

.webisport-dashboard .member-roles-empty-hint {
    margin: var(--ws-space-2) 0 0 0;
    font-size: 0.8125rem;
    color: #6d6b77;
}

.webisport-dashboard .member-roles-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-2);
}

.webisport-dashboard .member-roles-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ws-space-3);
    padding: var(--ws-space-3) var(--ws-space-4);
    background: var(--webisport-surface-muted, #f9fafb);
    border: 1px solid rgba(47, 43, 61, 0.12);
    border-radius: var(--ws-radius);
}

.webisport-dashboard .member-roles-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.webisport-dashboard .member-roles-item-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #444050;
}

.webisport-dashboard .member-roles-item-meta {
    font-size: 0.75rem;
    color: #6d6b77;
    line-height: 1.4;
}

.webisport-dashboard .member-roles-assign {
    margin: 0;
    padding-top: var(--ws-space-4);
    border-top: 1px solid rgba(47, 43, 61, 0.12);
}

.webisport-dashboard .member-roles-assign .webisport-form-group {
    margin-bottom: 0;
}

.webisport-dashboard .member-roles-assign-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--ws-space-3);
}

.webisport-dashboard .member-roles-assign-row .webisport-select {
    flex: 1 1 14rem;
    min-width: 0;
    max-width: 28rem;
}

.webisport-dashboard .member-roles-assign-row .webisport-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.webisport-dashboard .member-roles-primary {
    display: flex;
    flex-direction: column;
    gap: var(--ws-space-1);
    margin: 0 0 var(--ws-space-4) 0;
}

.webisport-dashboard .member-roles-primary-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6d6b77;
}

.webisport-dashboard .member-roles-primary-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ws-space-2);
    font-size: 0.9375rem;
    font-weight: 500;
    color: #444050;
}

.webisport-dashboard .member-roles-primary-empty {
    font-weight: 400;
    color: #6d6b77;
}

.webisport-dashboard .member-roles-cap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.authorization-pre {
    max-height: 70vh;
    overflow: auto;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.45;
}
