:root {
    /* Base */
    --bg-dark:        #1d1d1d;
    --bg-base:        #222121;
    --bg-surface:     #292725;
    --bg-elevated:    #302e2c;
    --bg-hover:       #3f3a38;
    --border:         #8A817C;
    --text-muted:     #ada89f;
    --text-secondary: #dbd6ca;
    --text-primary:   #ececec;

    /* Accent */
    --accent:         #FBCC5B;
    --accent-hover:   #F5B455;
    --accent-mid:     #E8924E;
    --accent-coral:   #B85878;

    /* Severity */
    --sev-critical:       #B84040;
    --sev-high:           #B87040;
    --sev-medium:         #FBCC5B;
    --sev-low:            #62B86A;
    --sev-info:           #6A8A9A;
    --sev-none:           #8A817C;
}
[data-theme="light"] {
    --bg-dark:        #ecebeb;
    --bg-base:        #dbd7d1;
    --bg-surface:     #e4e1df;
    --bg-elevated:    #dfdddb;
    --bg-hover:       #c2beb6;
    --border:         #9e9c94;
    --text-muted:     #4b4f57;
    --text-secondary: #2E3238;
    --text-primary:   #1E2024;

    --accent:         #d39b17;
    --accent-hover:   #cf8413;
    --accent-mid:     #d6762c;
    --accent-coral:   #B85878;

    --sev-critical:   #b92834;
    --sev-high:       #d6762c;
    --sev-medium:     #d39b17;
    --sev-low:        #187722;
    --sev-info:       #254b5e;
    --sev-none:       #575b63;
}

body{
    font-family: 'Geist', sans-serif;
    letter-spacing: 0.07rem;
    background-color: var(--bg-base);
    color: var(--text-primary);
    padding: 0;
    margin: 0 0 0 48px;
    overflow: hidden;

}

body::before {
content: '';
position: fixed;
inset: 0;
background-image:
    linear-gradient(rgba(251,204,91,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,204,91,0.02) 1px, transparent 1px);
background-size: 32px 32px;
pointer-events: none;
z-index: -1;
}

[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

.versionTag{
    position: absolute;
    bottom: 8px;
    right: 12px;
    text-align: end;
    font-size: 12px;
    color: var(--border);
    background-color: var(--bg-base);
    padding: 4px 8px;
}

#sidebarInner {
    box-shadow: 4px -8px 12px rgba(0, 0, 0, 0.17);
}

.logEntry {
    padding: 10px 14px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 4px;
    transition: border-color 0.15s;
    cursor: default;
}

.logEntry:hover {
    border-color: var(--bg-elevated);
}

