/* ==========================================================================
   ENTERPRISE OPERATIONS HUB CUSTOM STYLES — SONOMA LIQUID GLASS DESIGN
   ========================================================================== */

:root {
    /* Premium Slate/Graphite Palette */
    --bg-base: #08090d;
    --bg-surface: rgba(13, 15, 23, 0.55);
    --bg-dropdown: rgba(15, 17, 26, 0.85);
    --bg-card: rgba(20, 22, 33, 0.45);
    --bg-hover: rgba(255, 255, 255, 0.04);
    
    /* Fine borders */
    --border-color: rgba(255, 255, 255, 0.05);
    --border-highlight: rgba(255, 255, 255, 0.1);
    
    /* Subtle Accents (Harmonious enterprise-grade slate colors) */
    --accent-blue: #3b82f6;      /* Slate Blue */
    --accent-indigo: #6366f1;    /* Deep Indigo */
    --accent-green: #10b981;     /* Emerald Green */
    --accent-yellow: #f59e0b;    /* Amber Yellow */
    --accent-red: #ef4444;       /* Ruby Red */
    --accent-cyan: #06b6d4;      /* Teal/Cyan */
    --text-primary: #f8fafc;     /* Ice White */
    --text-secondary: #94a3b8;   /* Slate Gray */
    --text-muted: #475569;       /* Muted Gray */
    
    /* Sonoma Glassmorphism */
    --glass-blur: blur(24px);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --glass-shadow-floating: 0 20px 50px rgba(0, 0, 0, 0.4);
    --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); /* Physics-like ease-out */
}

/* Base Body Layout Override */
body {
    background-color: var(--bg-base) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    overflow: hidden;
    position: relative;
}

/* Dimming overlay when any dropdown is open */
body::after {
    content: '';
    position: fixed;
    top: 72px; /* starts below topbar */
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 5, 8, 0.35); /* very subtle dim */
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body:has(.topbar-nav-category-container:hover)::after {
    opacity: 1;
}

/* Ambient Ambient Light Gradients in Background */
.mesh-bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.03) 0%, transparent 45%);
    z-index: -10;
    pointer-events: none;
}

.glass-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -9;
    pointer-events: none;
    opacity: 0.15;
    transition: all 8s ease-in-out infinite alternate;
}
.blob-1 {
    top: 20%;
    left: 20%;
    width: 350px;
    height: 350px;
    background: var(--accent-indigo);
}
.blob-2 {
    bottom: 10%;
    right: 15%;
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
}

/* Secure SSH Auth Overlay */
.soc-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 7, 10, 0.9);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.soc-auth-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Glassmorphic elements */
.glass-card.sonoma-card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
}

/* Navigation Bar Categories */
.topbar-nav-category-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.topbar-nav-category {
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    border: 1px solid transparent;
}

.topbar-nav-category:hover,
.topbar-nav-category-container:hover .topbar-nav-category {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.topbar-nav-category.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

/* Floating Mega Dropdowns */
.mega-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: -20px;
    width: 680px;
    background: linear-gradient(180deg, rgba(16, 18, 30, 0.85) 0%, rgba(10, 11, 18, 0.9) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.06), /* Inner glow at top edge */
        0 20px 50px rgba(0, 0, 0, 0.45); /* Large soft shadow underneath */
    border-radius: 16px;
    padding: 1.25rem;
    display: none;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.25rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

/* Trigger display on hover of the container */
.topbar-nav-category-container:hover .mega-dropdown {
    display: grid;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Push dropdowns from the right side back left so they don't break viewport edge */
.topbar-nav-category-container:nth-last-child(-n+4) .mega-dropdown {
    left: auto;
    right: -20px;
}

/* Mega dropdown internal grid */
.mega-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.mega-dropdown-grid:only-child,
.mega-dropdown-grid:has(> .mega-dropdown-column:only-child) {
    grid-template-columns: 1fr;
}

.mega-dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Sections Structure inside Dropdown */
.mega-dropdown-section-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.mega-dropdown-section-group:last-child {
    margin-bottom: 0;
}

.mega-dropdown-section-header {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    padding-left: 0.5rem;
    margin-bottom: 0.25rem;
    user-select: none;
}

.mega-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between; /* To float the arrow and badge on the right */
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    background: transparent;
    border: 1px solid transparent;
}

/* Left elements containing icon and text */
.mega-dropdown-link-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.mega-dropdown-icon {
    font-size: 1.1rem;
}

.mega-dropdown-link-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mega-dropdown-link-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75); /* White 70%-80% opacity on idle */
    transition: color 0.15s ease;
}

.mega-dropdown-link-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.65;
    line-height: 1.35;
}

