/* Snapshot of working home dashboard styles, 2026-11-07. */

        :root {
            --bg-primary: #0f0f14;
            --bg-card: #1a1a24;
            --bg-card-hover: #22222e;
            --border: rgba(255, 255, 255, 0.08);
            --text-primary: #f0f0f5;
            --text-secondary: #9090a0;
            --accent-purple: #a855f7;
            --accent-green: #22c55e;
            --accent-blue: #3b82f6;
            --accent-yellow: #eab308;
            --accent-orange: #f97316;
            --accent-red: #ef4444;
            --accent-gray: #374151;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            line-height: 1.5;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
        }

        /* Header */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo {
            font-size: 2rem;
        }

        .title {
            font-size: 1.75rem;
            font-weight: 600;
        }

        .subtitle {
            color: var(--text-secondary);
            font-size: 0.875rem;
        }

        /* Status Indicators */
        .status-area {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 24px;
            font-size: 0.875rem;
        }

        .context-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 24px;
            font-size: 0.875rem;
        }

        .context-bar {
            width: 60px;
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
        }

        .context-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.3s ease, background 0.3s ease;
        }

        .context-healthy { background: #22c55e; }
        .context-moderate { background: #eab308; }
        .context-warning { background: #f97316; }
        .context-critical { background: #ef4444; }

        .status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        .status-available { background: var(--accent-green); }
        .status-thinking { background: var(--accent-yellow); }
        .status-creating { background: var(--accent-blue); }
        .status-learning { background: var(--accent-orange); }
        .status-frustrated { background: var(--accent-gray); }
        .status-partnership { background: var(--accent-red); }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .layout-toolbar {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            margin: -0.5rem 0 1rem;
        }

        .layout-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-primary);
            border-radius: 10px;
            padding: 0.5rem 0.85rem;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .layout-btn:hover {
            border-color: rgba(168, 85, 247, 0.45);
            background: rgba(168, 85, 247, 0.12);
        }

        .layout-btn.active {
            border-color: rgba(168, 85, 247, 0.8);
            background: rgba(168, 85, 247, 0.18);
            color: #f5e8ff;
        }

        /* Universal Search */
        .universal-search {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            position: relative;
            z-index: 5000;
            overflow: visible;
        }

        .universal-input {
            width: 100%;
            padding: 1rem 1.25rem;
            font-size: 1.1rem;
            position: relative;
            z-index: 1001;
        }

        .search-results-universal {
            position: absolute;
            top: calc(100% + 0.75rem);
            left: 0;
            right: 0;
            z-index: 5001;
            display: block;
            color: var(--text-primary);
            background: rgba(10, 10, 24, 0.99);
            border: 1px solid rgba(168, 85, 247, 0.5);
            border-radius: 16px;
            box-shadow: 0 24px 72px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
            backdrop-filter: blur(14px);
            max-height: min(70vh, 720px);
            overflow-y: auto;
            padding: 0.75rem;
            pointer-events: auto;
            transform: translateZ(0);
        }

        .search-results-universal:empty {
            display: none;
        }

        .quick-links-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            padding: 1rem;
        }

        .quick-link-card {
            display: flex;
            align-items: center;
            gap: 0.85rem;
            padding: 0.9rem 1rem;
            background: linear-gradient(135deg, rgba(19, 18, 34, 0.96) 0%, rgba(34, 24, 52, 0.94) 100%);
            border: 1px solid rgba(168, 85, 247, 0.26);
            border-radius: 14px;
            color: inherit;
            text-decoration: none;
            min-width: min(100%, 360px);
            transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
        }

        .quick-link-card:hover {
            transform: translateY(-1px);
            border-color: rgba(168, 85, 247, 0.5);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
        }

        .quick-link-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(168, 85, 247, 0.16);
            font-size: 1.15rem;
            flex-shrink: 0;
        }

        .quick-link-copy {
            flex: 1;
            min-width: 0;
        }

        .quick-link-label {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            font-size: 0.95rem;
            font-weight: 600;
            color: #f3e8ff;
        }

        .quick-link-description {
            font-size: 0.78rem;
            color: var(--text-secondary);
            margin-top: 0.18rem;
        }

        .quick-link-count {
            margin-left: auto;
            font-size: 0.74rem;
            font-weight: 700;
            color: #e9d5ff;
            background: rgba(168, 85, 247, 0.18);
            border: 1px solid rgba(168, 85, 247, 0.32);
            border-radius: 999px;
            padding: 0.18rem 0.5rem;
        }

        .heatmap-card {
            padding: 1.25rem 1.25rem 1rem;
            position: relative;
            overflow: hidden;
        }

        .heatmap-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 36%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.12), transparent 28%);
            pointer-events: none;
        }

        .heatmap-card > * {
            position: relative;
        }

        .heatmap-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .heatmap-title-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .heatmap-icon {
            width: 42px;
            height: 42px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(168, 85, 247, 0.16);
            color: #f5e8ff;
            font-size: 1.2rem;
        }

        .heatmap-copy h2 {
            font-size: 1.05rem;
            color: #f3e8ff;
            margin-bottom: 0.15rem;
        }

        .heatmap-copy p {
            color: var(--text-secondary);
            font-size: 0.82rem;
        }

        .heatmap-summary {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .heatmap-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 999px;
            font-size: 0.76rem;
            color: #d7d2e8;
        }

        .heatmap-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .heatmap-toggle-group {
            display: inline-flex;
            gap: 0.4rem;
            padding: 0.25rem;
            background: rgba(11, 11, 17, 0.55);
            border: 1px solid rgba(168, 85, 247, 0.18);
            border-radius: 999px;
        }

        .heatmap-toggle {
            border: 0;
            background: transparent;
            color: #a9a3bb;
            padding: 0.45rem 0.85rem;
            font-size: 0.78rem;
            font-weight: 600;
            border-radius: 999px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .heatmap-toggle:hover {
            color: #f3e8ff;
            background: rgba(168, 85, 247, 0.12);
        }

        .heatmap-toggle.active {
            background: rgba(168, 85, 247, 0.22);
            color: #f5e8ff;
            box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.32);
        }

        .heatmap-legend {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            color: var(--text-secondary);
            font-size: 0.72rem;
        }

        .heatmap-legend-cell {
            width: 12px;
            height: 12px;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .heatmap-layout {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 0.75rem;
            align-items: start;
        }

        .heatmap-day-labels {
            display: grid;
            grid-template-rows: 1.1rem repeat(7, 14px);
            gap: 2px;
            color: #7f7893;
            font-size: 0.68rem;
            padding-top: 0.05rem;
        }

        .heatmap-day-labels span {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 0.25rem;
        }

        .heatmap-grid-wrap {
            position: relative;
            overflow-x: auto;
            padding-bottom: 0.4rem;
        }

        .heatmap-months {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: 14px;
            gap: 2px;
            margin-bottom: 0.35rem;
            min-width: max-content;
            color: #8e88a3;
            font-size: 0.68rem;
        }

        .heatmap-months span {
            justify-self: start;
            white-space: nowrap;
        }

        .heatmap-grid {
            display: grid;
            grid-template-rows: repeat(7, 14px);
            grid-auto-flow: column;
            grid-auto-columns: 14px;
            gap: 2px;
            min-width: max-content;
        }

        .heatmap-cell {
            width: 14px;
            height: 14px;
            border: 1px solid rgba(255, 255, 255, 0.04);
            border-radius: 4px;
            background: #1a1a24;
            position: relative;
            cursor: pointer;
            transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
        }

        .heatmap-cell:hover,
        .heatmap-cell:focus-visible {
            transform: translateY(-1px);
            border-color: rgba(255, 255, 255, 0.24);
            outline: none;
        }

        .heatmap-cell.level-0 { background: #1a1a24; }
        .heatmap-cell.level-1 { background: rgba(168, 85, 247, 0.2); }
        .heatmap-cell.level-2 { background: rgba(168, 85, 247, 0.5); }
        .heatmap-cell.level-3 { background: rgba(168, 85, 247, 0.9); }

        .heatmap-footer {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            align-items: flex-start;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

        .heatmap-agent-breakdown {
            display: flex;
            gap: 0.55rem;
            flex-wrap: wrap;
        }

        .heatmap-agent-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.7rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.06);
            font-size: 0.75rem;
            color: #dfd9f3;
        }

        .heatmap-agent-chip strong {
            color: #f5e8ff;
        }

        .heatmap-empty {
            padding: 1.25rem;
            border-radius: 14px;
            background: rgba(0, 0, 0, 0.22);
            border: 1px dashed rgba(168, 85, 247, 0.24);
            color: #9d95b5;
            font-size: 0.86rem;
            text-align: center;
        }

        .heatmap-tooltip {
            position: fixed;
            min-width: 220px;
            max-width: 280px;
            padding: 0.7rem 0.8rem;
            background: #ffffff;
            color: #111827;
            border-radius: 12px;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
            pointer-events: none;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity 0.12s ease, transform 0.12s ease;
            z-index: 9999;
        }

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

        .heatmap-tooltip-date {
            font-size: 0.8rem;
            font-weight: 700;
            margin-bottom: 0.3rem;
        }

        .heatmap-tooltip-total {
            font-size: 0.75rem;
            color: #4b5563;
            margin-bottom: 0.4rem;
        }

        .heatmap-tooltip-breakdown {
            display: flex;
            flex-direction: column;
            gap: 0.22rem;
            font-size: 0.74rem;
        }

        .search-category {
            margin-bottom: 1rem;
        }

        .search-category:last-child {
            margin-bottom: 0;
        }

        .search-category-title {
            font-size: 0.8rem;
            color: var(--accent-purple);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 0 0.25rem;
        }

        .search-hit {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 0.85rem;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid transparent;
            margin-bottom: 0.4rem;
            color: var(--text-primary);
            text-decoration: none;
        }

        .search-hit:visited,
        .search-hit:active,
        .search-hit:focus {
            color: var(--text-primary);
        }

        .search-hit:hover {
            background: rgba(168, 85, 247, 0.09);
            border-color: rgba(168, 85, 247, 0.22);
            color: #f5e8ff;
        }

        .search-hit-icon {
            font-size: 1.25rem;
        }

        .search-hit-text {
            flex: 1;
        }

        .search-hit-title {
            font-size: 0.9rem;
            font-weight: 600;
            color: #f5e8ff;
        }

        .search-hit-subtitle {
            font-size: 0.75rem;
            color: #b8b4c8;
        }

        .search-hit:visited .search-hit-title,
        .search-hit:visited .search-hit-subtitle,
        .search-hit:active .search-hit-title,
        .search-hit:active .search-hit-subtitle {
            color: inherit;
        }

        .search-hit:visited .search-hit-title,
        .search-hit:active .search-hit-title {
            color: #f5e8ff;
        }

        .search-hit:visited .search-hit-subtitle,
        .search-hit:active .search-hit-subtitle {
            color: #b8b4c8;
        }

        .match-highlight {
            background: rgba(168, 85, 247, 0.5);
            color: #ffffff;
            padding: 0.1rem 0.3rem;
            border-radius: 3px;
            font-weight: 500;
        }

        .search-hit-context {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
            padding: 0.25rem 0.5rem;
            background: rgba(168, 85, 247, 0.1);
            border-left: 2px solid var(--accent-purple);
            border-radius: 0 4px 4px 0;
        }

        /* Main Grid */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 1.5rem;
            grid-auto-flow: row dense;
            transition: outline-color 0.25s ease;
        }

        .dashboard-grid.layout-drag-active {
            outline: 1px dashed rgba(168, 85, 247, 0.45);
            outline-offset: 10px;
            border-radius: 14px;
        }

        @media (max-width: 1100px) {
            .dashboard-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

        @media (max-width: 768px) {
            .heatmap-header,
            .heatmap-controls,
            .heatmap-footer {
                flex-direction: column;
                align-items: stretch;
            }

            .heatmap-layout {
                grid-template-columns: 1fr;
            }

            .heatmap-day-labels {
                display: none;
            }

            .heatmap-grid-wrap {
                overflow-x: visible;
            }

            .heatmap-months,
            .heatmap-grid {
                grid-auto-flow: row;
                grid-template-columns: repeat(7, 14px);
                grid-auto-columns: initial;
                grid-auto-rows: 14px;
            }

            .heatmap-months {
                grid-template-columns: repeat(7, 14px);
                min-width: auto;
            }

            .layout-toolbar {
                margin-top: 0.25rem;
            }

            .layout-btn {
                display: none;
            }

            .dashboard-grid {
                grid-template-columns: 1fr;
            }

            .dashboard-widget {
                grid-column: 1 / -1 !important;
            }
        }

        /* Cards */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1.5rem;
            transition: all 0.2s ease;
        }

        .dashboard-widget {
            position: relative;
            transform-origin: center;
            transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;
        }

        .dashboard-widget[data-size="small"] {
            grid-column: span 2 !important;
        }

        .dashboard-widget[data-size="medium"] {
            grid-column: span 4 !important;
        }

        .dashboard-widget[data-size="large"] {
            grid-column: 1 / -1 !important;
        }

        @media (max-width: 768px) {
            .dashboard-widget,
            .dashboard-widget[data-size="small"],
            .dashboard-widget[data-size="medium"],
            .dashboard-widget[data-size="large"] {
                grid-column: 1 / -1 !important;
            }
        }

        body.layout-editing .dashboard-widget {
            border-color: rgba(168, 85, 247, 0.22);
        }

        body.layout-editing .dashboard-widget:hover {
            border-color: rgba(168, 85, 247, 0.45);
        }

        .dashboard-widget.dragging-widget {
            opacity: 0.45;
            transform: scale(0.985);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
        }

        .dashboard-widget.drop-target {
            border-color: rgba(168, 85, 247, 0.65) !important;
            box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.35);
        }

        .dashboard-widget.drop-before::before,
        .dashboard-widget.drop-after::after {
            content: '';
            position: absolute;
            left: 0.75rem;
            right: 0.75rem;
            height: 3px;
            background: linear-gradient(90deg, rgba(168, 85, 247, 0), rgba(168, 85, 247, 0.9), rgba(168, 85, 247, 0));
            border-radius: 2px;
            pointer-events: none;
        }

        .dashboard-widget.drop-before::before {
            top: -0.35rem;
        }

        .dashboard-widget.drop-after::after {
            bottom: -0.35rem;
        }

        .widget-chrome {
            position: absolute;
            top: 0.65rem;
            right: 0.65rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            opacity: 0;
            transform: translateY(-2px);
            pointer-events: none;
            transition: opacity 0.18s ease, transform 0.18s ease;
            z-index: 15;
        }

        body.layout-editing .widget-chrome {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .widget-drag-handle {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            border: 1px solid rgba(168, 85, 247, 0.32);
            background: rgba(168, 85, 247, 0.14);
            color: #e9d8ff;
            font-size: 0.9rem;
            line-height: 1;
            cursor: grab;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .widget-drag-handle:active {
            cursor: grabbing;
        }

        .widget-size-controls {
            display: inline-flex;
            align-items: center;
            background: rgba(14, 14, 20, 0.82);
            border: 1px solid rgba(168, 85, 247, 0.24);
            border-radius: 8px;
            overflow: hidden;
        }

        .widget-size-btn {
            border: 0;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.66rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            padding: 0.3rem 0.42rem;
            cursor: pointer;
            min-width: 26px;
            transition: all 0.18s ease;
        }

        .widget-size-btn:hover {
            color: #ece0ff;
            background: rgba(168, 85, 247, 0.16);
        }

        .widget-size-btn.active {
            color: #ffffff;
            background: rgba(168, 85, 247, 0.45);
        }

        .card:hover {
            background: var(--bg-card-hover);
            border-color: rgba(255, 255, 255, 0.12);
        }

        .card-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .card-icon {
            font-size: 1.25rem;
        }

        .card-title {
            font-size: 1rem;
            font-weight: 600;
        }

        /* Presence Card - spans full width */
        .presence-card {
            grid-column: 1 / -1;
        }

        .presence-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 1rem;
        }

        @media (max-width: 900px) {
            .presence-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 500px) {
            .presence-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .presence-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .presence-state:hover {
            background: rgba(255, 255, 255, 0.06);
        }

        .presence-state.active {
            border-color: var(--accent-purple);
            background: rgba(168, 85, 247, 0.1);
        }

        .presence-emoji {
            font-size: 1.5rem;
        }

        .presence-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-align: center;
        }

        /* Memory Search */
        .search-input {
            width: 100%;
            padding: 0.75rem 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.875rem;
            margin-bottom: 1rem;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--accent-purple);
        }

        .search-results {
            max-height: 200px;
            overflow-y: auto;
        }

        .search-result {
            padding: 0.5rem;
            border-radius: 6px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            cursor: pointer;
        }

        .search-result:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        /* CRM */
        .contact-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 250px;
            overflow-y: auto;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem;
            border-radius: 8px;
            cursor: pointer;
        }

        .contact-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .contact-item {
            cursor: pointer;
        }

        .contact-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .contact-info {
            flex: 1;
        }

        .contact-name {
            font-size: 0.875rem;
            font-weight: 500;
        }

        .contact-role {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        /* Goals */
        .goal-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .goal-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem;
            border-radius: 8px;
        }

        .goal-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid var(--border);
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .goal-checkbox.completed {
            background: var(--accent-green);
            border-color: var(--accent-green);
        }

        .goal-text {
            font-size: 0.875rem;
        }

        .goal-text.completed {
            text-decoration: line-through;
            color: var(--text-secondary);
        }

        .goal-item-enhanced {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            padding: 0.75rem;
            border-radius: 8px;
            text-decoration: none;
            color: inherit;
            transition: all 0.2s ease;
        }

        .goal-item-enhanced:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .goal-item-top {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .goal-cat-emoji {
            font-size: 1.25rem;
        }

        .goal-item-title {
            flex: 1;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .goal-priority-badge {
            font-size: 0.7rem;
            padding: 0.125rem 0.375rem;
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
            border-radius: 8px;
        }

        .goal-progress-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding-left: 2rem;
        }

        .goal-progress-bar {
            flex: 1;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .goal-progress-fill {
            height: 100%;
            background: var(--accent-green);
            border-radius: 2px;
            transition: width 0.3s ease;
        }

        .goal-progress-text {
            font-size: 0.7rem;
            color: var(--text-secondary);
            min-width: 40px;
            text-align: right;
        }

        /* Research Queue */
        .research-queue {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 200px;
            overflow-y: auto;
        }

        .research-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.625rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .research-item:hover {
            background: rgba(168, 85, 247, 0.1);
            border-color: rgba(168, 85, 247, 0.3);
        }

        .research-priority {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-top: 0.35rem;
            flex-shrink: 0;
        }

        .research-priority.high { background: #ef4444; }
        .research-priority.medium { background: #f59e0b; }
        .research-priority.low { background: #22c55e; }

        .research-content {
            flex: 1;
            min-width: 0;
        }

        .research-title {
            font-size: 0.85rem;
            font-weight: 500;
            margin-bottom: 0.125rem;
        }

        .research-meta {
            font-size: 0.7rem;
            color: var(--text-secondary);
        }

        .mission-summary-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }

        .mission-stat {
            padding: 0.65rem;
            border: 1px solid rgba(20, 184, 166, 0.24);
            border-radius: 10px;
            background: rgba(20, 184, 166, 0.07);
            text-align: center;
        }

        .mission-stat strong {
            display: block;
            color: #5eead4;
            font-size: 1.1rem;
            line-height: 1;
        }

        .mission-stat span {
            display: block;
            color: var(--text-secondary);
            font-size: 0.68rem;
            margin-top: 0.25rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .mission-chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            margin-bottom: 0.65rem;
        }

        .mission-chip {
            padding: 0.18rem 0.5rem;
            border-radius: 999px;
            background: rgba(168, 85, 247, 0.14);
            border: 1px solid rgba(168, 85, 247, 0.25);
            color: #d8b4fe;
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .mission-alert {
            border-color: rgba(239, 68, 68, 0.35);
            background: rgba(239, 68, 68, 0.08);
        }

        /* Agent Messages */
        .agent-messages-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 200px;
            overflow-y: auto;
        }

        .agent-message-item {
            padding: 0.625rem 0.75rem;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.03);
            transition: background 0.2s ease, border-color 0.2s ease;
        }

        .agent-message-item.sent {
            background: rgba(168, 85, 247, 0.12);
            border-color: rgba(168, 85, 247, 0.35);
        }

        .agent-message-item.received {
            background: rgba(59, 130, 246, 0.1);
            border-color: rgba(59, 130, 246, 0.28);
        }

        .agent-message-item:hover {
            background: rgba(168, 85, 247, 0.16);
            border-color: rgba(168, 85, 247, 0.4);
        }

        .agent-message-top {
            display: flex;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.25rem;
            font-size: 0.72rem;
        }

        .agent-message-route {
            color: var(--text-primary);
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .agent-message-time {
            color: var(--text-secondary);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .agent-message-preview {
            color: var(--text-secondary);
            font-size: 0.78rem;
            line-height: 1.4;
            word-break: break-word;
        }

        .agent-message-empty {
            color: var(--text-secondary);
            font-size: 0.85rem;
            padding: 0.5rem;
        }

        /* Resident corner */
        .quinn-corner {
            background: linear-gradient(135deg, var(--bg-card) 0%, rgba(168, 85, 247, 0.05) 100%);
        }

        /* Topics */
        .topic-cloud {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .topic-tag {
            padding: 0.375rem 0.75rem;
            background: rgba(168, 85, 247, 0.15);
            border: 1px solid rgba(168, 85, 247, 0.3);
            border-radius: 16px;
            font-size: 0.75rem;
            color: var(--accent-purple);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .topic-tag:hover {
            background: rgba(168, 85, 247, 0.25);
        }

        /* Personal inbox */
        .adam-inbox-widget {
            background: linear-gradient(145deg, rgba(36, 32, 18, 0.96) 0%, rgba(26, 24, 20, 0.98) 100%);
            border: 1px solid rgba(212, 175, 55, 0.35);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        .adam-inbox-total {
            margin-left: auto;
            background: rgba(212, 175, 55, 0.16);
            border: 1px solid rgba(212, 175, 55, 0.4);
            color: #f4d77f;
            border-radius: 999px;
            padding: 0.125rem 0.5rem;
            font-size: 0.72rem;
            font-weight: 700;
        }

        .adam-inbox-empty {
            color: #86efac;
            font-size: 0.88rem;
            text-align: center;
            padding: 0.85rem 0.5rem;
            border: 1px dashed rgba(74, 222, 128, 0.35);
            border-radius: 10px;
            background: rgba(15, 32, 16, 0.35);
        }

        .adam-inbox-section {
            border: 1px solid rgba(212, 175, 55, 0.2);
            border-radius: 10px;
            background: rgba(18, 18, 16, 0.75);
            margin-bottom: 0.55rem;
        }

        .adam-inbox-section summary {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            list-style: none;
            cursor: pointer;
            padding: 0.55rem 0.65rem;
            font-size: 0.8rem;
            font-weight: 600;
            color: #f3f1ea;
        }

        .adam-inbox-section summary::-webkit-details-marker {
            display: none;
        }

        .adam-inbox-section:hover {
            border-color: rgba(212, 175, 55, 0.38);
        }

        .adam-inbox-badge {
            margin-left: auto;
            min-width: 1.7rem;
            text-align: center;
            border-radius: 999px;
            font-size: 0.68rem;
            font-weight: 700;
            padding: 0.1rem 0.35rem;
            color: #111111;
        }

        .adam-inbox-items {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            padding: 0 0.55rem 0.55rem;
        }

        .adam-inbox-item {
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.02);
        }

        .adam-inbox-item summary {
            display: block;
            list-style: none;
            cursor: pointer;
            padding: 0.5rem 0.55rem;
        }

        .adam-inbox-item summary::-webkit-details-marker {
            display: none;
        }

        .adam-inbox-line {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            margin-bottom: 0.2rem;
        }

        .adam-inbox-title {
            flex: 1;
            min-width: 0;
            font-size: 0.8rem;
            font-weight: 600;
            color: #f8f7f2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .adam-inbox-priority {
            flex-shrink: 0;
            font-size: 0.62rem;
            border: 1px solid rgba(239, 68, 68, 0.65);
            color: #fca5a5;
            border-radius: 999px;
            padding: 0.06rem 0.35rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            font-weight: 700;
        }

        .adam-inbox-meta {
            font-size: 0.7rem;
            color: #b7b2a1;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            min-width: 0;
        }

        .adam-inbox-context {
            border-top: 1px solid rgba(255, 255, 255, 0.07);
            padding: 0.52rem 0.55rem 0.6rem;
            font-size: 0.76rem;
            color: #ddd8c6;
            line-height: 1.45;
        }

        .adam-inbox-actions {
            display: flex;
            gap: 0.4rem;
            margin-top: 0.52rem;
        }

        .adam-inbox-action {
            border: 1px solid rgba(212, 175, 55, 0.45);
            background: rgba(212, 175, 55, 0.08);
            color: #f4d77f;
            border-radius: 7px;
            font-size: 0.68rem;
            font-weight: 600;
            padding: 0.26rem 0.5rem;
            opacity: 0.78;
            cursor: not-allowed;
        }

        .adam-inbox-section-label {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .adam-inbox-item-separator {
            color: #6f6a5a;
        }

        /* Upcoming Events */
        .upcoming-events-widget {
            background: linear-gradient(145deg, rgba(16, 26, 36, 0.96) 0%, rgba(18, 18, 28, 0.98) 100%);
            border: 1px solid rgba(56, 189, 248, 0.28);
            overflow: hidden;
        }

        .upcoming-events-count {
            margin-left: auto;
            background: rgba(56, 189, 248, 0.12);
            border: 1px solid rgba(56, 189, 248, 0.36);
            color: #7dd3fc;
            border-radius: 999px;
            padding: 0.125rem 0.5rem;
            font-size: 0.72rem;
            font-weight: 700;
        }

        .upcoming-event-next {
            border: 1px solid rgba(56, 189, 248, 0.28);
            border-radius: 12px;
            padding: 0.85rem;
            background: rgba(8, 16, 26, 0.72);
            margin-bottom: 0.8rem;
        }

        .upcoming-event-eyebrow {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            color: #7dd3fc;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            margin-bottom: 0.35rem;
        }

        .upcoming-event-title {
            font-size: 0.96rem;
            color: #f0f9ff;
            font-weight: 700;
            line-height: 1.25;
            overflow-wrap: anywhere;
        }

        .upcoming-event-description {
            margin-top: 0.25rem;
            color: #b6c8d8;
            font-size: 0.78rem;
            line-height: 1.4;
            overflow-wrap: anywhere;
        }

        .upcoming-event-list {
            display: flex;
            flex-direction: column;
            gap: 0.48rem;
        }

        .upcoming-event-item {
            display: flex;
            gap: 0.6rem;
            align-items: flex-start;
            padding: 0.58rem 0.62rem;
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.025);
        }

        .upcoming-event-emoji {
            width: 30px;
            height: 30px;
            border-radius: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(56, 189, 248, 0.12);
            flex-shrink: 0;
        }

        .upcoming-event-copy {
            flex: 1;
            min-width: 0;
        }

        .upcoming-event-name {
            display: flex;
            gap: 0.4rem;
            align-items: baseline;
            justify-content: space-between;
            color: #e7f6ff;
            font-size: 0.82rem;
            font-weight: 650;
        }

        .upcoming-event-date {
            color: #7aa0b8;
            font-size: 0.7rem;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .upcoming-event-meta {
            color: #91a6b8;
            font-size: 0.72rem;
            margin-top: 0.1rem;
        }

        .upcoming-event-empty {
            border: 1px dashed rgba(56, 189, 248, 0.26);
            border-radius: 12px;
            padding: 0.85rem;
            color: #a9bfd0;
            background: rgba(56, 189, 248, 0.045);
            font-size: 0.82rem;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }

        .upcoming-event-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-top: 0.8rem;
            color: #7aa0b8;
            font-size: 0.72rem;
        }

        @media (max-width: 500px) {
            .upcoming-event-name {
                flex-direction: column;
                gap: 0.12rem;
            }

            .upcoming-event-date {
                white-space: normal;
            }
        }

        .upcoming-event-footer a {
            color: #7dd3fc;
            text-decoration: none;
            font-weight: 650;
        }

        .upcoming-event-footer a:hover {
            color: #bae6fd;
        }

        /* Links */
        .links-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
        }

        .link-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 8px;
            text-decoration: none;
            color: var(--text-primary);
            font-size: 0.8rem;
            transition: all 0.2s ease;
        }

        .link-item:hover {
            background: rgba(255, 255, 255, 0.06);
            border-color: var(--accent-purple);
        }

        .link-icon {
            font-size: 1rem;
        }

        /* Footer */
        .footer {
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--border);
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.75rem;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 0.5rem;
        }

        .footer-links a {
            color: var(--text-secondary);
            text-decoration: none;
        }

        .footer-links a:hover {
            color: var(--accent-purple);
        }
    