.logEntry .detail {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.text-muted{
    font-size: 12px;
    color: var(--text-muted);
}

hr{
  border-color: var(--border);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.error-shake {
    animation: shake 0.4s ease;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* Page header */
.page-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.eyebrow { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; font-family: 'Geist Mono', monospace; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; }
.page-title span { color: var(--accent); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.6; }

/* Component section */
.comp-section { margin-bottom: 56px; }
.comp-section-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.comp-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.comp-block-label {
  padding: 10px 16px;
  font-size: 11px;
  font-family: 'Geist Mono', monospace;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comp-preview {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comp-preview.vertical { flex-direction: column; align-items: flex-start; }
.comp-preview.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comp-preview.dark { background: var(--bg-base); }

.comp-code {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
  background: var(--bg-base);
}

.comp-code .kw { color: var(--accent); }
.comp-code .attr { color: var(--accent-mid); }
.comp-code .val { color: var(--sev-low); }

.accessibility-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

.a11y-icon { color: var(--sev-info); flex-shrink: 0; font-size: 12px; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Geist', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary { background: var(--accent); color: var(--bg-base); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--secondary { background: var(--bg-elevated); color: var(--text-secondary); border-color: var(--border); }
.btn--secondary:hover { background: var(--border); color: var(--text-primary); }

.btn--danger { background: transparent; color: var(--sev-critical); border-color: var(--sev-critical); }
.btn--danger:hover { background: rgba(184,64,64,0.12); }

.btn--ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn--ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }

.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--lg { padding: 12px 24px; font-size: 20px; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── BADGES ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge--critical { background: rgba(184,64,64,0.15); color: var(--sev-critical); border: 1px solid rgba(184,64,64,0.3); }
.badge--high     { background: rgba(184,112,64,0.15); color: var(--sev-high); border: 1px solid rgba(184,112,64,0.3); }
.badge--medium   { background: rgba(251,204,91,0.12); color: var(--sev-medium); border: 1px solid rgba(251,204,91,0.3); }
.badge--low      { background: rgba(98,184,106,0.12); color: var(--sev-low); border: 1px solid rgba(98,184,106,0.3); }
.badge--info     { background: rgba(106,138,154,0.15); color: var(--sev-info); border: 1px solid rgba(106,138,154,0.3); }
.badge--none     { background: rgba(138,129,124,0.12); color: var(--text-muted); border: 1px solid var(--border); }
.badge--accent   { background: rgba(251,204,91,0.12); color: var(--accent); border: 1px solid rgba(251,204,91,0.3); }

.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── INPUTS ──────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.field-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.field-hint { font-size: 11px; color: var(--text-muted); }
.field-error { font-size: 11px; color: var(--sev-critical); }

.input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-sizing: border-box;
  color: var(--text-primary);
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251,204,91,0.1); }
.input.error { border-color: var(--sev-critical); }
.input.error:focus { box-shadow: 0 0 0 3px rgba(184,64,64,0.1); }
.input:disabled { opacity: 0.4; cursor: not-allowed; }

.select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238A817C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251,204,91,0.1); }

.checkbox-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-label { font-size: 13px; color: var(--text-secondary); }

/* ── CARDS ───────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; font-family: 'Geist Mono', monospace; }
.stat-value { font-size: 32px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.stat-delta { font-size: 12px; color: var(--text-muted); font-family: 'Geist Mono', monospace; }
.stat-delta.up { color: var(--sev-low); }
.stat-delta.down { color: var(--sev-critical); }

/* ── TABLE ───────────────────────────────────────── */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.table { width: 100%; border-collapse: collapse; }

.table th {
  padding: 10px 16px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  text-align: left;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(74,71,68,0.5);
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── LOG ENTRY ───────────────────────────────────── */
.log-entry {
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 4px;
  transition: border-color 0.15s;
  cursor: default;
  width: 100%;
}

.log-entry:hover { border-color: var(--bg-elevated); }

.log-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-entry-left { display: flex; align-items: center; gap: 10px; }

.sev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.log-type { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.log-dash { font-size: 13px; color: var(--text-muted); }
.log-space { font-size: 13px; color: var(--text-secondary); }
.log-time { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

.log-detail { margin-top: 5px; margin-left: 18px; display: flex; gap: 8px; }
.log-source, .log-id { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-muted); }
.log-sep { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--border); }

/* ── MODAL ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 480px;
  max-width: calc(100vw - 48px);
  transform: translateY(8px);
  transition: transform 0.2s;
  overflow: visible;
}

.modal-backdrop.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 28px; height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s;
}

.modal-close:hover { color: var(--text-primary); border-color: var(--text-muted); }

.modal-body { 
  font-size: 13px; 
  color: var(--text-muted); 
  line-height: 1.7; 
  margin-bottom: 20px; 
  overflow: visible;
}

.modal-footer { display: flex; justify-content: flex-end; gap: 8px; }

/* ── ALERTS ──────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  width: 100%;
}

.alert-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-content {}
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-body { font-size: 12px; opacity: 0.8; }

.alert--info { background: rgba(106,138,154,0.12); border: 1px solid rgba(106,138,154,0.3); color: var(--sev-info); }
.alert--success { background: rgba(98,184,106,0.1); border: 1px solid rgba(98,184,106,0.25); color: var(--sev-low); }
.alert--warning { background: rgba(251,204,91,0.08); border: 1px solid rgba(251,204,91,0.25); color: var(--sev-medium); }
.alert--danger { background: rgba(184,64,64,0.1); border: 1px solid rgba(184,64,64,0.25); color: var(--sev-critical); }

/* ── TOAST ───────────────────────────────────────── */
.toast-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.toast-demo.success { border-left: 3px solid var(--sev-low); }
.toast-demo.danger { border-left: 3px solid var(--sev-critical); }
.toast-demo.warning { border-left: 3px solid var(--sev-medium); }

.toast-dismiss { color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; background: none; border: none; }
.toast-dismiss:hover { color: var(--text-primary); }

/* ── EMPTY STATE ─────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}

.empty-icon { font-size: 32px; opacity: 0.4; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty-body { font-size: 13px; color: var(--text-muted); max-width: 280px; line-height: 1.6; }

/* ── BREADCRUMB ──────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: 'Geist Mono', monospace;
}

.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item.current { color: var(--text-primary); }
.breadcrumb-sep { color: var(--border); }

/* ── TABS ────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--border); gap: 0; margin-bottom: 20px; }

.tab-item {
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Geist', sans-serif;
}

.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* ── TOGGLE ──────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle input:checked + .toggle-track::after {
  left: calc(100% - 18px);
  background: #222121;
}

.toggle-label { font-size: 13px; color: var(--text-secondary); }

/* ── PROGRESS ────────────────────────────────────── */
.progress-wrap { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.progress-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.progress-track { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.3s; }
.progress-bar.danger { background: var(--sev-critical); }
.progress-bar.success { background: var(--sev-low); }

/* ── DIVIDER ─────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'Geist Mono', monospace;
}
.divider-label::before, .divider-label::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}


/* ── PERMISSION TREE ─────────────────────────────── */
.perm-module {
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.perm-module-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    background: var(--bg-elevated);
    list-style: none;
    user-select: none;
    transition: background 0.1s;
}

.perm-module-summary::-webkit-details-marker { display: none; }
.perm-module-summary:hover { background: var(--bg-hover); }

.perm-module-name {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.perm-module-count {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

.perm-module-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perm-feature {
    border-radius: 4px;
    overflow: hidden;
}

.perm-feature-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--bg-surface);
    border-radius: 4px;
    transition: background 0.1s;
}

.perm-feature-summary::-webkit-details-marker { display: none; }
.perm-feature-summary:hover { background: var(--bg-elevated); }

.perm-feature-name {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

.perm-feature-count {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

.perm-actions {
    padding: 6px 10px 8px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-surface);
}

.perm-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
}

.perm-action-row:hover { background: var(--bg-elevated); }

.perm-action-row input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.perm-action-label {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
}

.perm-action-row input:checked ~ .perm-action-label {
    color: var(--accent);
}

.perm-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.perm-editor-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    line-height: 1.1;
}

.perm-editor-meta {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.perm-editor-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.role-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.role-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
}

.role-item.selected {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.role-item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.role-item.selected .role-item-name {
    color: var(--accent);
}

.role-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.5;
}

.role-select {
    position: relative;
    width: 100%;
}

.role-select-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Geist', sans-serif;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s;
}

.role-select-trigger:focus { border-color: var(--accent); }

.role-select-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 2px;
    display: none;
}

.role-select-list.open {
    display: flex;
}

.role-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
}

.role-select-option:hover { background: var(--bg-elevated); }

.role-select-option input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.role-select-option-label {
    font-size: 13px;
    color: var(--text-secondary);
}