/**
 * Governance Role Explorer - Main Styles
 * A stunning, professional visualization system for program governance
 */

/* ============================================
   CSS VARIABLES & ROOT STYLES
   ============================================ */
:root {
    /* Dark Theme Colors */
    --gre-bg-primary: #0a0e17;
    --gre-bg-secondary: #111827;
    --gre-bg-tertiary: #1a2235;
    --gre-bg-card: #1e293b;
    --gre-bg-hover: #2a3f5f;
    
    /* Text Colors */
    --gre-text-primary: #f1f5f9;
    --gre-text-secondary: #94a3b8;
    --gre-text-muted: #64748b;
    
    /* Role Colors */
    --gre-role-portfolio: #6366f1;
    --gre-role-sponsor: #10b981;
    --gre-role-psc: #ec4899;
    --gre-role-pm: #3b82f6;
    --gre-role-pmo: #64748b;
    --gre-role-component: #f97316;
    --gre-role-stakeholder: #fbbf24;
    
    /* Involvement Type Colors */
    --gre-drafts: #22d3ee;
    --gre-supports: #a78bfa;
    --gre-reviews: #facc15;
    --gre-endorses: #fb923c;
    --gre-approves: #4ade80;
    --gre-escalated: #f87171;
    --gre-informed: #94a3b8;
    --gre-receives: #60a5fa;
    
    /* UI Colors */
    --gre-border: rgba(148, 163, 184, 0.15);
    --gre-shadow: rgba(0, 0, 0, 0.5);
    --gre-glow: rgba(99, 102, 241, 0.3);
    --gre-accent: #8b5cf6;
    --gre-success: #10b981;
    --gre-warning: #f59e0b;
    --gre-danger: #ef4444;
    
    /* Typography */
    --gre-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gre-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --gre-font-display: 'Outfit', 'DM Sans', sans-serif;
    
    /* Spacing */
    --gre-space-xs: 0.25rem;
    --gre-space-sm: 0.5rem;
    --gre-space-md: 1rem;
    --gre-space-lg: 1.5rem;
    --gre-space-xl: 2rem;
    --gre-space-2xl: 3rem;
    
    /* Transitions */
    --gre-transition-fast: 150ms ease;
    --gre-transition-normal: 250ms ease;
    --gre-transition-slow: 400ms ease;
    --gre-transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Border Radius */
    --gre-radius-sm: 6px;
    --gre-radius-md: 12px;
    --gre-radius-lg: 16px;
    --gre-radius-xl: 24px;
    --gre-radius-full: 9999px;
}

/* Light Theme Override */
[data-theme="light"] {
    --gre-bg-primary: #f8fafc;
    --gre-bg-secondary: #ffffff;
    --gre-bg-tertiary: #f1f5f9;
    --gre-bg-card: #ffffff;
    --gre-bg-hover: #e2e8f0;
    --gre-text-primary: #1e293b;
    --gre-text-secondary: #475569;
    --gre-text-muted: #94a3b8;
    --gre-border: rgba(30, 41, 59, 0.12);
    --gre-shadow: rgba(0, 0, 0, 0.1);
}

/* ============================================
   LOADING STATE
   ============================================ */
.governance-role-explorer-root {
    font-family: var(--gre-font-sans);
    min-height: 600px;
    background: var(--gre-bg-primary);
    border-radius: var(--gre-radius-xl);
    overflow: hidden;
    position: relative;
}

.gre-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: var(--gre-space-lg);
    color: var(--gre-text-secondary);
}

.gre-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gre-border);
    border-top-color: var(--gre-accent);
    border-radius: 50%;
    animation: gre-spin 0.8s linear infinite;
}

@keyframes gre-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.gre-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 800px;
    background: var(--gre-bg-primary);
    color: var(--gre-text-primary);
}

/* ============================================
   HEADER
   ============================================ */