/* Right side elements containing badge and right arrow */
.mega-dropdown-link-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Status Indicator badges */
.mega-dropdown-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}
.mega-dropdown-badge.live {
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.mega-dropdown-badge.critical {
    background: rgba(239, 68, 68, 0.08);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.mega-dropdown-badge.beta {
    background: rgba(6, 182, 212, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}
.mega-dropdown-badge.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Right Arrow → */
.mega-dropdown-arrow {
    font-size: 0.85rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    color: var(--accent-blue);
}

/* Hover Interaction: slight left shift, bright text, show arrow, background highlight */
.mega-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transform: translateX(3px); /* Subtle shift to the right */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mega-dropdown-link:hover .mega-dropdown-link-title {
    color: #ffffff; /* Bright white */
}

.mega-dropdown-link:hover .mega-dropdown-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right-side Page Previews inside Dropdowns */
.mega-dropdown-preview {
    border-left: 1px solid var(--border-color);
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 0 8px 8px 0;
}

.preview-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.preview-metric {
    margin-bottom: 0.75rem;
}

.preview-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.preview-sub {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.preview-footer-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Left Sidebar Workspace Navigation */
.sidebar-item-staff {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    user-select: none;
}

.sidebar-item-staff:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sidebar-item-staff.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border-color: var(--border-highlight);
    box-shadow: var(--glass-shadow);
}

/* Tab View Switchings */
.tab-view {
    display: none;
    height: 100%;
}

.tab-view.active {
    display: block;
    animation: tabFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Operations Overview Floating Cards */
.server-glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.server-glass-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Double Pane Tickets Queue */
.ticket-row-card {
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ticket-row-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-highlight);
}

.ticket-row-card.active {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

.ticket-msg-bubble {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    max-width: 80%;
    font-size: 0.78rem;
    line-height: 1.4;
}

.ticket-msg-bubble.user {
    background: var(--bg-hover);
    color: var(--text-primary);
    align-self: flex-start;
    border: 1px solid var(--border-color);
}

.ticket-msg-bubble.staff {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    align-self: flex-end;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.ticket-msg-bubble.internal {
    background: rgba(245, 158, 11, 0.05);
    color: var(--accent-yellow);
    align-self: center;
    border: 1px dashed rgba(245, 158, 11, 0.2);
    width: 90%;
    font-style: italic;
}

/* VS Code Browser-Based IDE Styles */
.file-explorer-item {
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    transition: var(--transition-smooth);
    user-select: none;
    color: #94a3b8;
}

.file-explorer-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
}

.file-explorer-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: #f8fafc;
    font-weight: 500;
}

/* RBAC Permission matrix tags */
.rbac-cell-state {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-smooth);
    display: inline-block;
    min-width: 80px;
    text-align: center;
    letter-spacing: 0.2px;
}

.rbac-cell-state.allow {
    background: rgba(16, 185, 129, 0.06);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.rbac-cell-state.deny {
    background: rgba(239, 68, 68, 0.06);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.rbac-cell-state.conditional {
    background: rgba(245, 158, 11, 0.06);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.rbac-cell-state.inherited {
    background: rgba(99, 102, 241, 0.06);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* Telemetry Log Feed rows */
.telemetry-row {
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.01);
    animation: telemetryFadeIn 0.3s ease;
}

@keyframes telemetryFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.telemetry-row span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
}

/* Tables spacing */
th, td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.005);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   UNIFIED DROPDOWNS OVERRIDES & PROFILE STYLE
   ========================================== */

/* Profile Trigger Pill */
.profile-trigger-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 16px 4px 4px;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.profile-trigger-pill:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-trigger-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    overflow: hidden;
}

.profile-trigger-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-trigger-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* User Profile Dropdown Menu Card */
.landing-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    background: linear-gradient(180deg, rgba(16, 18, 28, 0.96) 0%, rgba(10, 11, 18, 0.98) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 45px rgba(0, 0, 0, 0.55);
    z-index: 1005;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-profile-menu:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    display: flex !important;
}

/* User Header in Dropdown */
.profile-drop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
}

.profile-drop-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.user-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-drop-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.profile-drop-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-drop-role {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #ff4a4a; /* red/orange Director role */
}

.profile-drop-role .crown-icon {
    width: 12px;
    height: 12px;
    color: #ff4a4a;
    fill: #ff4a4a;
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 6px;
}

/* Dropdown Options */
.landing-profile-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: none;
    color: #cbd5e1;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.landing-profile-option svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.landing-profile-option:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-primary) !important;
    padding-left: 14px;
}

.landing-profile-option:hover svg {
    color: var(--text-primary);
}

.landing-profile-option:active {
    transform: scale(0.98);
}

/* Exit/Logout Option styling */
.landing-profile-option.logout-option {
    color: #ef4444;
}

.landing-profile-option.logout-option svg {
    color: #ef4444;
}

.landing-profile-option.logout-option:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
}

.landing-profile-option.logout-option:hover svg {
    color: #f87171;
}

/* ==========================================================================
   CUSTOMIZABLE RBAC DUAL-PANE PLATFORM LAYOUT
   ========================================================================== */

/* Role List Items */
.rbac-role-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    user-select: none;
}

.rbac-role-item:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
}

.rbac-role-item.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--glass-shadow);
}

.rbac-role-item::after {
    content: "→";
    position: absolute;
    right: 1.15rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition-smooth);
}

.rbac-role-item.active::after {
    opacity: 1;
    transform: translateX(0);
    color: var(--text-secondary);
}

.rbac-role-item:hover::after {
    opacity: 0.5;
    transform: translateX(0);
}

.rbac-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.rbac-role-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.rbac-role-name {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.rbac-role-meta {
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Quick Edit/Delete Row Actions */
.rbac-role-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10;
}

.rbac-role-item:hover .rbac-role-actions {
    opacity: 1;
}

/* Hide chevron indicator when hovering to make room for buttons */
.rbac-role-item:hover::after {
    display: none !important;
}

.btn-rbac-action {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.65rem;
    transition: var(--transition-smooth);
    color: var(--text-secondary);
}

.btn-rbac-action:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn-rbac-action.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

/* Page Access Grid Cards */
.rbac-page-card {
    background: rgba(13, 15, 23, 0.35) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.rbac-page-card:hover {
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.02) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Custom premium switch toggles */
.rbac-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}

.rbac-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rbac-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rbac-slider::before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: #cbd5e1;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.rbac-switch input:checked + .rbac-slider {
    background-color: var(--role-accent, var(--accent-indigo));
    border-color: rgba(255, 255, 255, 0.1);
}

.rbac-switch input:checked + .rbac-slider::before {
    transform: translateX(18px);
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Category header formatting */
.rbac-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.35rem;
}

.rbac-category-title {
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rbac-disable-all-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.rbac-disable-all-btn:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.08);
}
