        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f5f5f5;
        }
        .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
        header { background: #1a1a2e; color: white; padding: 1rem 0; }
        header .container { display: flex; justify-content: space-between; align-items: center; }
        header h1 { font-size: 1.5rem; }
        main { padding: 2rem 0; min-height: calc(100vh - 140px); }
        .btn {
            display: inline-block;
            padding: 0.75rem 1.5rem;
            border-radius: 4px;
            text-decoration: none;
            cursor: pointer;
            border: none;
            font-size: 1rem;
        }
        .btn-primary { background: #0078d4; color: white; }
        .btn-primary:hover { background: #106ebe; }
        .btn-microsoft {
            background: #2f2f2f;
            color: white;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }
        .btn-microsoft:hover { background: #1a1a1a; }
        .card { background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        footer { background: #1a1a2e; color: #888; padding: 1rem 0; text-align: center; }

        /* Navigation styles */
        .main-nav { display: flex; align-items: center; gap: 2rem; }
        .nav-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: white; }
        .nav-brand img { height: 80px; }
        .nav-brand-text { font-size: 1.25rem; font-weight: 600; }
        .nav-links { display: flex; align-items: center; gap: 0.25rem; }
        .nav-item {
            color: white;
            text-decoration: none;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            transition: background 0.2s;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            font-family: inherit;
        }
        .nav-item:hover { background: rgba(255,255,255,0.1); }
        .nav-item.active { background: rgba(255,255,255,0.15); }

        /* Dropdown styles */
        .nav-dropdown-container { position: relative; }
        .nav-dropdown-trigger { display: flex; align-items: center; gap: 0.25rem; }
        .nav-dropdown-trigger::after {
            content: '';
            border: 4px solid transparent;
            border-top-color: currentColor;
            margin-top: 2px;
        }
        .nav-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            min-width: 200px;
            padding: 0.5rem 0;
            display: none;
            z-index: 1000;
            margin-top: 0.5rem;
        }
        /* Bridge the gap between trigger and dropdown to maintain hover state */
        .nav-dropdown::before {
            content: '';
            position: absolute;
            top: -0.5rem;
            left: 0;
            right: 0;
            height: 0.5rem;
            background: transparent;
        }
        .nav-dropdown-container:hover .nav-dropdown,
        .nav-dropdown-container:focus-within .nav-dropdown { display: block; }
        .nav-dropdown-container.show .nav-dropdown { display: block; }
        .nav-dropdown-item {
            display: block;
            padding: 0.5rem 1rem;
            color: #333;
            text-decoration: none;
            transition: background 0.2s;
        }
        .nav-dropdown-item:hover { background: #f5f5f5; }
        .nav-dropdown-item.active { background: #e8f4fd; color: #0078d4; }
        .nav-section { padding: 0.25rem 0; }
        .nav-section--admin { border-top: 1px solid #eee; margin-top: 0.25rem; padding-top: 0.5rem; }
        .nav-section-label {
            display: block;
            padding: 0.25rem 1rem;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #888;
        }
        .nav-item-badge {
            font-size: 0.625rem;
            padding: 0.125rem 0.375rem;
            border-radius: 2px;
            margin-left: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background: #fff3cd;
            color: #856404;
        }

        /* User menu */
        .nav-user { margin-left: auto; }
        .nav-user-trigger {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 4px;
        }
        .nav-user-trigger:hover { background: rgba(255,255,255,0.1); }
        .nav-user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid rgba(255,255,255,0.3);
        }
        .nav-user-avatar-placeholder {
            display: flex;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.875rem;
            font-weight: bold;
        }
        .nav-user-dropdown { right: 0; left: auto; }
        .nav-user-info {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #eee;
        }
        .nav-user-name { font-weight: 600; color: #333; }
        .nav-user-email { font-size: 0.875rem; color: #666; }
        .nav-dropdown-item--danger { color: #dc3545; }
        .nav-dropdown-item--danger:hover { background: #fff5f5; }

        /* Health Status Dot */
        .nav-user-trigger { position: relative; }
        .health-status-dot {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 2px solid #1a1a2e;
            background: #6c757d;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.2s;
        }
        .health-status-dot:hover { transform: scale(1.2); }
        .health-status-dot.healthy { background: #28a745; }
        .health-status-dot.degraded { background: #ffc107; }
        .health-status-dot.unhealthy { background: #dc3545; }
        .health-status-dot.unknown { background: #6c757d; }
        .health-status-dot.connecting {
            background: #6c757d;
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .health-status-tooltip {
            position: absolute;
            bottom: calc(100% + 8px);
            right: 0;
            background: #333;
            color: white;
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
            z-index: 1001;
            pointer-events: none;
        }
        .health-status-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            right: 10px;
            border: 6px solid transparent;
            border-top-color: #333;
        }
        .health-status-container:hover .health-status-tooltip {
            opacity: 1;
            visibility: visible;
        }
        .health-status-container {
            position: relative;
            display: inline-block;
            text-decoration: none;
            color: inherit;
        }
        a.health-status-container:hover { text-decoration: none; }
        .health-tooltip-status { font-weight: 600; margin-bottom: 0.25rem; }
        .health-tooltip-status.healthy { color: #28a745; }
        .health-tooltip-status.degraded { color: #ffc107; }
        .health-tooltip-status.unhealthy { color: #dc3545; }
        .health-tooltip-detail { color: #aaa; font-size: 0.625rem; }

        /* Role impersonation styles */
        .impersonation-banner {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: white;
            padding: 0.75rem 0;
            text-align: center;
            font-size: 0.875rem;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        .impersonation-banner-inner {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
        }
        .impersonation-badge {
            background: rgba(255,255,255,0.3);
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .role-switcher {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #eee;
        }
        .role-switcher-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
            display: block;
        }
        .role-switcher select {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.875rem;
            background: white;
            cursor: pointer;
        }
        .role-switcher select:focus {
            outline: none;
            border-color: #0078d4;
        }