.gre-header {
    background: linear-gradient(135deg, var(--gre-bg-secondary) 0%, var(--gre-bg-tertiary) 100%);
    border-bottom: 1px solid var(--gre-border);
    padding: var(--gre-space-lg) var(--gre-space-xl);
    position: relative;
    overflow: hidden;
}

.gre-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--gre-role-portfolio),
        var(--gre-role-sponsor),
        var(--gre-role-psc),
        var(--gre-role-pm),
        var(--gre-role-pmo),
        var(--gre-role-component),
        var(--gre-role-stakeholder)
    );
}

.gre-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gre-space-lg);
    max-width: 1600px;
    margin: 0 auto;
}

.gre-header-title {
    display: flex;
    align-items: center;
    gap: var(--gre-space-md);
}

.gre-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gre-accent), var(--gre-role-psc));
    border-radius: var(--gre-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px var(--gre-glow);
}

.gre-title-text h1 {
    font-family: var(--gre-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gre-text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.gre-title-text p {
    font-size: 0.875rem;
    color: var(--gre-text-secondary);
    margin: 0;
}

.gre-header-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--gre-space-xs);
    padding: var(--gre-space-xs) var(--gre-space-sm);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--gre-radius-full);
    font-size: 0.75rem;
    color: var(--gre-accent);
    font-weight: 500;
}

/* ============================================
   NAVIGATION TABS
   ============================================ */
.gre-tabs {
    display: flex;
    gap: var(--gre-space-xs);
    padding: var(--gre-space-md) var(--gre-space-xl);
    background: var(--gre-bg-secondary);
    border-bottom: 1px solid var(--gre-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.gre-tabs::-webkit-scrollbar {
    display: none;
}

.gre-tab {
    display: flex;
    align-items: center;
    gap: var(--gre-space-sm);
    padding: var(--gre-space-sm) var(--gre-space-lg);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--gre-radius-md);
    color: var(--gre-text-secondary);
    font-family: var(--gre-font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--gre-transition-normal);
    white-space: nowrap;
}

.gre-tab:hover {
    background: var(--gre-bg-hover);
    color: var(--gre-text-primary);
}

.gre-tab.active {
    background: var(--gre-accent);
    color: white;
    border-color: var(--gre-accent);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.gre-tab-icon {
    font-size: 1.125rem;
}

/* ============================================
   VIEW MODES BAR
   ============================================ */
.gre-view-modes {
    display: flex;
    align-items: center;
    gap: var(--gre-space-md);
    padding: var(--gre-space-sm) var(--gre-space-xl);
    background: var(--gre-bg-tertiary);
    border-bottom: 1px solid var(--gre-border);
}

.gre-view-mode-label {
    font-size: 0.75rem;
    color: var(--gre-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.gre-view-mode-buttons {
    display: flex;
    gap: var(--gre-space-xs);
    flex-wrap: wrap;
}

.gre-view-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--gre-space-xs);
    padding: var(--gre-space-xs) var(--gre-space-md);
    background: var(--gre-bg-card);
    border: 1px solid var(--gre-border);
    border-radius: var(--gre-radius-full);
    color: var(--gre-text-secondary);
    font-family: var(--gre-font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--gre-transition-fast);
}

.gre-view-btn:hover {
    background: var(--gre-bg-hover);
    border-color: var(--gre-accent);
    color: var(--gre-text-primary);
}

.gre-view-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--gre-accent);
    color: var(--gre-accent);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.gre-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.gre-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--gre-bg-primary);
}

.gre-svg-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   ROLE LANES
   ============================================ */
.gre-role-lane {
    opacity: 0.5;
    transition: opacity var(--gre-transition-normal);
}

.gre-role-lane.active,
.gre-role-lane:hover {
    opacity: 1;
}

.gre-role-node {
    cursor: pointer;
    transition: transform var(--gre-transition-spring);
}

.gre-role-node:hover {
    transform: scale(1.05);
}

