Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
259 changes: 259 additions & 0 deletions frontend/components/RbacDashboard.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
/* RbacDashboard — role management panel */

.dashboard {
display: flex;
flex-direction: column;
gap: 1.5rem;
font-size: 0.8125rem;
color: var(--color-text, #e2e8f0);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}

.title {
font-size: 1rem;
font-weight: 600;
letter-spacing: 0.04em;
margin: 0;
color: var(--color-text, #e2e8f0);
}

.currentRole {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.75rem;
color: var(--color-text-muted, #94a3b8);
}

/* ── Hierarchy diagram ───────────────────────────────────────────────────── */

.hierarchyGrid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.75rem;
}

.hierarchyCard {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 0.5rem;
padding: 0.875rem 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.hierarchyCardTitle {
font-size: 0.6875rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
margin: 0;
}

.hierarchyCardLevel {
font-size: 0.625rem;
color: var(--color-text-muted, #64748b);
}

.permList {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0.2rem;
}

.permItem {
font-size: 0.6875rem;
font-family: var(--font-mono, monospace);
color: var(--color-text-muted, #94a3b8);
display: flex;
align-items: center;
gap: 0.3rem;
}

.permItemDirect {
color: #60a5fa;
}

.permDot {
width: 4px;
height: 4px;
border-radius: 50%;
background: currentColor;
flex-shrink: 0;
}

.inheritedLabel {
font-size: 0.5625rem;
color: var(--color-text-muted, #64748b);
margin-left: auto;
}

/* ── Assignments table ───────────────────────────────────────────────────── */

.section {
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.sectionTitle {
font-size: 0.6875rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--color-text-muted, #64748b);
margin: 0;
}

.assignmentTable {
width: 100%;
border-collapse: collapse;
font-size: 0.75rem;
}

.assignmentTable th {
text-align: left;
padding: 0.375rem 0.5rem;
font-size: 0.625rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--color-text-muted, #64748b);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.assignmentTable td {
padding: 0.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
vertical-align: middle;
}

.assignmentTable tr:last-child td {
border-bottom: none;
}

.addressCell {
font-family: var(--font-mono, monospace);
font-size: 0.6875rem;
color: #cbd5e1;
max-width: 12rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.labelCell {
color: var(--color-text-muted, #94a3b8);
font-size: 0.6875rem;
}

.grantedByCell {
font-family: var(--font-mono, monospace);
font-size: 0.625rem;
color: var(--color-text-muted, #64748b);
}

.revokeBtn {
padding: 0.2rem 0.5rem;
border-radius: 0.25rem;
border: 1px solid rgba(239, 68, 68, 0.3);
background: rgba(239, 68, 68, 0.08);
color: #f87171;
font-size: 0.625rem;
cursor: pointer;
transition: background 0.15s;
}

.revokeBtn:hover {
background: rgba(239, 68, 68, 0.18);
}

.empty {
color: var(--color-text-muted, #64748b);
font-size: 0.75rem;
padding: 0.5rem 0;
text-align: center;
}

/* ── Grant form ──────────────────────────────────────────────────────────── */

.grantForm {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
align-items: flex-end;
}

.grantInput {
flex: 1;
min-width: 12rem;
padding: 0.4rem 0.6rem;
border-radius: 0.375rem;
border: 1px solid rgba(255, 255, 255, 0.12);
background: rgba(255, 255, 255, 0.05);
color: #e2e8f0;
font-size: 0.75rem;
font-family: var(--font-mono, monospace);
}

.grantInput::placeholder {
color: #475569;
}

.grantSelect {
padding: 0.4rem 0.6rem;
border-radius: 0.375rem;
border: 1px solid rgba(255, 255, 255, 0.12);
background: rgba(255, 255, 255, 0.05);
color: #e2e8f0;
font-size: 0.75rem;
cursor: pointer;
}

.grantSelect option {
background: #1e293b;
}

.grantBtn {
padding: 0.4rem 0.875rem;
border-radius: 0.375rem;
border: 1px solid rgba(96, 165, 250, 0.3);
background: rgba(96, 165, 250, 0.1);
color: #60a5fa;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s;
white-space: nowrap;
}

.grantBtn:hover {
background: rgba(96, 165, 250, 0.2);
}

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

/* ── Error ───────────────────────────────────────────────────────────────── */

.errorBanner {
padding: 0.5rem 0.75rem;
border-radius: 0.375rem;
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.25);
color: #fca5a5;
font-size: 0.75rem;
}
Loading
Loading