.bq-staff-app {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 18px 28px;
    box-sizing: border-box;
}

.bq-staff-app > .bq-topbar,
.bq-staff-app > .bq-page-header {
    margin: 0;
}

.bq-staff-app .bq-filter-bar {
    margin: 0 !important;
    padding: 12px 0;
    gap: 10px !important;
}

.bq-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.bq-staff-app .bq-crud-form {
    margin: 0 0 16px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.bq-staff-app .bq-crud-form .form-actions,
.bq-staff-app .bq-crud-form-error {
    grid-column: 1 / -1;
}

.bq-staff-app .pos-field {
    gap: 8px;
    margin: 0;
}

.bq-field-hint {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.bq-staff-name {
    display: grid;
    gap: 2px;
}

.bq-staff-name span {
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.bq-role-badge,
.bq-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.bq-role-badge i {
    font-size: 0.7rem;
}

.bq-role-badge.is-super {
    background: #3b2a12;
    color: #f3d9a4;
}

.bq-role-badge.is-admin {
    background: #f3e6ea;
    color: var(--pos-maroon);
}

.bq-role-badge.is-manager {
    background: #e8f1f8;
    color: #1f4e79;
}

.bq-role-badge.is-sales {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-role-badge.is-cashier {
    background: #f4eee6;
    color: #7a4a12;
}

.bq-role-badge.is-staff {
    background: #eee;
    color: #444;
}

.bq-status-badge.is-active {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-status-badge.is-inactive {
    background: #f6e9e9;
    color: #8a2a2a;
}

.bq-staff-app.bq-app .bq-page-header.bq-topbar .pos-chip-btn.bq-header-cta,
.bq-staff-app.bq-app .bq-topbar .pos-chip-btn.bq-header-cta {
    background: #fff !important;
    background-image: none !important;
    color: var(--pos-maroon-dark, #0f3d2e) !important;
    border-color: #fff !important;
    font-weight: 700;
}

.bq-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.bq-role-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 100%;
}

.bq-role-card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bq-role-card-copy {
    min-width: 0;
}

.bq-role-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #f3e6ea;
    color: var(--pos-maroon);
    flex-shrink: 0;
}

.bq-role-card.is-super .bq-role-card-icon {
    background: #3b2a12;
    color: #f3d9a4;
}

.bq-role-card.is-admin .bq-role-card-icon {
    background: #f3e6ea;
    color: var(--pos-maroon);
}

.bq-role-card.is-manager .bq-role-card-icon {
    background: #e8f1f8;
    color: #1f4e79;
}

.bq-role-card.is-sales .bq-role-card-icon {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-role-card.is-cashier .bq-role-card-icon {
    background: #f4eee6;
    color: #7a4a12;
}

.bq-role-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--pos-maroon);
}

.bq-role-card p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--pos-muted);
    line-height: 1.4;
}

.bq-role-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bq-role-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f3f6f4;
    color: var(--pos-maroon);
}

.bq-role-meta-chip.is-yes {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-role-meta-chip.is-no {
    background: #f4f4f4;
    color: var(--pos-muted);
}

.bq-role-perms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.bq-role-perms li {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f7faf8;
    border: 1px solid var(--pos-border);
    font-size: 0.72rem;
    color: var(--pos-maroon);
    outline: none;
}

.bq-role-perms li:focus,
.bq-role-perms li:focus-visible {
    outline: none;
    box-shadow: none;
}

@media (max-width: 1100px) {
    .bq-role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bq-staff-app .bq-crud-form {
        grid-template-columns: 1fr;
    }

    .bq-role-grid {
        grid-template-columns: 1fr;
    }
}