.gre-role-bg {
    fill: var(--gre-bg-card);
    stroke: var(--gre-border);
    stroke-width: 2;
    rx: 16;
    ry: 16;
    transition: all var(--gre-transition-normal);
}

.gre-role-node.active .gre-role-bg,
.gre-role-node:hover .gre-role-bg {
    stroke-width: 3;
}

.gre-role-node[data-role="portfolio"] .gre-role-bg { stroke: var(--gre-role-portfolio); }
.gre-role-node[data-role="sponsor"] .gre-role-bg { stroke: var(--gre-role-sponsor); }
.gre-role-node[data-role="psc"] .gre-role-bg { stroke: var(--gre-role-psc); }
.gre-role-node[data-role="pm"] .gre-role-bg { stroke: var(--gre-role-pm); }
.gre-role-node[data-role="pmo"] .gre-role-bg { stroke: var(--gre-role-pmo); }
.gre-role-node[data-role="component"] .gre-role-bg { stroke: var(--gre-role-component); }
.gre-role-node[data-role="stakeholder"] .gre-role-bg { stroke: var(--gre-role-stakeholder); }

.gre-role-node.active[data-role="portfolio"] .gre-role-bg { fill: rgba(99, 102, 241, 0.15); box-shadow: 0 0 30px var(--gre-role-portfolio); }
.gre-role-node.active[data-role="sponsor"] .gre-role-bg { fill: rgba(16, 185, 129, 0.15); }
.gre-role-node.active[data-role="psc"] .gre-role-bg { fill: rgba(236, 72, 153, 0.15); }
.gre-role-node.active[data-role="pm"] .gre-role-bg { fill: rgba(59, 130, 246, 0.15); }
.gre-role-node.active[data-role="pmo"] .gre-role-bg { fill: rgba(100, 116, 139, 0.15); }
.gre-role-node.active[data-role="component"] .gre-role-bg { fill: rgba(249, 115, 22, 0.15); }
.gre-role-node.active[data-role="stakeholder"] .gre-role-bg { fill: rgba(251, 191, 36, 0.15); }

.gre-role-icon {
    font-size: 1.5rem;
}

.gre-role-label {
    fill: var(--gre-text-primary);
    font-family: var(--gre-font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-anchor: middle;
}

.gre-role-sublabel {
    fill: var(--gre-text-secondary);
    font-family: var(--gre-font-sans);
    font-size: 0.6875rem;
    text-anchor: middle;
}

/* ============================================
   ARTIFACT NODES
   ============================================ */
.gre-artifact-node {
    cursor: pointer;
    transition: transform var(--gre-transition-spring);
}

.gre-artifact-node:hover {
    transform: scale(1.08);
}

.gre-artifact-bg {
    fill: var(--gre-bg-card);
    stroke: var(--gre-text-muted);
    stroke-width: 1.5;
    rx: 8;
    ry: 8;
    transition: all var(--gre-transition-normal);
}

.gre-artifact-node:hover .gre-artifact-bg,
.gre-artifact-node.active .gre-artifact-bg {
    fill: var(--gre-bg-hover);
    stroke: var(--gre-accent);
    stroke-width: 2;
}

.gre-artifact-icon {
    fill: var(--gre-text-secondary);
    font-size: 1.25rem;
}

.gre-artifact-label {
    fill: var(--gre-text-primary);
    font-family: var(--gre-font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-anchor: middle;
}

/* ============================================
   DECISION GATE NODES
   ============================================ */
.gre-gate-node {
    cursor: pointer;
    transition: transform var(--gre-transition-spring);
}

.gre-gate-node:hover {
    transform: scale(1.1);
}

.gre-gate-diamond {
    fill: var(--gre-bg-card);
    stroke: var(--gre-success);
    stroke-width: 2;
    transition: all var(--gre-transition-normal);
}

.gre-gate-node:hover .gre-gate-diamond,
.gre-gate-node.active .gre-gate-diamond {
    fill: rgba(16, 185, 129, 0.2);
    stroke-width: 3;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.gre-gate-icon {
    fill: var(--gre-success);
}

.gre-gate-label {
    fill: var(--gre-text-primary);
    font-family: var(--gre-font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    text-anchor: middle;
}

/* ============================================
   CONNECTIONS & PATHS
   ============================================ */
.gre-connection {
    fill: none;
    stroke-width: 2;
    opacity: 0.3;
    transition: all var(--gre-transition-normal);
}

.gre-connection.active {
    opacity: 1;
    stroke-width: 3;
}

.gre-connection.drafts { stroke: var(--gre-drafts); }
.gre-connection.supports { stroke: var(--gre-supports); stroke-dasharray: 5, 5; }
.gre-connection.reviews { stroke: var(--gre-reviews); stroke-dasharray: 10, 5; }
.gre-connection.endorses { stroke: var(--gre-endorses); stroke-width: 3; }
.gre-connection.approves { stroke: var(--gre-approves); stroke-width: 4; }
.gre-connection.escalated { stroke: var(--gre-escalated); stroke-dasharray: 2, 4; animation: gre-pulse 1.5s ease-in-out infinite; }
.gre-connection.informed { stroke: var(--gre-informed); stroke-dasharray: 3, 6; }
.gre-connection.receives { stroke: var(--gre-receives); }

@keyframes gre-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.gre-connection-arrow {
    fill: currentColor;
}

/* ============================================
   LIFECYCLE BAND
   ============================================ */
.gre-lifecycle-band {
    fill: var(--gre-bg-tertiary);
    stroke: var(--gre-border);
    stroke-width: 1;
}

.gre-lifecycle-phase {
    cursor: pointer;
    transition: fill var(--gre-transition-normal);
}

.gre-lifecycle-phase:hover,
.gre-lifecycle-phase.active {
    fill: var(--gre-bg-hover);
}

.gre-lifecycle-label {
    fill: var(--gre-text-secondary);
    font-family: var(--gre-font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    text-anchor: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gre-lifecycle-phase.active .gre-lifecycle-label,
.gre-lifecycle-phase:hover .gre-lifecycle-label {
    fill: var(--gre-text-primary);
}

/* ============================================
   INSPECTOR PANEL
   ============================================ */
.gre-inspector {
    width: 380px;
    background: var(--gre-bg-secondary);
    border-left: 1px solid var(--gre-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width var(--gre-transition-normal);
}

.gre-inspector.collapsed {
    width: 0;
    border-left: none;
}

.gre-inspector-header {
    padding: var(--gre-space-lg);
    background: var(--gre-bg-tertiary);
    border-bottom: 1px solid var(--gre-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gre-inspector-title {
    display: flex;
    align-items: center;
    gap: var(--gre-space-sm);
}

.gre-inspector-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--gre-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.gre-inspector-icon.role { background: rgba(139, 92, 246, 0.2); }
.gre-inspector-icon.artifact { background: rgba(59, 130, 246, 0.2); }
.gre-inspector-icon.gate { background: rgba(16, 185, 129, 0.2); }

.gre-inspector-name {
    font-family: var(--gre-font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gre-text-primary);
}

.gre-inspector-type {
    font-size: 0.75rem;
    color: var(--gre-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gre-inspector-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--gre-border);
    border-radius: var(--gre-radius-sm);
    color: var(--gre-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--gre-transition-fast);
}

.gre-inspector-close:hover {
    background: var(--gre-bg-hover);
    color: var(--gre-text-primary);
}

.gre-inspector-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--gre-space-lg);
}

.gre-inspector-section {
    margin-bottom: var(--gre-space-xl);
}

.gre-inspector-section-title {
    font-size: 0.75rem;
    color: var(--gre-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--gre-space-sm);
}

.gre-inspector-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gre-text-secondary);
}

.gre-inspector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gre-space-xs);
}

.gre-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--gre-space-xs);
    padding: var(--gre-space-xs) var(--gre-space-sm);
    background: var(--gre-bg-card);
    border: 1px solid var(--gre-border);
    border-radius: var(--gre-radius-full);
    font-size: 0.75rem;
    color: var(--gre-text-secondary);
}

.gre-tag.drafts { border-color: var(--gre-drafts); color: var(--gre-drafts); }
.gre-tag.supports { border-color: var(--gre-supports); color: var(--gre-supports); }
.gre-tag.reviews { border-color: var(--gre-reviews); color: var(--gre-reviews); }
.gre-tag.endorses { border-color: var(--gre-endorses); color: var(--gre-endorses); }
.gre-tag.approves { border-color: var(--gre-approves); color: var(--gre-approves); }

/* ============================================
   EXAM MODE HOTSPOTS
   ============================================ */
.gre-confusion-card {
    background: var(--gre-bg-card);
    border: 1px solid var(--gre-border);
    border-radius: var(--gre-radius-md);
    padding: var(--gre-space-md);
    margin-bottom: var(--gre-space-md);
    cursor: pointer;
    transition: all var(--gre-transition-normal);
}

.gre-confusion-card:hover {
    border-color: var(--gre-danger);
    background: rgba(239, 68, 68, 0.05);
}

.gre-confusion-card.active {
    border-color: var(--gre-danger);
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.gre-confusion-title {
    display: flex;
    align-items: center;
    gap: var(--gre-space-sm);
    font-weight: 600;
    color: var(--gre-text-primary);
    margin-bottom: var(--gre-space-sm);
}

.gre-confusion-icon {
    color: var(--gre-danger);
}

.gre-confusion-explanation {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gre-text-secondary);
}

/* ============================================
   ROLE CARDS (Role Explorer View)
   ============================================ */
.gre-role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gre-space-md);
    padding: var(--gre-space-xl);
}

.gre-role-card {
    background: var(--gre-bg-card);
    border: 2px solid var(--gre-border);
    border-radius: var(--gre-radius-lg);
    padding: var(--gre-space-lg);
    cursor: pointer;
    transition: all var(--gre-transition-normal);
    position: relative;
    overflow: hidden;
}

.gre-role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.gre-role-card[data-role="portfolio"]::before { background: var(--gre-role-portfolio); }
.gre-role-card[data-role="sponsor"]::before { background: var(--gre-role-sponsor); }
.gre-role-card[data-role="psc"]::before { background: var(--gre-role-psc); }
.gre-role-card[data-role="pm"]::before { background: var(--gre-role-pm); }
.gre-role-card[data-role="pmo"]::before { background: var(--gre-role-pmo); }
.gre-role-card[data-role="component"]::before { background: var(--gre-role-component); }
.gre-role-card[data-role="stakeholder"]::before { background: var(--gre-role-stakeholder); }

.gre-role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--gre-shadow);
}

.gre-role-card.active {
    border-color: var(--gre-accent);
    box-shadow: 0 0 30px var(--gre-glow);
}

.gre-role-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--gre-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--gre-space-md);
}

.gre-role-card[data-role="portfolio"] .gre-role-card-icon { background: rgba(99, 102, 241, 0.15); color: var(--gre-role-portfolio); }
.gre-role-card[data-role="sponsor"] .gre-role-card-icon { background: rgba(16, 185, 129, 0.15); color: var(--gre-role-sponsor); }
.gre-role-card[data-role="psc"] .gre-role-card-icon { background: rgba(236, 72, 153, 0.15); color: var(--gre-role-psc); }
.gre-role-card[data-role="pm"] .gre-role-card-icon { background: rgba(59, 130, 246, 0.15); color: var(--gre-role-pm); }
.gre-role-card[data-role="pmo"] .gre-role-card-icon { background: rgba(100, 116, 139, 0.15); color: var(--gre-role-pmo); }
.gre-role-card[data-role="component"] .gre-role-card-icon { background: rgba(249, 115, 22, 0.15); color: var(--gre-role-component); }
.gre-role-card[data-role="stakeholder"] .gre-role-card-icon { background: rgba(251, 191, 36, 0.15); color: var(--gre-role-stakeholder); }

.gre-role-card-name {
    font-family: var(--gre-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gre-text-primary);
    margin-bottom: var(--gre-space-xs);
}

.gre-role-card-desc {
    font-size: 0.8125rem;
    color: var(--gre-text-secondary);
    line-height: 1.5;
}

/* ============================================
   LEGEND
   ============================================ */
.gre-legend {
    padding: var(--gre-space-md) var(--gre-space-xl);
    background: var(--gre-bg-secondary);
    border-top: 1px solid var(--gre-border);
    display: flex;
    align-items: center;
    gap: var(--gre-space-xl);
    flex-wrap: wrap;
}

.gre-legend-group {
    display: flex;
    align-items: center;
    gap: var(--gre-space-md);
}

.gre-legend-title {
    font-size: 0.6875rem;
    color: var(--gre-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.gre-legend-items {
    display: flex;
    gap: var(--gre-space-sm);
    flex-wrap: wrap;
}

.gre-legend-item {
    display: flex;
    align-items: center;
    gap: var(--gre-space-xs);
    font-size: 0.75rem;
    color: var(--gre-text-secondary);
}

.gre-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.gre-legend-line {
    width: 24px;
    height: 3px;
    border-radius: 2px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes gre-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gre-scale-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes gre-slide-in-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes gre-path-draw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes gre-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 5px currentColor); }
    50% { filter: drop-shadow(0 0 20px currentColor); }
}

.gre-animate-fade-in {
    animation: gre-fade-in 0.4s ease-out forwards;
}

.gre-animate-scale-in {
    animation: gre-scale-in 0.3s ease-out forwards;
}

.gre-animate-slide-in {
    animation: gre-slide-in-right 0.4s ease-out forwards;
}

.gre-animate-path {
    stroke-dasharray: 1000;
    animation: gre-path-draw 1s ease-out forwards;
}

.gre-animate-glow {
    animation: gre-glow-pulse 2s ease-in-out infinite;
}

/* ============================================
   TOOLTIPS
   ============================================ */
.gre-tooltip {
    position: absolute;
    z-index: 1000;
    background: var(--gre-bg-card);
    border: 1px solid var(--gre-border);
    border-radius: var(--gre-radius-md);
    padding: var(--gre-space-sm) var(--gre-space-md);
    box-shadow: 0 8px 24px var(--gre-shadow);
    font-size: 0.8125rem;
    color: var(--gre-text-primary);
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: all var(--gre-transition-fast);
}

.gre-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1200px) {
    .gre-inspector {
        width: 320px;
    }
}

@media (max-width: 992px) {
    .gre-main {
        flex-direction: column;
    }
    
    .gre-inspector {
        width: 100%;
        max-height: 400px;
        border-left: none;
        border-top: 1px solid var(--gre-border);
    }
    
    .gre-inspector.collapsed {
        max-height: 0;
    }
}

@media (max-width: 768px) {
    .gre-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gre-tabs {
        padding: var(--gre-space-sm) var(--gre-space-md);
    }
    
    .gre-tab {
        padding: var(--gre-space-xs) var(--gre-space-md);
        font-size: 0.8125rem;
    }
    
    .gre-view-modes {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gre-role-cards {
        grid-template-columns: 1fr;
    }
    
    .gre-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */
.gre-inspector-content::-webkit-scrollbar {
    width: 6px;
}

.gre-inspector-content::-webkit-scrollbar-track {
    background: var(--gre-bg-primary);
}

.gre-inspector-content::-webkit-scrollbar-thumb {
    background: var(--gre-bg-hover);
    border-radius: 3px;
}

.gre-inspector-content::-webkit-scrollbar-thumb:hover {
    background: var(--gre-text-muted);
}
